@feedmepos/mf-connect 0.1.111-prod → 0.1.113-beta.3

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 (162) hide show
  1. package/README.md +66 -1
  2. package/dist/{App-D3pYl3WL.js → App-YfpYV7C0.js} +738 -689
  3. package/dist/AuditLogs-kD0_HO_p.js +2016 -0
  4. package/dist/{Bin-DOZqpbYH.js → Bin-Dr-Xp3pn.js} +8 -8
  5. package/dist/Broadcast-CEbHu2xA.js +306 -0
  6. package/dist/{CampaignAnalytic-cFKvCgxX.js → CampaignAnalytic-DDiGxPwp.js} +7 -7
  7. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-B0eVEubS.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Cc_Yho9-.js} +49 -32
  8. package/dist/Card-BUnwg0eM.js +1086 -0
  9. package/dist/{Collections-9QK5hbLo.js → Collections-CKyBkKq2.js} +197 -185
  10. package/dist/{Credit-8Ouy4O9a.js → Credit-CJOXWLV1.js} +21 -20
  11. package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-CJA-yunY.js → DateRangeChip.vue_vue_type_script_setup_true_lang-DmEBLeNI.js} +1 -1
  12. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-Ce5R4Un6.js +4442 -0
  13. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-Dv0q3B8m.js → EffectSheet.vue_vue_type_style_index_0_lang-CMFmlqfF.js} +32 -32
  14. package/dist/{Experience-DMh4hR1S.js → Experience-C_Am5CTY.js} +32 -31
  15. package/dist/{FileSaver.min-Bx9mdUgJ.js → FileSaver.min-CueAGbjq.js} +1 -1
  16. package/dist/{Game-CL0TZvg1.js → Game-B6GO_LVU.js} +19 -18
  17. package/dist/GiftCardSetup-CVLDDpI2.js +748 -0
  18. package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-Bz5kIfoM.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-isfGhKO1.js} +7 -7
  19. package/dist/{Goals-Dz5Vp-lj.js → Goals-BX-sMV2V.js} +4 -4
  20. package/dist/Grab-Bh335Srh.js +301 -0
  21. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-CaPDI3vY.js → ImageInput.vue_vue_type_script_setup_true_lang-srSgUY3e.js} +1 -1
  22. package/dist/{Index-kH8aAegB.js → Index-CyXRbwcm.js} +10 -10
  23. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-CFrgC3Ka.js → LocationPicker.vue_vue_type_script_setup_true_lang-S3GB2Ems.js} +1 -1
  24. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-DPIFLdBc.js → LottieAnimation.vue_vue_type_script_setup_true_lang-ZlWHXwXZ.js} +1 -1
  25. package/dist/{LoyaltyDashboard-BBxEoWol.js → LoyaltyDashboard-DrTq8oiu.js} +15 -15
  26. package/dist/MainLayout-KbKkpX5n.js +4 -0
  27. package/dist/{MainLayout-2BLwDyHQ.js → MainLayout.vue_vue_type_script_setup_true_lang-2D5ate_s.js} +5 -4
  28. package/dist/{Marketing-C4OnSV-c.js → Marketing-DQT1MWQg.js} +4 -4
  29. package/dist/MarketingMaterialEdit-fSqr53-M.js +1037 -0
  30. package/dist/{Member-CT9WwxP0.js → Member-DwDUCzlv.js} +7 -7
  31. package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-C7yznkUn.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-DaQ4Lw8f.js} +43 -49
  32. package/dist/{MemberImportHistory-B__BFID7.js → MemberImportHistory-D4ezvJGZ.js} +7 -7
  33. package/dist/{MemberList-DgLI4wty.js → MemberList-DFieV7Qk.js} +103 -105
  34. package/dist/{MemberTransactions-UFx_DZYe.js → MemberTransactions-BPOXyAuC.js} +1 -1
  35. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-BFjZA8Y6.js → MessageInput.vue_vue_type_script_setup_true_lang-DhfsgDd4.js} +4821 -4690
  36. package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-Df9bxbUl.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-CX8bk_IQ.js} +1 -1
  37. package/dist/{Mission-CawzGzDu.js → Mission-nErb05Es.js} +22 -21
  38. package/dist/{Overview-D19oSo24.js → Overview-7G31a7B-.js} +58 -56
  39. package/dist/{Overview-CAtTlEVa.js → Overview-DuJr_hAg.js} +145 -144
  40. package/dist/{Point-BPAGmKAj.js → Point-PWDLemD4.js} +22 -21
  41. package/dist/{Promotion-B0Uf9vjL.js → Promotion-N80Tj8M6.js} +137 -131
  42. package/dist/{Queue-CJEAFss_.js → Queue-M7ZpgiMT.js} +49 -47
  43. package/dist/{Record-s6hSQG2P.js → Record-NhxrdvWv.js} +9 -9
  44. package/dist/{Review-DhNCbAOm.js → Review-DiAaAzIG.js} +2 -2
  45. package/dist/ReviewFacebookCallback-JdyxFbNl.js +225 -0
  46. package/dist/{ReviewGoogleCallback-D8ENWii2.js → ReviewGoogleCallback-BXbI3Bsh.js} +5 -5
  47. package/dist/{Reward-BT00QsXL.js → Reward-yTaOqOT8.js} +29 -29
  48. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-DaZDGhbm.js → RewardGroup.vue_vue_type_script_setup_true_lang-BWPfjZ9K.js} +26 -24
  49. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-Cz2H9MKe.js +1923 -0
  50. package/dist/{Segment-BuGhX9zg.js → Segment-DE9Bcd6R.js} +287 -287
  51. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-DB718_4P.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-pmv0cb4J.js} +37 -35
  52. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-CkgXxy0C.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BeWwkTix.js} +4 -4
  53. package/dist/Setting-C0JAxIRT.js +574 -0
  54. package/dist/{SettingAdvertisements-aqFErKAr.js → SettingAdvertisements-DxueyKU8.js} +12 -12
  55. package/dist/Settings-Cs46AcxZ.js +286 -0
  56. package/dist/Store-DqQae9nE.js +2629 -0
  57. package/dist/{StoreRewards-D2pTL2oA.js → StoreRewards-JxSUsOzJ.js} +15 -15
  58. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-qgrBtUNX.js +1319 -0
  59. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-D7ifzgsI.js +7007 -0
  60. package/dist/{Tier-OyE8oH2r.js → Tier-DWhgWush.js} +2576 -686
  61. package/dist/{Title-DAl7CKL_.js → Title-DUNeMdz8.js} +104 -101
  62. package/dist/Transaction-DAv-LVhC.js +45 -0
  63. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-C0yHxQVr.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-Cih-9IoW.js} +26 -26
  64. package/dist/{Voucher-D2QGWSxs.js → Voucher-uLTq9RSK.js} +19 -19
  65. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-Bt2YB745.js → VoucherEditor.vue_vue_type_script_setup_true_lang-BevVL_Kx.js} +16 -16
  66. package/dist/WhatsappAccount-BpXQ4q0P.js +158 -0
  67. package/dist/WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-EssnbsgT.js +39 -0
  68. package/dist/WhatsappBot-DB4NRZMd.js +589 -0
  69. package/dist/WhatsappBotLogs-DDN4H_bv.js +372 -0
  70. package/dist/WhatsappBotSettings-Bkv1VNwF.js +387 -0
  71. package/dist/WhatsappBotTickets-DAKgnE6T.js +162 -0
  72. package/dist/WhatsappLayout-DSnq84Uo.js +21 -0
  73. package/dist/WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-1BvxPD-k.js +195 -0
  74. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-BzCL64Jo.js → ZodTextField.vue_vue_type_script_setup_true_lang-CR-F0x1r.js} +2 -2
  75. package/dist/{app-QxosLNkH.js → app-Devzv4gO.js} +12854 -9732
  76. package/dist/app.js +4 -3
  77. package/dist/base.export-CCSMkvAm.js +75 -0
  78. package/dist/browser-BSAOEeIM.js +1478 -0
  79. package/dist/{business-CbqG6NXr.js → business-BjAmUqNA.js} +1 -1
  80. package/dist/campaign-C5c47GqT.js +400 -0
  81. package/dist/{campaign-Rj7oDBnN.js → campaign-CTe-T5Gd.js} +31 -25
  82. package/dist/{campaign.enum-B7vdNYKd.js → campaign.enum-Dx-Zo68Q.js} +3 -2
  83. package/dist/campaign.fn-DxAO8A5b.js +776 -0
  84. package/dist/{collectible.enum-BsQseg7-.js → collectible.enum-Liy2wH3s.js} +1 -1
  85. package/dist/{collection.fn-EbUIyB1X.js → collection.fn-C9l-OtNt.js} +2 -2
  86. package/dist/currency-mwm4AWXK.js +7 -0
  87. package/dist/duplicateCampaign-BbC4AwQ1.js +51 -0
  88. package/dist/{effect-B_91OlcX.js → effect-D8ba9z0K.js} +1 -1
  89. package/dist/{email-addresses-DXnYZG-e.js → email-addresses-BR5J6_Jz.js} +2 -2
  90. package/dist/feature-flag-C-5NdFW8.js +868 -0
  91. package/dist/feature-flag-CNcU4_3r.js +50 -0
  92. package/dist/google-BQK68wbe.js +5 -0
  93. package/dist/{helper-_uhiXya1.js → helper-D9cEaMIv.js} +1 -1
  94. package/dist/index-0H82-X0n.js +80 -0
  95. package/dist/{index-Cp7oHMm3.js → index-B1jP-_Z_.js} +691 -229
  96. package/dist/{index-BZ2b0Pk6.js → index-B7HH6vKF.js} +8 -7
  97. package/dist/{index-tbo0pMIu.js → index-BFaZp6Et.js} +29 -15
  98. package/dist/index-B_gzo75q.js +53 -0
  99. package/dist/{index-DlQJZNwD.js → index-BfoDdVQS.js} +22 -6
  100. package/dist/{index-CDm0BWa3.js → index-BvY2hQac.js} +1 -1
  101. package/dist/index-Byg4ztr-.js +902 -0
  102. package/dist/{index-BWgc2-Qz.js → index-CZfqqrVu.js} +4 -3
  103. package/dist/index-C_H8jFYf.js +2743 -0
  104. package/dist/{index-xuFTeVrb.js → index-CmzjBrHR.js} +11 -9
  105. package/dist/{index-BBihP1s2.js → index-Ct6YjTIW.js} +2 -2
  106. package/dist/{index-Df4l6y-S.js → index-D34iYRdc.js} +1900 -2121
  107. package/dist/{index-DuhRCI0L.js → index-D4k1G2oE.js} +4 -4
  108. package/dist/{index-uuNGb1nv.js → index-DnepoNWn.js} +8028 -10766
  109. package/dist/index-Drmh0FT-.js +14571 -0
  110. package/dist/{index-DlGnYR5y.js → index-DtcUCknS.js} +2700 -2613
  111. package/dist/{index-C_1iqF1Q.js → index-DwTBiVts.js} +1 -1
  112. package/dist/{index-CWUmrVo_.js → index-OvnHt5x5.js} +800 -793
  113. package/dist/index-RwNlbTO8.js +115 -0
  114. package/dist/{index-CzYxnDWP.js → index-VqAbYyHH.js} +11 -6
  115. package/dist/{index-DzBzClHP.js → index-yGSko6Eq.js} +1 -1
  116. package/dist/{index.esm2017-B72iWwk_.js → index.esm2017-DLb2VyCT.js} +156 -156
  117. package/dist/{loading-rIhCiB_S.js → loading-CUNk5u1d.js} +1 -1
  118. package/dist/{lodash-B6fOjfjd.js → lodash-BJXravls.js} +1 -1
  119. package/dist/{member-import-CbHn7zss.js → member-import-DjYoddBi.js} +6 -5
  120. package/dist/{membership-DkJN7jyQ.js → membership-ByJUFP8f.js} +3 -3
  121. package/dist/{money-ChbDx6Nq.js → money-Bf2IEMJJ.js} +1 -1
  122. package/dist/{number-9TEd27Ku.js → number-CRBHrRUL.js} +1 -1
  123. package/dist/objectid-58gyOvdR.js +145 -0
  124. package/dist/{onboarding-BN3MKVRs.js → onboarding-CQ3lw7eY.js} +25 -25
  125. package/dist/{onboardingSetup-D9xhdgS3.js → onboardingSetup-CsdZKGFk.js} +2 -2
  126. package/dist/{plugins-CCibSJZa.js → plugins-iTZLbJGy.js} +3 -3
  127. package/dist/{MarketingMaterialEdit-DFhpsI2-.js → remy-icon-BhUGu2NI.js} +2 -1031
  128. package/dist/{reward-DjasF-NL.js → reward-DTN6JpEd.js} +1 -1
  129. package/dist/{rule-DqeChj0e.js → rule-BYACNQOL.js} +572 -492
  130. package/dist/style.css +1 -1
  131. package/dist/template--Vr0PCjB.js +188 -0
  132. package/dist/{timezone-D0nC1LDx.js → timezone-DwzjOED-.js} +1 -1
  133. package/dist/{transaction.fn-BkF4Ad2z.js → transaction.fn-DapYe3n7.js} +2 -2
  134. package/dist/{trigger-CxpXoQJO.js → trigger-D8r76yb0.js} +18 -18
  135. package/dist/{useMarketingMaterialActions-p0-fyMkm.js → useMarketingMaterialActions-CdMmibPE.js} +3 -3
  136. package/dist/{usePagination-CrC-1v4L.js → usePagination-BRcQJkO1.js} +1 -1
  137. package/dist/useWhatsappAccount-BOJ8fz84.js +62 -0
  138. package/dist/{user-CrylHgF1.js → user-vBZFKqXQ.js} +1 -1
  139. package/dist/vue-i18n-Cw6fF11e.js +2365 -0
  140. package/dist/{xlsx-CJNYF7-l.js → xlsx-Muy_Rjhk.js} +440 -440
  141. package/dist/{zod-Dzn9S95S.js → zod-CCPTOeUz.js} +1 -1
  142. package/package.json +12 -3
  143. package/dist/Broadcast-DZ4SP99P.js +0 -271
  144. package/dist/Card-B5ni027Q.js +0 -911
  145. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-BYxswo-Z.js +0 -2430
  146. package/dist/ReviewFacebookCallback-DeZqcpJo.js +0 -238
  147. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-BvxbKSkB.js +0 -1882
  148. package/dist/Setting-BOWPp05N.js +0 -2036
  149. package/dist/Settings-DekXvE-R.js +0 -179
  150. package/dist/Store-DpVlMuau.js +0 -1998
  151. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CNDv6eiZ.js +0 -1009
  152. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-C-C3RSeW.js +0 -142
  153. package/dist/Transaction-mvKzTgLx.js +0 -39
  154. package/dist/campaign-Co4Lq-Wz.js +0 -228
  155. package/dist/campaign.fn-DolD3lYJ.js +0 -776
  156. package/dist/export-D0hWZSfH.js +0 -97
  157. package/dist/google-C3S8u0mT.js +0 -4
  158. package/dist/index-aCuOvuEC.js +0 -45
  159. package/dist/objectid-CGol1NeA.js +0 -145
  160. package/dist/rule-builder-DT854ycI.js +0 -102
  161. package/dist/template-BeCVA0-N.js +0 -236
  162. package/dist/vue-i18n-BjtkXdmG.js +0 -2365
@@ -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-CUNk5u1d.js";
3
+ import { u as ft } from "./app-wDQR6dpb.js";
4
+ import { n as M, f as L } from "./plugins-iTZLbJGy.js";
5
+ import "./index-BvY2hQac.js";
6
+ import { g as ue } from "./index-B_gzo75q.js";
7
+ import { c as pt } from "./index-VqAbYyHH.js";
8
+ import { S as Fe } from "./index-OvnHt5x5.js";
9
+ import { b as vt } from "./MessageInput.vue_vue_type_script_setup_true_lang-DhfsgDd4.js";
10
+ import { J as gt } from "./JsonViewer-v8_C7l5N.js";
11
+ import { z as Q, A as Te, B as yt, C as bt, E as _t, G as W, H as xt, I as Ct, J as ke, K as me, L as ht } from "./index-D34iYRdc.js";
12
+ import { u as At } from "./vue-i18n-Cw6fF11e.js";
13
+ import { useRouter as Dt, useRoute as Et } from "vue-router";
14
+ import { R as Mt } from "./app-Devzv4gO.js";
15
+ var Se = { 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 Ft = { class: "relative px-24 pb-40" }, Tt = { class: "flex items-start gap-12 py-24" }, kt = { class: "flex flex-col gap-4" }, St = { 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" }, 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"], Zt = {
17
+ key: 0,
18
+ class: "w-[9px] h-[9px] rounded-full bg-fm-color-primary"
19
+ }, qt = { 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
+ }, Eo = {
32
+ key: 1,
33
+ class: "fm-typo-en-body-sm-400 text-fm-color-typo-error"
34
+ }, Mo = { 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" }, So = {
35
+ key: 0,
36
+ class: "flex items-start gap-12 p-16 rounded-md bg-fm-color-system-info-100"
37
+ }, wo = { 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" }, Zo = {
50
+ key: 1,
51
+ class: "flex items-center gap-12 p-16 rounded-md border-1 border-fm-color-neutral-gray-300"
52
+ }, qo = { 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" }, we = 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 = Et(), 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), S = d(10), w = d(100), ye = d(!1), B = d(!0), be = `https://${Fe.getBusinessId()}.${Se.appUrl}/member/gift-cards`, N = d(
61
+ Te(be)
62
+ ), E = d("SMS"), v = d(["SMS"]), te = d({
63
+ SMS: !0,
64
+ WHATSAPP: !1,
65
+ EMAIL: !1
66
+ }), Z = 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[E.value],
74
+ set: (t) => {
75
+ N.value = {
76
+ ...N.value,
77
+ [E.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
+ () => Z.value.filter((t) => !t.available).map((t) => t.label)
93
+ ), Re = `${Se.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(E.value))) {
96
+ const o = v.value[0];
97
+ o && (E.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
+ M.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
+ M.error(l("connect.store.giftCard.invalidAmount"));
158
+ return;
159
+ }
160
+ if (t > me) {
161
+ M.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
+ M.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(S.value) > Number(w.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
+ Ze(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 Ze(t) {
216
+ const o = Ie.has(t.type) && t.size <= we;
217
+ return o || M.error(l("connect.store.giftCard.invalidDesignFile")), o;
218
+ }
219
+ async function qe(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
+ M.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(S.value),
270
+ max: Number(w.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, q;
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), S.value = ((C = t.anyAmount) == null ? void 0 : C.min) ?? 10, w.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(
282
+ t.deliveryMessages ?? Te(be)
283
+ ), E.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: Mt["$connect-STORE"] });
289
+ }
290
+ async function nt() {
291
+ if (ce.value) {
292
+ M.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"), q = x("FmDropField"), lt = x("FmStepperField"), De = x("FmChip"), Ee = 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", St, s(e(H) ? e(l)("connect.store.giftCard.editTitle") : e(l)("connect.store.giftCard.createTitle")), 1),
327
+ n("p", wt, 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: (Me) => qe(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(q, {
387
+ accept: ".png, .jpg, .jpeg, .gif",
388
+ "max-file-size": we,
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", Zt)) : g("", !0)
425
+ ], 2),
426
+ n("span", qt, [
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(Ee, {
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(S),
547
+ "onUpdate:modelValue": o[8] || (o[8] = (a) => b(S) ? S.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(w),
554
+ "onUpdate:modelValue": o[9] || (o[9] = (a) => b(w) ? w.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", Eo, 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", Mo, [
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", So, [
580
+ r(I, {
581
+ name: "info",
582
+ class: "text-fm-color-system-info-400 flex-none"
583
+ }),
584
+ n("div", wo, 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(Ee, {
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(Z), (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": (Me) => 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(Z).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(E) === i.value,
633
+ onClick: (Me) => E.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(Z).find(
638
+ (i) => i.value === e(E)
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", Zo, [
703
+ n("span", qo, [
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
+ };