import{G as r,g as u}from"./entry.4a1e3e7a.js";import{u as i}from"./useErrorHandling.17b028a2.js";function m(){const{$store:t,$router:a,$axios:o,$csAuth:e}=u(),{handleError:c}=i(),s=r("Successfully logged out");return{logout:async()=>{await e.logout().then(async()=>{await o.get("/cs/api/csrf_token/"),await t.commit("cart/resetCart"),await t.commit("nav/setNavigationState",!1),a.push("/"),t.dispatch("notifications/add",{message:s.value,type:"success"})}).catch(c)},logOutMessage:s}}export{m as u};