import { j as useRouter } from './nuxt-link-5ac46069.mjs';
import { d as defineNuxtComponent, u as useAuthStore } from './auth-2d06b6ac.mjs';
import 'vue';
import 'ufo';
import 'hookable';
import 'unctx';
import 'h3';
import './composables-31566dd1.mjs';
import '@ucast/mongo2js';
import 'change-case';
import '@ebec/http';
import 'hapic';
import '@hapic/oauth2';

const logout = defineNuxtComponent({
  async setup() {
    const router = useRouter();
    const query = {
      redirect: ""
    };
    const { redirect } = router.currentRoute.value.query;
    if (redirect && typeof redirect === "string" && !redirect.includes("logout")) {
      query.redirect = redirect;
    }
    const store = useAuthStore();
    await store.logout();
    await router.push({ path: "/login", query });
  }
});

export { logout as default };
//# sourceMappingURL=logout-2080a7c3.mjs.map
