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 { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.js"; 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: "point-rules", __ssrInlineRender: true, setup(__props) { const { t } = useI18n(); const loading = ref(true); const error = ref(false); const rules = ref([]); const showModal = ref(false); const showDeleteModal = ref(false); const editingRule = ref(null); const deletingRule = ref(null); const saving = ref(false); const formError = ref(""); const toast = ref(""); const form = reactive({ action_key: "", points: 0, description: "", is_active: true }); return (_ctx, _push, _parent, _attrs) => { _push(`

${ssrInterpolate(unref(t)("gamification.point_rules.title"))}

${ssrInterpolate(unref(t)("gamification.point_rules.subtitle"))}

`); if (unref(loading)) { _push(`
${ssrInterpolate(unref(t)("gamification.point_rules.loading"))}
`); } else if (unref(error)) { _push(`

${ssrInterpolate(unref(t)("gamification.point_rules.load_error"))}

`); } else { _push(`
`); ssrRenderList(unref(rules), (rule) => { _push(``); }); _push(``); if (unref(rules).length === 0) { _push(``); } else { _push(``); } _push(`
${ssrInterpolate(unref(t)("gamification.point_rules.col_id"))}${ssrInterpolate(unref(t)("gamification.point_rules.col_action_key"))}${ssrInterpolate(unref(t)("gamification.point_rules.col_points"))}${ssrInterpolate(unref(t)("gamification.point_rules.col_description"))}${ssrInterpolate(unref(t)("gamification.point_rules.col_status"))}${ssrInterpolate(unref(t)("gamification.point_rules.col_actions"))}
${ssrInterpolate(rule.id)}${ssrInterpolate(rule.action_key)}${ssrInterpolate(rule.points >= 0 ? "+" : "")}${ssrInterpolate(rule.points)}${ssrInterpolate(rule.description || "—")}${ssrInterpolate(rule.is_active ? unref(t)("gamification.point_rules.active") : unref(t)("gamification.point_rules.inactive"))}
${ssrInterpolate(unref(t)("gamification.point_rules.empty"))}
`); } if (unref(showModal)) { _push(`

${ssrInterpolate(unref(editingRule) ? unref(t)("gamification.point_rules.edit_title") : unref(t)("gamification.point_rules.create_title"))}

`); if (unref(formError)) { _push(`

${ssrInterpolate(unref(formError))}

`); } else { _push(``); } _push(`
`); } else { _push(``); } if (unref(showDeleteModal)) { _push(`

${ssrInterpolate(unref(t)("gamification.point_rules.delete_confirm_title"))}

${ssrInterpolate(unref(t)("gamification.point_rules.delete_confirm_body", { action_key: unref(deletingRule)?.action_key }))}

${ssrInterpolate(unref(saving) ? unref(t)("gamification.point_rules.deleting") : unref(t)("gamification.point_rules.delete"))}
`); } else { _push(``); } if (unref(toast)) { _push(`
${ssrInterpolate(unref(toast))}
`); } 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/gamification/point-rules.vue"); return _sfc_setup ? _sfc_setup(props, ctx) : void 0; }; const pointRules = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-c5f07ccf"]]); export { pointRules as default }; //# sourceMappingURL=point-rules-C1ou37W0.js.map