import{u as c,D as h}from"./DzTg5x6T.js";import{u as o}from"./DjHBbOhD.js";const C=()=>{const t=c(),a=h(),u=()=>!!o("auth_token").value,s=(e=!0)=>u()?!0:(e&&a.path!=="/login"&&t.push("/login"),!1),n=()=>{const e=o("auth_token"),r=o("user_data"),i=o("admin_data"),l=o("user_type");e.value=null,r.value=null,i.value=null,l.value=null,t.push("/login")};return{isAuthenticated:u,checkAuth:s,logout:n,handleUnauthorized:()=>{n()}}};export{C as u};
