import{b as l,c as o}from"./chunk-TY33ZR3E.js";var e=l(typeof localStorage<"u"?localStorage.getItem("jwt"):null),n=l(null);function r(a){try{return JSON.parse(atob(a.split(".")[1])).sub||null}catch(t){return console.error("Failed to decode token:",t),e.value=null,null}}o(()=>{e.value?(typeof localStorage<"u"&&localStorage.setItem("jwt",e.value),n.value=r(e.value)):(n.value=null,typeof localStorage<"u"&&localStorage.removeItem("jwt"))});export{e as a,n as b};
