!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"d1c7ac46f068d62cb709fcb0a5f45d31b06ca6ae"};var a=(new e.Error).stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="38bcc8a6-6fd8-4f30-852b-8597514305ec",e._sentryDebugIdIdentifier="sentry-dbid-38bcc8a6-6fd8-4f30-852b-8597514305ec")}catch(e){}}(),(globalThis.webpackChunkcloud_frontend=globalThis.webpackChunkcloud_frontend||[]).push([[6026],{96026(e,a,r){r.d(a,{l:()=>u,q:()=>b});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),n=r(5981),d=r(42790),o=r(61841),s=r(24609),l=r(24013),c=r(19075),f=r(91421),i=r(15750);const b=e=>{let{alertId:a,alertName:r,nodeIds:d=[]}=e;const s=(0,n.Zp)(),{setState:i}=(0,f.$h)(),[b]=(0,o.Ay)(),{name:u}=(0,c.JL)(a),h=r||u,{isParent:p}=(0,l.xY)(d[0]),{loaded:g,value:y,hasError:w,error:I}=(0,f.wd)({node:{value:d[0],isParent:p},path:"/health"}),E=!!y?.tree?.["/health/alerts/prototypes"]?.[`health:alert:prototype:${h}`],[,k]=(0,f.PJ)();return{canEdit:g&&!w&&E,goToEdit:(0,t.useCallback)(e=>{d=e?Array.from(new Set([e,...d])):d,i({alertName:h,isAlert:!0}),k(!0,{nodeId:d[0]})},[h,d,b,i,s]),error:I?.errorMessage||I}},u=()=>{const e=(0,n.Zp)(),{slug:a}=(0,s.ap)(),r=(0,d.rI)(),o=(0,i.A)();return(0,t.useCallback)(t=>{t&&(r(e=>({...e,dyncfgSearchTerm:t})),e(o(`/spaces/${a}/settings/configurations`),{replace:!0}))},[e,r,a,o])}}}]);