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]="4de56a90-afe4-411b-a430-e67d82f80e22",e._sentryDebugIdIdentifier="sentry-dbid-4de56a90-afe4-411b-a430-e67d82f80e22")}()}catch(e){}!function(){try{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"f4547e36230aa8f74486618baff2f1a6f3242a7f"}}catch(e){}}(),(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[6026],{96026:(e,a,t)=>{t.d(a,{l:()=>c,q:()=>u});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),f=t(24013),s=t(19075),i=t(91421);const u=e=>{let{alertId:a,alertName:t,nodeIds:d=[]}=e;const l=(0,r.Zp)(),{setState:u}=(0,i.$h)(),[c]=(0,o.Ay)(),{name:p}=(0,s.JL)(a),b=t||p,{isParent:y}=(0,f.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:${b}`],[,k]=(0,i.PJ)();return{canEdit:h&&!w&&E,goToEdit:(0,n.useCallback)((e=>{d=e?Array.from(new Set([e,...d])):d,u({alertName:b,isAlert:!0}),k(!0,{nodeId:d[0]})}),[b,d,c,u,l]),error:I?.errorMessage||I}},c=()=>{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])}}}]);