File: //opt/netdata/usr/share/netdata/web/v3/6026.d73c5be8ac72a8bee09e.chunk.js
try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},a=(new e.Error).stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="b4aba134-36e6-413f-8acf-ef151ea73c04",e._sentryDebugIdIdentifier="sentry-dbid-b4aba134-36e6-413f-8acf-ef151ea73c04")}()}catch(e){}!function(){try{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"90d303f8dd87a8d6019a3c19f5212282f6c3cf45"}}catch(e){}}(),(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[6026],{96026:(e,a,t)=>{t.d(a,{l:()=>u,q:()=>c});t(25509),t(65223),t(60321),t(41927),t(11632),t(64377),t(66771),t(12516),t(68931),t(52514),t(35694),t(52774),t(49536),t(21926),t(94483),t(16215);var n=t(96540),r=t(88934),d=t(42790),o=t(61841),l=t(24609),s=t(24013),f=t(19075),i=t(91421);const c=e=>{let{alertId:a,alertName:t,nodeIds:d=[]}=e;const l=(0,r.Zp)(),{setState:c}=(0,i.$h)(),[u]=(0,o.Ay)(),{name:b}=(0,f.JL)(a),p=t||b,{isParent:y}=(0,s.xY)(d[0]),{loaded:h,value:g,hasError:w,error:I}=(0,i.wd)({node:{value:d[0],isParent:y},path:"/health"}),E=!!g?.tree?.["/health/alerts/prototypes"]?.[`health:alert:prototype:${p}`],[,k]=(0,i.PJ)();return{canEdit:h&&!w&&E,goToEdit:(0,n.useCallback)((e=>{d=e?Array.from(new Set([e,...d])):d,c({alertName:p,isAlert:!0}),k(!0,{nodeId:d[0]})}),[p,d,u,c,l]),error:I?.errorMessage||I}},u=()=>{const e=(0,r.Zp)(),{slug:a}=(0,l.ap)(),t=(0,d.rI)();return(0,n.useCallback)((n=>{n&&(t((e=>({...e,dyncfgSearchTerm:n}))),e(`/spaces/${a}/settings/configurations`,{replace:!0}))}),[e,t,a])}}}]);