{"version":3,"file":"1488.ff35935a06f41b02b6cc.js","mappings":"mIAWO,SAASA,EAAsBC,EAAuBC,EAAmB,CAC9E,MAAMC,EAAc,IAAgB,UAAU,6BAA6B,SAASF,GAAgB,GAAI,CACtG,GAAGC,EACH,KAAM,CAACD,CACT,CAAC,EAED,MAAO,CACL,GAAGE,EAEH,MAAOA,EAAY,KACrB,CACF,C","sources":["webpack://grafana/./public/app/features/alerting/unified/hooks/useAlertmanagerConfig.ts"],"sourcesContent":["import { SerializedError } from '@reduxjs/toolkit';\n\nimport { alertmanagerApi } from '../api/alertmanagerApi';\n\ntype Options = {\n refetchOnFocus: boolean;\n refetchOnReconnect: boolean;\n};\n\n// TODO refactor this so we can just call \"alertmanagerApi.endpoints.getAlertmanagerConfiguration\" everywhere\n// and remove this hook since it adds little value\nexport function useAlertmanagerConfig(amSourceName?: string, options?: Options) {\n const fetchConfig = alertmanagerApi.endpoints.getAlertmanagerConfiguration.useQuery(amSourceName ?? '', {\n ...options,\n skip: !amSourceName,\n });\n\n return {\n ...fetchConfig,\n // TODO refactor to get rid of this type assertion\n error: fetchConfig.error as SerializedError,\n };\n}\n"],"names":["useAlertmanagerConfig","amSourceName","options","fetchConfig"],"sourceRoot":""}