!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"6866bb78c87eb499c83445c224071f481cf2061d"};var r=(new e.Error).stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="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,r,a){a.d(r,{l:()=>u,q:()=>b});a(25509),a(65223),a(60321),a(41927),a(11632),a(64377),a(66771),a(12516),a(68931),a(52514),a(35694),a(52774),a(49536),a(21926),a(94483),a(16215);var t=a(96540),n=a(76667),d=a(42790),o=a(61841),s=a(24609),l=a(24013),c=a(19075),i=a(91421);const b=e=>{let{alertId:r,alertName:a,nodeIds:d=[]}=e;const s=(0,n.Zp)(),{setState:b}=(0,i.$h)(),[u]=(0,o.Ay)(),{name:f}=(0,c.JL)(r),h=a||f,{isParent:p}=(0,l.xY)(d[0]),{loaded:g,value:y,hasError:w,error:I}=(0,i.wd)({node:{value:d[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=>{d=e?Array.from(new Set([e,...d])):d,b({alertName:h,isAlert:!0}),k(!0,{nodeId:d[0]})},[h,d,u,b,s]),error:I?.errorMessage||I}},u=()=>{const e=(0,n.Zp)(),{slug:r}=(0,s.ap)(),a=(0,d.rI)();return(0,t.useCallback)(t=>{t&&(a(e=>({...e,dyncfgSearchTerm:t})),e(`/spaces/${r}/settings/configurations`,{replace:!0}))},[e,a,r])}}}]);