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