import { defineComponent, ref, reactive, unref, useSSRContext } from 'vue'; import { ssrRenderAttrs, ssrInterpolate, ssrRenderAttr, ssrIncludeBooleanAttr, ssrLooseContain, ssrLooseEqual, ssrRenderList, ssrRenderClass } from 'vue/server-renderer'; import { a as useI18n } from './server.mjs'; import '../nitro/nitro.mjs'; import 'node:http'; import 'node:https'; import 'node:events'; import 'node:buffer'; import 'node:fs'; import 'node:path'; import 'node:crypto'; import 'vue-router'; 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 _sfc_main = /* @__PURE__ */ defineComponent({ __name: "competitions", __ssrInlineRender: true, setup(__props) { const { t } = useI18n(); const loading = ref(true); const error = ref(false); const saving = ref(false); const showModal = ref(false); const seasons = ref([]); const competitions = ref([]); const editingCompetition = ref(null); const selectedSeasonId = ref(null); const formError = ref(""); const rulesParseError = ref(false); const form = reactive({ name: "", description: "", season_id: "", start_date: "", end_date: "", status: "draft", rulesJson: "" }); function formatDate(dateStr) { if (!dateStr) return ""; const d = new Date(dateStr); return d.toLocaleDateString("hu-HU", { year: "numeric", month: "long", day: "numeric" }); } function getStatusClass(status) { switch (status) { case "active": return "bg-emerald-500/10 text-emerald-400 border border-emerald-500/30"; case "draft": return "bg-slate-700 text-slate-400 border border-slate-600"; case "completed": return "bg-blue-500/10 text-blue-400 border border-blue-500/30"; case "cancelled": return "bg-rose-500/10 text-rose-400 border border-rose-500/30"; default: return "bg-slate-700 text-slate-400 border border-slate-600"; } } function getStatusLabel(status) { switch (status) { case "active": return t("gamification.competitions.status_active"); case "draft": return t("gamification.competitions.status_draft"); case "completed": return t("gamification.competitions.status_completed"); case "cancelled": return t("gamification.competitions.status_cancelled"); default: return status; } } return (_ctx, _push, _parent, _attrs) => { _push(`
${ssrInterpolate(unref(t)("gamification.competitions.subtitle"))}
${ssrInterpolate(unref(t)("gamification.competitions.error"))}
${ssrInterpolate(unref(t)("gamification.competitions.no_items"))}
${ssrInterpolate(comp.description)}
`); } else { _push(``); } _push(`${ssrInterpolate(JSON.stringify(comp.rules, null, 2))}