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