@feedmepos/mf-connect 0.1.110-prod → 0.1.112-prod

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 (126) hide show
  1. package/dist/{App-BIuwkgjE.js → App-CFJcQZEE.js} +522 -500
  2. package/dist/{Bin-B6PDvhj7.js → Bin-DaqUNsSV.js} +8 -8
  3. package/dist/{Broadcast-BsUYu9Kq.js → Broadcast-CdAN6JCa.js} +82 -79
  4. package/dist/{CampaignAnalytic-D0_Kh2Sv.js → CampaignAnalytic-CpP7lgTX.js} +7 -7
  5. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-bfMr_7XS.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BQiQVQBN.js} +49 -31
  6. package/dist/Card-Bmz5p5Pq.js +1085 -0
  7. package/dist/{Collections-B0umkbKL.js → Collections-BKND60cK.js} +9 -9
  8. package/dist/{Credit-DMrHYtmf.js → Credit-DQ_tDm8l.js} +11 -11
  9. package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-IuEHozwd.js → DateRangeChip.vue_vue_type_script_setup_true_lang-CCwpsEWf.js} +1 -1
  10. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-C06_qwVx.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bn-lauCv.js} +34 -32
  11. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-CHCLAOYT.js → EffectSheet.vue_vue_type_style_index_0_lang-wUV_beN0.js} +6 -6
  12. package/dist/{Experience-3xvTI41j.js → Experience-BOE6jLIS.js} +86 -83
  13. package/dist/{FileSaver.min-CEjHOYSg.js → FileSaver.min-D0CP0E3N.js} +1 -1
  14. package/dist/{Game-Drkfnm94.js → Game-B-8by2dp.js} +12 -12
  15. package/dist/GiftCardSetup-CdqZd1ee.js +748 -0
  16. package/dist/GoalPickerPanel.vue_vue_type_script_setup_true_lang-BVTu4uTR.js +424 -0
  17. package/dist/Goals-xFHNbwt7.js +247 -0
  18. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-BYIIaPD9.js → ImageInput.vue_vue_type_script_setup_true_lang-B5Z1AZRV.js} +1 -1
  19. package/dist/{Index-BNfZ-mAu.js → Index-t6veJ0lU.js} +10 -10
  20. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-CqJLimu2.js → LocationPicker.vue_vue_type_script_setup_true_lang-Deeanc8z.js} +1 -1
  21. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-BnMjqLMU.js → LottieAnimation.vue_vue_type_script_setup_true_lang-B8qOJYoS.js} +1 -1
  22. package/dist/{LoyaltyDashboard-BmRdWFCw.js → LoyaltyDashboard-DXNBsnM5.js} +1216 -1170
  23. package/dist/{MainLayout-m4H59w6_.js → MainLayout-CmCboaEn.js} +3 -3
  24. package/dist/{Marketing-BqdCdc76.js → Marketing-DCq9O5eb.js} +4 -4
  25. package/dist/{MarketingMaterialEdit-UjCEMJ7c.js → MarketingMaterialEdit-CGLxanxm.js} +6 -6
  26. package/dist/{Member-BbpQizye.js → Member-BCYmEmhD.js} +7 -7
  27. package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-BbL7cw4g.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-Djrfmj9g.js} +26 -24
  28. package/dist/{MemberImportHistory-FYMyd_uX.js → MemberImportHistory-D-5NAOfo.js} +7 -7
  29. package/dist/{MemberList-CFtv0HI5.js → MemberList-IySTKOT_.js} +14 -14
  30. package/dist/{MemberTransactions-BYpugGs7.js → MemberTransactions-BgQZvc5O.js} +1 -1
  31. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CDzQ0rnK.js → MessageInput.vue_vue_type_script_setup_true_lang-N8PCSKBx.js} +3369 -3290
  32. package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-BlhwugZQ.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-_JNdYsBu.js} +1 -1
  33. package/dist/{Mission-BMhY1kl1.js → Mission-DtaTKWE2.js} +83 -80
  34. package/dist/{Overview-BmZelkd_.js → Overview-D-uC2-Pi.js} +4 -4
  35. package/dist/{Overview-E0KL28Fc.js → Overview-DVMdPa97.js} +57 -55
  36. package/dist/{Point-BX5p9ZVF.js → Point-jnPIgHMZ.js} +119 -110
  37. package/dist/{Promotion-D662WYaR.js → Promotion-mdQg-RSh.js} +89 -86
  38. package/dist/{Queue-CI5rumWZ.js → Queue-D8YY1lbn.js} +20 -18
  39. package/dist/{Record-DRZVEW0I.js → Record-Dh-rN7a0.js} +9 -9
  40. package/dist/{Review-yMVGBErp.js → Review-C8B-SIR8.js} +2 -2
  41. package/dist/{ReviewFacebookCallback-Docv-Uil.js → ReviewFacebookCallback-C3eyH0pS.js} +5 -5
  42. package/dist/{ReviewGoogleCallback-3xVh_G7M.js → ReviewGoogleCallback-pNF2ICvQ.js} +5 -5
  43. package/dist/{Reward-lzBLyu0x.js → Reward-D7KPnzXt.js} +35 -35
  44. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-Bs32tPvC.js → RewardGroup.vue_vue_type_script_setup_true_lang-C87CDjxP.js} +25 -23
  45. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-fNwFSHL1.js → RuleGroup.vue_vue_type_script_setup_true_lang-D1S2sLOK.js} +17 -15
  46. package/dist/{Segment-BRPf66q8.js → Segment-Ct8JRTjV.js} +32 -30
  47. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-DQmbCewC.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-w-UpWetC.js} +38 -36
  48. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-fHX_ftax.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BbEX2h2u.js} +4 -4
  49. package/dist/{Setting-D5k2jymY.js → Setting-C3Binnn_.js} +56 -56
  50. package/dist/{SettingAdvertisements-1Oc29mzb.js → SettingAdvertisements-BrB-dGPs.js} +12 -12
  51. package/dist/{Settings-B3OCofxq.js → Settings-D6h2QM6X.js} +5 -5
  52. package/dist/Store-EKPfHEmY.js +2622 -0
  53. package/dist/{StoreRewards-C7_RKZ00.js → StoreRewards-B208ENOi.js} +15 -15
  54. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-Dy7_GFoi.js +1264 -0
  55. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-BW-HTNMr.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-B2KJeL5Y.js} +2 -2
  56. package/dist/{Tier-8pGUR8GA.js → Tier-CjYiCZy_.js} +342 -338
  57. package/dist/{Title-DnYVX2k8.js → Title-BXkVolaL.js} +34 -32
  58. package/dist/Transaction-D1T3aIC3.js +45 -0
  59. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-ATWU025y.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-flUDCSA5.js} +6 -6
  60. package/dist/Voucher-DnQ8jNjI.js +837 -0
  61. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-C1dCFS2S.js → VoucherEditor.vue_vue_type_script_setup_true_lang-Z9GDpO4z.js} +12 -12
  62. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CbUdt4GK.js → ZodTextField.vue_vue_type_script_setup_true_lang-Dcw8Oi-t.js} +2 -2
  63. package/dist/{app-DoUnw6pe.js → app-BtGohMqA.js} +6211 -5092
  64. package/dist/app.js +1 -1
  65. package/dist/base.export-DulNMo7e.js +75 -0
  66. package/dist/{business-B-PlsFIY.js → business-Bla8vvZH.js} +1 -1
  67. package/dist/{campaign-yUUxyk0R.js → campaign-BIPNFBY5.js} +2 -2
  68. package/dist/{campaign-GkMET7FI.js → campaign-DYqAyRCY.js} +8 -8
  69. package/dist/{campaign.enum-DbPiwqfi.js → campaign.enum-liUaxkcy.js} +1 -1
  70. package/dist/{campaign.fn-CF5mOcSE.js → campaign.fn-J7hYcX_7.js} +98 -98
  71. package/dist/{collectible.enum-CbOzGIud.js → collectible.enum-C0FfRMrW.js} +1 -1
  72. package/dist/{collection.fn-BByCTXVz.js → collection.fn-DdDMfaFO.js} +2 -2
  73. package/dist/currency-BrVnqxQ1.js +7 -0
  74. package/dist/{effect-jriAOaEq.js → effect-gfVmfrm9.js} +1 -1
  75. package/dist/{email-addresses-DH4xgace.js → email-addresses-Dy8NFNBw.js} +2 -2
  76. package/dist/{helper-CQjM35T_.js → helper-CMhQctQK.js} +1 -1
  77. package/dist/{index-v3DTwO9s.js → index-B6x6s8mu.js} +1805 -2128
  78. package/dist/{index-iZDBfoRk.js → index-BOZ3oVHd.js} +2 -2
  79. package/dist/{index-MtVkfI7s.js → index-BqKrePY8.js} +3 -3
  80. package/dist/{index-BLOFQAMK.js → index-C5rRuwhC.js} +1 -1
  81. package/dist/{index-BHYKmUkc.js → index-C67-z1uf.js} +11 -6
  82. package/dist/{index-CptAtzHf.js → index-CLiJUFmJ.js} +2 -2
  83. package/dist/{index-DEmV6_BZ.js → index-CUFuU2eJ.js} +10 -8
  84. package/dist/index-CZqwIQXi.js +738 -0
  85. package/dist/{index-D1vRPik1.js → index-CghtzuVO.js} +1 -1
  86. package/dist/{index-DszI88g9.js → index-Culx-Z9v.js} +20 -14
  87. package/dist/{index-Dr68iOIO.js → index-D1T4Yf4t.js} +1 -1
  88. package/dist/{index-Duqxyi9L.js → index-D6RDVy95.js} +1112 -34
  89. package/dist/index-DKmtDBKS.js +53 -0
  90. package/dist/{index-De9f7Fwe.js → index-Dalmv1m4.js} +5 -5
  91. package/dist/{index-DKZEN-aI.js → index-DvW-3flw.js} +4 -3
  92. package/dist/{index-CCBpqK6M.js → index-dyMdi0Rt.js} +1 -1
  93. package/dist/index-otcusTFM.js +171 -0
  94. package/dist/{index-BlKeV6aM.js → index-qJOEwQ_z.js} +4 -1
  95. package/dist/{index-BPTCREXM.js → index-v1exQSyU.js} +1 -1
  96. package/dist/{index.esm2017-DvOnDQUA.js → index.esm2017-BLKRIlb9.js} +1 -1
  97. package/dist/{loading-DO3WUS3q.js → loading-BkJ3h_4U.js} +1 -1
  98. package/dist/{lodash-6izwukKR.js → lodash-C0Kbs8lQ.js} +1 -1
  99. package/dist/{member-import-hKbS-7lM.js → member-import-trpK8l8R.js} +1 -1
  100. package/dist/{membership-buZOqdNV.js → membership-TV1CoyKQ.js} +3 -3
  101. package/dist/{money-WR6-v2Bl.js → money-BM-DK9iD.js} +1 -1
  102. package/dist/{number-CjEejmUn.js → number-BclgE86R.js} +1 -1
  103. package/dist/{objectid-BvtNS241.js → objectid-C2XvpEgx.js} +12 -12
  104. package/dist/onboarding-BLuoXyCY.js +131 -0
  105. package/dist/onboardingSetup-BLmLAgIV.js +17 -0
  106. package/dist/{plugins-BLcKp-ww.js → plugins-3_mD58dh.js} +3 -3
  107. package/dist/{reward-DCNR2-_F.js → reward-Bo4szVCU.js} +1 -1
  108. package/dist/{rule-BsdMlDuH.js → rule-Bwy5-zD7.js} +3 -3
  109. package/dist/{rule-builder-C2z6Ki1X.js → rule-builder-Co_1uuj4.js} +1 -1
  110. package/dist/{template-DuuTNfO4.js → template-fImyGLa7.js} +7 -7
  111. package/dist/{timezone-nMBfnPp_.js → timezone-DQ7TNXmV.js} +1 -1
  112. package/dist/{transaction.fn-CYC2Uh5Y.js → transaction.fn-OT7ucfCB.js} +2 -2
  113. package/dist/{trigger-CtlvsU7_.js → trigger-BJKHGcNG.js} +14 -14
  114. package/dist/{useMarketingMaterialActions-Dec-VZh7.js → useMarketingMaterialActions-BX3C1Gga.js} +3 -3
  115. package/dist/{usePagination-DvJ9IfI_.js → usePagination-Qp0qoWBj.js} +1 -1
  116. package/dist/{user-CYOAXuDw.js → user-BcE3fiEa.js} +1 -1
  117. package/dist/{vue-i18n-Cy0bIZpQ.js → vue-i18n-BQmB8Ex1.js} +99 -99
  118. package/dist/{xlsx-Ct_b6gSU.js → xlsx-DYZ421PG.js} +584 -584
  119. package/dist/{zod-DZR76_dr.js → zod-DestzeIp.js} +1 -1
  120. package/package.json +1 -1
  121. package/dist/Card-D5sknDf_.js +0 -910
  122. package/dist/Store-B8WVn8ZA.js +0 -1997
  123. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CmqgxDJ6.js +0 -1008
  124. package/dist/Transaction-YJkVkePM.js +0 -39
  125. package/dist/Voucher-BcCzreI3.js +0 -443
  126. package/dist/export-CN3lbc2j.js +0 -97
@@ -0,0 +1,748 @@
1
+ import { defineComponent as rt, computed as p, ref as d, onMounted as ct, 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 it, withKeys as dt, vModelText as ut, createTextVNode as de } from "vue";
2
+ import { u as mt } from "./loading-BkJ3h_4U.js";
3
+ import { u as ft } from "./app-wDQR6dpb.js";
4
+ import { n as E, f as L } from "./plugins-3_mD58dh.js";
5
+ import "./index-C5rRuwhC.js";
6
+ import { g as ue } from "./index-DKmtDBKS.js";
7
+ import { c as pt } from "./index-C67-z1uf.js";
8
+ import { S as Fe } from "./index-BOZ3oVHd.js";
9
+ import { a as vt } from "./MessageInput.vue_vue_type_script_setup_true_lang-N8PCSKBx.js";
10
+ import { J as gt } from "./JsonViewer-v8_C7l5N.js";
11
+ import { p as Q, q as Te, r as yt, s as bt, t as _t, G as W, u as xt, v as Ct, w as ke, x as me, y as ht } from "./index-B6x6s8mu.js";
12
+ import { u as At } from "./vue-i18n-BQmB8Ex1.js";
13
+ import { useRouter as Dt, useRoute as Mt } from "vue-router";
14
+ import { R as Et } from "./app-BtGohMqA.js";
15
+ var we = { authUrl: "https://portal-v2.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "member.feedme.cc", crmUrl: "crm.feedme.cc", paymentPortalUrl: "https://portal.feedme.cc/payment/payout-account", licensePortalUrl: "https://license.feedme.cc/", marketingV1Portal: "https://marketing-v1.feedme.cc", voucherAppUrl: "https://voucher.feedme.cc/" };
16
+ const Ft = { class: "px-24 pb-40" }, Tt = { class: "flex items-start gap-12 py-24" }, kt = { class: "flex flex-col gap-4" }, wt = { class: "fm-typo-en-title-md-800 text-fm-color-typo-primary" }, St = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Nt = { class: "flex flex-col gap-16 max-w-[860px]" }, Ut = { class: "flex gap-12" }, Vt = { class: "flex flex-col gap-4" }, It = { class: "fm-typo-en-body-lg-600" }, Pt = { class: "flex gap-12" }, Rt = { class: "flex flex-col gap-4" }, Lt = { class: "fm-typo-en-body-lg-600" }, Gt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ht = { class: "flex flex-wrap items-start gap-12" }, $t = ["src"], Ot = ["aria-label", "title", "onClick"], Xt = { class: "absolute bottom-4 left-4 px-8 py-2 rounded-sm bg-fm-color-neutral-white fm-typo-en-body-sm-600" }, Bt = { class: "flex gap-12" }, zt = { class: "flex flex-col gap-4" }, jt = { class: "fm-typo-en-body-lg-600" }, Jt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Kt = { class: "flex flex-col gap-8" }, Wt = ["onClick"], qt = {
17
+ key: 0,
18
+ class: "w-[9px] h-[9px] rounded-full bg-fm-color-primary"
19
+ }, Zt = { class: "flex-1" }, Yt = { class: "block fm-typo-en-body-md-600" }, Qt = { class: "block fm-typo-en-body-md-400 text-fm-color-typo-secondary mt-2" }, eo = {
20
+ key: 0,
21
+ class: "grid sm:grid-cols-2 gap-16"
22
+ }, to = {
23
+ key: 1,
24
+ class: "fm-typo-en-body-sm-400 text-fm-color-typo-error"
25
+ }, oo = { class: "flex items-center gap-16 p-16 rounded-md bg-fm-color-neutral-gray-100" }, no = { class: "flex flex-col gap-2 flex-1 min-w-0" }, lo = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-tertiary" }, ao = { class: "fm-typo-en-body-lg-600 truncate" }, so = { class: "flex gap-12" }, ro = { class: "flex flex-col gap-4" }, co = { class: "fm-typo-en-body-lg-600" }, io = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, uo = { class: "flex flex-col gap-8" }, mo = { class: "fm-typo-en-body-md-600" }, fo = { class: "flex flex-wrap gap-8" }, po = { class: "flex items-start gap-8" }, vo = { class: "flex items-center rounded-md border-1 border-fm-color-neutral-gray-300 overflow-hidden" }, go = {
26
+ for: "gift-card-custom-amount",
27
+ class: "sr-only"
28
+ }, yo = ["placeholder", "disabled"], bo = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, _o = { class: "text-fm-color-primary" }, xo = { class: "flex items-center gap-12 p-16 rounded-md border-1 border-fm-color-neutral-gray-300" }, Co = { class: "flex-1" }, ho = { class: "fm-typo-en-body-md-600" }, Ao = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Do = {
29
+ key: 0,
30
+ class: "flex gap-16"
31
+ }, Mo = {
32
+ key: 1,
33
+ class: "fm-typo-en-body-sm-400 text-fm-color-typo-error"
34
+ }, Eo = { class: "flex gap-12" }, Fo = { class: "flex flex-col gap-4" }, To = { class: "fm-typo-en-body-lg-600" }, ko = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, wo = {
35
+ key: 0,
36
+ class: "flex items-start gap-12 p-16 rounded-md bg-fm-color-system-info-100"
37
+ }, So = { class: "flex-1 fm-typo-en-body-md-400 text-fm-color-typo-primary" }, No = { class: "flex items-center gap-12" }, Uo = { class: "fm-typo-en-body-md-500" }, Vo = { class: "flex flex-col gap-8" }, Io = { class: "fm-typo-en-body-md-600" }, Po = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ro = { class: "flex flex-col gap-16 rounded-md border-1 border-fm-color-neutral-gray-300 p-16" }, Lo = {
38
+ key: 0,
39
+ class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
40
+ }, Go = {
41
+ key: 1,
42
+ class: "fm-typo-en-body-sm-400 text-fm-color-typo-error"
43
+ }, Ho = { class: "flex flex-wrap gap-8" }, $o = { class: "fm-typo-en-body-lg-600" }, Oo = {
44
+ key: 0,
45
+ class: "fm-typo-en-body-sm-400 text-fm-color-typo-error"
46
+ }, Xo = { class: "flex gap-12" }, Bo = { class: "flex flex-col gap-4" }, zo = { class: "fm-typo-en-body-lg-600" }, jo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Jo = { class: "flex flex-wrap items-center gap-8" }, Ko = {
47
+ for: "gift-card-terms-document",
48
+ class: "sr-only"
49
+ }, Wo = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, qo = {
50
+ key: 1,
51
+ class: "flex items-center gap-12 p-16 rounded-md border-1 border-fm-color-neutral-gray-300"
52
+ }, Zo = { class: "w-40 h-40 rounded-sm flex-none grid place-items-center bg-fm-color-neutral-gray-100" }, Yo = { class: "flex-1 min-w-0" }, Qo = ["href"], en = {
53
+ key: 0,
54
+ class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary"
55
+ }, tn = { class: "flex items-center justify-end gap-8 pt-8" }, Se = 5e6, on = 5e6, _n = /* @__PURE__ */ rt({
56
+ __name: "GiftCardSetup",
57
+ setup(nn) {
58
+ const { t: l } = At(), { global: Ne, minor: ee } = mt, Ue = Dt(), Ve = Mt(), G = p(() => Ve.params.id || null), H = p(() => !!G.value), F = d(""), h = d([]);
59
+ let fe = /* @__PURE__ */ new Set();
60
+ const pe = /* @__PURE__ */ new Set(), Ie = /* @__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), be = `https://${Fe.getBusinessId()}.${we.appUrl}/member/gift-cards`, N = d(
61
+ Te(be)
62
+ ), M = d("SMS"), v = d(["SMS"]), te = d({
63
+ SMS: !0,
64
+ WHATSAPP: !1,
65
+ EMAIL: !1
66
+ }), q = p(
67
+ () => ["SMS", "WHATSAPP", "EMAIL"].map((t) => ({
68
+ value: t,
69
+ label: l(`connect.store.giftCard.channel${t}`),
70
+ available: te.value[t]
71
+ }))
72
+ ), oe = p({
73
+ get: () => N.value[M.value],
74
+ set: (t) => {
75
+ N.value = {
76
+ ...N.value,
77
+ [M.value]: t
78
+ };
79
+ }
80
+ }), Pe = {
81
+ giftCard: {
82
+ amount: "RM100",
83
+ senderName: "Janey Wong",
84
+ number: "GCUB74IJ432D9KU78T",
85
+ recipientName: "John Doe",
86
+ personalMessage: "Happy birthday!"
87
+ },
88
+ business: {
89
+ name: "Kopi Haus"
90
+ }
91
+ }, _e = p(
92
+ () => q.value.filter((t) => !t.available).map((t) => t.label)
93
+ ), Re = `${we.licensePortalUrl}settings?businessId=${Fe.businessId}`;
94
+ function Le(t) {
95
+ 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))) {
96
+ const o = v.value[0];
97
+ o && (M.value = o);
98
+ }
99
+ }
100
+ async function Ge() {
101
+ try {
102
+ te.value = await pt.readBroadcastChannels();
103
+ } catch (t) {
104
+ console.error("Failed to load notification channel status", t);
105
+ }
106
+ }
107
+ const _ = d("NONE"), z = d(""), U = d(""), xe = d(null), He = /\.pdf$/i, j = d(null), $e = p(
108
+ () => {
109
+ var t;
110
+ return ((t = j.value) == null ? void 0 : t.name) ?? l("connect.store.giftCard.termsDocument");
111
+ }
112
+ );
113
+ function Oe(t) {
114
+ return t >= 1e6 ? `${(t / 1e6).toFixed(1)} MB` : `${Math.max(1, Math.round(t / 1e3))} KB`;
115
+ }
116
+ const ne = p(
117
+ () => A.value === "ADVANCED" ? {
118
+ ...Q(),
119
+ length: Number($.value),
120
+ charset: T.value,
121
+ prefix: O.value,
122
+ suffix: X.value
123
+ } : Q()
124
+ ), Xe = p(
125
+ () => yt(ne.value, ve.value)
126
+ ), Be = p(
127
+ () => bt(T.value) ?? 1
128
+ ), le = p(
129
+ () => A.value === "ADVANCED" ? _t(ne.value) : null
130
+ ), V = p(
131
+ () => f.value.length >= W
132
+ ), ze = p(() => [
133
+ ...ge.map((t) => ({ amount: t, custom: !1 })),
134
+ ...f.value.filter((t) => !ge.includes(t)).map((t) => ({ amount: t, custom: !0 }))
135
+ ]);
136
+ function je(t) {
137
+ t.custom || !f.value.includes(t.amount) && V.value || Ce(t.amount);
138
+ }
139
+ function Ce(t) {
140
+ if (f.value.includes(t)) {
141
+ f.value = f.value.filter((o) => o !== t);
142
+ return;
143
+ }
144
+ if (V.value) {
145
+ E.error(
146
+ l("connect.store.giftCard.maxAmounts", {
147
+ max: W
148
+ })
149
+ );
150
+ return;
151
+ }
152
+ f.value = [...f.value, t].sort((o, c) => o - c);
153
+ }
154
+ function he() {
155
+ const t = Number(k.value);
156
+ if (!Number.isInteger(t) || t <= 0) {
157
+ E.error(l("connect.store.giftCard.invalidAmount"));
158
+ return;
159
+ }
160
+ if (t > me) {
161
+ E.error(
162
+ l("connect.store.giftCard.amountTooLarge", { max: me })
163
+ );
164
+ return;
165
+ }
166
+ if (f.value.includes(t)) {
167
+ k.value = "";
168
+ return;
169
+ }
170
+ if (V.value) {
171
+ E.error(
172
+ l("connect.store.giftCard.maxAmounts", {
173
+ max: W
174
+ })
175
+ );
176
+ return;
177
+ }
178
+ f.value = [...f.value, t].sort((o, c) => o - c), k.value = "";
179
+ }
180
+ 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), Je = p(
181
+ () => F.value.trim() ? null : l("connect.store.giftCard.errorNoName")
182
+ ), se = p(
183
+ () => v.value.length ? null : l("connect.store.giftCard.errorNoChannel")
184
+ ), re = p(() => {
185
+ var t;
186
+ for (const o of ["SMS", "WHATSAPP", "EMAIL"]) {
187
+ const c = N.value[o];
188
+ if (!c.content.trim())
189
+ return l("connect.store.giftCard.errorNoDeliveryMessage", { channel: o });
190
+ if (o === "EMAIL" && !((t = c.title) != null && t.trim()))
191
+ return l("connect.store.giftCard.errorNoEmailTitle");
192
+ }
193
+ return null;
194
+ }), ce = p(
195
+ () => Je.value ?? le.value ?? ae.value ?? se.value ?? re.value
196
+ );
197
+ async function Ke(t) {
198
+ qe(t) && await ee(
199
+ async () => {
200
+ const o = await We(t);
201
+ h.value = [...h.value, o];
202
+ },
203
+ {
204
+ message: l("connect.store.giftCard.uploading"),
205
+ successMessage: l("connect.store.giftCard.uploaded")
206
+ }
207
+ );
208
+ }
209
+ function We(t) {
210
+ return L.update(
211
+ L.bundleImagePath(void 0, t),
212
+ t
213
+ );
214
+ }
215
+ function qe(t) {
216
+ const o = Ie.has(t.type) && t.size <= Se;
217
+ return o || E.error(l("connect.store.giftCard.invalidDesignFile")), o;
218
+ }
219
+ async function Ze(t) {
220
+ h.value = h.value.filter((o) => o !== t), await Ye(t);
221
+ }
222
+ async function Ye(t) {
223
+ if (fe.has(t)) {
224
+ pe.add(t);
225
+ return;
226
+ }
227
+ try {
228
+ await L.delete(t);
229
+ } catch {
230
+ }
231
+ }
232
+ function Qe() {
233
+ var t;
234
+ (t = xe.value) == null || t.click();
235
+ }
236
+ async function et(t) {
237
+ var y;
238
+ const o = t.target, c = (y = o.files) == null ? void 0 : y[0];
239
+ if (o.value = "", !!c) {
240
+ if (!He.test(c.name) || c.size > on) {
241
+ E.error(l("connect.store.giftCard.invalidTermsFile"));
242
+ return;
243
+ }
244
+ await ee(
245
+ async () => {
246
+ U.value = await L.update(
247
+ L.bundleImagePath(void 0, c),
248
+ c
249
+ ), j.value = { name: c.name, size: c.size }, _.value = "DOCUMENT";
250
+ },
251
+ {
252
+ message: l("connect.store.giftCard.uploading"),
253
+ successMessage: l("connect.store.giftCard.uploaded")
254
+ }
255
+ );
256
+ }
257
+ }
258
+ function tt() {
259
+ U.value = "", j.value = null, _.value = "NONE";
260
+ }
261
+ function Ae() {
262
+ return {
263
+ name: F.value.trim(),
264
+ designs: h.value,
265
+ numberFormat: ne.value,
266
+ denominations: f.value.map(Number),
267
+ anyAmount: D.value ? {
268
+ enabled: !0,
269
+ min: Number(w.value),
270
+ max: Number(S.value)
271
+ } : null,
272
+ channels: v.value,
273
+ allowPersonalMessage: B.value,
274
+ deliveryMessages: N.value,
275
+ termsAndConditions: _.value === "TEXT" && z.value || null,
276
+ termsDocumentUrl: _.value === "DOCUMENT" && U.value || null
277
+ };
278
+ }
279
+ function ot(t) {
280
+ var y, C, I, Z;
281
+ 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 = (Z = t.channels) != null && Z.length ? [...t.channels] : ["SMS"], B.value = t.allowPersonalMessage ?? !0, N.value = structuredClone(
282
+ t.deliveryMessages ?? Te(be)
283
+ ), M.value = v.value[0] ?? "SMS";
284
+ const o = t.numberFormat, c = !o || o.prefix === "GC" && Number(o.length) === 16;
285
+ 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);
286
+ }
287
+ function ie() {
288
+ Ue.push({ name: Et["$connect-STORE"] });
289
+ }
290
+ async function nt() {
291
+ if (ce.value) {
292
+ E.error(ce.value);
293
+ return;
294
+ }
295
+ await ee(
296
+ async () => {
297
+ const t = Ae();
298
+ G.value ? await ue.updateProgram(G.value, t) : await ue.createProgram(t), await Promise.allSettled(
299
+ [...pe].map((o) => L.delete(o))
300
+ ), ie();
301
+ },
302
+ {
303
+ message: H.value ? l("connect.store.giftCard.saving") : l("connect.store.giftCard.creating"),
304
+ successMessage: H.value ? l("connect.store.giftCard.saved") : l("connect.store.giftCard.created")
305
+ }
306
+ );
307
+ }
308
+ return ct(async () => {
309
+ await Ne(async () => {
310
+ await Ge(), G.value && ot(await ue.readProgram(G.value));
311
+ });
312
+ }), (t, o) => {
313
+ const c = x("FmButton"), y = x("FmTextField"), C = x("FmCard"), I = x("FmIcon"), Z = x("FmDropField"), lt = x("FmStepperField"), De = x("FmChip"), Me = x("FmSwitch"), at = x("FmCheckbox"), st = x("FmTextarea");
314
+ return u(), m("div", Ft, [
315
+ e(H) ? (u(), J(gt, {
316
+ key: 0,
317
+ json: Ae()
318
+ }, null, 8, ["json"])) : g("", !0),
319
+ n("div", Tt, [
320
+ r(c, {
321
+ icon: "arrow_back",
322
+ variant: "tertiary",
323
+ onClick: ie
324
+ }),
325
+ n("div", kt, [
326
+ n("h1", wt, s(e(H) ? e(l)("connect.store.giftCard.editTitle") : e(l)("connect.store.giftCard.createTitle")), 1),
327
+ n("p", St, s(e(l)("connect.store.giftCard.pageSubtitle")), 1)
328
+ ])
329
+ ]),
330
+ n("div", Nt, [
331
+ r(C, {
332
+ variant: "outlined",
333
+ class: "p-24 flex flex-col gap-16"
334
+ }, {
335
+ default: P(() => [
336
+ n("div", Ut, [
337
+ 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)),
338
+ n("div", Vt, [
339
+ n("div", It, s(e(l)("connect.store.giftCard.name")), 1)
340
+ ])
341
+ ]),
342
+ r(y, {
343
+ modelValue: e(F),
344
+ "onUpdate:modelValue": o[0] || (o[0] = (a) => b(F) ? F.value = a : null),
345
+ placeholder: e(l)("connect.store.giftCard.namePlaceholder")
346
+ }, null, 8, ["modelValue", "placeholder"])
347
+ ]),
348
+ _: 1
349
+ }),
350
+ r(C, {
351
+ variant: "outlined",
352
+ class: "p-24 flex flex-col gap-16"
353
+ }, {
354
+ default: P(() => [
355
+ n("div", Pt, [
356
+ 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)),
357
+ n("div", Rt, [
358
+ n("div", Lt, s(e(l)("connect.store.giftCard.design")), 1),
359
+ n("div", Gt, s(e(l)("connect.store.giftCard.designHint")), 1)
360
+ ])
361
+ ]),
362
+ n("div", Ht, [
363
+ (u(!0), m(R, null, K(e(h), (a, i) => (u(), m("div", {
364
+ key: a,
365
+ class: "relative w-[179px] h-[115px] rounded-md overflow-hidden border-1 border-fm-color-neutral-gray-300"
366
+ }, [
367
+ n("img", {
368
+ src: a,
369
+ alt: "",
370
+ class: "w-full h-full object-cover"
371
+ }, null, 8, $t),
372
+ n("button", {
373
+ type: "button",
374
+ 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",
375
+ "aria-label": e(l)("connect.common.remove"),
376
+ title: e(l)("connect.common.remove"),
377
+ onClick: (Ee) => Ze(a)
378
+ }, [
379
+ r(I, {
380
+ name: "close",
381
+ size: "sm"
382
+ })
383
+ ], 8, Ot),
384
+ n("span", Xt, s(e(l)("connect.store.giftCard.designOption", { index: i + 1 })), 1)
385
+ ]))), 128)),
386
+ r(Z, {
387
+ accept: ".png, .jpg, .jpeg, .gif",
388
+ "max-file-size": Se,
389
+ "content-class": "w-[179px] h-[115px]",
390
+ onFileUpload: Ke
391
+ })
392
+ ])
393
+ ]),
394
+ _: 1
395
+ }),
396
+ r(C, {
397
+ variant: "outlined",
398
+ class: "p-24 flex flex-col gap-16"
399
+ }, {
400
+ default: P(() => [
401
+ n("div", Bt, [
402
+ 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)),
403
+ n("div", zt, [
404
+ n("div", jt, s(e(l)("connect.store.giftCard.numberSettings")), 1),
405
+ n("div", Jt, s(e(l)("connect.store.giftCard.numberSettingsHint")), 1)
406
+ ])
407
+ ]),
408
+ n("div", Kt, [
409
+ (u(), m(R, null, K(["DEFAULT", "ADVANCED"], (a) => n("button", {
410
+ key: a,
411
+ type: "button",
412
+ class: Y([
413
+ "flex gap-12 items-start text-left p-16 rounded-md border-1 transition-colors",
414
+ e(A) === a ? "border-fm-color-primary" : "border-fm-color-neutral-gray-300"
415
+ ]),
416
+ onClick: (i) => A.value = a
417
+ }, [
418
+ n("span", {
419
+ class: Y([
420
+ "w-[18px] h-[18px] rounded-full border-1 flex-none mt-2 grid place-items-center",
421
+ e(A) === a ? "border-fm-color-primary" : "border-fm-color-neutral-gray-300"
422
+ ])
423
+ }, [
424
+ e(A) === a ? (u(), m("span", qt)) : g("", !0)
425
+ ], 2),
426
+ n("span", Zt, [
427
+ n("span", Yt, s(a === "DEFAULT" ? e(l)("connect.store.giftCard.numberDefault") : e(l)("connect.store.giftCard.numberAdvanced")), 1),
428
+ n("span", Qt, s(a === "DEFAULT" ? e(l)("connect.store.giftCard.numberDefaultHint") : e(l)("connect.store.giftCard.numberAdvancedHint")), 1)
429
+ ])
430
+ ], 10, Wt)), 64))
431
+ ]),
432
+ e(A) === "ADVANCED" ? (u(), m("div", eo, [
433
+ r(lt, {
434
+ modelValue: e($),
435
+ "onUpdate:modelValue": o[1] || (o[1] = (a) => b($) ? $.value = a : null),
436
+ label: e(l)("connect.store.giftCard.length"),
437
+ "helper-text": e(l)("connect.store.giftCard.lengthHint"),
438
+ min: e(Be),
439
+ max: e(xt),
440
+ step: 1
441
+ }, null, 8, ["modelValue", "label", "helper-text", "min", "max"]),
442
+ r(y, {
443
+ modelValue: e(T),
444
+ "onUpdate:modelValue": o[2] || (o[2] = (a) => b(T) ? T.value = a : null),
445
+ label: e(l)("connect.store.giftCard.charset"),
446
+ "max-length": e(Ct)
447
+ }, null, 8, ["modelValue", "label", "max-length"]),
448
+ r(y, {
449
+ modelValue: e(O),
450
+ "onUpdate:modelValue": o[3] || (o[3] = (a) => b(O) ? O.value = a : null),
451
+ label: e(l)("connect.store.giftCard.prefix"),
452
+ "max-length": e(ke)
453
+ }, null, 8, ["modelValue", "label", "max-length"]),
454
+ r(y, {
455
+ modelValue: e(X),
456
+ "onUpdate:modelValue": o[4] || (o[4] = (a) => b(X) ? X.value = a : null),
457
+ label: e(l)("connect.store.giftCard.suffix"),
458
+ "max-length": e(ke)
459
+ }, null, 8, ["modelValue", "label", "max-length"])
460
+ ])) : g("", !0),
461
+ e(le) ? (u(), m("div", to, s(e(le)), 1)) : g("", !0),
462
+ n("div", oo, [
463
+ n("div", no, [
464
+ n("span", lo, s(e(l)("connect.store.giftCard.exampleNumber")), 1),
465
+ n("span", ao, s(e(Xe)), 1)
466
+ ]),
467
+ r(c, {
468
+ label: e(l)("connect.store.giftCard.regenerate"),
469
+ icon: "refresh",
470
+ variant: "secondary",
471
+ onClick: o[5] || (o[5] = (a) => ve.value++)
472
+ }, null, 8, ["label"])
473
+ ])
474
+ ]),
475
+ _: 1
476
+ }),
477
+ r(C, {
478
+ variant: "outlined",
479
+ class: "p-24 flex flex-col gap-16"
480
+ }, {
481
+ default: P(() => [
482
+ n("div", so, [
483
+ 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)),
484
+ n("div", ro, [
485
+ n("div", co, s(e(l)("connect.store.giftCard.amount")), 1),
486
+ n("div", io, s(e(l)("connect.store.giftCard.amountHint", {
487
+ max: e(W)
488
+ })), 1)
489
+ ])
490
+ ]),
491
+ n("div", uo, [
492
+ n("div", mo, s(e(l)("connect.store.giftCard.popularAmounts")), 1),
493
+ n("div", fo, [
494
+ (u(!0), m(R, null, K(e(ze), (a) => (u(), J(De, {
495
+ key: a.amount,
496
+ label: `RM ${a.amount}`,
497
+ selectable: !a.custom,
498
+ removable: a.custom,
499
+ selected: e(f).includes(a.amount),
500
+ disabled: !a.custom && e(V) && !e(f).includes(a.amount),
501
+ onClick: (i) => je(a),
502
+ onChipClosed: (i) => Ce(a.amount)
503
+ }, null, 8, ["label", "selectable", "removable", "selected", "disabled", "onClick", "onChipClosed"]))), 128))
504
+ ])
505
+ ]),
506
+ n("div", po, [
507
+ n("div", vo, [
508
+ 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)),
509
+ n("label", go, s(e(l)("connect.store.giftCard.custom")), 1),
510
+ it(n("input", {
511
+ id: "gift-card-custom-amount",
512
+ "onUpdate:modelValue": o[6] || (o[6] = (a) => b(k) ? k.value = a : null),
513
+ type: "number",
514
+ class: "px-12 py-8 outline-none fm-typo-en-body-md-400 w-[140px] disabled:bg-fm-color-neutral-gray-100",
515
+ placeholder: e(l)("connect.store.giftCard.custom"),
516
+ disabled: e(V),
517
+ onKeyup: dt(he, ["enter"])
518
+ }, null, 40, yo), [
519
+ [ut, e(k)]
520
+ ])
521
+ ]),
522
+ r(c, {
523
+ label: e(l)("connect.store.giftCard.addAmount"),
524
+ variant: "secondary",
525
+ disabled: e(V),
526
+ onClick: he
527
+ }, null, 8, ["label", "disabled"])
528
+ ]),
529
+ n("div", bo, [
530
+ de(s(e(l)("connect.store.giftCard.selected")) + " ", 1),
531
+ n("span", _o, s(e(f).length), 1),
532
+ de(" / " + s(e(W)), 1)
533
+ ]),
534
+ n("div", xo, [
535
+ r(Me, {
536
+ modelValue: e(D),
537
+ "onUpdate:modelValue": o[7] || (o[7] = (a) => b(D) ? D.value = a : null)
538
+ }, null, 8, ["modelValue"]),
539
+ n("div", Co, [
540
+ n("div", ho, s(e(l)("connect.store.giftCard.anyAmount")), 1),
541
+ n("div", Ao, s(e(l)("connect.store.giftCard.anyAmountHint")), 1)
542
+ ])
543
+ ]),
544
+ e(D) ? (u(), m("div", Do, [
545
+ r(y, {
546
+ modelValue: e(w),
547
+ "onUpdate:modelValue": o[8] || (o[8] = (a) => b(w) ? w.value = a : null),
548
+ type: "number",
549
+ label: e(l)("connect.store.giftCard.min"),
550
+ class: "flex-1"
551
+ }, null, 8, ["modelValue", "label"]),
552
+ r(y, {
553
+ modelValue: e(S),
554
+ "onUpdate:modelValue": o[9] || (o[9] = (a) => b(S) ? S.value = a : null),
555
+ type: "number",
556
+ label: e(l)("connect.store.giftCard.max"),
557
+ "helper-text": `Up to RM${e(me)}`,
558
+ class: "flex-1"
559
+ }, null, 8, ["modelValue", "label", "helper-text"])
560
+ ])) : g("", !0),
561
+ e(ae) ? (u(), m("div", Mo, s(e(ae)), 1)) : g("", !0)
562
+ ]),
563
+ _: 1
564
+ }),
565
+ r(C, {
566
+ variant: "outlined",
567
+ class: "p-24 flex flex-col gap-16"
568
+ }, {
569
+ default: P(() => {
570
+ var a;
571
+ return [
572
+ n("div", Eo, [
573
+ 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)),
574
+ n("div", Fo, [
575
+ n("div", To, s(e(l)("connect.store.giftCard.sending")), 1),
576
+ n("div", ko, s(e(l)("connect.store.giftCard.sendingHint")), 1)
577
+ ])
578
+ ]),
579
+ e(ye) ? g("", !0) : (u(), m("div", wo, [
580
+ r(I, {
581
+ name: "info",
582
+ class: "text-fm-color-system-info-400 flex-none"
583
+ }),
584
+ n("div", So, s(e(l)("connect.store.giftCard.broadcastNotice")), 1),
585
+ r(c, {
586
+ icon: "close",
587
+ variant: "tertiary",
588
+ onClick: o[10] || (o[10] = (i) => ye.value = !0)
589
+ })
590
+ ])),
591
+ n("div", No, [
592
+ r(Me, {
593
+ modelValue: e(B),
594
+ "onUpdate:modelValue": o[11] || (o[11] = (i) => b(B) ? B.value = i : null)
595
+ }, null, 8, ["modelValue"]),
596
+ n("span", Uo, s(e(l)("connect.store.giftCard.personalMessage")), 1)
597
+ ]),
598
+ n("div", Vo, [
599
+ n("div", Io, s(e(l)("connect.store.giftCard.channels")), 1),
600
+ n("div", Po, s(e(l)("connect.store.giftCard.channelsHint")), 1),
601
+ n("div", Ro, [
602
+ (u(!0), m(R, null, K(e(q), (i) => (u(), J(at, {
603
+ key: i.value,
604
+ value: i.value,
605
+ label: i.label,
606
+ "model-value": e(v).includes(i.value),
607
+ disabled: !i.available && !e(v).includes(i.value),
608
+ "onUpdate:modelValue": (Ee) => Le(i.value)
609
+ }, null, 8, ["value", "label", "model-value", "disabled", "onUpdate:modelValue"]))), 128))
610
+ ]),
611
+ e(_e).length ? (u(), m("div", Lo, [
612
+ de(s(e(l)("connect.store.giftCard.channelUnavailable", {
613
+ channels: e(_e).join(", ")
614
+ })) + " ", 1),
615
+ n("a", {
616
+ href: Re,
617
+ target: "_blank",
618
+ rel: "noopener",
619
+ class: "underline fm-typo-en-body-md-600 text-fm-color-primary"
620
+ }, s(e(l)("connect.store.giftCard.channelConfigure")), 1)
621
+ ])) : g("", !0),
622
+ e(se) ? (u(), m("div", Go, s(e(se)), 1)) : g("", !0)
623
+ ]),
624
+ e(v).length ? (u(), m(R, { key: 1 }, [
625
+ n("div", Ho, [
626
+ (u(!0), m(R, null, K(e(q).filter(
627
+ (i) => e(v).includes(i.value)
628
+ ), (i) => (u(), J(De, {
629
+ key: i.value,
630
+ label: i.label,
631
+ selectable: "",
632
+ selected: e(M) === i.value,
633
+ onClick: (Ee) => M.value = i.value
634
+ }, null, 8, ["label", "selected", "onClick"]))), 128))
635
+ ]),
636
+ n("div", $o, s(e(l)("connect.store.giftCard.deliveryMessage", {
637
+ channel: (a = e(q).find(
638
+ (i) => i.value === e(M)
639
+ )) == null ? void 0 : a.label
640
+ })), 1),
641
+ r(vt, {
642
+ modelValue: e(oe),
643
+ "onUpdate:modelValue": o[12] || (o[12] = (i) => b(oe) ? oe.value = i : null),
644
+ variables: [...e(ht)],
645
+ "preview-data": Pe
646
+ }, null, 8, ["modelValue", "variables"]),
647
+ e(re) ? (u(), m("div", Oo, s(e(re)), 1)) : g("", !0)
648
+ ], 64)) : g("", !0)
649
+ ];
650
+ }),
651
+ _: 1
652
+ }),
653
+ r(C, {
654
+ variant: "outlined",
655
+ class: "p-24 flex flex-col gap-16"
656
+ }, {
657
+ default: P(() => [
658
+ n("div", Xo, [
659
+ 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)),
660
+ n("div", Bo, [
661
+ n("div", zo, s(e(l)("connect.store.giftCard.terms")), 1),
662
+ n("div", jo, s(e(l)("connect.store.giftCard.termsHint")), 1)
663
+ ])
664
+ ]),
665
+ n("div", Jo, [
666
+ n("label", Ko, s(e(l)("connect.store.giftCard.termsDocument")), 1),
667
+ n("input", {
668
+ id: "gift-card-terms-document",
669
+ ref_key: "termsInput",
670
+ ref: xe,
671
+ type: "file",
672
+ accept: ".pdf",
673
+ class: "hidden",
674
+ onChange: et
675
+ }, null, 544),
676
+ r(c, {
677
+ label: e(l)("connect.store.giftCard.enterText"),
678
+ icon: "edit",
679
+ variant: "secondary",
680
+ class: Y(
681
+ e(_) === "TEXT" ? "border-fm-color-primary text-fm-color-primary" : ""
682
+ ),
683
+ onClick: o[13] || (o[13] = (a) => _.value = "TEXT")
684
+ }, null, 8, ["label", "class"]),
685
+ r(c, {
686
+ label: e(l)("connect.store.giftCard.uploadDocument"),
687
+ icon: "upload",
688
+ variant: "secondary",
689
+ class: Y(
690
+ e(_) === "DOCUMENT" ? "border-fm-color-primary text-fm-color-primary" : ""
691
+ ),
692
+ onClick: Qe
693
+ }, null, 8, ["label", "class"])
694
+ ]),
695
+ n("div", Wo, s(e(l)("connect.store.giftCard.uploadDocumentHint")), 1),
696
+ e(_) === "TEXT" ? (u(), J(st, {
697
+ key: 0,
698
+ modelValue: e(z),
699
+ "onUpdate:modelValue": o[14] || (o[14] = (a) => b(z) ? z.value = a : null),
700
+ rows: 5,
701
+ placeholder: e(l)("connect.store.giftCard.termsPlaceholder")
702
+ }, null, 8, ["modelValue", "placeholder"])) : e(_) === "DOCUMENT" && e(U) ? (u(), m("div", qo, [
703
+ n("span", Zo, [
704
+ r(I, {
705
+ name: "description",
706
+ class: "text-fm-color-typo-secondary"
707
+ })
708
+ ]),
709
+ n("div", Yo, [
710
+ n("a", {
711
+ href: e(U),
712
+ target: "_blank",
713
+ rel: "noopener",
714
+ class: "block fm-typo-en-body-md-600 truncate"
715
+ }, s(e($e)), 9, Qo),
716
+ e(j) ? (u(), m("div", en, s(Oe(e(j).size)) + " · " + s(e(l)("connect.store.giftCard.termsUploadedJustNow")), 1)) : g("", !0)
717
+ ]),
718
+ r(c, {
719
+ icon: "delete",
720
+ variant: "tertiary",
721
+ "aria-label": e(l)("connect.common.remove"),
722
+ onClick: tt
723
+ }, null, 8, ["aria-label"])
724
+ ])) : g("", !0)
725
+ ]),
726
+ _: 1
727
+ }),
728
+ n("div", tn, [
729
+ r(c, {
730
+ label: e(l)("connect.common.cancel"),
731
+ variant: "tertiary",
732
+ onClick: ie
733
+ }, null, 8, ["label"]),
734
+ r(c, {
735
+ label: e(H) ? e(l)("connect.common.save") : e(l)("connect.store.giftCard.addGiftCard"),
736
+ loading: e(ft)().isLoading,
737
+ disabled: !!e(ce),
738
+ onClick: nt
739
+ }, null, 8, ["label", "loading", "disabled"])
740
+ ])
741
+ ])
742
+ ]);
743
+ };
744
+ }
745
+ });
746
+ export {
747
+ _n as default
748
+ };