import { _ as __nuxt_component_0 } from './nuxt-link-Ci8vU-Yt.mjs'; import { defineComponent, computed, ref, mergeProps, withCtx, createVNode, toDisplayString, unref, openBlock, createBlock, createTextVNode, useSSRContext } from 'vue'; import { ssrRenderAttrs, ssrRenderClass, ssrRenderComponent, ssrRenderAttr, ssrRenderList, ssrRenderStyle, ssrInterpolate, ssrRenderSlot } from 'vue/server-renderer'; import { p as publicAssetsURL } from '../nitro/nitro.mjs'; import { useRoute } from 'vue-router'; import { u as useRegionStore } from './region-0mvXqaMM.mjs'; import { b as useRouter, c as useAuthStore, a as useI18n } from './server.mjs'; import 'node:http'; import 'node:https'; import 'node:events'; import 'node:buffer'; import 'node:fs'; import 'node:path'; import 'node:crypto'; import 'node:url'; import 'pinia'; import '../routes/renderer.mjs'; import 'vue-bundle-renderer/runtime'; import 'unhead/server'; import 'devalue'; import 'unhead/utils'; import 'unhead/plugins'; const _imports_0 = publicAssetsURL("/logo.svg"); const _sfc_main = /* @__PURE__ */ defineComponent({ __name: "default", __ssrInlineRender: true, setup(__props) { const route = useRoute(); useRouter(); const authStore = useAuthStore(); useRegionStore(); const { locale, locales } = useI18n(); const availableLocales = computed(() => locales.value); const currentLocale = computed(() => locale.value); const sidebarOpen = ref(false); const sidebarCollapsed = ref(false); const dropdownOpen = ref(false); ref(null); const expandedGroups = ref(/* @__PURE__ */ new Set(["K\xF6zpont"])); const userEmail = computed(() => authStore.userEmail || "Ismeretlen Felhaszn\xE1l\xF3"); const userInitials = computed(() => { const email = authStore.userEmail; if (!email) return "??"; return email.split("@")[0].split(".").map((s) => s[0]).join("").toUpperCase().slice(0, 2); }); const menuGroups = [ { title: "K\xF6zpont", items: [ { path: "/", label: "Dashboard", icon: '' } ] }, { title: "Felhaszn\xE1l\xF3k & Partnerek", items: [ { label: "Gar\xE1zsok", icon: '', children: [ { path: "/garages", label: "Gar\xE1zsok list\xE1ja", icon: '' } ] }, { label: "Felhaszn\xE1l\xF3k", icon: '', children: [ { path: "/users", label: "Felhaszn\xE1l\xF3k list\xE1ja", icon: '' }, { path: "/persons", label: "Szem\xE9lyek", icon: '' } ] } ] }, { title: "P\xE9nz\xFCgyek", items: [ { path: "/packages", label: "Csomagok", icon: '' } ] }, { title: "Rendszer", items: [ { path: "/permissions", label: "Jogosults\xE1gok", icon: '' }, { label: "Rendszernapl\xF3k", icon: '', children: [ { path: "/", /* P0 HOTFIX: placeholder until /logs page is built */ label: "Rendszernapl\xF3k", icon: '' } ] } ] } ]; const pageTitle = computed(() => { if (route.path === "/") return "Dashboard"; if (route.path.startsWith("/permissions")) return "Jogosults\xE1g Kezel\xE9s"; if (route.path.startsWith("/garages")) return "Gar\xE1zsok"; if (route.path.startsWith("/persons")) return "Szem\xE9lyek"; if (route.path.startsWith("/users")) return "Felhaszn\xE1l\xF3k"; if (route.path.startsWith("/logs")) return "Rendszernapl\xF3k"; if (route.path.startsWith("/packages")) return "Csomagok"; return "Admin Panel"; }); function isActive(path) { if (path === "/") return route.path === "/"; return route.path.startsWith(path); } function isGroupActive(item) { if (!item.children) return false; return item.children.some((child) => isActive(child.path)); } return (_ctx, _push, _parent, _attrs) => { const _component_NuxtLink = __nuxt_component_0; _push(`
${ssrInterpolate(userEmail.value)}
${ssrInterpolate(unref(authStore).userRole === "SUPERADMIN" ? "Super Administrator" : unref(authStore).userRole || "Administrator")}