File: //opt/netdata/usr/share/netdata/web/v3/6026.db51e3c015608eb6e95e.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:"aeeb2702d6a0b41e7dabfc313b63e720f0845c35"};var r=(new e.Error).stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="0940c001-0fbb-4241-99d2-d6634c7fb16e",e._sentryDebugIdIdentifier="sentry-dbid-0940c001-0fbb-4241-99d2-d6634c7fb16e")}catch(e){}}(),(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[6026],{96026(e,r,t){t.d(r,{l:()=>y,q:()=>p});var n=t(64467),o=(t(98992),t(54520),t(3949),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),t(62953),t(96540)),a=t(35570),c=t(42790),l=t(61841),d=t(24609),s=t(24013),i=t(19075),b=t(91421);function f(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function u(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?f(Object(t),!0).forEach((function(r){(0,n.A)(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):f(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}const p=e=>{var r;let{alertId:t,alertName:n,nodeIds:c=[]}=e;const d=(0,a.Zp)(),{setState:f}=(0,b.$h)(),[u]=(0,l.Ay)(),{name:p}=(0,i.JL)(t),y=n||p,{isParent:g}=(0,s.xY)(c[0]),{loaded:h,value:O,hasError:v,error:w}=(0,b.wd)({node:{value:c[0],isParent:g},path:"/health"}),j=!(null===O||void 0===O||null===(r=O.tree)||void 0===r||null===(r=r["/health/alerts/prototypes"])||void 0===r||!r["health:alert:prototype:".concat(y)]),[,P]=(0,b.PJ)();return{canEdit:h&&!v&&j,goToEdit:(0,o.useCallback)((e=>{c=e?Array.from(new Set([e,...c])):c,f({alertName:y,isAlert:!0}),P(!0,{nodeId:c[0]})}),[y,c,u,f,d]),error:(null===w||void 0===w?void 0:w.errorMessage)||w}},y=()=>{const e=(0,a.Zp)(),{slug:r}=(0,d.ap)(),t=(0,c.rI)();return(0,o.useCallback)((n=>{n&&(t((e=>u(u({},e),{},{dyncfgSearchTerm:n}))),e("/spaces/".concat(r,"/settings/configurations"),{replace:!0}))}),[e,t,r])}}}]);