import{g as v}from"./codebaseEvents-s4M7UMV6.js";import{r as t,l as y,n as E,p as s}from"./jwt-decode.esm-CX61wVx3.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},n=new Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="7fd3e121-da3d-4aeb-a938-2f88ff3aa429",e._sentryDebugIdIdentifier="sentry-dbid-7fd3e121-da3d-4aeb-a938-2f88ff3aa429")}catch{}})();const p=new Set(["changed","created","deleted","moved"]);function w(){const e=t(!1),n=t(null),o=t(null),c=t(null),f=t(null),r=v(),i=a=>{p.has(a.event)?n.value=a:o.value=a},d=()=>{e.value=r.isConnected()};let l,u;const b=setInterval(d,1e3);return y(()=>{l(),u(),clearInterval(b)}),E(()=>{l=r.subscribe(i),u=r.subscribeReconnect(()=>{c.value=Date.now()}),d()}),{isConnected:s(e),lastEvent:s(n),lastPresenceEvent:s(o),reconnectedAt:s(c),error:s(f)}}export{w as u};
//# sourceMappingURL=useCodebaseEvents-BK-wKPXc.js.map
