@feedmepos/mf-connect 0.1.0-beta.32 → 0.1.0-beta.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/dist/{Analytic-DkxpZxXF.js → Analytic-DYfm1eg5.js} +24 -23
  2. package/dist/{App-cFnyNJX5.js → App-DV85I2xq.js} +6 -6
  3. package/dist/{Broadcast-VrvwW11m.js → Broadcast-CNpwvxRx.js} +8 -8
  4. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DK8-e535.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Bv8Ki3vl.js} +7 -7
  5. package/dist/{Card-BRCliaB_.js → Card-Bk4hfK9U.js} +15 -15
  6. package/dist/{Collections-BBd3RN2S.js → Collections-CrND62Vz.js} +4 -4
  7. package/dist/{Credit-BiRfftdO.js → Credit-ICo98p8n.js} +8 -8
  8. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-BTST01U2.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-LFtf2JM3.js} +27 -26
  9. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-Bx_t1yPZ.js → EffectSheet.vue_vue_type_style_index_0_lang-CdVIbAT3.js} +6 -6
  10. package/dist/{Experience-C7aYCLot.js → Experience-BqMJUymq.js} +8 -8
  11. package/dist/{Game-CCTRHFCs.js → Game-DvjisU7I.js} +8 -8
  12. package/dist/{Index-yMSFQ15g.js → Index-Vbv5hpsB.js} +9 -9
  13. package/dist/{Marketing-BIWD_Zpv.js → Marketing-CU6GUm2L.js} +5 -5
  14. package/dist/{Member-B5VamwfR.js → Member-Dcyb6og-.js} +4 -4
  15. package/dist/{MemberList-CWkmf_WZ.js → MemberList-CBO6SVE-.js} +14 -14
  16. package/dist/{MemberTransactions-9xDEJ3qi.js → MemberTransactions-BuPoUtjA.js} +1 -1
  17. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CKBwCP0l.js → MessageInput.vue_vue_type_script_setup_true_lang-B_q37PEs.js} +2 -2
  18. package/dist/{Mission-Ck54cctg.js → Mission-_Vi8gaKQ.js} +8 -8
  19. package/dist/{Overview-DbuRGVWJ.js → Overview-8ZkvZh2U.js} +370 -346
  20. package/dist/{Point-C1EkvSWh.js → Point-BqmJ8ak3.js} +8 -8
  21. package/dist/{Promotion-B74-3O-2.js → Promotion-CDOtfUpE.js} +9 -9
  22. package/dist/{Record-CFRaQ1sc.js → Record-NUadzYL2.js} +5 -5
  23. package/dist/Reward-CgRFzQHO.js +432 -0
  24. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-C2iKpUoP.js → RewardGroup.vue_vue_type_script_setup_true_lang-Cg5cJLSS.js} +11 -11
  25. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-CqqHClbc.js → RuleGroup.vue_vue_type_script_setup_true_lang-Bac_RiwJ.js} +13 -13
  26. package/dist/{Segment-DLHcW3Mm.js → Segment-bHLt_9xi.js} +13 -13
  27. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-BsrLR3Ry.js → SelectItems.vue_vue_type_script_setup_true_lang-DWulr5sA.js} +2 -2
  28. package/dist/{Setting-2fI8Ejy-.js → Setting-AQjJ0LBm.js} +8 -8
  29. package/dist/{Store-Ca9krNoR.js → Store-DzGhYzS9.js} +46 -46
  30. package/dist/{StoreRewards-B8e61zol.js → StoreRewards-BN33UZrN.js} +12 -12
  31. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-Bfx9iTzD.js → StoreTransactions.vue_vue_type_script_setup_true_lang-CF7R6Mbf.js} +17 -17
  32. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-BNPKgK6S.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-C3wxmJBS.js} +1 -1
  33. package/dist/{Tier-JLf0R2xU.js → Tier-BaIm0-nO.js} +19 -19
  34. package/dist/{Title-CPBVpQgP.js → Title-CGU2TRSf.js} +19 -19
  35. package/dist/{Transaction-D138QUn6.js → Transaction-DA2CK2a4.js} +2 -2
  36. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-D2LKgS7h.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-DSVVsk_u.js} +6 -6
  37. package/dist/{Voucher-haa-zTdM.js → Voucher-Bzh_fJpa.js} +11 -11
  38. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-BfYFnnl-.js → VoucherEditor.vue_vue_type_script_setup_true_lang-Bflyp1V0.js} +10 -10
  39. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DasKXslL.js → ZodTextField.vue_vue_type_script_setup_true_lang-Wh_Pc7qk.js} +1 -1
  40. package/dist/{app-C2HTy1nv.js → app-CBijF7l9.js} +1 -1
  41. package/dist/{app-C4fjdQtp.js → app-Ceasya0M.js} +28 -28
  42. package/dist/app.js +1 -1
  43. package/dist/{business-BTNYs-U5.js → business-BJ-cyfj6.js} +1 -1
  44. package/dist/{campaign-BK4EhzMc.js → campaign-B5Cvxv_n.js} +2 -2
  45. package/dist/campaign.enum-CwvY4pwh.js +20 -0
  46. package/dist/campaign.fn-CWcwUEiZ.js +758 -0
  47. package/dist/{collectible.enum-UDFRfReI.js → collectible.enum-COdcR96r.js} +1 -1
  48. package/dist/{collection.fn-BAqSI3np.js → collection.fn-BTQbGCVW.js} +2 -2
  49. package/dist/dto-BnknKYcg.js +2018 -0
  50. package/dist/{effect-BtvuGYY8.js → effect-DqWwcDoL.js} +1 -1
  51. package/dist/{email-addresses-CIg74qiD.js → email-addresses-DPPlvfPT.js} +1 -1
  52. package/dist/{export-BvHWTvqK.js → export-FXBFFRdK.js} +3 -3
  53. package/dist/{helper-gL8_tR2G.js → helper-C776lUH-.js} +1 -1
  54. package/dist/{index-CdAIjFbl.js → index-BG5txN30.js} +3 -3
  55. package/dist/{index-BuE8NeSd.js → index-BjAdYoh3.js} +7 -7
  56. package/dist/{index-IxRs9X0k.js → index-C1aWGTdZ.js} +1 -1
  57. package/dist/{index-YFt66ce1.js → index-CRlD2sul.js} +4 -4
  58. package/dist/{index-BJ4yupx3.js → index-CZaQ-veW.js} +1 -1
  59. package/dist/{index-BV2Ej5X-.js → index-Cgaj4reE.js} +1 -1
  60. package/dist/{index-B6sy9Hsd.js → index-CpD4ezv2.js} +1 -1
  61. package/dist/{index-BmgMTm44.js → index-CxU9mwRl.js} +1 -1
  62. package/dist/{index-CagyPdIB.js → index-D62SBn2q.js} +3 -3
  63. package/dist/{index-CIdcR8xz.js → index-DeMgVwv8.js} +2 -2
  64. package/dist/{index-856h6bc0.js → index-Dw1WniG7.js} +206 -222
  65. package/dist/{index-CC1h5CUP.js → index-I27oHD1a.js} +1 -1
  66. package/dist/{index.esm2017-StebtCHT.js → index.esm2017-Cf8UXsST.js} +1 -1
  67. package/dist/{loading-DbB9x1Ds.js → loading-DCSdIZqP.js} +4 -4
  68. package/dist/{membership-CyhUGayb.js → membership-KiKcnWxt.js} +4 -4
  69. package/dist/{money-BHQxTQaH.js → money-B_LMR19r.js} +1 -1
  70. package/dist/{number-DzEEwzMx.js → number-Bk18T5Xb.js} +1 -1
  71. package/dist/{objectid-BPMkce_-.js → objectid-CZ5qnZ1J.js} +4 -4
  72. package/dist/{reward-DZVkyjr0.js → reward-ozVC4wTW.js} +1 -1
  73. package/dist/{rule-BSKwXrMD.js → rule-CWT8hI3A.js} +3 -3
  74. package/dist/{rule-builder-SPJUHKuA.js → rule-builder-DTEvWEjJ.js} +1 -1
  75. package/dist/{template-CdZQFxGi.js → template-9N1FRXDZ.js} +4 -4
  76. package/dist/{trigger-BjdUQ1EH.js → trigger-C2-zYC46.js} +4 -4
  77. package/dist/{user--ig8oGw2.js → user-DBxVxr4P.js} +1 -1
  78. package/dist/{vue-i18n-gHmu9x4p.js → vue-i18n-BK0qKZu-.js} +158 -158
  79. package/dist/{xlsx-DClThkyy.js → xlsx-CmKV4f40.js} +1 -1
  80. package/package.json +1 -1
  81. package/dist/Reward-u4hM8gJX.js +0 -411
  82. package/dist/dto-BrNbKS-b.js +0 -2770
@@ -1,28 +1,28 @@
1
- import { defineComponent as Y, resolveComponent as _, openBlock as C, createElementBlock as B, Fragment as H, createVNode as d, withCtx as k, createElementVNode as a, toDisplayString as E, unref as r, renderSlot as pe, ref as x, computed as D, watch as se, createBlock as j, isRef as z, resolveDynamicComponent as ne, renderList as te, normalizeClass as ie, createTextVNode as he, createCommentVNode as Z, h as re, onMounted as ve } from "vue";
1
+ import { defineComponent as Y, resolveComponent as w, openBlock as C, createElementBlock as E, Fragment as z, createVNode as i, withCtx as I, createElementVNode as a, toDisplayString as O, unref as r, renderSlot as he, ref as S, computed as G, watch as se, createBlock as j, isRef as W, resolveDynamicComponent as ne, renderList as te, normalizeClass as ie, createTextVNode as de, createCommentVNode as q, h as re, onMounted as ve } from "vue";
2
2
  import { _ as ge } from "./campaign-CpzFl8Vr.js";
3
- import { u as W } from "./vue-i18n-gHmu9x4p.js";
4
- import { c as we, p as K, u as de } from "./loading-DbB9x1Ds.js";
3
+ import { u as K } from "./vue-i18n-BK0qKZu-.js";
4
+ import { c as we, p as Z, u as ce } from "./loading-DCSdIZqP.js";
5
5
  import { J as X } from "./JsonViewer-v8_C7l5N.js";
6
- import { Z as M } from "./zod-Bg2FbC-D.js";
7
- import { u as q } from "./app-wDQR6dpb.js";
8
- import { u as Q, _ as _e } from "./RewardGroup.vue_vue_type_script_setup_true_lang-C2iKpUoP.js";
9
- import { u as ce } from "./reward-DZVkyjr0.js";
10
- import "./index-CdAIjFbl.js";
11
- import "./index-CIdcR8xz.js";
12
- import { l as le, m as ye } from "./index-856h6bc0.js";
13
- import { a as be, b as xe } from "./index-BuE8NeSd.js";
14
- import "./index-BV2Ej5X-.js";
15
- import "./index-YFt66ce1.js";
16
- import { C as ue } from "./membership-CyhUGayb.js";
17
- import { t as ee } from "./helper-gL8_tR2G.js";
18
- import { c as N } from "./object-qECH92oz.js";
19
- import { useDialog as Ce, components as oe } from "@feedmepos/ui-library";
20
- import { _ as Re } from "./ZodTextField.vue_vue_type_script_setup_true_lang-DasKXslL.js";
21
- import { a as Se, _ as Fe } from "./trigger-BjdUQ1EH.js";
22
- import { O as ke } from "./objectid-BPMkce_-.js";
23
- import { r as me } from "./index-CC1h5CUP.js";
24
- import { u as $e } from "./business-BTNYs-U5.js";
25
- const Pe = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ve = { class: "flex items-center gap-x-24 h-[80px] p-8 flex-1" }, Ie = { class: "flex-1" }, Te = { class: "flex items-center gap-8" }, Ue = { class: "fm-typo-en-title-sm-800" }, Ae = { class: "flex gap-8 items-center" }, Le = { class: "space-y-4 hidden xs:block border-b border-fm-color-neutral-gray-100 px-16 flex-1 pb-24" }, Be = { class: "flex items-center justify-between" }, Ee = { class: "flex items-center gap-x-24 h-[80px] p-8 flex-1" }, Oe = { class: "flex-1 space-y-4" }, je = { class: "fm-typo-en-body-lg-600" }, De = /* @__PURE__ */ Y({
6
+ import { Z as N } from "./zod-Bg2FbC-D.js";
7
+ import { u as J } from "./app-wDQR6dpb.js";
8
+ import { u as Q, _ as _e } from "./RewardGroup.vue_vue_type_script_setup_true_lang-Cg5cJLSS.js";
9
+ import { u as ue } from "./reward-ozVC4wTW.js";
10
+ import "./index-BG5txN30.js";
11
+ import "./index-DeMgVwv8.js";
12
+ import { j as le, k as ye } from "./index-Dw1WniG7.js";
13
+ import { a as be, b as xe } from "./index-BjAdYoh3.js";
14
+ import "./index-Cgaj4reE.js";
15
+ import "./index-CRlD2sul.js";
16
+ import { C as me } from "./membership-KiKcnWxt.js";
17
+ import { t as ee } from "./helper-C776lUH-.js";
18
+ import { c as H } from "./object-qECH92oz.js";
19
+ import { useDialog as Re, components as oe } from "@feedmepos/ui-library";
20
+ import { _ as Ce } from "./ZodTextField.vue_vue_type_script_setup_true_lang-Wh_Pc7qk.js";
21
+ import { a as Se, _ as Fe } from "./trigger-C2-zYC46.js";
22
+ import { O as ke } from "./objectid-CZ5qnZ1J.js";
23
+ import { r as fe } from "./index-I27oHD1a.js";
24
+ import { u as $e } from "./business-BJ-cyfj6.js";
25
+ const Pe = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie = { class: "flex items-center gap-x-24 h-[80px] p-8 flex-1" }, Ve = { class: "flex-1" }, Te = { class: "flex items-center gap-8" }, Ue = { class: "fm-typo-en-title-sm-800" }, Ae = { class: "flex gap-8 items-center" }, Le = { class: "space-y-4 hidden xs:block border-b border-fm-color-neutral-gray-100 px-16 flex-1 pb-24" }, Be = { class: "flex items-center justify-between" }, Ee = { class: "flex items-center gap-x-24 h-[80px] p-8 flex-1" }, Oe = { class: "flex-1 space-y-4" }, je = { class: "fm-typo-en-body-lg-600" }, De = /* @__PURE__ */ Y({
26
26
  __name: "ReferralRewadGroupCard",
27
27
  props: {
28
28
  rewardGroup: {
@@ -35,37 +35,37 @@ const Pe = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ve =
35
35
  }
36
36
  },
37
37
  emits: ["edit", "addCount", "remove"],
38
- setup(R, { emit: f }) {
39
- const { t: $ } = W(), p = f;
38
+ setup(F, { emit: f }) {
39
+ const { t: V } = K(), p = f;
40
40
  return (g, m) => {
41
- const n = _("FmButton"), c = _("FmListItem");
42
- return C(), B(H, null, [
43
- d(c, {
44
- onClick: m[4] || (m[4] = (u) => p("edit", R.level)),
41
+ const n = w("FmButton"), c = w("FmListItem");
42
+ return C(), E(z, null, [
43
+ i(c, {
44
+ onClick: m[4] || (m[4] = (u) => p("edit", F.level)),
45
45
  class: "!p-0"
46
46
  }, {
47
- default: k(() => [
47
+ default: I(() => [
48
48
  a("div", Pe, [
49
- a("div", Ve, [
50
- a("div", Ie, [
49
+ a("div", Ie, [
50
+ a("div", Ve, [
51
51
  a("div", Te, [
52
- a("div", Ue, E(R.rewardGroup.name), 1)
52
+ a("div", Ue, O(F.rewardGroup.name), 1)
53
53
  ])
54
54
  ])
55
55
  ]),
56
56
  a("div", Ae, [
57
- d(n, {
57
+ i(n, {
58
58
  variant: "secondary",
59
- label: r($)("connect.referral.reward.add_count"),
59
+ label: r(V)("connect.referral.reward.add_count"),
60
60
  icon: "add",
61
61
  onClick: m[0] || (m[0] = (u) => {
62
- u.stopPropagation(), p("addCount", R.level);
62
+ u.stopPropagation(), p("addCount", F.level);
63
63
  })
64
64
  }, null, 8, ["label"]),
65
- d(n, {
65
+ i(n, {
66
66
  icon: "delete",
67
67
  onClick: m[1] || (m[1] = (u) => {
68
- u.stopPropagation(), p("remove", R.level);
68
+ u.stopPropagation(), p("remove", F.level);
69
69
  }),
70
70
  variant: "tertiary"
71
71
  })
@@ -76,78 +76,85 @@ const Pe = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ve =
76
76
  a("div", Ee, [
77
77
  a("div", Oe, [
78
78
  a("div", null, [
79
- a("div", je, E(R.rewardGroup.name), 1)
79
+ a("div", je, O(F.rewardGroup.name), 1)
80
80
  ])
81
81
  ])
82
82
  ]),
83
- d(n, {
83
+ i(n, {
84
84
  variant: "tertiary",
85
85
  icon: "delete",
86
- onClick: m[2] || (m[2] = (u) => (u.stopPropagation(), p("remove", R.level)))
86
+ onClick: m[2] || (m[2] = (u) => (u.stopPropagation(), p("remove", F.level)))
87
87
  })
88
88
  ]),
89
- d(n, {
89
+ i(n, {
90
90
  class: "w-full",
91
91
  variant: "secondary",
92
92
  label: "Add count",
93
93
  disabled: !0,
94
94
  icon: "add",
95
- onClick: m[3] || (m[3] = (u) => (u.stopPropagation(), p("addCount", R.level)))
95
+ onClick: m[3] || (m[3] = (u) => (u.stopPropagation(), p("addCount", F.level)))
96
96
  })
97
97
  ])
98
98
  ]),
99
99
  _: 1
100
100
  }),
101
- pe(g.$slots, "default")
101
+ he(g.$slots, "default")
102
102
  ], 64);
103
103
  };
104
104
  }
105
- }), Ge = { class: "flex flex-col space-y-16 pr-12" }, Me = { class: "flex gap-16 items-center" }, Ne = { class: "fm-typo-en-title-sm-800" }, He = { class: "flex items-center gap-8" }, Ye = /* @__PURE__ */ Y({
105
+ }), Ge = { class: "flex flex-col space-y-16 pr-12" }, Me = { class: "flex gap-16 items-center" }, Ne = { class: "fm-typo-en-title-sm-800" }, He = { class: "flex items-center gap-8" }, ze = /* @__PURE__ */ Y({
106
106
  __name: "EditReferralCountSheet",
107
107
  emits: ["update"],
108
- setup(R, { expose: f, emit: $ }) {
109
- const { t: p } = W(), g = $, m = x(!1), n = x({}), c = x(-1), u = x(-1), S = Q(), V = be.superRefine((e, t) => {
110
- var U, A, v, I, L, J, ae;
111
- const i = u.value == -1 ? ((v = (A = (U = S.referralProgram) == null ? void 0 : U.reward[c.value]) == null ? void 0 : A.rewards) == null ? void 0 : v.length) || 0 : u.value, F = (L = (I = S.referralProgram) == null ? void 0 : I.reward[c.value]) == null ? void 0 : L.rewards[i - 1], b = (ae = (J = S.referralProgram) == null ? void 0 : J.reward[c.value]) == null ? void 0 : ae.rewards[i + 1];
112
- F && e.threshold.from < F.threshold.from + 1 && t.addIssue({
108
+ setup(F, { expose: f, emit: V }) {
109
+ const { t: p } = K(), g = V, m = S(!1), n = S({}), c = S(-1), u = S(-1), x = Q(), A = be.superRefine((e, t) => {
110
+ var $, U, P, b, v, B, ae;
111
+ const d = u.value == -1 ? ((P = (U = ($ = x.referralProgram) == null ? void 0 : $.reward[c.value]) == null ? void 0 : U.rewards) == null ? void 0 : P.length) || 0 : u.value, k = (v = (b = x.referralProgram) == null ? void 0 : b.reward[c.value]) == null ? void 0 : v.rewards[d - 1], y = (ae = (B = x.referralProgram) == null ? void 0 : B.reward[c.value]) == null ? void 0 : ae.rewards[d + 1];
112
+ k && e.threshold.from < k.threshold.from + 1 && t.addIssue({
113
113
  code: "custom",
114
- message: `The min referral must be at least ${F.threshold.from + 1}`,
114
+ message: `The min referral must be at least ${k.threshold.from + 1}`,
115
115
  path: ["option"]
116
- }), b && e.threshold.to && b.threshold.to && e.threshold.to > b.threshold.to - 1 && t.addIssue({
116
+ }), y && e.threshold.to && y.threshold.to && e.threshold.to > y.threshold.to - 1 && t.addIssue({
117
117
  code: "custom",
118
- message: `The max referral must be at most ${b.threshold.to - 2}`,
118
+ message: `The max referral must be at most ${y.threshold.to - 2}`,
119
119
  path: ["option"]
120
120
  });
121
- }), P = D(() => {
122
- const e = V.safeParse(n.value);
121
+ }), T = G(() => {
122
+ const e = A.safeParse(n.value);
123
123
  return e.success ? [] : e.error.errors;
124
124
  });
125
- function G() {
126
- const e = V.safeParse(n.value);
125
+ function M() {
126
+ const e = A.safeParse(n.value);
127
127
  e.success && g("update", {
128
128
  groupIndex: c.value,
129
129
  countIndex: u.value,
130
130
  referralCount: e.data
131
131
  });
132
132
  }
133
- async function O(e, t) {
134
- var i;
135
- m.value = e, e && typeof (t == null ? void 0 : t.countIndex) == "number" && t.countIndex >= 0 ? (c.value = t.groupIndex, u.value = t.countIndex, n.value = N(
136
- (i = S.referralProgram) == null ? void 0 : i.reward[t.groupIndex].rewards[t.countIndex]
137
- )) : (c.value = t.groupIndex, u.value = -1, n.value = {
138
- threshold: {
139
- from: 1,
140
- to: null
141
- },
142
- rewards: []
143
- }), h.value = [], h.value = l.value.map(
144
- (F) => n.value.rewards.includes(F.id)
133
+ async function D(e, t) {
134
+ var d, k, y, $, U, P;
135
+ if (m.value = e, e && typeof (t == null ? void 0 : t.countIndex) == "number" && t.countIndex >= 0)
136
+ c.value = t.groupIndex, u.value = t.countIndex, n.value = H(
137
+ (d = x.referralProgram) == null ? void 0 : d.reward[t.groupIndex].rewards[t.countIndex]
138
+ );
139
+ else {
140
+ c.value = t.groupIndex, u.value = -1;
141
+ const b = u.value == -1 ? (($ = (y = (k = x.referralProgram) == null ? void 0 : k.reward[c.value]) == null ? void 0 : y.rewards) == null ? void 0 : $.length) || 0 : u.value, v = (P = (U = x.referralProgram) == null ? void 0 : U.reward[c.value]) == null ? void 0 : P.rewards[b - 1];
142
+ n.value = {
143
+ threshold: {
144
+ from: v != null && v.threshold ? v != null && v.threshold.to ? v.threshold.to + 1 : (v == null ? void 0 : v.threshold.from) + 1 : 1,
145
+ to: null
146
+ },
147
+ rewards: []
148
+ };
149
+ }
150
+ h.value = [], h.value = l.value.map(
151
+ (b) => n.value.rewards.includes(b.id)
145
152
  );
146
153
  }
147
- function T() {
154
+ function L() {
148
155
  m.value = !1;
149
156
  }
150
- const w = [
157
+ const _ = [
151
158
  {
152
159
  header: "Reward title",
153
160
  accessorFn: (e) => e.name,
@@ -157,7 +164,7 @@ const Pe = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ve =
157
164
  id: "type",
158
165
  header: "Reward type",
159
166
  cell(e) {
160
- return ue[e.row.original.collectibleConfig.type].chip();
167
+ return me[e.row.original.collectibleConfig.type].chip();
161
168
  }
162
169
  },
163
170
  {
@@ -169,7 +176,7 @@ const Pe = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ve =
169
176
  return t.description;
170
177
  }
171
178
  }
172
- ], s = ce(), o = x([]), l = D(() => s.rewards.map((e) => {
179
+ ], s = ue(), o = S([]), l = G(() => s.rewards.map((e) => {
173
180
  let t = "No expiry";
174
181
  switch (e.option.type) {
175
182
  case "VOUCHER":
@@ -187,60 +194,60 @@ const Pe = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ve =
187
194
  description: t
188
195
  };
189
196
  }));
190
- D(() => []);
191
- function y() {
197
+ G(() => []);
198
+ function R() {
192
199
  const e = l.value;
193
200
  for (let t = 0; t < e.length; t++) {
194
- const i = e[t], F = h.value[t];
195
- F && !n.value.rewards.includes(i.id) && n.value.rewards.push(i.id), !F && n.value.rewards.includes(i.id) && (n.value.rewards = n.value.rewards.filter(
196
- (b) => b != i.id
201
+ const d = e[t], k = h.value[t];
202
+ k && !n.value.rewards.includes(d.id) && n.value.rewards.push(d.id), !k && n.value.rewards.includes(d.id) && (n.value.rewards = n.value.rewards.filter(
203
+ (y) => y != d.id
197
204
  ));
198
205
  }
199
206
  }
200
- const h = x({});
201
- return se(h, y, { deep: !0 }), f({
202
- showSheet: O,
203
- hideSheet: T,
207
+ const h = S({});
208
+ return se(h, R, { deep: !0 }), f({
209
+ showSheet: D,
210
+ hideSheet: L,
204
211
  data: n
205
212
  }), (e, t) => {
206
- const i = _("FmStepperField"), F = _("FmHelperText"), b = _("FmTable"), U = _("FmButton"), A = _("FmSideSheet");
207
- return C(), j(A, {
213
+ const d = w("FmStepperField"), k = w("FmHelperText"), y = w("FmTable"), $ = w("FmButton"), U = w("FmSideSheet");
214
+ return C(), j(U, {
208
215
  "max-width": 1e3,
209
216
  modelValue: r(m),
210
- "onUpdate:modelValue": t[4] || (t[4] = (v) => z(m) ? m.value = v : null),
217
+ "onUpdate:modelValue": t[4] || (t[4] = (P) => W(m) ? m.value = P : null),
211
218
  header: `${r(u) == -1 ? r(p)("connect.referral.editReferralCountSheet.add") : r(p)("connect.referral.editReferralCountSheet.edit")}`
212
219
  }, {
213
- "side-sheet-footer": k(() => [
220
+ "side-sheet-footer": I(() => [
214
221
  a("div", He, [
215
- d(U, {
222
+ i($, {
216
223
  label: r(p)("connect.editTierSheet.submit"),
217
- onClick: G,
218
- disabled: r(P).length > 0 || r(q)().isLoading,
219
- loading: r(q)().isLoading
224
+ onClick: M,
225
+ disabled: r(T).length > 0 || r(J)().isLoading,
226
+ loading: r(J)().isLoading
220
227
  }, null, 8, ["label", "disabled", "loading"]),
221
- d(U, {
228
+ i($, {
222
229
  label: r(p)("connect.editTierSheet.cancel"),
223
- onClick: t[3] || (t[3] = (v) => T()),
230
+ onClick: t[3] || (t[3] = (P) => L()),
224
231
  variant: "tertiary"
225
232
  }, null, 8, ["label"])
226
233
  ])
227
234
  ]),
228
- default: k(() => [
229
- d(X, { json: r(n) }, null, 8, ["json"]),
230
- d(X, { json: r(P) }, null, 8, ["json"]),
235
+ default: I(() => [
236
+ i(X, { json: r(n) }, null, 8, ["json"]),
237
+ i(X, { json: r(T) }, null, 8, ["json"]),
231
238
  a("div", Ge, [
232
239
  a("div", null, [
233
240
  a("div", Me, [
234
- d(i, {
241
+ i(d, {
235
242
  modelValue: r(n).threshold.from,
236
- "onUpdate:modelValue": t[0] || (t[0] = (v) => r(n).threshold.from = v),
243
+ "onUpdate:modelValue": t[0] || (t[0] = (P) => r(n).threshold.from = P),
237
244
  "show-steppers": !1,
238
- rules: [r(M).ruleAtPath(r(V), "threshold.from")]
245
+ rules: [r(N).ruleAtPath(r(A), "threshold.from")]
239
246
  }, {
240
- label: k(() => [
247
+ label: I(() => [
241
248
  (C(), j(ne(
242
- r(M).toInputLabel(
243
- r(M).typeAtPath(r(V), "threshold.from"),
249
+ r(N).toInputLabel(
250
+ r(N).typeAtPath(r(A), "threshold.from"),
244
251
  r(p)(
245
252
  "connect.referral.editReferralCountSheet.min_referral_count"
246
253
  )
@@ -249,16 +256,16 @@ const Pe = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ve =
249
256
  ]),
250
257
  _: 1
251
258
  }, 8, ["modelValue", "rules"]),
252
- d(i, {
259
+ i(d, {
253
260
  modelValue: r(n).threshold.to,
254
- "onUpdate:modelValue": t[1] || (t[1] = (v) => r(n).threshold.to = v),
261
+ "onUpdate:modelValue": t[1] || (t[1] = (P) => r(n).threshold.to = P),
255
262
  "show-steppers": !1,
256
- rules: [r(M).ruleAtPath(r(V), "threshold.to")]
263
+ rules: [r(N).ruleAtPath(r(A), "threshold.to")]
257
264
  }, {
258
- label: k(() => [
265
+ label: I(() => [
259
266
  (C(), j(ne(
260
- r(M).toInputLabel(
261
- r(M).typeAtPath(r(V), "threshold.to"),
267
+ r(N).toInputLabel(
268
+ r(N).typeAtPath(r(A), "threshold.to"),
262
269
  r(p)(
263
270
  "connect.referral.editReferralCountSheet.max_referral_count"
264
271
  )
@@ -268,19 +275,19 @@ const Pe = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ve =
268
275
  _: 1
269
276
  }, 8, ["modelValue", "rules"])
270
277
  ]),
271
- d(F, {
272
- text: r(M).helperText(r(P), "option"),
273
- state: r(M).helperState(r(P), "option")
278
+ i(k, {
279
+ text: r(N).helperText(r(T), "option"),
280
+ state: r(N).helperState(r(T), "option")
274
281
  }, null, 8, ["text", "state"]),
275
282
  t[5] || (t[5] = a("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " When max. referral count is not set, it will default unlimited ", -1))
276
283
  ]),
277
- a("div", Ne, E(r(p)("connect.referral.editReferralCountSheet.referrer_reward")), 1),
278
- d(b, {
284
+ a("div", Ne, O(r(p)("connect.referral.editReferralCountSheet.referrer_reward")), 1),
285
+ i(y, {
279
286
  modelValue: r(h),
280
- "onUpdate:modelValue": t[2] || (t[2] = (v) => z(h) ? h.value = v : null),
287
+ "onUpdate:modelValue": t[2] || (t[2] = (P) => W(h) ? h.value = P : null),
281
288
  selection: "multiple",
282
289
  "column-filter": r(o),
283
- "column-defs": w,
290
+ "column-defs": _,
284
291
  "row-data": r(l),
285
292
  "page-size": 10
286
293
  }, null, 8, ["modelValue", "column-filter", "row-data"])
@@ -290,7 +297,7 @@ const Pe = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ve =
290
297
  }, 8, ["modelValue", "header"]);
291
298
  };
292
299
  }
293
- }), ze = { class: "space-y-16" }, qe = { class: "grid grid-cols-3 gap-16" }, We = { class: "fm-typo-en-title-sm-800" }, Je = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Ke = /* @__PURE__ */ Y({
300
+ }), Ye = { class: "space-y-16" }, qe = { class: "grid grid-cols-3 gap-16" }, We = { class: "fm-typo-en-title-sm-800" }, Je = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Ke = /* @__PURE__ */ Y({
294
301
  __name: "CriteriaTriggerInput",
295
302
  props: {
296
303
  modelValue: {
@@ -302,32 +309,32 @@ const Pe = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ve =
302
309
  }
303
310
  },
304
311
  emits: ["update:model-value"],
305
- setup(R, { emit: f }) {
306
- const $ = R, p = f, g = D(() => [
312
+ setup(F, { emit: f }) {
313
+ const V = F, p = f, g = G(() => [
307
314
  le.enum.BILL_COMPLETED,
308
315
  le.enum.FEEDBACK
309
316
  ].map((m) => Se[m]));
310
317
  return (m, n) => {
311
- const c = _("FmCard");
312
- return C(), B("div", ze, [
318
+ const c = w("FmCard");
319
+ return C(), E("div", Ye, [
313
320
  n[0] || (n[0] = a("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Define the conditions that must be met to activate a reward. ", -1)),
314
321
  a("div", qe, [
315
- (C(!0), B(H, null, te(r(g), (u) => (C(), j(c, {
322
+ (C(!0), E(z, null, te(r(g), (u) => (C(), j(c, {
316
323
  key: u.name,
317
324
  variant: "outlined",
318
- disabled: $.disabled,
325
+ disabled: V.disabled,
319
326
  class: ie(["p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-3", {
320
327
  "col-span-3": r(g).length == 1,
321
- "border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": R.modelValue == u.value,
322
- "hover:bg-fm-color-opacity-sm": R.modelValue != u.value
328
+ "border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": F.modelValue == u.value,
329
+ "hover:bg-fm-color-opacity-sm": F.modelValue != u.value
323
330
  }]),
324
331
  onClick: () => {
325
- $.modelValue != u.value && !$.disabled && p("update:model-value", u.value);
332
+ V.modelValue != u.value && !V.disabled && p("update:model-value", u.value);
326
333
  }
327
334
  }, {
328
- default: k(() => [
329
- a("div", We, E(u.name), 1),
330
- a("div", Je, E(u.description), 1)
335
+ default: I(() => [
336
+ a("div", We, O(u.name), 1),
337
+ a("div", Je, O(u.description), 1)
331
338
  ]),
332
339
  _: 2
333
340
  }, 1032, ["disabled", "class", "onClick"]))), 128))
@@ -341,22 +348,22 @@ const Pe = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ve =
341
348
  }, et = { class: "flex items-center gap-8" }, tt = /* @__PURE__ */ Y({
342
349
  __name: "EditCriteriaSheet",
343
350
  emits: ["update"],
344
- setup(R, { expose: f, emit: $ }) {
345
- const { t: p } = W(), g = $, m = x(!1), n = x(-1), c = x({}), u = Q(), S = xe.superRefine((w, s) => {
346
- w.name.length >= 50 && s.addIssue({
351
+ setup(F, { expose: f, emit: V }) {
352
+ const { t: p } = K(), g = V, m = S(!1), n = S(-1), c = S({}), u = Q(), x = xe.superRefine((_, s) => {
353
+ _.name.length >= 50 && s.addIssue({
347
354
  code: "custom",
348
355
  message: "Name must be less than 50 characters"
349
- }), w.name.length < 1 && s.addIssue({
356
+ }), _.name.length < 1 && s.addIssue({
350
357
  code: "custom",
351
358
  message: "Name is required"
352
359
  });
353
- }), V = D(() => {
354
- const w = S.safeParse(c.value);
355
- return w.success ? [] : w.error.errors;
360
+ }), A = G(() => {
361
+ const _ = x.safeParse(c.value);
362
+ return _.success ? [] : _.error.errors;
356
363
  });
357
- function P(w, s) {
364
+ function T(_, s) {
358
365
  var o;
359
- m.value = w, w && typeof s == "number" && s >= 0 ? (n.value = s, c.value = N(
366
+ m.value = _, _ && typeof s == "number" && s >= 0 ? (n.value = s, c.value = H(
360
367
  (o = u.referralProgram) == null ? void 0 : o.criteria[s]
361
368
  )) : (n.value = -1, c.value = {
362
369
  _id: new ke().toString(),
@@ -365,75 +372,75 @@ const Pe = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ve =
365
372
  event: { type: "BILL_COMPLETED" }
366
373
  });
367
374
  }
368
- function G() {
375
+ function M() {
369
376
  m.value = !1;
370
377
  }
371
- function O() {
372
- const w = S.safeParse(c.value);
373
- w.success && g("update", n.value, w.data);
378
+ function D() {
379
+ const _ = x.safeParse(c.value);
380
+ _.success && g("update", n.value, _.data);
374
381
  }
375
- function T(w) {
376
- c.value.type = w, w == "AUTO" ? c.value.event = { type: "BILL_COMPLETED" } : c.value.event = void 0;
382
+ function L(_) {
383
+ c.value.type = _, _ == "AUTO" ? c.value.event = { type: "BILL_COMPLETED" } : c.value.event = void 0;
377
384
  }
378
385
  return f({
379
- showSheet: P,
380
- hideSheet: G,
386
+ showSheet: T,
387
+ hideSheet: M,
381
388
  data: c
382
- }), (w, s) => {
383
- const o = _("FmButton"), l = _("FmRadio"), y = _("FmRadioGroup"), h = _("FmSideSheet");
389
+ }), (_, s) => {
390
+ const o = w("FmButton"), l = w("FmRadio"), R = w("FmRadioGroup"), h = w("FmSideSheet");
384
391
  return C(), j(h, {
385
392
  "max-width": 768,
386
393
  modelValue: r(m),
387
- "onUpdate:modelValue": s[5] || (s[5] = (e) => z(m) ? m.value = e : null)
394
+ "onUpdate:modelValue": s[5] || (s[5] = (e) => W(m) ? m.value = e : null)
388
395
  }, {
389
- "side-sheet-header": k(() => [
396
+ "side-sheet-header": I(() => [
390
397
  a("div", Ze, [
391
- d(o, {
398
+ i(o, {
392
399
  icon: "arrow_back",
393
400
  variant: "tertiary",
394
- onClick: s[0] || (s[0] = (e) => P(!1))
401
+ onClick: s[0] || (s[0] = (e) => T(!1))
395
402
  }),
396
- s[6] || (s[6] = he("Add Criteria "))
403
+ s[6] || (s[6] = de("Add Criteria "))
397
404
  ])
398
405
  ]),
399
- "side-sheet-footer": k(() => [
406
+ "side-sheet-footer": I(() => [
400
407
  a("div", et, [
401
- d(o, {
408
+ i(o, {
402
409
  label: r(p)("connect.editTierSheet.submit"),
403
- onClick: O,
404
- disabled: r(V).length > 0 || r(q)().isLoading,
405
- loading: r(q)().isLoading
410
+ onClick: D,
411
+ disabled: r(A).length > 0 || r(J)().isLoading,
412
+ loading: r(J)().isLoading
406
413
  }, null, 8, ["label", "disabled", "loading"]),
407
- d(o, {
414
+ i(o, {
408
415
  label: r(p)("connect.editTierSheet.cancel"),
409
- onClick: s[4] || (s[4] = (e) => P(!1)),
416
+ onClick: s[4] || (s[4] = (e) => T(!1)),
410
417
  variant: "tertiary"
411
418
  }, null, 8, ["label"])
412
419
  ])
413
420
  ]),
414
- default: k(() => [
415
- d(X, { json: r(c) }, null, 8, ["json"]),
421
+ default: I(() => [
422
+ i(X, { json: r(c) }, null, 8, ["json"]),
416
423
  a("div", Qe, [
417
424
  s[10] || (s[10] = a("div", { class: "fm-typo-en-title-sm-600" }, "Program Criteria", -1)),
418
- d(Re, {
425
+ i(Ce, {
419
426
  modelValue: r(c).name,
420
427
  "onUpdate:modelValue": s[1] || (s[1] = (e) => r(c).name = e),
421
428
  label: r(p)("connect.referral.editReferralTierSheet.name"),
422
- schema: r(M).typeAtPath(r(S), "name")
429
+ schema: r(N).typeAtPath(r(x), "name")
423
430
  }, null, 8, ["modelValue", "label", "schema"]),
424
431
  s[11] || (s[11] = a("div", { class: "fm-typo-en-title-sm-600" }, "Configuration", -1)),
425
- d(y, {
432
+ i(R, {
426
433
  "model-value": r(c).type,
427
434
  label: "Verify status",
428
- "onUpdate:modelValue": T
435
+ "onUpdate:modelValue": L
429
436
  }, {
430
- default: k(() => [
431
- d(l, {
437
+ default: I(() => [
438
+ i(l, {
432
439
  value: "AUTO",
433
440
  label: "Auto",
434
441
  sublabel: "Verify based on rule configuration"
435
442
  }),
436
- d(l, {
443
+ i(l, {
437
444
  value: "MANUAL",
438
445
  label: "Manual",
439
446
  sublabel: "Verify based on manual inspection"
@@ -441,21 +448,21 @@ const Pe = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ve =
441
448
  ]),
442
449
  _: 1
443
450
  }, 8, ["model-value"]),
444
- r(c).type == "AUTO" ? (C(), B(H, { key: 0 }, [
451
+ r(c).type == "AUTO" ? (C(), E(z, { key: 0 }, [
445
452
  s[8] || (s[8] = a("div", { class: "fm-typo-en-title-sm-600" }, "Trigger", -1)),
446
453
  s[9] || (s[9] = a("div", null, " Select trigger what referee need to complete in order for referral to earn reward ", -1)),
447
- d(Ke, {
454
+ i(Ke, {
448
455
  "model-value": r(c).event.type,
449
456
  "onUpdate:modelValue": s[2] || (s[2] = (e) => r(c).event.type = e)
450
457
  }, null, 8, ["model-value"]),
451
- r(c).event.type == r(ye).enum.BILL_COMPLETED ? (C(), B("div", Xe, [
458
+ r(c).event.type == r(ye).enum.BILL_COMPLETED ? (C(), E("div", Xe, [
452
459
  s[7] || (s[7] = a("div", { class: "fm-typo-en-title-sm-600" }, "Spending Criteria", -1)),
453
- d(Fe, {
460
+ i(Fe, {
454
461
  "model-value": r(c).event.rule,
455
462
  "onUpdate:modelValue": s[3] || (s[3] = (e) => r(c).event.rule = e)
456
463
  }, null, 8, ["model-value"])
457
- ])) : Z("", !0)
458
- ], 64)) : Z("", !0)
464
+ ])) : q("", !0)
465
+ ], 64)) : q("", !0)
459
466
  ])
460
467
  ]),
461
468
  _: 1
@@ -463,8 +470,8 @@ const Pe = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ve =
463
470
  };
464
471
  }
465
472
  });
466
- function fe() {
467
- const R = x(!1), f = Ce();
473
+ function pe() {
474
+ const F = S(!1), f = Re();
468
475
  return {
469
476
  confirmUpdateReferralRecord: async () => {
470
477
  await new Promise((p) => {
@@ -474,50 +481,50 @@ function fe() {
474
481
  primaryActions: { text: "Update all", close: !0 },
475
482
  secondaryActions: { text: "Update future only", close: !0 }
476
483
  }).onPrimary(async () => {
477
- R.value = !0, p();
484
+ F.value = !0, p();
478
485
  }).onSecondary(async () => {
479
- R.value = !1, p();
486
+ F.value = !1, p();
480
487
  });
481
488
  });
482
489
  },
483
- updateReferralRecord: R
490
+ updateReferralRecord: F
484
491
  };
485
492
  }
486
493
  const rt = { class: "flex flex-col space-y-16 mt-24" }, ot = { class: "flex justify-between items-center" }, at = /* @__PURE__ */ Y({
487
494
  __name: "ManageCriteriaSheet",
488
- setup(R, { expose: f }) {
489
- const { t: $ } = W(), { minor: p } = de, { confirmUpdateReferralRecord: g, updateReferralRecord: m } = fe(), n = x(!1), c = x({}), u = Q(), S = x(
495
+ setup(F, { expose: f }) {
496
+ const { t: V } = K(), { minor: p } = ce, { confirmUpdateReferralRecord: g, updateReferralRecord: m } = pe(), n = S(!1), c = S({}), u = Q(), x = S(
490
497
  null
491
- ), V = D(() => {
498
+ ), A = G(() => {
492
499
  var o;
493
500
  return (o = u.referralProgram) == null ? void 0 : o.criteria;
494
501
  });
495
- async function P(o) {
502
+ async function T(o) {
496
503
  await g(), await p(async () => {
497
- await me.update({
504
+ await fe.update({
498
505
  ...o,
499
506
  updateReferralRecord: m.value
500
507
  }), await u.readReferralProgram();
501
508
  });
502
509
  }
503
- async function G(o, l) {
510
+ async function M(o, l) {
504
511
  var e, t;
505
- const y = o == -1 ? ((e = u.referralProgram) == null ? void 0 : e.criteria.length) || 0 : o, h = N(u.referralProgram);
506
- h.criteria[y] = l, await P(h), (t = S.value) == null || t.showSheet(!1);
512
+ const R = o == -1 ? ((e = u.referralProgram) == null ? void 0 : e.criteria.length) || 0 : o, h = H(u.referralProgram);
513
+ h.criteria[R] = l, await T(h), (t = x.value) == null || t.showSheet(!1);
507
514
  }
508
- async function O(o) {
515
+ async function D(o) {
509
516
  var h, e;
510
- if (!await K.remove(
517
+ if (!await Z.remove(
511
518
  "Are you sure to remove criteria",
512
519
  "Remove criteria",
513
- $("connect.prompt.confirm"),
514
- $("connect.prompt.cancel")
520
+ V("connect.prompt.confirm"),
521
+ V("connect.prompt.cancel")
515
522
  ))
516
523
  return;
517
- const l = o == -1 ? ((h = u.referralProgram) == null ? void 0 : h.criteria.length) || 0 : o, y = N(u.referralProgram);
518
- y.criteria.splice(l, 1), await P(y), (e = S.value) == null || e.showSheet(!1);
524
+ const l = o == -1 ? ((h = u.referralProgram) == null ? void 0 : h.criteria.length) || 0 : o, R = H(u.referralProgram);
525
+ R.criteria.splice(l, 1), await T(R), (e = x.value) == null || e.showSheet(!1);
519
526
  }
520
- const T = [
527
+ const L = [
521
528
  {
522
529
  header: "Criteria title",
523
530
  accessorFn: (o) => o.name
@@ -540,68 +547,68 @@ const rt = { class: "flex flex-col space-y-16 mt-24" }, ot = { class: "flex just
540
547
  icon: "delete",
541
548
  iconColor: "neutral-gray-400",
542
549
  onClick: (l) => {
543
- l.stopPropagation(), O(o.row.index);
550
+ l.stopPropagation(), D(o.row.index);
544
551
  }
545
552
  })
546
553
  ];
547
554
  }
548
555
  }
549
556
  ];
550
- function w(o) {
557
+ function _(o) {
551
558
  n.value = o;
552
559
  }
553
560
  function s() {
554
561
  n.value = !1;
555
562
  }
556
563
  return f({
557
- showSheet: w,
564
+ showSheet: _,
558
565
  hideSheet: s,
559
566
  data: c
560
567
  }), (o, l) => {
561
- const y = _("FmButton"), h = _("FmTable"), e = _("FmSideSheet");
562
- return C(), B(H, null, [
563
- d(e, {
568
+ const R = w("FmButton"), h = w("FmTable"), e = w("FmSideSheet");
569
+ return C(), E(z, null, [
570
+ i(e, {
564
571
  "max-width": 768,
565
572
  modelValue: r(n),
566
- "onUpdate:modelValue": l[2] || (l[2] = (t) => z(n) ? n.value = t : null),
573
+ "onUpdate:modelValue": l[2] || (l[2] = (t) => W(n) ? n.value = t : null),
567
574
  header: "Manage Criteria"
568
575
  }, {
569
- default: k(() => [
576
+ default: I(() => [
570
577
  a("div", rt, [
571
578
  a("div", ot, [
572
579
  l[3] || (l[3] = a("div", null, [
573
580
  a("div", { class: "fm-typo-en-title-sm-600" }, "Program Criteria"),
574
581
  a("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Set participation rules to start your referral program ")
575
582
  ], -1)),
576
- d(y, {
583
+ i(R, {
577
584
  label: "Add Criteria",
578
585
  icon: "add",
579
586
  variant: "secondary",
580
587
  onClick: l[0] || (l[0] = (t) => {
581
- var i;
582
- return (i = r(S)) == null ? void 0 : i.showSheet(!0);
588
+ var d;
589
+ return (d = r(x)) == null ? void 0 : d.showSheet(!0);
583
590
  })
584
591
  })
585
592
  ]),
586
- d(h, {
587
- "row-data": r(V),
593
+ i(h, {
594
+ "row-data": r(A),
588
595
  "hide-footer": !0,
589
596
  "page-size": 100,
590
597
  "shrink-at": !1,
591
- "column-defs": T,
598
+ "column-defs": L,
592
599
  onRowClick: l[1] || (l[1] = (t) => {
593
- var i;
594
- return (i = r(S)) == null ? void 0 : i.showSheet(!0, t.index);
600
+ var d;
601
+ return (d = r(x)) == null ? void 0 : d.showSheet(!0, t.index);
595
602
  })
596
603
  }, null, 8, ["row-data"])
597
604
  ])
598
605
  ]),
599
606
  _: 1
600
607
  }, 8, ["modelValue"]),
601
- d(tt, {
608
+ i(tt, {
602
609
  ref_key: "editCriteriaSheetRef",
603
- ref: S,
604
- onUpdate: G
610
+ ref: x,
611
+ onUpdate: M
605
612
  }, null, 512)
606
613
  ], 64);
607
614
  };
@@ -609,19 +616,19 @@ const rt = { class: "flex flex-col space-y-16 mt-24" }, ot = { class: "flex just
609
616
  }), nt = { class: "flex flex-col space-y-16 pr-12" }, lt = { class: "fm-typo-en-title-sm-800" }, st = { class: "flex items-center gap-8" }, it = /* @__PURE__ */ Y({
610
617
  __name: "EditRefereeRewardSheet",
611
618
  emits: ["update"],
612
- setup(R, { expose: f, emit: $ }) {
613
- const { t: p } = W(), g = $, m = x(!1), n = x([]), c = Q();
619
+ setup(F, { expose: f, emit: V }) {
620
+ const { t: p } = K(), g = V, m = S(!1), n = S([]), c = Q();
614
621
  function u() {
615
622
  g("update", n.value);
616
623
  }
617
- async function S(o) {
618
- var l, y;
619
- m.value = o, n.value = ((y = (l = c.referralProgram) == null ? void 0 : l.refereeReward) == null ? void 0 : y.map((h) => h.toString())) || [], s.value = T.value.map((h) => n.value.includes(h.id));
624
+ async function x(o) {
625
+ var l, R;
626
+ m.value = o, n.value = ((R = (l = c.referralProgram) == null ? void 0 : l.refereeReward) == null ? void 0 : R.map((h) => h.toString())) || [], s.value = L.value.map((h) => n.value.includes(h.id));
620
627
  }
621
- function V() {
628
+ function A() {
622
629
  m.value = !1;
623
630
  }
624
- const P = [
631
+ const T = [
625
632
  {
626
633
  header: "Reward title",
627
634
  accessorFn: (o) => o.name,
@@ -631,7 +638,7 @@ const rt = { class: "flex flex-col space-y-16 mt-24" }, ot = { class: "flex just
631
638
  id: "type",
632
639
  header: "Reward type",
633
640
  cell(o) {
634
- return ue[o.row.original.collectibleConfig.type].chip();
641
+ return me[o.row.original.collectibleConfig.type].chip();
635
642
  }
636
643
  },
637
644
  {
@@ -643,7 +650,7 @@ const rt = { class: "flex flex-col space-y-16 mt-24" }, ot = { class: "flex just
643
650
  return l.description;
644
651
  }
645
652
  }
646
- ], G = ce(), O = x([]), T = D(() => G.rewards.map((o) => {
653
+ ], M = ue(), D = S([]), L = G(() => M.rewards.map((o) => {
647
654
  let l = "No expiry";
648
655
  switch (o.option.type) {
649
656
  case "VOUCHER":
@@ -661,53 +668,53 @@ const rt = { class: "flex flex-col space-y-16 mt-24" }, ot = { class: "flex just
661
668
  description: l
662
669
  };
663
670
  }));
664
- D(() => []);
665
- function w() {
666
- const o = T.value;
671
+ G(() => []);
672
+ function _() {
673
+ const o = L.value;
667
674
  for (let l = 0; l < o.length; l++) {
668
- const y = o[l], h = s.value[l];
669
- h && !n.value.includes(y.id) && n.value.push(y.id), !h && n.value.includes(y.id) && (n.value = n.value.filter((e) => e != y.id));
675
+ const R = o[l], h = s.value[l];
676
+ h && !n.value.includes(R.id) && n.value.push(R.id), !h && n.value.includes(R.id) && (n.value = n.value.filter((e) => e != R.id));
670
677
  }
671
678
  }
672
- const s = x({});
673
- return se(s, w, { deep: !0 }), f({
674
- showSheet: S,
675
- hideSheet: V,
679
+ const s = S({});
680
+ return se(s, _, { deep: !0 }), f({
681
+ showSheet: x,
682
+ hideSheet: A,
676
683
  data: n
677
684
  }), (o, l) => {
678
- const y = _("FmTable"), h = _("FmButton"), e = _("FmSideSheet");
685
+ const R = w("FmTable"), h = w("FmButton"), e = w("FmSideSheet");
679
686
  return C(), j(e, {
680
687
  "max-width": 1e3,
681
688
  modelValue: r(m),
682
- "onUpdate:modelValue": l[2] || (l[2] = (t) => z(m) ? m.value = t : null),
689
+ "onUpdate:modelValue": l[2] || (l[2] = (t) => W(m) ? m.value = t : null),
683
690
  header: "Referee reward"
684
691
  }, {
685
- "side-sheet-footer": k(() => [
692
+ "side-sheet-footer": I(() => [
686
693
  a("div", st, [
687
- d(h, {
694
+ i(h, {
688
695
  label: r(p)("connect.common.save"),
689
696
  onClick: u,
690
- disabled: r(q)().isLoading,
691
- loading: r(q)().isLoading
697
+ disabled: r(J)().isLoading,
698
+ loading: r(J)().isLoading
692
699
  }, null, 8, ["label", "disabled", "loading"]),
693
- d(h, {
700
+ i(h, {
694
701
  label: r(p)("connect.common.cancel"),
695
- onClick: l[1] || (l[1] = (t) => V()),
702
+ onClick: l[1] || (l[1] = (t) => A()),
696
703
  variant: "tertiary"
697
704
  }, null, 8, ["label"])
698
705
  ])
699
706
  ]),
700
- default: k(() => [
701
- d(X, { json: r(n) }, null, 8, ["json"]),
707
+ default: I(() => [
708
+ i(X, { json: r(n) }, null, 8, ["json"]),
702
709
  a("div", nt, [
703
- a("div", lt, E(r(p)("connect.referral.refereeRewardSheet.referee_reward")), 1),
704
- d(y, {
710
+ a("div", lt, O(r(p)("connect.referral.refereeRewardSheet.referee_reward")), 1),
711
+ i(R, {
705
712
  modelValue: r(s),
706
- "onUpdate:modelValue": l[0] || (l[0] = (t) => z(s) ? s.value = t : null),
713
+ "onUpdate:modelValue": l[0] || (l[0] = (t) => W(s) ? s.value = t : null),
707
714
  selection: "multiple",
708
- "column-filter": r(O),
709
- "column-defs": P,
710
- "row-data": r(T),
715
+ "column-filter": r(D),
716
+ "column-defs": T,
717
+ "row-data": r(L),
711
718
  "page-size": 10
712
719
  }, null, 8, ["modelValue", "column-filter", "row-data"])
713
720
  ])
@@ -716,19 +723,19 @@ const rt = { class: "flex flex-col space-y-16 mt-24" }, ot = { class: "flex just
716
723
  }, 8, ["modelValue"]);
717
724
  };
718
725
  }
719
- }), dt = { class: "fm-typo-en-title-sm-600" }, ct = { class: "grid grid-cols-4 xs:grid-cols-1 gap-4 divide-x xs:divide-x-0" }, ut = { class: "flex gap-x-8" }, mt = { class: "fm-typo-body-lg-600" }, ft = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, pt = { class: "mb-40" }, ht = {
726
+ }), dt = { class: "fm-typo-en-title-sm-600" }, ct = { class: "grid grid-cols-4 xs:grid-cols-1 gap-4 divide-x xs:divide-x-0" }, ut = { class: "flex gap-x-8" }, mt = { class: "fm-typo-body-lg-600 flex items-center gap-x-4" }, ft = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, pt = { class: "mb-40" }, ht = {
720
727
  key: 0,
721
728
  class: "flex flex-col items-center justify-center gap-y-16 p-24"
722
729
  }, vt = { class: "flex flex-col gap-16 text-center" }, gt = { class: "fm-typo-en-title-sm-800" }, wt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Nt = /* @__PURE__ */ Y({
723
730
  __name: "Overview",
724
- setup(R) {
725
- const { t: f } = W(), { minor: $ } = de, p = $e(), g = Q(), { confirmUpdateReferralRecord: m, updateReferralRecord: n } = fe(), c = D(() => {
731
+ setup(F) {
732
+ const { t: f } = K(), { minor: V } = ce, p = $e(), g = Q(), { confirmUpdateReferralRecord: m, updateReferralRecord: n } = pe(), c = G(() => {
726
733
  var e;
727
734
  return ((e = g.referralProgram) == null ? void 0 : e.reward) ?? [];
728
- }), u = x(null);
729
- x(null);
730
- const S = x(null), V = x(null), P = x(null), G = D(() => {
731
- var e, t, i, F;
735
+ }), u = S(null);
736
+ S(null);
737
+ const x = S(null), A = S(null), T = S(null), M = G(() => {
738
+ var e, t, d, k;
732
739
  return [
733
740
  {
734
741
  label: "connect.referral.how_it_works.generate_link",
@@ -737,89 +744,91 @@ const rt = { class: "flex flex-col space-y-16 mt-24" }, ot = { class: "flex just
737
744
  },
738
745
  {
739
746
  label: "connect.referral.how_it_works.referee_join_reward",
740
- sublabel: `${((t = (e = g.referralProgram) == null ? void 0 : e.pf_refereeReward) == null ? void 0 : t.length) || 0} reward(s)`,
747
+ sublabel: `${((t = (e = g.referralProgram) == null ? void 0 : e.refereeReward) == null ? void 0 : t.length) || 0} reward(s)`,
741
748
  action: f("connect.referral.actions.manage_reward"),
742
749
  onClick: () => {
743
- var b;
744
- return (b = P.value) == null ? void 0 : b.showSheet(!0);
750
+ var y;
751
+ return (y = T.value) == null ? void 0 : y.showSheet(!0);
745
752
  },
753
+ helperText: "Referee will receive rewards after successfully competing all criteria",
746
754
  icon: "group_add"
747
755
  },
748
756
  {
749
757
  label: "connect.referral.how_it_works.referee_meet_criteria",
750
- sublabel: `${(i = g.referralProgram) == null ? void 0 : i.criteria.length} criteria`,
758
+ sublabel: `${(d = g.referralProgram) == null ? void 0 : d.criteria.length} criteria`,
751
759
  action: f("connect.referral.actions.manage_criteria"),
752
760
  onClick: () => {
753
- var b;
754
- return (b = V.value) == null ? void 0 : b.showSheet(!0);
761
+ var y;
762
+ return (y = A.value) == null ? void 0 : y.showSheet(!0);
755
763
  },
756
764
  icon: "checklist_rtl"
757
765
  },
758
766
  {
759
767
  label: "connect.referral.how_it_works.referer_get_reward",
760
- sublabel: `${(F = g.referralProgram) == null ? void 0 : F.reward.length} configured tier(s)`,
768
+ sublabel: `${(k = g.referralProgram) == null ? void 0 : k.reward.length} configured tier(s)`,
769
+ helperText: "Referer will receive rewards after referee completed all criteria",
761
770
  icon: "featured_seasonal_and_gifts"
762
771
  }
763
772
  ];
764
773
  });
765
- function O(e) {
774
+ function D(e) {
766
775
  var t;
767
776
  (t = u.value) == null || t.onManageRewardGroup(e);
768
777
  }
769
- function T(e) {
778
+ function L(e) {
770
779
  var t;
771
- (t = S.value) == null || t.showSheet(!0, {
780
+ (t = x.value) == null || t.showSheet(!0, {
772
781
  groupIndex: e.groupIndex,
773
782
  countIndex: e.countIndex
774
783
  });
775
784
  }
776
- async function w(e) {
777
- var v, I, L, J;
778
- const t = e.countIndex == -1 ? ((I = (v = g.referralProgram) == null ? void 0 : v.reward[e.groupIndex]) == null ? void 0 : I.rewards.length) || 0 : e.countIndex || 0, i = e.referralCount, F = N(
785
+ async function _(e) {
786
+ var P, b, v, B;
787
+ const t = e.countIndex == -1 ? ((b = (P = g.referralProgram) == null ? void 0 : P.reward[e.groupIndex]) == null ? void 0 : b.rewards.length) || 0 : e.countIndex || 0, d = e.referralCount, k = H(
779
788
  g.referralProgram
780
- ), b = F.reward[e.groupIndex];
781
- b.rewards[t] = e.referralCount;
782
- const U = b.rewards[t - 1], A = b.rewards[t + 1];
783
- if (U && U.threshold.to != i.threshold.from - 1) {
784
- if (!await K.confirm(
789
+ ), y = k.reward[e.groupIndex];
790
+ y.rewards[t] = e.referralCount;
791
+ const $ = y.rewards[t - 1], U = y.rewards[t + 1];
792
+ if ($ && $.threshold.to != d.threshold.from - 1) {
793
+ if (!await Z.confirm(
785
794
  f("connect.program.tier.update.range_discontinuous.previous", {
786
- name: U.threshold.from,
787
- from: U.threshold.from ?? 0,
788
- to: U.threshold.to ?? 1 / 0,
789
- newTo: i.threshold.from - 1
795
+ name: $.threshold.from,
796
+ from: $.threshold.from ?? 0,
797
+ to: $.threshold.to ?? 1 / 0,
798
+ newTo: d.threshold.from - 1
790
799
  }),
791
800
  f("connect.program.tier.title"),
792
801
  f("connect.program.tier.remove.next_range")
793
802
  ))
794
803
  return;
795
- U.threshold.to = i.threshold.from - 1;
804
+ $.threshold.to = d.threshold.from - 1;
796
805
  }
797
- if (A && A.threshold.from - 1 != i.threshold.to) {
798
- if (!await K.confirm(
806
+ if (U && U.threshold.from - 1 != d.threshold.to) {
807
+ if (!await Z.confirm(
799
808
  f("connect.program.tier.update.range_discontinuous.next", {
800
- name: A.threshold.from,
801
- from: A.threshold.from ?? 0,
802
- to: A.threshold.to ?? 1 / 0,
803
- newFrom: i.threshold.to ?? 1
809
+ name: U.threshold.from,
810
+ from: U.threshold.from ?? 0,
811
+ to: U.threshold.to ?? 1 / 0,
812
+ newFrom: d.threshold.to ?? 1
804
813
  }),
805
814
  f("connect.program.tier.title"),
806
815
  f("connect.program.tier.remove.next_range"),
807
816
  f("connect.prompt.cancel")
808
817
  ))
809
818
  return;
810
- A.threshold.from = (i.threshold.to ?? 0) + 1;
819
+ U.threshold.from = (d.threshold.to ?? 0) + 1;
811
820
  }
812
- !A && !((L = i.threshold) != null && L.to) && (i.threshold.to = void 0), await o(F), (J = S.value) == null || J.hideSheet();
821
+ !U && !((v = d.threshold) != null && v.to) && (d.threshold.to = void 0), await o(k), (B = x.value) == null || B.hideSheet();
813
822
  }
814
823
  async function s(e) {
815
- var i;
816
- const t = N(g.referralProgram);
817
- t.refereeReward = e, await o(t), (i = P.value) == null || i.hideSheet();
824
+ var d;
825
+ const t = H(g.referralProgram);
826
+ t.refereeReward = e, await o(t), (d = T.value) == null || d.hideSheet();
818
827
  }
819
828
  async function o(e) {
820
- await m(), await $(
829
+ await m(), await V(
821
830
  async () => {
822
- await me.update({
831
+ await fe.update({
823
832
  ...e,
824
833
  updateReferralRecord: n.value
825
834
  }), await g.readReferralProgram();
@@ -831,26 +840,26 @@ const rt = { class: "flex flex-col space-y-16 mt-24" }, ot = { class: "flex just
831
840
  );
832
841
  }
833
842
  async function l(e) {
834
- if (!await K.remove(
843
+ if (!await Z.remove(
835
844
  "Are you sure to remove referral tier",
836
845
  "Remove referral tier",
837
846
  f("connect.prompt.confirm"),
838
847
  f("connect.prompt.cancel")
839
848
  ))
840
849
  return;
841
- const t = N(g.referralProgram);
850
+ const t = H(g.referralProgram);
842
851
  t.reward.splice(e, 1), await o(t);
843
852
  }
844
- async function y(e, t) {
845
- if (!await K.remove(
853
+ async function R(e, t) {
854
+ if (!await Z.remove(
846
855
  "Are you sure to remove referral count",
847
856
  "Remove referral tier",
848
857
  f("connect.prompt.confirm"),
849
858
  f("connect.prompt.cancel")
850
859
  ))
851
860
  return;
852
- const i = N(g.referralProgram);
853
- i.reward[e].rewards.splice(t, 1), await o(i);
861
+ const d = H(g.referralProgram);
862
+ d.reward[e].rewards.splice(t, 1), await o(d);
854
863
  }
855
864
  const h = [
856
865
  {
@@ -877,7 +886,7 @@ const rt = { class: "flex flex-col space-y-16 mt-24" }, ot = { class: "flex just
877
886
  iconColor: "neutral-gray-400",
878
887
  class: "ml-auto",
879
888
  onClick: (t) => {
880
- t.stopPropagation(), console.log(e.row), y(e.row.original.groupIndex, e.row.index);
889
+ t.stopPropagation(), console.log(e.row), R(e.row.original.groupIndex, e.row.index);
881
890
  }
882
891
  });
883
892
  }
@@ -886,37 +895,52 @@ const rt = { class: "flex flex-col space-y-16 mt-24" }, ot = { class: "flex just
886
895
  return ve(async () => {
887
896
  await g.readReferralProgram();
888
897
  }), (e, t) => {
889
- const i = _("FmCard"), F = _("FmIcon"), b = _("FmButton"), U = _("FmTable"), A = _("FmList");
890
- return C(), B(H, null, [
891
- Z("", !0),
892
- d(i, {
898
+ const d = w("FmCard"), k = w("FmIcon"), y = w("FmTooltip"), $ = w("FmButton"), U = w("FmTable"), P = w("FmList");
899
+ return C(), E(z, null, [
900
+ q("", !0),
901
+ i(d, {
893
902
  variant: "outlined",
894
903
  class: "flex flex-col gap-16 p-16"
895
904
  }, {
896
- default: k(() => [
897
- a("div", dt, E(r(f)("connect.referral.how_it_works.title")), 1),
905
+ default: I(() => [
906
+ a("div", dt, O(r(f)("connect.referral.how_it_works.title")), 1),
898
907
  a("div", ct, [
899
- (C(!0), B(H, null, te(r(G), (v, I) => (C(), B("div", {
900
- key: I,
901
- class: ie(["px-8", { "xs:!border-r": I % 2 == 0 }])
908
+ (C(!0), E(z, null, te(r(M), (b, v) => (C(), E("div", {
909
+ key: v,
910
+ class: ie(["px-8", { "xs:!border-r": v % 2 == 0 }])
902
911
  }, [
903
912
  a("div", ut, [
904
- d(F, {
905
- name: v.icon,
913
+ i(k, {
914
+ name: b.icon,
906
915
  color: "primary",
907
916
  class: "bg-fm-color-system-warning-100 p-8 fm-corner-radius-md max-h-40 max-w-40"
908
917
  }, null, 8, ["name"]),
909
918
  a("div", null, [
910
- a("div", mt, E(r(f)(v.label)), 1),
911
- a("div", ft, E(v.sublabel), 1),
912
- v.action ? (C(), j(b, {
919
+ a("div", mt, [
920
+ de(O(r(f)(b.label)) + " ", 1),
921
+ b.helperText ? (C(), j(y, {
922
+ key: 0,
923
+ content: b.helperText
924
+ }, {
925
+ default: I(() => [
926
+ i(k, {
927
+ name: "help",
928
+ size: "sm",
929
+ outline: !0
930
+ })
931
+ ]),
932
+ _: 2
933
+ }, 1032, ["content"])) : q("", !0)
934
+ ]),
935
+ a("div", ft, O(b.sublabel), 1),
936
+ b.action ? (C(), j($, {
913
937
  key: 0,
914
938
  variant: "plain",
915
- label: v.action,
939
+ label: b.action,
916
940
  disabled: !r(p).isPremium,
917
941
  class: "fm-typo-en-body-md-400 !p-0",
918
- onClick: v.onClick
919
- }, null, 8, ["label", "disabled", "onClick"])) : Z("", !0)
942
+ onClick: b.onClick
943
+ }, null, 8, ["label", "disabled", "onClick"])) : q("", !0)
920
944
  ])
921
945
  ])
922
946
  ], 2))), 128))
@@ -924,44 +948,44 @@ const rt = { class: "flex flex-col space-y-16 mt-24" }, ot = { class: "flex just
924
948
  ]),
925
949
  _: 1
926
950
  }),
927
- r(c) && r(c).length > 0 ? (C(), j(i, {
951
+ r(c) && r(c).length > 0 ? (C(), j(d, {
928
952
  key: 1,
929
953
  variant: "outlined",
930
954
  class: "flex flex-col gap-16 p-16"
931
955
  }, {
932
- default: k(() => [
933
- d(A, { separator: !0 }, {
934
- default: k(() => [
935
- (C(!0), B(H, null, te(r(c), (v, I) => (C(), j(De, {
936
- key: I,
937
- "reward-group": v,
938
- level: I,
939
- onEdit: (L) => O(I),
940
- onRemove: (L) => l(I),
941
- onAddCount: t[0] || (t[0] = (L) => {
942
- T({ groupIndex: L, countIndex: -1 });
956
+ default: I(() => [
957
+ i(P, { separator: !0 }, {
958
+ default: I(() => [
959
+ (C(!0), E(z, null, te(r(c), (b, v) => (C(), j(De, {
960
+ key: v,
961
+ "reward-group": b,
962
+ level: v,
963
+ onEdit: (B) => D(v),
964
+ onRemove: (B) => l(v),
965
+ onAddCount: t[0] || (t[0] = (B) => {
966
+ L({ groupIndex: B, countIndex: -1 });
943
967
  })
944
968
  }, {
945
- default: k(() => [
969
+ default: I(() => [
946
970
  a("div", pt, [
947
- d(U, {
948
- "row-data": v.rewards.map((L) => ({ ...L, groupIndex: I })),
971
+ i(U, {
972
+ "row-data": b.rewards.map((B) => ({ ...B, groupIndex: v })),
949
973
  "column-defs": h,
950
974
  "hide-footer": !0,
951
975
  "page-size": 50,
952
- onRowClick: (L) => T({ groupIndex: I, countIndex: L.index })
976
+ onRowClick: (B) => L({ groupIndex: v, countIndex: B.index })
953
977
  }, null, 8, ["row-data", "onRowClick"])
954
978
  ]),
955
- v.rewards.length ? Z("", !0) : (C(), B("div", ht, [
979
+ b.rewards.length ? q("", !0) : (C(), E("div", ht, [
956
980
  t[3] || (t[3] = a("div", { class: "flex flex-col gap-16 text-center" }, [
957
981
  a("div", { class: "fm-typo-en-title-sm-800" }, "Create progressive reward"),
958
982
  a("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Add referral count to configure progression reward to the referral program ")
959
983
  ], -1)),
960
- d(b, {
984
+ i($, {
961
985
  variant: "secondary",
962
986
  label: "Add count",
963
987
  icon: "add",
964
- onClick: (L) => T({ groupIndex: I, countIndex: -1 })
988
+ onClick: (B) => L({ groupIndex: v, countIndex: -1 })
965
989
  }, null, 8, ["onClick"])
966
990
  ]))
967
991
  ]),
@@ -972,46 +996,46 @@ const rt = { class: "flex flex-col space-y-16 mt-24" }, ot = { class: "flex just
972
996
  })
973
997
  ]),
974
998
  _: 1
975
- })) : (C(), j(i, {
999
+ })) : (C(), j(d, {
976
1000
  key: 2,
977
1001
  variant: "outlined",
978
1002
  class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
979
1003
  }, {
980
- default: k(() => [
1004
+ default: I(() => [
981
1005
  t[4] || (t[4] = a("img", {
982
1006
  src: ge,
983
1007
  class: "aspect-square w-[150px]"
984
1008
  }, null, -1)),
985
1009
  a("div", vt, [
986
- a("div", gt, E(r(f)("connect.referral.referral_tier_title")), 1),
987
- a("div", wt, E(r(f)("connect.referral.referral_tier_description")), 1)
1010
+ a("div", gt, O(r(f)("connect.referral.referral_tier_title")), 1),
1011
+ a("div", wt, O(r(f)("connect.referral.referral_tier_description")), 1)
988
1012
  ]),
989
- d(b, {
1013
+ i($, {
990
1014
  variant: "primary",
991
1015
  label: r(f)("connect.referral.add_referral_tier"),
992
1016
  icon: "add",
993
1017
  disabled: !r(p).isPremium,
994
- onClick: t[1] || (t[1] = (v) => O(-1))
1018
+ onClick: t[1] || (t[1] = (b) => D(-1))
995
1019
  }, null, 8, ["label", "disabled"])
996
1020
  ]),
997
1021
  _: 1
998
1022
  })),
999
- d(_e, {
1023
+ i(_e, {
1000
1024
  ref_key: "rewardGroupRef",
1001
1025
  ref: u
1002
1026
  }, null, 512),
1003
- d(Ye, {
1027
+ i(ze, {
1004
1028
  ref_key: "editReferralCountSheetRef",
1005
- ref: S,
1006
- onUpdate: w
1029
+ ref: x,
1030
+ onUpdate: _
1007
1031
  }, null, 512),
1008
- d(at, {
1032
+ i(at, {
1009
1033
  ref_key: "manageCriteriaSheetRef",
1010
- ref: V
1034
+ ref: A
1011
1035
  }, null, 512),
1012
- d(it, {
1036
+ i(it, {
1013
1037
  ref_key: "editRefereeRewardSheetRef",
1014
- ref: P,
1038
+ ref: T,
1015
1039
  onUpdate: s
1016
1040
  }, null, 512)
1017
1041
  ], 64);