import { defineComponent, ref, reactive, computed, useSSRContext } from "vue"; import { ssrRenderAttrs, ssrInterpolate, ssrRenderAttr, ssrIncludeBooleanAttr, ssrLooseContain, ssrLooseEqual, ssrRenderList, ssrRenderClass } from "vue/server-renderer"; import "/app/node_modules/hookable/dist/index.mjs"; const _sfc_main = /* @__PURE__ */ defineComponent({ __name: "index", __ssrInlineRender: true, setup(__props) { const searchQuery = ref(""); const filterTier = ref("all"); const openDropdownId = ref(null); const saveNotification = ref(null); const availableTiers = ["free", "premium", "enterprise"]; const garages = reactive([ { id: 1, companyName: "Kovács Autószerviz", contactName: "Kovács István", email: "kovacs@autoserviz.hu", status: "active", tier: "premium", initials: "KA", colorClass: "bg-amber-600" }, { id: 2, companyName: "Nagy Gépjárműjavító Kft.", contactName: "Nagy Péter", email: "info@nagygepjarmu.hu", status: "active", tier: "enterprise", initials: "NG", colorClass: "bg-purple-600" }, { id: 3, companyName: "Tóth Autó és Motorgarázs", contactName: "Tóth Gábor", email: "toth@garazs.hu", status: "active", tier: "free", initials: "TA", colorClass: "bg-slate-600" }, { id: 4, companyName: "Szabó Flottakezelő Kft.", contactName: "Szabó Márta", email: "szabo@flotta.hu", status: "inactive", tier: "premium", initials: "SZ", colorClass: "bg-amber-600" }, { id: 5, companyName: "Horváth Autótechnika", contactName: "Horváth László", email: "horvath@autotechnika.hu", status: "suspended", tier: "free", initials: "HA", colorClass: "bg-slate-600" }, { id: 6, companyName: "Kiss & Társa Szerviz", contactName: "Kiss Anna", email: "kiss@szerviz.hu", status: "active", tier: "enterprise", initials: "KT", colorClass: "bg-purple-600" }, { id: 7, companyName: "Molnár Autóház Kft.", contactName: "Molnár Zoltán", email: "molnar@autohaz.hu", status: "active", tier: "premium", initials: "MA", colorClass: "bg-amber-600" }, { id: 8, companyName: "Farkas Gépjármű Szerviz", contactName: "Farkas Béla", email: "farkas@gepjarmu.hu", status: "inactive", tier: "free", initials: "FG", colorClass: "bg-slate-600" } ]); const activeCount = computed(() => garages.filter((g) => g.status === "active").length); const premiumCount = computed(() => garages.filter((g) => g.tier === "premium").length); const enterpriseCount = computed(() => garages.filter((g) => g.tier === "enterprise").length); const filteredGarages = computed(() => { return garages.filter((g) => { if (searchQuery.value) { const q = searchQuery.value.toLowerCase(); const matchesSearch = g.companyName.toLowerCase().includes(q) || g.contactName.toLowerCase().includes(q) || g.email.toLowerCase().includes(q); if (!matchesSearch) return false; } if (filterTier.value !== "all" && g.tier !== filterTier.value) return false; return true; }); }); function tierBadgeClass(tier) { if (tier === "enterprise") return "bg-purple-500/20 text-purple-300"; if (tier === "premium") return "bg-amber-500/20 text-amber-300"; return "bg-slate-500/20 text-slate-300"; } return (_ctx, _push, _parent, _attrs) => { _push(`

${ssrInterpolate(_ctx.$t("garages.title"))}

${ssrInterpolate(_ctx.$t("garages.subtitle"))}

${ssrInterpolate(_ctx.$t("garages.total_garages"))}

${ssrInterpolate(garages.length)}

${ssrInterpolate(_ctx.$t("garages.active_garages"))}

${ssrInterpolate(activeCount.value)}

${ssrInterpolate(_ctx.$t("garages.premium_garages"))}

${ssrInterpolate(premiumCount.value)}

${ssrInterpolate(_ctx.$t("garages.enterprise_garages"))}

${ssrInterpolate(enterpriseCount.value)}

`); ssrRenderList(filteredGarages.value, (garage) => { _push(``); }); _push(`
ID${ssrInterpolate(_ctx.$t("garages.company_name"))}${ssrInterpolate(_ctx.$t("garages.email"))}${ssrInterpolate(_ctx.$t("garages.status"))}${ssrInterpolate(_ctx.$t("garages.current_package"))}${ssrInterpolate(_ctx.$t("garages.actions"))}
${ssrInterpolate(garage.id)}
${ssrInterpolate(garage.initials)}

${ssrInterpolate(garage.companyName)}

${ssrInterpolate(garage.contactName)}

${ssrInterpolate(garage.email)} ${ssrInterpolate(garage.status === "active" ? _ctx.$t("garages.active") : garage.status === "suspended" ? _ctx.$t("garages.suspended") : _ctx.$t("garages.inactive"))}
${ssrInterpolate(garage.tier)}
`); if (openDropdownId.value === garage.id) { _push(`
`); ssrRenderList(availableTiers, (tier) => { _push(``); }); _push(`
`); } else { _push(``); } _push(`
`); if (filteredGarages.value.length === 0) { _push(`

${ssrInterpolate(_ctx.$t("garages.no_results"))}

`); } else { _push(``); } _push(`
`); if (saveNotification.value) { _push(`
${ssrInterpolate(saveNotification.value.message)}
`); } else { _push(``); } _push(``); }; } }); const _sfc_setup = _sfc_main.setup; _sfc_main.setup = (props, ctx) => { const ssrContext = useSSRContext(); (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("pages/garages/index.vue"); return _sfc_setup ? _sfc_setup(props, ctx) : void 0; }; export { _sfc_main as default }; //# sourceMappingURL=index-ebkVtBaw.js.map