import { _ as __nuxt_component_0 } from "./nuxt-link-Cp-CAJwR.js"; 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 { publicAssetsURL } from "#internal/nuxt/paths"; import { useRoute } from "vue-router"; import { u as useRegionStore } from "./region-0mvXqaMM.js"; import { a as useRouter, b as useI18n } from "../server.mjs"; import { u as useAuthStore } from "./auth-RwMj9LdV.js"; import "/app/node_modules/klona/dist/index.mjs"; import "/app/node_modules/hookable/dist/index.mjs"; import "/app/node_modules/ufo/dist/index.mjs"; import "/app/node_modules/defu/dist/defu.mjs"; import "pinia"; import "/app/node_modules/ofetch/dist/node.mjs"; import "/app/node_modules/unctx/dist/index.mjs"; import "/app/node_modules/h3/dist/index.mjs"; import "/app/node_modules/cookie-es/dist/index.mjs"; import "/app/node_modules/destr/dist/index.mjs"; import "/app/node_modules/ohash/dist/index.mjs"; import "/app/node_modules/@unhead/vue/dist/index.mjs"; import "@vue/devtools-api"; 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özpont"])); const userEmail = computed(() => authStore.userEmail || "Ismeretlen Felhasználó"); 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özpont", items: [ { path: "/", label: "Dashboard", icon: '' } ] }, { title: "Felhasználók & Partnerek", items: [ { label: "Garázsok", icon: '', children: [ { path: "/garages", label: "Garázsok listája", icon: '' } ] }, { label: "Felhasználók", icon: '', children: [ { path: "/users", label: "Felhasználók listája", icon: '' } ] } ] }, { title: "Pénzügyek", items: [ { path: "/packages", label: "Csomagok", icon: '' } ] }, { title: "Rendszer", items: [ { path: "/permissions", label: "Jogosultságok", icon: '' }, { label: "Rendszernaplók", icon: '', children: [ { path: "/logs", label: "Rendszernaplók", icon: '' } ] } ] } ]; const pageTitle = computed(() => { if (route.path === "/") return "Dashboard"; if (route.path.startsWith("/permissions")) return "Jogosultság Kezelés"; if (route.path.startsWith("/garages")) return "Garázsok"; if (route.path.startsWith("/users")) return "Felhasználók"; if (route.path.startsWith("/logs")) return "Rendszernaplók"; 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")}