@feedmepos/mf-connect 0.1.0-beta.4 → 0.1.0-beta.41

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 (106) hide show
  1. package/dist/Analytic-C7iDpCvx.js +426 -0
  2. package/dist/{App-BnQwjxIr.js → App-rOEspgIk.js} +397 -384
  3. package/dist/{Broadcast-y1kP18mo.js → Broadcast-CI61-FqI.js} +32 -32
  4. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Dj0JUMOk.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BL_KxlIX.js} +6 -8
  5. package/dist/Card-CUzEZnUC.js +894 -0
  6. package/dist/{Collections-DPfbZMg1.js → Collections-zYhQfAph.js} +28 -34
  7. package/dist/{Credit-QleM_b6q.js → Credit-D6G2xUEu.js} +14 -14
  8. package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-DLnvDVgf.js +108 -0
  9. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-CxxmBzPu.js +2209 -0
  10. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-2hRTF1EJ.js → EffectSheet.vue_vue_type_style_index_0_lang-Drd0ZjdQ.js} +8 -8
  11. package/dist/{Experience-DGKj8ChY.js → Experience-Cqn6cpA4.js} +8 -8
  12. package/dist/{Game-BxRdzSma.js → Game-CGrL5xmK.js} +15 -15
  13. package/dist/Index-CCcuCcmL.js +255 -0
  14. package/dist/Marketing-DhZHedDV.js +20070 -0
  15. package/dist/{Member-CteeBDi2.js → Member-CB8o8wLL.js} +4 -4
  16. package/dist/MemberList-D6zRpcwU.js +1554 -0
  17. package/dist/MemberTransactions-HCaDl8dN.js +45 -0
  18. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CZ2M8huU.js → MessageInput.vue_vue_type_script_setup_true_lang-CqlGFgwF.js} +2 -2
  19. package/dist/{Mission-CZgXBa09.js → Mission-CexuwCSV.js} +98 -86
  20. package/dist/Overview-CZk3IHyA.js +1063 -0
  21. package/dist/{Point-C2vzEfRP.js → Point-DJ_sLiid.js} +23 -23
  22. package/dist/{Promotion-337OT0sP.js → Promotion-CWBpjPXQ.js} +53 -47
  23. package/dist/Record-CwT9Pmjn.js +337 -0
  24. package/dist/Reward-DhOIXKAB.js +432 -0
  25. package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-UP4KtCK2.js +149 -0
  26. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-BNw-CED0.js +1637 -0
  27. package/dist/Segment-BE7Bt2tH.js +566 -0
  28. package/dist/SelectItems.vue_vue_type_script_setup_true_lang-CDyT_cSb.js +181 -0
  29. package/dist/{Setting-DVK2594u.js → Setting-D1k2xVYx.js} +609 -586
  30. package/dist/Store-BzoJ_ZBZ.js +1743 -0
  31. package/dist/{StoreRewards-BpEmNueE.js → StoreRewards-OAPmCssF.js} +12 -12
  32. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-BIr5Zzij.js +1099 -0
  33. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-DT48bSiH.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-C2fU1byp.js} +1 -1
  34. package/dist/{Tier-BwvOhyXR.js → Tier-IHJ7dlTI.js} +325 -317
  35. package/dist/{Title-DRPdKYRO.js → Title-C4KcQWk_.js} +197 -183
  36. package/dist/{Transaction-BnLvacwW.js → Transaction-B7SWRleT.js} +2 -2
  37. package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-DOXLpM1y.js +130 -0
  38. package/dist/{Voucher-BQL8J_EA.js → Voucher-Dzh-oh1p.js} +40 -40
  39. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-DeTWCZF1.js +419 -0
  40. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-B316b_ta.js → ZodTextField.vue_vue_type_script_setup_true_lang-rBa59HC1.js} +1 -1
  41. package/dist/{app-BVaQwBvq.js → app-BkSGMADw.js} +1 -1
  42. package/dist/{app-zO552-Dl.js → app-ZePrUEIY.js} +1183 -1154
  43. package/dist/app.js +1 -1
  44. package/dist/{business-BSl6NSdS.js → business-CG7GnAu5.js} +1 -1
  45. package/dist/campaign-BSH9FJHx.js +1810 -0
  46. package/dist/{campaign-CxN6mq_l.js → campaign-DFvmN5Ky.js} +2 -2
  47. package/dist/campaign.enum-CBlGXHp0.js +20 -0
  48. package/dist/campaign.fn-BszsH1EQ.js +758 -0
  49. package/dist/collectible.enum-Sd3QSyrd.js +19 -0
  50. package/dist/{collection.fn-C-2dyWp9.js → collection.fn-CIFllkyx.js} +2 -2
  51. package/dist/dto-DG2Ckvh4.js +214 -0
  52. package/dist/{effect-D8y0J47O.js → effect-CWSFIfZh.js} +9 -9
  53. package/dist/email-addresses-BCNsQNXA.js +705 -0
  54. package/dist/{export-BxTrifKO.js → export-DKe01mG4.js} +3 -3
  55. package/dist/{helper-bEmZlTwA.js → helper-Et1Q6YUA.js} +1 -1
  56. package/dist/{index-DHTYWfTs.js → index-Bk281EIF.js} +207 -195
  57. package/dist/{index-B2qriSSk.js → index-CHAvEqB_.js} +1 -1
  58. package/dist/index-CMEY40F9.js +32 -0
  59. package/dist/index-CsaQJMAR.js +66 -0
  60. package/dist/{index-C_WyKCqN.js → index-D4FT-dGm.js} +1 -1
  61. package/dist/{index-JBp0chol.js → index-D_sLK5cZ.js} +1500 -1479
  62. package/dist/{index-Dnv999nc.js → index-Dkl_Y2Ir.js} +1 -1
  63. package/dist/{index-Ckz-D_AP.js → index-Dlv6dpg5.js} +2188 -931
  64. package/dist/index-DrRQsR1a.js +44 -0
  65. package/dist/{index-DuYb25dY.js → index-DzZDUZ8E.js} +37 -4
  66. package/dist/index-F1sEdtX3.js +54 -0
  67. package/dist/index-RFzgIvoM.js +29000 -0
  68. package/dist/{index-BFWCbVq2.js → index-RhGXDJ8R.js} +1 -1
  69. package/dist/index-vh86FiIQ.js +10 -0
  70. package/dist/{index.esm2017-Tw7KabwI.js → index.esm2017-COLDuQQ-.js} +1 -1
  71. package/dist/{loading-60xYxow_.js → loading-DxppIZmv.js} +1714 -1720
  72. package/dist/{membership-43FU3EmV.js → membership-DIBN0bog.js} +52 -44
  73. package/dist/money-L7YJDctU.js +15 -0
  74. package/dist/number-BAUL1NQ9.js +12 -0
  75. package/dist/objectid-BXKVeU2w.js +145 -0
  76. package/dist/remy-vue-client-Cpppk9h-.js +1693 -0
  77. package/dist/reward-Qjelc0jm.js +36 -0
  78. package/dist/{rule-DlHrKp8K.js → rule-BAqQRjqc.js} +180 -177
  79. package/dist/{rule-builder-CU8P8b8U.js → rule-builder-D2hQiWL6.js} +1 -1
  80. package/dist/style.css +1 -1
  81. package/dist/{template-9StyN-b7.js → template-NVFsa0l_.js} +5 -5
  82. package/dist/trigger-qeiGHLZs.js +114 -0
  83. package/dist/{xlsx-CrRvm5Vs.js → usePagination-De7j-UtU.js} +3183 -2962
  84. package/dist/user-CKVD-V1i.js +54 -0
  85. package/dist/{vue-i18n-UKlvivrG.js → vue-i18n-CTdcKDi0.js} +2 -2
  86. package/package.json +8 -7
  87. package/dist/Analytic-BtldByrt.js +0 -622
  88. package/dist/Card-kW7k8kOl.js +0 -825
  89. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-BtI2rY4y.js +0 -2813
  90. package/dist/Marketing-CG4GQdax.js +0 -316
  91. package/dist/MemberList-CANkPyR0.js +0 -1733
  92. package/dist/MemberTransactions-CcCa21fY.js +0 -38
  93. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-Dh3naMXv.js +0 -1753
  94. package/dist/Segment-Clstp5D-.js +0 -437
  95. package/dist/Store-PnpBvIoo.js +0 -1511
  96. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CrDhK2dt.js +0 -890
  97. package/dist/dto-B20bsdh6.js +0 -2770
  98. package/dist/index-BUCjM4jq.js +0 -29193
  99. package/dist/index-Ceu2PcnH.js +0 -206
  100. package/dist/index-CuvNtC_M.js +0 -61
  101. package/dist/index-D3DAgTFI.js +0 -762
  102. package/dist/index-Kjelmo0Y.js +0 -298
  103. package/dist/money-CmR3-qMz.js +0 -15
  104. package/dist/number-CZlrO6Sq.js +0 -12
  105. package/dist/usePagination-BeF5K3M7.js +0 -223
  106. package/dist/user-Bm4KttFq.js +0 -37
@@ -1,11 +1,11 @@
1
1
  import { defineComponent as P, ref as R, onMounted as Q, computed as H, resolveComponent as y, openBlock as s, createElementBlock as x, renderSlot as W, toDisplayString as A, createCommentVNode as v, createBlock as f, unref as e, isRef as q, createVNode as b, normalizeClass as G, watch as X, withCtx as F, resolveDynamicComponent as D, Fragment as _, createElementVNode as h, createTextVNode as ee } from "vue";
2
- import { z as te } from "./app-zO552-Dl.js";
2
+ import { z as te } from "./app-ZePrUEIY.js";
3
3
  import { Z as u } from "./zod-Bg2FbC-D.js";
4
- import { g as le, h as oe } from "./index-JBp0chol.js";
5
- import { u as Z } from "./vue-i18n-UKlvivrG.js";
6
- import { s as O } from "./effect-D8y0J47O.js";
7
- import { p as ae } from "./loading-60xYxow_.js";
8
- import { I as ne } from "./app-BVaQwBvq.js";
4
+ import { f as le, g as oe } from "./index-D_sLK5cZ.js";
5
+ import { u as Z } from "./vue-i18n-CTdcKDi0.js";
6
+ import { s as O } from "./effect-CWSFIfZh.js";
7
+ import { p as ae } from "./loading-DxppIZmv.js";
8
+ import { I as ne } from "./app-BkSGMADw.js";
9
9
  const ie = { class: "flex flex-col gap-8" }, se = {
10
10
  key: 0,
11
11
  class: "fm-typo-en-body-lg-600"
@@ -339,7 +339,7 @@ const ie = { class: "flex flex-col gap-8" }, se = {
339
339
  }
340
340
  });
341
341
  export {
342
- Ae as _,
342
+ re as _,
343
343
  he as a,
344
- re as b
344
+ Ae as b
345
345
  };
@@ -1,15 +1,15 @@
1
1
  import { defineComponent as D, ref as S, computed as E, onMounted as U, resolveComponent as i, openBlock as m, createElementBlock as _, Fragment as x, createVNode as c, unref as t, createElementVNode as n, withCtx as h, renderList as j, createBlock as w, resolveDynamicComponent as M, toDisplayString as p, h as H } from "vue";
2
2
  import { _ as q } from "./campaign-CpzFl8Vr.js";
3
3
  import { useDialog as z, components as G } from "@feedmepos/ui-library";
4
- import { u as J, p as Q } from "./loading-60xYxow_.js";
5
- import { u as W } from "./business-BSl6NSdS.js";
6
- import { u as X } from "./campaign-CxN6mq_l.js";
7
- import { g as L, b as V } from "./dto-B20bsdh6.js";
8
- import { u as Y } from "./vue-i18n-UKlvivrG.js";
4
+ import { u as J, p as Q } from "./loading-DxppIZmv.js";
5
+ import { u as W } from "./business-CG7GnAu5.js";
6
+ import { u as X } from "./campaign-DFvmN5Ky.js";
7
+ import { g as L, a as V } from "./campaign-BSH9FJHx.js";
8
+ import { u as Y } from "./vue-i18n-CTdcKDi0.js";
9
9
  import { _ as Z } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
10
- import { _ as ee } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-BtI2rY4y.js";
11
- import { u as te } from "./template-9StyN-b7.js";
12
- import { c as g } from "./index-C_WyKCqN.js";
10
+ import { _ as ee } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-CxxmBzPu.js";
11
+ import { u as te } from "./template-NVFsa0l_.js";
12
+ import { c as g } from "./index-D4FT-dGm.js";
13
13
  const oe = { class: "px-24 flex flex-col gap-y-16" }, ae = { class: "flex items-center justify-between w-full" }, ne = { class: "flex gap-8 overflow-x-auto" }, se = { class: "space-y-8" }, re = { class: "flex w-full gap-4 items-center" }, ce = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ie = { class: "space-y-4" }, le = { class: "fm-typo-en-body-lg-600" }, me = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, pe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, de = { class: "flex flex-col gap-16 text-center" }, ue = { class: "fm-typo-en-title-sm-800" }, fe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ve = /* @__PURE__ */ D({
14
14
  __name: "Experience",
15
15
  setup(ye) {
@@ -1,15 +1,15 @@
1
- import { defineComponent as D, ref as A, computed as H, onMounted as N, resolveComponent as r, openBlock as d, createElementBlock as x, Fragment as b, createVNode as i, unref as o, withCtx as h, createElementVNode as n, toDisplayString as l, renderList as q, createBlock as v, resolveDynamicComponent as z, h as p } from "vue";
1
+ import { defineComponent as D, ref as A, computed as H, onMounted as N, resolveComponent as r, openBlock as d, createElementBlock as x, Fragment as v, createVNode as i, unref as o, withCtx as h, createElementVNode as n, toDisplayString as l, renderList as q, createBlock as b, resolveDynamicComponent as z, h as p } from "vue";
2
2
  import { _ as J } from "./campaign-CpzFl8Vr.js";
3
3
  import { useDialog as O, components as C } from "@feedmepos/ui-library";
4
- import { u as Q, a as W, p as X } from "./loading-60xYxow_.js";
5
- import { u as Y } from "./business-BSl6NSdS.js";
6
- import { u as Z } from "./campaign-CxN6mq_l.js";
7
- import { g as B, b as $ } from "./dto-B20bsdh6.js";
4
+ import { u as Q, a as W, p as X } from "./loading-DxppIZmv.js";
5
+ import { u as Y } from "./business-CG7GnAu5.js";
6
+ import { u as Z } from "./campaign-DFvmN5Ky.js";
7
+ import { g as B, a as $ } from "./campaign-BSH9FJHx.js";
8
8
  import { _ as ee } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
9
- import { _ as te } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-BtI2rY4y.js";
10
- import { u as oe } from "./template-9StyN-b7.js";
11
- import { u as ae } from "./vue-i18n-UKlvivrG.js";
12
- import { c as w } from "./index-C_WyKCqN.js";
9
+ import { _ as te } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-CxxmBzPu.js";
10
+ import { u as oe } from "./template-NVFsa0l_.js";
11
+ import { u as ae } from "./vue-i18n-CTdcKDi0.js";
12
+ import { c as w } from "./index-D4FT-dGm.js";
13
13
  const ne = { class: "flex items-center" }, se = { class: "fm-typo-en-title-md-600 fm-step-title line-clamp-2 mr-8" }, ie = { class: "px-24 flex flex-col gap-y-16" }, re = { class: "flex items-center justify-between w-full" }, le = { class: "flex gap-8 overflow-x-auto" }, ce = { class: "space-y-8" }, me = { class: "flex w-full gap-4 items-center" }, de = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, pe = { class: "space-y-4" }, ue = { class: "fm-typo-en-body-lg-600" }, fe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ge = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ye = { class: "flex flex-col gap-16 text-center" }, _e = { class: "fm-typo-en-title-sm-800" }, he = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, $e = /* @__PURE__ */ D({
14
14
  __name: "Game",
15
15
  setup(we) {
@@ -130,7 +130,7 @@ const ne = { class: "flex items-center" }, se = { class: "fm-typo-en-title-md-60
130
130
  });
131
131
  }), (e, t) => {
132
132
  const u = r("FmPill"), _ = r("FmPageHead"), L = r("FmSearch"), I = r("FmTable"), P = r("FmButton"), T = r("FmListItem"), U = r("FmList"), j = r("FmCard");
133
- return d(), x(b, null, [
133
+ return d(), x(v, null, [
134
134
  i(_, {
135
135
  actions: o(g).length > 0 && o(f).isPremium ? [E] : [],
136
136
  "onClick:action": t[0] || (t[0] = () => y())
@@ -151,7 +151,7 @@ const ne = { class: "flex items-center" }, se = { class: "fm-typo-en-title-md-60
151
151
  placeholder: "search",
152
152
  collapsible: ""
153
153
  }, null, 8, ["modelValue"]),
154
- o(m).campaigns.token && o(m).campaigns.token.length > 0 ? (d(), x(b, { key: 0 }, [
154
+ o(m).campaigns.token && o(m).campaigns.token.length > 0 ? (d(), x(v, { key: 0 }, [
155
155
  n("div", re, [
156
156
  n("div", le, [
157
157
  i(ee, {
@@ -183,9 +183,9 @@ const ne = { class: "flex items-center" }, se = { class: "fm-typo-en-title-md-60
183
183
  }, null, 8, ["row-data", "search-value", "hide-footer"]),
184
184
  i(U, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
185
185
  default: h(() => [
186
- (d(!0), x(b, null, q(o(g).filter(
186
+ (d(!0), x(v, null, q(o(g).filter(
187
187
  (a) => a.name.toLowerCase().includes(o(s).searchKey.toLowerCase())
188
- ), (a) => (d(), v(T, {
188
+ ), (a) => (d(), b(T, {
189
189
  key: a._id.toString(),
190
190
  onClick: (V) => y(a),
191
191
  class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
@@ -193,7 +193,7 @@ const ne = { class: "flex items-center" }, se = { class: "fm-typo-en-title-md-60
193
193
  default: h(() => [
194
194
  n("div", ce, [
195
195
  n("div", me, [
196
- (d(), v(z(o(B)(a)))),
196
+ (d(), b(z(o(B)(a)))),
197
197
  n("div", de, l(a.currentReceive ?? 0) + " used ", 1)
198
198
  ]),
199
199
  n("div", pe, [
@@ -216,7 +216,7 @@ const ne = { class: "flex items-center" }, se = { class: "fm-typo-en-title-md-60
216
216
  ]),
217
217
  _: 1
218
218
  })
219
- ], 64)) : (d(), v(j, {
219
+ ], 64)) : (d(), b(j, {
220
220
  key: 1,
221
221
  variant: "outlined",
222
222
  class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
@@ -0,0 +1,255 @@
1
+ import { defineComponent as U, ref as g, watch as O, onMounted as N, resolveComponent as c, openBlock as b, createBlock as j, withCtx as P, createTextVNode as z, createElementVNode as d, createVNode as o, unref as e, createElementBlock as F, createCommentVNode as W, toDisplayString as I, normalizeClass as G, computed as $, Fragment as q, isRef as J } from "vue";
2
+ import { u as H } from "./vue-i18n-CTdcKDi0.js";
3
+ import "./index-RhGXDJ8R.js";
4
+ import { useRouter as K } from "vue-router";
5
+ import { f as V, p as Q, u as X } from "./loading-DxppIZmv.js";
6
+ import { u as Y, _ as Z } from "./RewardGroup.vue_vue_type_script_setup_true_lang-UP4KtCK2.js";
7
+ import { useDialog as ee, useSnackbar as ae, FmButtonVariant as p } from "@feedmepos/ui-library";
8
+ import { r as L } from "./index-CMEY40F9.js";
9
+ import { u as ne } from "./reward-Qjelc0jm.js";
10
+ import { u as oe } from "./business-CG7GnAu5.js";
11
+ import { u as te } from "./membership-DIBN0bog.js";
12
+ import { R as S } from "./app-ZePrUEIY.js";
13
+ const re = { class: "space-y-24" }, le = {
14
+ key: 0,
15
+ class: /* @__PURE__ */ G([
16
+ "p-16 pl-24 space-x-8",
17
+ "bg-fm-color-primary-oats rounded-lg",
18
+ "flex items-center",
19
+ "justify-between"
20
+ ])
21
+ }, ie = { key: 1 }, se = {
22
+ key: 2,
23
+ class: /* @__PURE__ */ G([
24
+ "flex items-center",
25
+ "border border-fm-color-neutral-gray-300",
26
+ "p-16 space-x-16 rounded-md"
27
+ ])
28
+ }, de = { class: "fm-typo-en-body-lg-400 flex-1" }, ce = { class: "flex justify-end space-x-8 w-full" }, ue = /* @__PURE__ */ U({
29
+ __name: "TermAndConditionDialog",
30
+ props: {
31
+ modelValue: { type: Boolean }
32
+ },
33
+ emits: ["update:modelValue"],
34
+ setup(B, { emit: T }) {
35
+ const y = B;
36
+ ee();
37
+ const i = ae(), { t: s } = H(), l = Y(), { minor: _ } = X, u = g(!1), k = T, t = g(null), w = g(null);
38
+ async function x() {
39
+ if (!t.value) {
40
+ i.open({
41
+ type: "error",
42
+ title: "Please upload a file"
43
+ });
44
+ return;
45
+ }
46
+ _(
47
+ async () => {
48
+ u.value = !0;
49
+ const n = await V.update(
50
+ V.referralTermAndConditionPath(),
51
+ t.value
52
+ ), a = l.referralProgram;
53
+ a.term_and_condition = n, await L.update(a), u.value = !1, v();
54
+ },
55
+ {
56
+ successMessage: "Term and Condition uploaded successfully"
57
+ }
58
+ );
59
+ }
60
+ async function h() {
61
+ await Q.confirm(
62
+ "Are you sure you want to remove the term and condition?"
63
+ ) && _(
64
+ async () => {
65
+ u.value = !0, await V.delete(
66
+ V.referralTermAndConditionPath()
67
+ );
68
+ const a = l.referralProgram;
69
+ a.term_and_condition = void 0, await L.update(a), u.value = !1, v();
70
+ },
71
+ {
72
+ successMessage: "Term and Condition removed successfully"
73
+ }
74
+ );
75
+ }
76
+ function v() {
77
+ t.value = null, k("update:modelValue", !1);
78
+ }
79
+ function r() {
80
+ var n;
81
+ window.open((n = l.referralProgram) == null ? void 0 : n.term_and_condition, "_blank");
82
+ }
83
+ return O(
84
+ () => y.modelValue,
85
+ (n) => {
86
+ t.value = null;
87
+ }
88
+ ), N(() => {
89
+ }), (n, a) => {
90
+ const R = c("FmButton"), A = c("FmDropField"), m = c("fm-button"), E = c("fm-dialog");
91
+ return b(), j(E, {
92
+ "model-value": n.modelValue,
93
+ "onUpdate:modelValue": a[3] || (a[3] = (C) => n.$emit("update:modelValue", C)),
94
+ "dismiss-away": ""
95
+ }, {
96
+ "dialog-header": P(() => a[4] || (a[4] = [
97
+ z("Upload Term and Condition")
98
+ ])),
99
+ "dialog-footer": P(() => [
100
+ d("div", ce, [
101
+ o(m, {
102
+ variant: e(p).Tertiary,
103
+ label: e(s)("Cancel"),
104
+ onClick: v
105
+ }, null, 8, ["variant", "label"]),
106
+ o(m, {
107
+ variant: e(p).Primary,
108
+ class: "ml-auto mr-8",
109
+ label: e(s)("Save"),
110
+ loading: e(u),
111
+ onClick: x
112
+ }, null, 8, ["variant", "label", "loading"])
113
+ ])
114
+ ]),
115
+ default: P(() => {
116
+ var C;
117
+ return [
118
+ d("div", re, [
119
+ (C = e(l).referralProgram) != null && C.term_and_condition ? (b(), F("div", le, [
120
+ o(R, {
121
+ label: e(s)("View uploaded file"),
122
+ variant: e(p).Plain,
123
+ icon: "file_present",
124
+ onClick: r
125
+ }, null, 8, ["label", "variant"]),
126
+ o(R, {
127
+ variant: e(p).Plain,
128
+ icon: "delete",
129
+ onClick: h
130
+ }, null, 8, ["variant"])
131
+ ])) : W("", !0),
132
+ e(t) ? (b(), F("div", se, [
133
+ o(m, {
134
+ variant: e(p).Tertiary,
135
+ "prepend-icon": "attach_file"
136
+ }, null, 8, ["variant"]),
137
+ d("p", de, I(e(t).name), 1),
138
+ d("label", {
139
+ ref_key: "fileLabelRef",
140
+ ref: w,
141
+ htmlFor: "file"
142
+ }, [
143
+ o(m, {
144
+ variant: e(p).Plain,
145
+ label: e(s)("Replace File"),
146
+ onClick: a[1] || (a[1] = () => {
147
+ var f;
148
+ return (f = e(w)) == null ? void 0 : f.click();
149
+ })
150
+ }, null, 8, ["variant", "label"]),
151
+ d("input", {
152
+ id: "file",
153
+ accept: ".pdf",
154
+ class: "hidden",
155
+ type: "file",
156
+ onChange: a[2] || (a[2] = (f) => {
157
+ var D, M;
158
+ return t.value = ((M = (D = f.target) == null ? void 0 : D.files) == null ? void 0 : M[0]) ?? null;
159
+ })
160
+ }, null, 32)
161
+ ], 512)
162
+ ])) : (b(), F("div", ie, [
163
+ o(A, {
164
+ onFileUpload: a[0] || (a[0] = (f) => t.value = f),
165
+ accept: ".pdf",
166
+ "max-file-size": 8e6
167
+ })
168
+ ]))
169
+ ])
170
+ ];
171
+ }),
172
+ _: 1
173
+ }, 8, ["model-value"]);
174
+ };
175
+ }
176
+ }), me = { class: "flex items-center" }, fe = { class: "fm-typo-en-title-md-600 fm-step-title line-clamp-2 mr-8" }, pe = { class: "px-24 flex flex-col gap-y-16 pb-24" }, ke = /* @__PURE__ */ U({
177
+ __name: "Index",
178
+ setup(B) {
179
+ const T = ne(), y = g(null), { t: i } = H(), s = K(), l = g(!1), _ = oe(), u = te(), k = $(() => _.isPremium ? [
180
+ {
181
+ label: i("connect.referral.actions.terms"),
182
+ value: "term_and_condition"
183
+ },
184
+ {
185
+ label: i("connect.referral.actions.manage_reward"),
186
+ value: "manage_reward"
187
+ },
188
+ {
189
+ label: i("connect.referral.actions.add_referral_tier"),
190
+ value: "add_referral_tier",
191
+ prependIcon: "add",
192
+ isPrimary: !0
193
+ }
194
+ ] : []), t = [
195
+ {
196
+ label: i("connect.referral.tabs.overview"),
197
+ value: S["$connect-REFERRAL_OVERVIEW"],
198
+ actions: []
199
+ },
200
+ {
201
+ label: i("connect.referral.tabs.record"),
202
+ value: S["$connect-REFERRAL_RECORD"],
203
+ actions: []
204
+ }
205
+ ], w = $(() => t.find((r) => r.value === s.currentRoute.value.name) ?? t[0]);
206
+ async function x(r) {
207
+ await s.push({ name: r });
208
+ }
209
+ async function h(r) {
210
+ var n;
211
+ r === "add_referral_tier" && ((n = y.value) == null || n.onManageRewardGroup(-1)), r === "manage_reward" && await s.push({ name: S["$connect-REWARD_TEMPLATE"] }), r === "term_and_condition" && v();
212
+ }
213
+ async function v() {
214
+ l.value = !0;
215
+ }
216
+ return N(async () => {
217
+ await T.readRewards(), await _.readPremium(), await u.readSegments();
218
+ }), (r, n) => {
219
+ const a = c("FmPill"), R = c("FmPageHead"), A = c("FmTabs"), m = c("RouterView");
220
+ return b(), F(q, null, [
221
+ o(R, {
222
+ actions: e(k),
223
+ "onClick:action": h
224
+ }, {
225
+ title: P(() => [
226
+ d("div", me, [
227
+ d("span", fe, I(e(i)("connect.referral.title")), 1),
228
+ o(a, { variant: "premium" })
229
+ ])
230
+ ]),
231
+ _: 1
232
+ }, 8, ["actions"]),
233
+ d("div", pe, [
234
+ o(A, {
235
+ "model-value": e(w).value,
236
+ items: t,
237
+ "onUpdate:modelValue": x
238
+ }, null, 8, ["model-value"]),
239
+ o(m)
240
+ ]),
241
+ o(ue, {
242
+ modelValue: e(l),
243
+ "onUpdate:modelValue": n[0] || (n[0] = (E) => J(l) ? l.value = E : null)
244
+ }, null, 8, ["modelValue"]),
245
+ o(Z, {
246
+ ref_key: "rewardGroupRef",
247
+ ref: y
248
+ }, null, 512)
249
+ ], 64);
250
+ };
251
+ }
252
+ });
253
+ export {
254
+ ke as default
255
+ };