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