import { defineComponent, ref, reactive, unref, useSSRContext } from "vue"; import { ssrRenderAttrs, ssrInterpolate, ssrRenderList, ssrRenderClass, ssrRenderAttr, ssrIncludeBooleanAttr, ssrLooseContain } from "vue/server-renderer"; import "/app/node_modules/hookable/dist/index.mjs"; import "/app/node_modules/klona/dist/index.mjs"; import { a as useI18n } from "../server.mjs"; import "/app/node_modules/ofetch/dist/node.mjs"; import "#internal/nuxt/paths"; import "/app/node_modules/unctx/dist/index.mjs"; import "/app/node_modules/h3/dist/index.mjs"; import "pinia"; import "/app/node_modules/defu/dist/defu.mjs"; import "vue-router"; import "/app/node_modules/ufo/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 _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) => { _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: unref(activatingSeason)?.name }))}