import { executeAsync } from 'unctx';
import { useSSRContext } from 'vue';
import { d as defineNuxtComponent, j as useRouter, g as useAuthStore } from '../server.mjs';
import 'ofetch';
import 'hookable';
import 'vue-router';
import 'h3';
import 'ufo';
import '@ebec/http';
import 'hapic';
import '@hapic/oauth2';
import 'rapiq';
import '@hapic/vault';
import '@vue-layout/navigation';
import 'destr';
import 'change-case';
import '@vue-layout/list-controls/core';
import '@vue-layout/form-controls';
import 'smob';
import '@vue-layout/list-controls';
import '@vue-layout/pagination';
import '@ucast/mongo2js';
import '@vuelidate/validators';
import 'ilingo';
import '@vuelidate/core';
import 'nanoid';
import '@unhead/ssr';
import 'unhead';
import '@unhead/shared';
import 'bootstrap-vue-next';
import '@vue-layout/preset-bootstrap-v5';
import '@vue-layout/preset-font-awesome';
import '@vue-layout/countdown';
import '@vue-layout/timeago';
import 'browser-storage-adapter';
import 'cookie-es';
import 'ohash';
import 'vue/server-renderer';
import 'defu';
import '../../nitro/node-server.mjs';
import 'node-fetch-native/polyfill';
import 'node:http';
import 'node:https';
import 'unenv/runtime/fetch/index';
import 'scule';
import 'klona';
import 'unstorage';
import 'radix3';
import 'node:fs';
import 'node:url';
import 'pathe';
import 'http-graceful-shutdown';

const _sfc_main = /* @__PURE__ */ defineNuxtComponent({
  async setup() {
    let __temp, __restore;
    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();
    [__temp, __restore] = executeAsync(() => store.logout()), await __temp, __restore();
    [__temp, __restore] = executeAsync(() => router.push({ path: "/login", query })), await __temp, __restore();
  }
}, "$uZ5b4v8paw");
const _sfc_setup = _sfc_main.setup;
_sfc_main.setup = (props, ctx) => {
  const ssrContext = useSSRContext();
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("pages/logout.vue");
  return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
};

export { _sfc_main as default };
//# sourceMappingURL=logout-a2a1ad74.mjs.map
