@feedmepos/mf-connect 0.1.98-beta.62 → 0.1.98-beta.64

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 (118) hide show
  1. package/dist/{App-BrL2gHiV.js → App-CtffRQrW.js} +8 -8
  2. package/dist/{AuditLogs-BlRoAtoO.js → AuditLogs-DfirBV8X.js} +11 -11
  3. package/dist/{Bin-DWR53mGv.js → Bin-Dfa4iNvO.js} +8 -8
  4. package/dist/{Broadcast-BZ2y0x8d.js → Broadcast-DkAOQvPN.js} +11 -11
  5. package/dist/{CampaignAnalytic-DB2OaPV_.js → CampaignAnalytic-DLi5kQIQ.js} +7 -7
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Bs1_gtk6.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DMvICHuX.js} +6 -6
  7. package/dist/{Card-B6faC6Qm.js → Card-CiobWYrb.js} +21 -21
  8. package/dist/{Collections-DekhPkTs.js → Collections-rX-vZ_0P.js} +8 -8
  9. package/dist/{Credit-BwOLA7a6.js → Credit-DMlB7vDg.js} +12 -12
  10. package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-DCNKIlok.js → DateRangeChip.vue_vue_type_script_setup_true_lang-Ct3uQ2w6.js} +1 -1
  11. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-D07yq8hu.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-M0UISWsm.js} +35 -35
  12. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-CaEBp-Qj.js → EffectSheet.vue_vue_type_style_index_0_lang-GSUNbPA5.js} +6 -6
  13. package/dist/{Experience-DiW76Zyj.js → Experience-BvuU6Be3.js} +12 -12
  14. package/dist/{FileSaver.min-CzzDHyEW.js → FileSaver.min-D2YYiygq.js} +1 -1
  15. package/dist/{Game-CHZZ26td.js → Game-BZ04SlgS.js} +13 -13
  16. package/dist/GiftCardSetup-cw__J6kw.js +734 -0
  17. package/dist/{Grab-DyjMfGLW.js → Grab-CyS-LaQS.js} +9 -9
  18. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-B_Fl95PN.js → ImageInput.vue_vue_type_script_setup_true_lang-BWdt-Ad6.js} +1 -1
  19. package/dist/{Index-DVctjU8T.js → Index-Dc68nCXK.js} +10 -10
  20. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-CJcDgM1A.js → LocationPicker.vue_vue_type_script_setup_true_lang-BhfA3Bzo.js} +1 -1
  21. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-B8q8mLiv.js → LottieAnimation.vue_vue_type_script_setup_true_lang-Cgz6mntl.js} +1 -1
  22. package/dist/{LoyaltyDashboard-C695q1A0.js → LoyaltyDashboard-D63DEfWg.js} +13 -13
  23. package/dist/{MainLayout-DLr0qfQy.js → MainLayout-eOO-4CwG.js} +3 -3
  24. package/dist/{Marketing-DtJwIJT1.js → Marketing-0D2_Z38Q.js} +4 -4
  25. package/dist/{MarketingMaterialEdit-Dxq4Thqp.js → MarketingMaterialEdit-DmsSt9GG.js} +6 -6
  26. package/dist/{Member-DLY-tqMO.js → Member-CElRICK5.js} +7 -7
  27. package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-DaXSO2Sw.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-USdASrA5.js} +23 -23
  28. package/dist/{MemberImportHistory-BllKLK-J.js → MemberImportHistory-BiQ-Na3J.js} +7 -7
  29. package/dist/{MemberList-Cw9OUWN0.js → MemberList-DOz2dBHB.js} +14 -14
  30. package/dist/{MemberTransactions-OBVrKAdH.js → MemberTransactions-BjLjjx8W.js} +1 -1
  31. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-BBg9ZmEZ.js → MessageInput.vue_vue_type_script_setup_true_lang-B5dO9GNe.js} +3706 -3628
  32. package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-DWP4DTE8.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-DSjqdgdQ.js} +1 -1
  33. package/dist/{Mission-2yRMXtq_.js → Mission-BtgvlGX1.js} +13 -13
  34. package/dist/{Overview-B4OGaAQs.js → Overview-DWw-tslW.js} +19 -19
  35. package/dist/{Overview-C6GQR5Be.js → Overview-DngjgWqB.js} +4 -4
  36. package/dist/{Point-BHByUBQy.js → Point-DAE7MH6q.js} +12 -12
  37. package/dist/{Promotion-DHOf5B8h.js → Promotion-B7seCmaE.js} +13 -13
  38. package/dist/{Queue-DMQs5RXl.js → Queue-GffqIZEb.js} +11 -11
  39. package/dist/{Record-DgT-afmi.js → Record-Q-g916Ar.js} +9 -9
  40. package/dist/{Review-BgOyos-p.js → Review-GtdA90h2.js} +2 -2
  41. package/dist/{ReviewFacebookCallback-BYCLYoU9.js → ReviewFacebookCallback-BTqEmJ1o.js} +5 -5
  42. package/dist/{ReviewGoogleCallback-B5IBSCOt.js → ReviewGoogleCallback-nP54b5tI.js} +5 -5
  43. package/dist/{Reward-DhcO5T8x.js → Reward-Dmmf8Dwz.js} +16 -16
  44. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-BXk_SS1d.js → RewardGroup.vue_vue_type_script_setup_true_lang-CnkbMIFV.js} +12 -12
  45. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-DPFXFu8i.js → RuleGroup.vue_vue_type_script_setup_true_lang-BgeitBEs.js} +13 -13
  46. package/dist/{Segment-BM7-ufMg.js → Segment-Bzh2rifD.js} +24 -24
  47. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-BbiZ4qOP.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-DJFXM--f.js} +21 -21
  48. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-BArVHth8.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BEoU8Aio.js} +4 -4
  49. package/dist/{Setting-BOPSL9ZZ.js → Setting-5s3D02Or.js} +14 -14
  50. package/dist/{SettingAdvertisements-cPCVcdFa.js → SettingAdvertisements-DgriXyH0.js} +12 -12
  51. package/dist/{Settings-CqoifGTo.js → Settings-_pz7CNiJ.js} +5 -5
  52. package/dist/{Store-CK30TAU9.js → Store-CLTKiGIX.js} +25 -25
  53. package/dist/{StoreRewards-ChZtmuzE.js → StoreRewards-CK_D-WAb.js} +15 -15
  54. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-DYNiShwp.js → StoreTransactions.vue_vue_type_script_setup_true_lang-Cj2Hkiqu.js} +24 -24
  55. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-BHlC1EE4.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-DdWDtJyt.js} +2 -2
  56. package/dist/{Tier-CF2KJhuH.js → Tier-DtDec1lr.js} +1349 -1200
  57. package/dist/{Title-BqUR8e6x.js → Title-Zt5zkLdJ.js} +21 -21
  58. package/dist/{Transaction-Cf5o_1V3.js → Transaction-Ci-xLkvl.js} +2 -2
  59. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CfArdf8F.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BtKY4Q8F.js} +6 -6
  60. package/dist/{Voucher-BPOp4ic5.js → Voucher-mjk699yf.js} +14 -14
  61. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-BZmGNLq1.js → VoucherEditor.vue_vue_type_script_setup_true_lang-B8x6nMOh.js} +12 -12
  62. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DrZ11Ra6.js → ZodTextField.vue_vue_type_script_setup_true_lang-D6QnMWp2.js} +2 -2
  63. package/dist/{app-DJZhbUaQ.js → app-CH7HMBJQ.js} +315 -200
  64. package/dist/app.js +1 -1
  65. package/dist/{base.export-CoTF6Joo.js → base.export-CuvFLpFW.js} +2 -2
  66. package/dist/{business-COH4ZPme.js → business-CnOYv8DS.js} +1 -1
  67. package/dist/{campaign-VQNSG0W_.js → campaign-DNrIS6NC.js} +2 -2
  68. package/dist/{campaign-8u-VUYGh.js → campaign-DkHsXmL0.js} +9 -9
  69. package/dist/{campaign.enum-DPrWb8U2.js → campaign.enum-q1sr8Bhv.js} +1 -1
  70. package/dist/{campaign.fn-D888JeGT.js → campaign.fn-CMwpdrwZ.js} +37 -37
  71. package/dist/{collectible.enum-DvSb1Y88.js → collectible.enum-BF7PSWOG.js} +1 -1
  72. package/dist/{collection.fn-BwIWKhBK.js → collection.fn-CYBe09oo.js} +2 -2
  73. package/dist/{currency-Hgkd5sh7.js → currency-DmEbp70U.js} +1 -1
  74. package/dist/{duplicateCampaign-Dn25VCVj.js → duplicateCampaign-Cg6_b-gf.js} +2 -2
  75. package/dist/{effect-BwgQpATD.js → effect-CRH8rWiv.js} +1 -1
  76. package/dist/{email-addresses-C1vr0Uy5.js → email-addresses-DgKQg--d.js} +2 -2
  77. package/dist/{helper-zfXDm3Jk.js → helper-D30GWMba.js} +1 -1
  78. package/dist/{index-grYhqqn8.js → index-83L2Y4tl.js} +7 -7
  79. package/dist/{index-CwCYEijW.js → index-B3nFVSSk.js} +1 -1
  80. package/dist/{index-CkIQalwo.js → index-BGi1cCOL.js} +3 -3
  81. package/dist/{index-CacUcTSI.js → index-BQuvtdoE.js} +644 -530
  82. package/dist/{index-D4XMwqKT.js → index-BpIMfA-V.js} +1 -1
  83. package/dist/{index-C2tPMx3P.js → index-BqNAdbE4.js} +2 -2
  84. package/dist/{index-zZTsUIci.js → index-BwsdR_0F.js} +1 -1
  85. package/dist/{index-xzDzb0T3.js → index-C6LaQrNc.js} +21 -8
  86. package/dist/{index-DlPAztwX.js → index-C6xzoOy-.js} +3 -3
  87. package/dist/{index-C9Q3V8R9.js → index-CeCvP4Qn.js} +1 -1
  88. package/dist/{index-CABF2-Io.js → index-Cxm_4FWq.js} +18 -17
  89. package/dist/{index-C5hBS5HZ.js → index-D57FrbtB.js} +2 -2
  90. package/dist/{index-eEMXtCiV.js → index-DXucshPo.js} +2 -2
  91. package/dist/{index-Vv1-II8J.js → index-Dc8Xhg3N.js} +1 -1
  92. package/dist/{index-7vDEWDqs.js → index-DdZyeLrQ.js} +3 -3
  93. package/dist/{index-lrP5VxZd.js → index-DfXr0uLB.js} +7 -7
  94. package/dist/{index-Buh_J_zJ.js → index-hE-xlzBQ.js} +9 -9
  95. package/dist/{index-DqEB7W_r.js → index-jG05ZUVv.js} +1 -1
  96. package/dist/{index.esm2017-BlBA0-BF.js → index.esm2017-CExjOS8E.js} +37 -37
  97. package/dist/{loading-CI7gmifv.js → loading-B7DkH2Je.js} +1 -1
  98. package/dist/{lodash-kft-Uy7N.js → lodash-qMYD0DVv.js} +1 -1
  99. package/dist/{member-import-BTr0LEYS.js → member-import-nn0b_oiD.js} +1 -1
  100. package/dist/{membership-Cqia6d3x.js → membership-BL7Kn2_b.js} +3 -3
  101. package/dist/{money-bl2w3oEQ.js → money-NmSgYnOE.js} +1 -1
  102. package/dist/{number-Ckzx623S.js → number-DjJ2VePQ.js} +1 -1
  103. package/dist/{objectid-CwK8XcuH.js → objectid-CZduzNsv.js} +11 -11
  104. package/dist/{plugins-DzWEv3_R.js → plugins-DmVA8cVM.js} +3 -3
  105. package/dist/{reward-S5B2MbnJ.js → reward-BocZrgwg.js} +1 -1
  106. package/dist/{rule-2k1mrjlc.js → rule-C-zfWryy.js} +8 -8
  107. package/dist/{template-DS_X-0yV.js → template-3c7in4R6.js} +6 -6
  108. package/dist/{timezone-ByZC3NaX.js → timezone-9ngVdIwe.js} +1 -1
  109. package/dist/{transaction.fn-CmS0f0MN.js → transaction.fn-DcmSzzVd.js} +1 -1
  110. package/dist/{trigger-uYmkCUpm.js → trigger-DlPNCQzi.js} +5 -5
  111. package/dist/{useMarketingMaterialActions-D9hFiGQL.js → useMarketingMaterialActions-CCDLD1mF.js} +3 -3
  112. package/dist/{usePagination-NBKbsZ4_.js → usePagination-BN5jE0uu.js} +1 -1
  113. package/dist/{user-cCAfW4S5.js → user-D9HbnfKg.js} +1 -1
  114. package/dist/{vue-i18n-BzjgwVzt.js → vue-i18n-CUH4qQvz.js} +313 -313
  115. package/dist/{xlsx-DiFT4U5o.js → xlsx-D6t8-Kk0.js} +224 -224
  116. package/dist/{zod-6HGtPTQu.js → zod-BHeikUG_.js} +1 -1
  117. package/package.json +1 -1
  118. package/dist/GiftCardSetup-D573F-re.js +0 -662
@@ -0,0 +1,734 @@
1
+ import { defineComponent as lt, computed as p, ref as d, onMounted as at, resolveComponent as x, openBlock as u, createElementBlock as m, unref as e, createBlock as J, createCommentVNode as g, createElementVNode as n, createVNode as r, toDisplayString as s, withCtx as P, isRef as b, Fragment as R, renderList as K, normalizeClass as Y, withDirectives as st, withKeys as rt, vModelText as ct, createTextVNode as de } from "vue";
2
+ import { u as it } from "./loading-B7DkH2Je.js";
3
+ import { u as dt } from "./app-wDQR6dpb.js";
4
+ import { n as E, f as L } from "./plugins-DmVA8cVM.js";
5
+ import "./index-CeCvP4Qn.js";
6
+ import { g as ue } from "./index-B3nFVSSk.js";
7
+ import { c as ut } from "./index-DXucshPo.js";
8
+ import { S as mt } from "./index-BqNAdbE4.js";
9
+ import { a as ft } from "./MessageInput.vue_vue_type_script_setup_true_lang-B5dO9GNe.js";
10
+ import { J as pt } from "./JsonViewer-v8_C7l5N.js";
11
+ import { r as Q, s as Ee, t as vt, u as gt, v as yt, G as W, w as bt, x as _t, y as Fe, z as me, A as xt } from "./index-BQuvtdoE.js";
12
+ import { u as Ct } from "./vue-i18n-CUH4qQvz.js";
13
+ import { useRouter as ht, useRoute as At } from "vue-router";
14
+ import { R as Dt } from "./app-CH7HMBJQ.js";
15
+ var Mt = { authUrl: "https://portal-v2-dev.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "feedmedev.vip", crmUrl: "crm.feedmedev.cc", paymentPortalUrl: "https://portal.feedmedev.cc/payment/payout-account", licensePortalUrl: "https://license.feedmedev.cc/", marketingV1Portal: "https://marketing-v1.feedmedev.cc", voucherAppUrl: "https://voucher.feedmedev.cc/" };
16
+ const Et = { class: "px-24 pb-40" }, Ft = { class: "flex items-start gap-12 py-24" }, Tt = { class: "flex flex-col gap-4" }, kt = { class: "fm-typo-en-title-md-800 text-fm-color-typo-primary" }, wt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, St = { class: "flex flex-col gap-16 max-w-[860px]" }, Nt = { class: "flex gap-12" }, Ut = { class: "flex flex-col gap-4" }, Vt = { class: "fm-typo-en-body-lg-600" }, It = { class: "flex gap-12" }, Pt = { class: "flex flex-col gap-4" }, Rt = { class: "fm-typo-en-body-lg-600" }, Lt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Gt = { class: "flex flex-wrap items-start gap-12" }, Ht = ["src"], $t = ["aria-label", "title", "onClick"], Ot = { class: "absolute bottom-4 left-4 px-8 py-2 rounded-sm bg-fm-color-neutral-white fm-typo-en-body-sm-600" }, Xt = { class: "flex gap-12" }, Bt = { class: "flex flex-col gap-4" }, zt = { class: "fm-typo-en-body-lg-600" }, jt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Jt = { class: "flex flex-col gap-8" }, Kt = ["onClick"], Wt = {
17
+ key: 0,
18
+ class: "w-[9px] h-[9px] rounded-full bg-fm-color-primary"
19
+ }, Zt = { class: "flex-1" }, qt = { class: "block fm-typo-en-body-md-600" }, Yt = { class: "block fm-typo-en-body-md-400 text-fm-color-typo-secondary mt-2" }, Qt = {
20
+ key: 0,
21
+ class: "grid sm:grid-cols-2 gap-16"
22
+ }, eo = {
23
+ key: 1,
24
+ class: "fm-typo-en-body-sm-400 text-fm-color-typo-error"
25
+ }, to = { class: "flex items-center gap-16 p-16 rounded-md bg-fm-color-neutral-gray-100" }, oo = { class: "flex flex-col gap-2 flex-1 min-w-0" }, no = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-tertiary" }, lo = { class: "fm-typo-en-body-lg-600 truncate" }, ao = { class: "flex gap-12" }, so = { class: "flex flex-col gap-4" }, ro = { class: "fm-typo-en-body-lg-600" }, co = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, io = { class: "flex flex-col gap-8" }, uo = { class: "fm-typo-en-body-md-600" }, mo = { class: "flex flex-wrap gap-8" }, fo = { class: "flex items-start gap-8" }, po = { class: "flex items-center rounded-md border-1 border-fm-color-neutral-gray-300 overflow-hidden" }, vo = ["placeholder", "disabled"], go = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, yo = { class: "text-fm-color-primary" }, bo = { class: "flex items-center gap-12 p-16 rounded-md border-1 border-fm-color-neutral-gray-300" }, _o = { class: "flex-1" }, xo = { class: "fm-typo-en-body-md-600" }, Co = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ho = {
26
+ key: 0,
27
+ class: "flex gap-16"
28
+ }, Ao = {
29
+ key: 1,
30
+ class: "fm-typo-en-body-sm-400 text-fm-color-typo-error"
31
+ }, Do = { class: "flex gap-12" }, Mo = { class: "flex flex-col gap-4" }, Eo = { class: "fm-typo-en-body-lg-600" }, Fo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, To = {
32
+ key: 0,
33
+ class: "flex items-start gap-12 p-16 rounded-md bg-fm-color-system-info-100"
34
+ }, ko = { class: "flex-1 fm-typo-en-body-md-400 text-fm-color-typo-primary" }, wo = { class: "flex items-center gap-12" }, So = { class: "fm-typo-en-body-md-500" }, No = { class: "flex flex-col gap-8" }, Uo = { class: "fm-typo-en-body-md-600" }, Vo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Io = { class: "flex flex-col gap-16 rounded-md border-1 border-fm-color-neutral-gray-300 p-16" }, Po = {
35
+ key: 0,
36
+ class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
37
+ }, Ro = {
38
+ key: 1,
39
+ class: "fm-typo-en-body-sm-400 text-fm-color-typo-error"
40
+ }, Lo = { class: "flex flex-wrap gap-8" }, Go = { class: "fm-typo-en-body-lg-600" }, Ho = {
41
+ key: 0,
42
+ class: "fm-typo-en-body-sm-400 text-fm-color-typo-error"
43
+ }, $o = { class: "flex gap-12" }, Oo = { class: "flex flex-col gap-4" }, Xo = { class: "fm-typo-en-body-lg-600" }, Bo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, zo = { class: "flex flex-wrap items-center gap-8" }, jo = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Jo = {
44
+ key: 1,
45
+ class: "flex items-center gap-12 p-16 rounded-md border-1 border-fm-color-neutral-gray-300"
46
+ }, Ko = { class: "w-40 h-40 rounded-sm flex-none grid place-items-center bg-fm-color-neutral-gray-100" }, Wo = { class: "flex-1 min-w-0" }, Zo = ["href"], qo = {
47
+ key: 0,
48
+ class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary"
49
+ }, Yo = { class: "flex items-center justify-end gap-8 pt-8" }, Te = 5e6, Qo = 5e6, gn = /* @__PURE__ */ lt({
50
+ __name: "GiftCardSetup",
51
+ setup(en) {
52
+ const { t: l } = Ct(), { global: ke, minor: ee } = it, we = ht(), Se = At(), G = p(() => Se.params.id || null), H = p(() => !!G.value), F = d(""), h = d([]);
53
+ let fe = /* @__PURE__ */ new Set();
54
+ const pe = /* @__PURE__ */ new Set(), Ne = /* @__PURE__ */ new Set(["image/png", "image/jpeg", "image/gif"]), A = d("DEFAULT"), $ = d(16), T = d(Q().charset), O = d("GC"), X = d(""), ve = d(0), ge = [10, 20, 30, 50, 100], f = d([]), k = d(""), D = d(!1), w = d(10), S = d(100), ye = d(!1), B = d(!0), N = d(
55
+ Ee()
56
+ ), M = d("SMS"), v = d(["SMS"]), te = d({
57
+ SMS: !0,
58
+ WHATSAPP: !1,
59
+ EMAIL: !1
60
+ }), Z = p(
61
+ () => ["SMS", "WHATSAPP", "EMAIL"].map((t) => ({
62
+ value: t,
63
+ label: l(`connect.store.giftCard.channel${t}`),
64
+ available: te.value[t]
65
+ }))
66
+ ), oe = p({
67
+ get: () => N.value[M.value],
68
+ set: (t) => {
69
+ N.value = {
70
+ ...N.value,
71
+ [M.value]: t
72
+ };
73
+ }
74
+ }), Ue = {
75
+ giftCard: {
76
+ amount: "RM100",
77
+ senderName: "Janey Wong",
78
+ number: "GCUB74IJ432D9KU78T",
79
+ recipientName: "John Doe",
80
+ personalMessage: "Happy birthday!"
81
+ },
82
+ business: { name: "Kopi Haus" }
83
+ }, be = p(
84
+ () => Z.value.filter((t) => !t.available).map((t) => t.label)
85
+ ), Ve = `${Mt.licensePortalUrl}settings?businessId=${mt.businessId}`;
86
+ function Ie(t) {
87
+ if (!(!te.value[t] && !v.value.includes(t)) && (v.value = v.value.includes(t) ? v.value.filter((o) => o !== t) : [...v.value, t], !v.value.includes(M.value))) {
88
+ const o = v.value[0];
89
+ o && (M.value = o);
90
+ }
91
+ }
92
+ async function Pe() {
93
+ try {
94
+ te.value = await ut.readBroadcastChannels();
95
+ } catch (t) {
96
+ console.error("Failed to load notification channel status", t);
97
+ }
98
+ }
99
+ const _ = d("NONE"), z = d(""), U = d(""), _e = d(null), Re = /\.pdf$/i, j = d(null), Le = p(
100
+ () => {
101
+ var t;
102
+ return ((t = j.value) == null ? void 0 : t.name) ?? l("connect.store.giftCard.termsDocument");
103
+ }
104
+ );
105
+ function Ge(t) {
106
+ return t >= 1e6 ? `${(t / 1e6).toFixed(1)} MB` : `${Math.max(1, Math.round(t / 1e3))} KB`;
107
+ }
108
+ const ne = p(
109
+ () => A.value === "ADVANCED" ? {
110
+ ...Q(),
111
+ length: Number($.value),
112
+ charset: T.value,
113
+ prefix: O.value,
114
+ suffix: X.value
115
+ } : Q()
116
+ ), He = p(() => (ve.value, vt(ne.value))), $e = p(
117
+ () => gt(T.value) ?? 1
118
+ ), le = p(
119
+ () => A.value === "ADVANCED" ? yt(ne.value) : null
120
+ ), V = p(
121
+ () => f.value.length >= W
122
+ ), Oe = p(() => [
123
+ ...ge.map((t) => ({ amount: t, custom: !1 })),
124
+ ...f.value.filter((t) => !ge.includes(t)).map((t) => ({ amount: t, custom: !0 }))
125
+ ]);
126
+ function Xe(t) {
127
+ t.custom || !f.value.includes(t.amount) && V.value || xe(t.amount);
128
+ }
129
+ function xe(t) {
130
+ if (f.value.includes(t)) {
131
+ f.value = f.value.filter((o) => o !== t);
132
+ return;
133
+ }
134
+ if (V.value) {
135
+ E.error(
136
+ l("connect.store.giftCard.maxAmounts", {
137
+ max: W
138
+ })
139
+ );
140
+ return;
141
+ }
142
+ f.value = [...f.value, t].sort((o, c) => o - c);
143
+ }
144
+ function Ce() {
145
+ const t = Number(k.value);
146
+ if (!Number.isInteger(t) || t <= 0) {
147
+ E.error(l("connect.store.giftCard.invalidAmount"));
148
+ return;
149
+ }
150
+ if (t > me) {
151
+ E.error(
152
+ l("connect.store.giftCard.amountTooLarge", { max: me })
153
+ );
154
+ return;
155
+ }
156
+ if (f.value.includes(t)) {
157
+ k.value = "";
158
+ return;
159
+ }
160
+ if (V.value) {
161
+ E.error(
162
+ l("connect.store.giftCard.maxAmounts", {
163
+ max: W
164
+ })
165
+ );
166
+ return;
167
+ }
168
+ f.value = [...f.value, t].sort((o, c) => o - c), k.value = "";
169
+ }
170
+ const ae = p(() => f.value.length === 0 && !D.value ? l("connect.store.giftCard.errorNoAmount") : D.value && Number(w.value) > Number(S.value) ? l("connect.store.giftCard.errorRange") : null), Be = p(
171
+ () => F.value.trim() ? null : l("connect.store.giftCard.errorNoName")
172
+ ), se = p(
173
+ () => v.value.length ? null : l("connect.store.giftCard.errorNoChannel")
174
+ ), re = p(() => {
175
+ var t;
176
+ for (const o of ["SMS", "WHATSAPP", "EMAIL"]) {
177
+ const c = N.value[o];
178
+ if (!c.content.trim())
179
+ return l("connect.store.giftCard.errorNoDeliveryMessage", { channel: o });
180
+ if (o === "EMAIL" && !((t = c.title) != null && t.trim()))
181
+ return l("connect.store.giftCard.errorNoEmailTitle");
182
+ }
183
+ return null;
184
+ }), ce = p(
185
+ () => Be.value ?? le.value ?? ae.value ?? se.value ?? re.value
186
+ );
187
+ async function ze(t) {
188
+ Je(t) && await ee(
189
+ async () => {
190
+ const o = await je(t);
191
+ h.value = [...h.value, o];
192
+ },
193
+ {
194
+ message: l("connect.store.giftCard.uploading"),
195
+ successMessage: l("connect.store.giftCard.uploaded")
196
+ }
197
+ );
198
+ }
199
+ function je(t) {
200
+ return L.update(
201
+ L.bundleImagePath(void 0, t),
202
+ t
203
+ );
204
+ }
205
+ function Je(t) {
206
+ const o = Ne.has(t.type) && t.size <= Te;
207
+ return o || E.error(l("connect.store.giftCard.invalidDesignFile")), o;
208
+ }
209
+ async function Ke(t) {
210
+ h.value = h.value.filter((o) => o !== t), await We(t);
211
+ }
212
+ async function We(t) {
213
+ if (fe.has(t)) {
214
+ pe.add(t);
215
+ return;
216
+ }
217
+ try {
218
+ await L.delete(t);
219
+ } catch {
220
+ }
221
+ }
222
+ function Ze() {
223
+ var t;
224
+ (t = _e.value) == null || t.click();
225
+ }
226
+ async function qe(t) {
227
+ var y;
228
+ const o = t.target, c = (y = o.files) == null ? void 0 : y[0];
229
+ if (o.value = "", !!c) {
230
+ if (!Re.test(c.name) || c.size > Qo) {
231
+ E.error(l("connect.store.giftCard.invalidTermsFile"));
232
+ return;
233
+ }
234
+ await ee(
235
+ async () => {
236
+ U.value = await L.update(
237
+ L.bundleImagePath(void 0, c),
238
+ c
239
+ ), j.value = { name: c.name, size: c.size }, _.value = "DOCUMENT";
240
+ },
241
+ {
242
+ message: l("connect.store.giftCard.uploading"),
243
+ successMessage: l("connect.store.giftCard.uploaded")
244
+ }
245
+ );
246
+ }
247
+ }
248
+ function Ye() {
249
+ U.value = "", j.value = null, _.value = "NONE";
250
+ }
251
+ function he() {
252
+ return {
253
+ name: F.value.trim(),
254
+ designs: h.value,
255
+ numberFormat: ne.value,
256
+ denominations: f.value.map(Number),
257
+ anyAmount: D.value ? {
258
+ enabled: !0,
259
+ min: Number(w.value),
260
+ max: Number(S.value)
261
+ } : null,
262
+ channels: v.value,
263
+ allowPersonalMessage: B.value,
264
+ deliveryMessages: N.value,
265
+ termsAndConditions: _.value === "TEXT" && z.value || null,
266
+ termsDocumentUrl: _.value === "DOCUMENT" && U.value || null
267
+ };
268
+ }
269
+ function Qe(t) {
270
+ var y, C, I, q;
271
+ F.value = t.name, h.value = [...t.designs ?? []], fe = new Set(h.value), f.value = [...t.denominations ?? []], D.value = !!((y = t.anyAmount) != null && y.enabled), w.value = ((C = t.anyAmount) == null ? void 0 : C.min) ?? 10, S.value = ((I = t.anyAmount) == null ? void 0 : I.max) ?? 100, v.value = (q = t.channels) != null && q.length ? [...t.channels] : ["SMS"], B.value = t.allowPersonalMessage ?? !0, N.value = structuredClone(
272
+ t.deliveryMessages ?? Ee()
273
+ ), M.value = v.value[0] ?? "SMS";
274
+ const o = t.numberFormat, c = !o || o.prefix === "GC" && Number(o.length) === 16;
275
+ A.value = c ? "DEFAULT" : "ADVANCED", $.value = Number((o == null ? void 0 : o.length) ?? 16), T.value = (o == null ? void 0 : o.charset) ?? Q().charset, O.value = (o == null ? void 0 : o.prefix) ?? "GC", X.value = (o == null ? void 0 : o.suffix) ?? "", t.termsDocumentUrl ? (_.value = "DOCUMENT", U.value = t.termsDocumentUrl) : t.termsAndConditions && (_.value = "TEXT", z.value = t.termsAndConditions);
276
+ }
277
+ function ie() {
278
+ we.push({ name: Dt["$connect-STORE"] });
279
+ }
280
+ async function et() {
281
+ if (ce.value) {
282
+ E.error(ce.value);
283
+ return;
284
+ }
285
+ await ee(
286
+ async () => {
287
+ const t = he();
288
+ G.value ? await ue.updateProgram(G.value, t) : await ue.createProgram(t), await Promise.allSettled(
289
+ [...pe].map((o) => L.delete(o))
290
+ ), ie();
291
+ },
292
+ {
293
+ message: H.value ? l("connect.store.giftCard.saving") : l("connect.store.giftCard.creating"),
294
+ successMessage: H.value ? l("connect.store.giftCard.saved") : l("connect.store.giftCard.created")
295
+ }
296
+ );
297
+ }
298
+ return at(async () => {
299
+ await ke(async () => {
300
+ await Pe(), G.value && Qe(await ue.readProgram(G.value));
301
+ });
302
+ }), (t, o) => {
303
+ const c = x("FmButton"), y = x("FmTextField"), C = x("FmCard"), I = x("FmIcon"), q = x("FmDropField"), tt = x("FmStepperField"), Ae = x("FmChip"), De = x("FmSwitch"), ot = x("FmCheckbox"), nt = x("FmTextarea");
304
+ return u(), m("div", Et, [
305
+ e(H) ? (u(), J(pt, {
306
+ key: 0,
307
+ json: he()
308
+ }, null, 8, ["json"])) : g("", !0),
309
+ n("div", Ft, [
310
+ r(c, {
311
+ icon: "arrow_back",
312
+ variant: "tertiary",
313
+ onClick: ie
314
+ }),
315
+ n("div", Tt, [
316
+ n("h1", kt, s(e(H) ? e(l)("connect.store.giftCard.editTitle") : e(l)("connect.store.giftCard.createTitle")), 1),
317
+ n("p", wt, s(e(l)("connect.store.giftCard.pageSubtitle")), 1)
318
+ ])
319
+ ]),
320
+ n("div", St, [
321
+ r(C, {
322
+ variant: "outlined",
323
+ class: "p-24 flex flex-col gap-16"
324
+ }, {
325
+ default: P(() => [
326
+ n("div", Nt, [
327
+ o[15] || (o[15] = n("span", { class: "w-[18px] h-[18px] rounded-sm flex-none grid place-items-center bg-fm-color-primary-oats text-fm-color-primary fm-typo-en-body-sm-600" }, " 1 ", -1)),
328
+ n("div", Ut, [
329
+ n("div", Vt, s(e(l)("connect.store.giftCard.name")), 1)
330
+ ])
331
+ ]),
332
+ r(y, {
333
+ modelValue: e(F),
334
+ "onUpdate:modelValue": o[0] || (o[0] = (a) => b(F) ? F.value = a : null),
335
+ placeholder: e(l)("connect.store.giftCard.namePlaceholder")
336
+ }, null, 8, ["modelValue", "placeholder"])
337
+ ]),
338
+ _: 1
339
+ }),
340
+ r(C, {
341
+ variant: "outlined",
342
+ class: "p-24 flex flex-col gap-16"
343
+ }, {
344
+ default: P(() => [
345
+ n("div", It, [
346
+ o[16] || (o[16] = n("span", { class: "w-[18px] h-[18px] rounded-sm flex-none grid place-items-center bg-fm-color-primary-oats text-fm-color-primary fm-typo-en-body-sm-600" }, " 2 ", -1)),
347
+ n("div", Pt, [
348
+ n("div", Rt, s(e(l)("connect.store.giftCard.design")), 1),
349
+ n("div", Lt, s(e(l)("connect.store.giftCard.designHint")), 1)
350
+ ])
351
+ ]),
352
+ n("div", Gt, [
353
+ (u(!0), m(R, null, K(e(h), (a, i) => (u(), m("div", {
354
+ key: a,
355
+ class: "relative w-[179px] h-[115px] rounded-md overflow-hidden border-1 border-fm-color-neutral-gray-300"
356
+ }, [
357
+ n("img", {
358
+ src: a,
359
+ alt: "",
360
+ class: "w-full h-full object-cover"
361
+ }, null, 8, Ht),
362
+ n("button", {
363
+ type: "button",
364
+ class: "absolute top-4 right-4 w-24 h-24 rounded-sm grid place-items-center bg-fm-color-neutral-black text-fm-color-typo-white opacity-70 hover:opacity-100",
365
+ "aria-label": e(l)("connect.common.remove"),
366
+ title: e(l)("connect.common.remove"),
367
+ onClick: (Me) => Ke(a)
368
+ }, [
369
+ r(I, {
370
+ name: "close",
371
+ size: "sm"
372
+ })
373
+ ], 8, $t),
374
+ n("span", Ot, s(e(l)("connect.store.giftCard.designOption", { index: i + 1 })), 1)
375
+ ]))), 128)),
376
+ r(q, {
377
+ accept: ".png, .jpg, .jpeg, .gif",
378
+ "max-file-size": Te,
379
+ "content-class": "w-[179px] h-[115px]",
380
+ onFileUpload: ze
381
+ })
382
+ ])
383
+ ]),
384
+ _: 1
385
+ }),
386
+ r(C, {
387
+ variant: "outlined",
388
+ class: "p-24 flex flex-col gap-16"
389
+ }, {
390
+ default: P(() => [
391
+ n("div", Xt, [
392
+ o[17] || (o[17] = n("span", { class: "w-[18px] h-[18px] rounded-sm flex-none grid place-items-center bg-fm-color-primary-oats text-fm-color-primary fm-typo-en-body-sm-600" }, " 3 ", -1)),
393
+ n("div", Bt, [
394
+ n("div", zt, s(e(l)("connect.store.giftCard.numberSettings")), 1),
395
+ n("div", jt, s(e(l)("connect.store.giftCard.numberSettingsHint")), 1)
396
+ ])
397
+ ]),
398
+ n("div", Jt, [
399
+ (u(), m(R, null, K(["DEFAULT", "ADVANCED"], (a) => n("button", {
400
+ key: a,
401
+ type: "button",
402
+ class: Y([
403
+ "flex gap-12 items-start text-left p-16 rounded-md border-1 transition-colors",
404
+ e(A) === a ? "border-fm-color-primary" : "border-fm-color-neutral-gray-300"
405
+ ]),
406
+ onClick: (i) => A.value = a
407
+ }, [
408
+ n("span", {
409
+ class: Y([
410
+ "w-[18px] h-[18px] rounded-full border-1 flex-none mt-2 grid place-items-center",
411
+ e(A) === a ? "border-fm-color-primary" : "border-fm-color-neutral-gray-300"
412
+ ])
413
+ }, [
414
+ e(A) === a ? (u(), m("span", Wt)) : g("", !0)
415
+ ], 2),
416
+ n("span", Zt, [
417
+ n("span", qt, s(a === "DEFAULT" ? e(l)("connect.store.giftCard.numberDefault") : e(l)("connect.store.giftCard.numberAdvanced")), 1),
418
+ n("span", Yt, s(a === "DEFAULT" ? e(l)("connect.store.giftCard.numberDefaultHint") : e(l)("connect.store.giftCard.numberAdvancedHint")), 1)
419
+ ])
420
+ ], 10, Kt)), 64))
421
+ ]),
422
+ e(A) === "ADVANCED" ? (u(), m("div", Qt, [
423
+ r(tt, {
424
+ modelValue: e($),
425
+ "onUpdate:modelValue": o[1] || (o[1] = (a) => b($) ? $.value = a : null),
426
+ label: e(l)("connect.store.giftCard.length"),
427
+ "helper-text": e(l)("connect.store.giftCard.lengthHint"),
428
+ min: e($e),
429
+ max: e(bt),
430
+ step: 1
431
+ }, null, 8, ["modelValue", "label", "helper-text", "min", "max"]),
432
+ r(y, {
433
+ modelValue: e(T),
434
+ "onUpdate:modelValue": o[2] || (o[2] = (a) => b(T) ? T.value = a : null),
435
+ label: e(l)("connect.store.giftCard.charset"),
436
+ "max-length": e(_t)
437
+ }, null, 8, ["modelValue", "label", "max-length"]),
438
+ r(y, {
439
+ modelValue: e(O),
440
+ "onUpdate:modelValue": o[3] || (o[3] = (a) => b(O) ? O.value = a : null),
441
+ label: e(l)("connect.store.giftCard.prefix"),
442
+ "max-length": e(Fe)
443
+ }, null, 8, ["modelValue", "label", "max-length"]),
444
+ r(y, {
445
+ modelValue: e(X),
446
+ "onUpdate:modelValue": o[4] || (o[4] = (a) => b(X) ? X.value = a : null),
447
+ label: e(l)("connect.store.giftCard.suffix"),
448
+ "max-length": e(Fe)
449
+ }, null, 8, ["modelValue", "label", "max-length"])
450
+ ])) : g("", !0),
451
+ e(le) ? (u(), m("div", eo, s(e(le)), 1)) : g("", !0),
452
+ n("div", to, [
453
+ n("div", oo, [
454
+ n("span", no, s(e(l)("connect.store.giftCard.exampleNumber")), 1),
455
+ n("span", lo, s(e(He)), 1)
456
+ ]),
457
+ r(c, {
458
+ label: e(l)("connect.store.giftCard.regenerate"),
459
+ icon: "refresh",
460
+ variant: "secondary",
461
+ onClick: o[5] || (o[5] = (a) => ve.value++)
462
+ }, null, 8, ["label"])
463
+ ])
464
+ ]),
465
+ _: 1
466
+ }),
467
+ r(C, {
468
+ variant: "outlined",
469
+ class: "p-24 flex flex-col gap-16"
470
+ }, {
471
+ default: P(() => [
472
+ n("div", ao, [
473
+ o[18] || (o[18] = n("span", { class: "w-[18px] h-[18px] rounded-sm flex-none grid place-items-center bg-fm-color-primary-oats text-fm-color-primary fm-typo-en-body-sm-600" }, " 4 ", -1)),
474
+ n("div", so, [
475
+ n("div", ro, s(e(l)("connect.store.giftCard.amount")), 1),
476
+ n("div", co, s(e(l)("connect.store.giftCard.amountHint", {
477
+ max: e(W)
478
+ })), 1)
479
+ ])
480
+ ]),
481
+ n("div", io, [
482
+ n("div", uo, s(e(l)("connect.store.giftCard.popularAmounts")), 1),
483
+ n("div", mo, [
484
+ (u(!0), m(R, null, K(e(Oe), (a) => (u(), J(Ae, {
485
+ key: a.amount,
486
+ label: `RM ${a.amount}`,
487
+ selectable: !a.custom,
488
+ removable: a.custom,
489
+ selected: e(f).includes(a.amount),
490
+ disabled: !a.custom && e(V) && !e(f).includes(a.amount),
491
+ onClick: (i) => Xe(a),
492
+ onChipClosed: (i) => xe(a.amount)
493
+ }, null, 8, ["label", "selectable", "removable", "selected", "disabled", "onClick", "onChipClosed"]))), 128))
494
+ ])
495
+ ]),
496
+ n("div", fo, [
497
+ n("div", po, [
498
+ o[19] || (o[19] = n("span", { class: "px-12 py-8 bg-fm-color-neutral-gray-100 fm-typo-en-body-md-500 text-fm-color-typo-secondary" }, " RM ", -1)),
499
+ st(n("input", {
500
+ "onUpdate:modelValue": o[6] || (o[6] = (a) => b(k) ? k.value = a : null),
501
+ type: "number",
502
+ class: "px-12 py-8 outline-none fm-typo-en-body-md-400 w-[140px] disabled:bg-fm-color-neutral-gray-100",
503
+ placeholder: e(l)("connect.store.giftCard.custom"),
504
+ disabled: e(V),
505
+ onKeyup: rt(Ce, ["enter"])
506
+ }, null, 40, vo), [
507
+ [ct, e(k)]
508
+ ])
509
+ ]),
510
+ r(c, {
511
+ label: e(l)("connect.store.giftCard.addAmount"),
512
+ variant: "secondary",
513
+ disabled: e(V),
514
+ onClick: Ce
515
+ }, null, 8, ["label", "disabled"])
516
+ ]),
517
+ n("div", go, [
518
+ de(s(e(l)("connect.store.giftCard.selected")) + " ", 1),
519
+ n("span", yo, s(e(f).length), 1),
520
+ de(" / " + s(e(W)), 1)
521
+ ]),
522
+ n("div", bo, [
523
+ r(De, {
524
+ modelValue: e(D),
525
+ "onUpdate:modelValue": o[7] || (o[7] = (a) => b(D) ? D.value = a : null)
526
+ }, null, 8, ["modelValue"]),
527
+ n("div", _o, [
528
+ n("div", xo, s(e(l)("connect.store.giftCard.anyAmount")), 1),
529
+ n("div", Co, s(e(l)("connect.store.giftCard.anyAmountHint")), 1)
530
+ ])
531
+ ]),
532
+ e(D) ? (u(), m("div", ho, [
533
+ r(y, {
534
+ modelValue: e(w),
535
+ "onUpdate:modelValue": o[8] || (o[8] = (a) => b(w) ? w.value = a : null),
536
+ type: "number",
537
+ label: e(l)("connect.store.giftCard.min"),
538
+ class: "flex-1"
539
+ }, null, 8, ["modelValue", "label"]),
540
+ r(y, {
541
+ modelValue: e(S),
542
+ "onUpdate:modelValue": o[9] || (o[9] = (a) => b(S) ? S.value = a : null),
543
+ type: "number",
544
+ label: e(l)("connect.store.giftCard.max"),
545
+ "helper-text": `Up to RM${e(me)}`,
546
+ class: "flex-1"
547
+ }, null, 8, ["modelValue", "label", "helper-text"])
548
+ ])) : g("", !0),
549
+ e(ae) ? (u(), m("div", Ao, s(e(ae)), 1)) : g("", !0)
550
+ ]),
551
+ _: 1
552
+ }),
553
+ r(C, {
554
+ variant: "outlined",
555
+ class: "p-24 flex flex-col gap-16"
556
+ }, {
557
+ default: P(() => {
558
+ var a;
559
+ return [
560
+ n("div", Do, [
561
+ o[20] || (o[20] = n("span", { class: "w-[18px] h-[18px] rounded-sm flex-none grid place-items-center bg-fm-color-primary-oats text-fm-color-primary fm-typo-en-body-sm-600" }, " 5 ", -1)),
562
+ n("div", Mo, [
563
+ n("div", Eo, s(e(l)("connect.store.giftCard.sending")), 1),
564
+ n("div", Fo, s(e(l)("connect.store.giftCard.sendingHint")), 1)
565
+ ])
566
+ ]),
567
+ e(ye) ? g("", !0) : (u(), m("div", To, [
568
+ r(I, {
569
+ name: "info",
570
+ class: "text-fm-color-system-info-400 flex-none"
571
+ }),
572
+ n("div", ko, s(e(l)("connect.store.giftCard.broadcastNotice")), 1),
573
+ r(c, {
574
+ icon: "close",
575
+ variant: "tertiary",
576
+ onClick: o[10] || (o[10] = (i) => ye.value = !0)
577
+ })
578
+ ])),
579
+ n("div", wo, [
580
+ r(De, {
581
+ modelValue: e(B),
582
+ "onUpdate:modelValue": o[11] || (o[11] = (i) => b(B) ? B.value = i : null)
583
+ }, null, 8, ["modelValue"]),
584
+ n("span", So, s(e(l)("connect.store.giftCard.personalMessage")), 1)
585
+ ]),
586
+ n("div", No, [
587
+ n("div", Uo, s(e(l)("connect.store.giftCard.channels")), 1),
588
+ n("div", Vo, s(e(l)("connect.store.giftCard.channelsHint")), 1),
589
+ n("div", Io, [
590
+ (u(!0), m(R, null, K(e(Z), (i) => (u(), J(ot, {
591
+ key: i.value,
592
+ value: i.value,
593
+ label: i.label,
594
+ "model-value": e(v).includes(i.value),
595
+ disabled: !i.available && !e(v).includes(i.value),
596
+ "onUpdate:modelValue": (Me) => Ie(i.value)
597
+ }, null, 8, ["value", "label", "model-value", "disabled", "onUpdate:modelValue"]))), 128))
598
+ ]),
599
+ e(be).length ? (u(), m("div", Po, [
600
+ de(s(e(l)("connect.store.giftCard.channelUnavailable", {
601
+ channels: e(be).join(", ")
602
+ })) + " ", 1),
603
+ n("a", {
604
+ href: Ve,
605
+ target: "_blank",
606
+ rel: "noopener",
607
+ class: "underline fm-typo-en-body-md-600 text-fm-color-primary"
608
+ }, s(e(l)("connect.store.giftCard.channelConfigure")), 1)
609
+ ])) : g("", !0),
610
+ e(se) ? (u(), m("div", Ro, s(e(se)), 1)) : g("", !0)
611
+ ]),
612
+ e(v).length ? (u(), m(R, { key: 1 }, [
613
+ n("div", Lo, [
614
+ (u(!0), m(R, null, K(e(Z).filter(
615
+ (i) => e(v).includes(i.value)
616
+ ), (i) => (u(), J(Ae, {
617
+ key: i.value,
618
+ label: i.label,
619
+ selectable: "",
620
+ selected: e(M) === i.value,
621
+ onClick: (Me) => M.value = i.value
622
+ }, null, 8, ["label", "selected", "onClick"]))), 128))
623
+ ]),
624
+ n("div", Go, s(e(l)("connect.store.giftCard.deliveryMessage", {
625
+ channel: (a = e(Z).find(
626
+ (i) => i.value === e(M)
627
+ )) == null ? void 0 : a.label
628
+ })), 1),
629
+ r(ft, {
630
+ modelValue: e(oe),
631
+ "onUpdate:modelValue": o[12] || (o[12] = (i) => b(oe) ? oe.value = i : null),
632
+ variables: [...e(xt)],
633
+ "preview-data": Ue
634
+ }, null, 8, ["modelValue", "variables"]),
635
+ e(re) ? (u(), m("div", Ho, s(e(re)), 1)) : g("", !0)
636
+ ], 64)) : g("", !0)
637
+ ];
638
+ }),
639
+ _: 1
640
+ }),
641
+ r(C, {
642
+ variant: "outlined",
643
+ class: "p-24 flex flex-col gap-16"
644
+ }, {
645
+ default: P(() => [
646
+ n("div", $o, [
647
+ o[21] || (o[21] = n("span", { class: "w-[18px] h-[18px] rounded-sm flex-none grid place-items-center bg-fm-color-primary-oats text-fm-color-primary fm-typo-en-body-sm-600" }, " 6 ", -1)),
648
+ n("div", Oo, [
649
+ n("div", Xo, s(e(l)("connect.store.giftCard.terms")), 1),
650
+ n("div", Bo, s(e(l)("connect.store.giftCard.termsHint")), 1)
651
+ ])
652
+ ]),
653
+ n("div", zo, [
654
+ n("input", {
655
+ ref_key: "termsInput",
656
+ ref: _e,
657
+ type: "file",
658
+ accept: ".pdf",
659
+ class: "hidden",
660
+ onChange: qe
661
+ }, null, 544),
662
+ r(c, {
663
+ label: e(l)("connect.store.giftCard.enterText"),
664
+ icon: "edit",
665
+ variant: "secondary",
666
+ class: Y(
667
+ e(_) === "TEXT" ? "border-fm-color-primary text-fm-color-primary" : ""
668
+ ),
669
+ onClick: o[13] || (o[13] = (a) => _.value = "TEXT")
670
+ }, null, 8, ["label", "class"]),
671
+ r(c, {
672
+ label: e(l)("connect.store.giftCard.uploadDocument"),
673
+ icon: "upload",
674
+ variant: "secondary",
675
+ class: Y(
676
+ e(_) === "DOCUMENT" ? "border-fm-color-primary text-fm-color-primary" : ""
677
+ ),
678
+ onClick: Ze
679
+ }, null, 8, ["label", "class"])
680
+ ]),
681
+ n("div", jo, s(e(l)("connect.store.giftCard.uploadDocumentHint")), 1),
682
+ e(_) === "TEXT" ? (u(), J(nt, {
683
+ key: 0,
684
+ modelValue: e(z),
685
+ "onUpdate:modelValue": o[14] || (o[14] = (a) => b(z) ? z.value = a : null),
686
+ rows: 5,
687
+ placeholder: e(l)("connect.store.giftCard.termsPlaceholder")
688
+ }, null, 8, ["modelValue", "placeholder"])) : e(_) === "DOCUMENT" && e(U) ? (u(), m("div", Jo, [
689
+ n("span", Ko, [
690
+ r(I, {
691
+ name: "description",
692
+ class: "text-fm-color-typo-secondary"
693
+ })
694
+ ]),
695
+ n("div", Wo, [
696
+ n("a", {
697
+ href: e(U),
698
+ target: "_blank",
699
+ rel: "noopener",
700
+ class: "block fm-typo-en-body-md-600 truncate"
701
+ }, s(e(Le)), 9, Zo),
702
+ e(j) ? (u(), m("div", qo, s(Ge(e(j).size)) + " · " + s(e(l)("connect.store.giftCard.termsUploadedJustNow")), 1)) : g("", !0)
703
+ ]),
704
+ r(c, {
705
+ icon: "delete",
706
+ variant: "tertiary",
707
+ "aria-label": e(l)("connect.common.remove"),
708
+ onClick: Ye
709
+ }, null, 8, ["aria-label"])
710
+ ])) : g("", !0)
711
+ ]),
712
+ _: 1
713
+ }),
714
+ n("div", Yo, [
715
+ r(c, {
716
+ label: e(l)("connect.common.cancel"),
717
+ variant: "tertiary",
718
+ onClick: ie
719
+ }, null, 8, ["label"]),
720
+ r(c, {
721
+ label: e(H) ? e(l)("connect.common.save") : e(l)("connect.store.giftCard.addGiftCard"),
722
+ loading: e(dt)().isLoading,
723
+ disabled: !!e(ce),
724
+ onClick: et
725
+ }, null, 8, ["label", "loading", "disabled"])
726
+ ])
727
+ ])
728
+ ]);
729
+ };
730
+ }
731
+ });
732
+ export {
733
+ gn as default
734
+ };