File: //proc/self/root/opt/netdata/netdata-web-files/v3/6026.7030f7188fec77534873.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:"924951b7e9646327aedf6a644e4ade24c230a2be"};var r=(new e.Error).stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="2553772a-4e3d-4d5f-9d90-1e3f6dee1a7e",e._sentryDebugIdIdentifier="sentry-dbid-2553772a-4e3d-4d5f-9d90-1e3f6dee1a7e")}catch(e){}}(),(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[6026],{96026(e,r,t){t.d(r,{l:()=>y,q:()=>b});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(41344),d=t(42790),l=t(61841),s=t(24609),c=t(24013),i=t(19075),u=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 p(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 b=e=>{var r;let{alertId:t,alertName:n,nodeIds:d=[]}=e;const s=(0,a.Zp)(),{setState:f}=(0,u.$h)(),[p]=(0,l.Ay)(),{name:b}=(0,i.JL)(t),y=n||b,{isParent:g}=(0,c.xY)(d[0]),{loaded:h,value:O,hasError:v,error:w}=(0,u.wd)({node:{value:d[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,u.PJ)();return{canEdit:h&&!v&&j,goToEdit:(0,o.useCallback)((e=>{d=e?Array.from(new Set([e,...d])):d,f({alertName:y,isAlert:!0}),P(!0,{nodeId:d[0]})}),[y,d,p,f,s]),error:(null===w||void 0===w?void 0:w.errorMessage)||w}},y=()=>{const e=(0,a.Zp)(),{slug:r}=(0,s.ap)(),t=(0,d.rI)();return(0,o.useCallback)((n=>{n&&(t((e=>p(p({},e),{},{dyncfgSearchTerm:n}))),e("/spaces/".concat(r,"/settings/configurations"),{replace:!0}))}),[e,t,r])}}}]);