@feedmepos/mf-connect 0.1.98-beta.8 → 0.1.98-beta.80

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 (167) hide show
  1. package/dist/{App-DsB2o1oB.js → App-DievprEi.js} +853 -683
  2. package/dist/{AuditLogs-BcfgiYnJ.js → AuditLogs-DrdqOhZL.js} +16 -13
  3. package/dist/{Bin-DMr7K8Kj.js → Bin-Ci2k3z77.js} +8 -8
  4. package/dist/Broadcast-CpDMAG1o.js +306 -0
  5. package/dist/CampaignAnalytic-uRyGaLaN.js +1830 -0
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CwGoEBsW.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DtGe2Og1.js} +8 -5
  7. package/dist/Card-tb98Kyr-.js +1086 -0
  8. package/dist/{Collections-B0uGC2FE.js → Collections-P1S5WjnJ.js} +14 -13
  9. package/dist/Credit-DwK7JYf-.js +286 -0
  10. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-Cyk0iIsd.js +53 -0
  11. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-8r29jKh9.js +4432 -0
  12. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-DJLxGk7W.js → EffectSheet.vue_vue_type_style_index_0_lang-BML_-v8I.js} +36 -36
  13. package/dist/Experience-BejtRlOj.js +288 -0
  14. package/dist/{FileSaver.min-BlA0oZEC.js → FileSaver.min-C-hmBaHm.js} +1 -1
  15. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-3bH-tZAm.js +138 -0
  16. package/dist/Game-n8qL896g.js +356 -0
  17. package/dist/GiftCardSetup-Bgsfcu7N.js +736 -0
  18. package/dist/GoalPickerPanel.vue_vue_type_script_setup_true_lang-CzL68PPP.js +424 -0
  19. package/dist/Goals-BB8LJlq3.js +247 -0
  20. package/dist/{Grab-DmmwrGzk.js → Grab-COq3Ujst.js} +33 -32
  21. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-DNtLW0yQ.js → ImageInput.vue_vue_type_script_setup_true_lang-BmLclEyi.js} +1 -1
  22. package/dist/{Index-m7l4insz.js → Index-BdkIinaE.js} +10 -10
  23. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-B9sJ-M20.js → LocationPicker.vue_vue_type_script_setup_true_lang-DsWv3DVb.js} +1 -1
  24. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-Dsg2sWjF.js → LottieAnimation.vue_vue_type_script_setup_true_lang-DvOzGF8c.js} +1 -1
  25. package/dist/LoyaltyDashboard-D4Jtpw0n.js +2911 -0
  26. package/dist/MainLayout-Ca-Xm3eZ.js +143 -0
  27. package/dist/{Marketing-C9pSIdBU.js → Marketing-Cpe4s7NZ.js} +7 -6
  28. package/dist/{MarketingMaterialEdit-BEF2T9LR.js → MarketingMaterialEdit-nTeS9VVx.js} +15 -14
  29. package/dist/Member-DgGZ4Cdg.js +654 -0
  30. package/dist/MemberDetailSheet.vue_vue_type_script_setup_true_lang-_O3B-FIA.js +1281 -0
  31. package/dist/MemberImportHistory-rdlbDVWU.js +187 -0
  32. package/dist/MemberList-BC4aRJTt.js +334 -0
  33. package/dist/{MemberTransactions-CAut1TQb.js → MemberTransactions-BFfdTttp.js} +1 -1
  34. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-1AuHixPC.js → MessageInput.vue_vue_type_script_setup_true_lang-DXajAQy9.js} +5928 -5644
  35. package/dist/MetricInfoTooltip.vue_vue_type_script_setup_true_lang-8xVDzdO3.js +40 -0
  36. package/dist/Mission-BWCNKTjU.js +363 -0
  37. package/dist/Overview--Q7vzhNK.js +1316 -0
  38. package/dist/{Overview-DOJj4XvO.js → Overview-i02Wnyjn.js} +23 -20
  39. package/dist/Point-CiWxqny5.js +297 -0
  40. package/dist/Promotion-B0G9qfBm.js +426 -0
  41. package/dist/{Queue-55G2gtP5.js → Queue-YfwgYmzH.js} +16 -13
  42. package/dist/{Record-DNPI02c6.js → Record-CCuwrPKW.js} +9 -9
  43. package/dist/Review-ymsfdh7Q.js +45 -0
  44. package/dist/ReviewFacebookCallback-DyDExWvP.js +238 -0
  45. package/dist/ReviewGoogleCallback-DNyg3n2S.js +213 -0
  46. package/dist/{Reward-CnP8R2pS.js → Reward-BKIb0ezH.js} +28 -28
  47. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-BN71h9IK.js → RewardGroup.vue_vue_type_script_setup_true_lang-DPaaNgpr.js} +26 -23
  48. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-CtB9Ls5-.js → RuleGroup.vue_vue_type_script_setup_true_lang-BLFLybFn.js} +198 -186
  49. package/dist/{Segment-CxiQnnyj.js → Segment-D5_pp7fh.js} +278 -276
  50. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-B1vj5f7T.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-BLLjIA-D.js} +45 -42
  51. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-cWx0G3nM.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BRIcZwnU.js} +4 -4
  52. package/dist/Setting-CD78gIMU.js +574 -0
  53. package/dist/{SettingAdvertisements-Vt7w1WN3.js → SettingAdvertisements-C2AIT4s4.js} +12 -12
  54. package/dist/Settings-DI_tryQV.js +230 -0
  55. package/dist/Store-BV2JTRNZ.js +2615 -0
  56. package/dist/{StoreRewards-DILeipMG.js → StoreRewards-Bk55YXyO.js} +15 -15
  57. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-BZZ1fqwg.js +1331 -0
  58. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-C7lVeybl.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-BrEzWVrH.js} +2 -2
  59. package/dist/{Tier-BAZ1xuKL.js → Tier-CO2K30Ew.js} +2576 -757
  60. package/dist/{Title-CcNAt47f.js → Title-qProQh3T.js} +41 -37
  61. package/dist/Transaction-qL5L-fE_.js +45 -0
  62. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-hUjQVZ_U.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-Co1BPScS.js} +26 -26
  63. package/dist/Voucher-VFD1LY9Y.js +837 -0
  64. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-CTQDxc5l.js → VoucherEditor.vue_vue_type_script_setup_true_lang-9QyTl7iq.js} +118 -124
  65. package/dist/WhatsappAccount-CxSGqm7H.js +325 -0
  66. package/dist/WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-D8L6izf0.js +96 -0
  67. package/dist/WhatsappBot-C4Oz7Xwv.js +441 -0
  68. package/dist/WhatsappBotSettings-CKqaWzwE.js +136 -0
  69. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DuRKA4cj.js → ZodTextField.vue_vue_type_script_setup_true_lang-Bcsi94dw.js} +2 -2
  70. package/dist/{app-Z-UKRG5V.js → app-BEYzXWZO.js} +50954 -42517
  71. package/dist/app.js +1 -1
  72. package/dist/base.export-S_82Elmg.js +75 -0
  73. package/dist/browser-BSAOEeIM.js +1478 -0
  74. package/dist/{business-C7EF6cKC.js → business-DH7djUl8.js} +5 -5
  75. package/dist/campaign-DlHDgoFX.js +100 -0
  76. package/dist/campaign-k_WHxsOR.js +400 -0
  77. package/dist/{campaign.enum-BNN2gLFY.js → campaign.enum-Dx-Zo68Q.js} +1 -1
  78. package/dist/{campaign.fn-Bd34dVnx.js → campaign.fn-B-4JRzft.js} +67 -67
  79. package/dist/{collectible.enum-DO9HdJGH.js → collectible.enum-Liy2wH3s.js} +1 -1
  80. package/dist/collection.fn-zQwWDzZT.js +26 -0
  81. package/dist/currency-CQVHXBFe.js +7 -0
  82. package/dist/{duplicateCampaign-2ODeDw3a.js → duplicateCampaign-YTXMbJTj.js} +11 -11
  83. package/dist/{effect-BcB8IlTI.js → effect-CQkVLHWi.js} +1 -1
  84. package/dist/{email-addresses-BcTeU4Sh.js → email-addresses-BIoVbPGC.js} +209 -201
  85. package/dist/google-C3S8u0mT.js +4 -0
  86. package/dist/{helper-BSgrCJRv.js → helper-BCkTvF4m.js} +1 -1
  87. package/dist/{index-CoHWpylO.js → index-B-bQnb0_.js} +2115 -2557
  88. package/dist/index-BAJOC43K.js +14550 -0
  89. package/dist/{index-HXiYGO4_.js → index-BFIHEBnX.js} +6343 -7693
  90. package/dist/{index-VlFWaBrg.js → index-BJIQe3QJ.js} +1 -1
  91. package/dist/{index-BpI-BI4H.js → index-BJkRTH5T.js} +4 -4
  92. package/dist/index-BOJogkKQ.js +172 -0
  93. package/dist/{index-BoYEqLif.js → index-BRPajAkE.js} +1517 -263
  94. package/dist/{index-CsoBDon4.js → index-BTkxgos0.js} +1590 -1523
  95. package/dist/index-BUP4aHq8.js +32438 -0
  96. package/dist/index-BYvnqARr.js +902 -0
  97. package/dist/{index-hlyg-wxV.js → index-Bonq819P.js} +1 -1
  98. package/dist/{index-CIBPhxlC.js → index-C6mOI2Pp.js} +105 -123
  99. package/dist/{index-Bf6jNZit.js → index-CDIe15AY.js} +24 -9
  100. package/dist/index-CTrcdIkt.js +137 -0
  101. package/dist/index-C_H8jFYf.js +2743 -0
  102. package/dist/index-CpnchVe1.js +74 -0
  103. package/dist/index-D5AR7A5e.js +151 -0
  104. package/dist/index-D7-Q86HI.js +54 -0
  105. package/dist/index-DdOj8Hew.js +53 -0
  106. package/dist/{index-iMPtFp54.js → index-Dvqguh2B.js} +10 -9
  107. package/dist/{index-Bm0QPucw.js → index-hAKRfE-4.js} +14 -14
  108. package/dist/index-o2Ga_qaX.js +39 -0
  109. package/dist/{index.esm2017-CM7OnEyP.js → index.esm2017-D0fhMMPG.js} +128 -128
  110. package/dist/{loading-CSXr0Yqz.js → loading-C686AMVG.js} +1 -1
  111. package/dist/{lodash-Bh7XKI-R.js → lodash-CANlWUWW.js} +1 -1
  112. package/dist/member-import-UzJ6ByIS.js +188 -0
  113. package/dist/membership-DCVzFaFy.js +274 -0
  114. package/dist/{money-BZIST_m9.js → money-DuazwoX7.js} +1 -1
  115. package/dist/{number-DXLR2w95.js → number-B2HFiV0g.js} +1 -1
  116. package/dist/objectid-Bq-oVMdP.js +145 -0
  117. package/dist/onboarding-BxvNxz-9.js +131 -0
  118. package/dist/onboardingSetup-CcvKmyx8.js +17 -0
  119. package/dist/{plugins-4FlbwoES.js → plugins-C39O5j42.js} +13 -12
  120. package/dist/remy-Qz_pNsUS.js +13 -0
  121. package/dist/{reward-DUbl79bZ.js → reward-HYt-2nxt.js} +1 -1
  122. package/dist/{rule-BQUoZ4l_.js → rule-3xNIYM7z.js} +337 -275
  123. package/dist/style.css +1 -1
  124. package/dist/{template-BoiSG7G7.js → template-D37Z_b0m.js} +6 -6
  125. package/dist/timezone-JwnQgpaU.js +20 -0
  126. package/dist/transaction.fn-C5vswLI_.js +71 -0
  127. package/dist/{trigger-D5g5m6tT.js → trigger-Bc6s2cvq.js} +17 -17
  128. package/dist/useMarketingMaterialActions-DMGyAXcy.js +96 -0
  129. package/dist/{usePagination-DHePBBoR.js → usePagination-DLOOwiiY.js} +1 -1
  130. package/dist/{user-C_ToSo-g.js → user-CTIGugVF.js} +1 -1
  131. package/dist/{vue-i18n-BcYh6_51.js → vue-i18n-Dpic36zz.js} +287 -287
  132. package/dist/{xlsx-h4G1C-xj.js → xlsx-CT9_1SFr.js} +786 -786
  133. package/dist/{zod-CgigfJar.js → zod-CGVrMcDl.js} +1 -1
  134. package/package.json +10 -6
  135. package/dist/Broadcast-C9akM-TB.js +0 -266
  136. package/dist/Card-DRkIYs0M.js +0 -910
  137. package/dist/Credit-V5YA_hGx.js +0 -260
  138. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js +0 -58
  139. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-CYQMXARx.js +0 -3377
  140. package/dist/Experience-WTWy5yY6.js +0 -259
  141. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +0 -129
  142. package/dist/Game-BwOfTCW5.js +0 -330
  143. package/dist/LoyaltyDashboard-CJdhYiea.js +0 -1082
  144. package/dist/MainLayout-Du5kZOtA.js +0 -41
  145. package/dist/Member-DUV_vbPI.js +0 -280
  146. package/dist/MemberList-Ye4nOk-i.js +0 -1601
  147. package/dist/Mission-BBmCGpt8.js +0 -334
  148. package/dist/Point-Bzg6hi6o.js +0 -262
  149. package/dist/Promotion-BMXIp_ef.js +0 -397
  150. package/dist/Review-CYNPPxYU.js +0 -1141
  151. package/dist/ReviewFacebookCallback-0SUkKAaC.js +0 -243
  152. package/dist/ReviewGoogleCallback-BZEzx68n.js +0 -208
  153. package/dist/SelectItems.vue_vue_type_script_setup_true_lang-C4vohf6c.js +0 -181
  154. package/dist/Setting-jHAjccod.js +0 -2047
  155. package/dist/Store-Cu-hKmVa.js +0 -1996
  156. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CGz6CTWA.js +0 -1130
  157. package/dist/Transaction-D7DO3dKQ.js +0 -39
  158. package/dist/Voucher-Cq-n1CaC.js +0 -421
  159. package/dist/campaign--MjoY1Mn.js +0 -219
  160. package/dist/campaign-DHBuP4UA.js +0 -277
  161. package/dist/export-CjB7qxZ9.js +0 -97
  162. package/dist/index-BIAjmMga.js +0 -85
  163. package/dist/index-Bv4MBLQ5.js +0 -52
  164. package/dist/index-hbyCVNa7.js +0 -30289
  165. package/dist/membership-CfredTm3.js +0 -255
  166. package/dist/objectid-Dg4ZodlT.js +0 -145
  167. package/dist/useMarketingMaterialActions-B-Jlw2Z9.js +0 -107
@@ -0,0 +1,736 @@
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-C686AMVG.js";
3
+ import { u as ft } from "./app-wDQR6dpb.js";
4
+ import { n as M, f as L } from "./plugins-C39O5j42.js";
5
+ import "./index-Bonq819P.js";
6
+ import { g as ue } from "./index-DdOj8Hew.js";
7
+ import { c as pt } from "./index-D5AR7A5e.js";
8
+ import { S as Fe } from "./index-BUP4aHq8.js";
9
+ import { b as vt } from "./MessageInput.vue_vue_type_script_setup_true_lang-DXajAQy9.js";
10
+ import { J as gt } from "./JsonViewer-v8_C7l5N.js";
11
+ import { y as Q, z as Te, A as yt, B as bt, C as _t, G as W, E as xt, H as Ct, I as ke, J as me, K as ht } from "./index-B-bQnb0_.js";
12
+ import { u as At } from "./vue-i18n-Dpic36zz.js";
13
+ import { useRouter as Dt, useRoute as Et } from "vue-router";
14
+ import { R as Mt } from "./app-BEYzXWZO.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: "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 = ["placeholder", "disabled"], yo = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, bo = { class: "text-fm-color-primary" }, _o = { class: "flex items-center gap-12 p-16 rounded-md border-1 border-fm-color-neutral-gray-300" }, xo = { class: "flex-1" }, Co = { class: "fm-typo-en-body-md-600" }, ho = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ao = {
26
+ key: 0,
27
+ class: "flex gap-16"
28
+ }, Do = {
29
+ key: 1,
30
+ class: "fm-typo-en-body-sm-400 text-fm-color-typo-error"
31
+ }, Eo = { class: "flex gap-12" }, Mo = { class: "flex flex-col gap-4" }, Fo = { class: "fm-typo-en-body-lg-600" }, To = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ko = {
32
+ key: 0,
33
+ class: "flex items-start gap-12 p-16 rounded-md bg-fm-color-system-info-100"
34
+ }, So = { class: "flex-1 fm-typo-en-body-md-400 text-fm-color-typo-primary" }, wo = { class: "flex items-center gap-12" }, No = { class: "fm-typo-en-body-md-500" }, Uo = { class: "flex flex-col gap-8" }, Vo = { class: "fm-typo-en-body-md-600" }, Io = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Po = { class: "flex flex-col gap-16 rounded-md border-1 border-fm-color-neutral-gray-300 p-16" }, Ro = {
35
+ key: 0,
36
+ class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
37
+ }, Lo = {
38
+ key: 1,
39
+ class: "fm-typo-en-body-sm-400 text-fm-color-typo-error"
40
+ }, Go = { class: "flex flex-wrap gap-8" }, Ho = { class: "fm-typo-en-body-lg-600" }, $o = {
41
+ key: 0,
42
+ class: "fm-typo-en-body-sm-400 text-fm-color-typo-error"
43
+ }, Oo = { class: "flex gap-12" }, Xo = { class: "flex flex-col gap-4" }, Bo = { class: "fm-typo-en-body-lg-600" }, zo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, jo = { class: "flex flex-wrap items-center gap-8" }, Jo = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Ko = {
44
+ key: 1,
45
+ class: "flex items-center gap-12 p-16 rounded-md border-1 border-fm-color-neutral-gray-300"
46
+ }, Wo = { class: "w-40 h-40 rounded-sm flex-none grid place-items-center bg-fm-color-neutral-gray-100" }, Zo = { class: "flex-1 min-w-0" }, qo = ["href"], Yo = {
47
+ key: 0,
48
+ class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary"
49
+ }, Qo = { class: "flex items-center justify-end gap-8 pt-8" }, we = 5e6, en = 5e6, yn = /* @__PURE__ */ rt({
50
+ __name: "GiftCardSetup",
51
+ setup(tn) {
52
+ 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([]);
53
+ let fe = /* @__PURE__ */ new Set();
54
+ 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(
55
+ Te(be)
56
+ ), E = 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[E.value],
68
+ set: (t) => {
69
+ N.value = {
70
+ ...N.value,
71
+ [E.value]: t
72
+ };
73
+ }
74
+ }), Pe = {
75
+ giftCard: {
76
+ amount: "RM100",
77
+ senderName: "Janey Wong",
78
+ number: "GCUB74IJ432D9KU78T",
79
+ recipientName: "John Doe",
80
+ personalMessage: "Happy birthday!"
81
+ },
82
+ business: {
83
+ name: "Kopi Haus"
84
+ }
85
+ }, _e = p(
86
+ () => Z.value.filter((t) => !t.available).map((t) => t.label)
87
+ ), Re = `${Se.licensePortalUrl}settings?businessId=${Fe.businessId}`;
88
+ function Le(t) {
89
+ 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))) {
90
+ const o = v.value[0];
91
+ o && (E.value = o);
92
+ }
93
+ }
94
+ async function Ge() {
95
+ try {
96
+ te.value = await pt.readBroadcastChannels();
97
+ } catch (t) {
98
+ console.error("Failed to load notification channel status", t);
99
+ }
100
+ }
101
+ const _ = d("NONE"), z = d(""), U = d(""), xe = d(null), He = /\.pdf$/i, j = d(null), $e = p(
102
+ () => {
103
+ var t;
104
+ return ((t = j.value) == null ? void 0 : t.name) ?? l("connect.store.giftCard.termsDocument");
105
+ }
106
+ );
107
+ function Oe(t) {
108
+ return t >= 1e6 ? `${(t / 1e6).toFixed(1)} MB` : `${Math.max(1, Math.round(t / 1e3))} KB`;
109
+ }
110
+ const ne = p(
111
+ () => A.value === "ADVANCED" ? {
112
+ ...Q(),
113
+ length: Number($.value),
114
+ charset: T.value,
115
+ prefix: O.value,
116
+ suffix: X.value
117
+ } : Q()
118
+ ), Xe = p(() => (ve.value, yt(ne.value))), Be = p(
119
+ () => bt(T.value) ?? 1
120
+ ), le = p(
121
+ () => A.value === "ADVANCED" ? _t(ne.value) : null
122
+ ), V = p(
123
+ () => f.value.length >= W
124
+ ), ze = p(() => [
125
+ ...ge.map((t) => ({ amount: t, custom: !1 })),
126
+ ...f.value.filter((t) => !ge.includes(t)).map((t) => ({ amount: t, custom: !0 }))
127
+ ]);
128
+ function je(t) {
129
+ t.custom || !f.value.includes(t.amount) && V.value || Ce(t.amount);
130
+ }
131
+ function Ce(t) {
132
+ if (f.value.includes(t)) {
133
+ f.value = f.value.filter((o) => o !== t);
134
+ return;
135
+ }
136
+ if (V.value) {
137
+ M.error(
138
+ l("connect.store.giftCard.maxAmounts", {
139
+ max: W
140
+ })
141
+ );
142
+ return;
143
+ }
144
+ f.value = [...f.value, t].sort((o, c) => o - c);
145
+ }
146
+ function he() {
147
+ const t = Number(k.value);
148
+ if (!Number.isInteger(t) || t <= 0) {
149
+ M.error(l("connect.store.giftCard.invalidAmount"));
150
+ return;
151
+ }
152
+ if (t > me) {
153
+ M.error(
154
+ l("connect.store.giftCard.amountTooLarge", { max: me })
155
+ );
156
+ return;
157
+ }
158
+ if (f.value.includes(t)) {
159
+ k.value = "";
160
+ return;
161
+ }
162
+ if (V.value) {
163
+ M.error(
164
+ l("connect.store.giftCard.maxAmounts", {
165
+ max: W
166
+ })
167
+ );
168
+ return;
169
+ }
170
+ f.value = [...f.value, t].sort((o, c) => o - c), k.value = "";
171
+ }
172
+ 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(
173
+ () => F.value.trim() ? null : l("connect.store.giftCard.errorNoName")
174
+ ), se = p(
175
+ () => v.value.length ? null : l("connect.store.giftCard.errorNoChannel")
176
+ ), re = p(() => {
177
+ var t;
178
+ for (const o of ["SMS", "WHATSAPP", "EMAIL"]) {
179
+ const c = N.value[o];
180
+ if (!c.content.trim())
181
+ return l("connect.store.giftCard.errorNoDeliveryMessage", { channel: o });
182
+ if (o === "EMAIL" && !((t = c.title) != null && t.trim()))
183
+ return l("connect.store.giftCard.errorNoEmailTitle");
184
+ }
185
+ return null;
186
+ }), ce = p(
187
+ () => Je.value ?? le.value ?? ae.value ?? se.value ?? re.value
188
+ );
189
+ async function Ke(t) {
190
+ Ze(t) && await ee(
191
+ async () => {
192
+ const o = await We(t);
193
+ h.value = [...h.value, o];
194
+ },
195
+ {
196
+ message: l("connect.store.giftCard.uploading"),
197
+ successMessage: l("connect.store.giftCard.uploaded")
198
+ }
199
+ );
200
+ }
201
+ function We(t) {
202
+ return L.update(
203
+ L.bundleImagePath(void 0, t),
204
+ t
205
+ );
206
+ }
207
+ function Ze(t) {
208
+ const o = Ie.has(t.type) && t.size <= we;
209
+ return o || M.error(l("connect.store.giftCard.invalidDesignFile")), o;
210
+ }
211
+ async function qe(t) {
212
+ h.value = h.value.filter((o) => o !== t), await Ye(t);
213
+ }
214
+ async function Ye(t) {
215
+ if (fe.has(t)) {
216
+ pe.add(t);
217
+ return;
218
+ }
219
+ try {
220
+ await L.delete(t);
221
+ } catch {
222
+ }
223
+ }
224
+ function Qe() {
225
+ var t;
226
+ (t = xe.value) == null || t.click();
227
+ }
228
+ async function et(t) {
229
+ var y;
230
+ const o = t.target, c = (y = o.files) == null ? void 0 : y[0];
231
+ if (o.value = "", !!c) {
232
+ if (!He.test(c.name) || c.size > en) {
233
+ M.error(l("connect.store.giftCard.invalidTermsFile"));
234
+ return;
235
+ }
236
+ await ee(
237
+ async () => {
238
+ U.value = await L.update(
239
+ L.bundleImagePath(void 0, c),
240
+ c
241
+ ), j.value = { name: c.name, size: c.size }, _.value = "DOCUMENT";
242
+ },
243
+ {
244
+ message: l("connect.store.giftCard.uploading"),
245
+ successMessage: l("connect.store.giftCard.uploaded")
246
+ }
247
+ );
248
+ }
249
+ }
250
+ function tt() {
251
+ U.value = "", j.value = null, _.value = "NONE";
252
+ }
253
+ function Ae() {
254
+ return {
255
+ name: F.value.trim(),
256
+ designs: h.value,
257
+ numberFormat: ne.value,
258
+ denominations: f.value.map(Number),
259
+ anyAmount: D.value ? {
260
+ enabled: !0,
261
+ min: Number(S.value),
262
+ max: Number(w.value)
263
+ } : null,
264
+ channels: v.value,
265
+ allowPersonalMessage: B.value,
266
+ deliveryMessages: N.value,
267
+ termsAndConditions: _.value === "TEXT" && z.value || null,
268
+ termsDocumentUrl: _.value === "DOCUMENT" && U.value || null
269
+ };
270
+ }
271
+ function ot(t) {
272
+ var y, C, I, q;
273
+ 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(
274
+ t.deliveryMessages ?? Te(be)
275
+ ), E.value = v.value[0] ?? "SMS";
276
+ const o = t.numberFormat, c = !o || o.prefix === "GC" && Number(o.length) === 16;
277
+ 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);
278
+ }
279
+ function ie() {
280
+ Ue.push({ name: Mt["$connect-STORE"] });
281
+ }
282
+ async function nt() {
283
+ if (ce.value) {
284
+ M.error(ce.value);
285
+ return;
286
+ }
287
+ await ee(
288
+ async () => {
289
+ const t = Ae();
290
+ G.value ? await ue.updateProgram(G.value, t) : await ue.createProgram(t), await Promise.allSettled(
291
+ [...pe].map((o) => L.delete(o))
292
+ ), ie();
293
+ },
294
+ {
295
+ message: H.value ? l("connect.store.giftCard.saving") : l("connect.store.giftCard.creating"),
296
+ successMessage: H.value ? l("connect.store.giftCard.saved") : l("connect.store.giftCard.created")
297
+ }
298
+ );
299
+ }
300
+ return ct(async () => {
301
+ await Ne(async () => {
302
+ await Ge(), G.value && ot(await ue.readProgram(G.value));
303
+ });
304
+ }), (t, o) => {
305
+ 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");
306
+ return u(), m("div", Ft, [
307
+ e(H) ? (u(), J(gt, {
308
+ key: 0,
309
+ json: Ae()
310
+ }, null, 8, ["json"])) : g("", !0),
311
+ n("div", Tt, [
312
+ r(c, {
313
+ icon: "arrow_back",
314
+ variant: "tertiary",
315
+ onClick: ie
316
+ }),
317
+ n("div", kt, [
318
+ n("h1", St, s(e(H) ? e(l)("connect.store.giftCard.editTitle") : e(l)("connect.store.giftCard.createTitle")), 1),
319
+ n("p", wt, s(e(l)("connect.store.giftCard.pageSubtitle")), 1)
320
+ ])
321
+ ]),
322
+ n("div", Nt, [
323
+ r(C, {
324
+ variant: "outlined",
325
+ class: "p-24 flex flex-col gap-16"
326
+ }, {
327
+ default: P(() => [
328
+ n("div", Ut, [
329
+ 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)),
330
+ n("div", Vt, [
331
+ n("div", It, s(e(l)("connect.store.giftCard.name")), 1)
332
+ ])
333
+ ]),
334
+ r(y, {
335
+ modelValue: e(F),
336
+ "onUpdate:modelValue": o[0] || (o[0] = (a) => b(F) ? F.value = a : null),
337
+ placeholder: e(l)("connect.store.giftCard.namePlaceholder")
338
+ }, null, 8, ["modelValue", "placeholder"])
339
+ ]),
340
+ _: 1
341
+ }),
342
+ r(C, {
343
+ variant: "outlined",
344
+ class: "p-24 flex flex-col gap-16"
345
+ }, {
346
+ default: P(() => [
347
+ n("div", Pt, [
348
+ 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)),
349
+ n("div", Rt, [
350
+ n("div", Lt, s(e(l)("connect.store.giftCard.design")), 1),
351
+ n("div", Gt, s(e(l)("connect.store.giftCard.designHint")), 1)
352
+ ])
353
+ ]),
354
+ n("div", Ht, [
355
+ (u(!0), m(R, null, K(e(h), (a, i) => (u(), m("div", {
356
+ key: a,
357
+ class: "relative w-[179px] h-[115px] rounded-md overflow-hidden border-1 border-fm-color-neutral-gray-300"
358
+ }, [
359
+ n("img", {
360
+ src: a,
361
+ alt: "",
362
+ class: "w-full h-full object-cover"
363
+ }, null, 8, $t),
364
+ n("button", {
365
+ type: "button",
366
+ 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",
367
+ "aria-label": e(l)("connect.common.remove"),
368
+ title: e(l)("connect.common.remove"),
369
+ onClick: (Me) => qe(a)
370
+ }, [
371
+ r(I, {
372
+ name: "close",
373
+ size: "sm"
374
+ })
375
+ ], 8, Ot),
376
+ n("span", Xt, s(e(l)("connect.store.giftCard.designOption", { index: i + 1 })), 1)
377
+ ]))), 128)),
378
+ r(q, {
379
+ accept: ".png, .jpg, .jpeg, .gif",
380
+ "max-file-size": we,
381
+ "content-class": "w-[179px] h-[115px]",
382
+ onFileUpload: Ke
383
+ })
384
+ ])
385
+ ]),
386
+ _: 1
387
+ }),
388
+ r(C, {
389
+ variant: "outlined",
390
+ class: "p-24 flex flex-col gap-16"
391
+ }, {
392
+ default: P(() => [
393
+ n("div", Bt, [
394
+ 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)),
395
+ n("div", zt, [
396
+ n("div", jt, s(e(l)("connect.store.giftCard.numberSettings")), 1),
397
+ n("div", Jt, s(e(l)("connect.store.giftCard.numberSettingsHint")), 1)
398
+ ])
399
+ ]),
400
+ n("div", Kt, [
401
+ (u(), m(R, null, K(["DEFAULT", "ADVANCED"], (a) => n("button", {
402
+ key: a,
403
+ type: "button",
404
+ class: Y([
405
+ "flex gap-12 items-start text-left p-16 rounded-md border-1 transition-colors",
406
+ e(A) === a ? "border-fm-color-primary" : "border-fm-color-neutral-gray-300"
407
+ ]),
408
+ onClick: (i) => A.value = a
409
+ }, [
410
+ n("span", {
411
+ class: Y([
412
+ "w-[18px] h-[18px] rounded-full border-1 flex-none mt-2 grid place-items-center",
413
+ e(A) === a ? "border-fm-color-primary" : "border-fm-color-neutral-gray-300"
414
+ ])
415
+ }, [
416
+ e(A) === a ? (u(), m("span", Zt)) : g("", !0)
417
+ ], 2),
418
+ n("span", qt, [
419
+ n("span", Yt, s(a === "DEFAULT" ? e(l)("connect.store.giftCard.numberDefault") : e(l)("connect.store.giftCard.numberAdvanced")), 1),
420
+ n("span", Qt, s(a === "DEFAULT" ? e(l)("connect.store.giftCard.numberDefaultHint") : e(l)("connect.store.giftCard.numberAdvancedHint")), 1)
421
+ ])
422
+ ], 10, Wt)), 64))
423
+ ]),
424
+ e(A) === "ADVANCED" ? (u(), m("div", eo, [
425
+ r(lt, {
426
+ modelValue: e($),
427
+ "onUpdate:modelValue": o[1] || (o[1] = (a) => b($) ? $.value = a : null),
428
+ label: e(l)("connect.store.giftCard.length"),
429
+ "helper-text": e(l)("connect.store.giftCard.lengthHint"),
430
+ min: e(Be),
431
+ max: e(xt),
432
+ step: 1
433
+ }, null, 8, ["modelValue", "label", "helper-text", "min", "max"]),
434
+ r(y, {
435
+ modelValue: e(T),
436
+ "onUpdate:modelValue": o[2] || (o[2] = (a) => b(T) ? T.value = a : null),
437
+ label: e(l)("connect.store.giftCard.charset"),
438
+ "max-length": e(Ct)
439
+ }, null, 8, ["modelValue", "label", "max-length"]),
440
+ r(y, {
441
+ modelValue: e(O),
442
+ "onUpdate:modelValue": o[3] || (o[3] = (a) => b(O) ? O.value = a : null),
443
+ label: e(l)("connect.store.giftCard.prefix"),
444
+ "max-length": e(ke)
445
+ }, null, 8, ["modelValue", "label", "max-length"]),
446
+ r(y, {
447
+ modelValue: e(X),
448
+ "onUpdate:modelValue": o[4] || (o[4] = (a) => b(X) ? X.value = a : null),
449
+ label: e(l)("connect.store.giftCard.suffix"),
450
+ "max-length": e(ke)
451
+ }, null, 8, ["modelValue", "label", "max-length"])
452
+ ])) : g("", !0),
453
+ e(le) ? (u(), m("div", to, s(e(le)), 1)) : g("", !0),
454
+ n("div", oo, [
455
+ n("div", no, [
456
+ n("span", lo, s(e(l)("connect.store.giftCard.exampleNumber")), 1),
457
+ n("span", ao, s(e(Xe)), 1)
458
+ ]),
459
+ r(c, {
460
+ label: e(l)("connect.store.giftCard.regenerate"),
461
+ icon: "refresh",
462
+ variant: "secondary",
463
+ onClick: o[5] || (o[5] = (a) => ve.value++)
464
+ }, null, 8, ["label"])
465
+ ])
466
+ ]),
467
+ _: 1
468
+ }),
469
+ r(C, {
470
+ variant: "outlined",
471
+ class: "p-24 flex flex-col gap-16"
472
+ }, {
473
+ default: P(() => [
474
+ n("div", so, [
475
+ 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)),
476
+ n("div", ro, [
477
+ n("div", co, s(e(l)("connect.store.giftCard.amount")), 1),
478
+ n("div", io, s(e(l)("connect.store.giftCard.amountHint", {
479
+ max: e(W)
480
+ })), 1)
481
+ ])
482
+ ]),
483
+ n("div", uo, [
484
+ n("div", mo, s(e(l)("connect.store.giftCard.popularAmounts")), 1),
485
+ n("div", fo, [
486
+ (u(!0), m(R, null, K(e(ze), (a) => (u(), J(De, {
487
+ key: a.amount,
488
+ label: `RM ${a.amount}`,
489
+ selectable: !a.custom,
490
+ removable: a.custom,
491
+ selected: e(f).includes(a.amount),
492
+ disabled: !a.custom && e(V) && !e(f).includes(a.amount),
493
+ onClick: (i) => je(a),
494
+ onChipClosed: (i) => Ce(a.amount)
495
+ }, null, 8, ["label", "selectable", "removable", "selected", "disabled", "onClick", "onChipClosed"]))), 128))
496
+ ])
497
+ ]),
498
+ n("div", po, [
499
+ n("div", vo, [
500
+ 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)),
501
+ it(n("input", {
502
+ "onUpdate:modelValue": o[6] || (o[6] = (a) => b(k) ? k.value = a : null),
503
+ type: "number",
504
+ class: "px-12 py-8 outline-none fm-typo-en-body-md-400 w-[140px] disabled:bg-fm-color-neutral-gray-100",
505
+ placeholder: e(l)("connect.store.giftCard.custom"),
506
+ disabled: e(V),
507
+ onKeyup: dt(he, ["enter"])
508
+ }, null, 40, go), [
509
+ [ut, e(k)]
510
+ ])
511
+ ]),
512
+ r(c, {
513
+ label: e(l)("connect.store.giftCard.addAmount"),
514
+ variant: "secondary",
515
+ disabled: e(V),
516
+ onClick: he
517
+ }, null, 8, ["label", "disabled"])
518
+ ]),
519
+ n("div", yo, [
520
+ de(s(e(l)("connect.store.giftCard.selected")) + " ", 1),
521
+ n("span", bo, s(e(f).length), 1),
522
+ de(" / " + s(e(W)), 1)
523
+ ]),
524
+ n("div", _o, [
525
+ r(Ee, {
526
+ modelValue: e(D),
527
+ "onUpdate:modelValue": o[7] || (o[7] = (a) => b(D) ? D.value = a : null)
528
+ }, null, 8, ["modelValue"]),
529
+ n("div", xo, [
530
+ n("div", Co, s(e(l)("connect.store.giftCard.anyAmount")), 1),
531
+ n("div", ho, s(e(l)("connect.store.giftCard.anyAmountHint")), 1)
532
+ ])
533
+ ]),
534
+ e(D) ? (u(), m("div", Ao, [
535
+ r(y, {
536
+ modelValue: e(S),
537
+ "onUpdate:modelValue": o[8] || (o[8] = (a) => b(S) ? S.value = a : null),
538
+ type: "number",
539
+ label: e(l)("connect.store.giftCard.min"),
540
+ class: "flex-1"
541
+ }, null, 8, ["modelValue", "label"]),
542
+ r(y, {
543
+ modelValue: e(w),
544
+ "onUpdate:modelValue": o[9] || (o[9] = (a) => b(w) ? w.value = a : null),
545
+ type: "number",
546
+ label: e(l)("connect.store.giftCard.max"),
547
+ "helper-text": `Up to RM${e(me)}`,
548
+ class: "flex-1"
549
+ }, null, 8, ["modelValue", "label", "helper-text"])
550
+ ])) : g("", !0),
551
+ e(ae) ? (u(), m("div", Do, s(e(ae)), 1)) : g("", !0)
552
+ ]),
553
+ _: 1
554
+ }),
555
+ r(C, {
556
+ variant: "outlined",
557
+ class: "p-24 flex flex-col gap-16"
558
+ }, {
559
+ default: P(() => {
560
+ var a;
561
+ return [
562
+ n("div", Eo, [
563
+ 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)),
564
+ n("div", Mo, [
565
+ n("div", Fo, s(e(l)("connect.store.giftCard.sending")), 1),
566
+ n("div", To, s(e(l)("connect.store.giftCard.sendingHint")), 1)
567
+ ])
568
+ ]),
569
+ e(ye) ? g("", !0) : (u(), m("div", ko, [
570
+ r(I, {
571
+ name: "info",
572
+ class: "text-fm-color-system-info-400 flex-none"
573
+ }),
574
+ n("div", So, s(e(l)("connect.store.giftCard.broadcastNotice")), 1),
575
+ r(c, {
576
+ icon: "close",
577
+ variant: "tertiary",
578
+ onClick: o[10] || (o[10] = (i) => ye.value = !0)
579
+ })
580
+ ])),
581
+ n("div", wo, [
582
+ r(Ee, {
583
+ modelValue: e(B),
584
+ "onUpdate:modelValue": o[11] || (o[11] = (i) => b(B) ? B.value = i : null)
585
+ }, null, 8, ["modelValue"]),
586
+ n("span", No, s(e(l)("connect.store.giftCard.personalMessage")), 1)
587
+ ]),
588
+ n("div", Uo, [
589
+ n("div", Vo, s(e(l)("connect.store.giftCard.channels")), 1),
590
+ n("div", Io, s(e(l)("connect.store.giftCard.channelsHint")), 1),
591
+ n("div", Po, [
592
+ (u(!0), m(R, null, K(e(Z), (i) => (u(), J(at, {
593
+ key: i.value,
594
+ value: i.value,
595
+ label: i.label,
596
+ "model-value": e(v).includes(i.value),
597
+ disabled: !i.available && !e(v).includes(i.value),
598
+ "onUpdate:modelValue": (Me) => Le(i.value)
599
+ }, null, 8, ["value", "label", "model-value", "disabled", "onUpdate:modelValue"]))), 128))
600
+ ]),
601
+ e(_e).length ? (u(), m("div", Ro, [
602
+ de(s(e(l)("connect.store.giftCard.channelUnavailable", {
603
+ channels: e(_e).join(", ")
604
+ })) + " ", 1),
605
+ n("a", {
606
+ href: Re,
607
+ target: "_blank",
608
+ rel: "noopener",
609
+ class: "underline fm-typo-en-body-md-600 text-fm-color-primary"
610
+ }, s(e(l)("connect.store.giftCard.channelConfigure")), 1)
611
+ ])) : g("", !0),
612
+ e(se) ? (u(), m("div", Lo, s(e(se)), 1)) : g("", !0)
613
+ ]),
614
+ e(v).length ? (u(), m(R, { key: 1 }, [
615
+ n("div", Go, [
616
+ (u(!0), m(R, null, K(e(Z).filter(
617
+ (i) => e(v).includes(i.value)
618
+ ), (i) => (u(), J(De, {
619
+ key: i.value,
620
+ label: i.label,
621
+ selectable: "",
622
+ selected: e(E) === i.value,
623
+ onClick: (Me) => E.value = i.value
624
+ }, null, 8, ["label", "selected", "onClick"]))), 128))
625
+ ]),
626
+ n("div", Ho, s(e(l)("connect.store.giftCard.deliveryMessage", {
627
+ channel: (a = e(Z).find(
628
+ (i) => i.value === e(E)
629
+ )) == null ? void 0 : a.label
630
+ })), 1),
631
+ r(vt, {
632
+ modelValue: e(oe),
633
+ "onUpdate:modelValue": o[12] || (o[12] = (i) => b(oe) ? oe.value = i : null),
634
+ variables: [...e(ht)],
635
+ "preview-data": Pe
636
+ }, null, 8, ["modelValue", "variables"]),
637
+ e(re) ? (u(), m("div", $o, s(e(re)), 1)) : g("", !0)
638
+ ], 64)) : g("", !0)
639
+ ];
640
+ }),
641
+ _: 1
642
+ }),
643
+ r(C, {
644
+ variant: "outlined",
645
+ class: "p-24 flex flex-col gap-16"
646
+ }, {
647
+ default: P(() => [
648
+ n("div", Oo, [
649
+ 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)),
650
+ n("div", Xo, [
651
+ n("div", Bo, s(e(l)("connect.store.giftCard.terms")), 1),
652
+ n("div", zo, s(e(l)("connect.store.giftCard.termsHint")), 1)
653
+ ])
654
+ ]),
655
+ n("div", jo, [
656
+ n("input", {
657
+ ref_key: "termsInput",
658
+ ref: xe,
659
+ type: "file",
660
+ accept: ".pdf",
661
+ class: "hidden",
662
+ onChange: et
663
+ }, null, 544),
664
+ r(c, {
665
+ label: e(l)("connect.store.giftCard.enterText"),
666
+ icon: "edit",
667
+ variant: "secondary",
668
+ class: Y(
669
+ e(_) === "TEXT" ? "border-fm-color-primary text-fm-color-primary" : ""
670
+ ),
671
+ onClick: o[13] || (o[13] = (a) => _.value = "TEXT")
672
+ }, null, 8, ["label", "class"]),
673
+ r(c, {
674
+ label: e(l)("connect.store.giftCard.uploadDocument"),
675
+ icon: "upload",
676
+ variant: "secondary",
677
+ class: Y(
678
+ e(_) === "DOCUMENT" ? "border-fm-color-primary text-fm-color-primary" : ""
679
+ ),
680
+ onClick: Qe
681
+ }, null, 8, ["label", "class"])
682
+ ]),
683
+ n("div", Jo, s(e(l)("connect.store.giftCard.uploadDocumentHint")), 1),
684
+ e(_) === "TEXT" ? (u(), J(st, {
685
+ key: 0,
686
+ modelValue: e(z),
687
+ "onUpdate:modelValue": o[14] || (o[14] = (a) => b(z) ? z.value = a : null),
688
+ rows: 5,
689
+ placeholder: e(l)("connect.store.giftCard.termsPlaceholder")
690
+ }, null, 8, ["modelValue", "placeholder"])) : e(_) === "DOCUMENT" && e(U) ? (u(), m("div", Ko, [
691
+ n("span", Wo, [
692
+ r(I, {
693
+ name: "description",
694
+ class: "text-fm-color-typo-secondary"
695
+ })
696
+ ]),
697
+ n("div", Zo, [
698
+ n("a", {
699
+ href: e(U),
700
+ target: "_blank",
701
+ rel: "noopener",
702
+ class: "block fm-typo-en-body-md-600 truncate"
703
+ }, s(e($e)), 9, qo),
704
+ e(j) ? (u(), m("div", Yo, s(Oe(e(j).size)) + " · " + s(e(l)("connect.store.giftCard.termsUploadedJustNow")), 1)) : g("", !0)
705
+ ]),
706
+ r(c, {
707
+ icon: "delete",
708
+ variant: "tertiary",
709
+ "aria-label": e(l)("connect.common.remove"),
710
+ onClick: tt
711
+ }, null, 8, ["aria-label"])
712
+ ])) : g("", !0)
713
+ ]),
714
+ _: 1
715
+ }),
716
+ n("div", Qo, [
717
+ r(c, {
718
+ label: e(l)("connect.common.cancel"),
719
+ variant: "tertiary",
720
+ onClick: ie
721
+ }, null, 8, ["label"]),
722
+ r(c, {
723
+ label: e(H) ? e(l)("connect.common.save") : e(l)("connect.store.giftCard.addGiftCard"),
724
+ loading: e(ft)().isLoading,
725
+ disabled: !!e(ce),
726
+ onClick: nt
727
+ }, null, 8, ["label", "loading", "disabled"])
728
+ ])
729
+ ])
730
+ ]);
731
+ };
732
+ }
733
+ });
734
+ export {
735
+ yn as default
736
+ };