import{i as l}from"./contracts.generated-BDOilB4N.js";import{W as b}from"./webSocketService-DgPUjI2c.js";import{r as t,Q as f,R as v,a9 as s}from"./jwt-decode.esm-Da8x-1xB.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]="5463b059-60df-4967-86e6-0becf2453ea3",e._sentryDebugIdIdentifier="sentry-dbid-5463b059-60df-4967-86e6-0becf2453ea3")}catch{}})();const p="/_editor/api/codebase/events";function y(){return b.getInstance({url:p,parse:e=>l.parse(e)})}function C(){const e=t(!1),n=t(null),o=t(null),r=y(),d=u=>{n.value=u},a=()=>{e.value=r.isConnected()};let c;const i=setInterval(a,1e3);return f(()=>{c(),clearInterval(i)}),v(()=>{c=r.subscribe(d),a()}),{isConnected:s(e),lastEvent:s(n),error:s(o)}}export{C as u};
//# sourceMappingURL=useCodebaseEvents-pOy82kT7.js.map
