import { defineComponent, ref, reactive, unref, useSSRContext } from 'vue'; import { ssrRenderAttrs, ssrInterpolate, ssrRenderList, ssrRenderClass, ssrRenderAttr, ssrIncludeBooleanAttr, ssrLooseContain } 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: "seasons", __ssrInlineRender: true, setup(__props) { const { t } = useI18n(); const loading = ref(true); const error = ref(false); const saving = ref(false); const showModal = ref(false); const showActivateModal = ref(false); const seasons = ref([]); const editingSeason = ref(null); const activatingSeason = ref(null); const formError = ref(""); const form = reactive({ name: "", start_date: "", end_date: "", is_active: false }); function formatDate(dateStr) { if (!dateStr) return ""; const d = new Date(dateStr); return d.toLocaleDateString("hu-HU", { year: "numeric", month: "long", day: "numeric" }); } function formatDateTime(dateStr) { if (!dateStr) return ""; const d = new Date(dateStr); return d.toLocaleDateString("hu-HU", { year: "numeric", month: "long", day: "numeric", hour: "2-digit", minute: "2-digit" }); } return (_ctx, _push, _parent, _attrs) => { var _a; _push(`
${ssrInterpolate(unref(t)("gamification.seasons.subtitle"))}
${ssrInterpolate(unref(t)("gamification.seasons.load_error"))}
${ssrInterpolate(unref(t)("gamification.seasons.empty"))}
${ssrInterpolate(unref(t)("gamification.seasons.activate_confirm", { name: (_a = unref(activatingSeason)) == null ? void 0 : _a.name }))}