import { _ as __nuxt_component_0 } from './nuxt-link-5ac46069.mjs';
import { ref, useSSRContext, resolveComponent, withCtx, createVNode } from 'vue';
import { NavigationComponents } from '@vue-layout/basic';
import { d as defineNuxtComponent, u as useAuthStore, b as storeToRefs } from './auth-2d06b6ac.mjs';
import { ssrRenderAttrs, ssrRenderClass, ssrRenderComponent, ssrInterpolate } from 'vue/server-renderer';
import { _ as _export_sfc } from './_plugin-vue_export-helper-cc2b3d55.mjs';

const _sfc_main$1 = defineNuxtComponent({
  components: {
    NavigationComponents
  },
  setup() {
    const store = useAuthStore();
    const { loggedIn, user } = storeToRefs(store);
    const displayNav = ref(false);
    const toggleNav = () => {
      displayNav.value = !displayNav.value;
    };
    return {
      loggedIn,
      user,
      toggleNav,
      displayNav
    };
  }
});
function _sfc_ssrRender$1(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
  const _component_navigation_components = resolveComponent("navigation-components");
  const _component_nuxt_link = __nuxt_component_0;
  _push(`<div${ssrRenderAttrs(_attrs)}><header class="page-header fixed-top"><div class="header-title"><div class="toggle-box"><button type="button" class="toggle-trigger"><span class="sr-only">Toggle navigation</span><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></button></div><div class="logo"> Authup </div></div><nav class="page-navbar navbar-expand-md"><div id="page-navbar" class="${ssrRenderClass([{ "show": _ctx.displayNav }, "navbar-content navbar-collapse collapse"])}">`);
  _push(ssrRenderComponent(_component_navigation_components, {
    class: "navbar-nav",
    tier: 0
  }, null, _parent));
  if (_ctx.loggedIn && _ctx.user) {
    _push(`<ul class="navbar-nav nav-items navbar-gadgets"><li class="nav-item"><a href="javascript:void(0)" class="nav-link"><span>${ssrInterpolate(_ctx.user.displayName ? _ctx.user.displayName : _ctx.user.name)}</span></a></li><li class="nav-item">`);
    _push(ssrRenderComponent(_component_nuxt_link, {
      to: "/settings",
      class: "nav-link"
    }, {
      default: withCtx((_, _push2, _parent2, _scopeId) => {
        if (_push2) {
          _push2(`<i class="fa fa-cog"${_scopeId}></i>`);
        } else {
          return [
            createVNode("i", { class: "fa fa-cog" })
          ];
        }
      }),
      _: 1
    }, _parent));
    _push(`</li><li class="nav-item">`);
    _push(ssrRenderComponent(_component_nuxt_link, {
      to: "/logout",
      class: "nav-link"
    }, {
      default: withCtx((_, _push2, _parent2, _scopeId) => {
        if (_push2) {
          _push2(`<i class="fa fa-power-off"${_scopeId}></i>`);
        } else {
          return [
            createVNode("i", { class: "fa fa-power-off" })
          ];
        }
      }),
      _: 1
    }, _parent));
    _push(`</li></ul>`);
  } else {
    _push(`<!---->`);
  }
  _push(`</div></nav></header></div>`);
}
const _sfc_setup$1 = _sfc_main$1.setup;
_sfc_main$1.setup = (props, ctx) => {
  const ssrContext = useSSRContext();
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/header.vue");
  return _sfc_setup$1 ? _sfc_setup$1(props, ctx) : void 0;
};
const pageHeader = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["ssrRender", _sfc_ssrRender$1]]);

const _sfc_main = {
  computed: {
    year() {
      return (/* @__PURE__ */ new Date()).getFullYear();
    }
  }
};
function _sfc_ssrRender(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
  _push(`<div${ssrRenderAttrs(_attrs)}><div class="page-footer"><div class="copyright"> \xA9 Authup ${ssrInterpolate($options.year)}</div></div></div>`);
}
const _sfc_setup = _sfc_main.setup;
_sfc_main.setup = (props, ctx) => {
  const ssrContext = useSSRContext();
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/footer.vue");
  return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
};
const pageFooter = /* @__PURE__ */ _export_sfc(_sfc_main, [["ssrRender", _sfc_ssrRender]]);

export { pageFooter as a, pageHeader as p };
//# sourceMappingURL=footer-c9f536dd.mjs.map
