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:"9085f826cfdc1d75ddfbe898ad75a9c7a36a9da7"}}catch(e){}}(),(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[1861],{61841:(e,t,n)=>{n.d(t,{Ay:()=>c,KI:()=>f,TP:()=>l});var o=n(96540),r=n(88934),d=n(19186),a=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,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},c=()=>[f(),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),a=(0,o.useMemo)((()=>new window.ResizeObserver((e=>{if(e[0]){const{x:t,y:n,width:o,height:r,top:a,left:s,bottom:l,right:f}=e[0].contentRect;d({x:t,y:n,width:o,height:r,top:a,left:s,bottom:l,right:f})}}))),[]);return(0,o.useLayoutEffect)((()=>{if(e)return a.observe(e),()=>{a.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),a=n(61841),s=n(24609),l=n(24013),f=n(19075),c=n(91421);const i=e=>{let{alertId:t,alertName:n,nodeIds:d=[]}=e;const s=(0,r.Zp)(),{setState:i}=(0,c.$h)(),[u]=(0,a.Ay)(),{name:h}=(0,f.JL)(t),g=n||h,{isParent:b}=(0,l.xY)(d[0]),{loaded:y,value:p,hasError:w,error:m}=(0,c.wd)({node:{value:d[0],isParent:b},path:"/health"}),E=!!p?.tree?.["/health/alerts/prototypes"]?.[`health:alert:prototype:${g}`],[,I]=(0,c.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,s]),error:m?.errorMessage||m}},u=()=>{const e=(0,r.Zp)(),{slug:t}=(0,s.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])}}}]);