try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="4b8e492d-ec4d-4457-a2ae-9c57cd8edaff",e._sentryDebugIdIdentifier="sentry-dbid-4b8e492d-ec4d-4457-a2ae-9c57cd8edaff")}catch(e){}("undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:{}).SENTRY_RELEASE={id:"1bb8aa54b6deb0d4e541ef02c3c43ba128927d94"};(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[1861],{61841:(e,t,o)=>{o.d(t,{Ay:()=>i,KI:()=>f,TP:()=>l});var n=o(96540),r=o(15920),d=o(19186),a=o(24609);const s=(e,t,o)=>{const r=t();(0,n.useLayoutEffect)((()=>{r!==e&&o(e)}),[r,e])},l=()=>{const{roomSlug:e}=(0,r.g)(),t=(0,d.A2)();return s(e,d.QW,t),e},f=()=>{const{spaceSlug:e}=(0,r.g)(),t=(0,a.hX)();return s(e,a.bq,t),e},i=()=>[f(),l()]},85660:(e,t,o)=>{o.d(t,{A:()=>d});var n=o(96540);const r={x:0,y:0,width:0,height:0,top:0,left:0,bottom:0,right:0},d=()=>{const[e,t]=(0,n.useState)(null),[o,d]=(0,n.useState)(r),a=(0,n.useMemo)((()=>new window.ResizeObserver((e=>{if(e[0]){const{x:t,y:o,width:n,height:r,top:a,left:s,bottom:l,right:f}=e[0].contentRect;d({x:t,y:o,width:n,height:r,top:a,left:s,bottom:l,right:f})}}))),[]);return(0,n.useLayoutEffect)((()=>{if(e)return a.observe(e),()=>{a.disconnect()}}),[e]),[t,o]}},96026:(e,t,o)=>{o.d(t,{l:()=>u,q:()=>c});o(25509),o(65223),o(60321),o(41927),o(11632),o(64377),o(66771),o(12516),o(68931),o(52514),o(35694),o(52774),o(49536),o(21926),o(94483),o(16215);var n=o(96540),r=o(15920),d=o(42790),a=o(61841),s=o(24609),l=o(24013),f=o(19075),i=o(7101);const c=e=>{let{alertId:t,alertName:o,nodeIds:d=[]}=e;const s=(0,r.Zp)(),{setState:c}=(0,i.$h)(),[u]=(0,a.Ay)(),{name:h}=(0,f.JL)(t),b=o||h,{isParent:g}=(0,l.xY)(d[0]),{loaded:p,value:y,hasError:w,error:m}=(0,i.wd)({node:{value:d[0],isParent:g},path:"/health"}),E=!!y?.tree?.["/health/alerts/prototypes"]?.[`health:alert:prototype:${b}`],[,I]=(0,i.PJ)();return{canEdit:p&&!w&&E,goToEdit:(0,n.useCallback)((e=>{d=e?Array.from(new Set([e,...d])):d,c({alertName:b,isAlert:!0}),I(!0,{nodeId:d[0]})}),[b,d,u,c,s]),error:m?.errorMessage||m}},u=()=>{const e=(0,r.Zp)(),{slug:t}=(0,s.ap)(),o=(0,d.rI)();return(0,n.useCallback)((n=>{n&&(o((e=>({...e,dyncfgSearchTerm:n}))),e(`/spaces/${t}/settings/configurations`,{replace:!0}))}),[e,o,t])}}}]);