@feedmepos/mf-connect 0.1.113-beta.3 → 0.1.114-dev

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 (137) hide show
  1. package/dist/{App-YfpYV7C0.js → App-CIWTDYuZ.js} +11 -11
  2. package/dist/{AuditLogs-kD0_HO_p.js → AuditLogs-BluLDXu9.js} +12 -12
  3. package/dist/{Bin-Dr-Xp3pn.js → Bin-jS6pM4L3.js} +8 -8
  4. package/dist/{Broadcast-CEbHu2xA.js → Broadcast-DBqsSZ0S.js} +12 -12
  5. package/dist/{CampaignAnalytic-DDiGxPwp.js → CampaignAnalytic-DJrjXD4H.js} +7 -7
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Cc_Yho9-.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CzwigRLi.js} +8 -8
  7. package/dist/{Card-BUnwg0eM.js → Card-B10nLilL.js} +22 -22
  8. package/dist/{Collections-CKyBkKq2.js → Collections-BN42A73p.js} +8 -8
  9. package/dist/{Credit-CJOXWLV1.js → Credit-0SS26HGE.js} +12 -12
  10. package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-DmEBLeNI.js → DateRangeChip.vue_vue_type_script_setup_true_lang-B3wozBFs.js} +1 -1
  11. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-Ce5R4Un6.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-BRd5RVYe.js} +35 -35
  12. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-CMFmlqfF.js → EffectSheet.vue_vue_type_style_index_0_lang-zV9dLCWp.js} +6 -6
  13. package/dist/{Experience-C_Am5CTY.js → Experience-D7qPzsrc.js} +13 -13
  14. package/dist/{FileSaver.min-CueAGbjq.js → FileSaver.min-BKWoklMK.js} +1 -1
  15. package/dist/{Game-B6GO_LVU.js → Game-BoYMwfog.js} +13 -13
  16. package/dist/{GiftCardSetup-CVLDDpI2.js → GiftCardSetup-B87O0xzo.js} +10 -10
  17. package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-isfGhKO1.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-B3uGbEFY.js} +7 -7
  18. package/dist/{Goals-BX-sMV2V.js → Goals-CVxf3xCA.js} +4 -4
  19. package/dist/{Grab-Bh335Srh.js → Grab-mGL1Mue_.js} +9 -9
  20. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-srSgUY3e.js → ImageInput.vue_vue_type_script_setup_true_lang-HipBZ1_T.js} +1 -1
  21. package/dist/{Index-CyXRbwcm.js → Index-Dptuy-6c.js} +10 -10
  22. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-S3GB2Ems.js → LocationPicker.vue_vue_type_script_setup_true_lang-Cjc4UeKz.js} +1 -1
  23. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-ZlWHXwXZ.js → LottieAnimation.vue_vue_type_script_setup_true_lang-Bh0ari3f.js} +1 -1
  24. package/dist/{LoyaltyDashboard-DrTq8oiu.js → LoyaltyDashboard-BxhI6RAE.js} +15 -15
  25. package/dist/{MainLayout-KbKkpX5n.js → MainLayout-YfDxvZXl.js} +1 -1
  26. package/dist/{MainLayout.vue_vue_type_script_setup_true_lang-2D5ate_s.js → MainLayout.vue_vue_type_script_setup_true_lang-BgXpznbi.js} +3 -3
  27. package/dist/{Marketing-DQT1MWQg.js → Marketing-C2cVJacf.js} +4 -4
  28. package/dist/{MarketingMaterialEdit-fSqr53-M.js → MarketingMaterialEdit-DkOEy_L-.js} +6 -6
  29. package/dist/{Member-DwDUCzlv.js → Member-DufbKDOh.js} +7 -7
  30. package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-DaQ4Lw8f.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-CU8EmBxy.js} +23 -23
  31. package/dist/{MemberImportHistory-D4ezvJGZ.js → MemberImportHistory-DlFN-uQl.js} +7 -7
  32. package/dist/{MemberList-DFieV7Qk.js → MemberList-B344n8I4.js} +14 -14
  33. package/dist/{MemberTransactions-BPOXyAuC.js → MemberTransactions-BS7H640M.js} +1 -1
  34. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DhfsgDd4.js → MessageInput.vue_vue_type_script_setup_true_lang-CxDtXvwd.js} +10 -10
  35. package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-CX8bk_IQ.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-lY0jlyOG.js} +1 -1
  36. package/dist/{Mission-nErb05Es.js → Mission-D2ed_oKn.js} +14 -14
  37. package/dist/{Overview-DuJr_hAg.js → Overview-CLh_T6YY.js} +4 -4
  38. package/dist/{Overview-7G31a7B-.js → Overview-DJa-hXDC.js} +20 -20
  39. package/dist/{Point-PWDLemD4.js → Point-DAPeg1VD.js} +14 -14
  40. package/dist/{Promotion-N80Tj8M6.js → Promotion-CPPCMMFl.js} +14 -14
  41. package/dist/{Queue-M7ZpgiMT.js → Queue-BcPwCRcM.js} +12 -12
  42. package/dist/{Record-NhxrdvWv.js → Record-C5XKn--g.js} +9 -9
  43. package/dist/{Review-DiAaAzIG.js → Review-Cc51luIv.js} +2 -2
  44. package/dist/{ReviewFacebookCallback-JdyxFbNl.js → ReviewFacebookCallback-BSGInFB8.js} +5 -5
  45. package/dist/{ReviewGoogleCallback-BXbI3Bsh.js → ReviewGoogleCallback-C1gY4vcP.js} +5 -5
  46. package/dist/{Reward-yTaOqOT8.js → Reward-k1R3hLiF.js} +16 -16
  47. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-BWPfjZ9K.js → RewardGroup.vue_vue_type_script_setup_true_lang-BGbbGVK4.js} +13 -13
  48. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-Cz2H9MKe.js → RuleGroup.vue_vue_type_script_setup_true_lang-Coh3L11L.js} +14 -14
  49. package/dist/{Segment-DE9Bcd6R.js → Segment-DsBnIvje.js} +25 -25
  50. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-pmv0cb4J.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-CMKpvXN-.js} +14 -14
  51. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-BeWwkTix.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-LyAtRMs8.js} +4 -4
  52. package/dist/{Setting-C0JAxIRT.js → Setting-BRueNgc4.js} +14 -14
  53. package/dist/{SettingAdvertisements-DxueyKU8.js → SettingAdvertisements-BrVcQyhF.js} +12 -12
  54. package/dist/{Settings-Cs46AcxZ.js → Settings-fOvXd29Z.js} +5 -5
  55. package/dist/{Store-DqQae9nE.js → Store-rrh2pIHH.js} +26 -26
  56. package/dist/{StoreRewards-JxSUsOzJ.js → StoreRewards-D-jivVKr.js} +15 -15
  57. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-qgrBtUNX.js → StoreTransactions.vue_vue_type_script_setup_true_lang-CvQXsZbH.js} +24 -24
  58. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-D7ifzgsI.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-DbnY9VE9.js} +2 -2
  59. package/dist/{Tier-DWhgWush.js → Tier-DJiLtw3M.js} +26 -26
  60. package/dist/{Title-DUNeMdz8.js → Title-s0bzA7yZ.js} +22 -22
  61. package/dist/{Transaction-DAv-LVhC.js → Transaction-CQ-CJ_eh.js} +2 -2
  62. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-Cih-9IoW.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-Bfy8SZH1.js} +6 -6
  63. package/dist/{Voucher-uLTq9RSK.js → Voucher-9vydRET7.js} +18 -18
  64. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-BevVL_Kx.js → VoucherEditor.vue_vue_type_script_setup_true_lang-Dq7veRL5.js} +12 -12
  65. package/dist/{WhatsappAccount-BpXQ4q0P.js → WhatsappAccount-D12Hvzfl.js} +52 -51
  66. package/dist/{WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-EssnbsgT.js → WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-BrZEDi6O.js} +1 -1
  67. package/dist/WhatsappBot-o5b_0CnB.js +629 -0
  68. package/dist/{WhatsappBotLogs-DDN4H_bv.js → WhatsappBotLogs-CK_V_iT5.js} +39 -39
  69. package/dist/WhatsappBotSettings-BooibLUg.js +694 -0
  70. package/dist/{WhatsappLayout-DSnq84Uo.js → WhatsappLayout-bOyNHGUI.js} +3 -3
  71. package/dist/WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-Cytrffdh.js +253 -0
  72. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CR-F0x1r.js → ZodTextField.vue_vue_type_script_setup_true_lang-96t_eUzk.js} +2 -2
  73. package/dist/{app-Devzv4gO.js → app-DV3e2LkD.js} +342 -267
  74. package/dist/app.js +1 -1
  75. package/dist/{base.export-CCSMkvAm.js → base.export-DQUUtGmy.js} +2 -2
  76. package/dist/{business-BjAmUqNA.js → business-BZ0boE-5.js} +1 -1
  77. package/dist/{campaign-C5c47GqT.js → campaign-CsfFq2S-.js} +8 -8
  78. package/dist/{campaign-CTe-T5Gd.js → campaign-DMrtYWcs.js} +2 -2
  79. package/dist/{campaign.fn-DxAO8A5b.js → campaign.fn-C-CdNNdR.js} +185 -185
  80. package/dist/{collection.fn-C9l-OtNt.js → collection.fn-C-rryKSc.js} +2 -2
  81. package/dist/{currency-mwm4AWXK.js → currency-BOd9iVZV.js} +1 -1
  82. package/dist/{duplicateCampaign-BbC4AwQ1.js → duplicateCampaign-ey_rW0Bz.js} +2 -2
  83. package/dist/{effect-D8ba9z0K.js → effect-BP6Hkxmj.js} +1 -1
  84. package/dist/{email-addresses-BR5J6_Jz.js → email-addresses-CO61QAq0.js} +2 -2
  85. package/dist/{feature-flag-C-5NdFW8.js → feature-flag-Bq1SgbYC.js} +1 -1
  86. package/dist/{feature-flag-CNcU4_3r.js → feature-flag-lvPP0ED-.js} +1 -1
  87. package/dist/{helper-D9cEaMIv.js → helper-BRpts-M-.js} +1 -1
  88. package/dist/{index-OvnHt5x5.js → index-03WIXl-H.js} +2 -2
  89. package/dist/{index-BfoDdVQS.js → index-B0RavybO.js} +2 -2
  90. package/dist/{index-BvY2hQac.js → index-BDNkoALK.js} +1 -1
  91. package/dist/{index-CmzjBrHR.js → index-BV5aPSYo.js} +8 -8
  92. package/dist/{index-B_gzo75q.js → index-Bk20uvPY.js} +1 -1
  93. package/dist/{index-Drmh0FT-.js → index-Bn19rfby.js} +3 -3
  94. package/dist/{index-DwTBiVts.js → index-Cj-eugzc.js} +1 -1
  95. package/dist/{index-DtcUCknS.js → index-CoROn5OA.js} +2 -2
  96. package/dist/{index-DnepoNWn.js → index-CrBhcMaL.js} +3 -3
  97. package/dist/{index-CZfqqrVu.js → index-CsBjAM3E.js} +1 -1
  98. package/dist/{index-yGSko6Eq.js → index-D1t4_KaG.js} +1 -1
  99. package/dist/{index-B7HH6vKF.js → index-D3wGTCWf.js} +2 -2
  100. package/dist/{index-D34iYRdc.js → index-D41kjcrZ.js} +4 -4
  101. package/dist/{index-B1jP-_Z_.js → index-DIZLkVe0.js} +10 -10
  102. package/dist/{index-Ct6YjTIW.js → index-DucKyzrD.js} +2 -2
  103. package/dist/{index-D4k1G2oE.js → index-R5WS21OL.js} +1 -1
  104. package/dist/{index-BFaZp6Et.js → index-VYI0zWNC.js} +2 -2
  105. package/dist/{index-0H82-X0n.js → index-ZRE89TKq.js} +1 -1
  106. package/dist/{index-Byg4ztr-.js → index-_Cj-bsd_.js} +14 -14
  107. package/dist/{index-VqAbYyHH.js → index-mToWKHVs.js} +2 -2
  108. package/dist/{index.esm2017-DLb2VyCT.js → index.esm2017-B_Sag8Pg.js} +76 -76
  109. package/dist/{loading-CUNk5u1d.js → loading-C5fVI0ry.js} +1 -1
  110. package/dist/{lodash-BJXravls.js → lodash-COo8_xCU.js} +1 -1
  111. package/dist/{member-import-DjYoddBi.js → member-import-I_pKwUfF.js} +1 -1
  112. package/dist/{membership-ByJUFP8f.js → membership-BgfH9Kva.js} +2 -2
  113. package/dist/{money-Bf2IEMJJ.js → money-Cr07YDlV.js} +1 -1
  114. package/dist/{number-CRBHrRUL.js → number-DFsj0dkh.js} +1 -1
  115. package/dist/objectid-Cu89BzwI.js +145 -0
  116. package/dist/{onboarding-CQ3lw7eY.js → onboarding-DlkJCm-5.js} +3 -3
  117. package/dist/{onboardingSetup-CsdZKGFk.js → onboardingSetup-BEhVj613.js} +2 -2
  118. package/dist/{plugins-iTZLbJGy.js → plugins-CPTtiKqf.js} +3 -3
  119. package/dist/{reward-DTN6JpEd.js → reward-DqY0mQ_5.js} +1 -1
  120. package/dist/{rule-BYACNQOL.js → rule-mJJ48eKw.js} +9 -9
  121. package/dist/{template--Vr0PCjB.js → template-C1QftpDG.js} +6 -6
  122. package/dist/{timezone-DwzjOED-.js → timezone-BBgBHels.js} +1 -1
  123. package/dist/{transaction.fn-DapYe3n7.js → transaction.fn-Sr0hj3kY.js} +2 -2
  124. package/dist/{trigger-D8r76yb0.js → trigger-PUP0mwKM.js} +7 -7
  125. package/dist/{useMarketingMaterialActions-CdMmibPE.js → useMarketingMaterialActions-faslwaHd.js} +3 -3
  126. package/dist/{usePagination-BRcQJkO1.js → usePagination-Be6nIQ9y.js} +1 -1
  127. package/dist/{user-vBZFKqXQ.js → user-DBSYzG_9.js} +1 -1
  128. package/dist/{vue-i18n-Cw6fF11e.js → vue-i18n-C6c2jsH3.js} +409 -409
  129. package/dist/{xlsx-Muy_Rjhk.js → xlsx-Bfo19lFv.js} +224 -224
  130. package/dist/{zod-CCPTOeUz.js → zod-CihbDg3N.js} +1 -1
  131. package/package.json +1 -1
  132. package/dist/WhatsappBot-DB4NRZMd.js +0 -589
  133. package/dist/WhatsappBotSettings-Bkv1VNwF.js +0 -387
  134. package/dist/WhatsappBotTickets-DAKgnE6T.js +0 -162
  135. package/dist/WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-1BvxPD-k.js +0 -195
  136. package/dist/objectid-58gyOvdR.js +0 -145
  137. package/dist/useWhatsappAccount-BOJ8fz84.js +0 -62
@@ -1,8 +1,8 @@
1
1
  import { defineComponent as n, watch as s, unref as a, openBlock as o, createBlock as r, createCommentVNode as p } from "vue";
2
2
  import { useRouter as c } from "vue-router";
3
- import { _ as u, a as _ } from "./MainLayout.vue_vue_type_script_setup_true_lang-2D5ate_s.js";
4
- import { u as f } from "./feature-flag-CNcU4_3r.js";
5
- import { R as i } from "./app-Devzv4gO.js";
3
+ import { _ as u, a as _ } from "./MainLayout.vue_vue_type_script_setup_true_lang-BgXpznbi.js";
4
+ import { u as f } from "./feature-flag-lvPP0ED-.js";
5
+ import { R as i } from "./app-DV3e2LkD.js";
6
6
  const y = /* @__PURE__ */ n({
7
7
  __name: "WhatsappLayout",
8
8
  setup(d) {
@@ -0,0 +1,253 @@
1
+ import { computed as f, toValue as j, ref as m, watch as S, defineComponent as W, mergeModels as O, useModel as $, onBeforeUnmount as z, resolveComponent as N, openBlock as h, createBlock as H, withCtx as T, createElementVNode as t, toDisplayString as n, unref as s, createElementBlock as _, createVNode as L, createTextVNode as V, Fragment as J, renderList as K, createCommentVNode as F } from "vue";
2
+ import { u as U } from "./vue-i18n-C6c2jsH3.js";
3
+ import { b as Q } from "./browser-BSAOEeIM.js";
4
+ import { S as X, a as R } from "./index-03WIXl-H.js";
5
+ import { w as Y } from "./index-ZRE89TKq.js";
6
+ function Z(x) {
7
+ const c = x.connectedAt !== null;
8
+ switch (x.status) {
9
+ case "connected":
10
+ return "connected";
11
+ case "disconnected":
12
+ return c ? "disconnected" : void 0;
13
+ case "connecting":
14
+ return c ? "connecting" : void 0;
15
+ }
16
+ }
17
+ const D = [
18
+ "bg-fm-color-primary",
19
+ "bg-fm-color-secondary-plum",
20
+ "bg-fm-color-system-success-400"
21
+ ];
22
+ function ee(x) {
23
+ const { t: c, locale: b } = U(), e = f(() => j(x)), v = f(
24
+ () => {
25
+ var o, a, r;
26
+ return (r = (a = (o = e.value) == null ? void 0 : o.account) == null ? void 0 : a.profilePicture) == null ? void 0 : r.url;
27
+ }
28
+ ), k = m(!1);
29
+ S(v, () => {
30
+ k.value = !1;
31
+ });
32
+ const G = f(
33
+ () => {
34
+ var o, a, r, u, g, y;
35
+ return ((a = (o = e.value) == null ? void 0 : o.account) == null ? void 0 : a.businessName) || ((u = (r = e.value) == null ? void 0 : r.account) == null ? void 0 : u.name) || ((y = (g = e.value) == null ? void 0 : g.account) == null ? void 0 : y.phoneNumber) || c("connect.whatsappBot.unnamedAccount");
36
+ }
37
+ ), p = f(
38
+ () => {
39
+ var o, a;
40
+ return ((a = (o = e.value) == null ? void 0 : o.account) == null ? void 0 : a.phoneNumber) || c("connect.whatsappBot.phoneUnavailable");
41
+ }
42
+ ), w = f(
43
+ () => G.value.trim().split(/\s+/).slice(0, 2).map((o) => Array.from(o)[0]).join("").toLocaleUpperCase(b.value)
44
+ ), B = f(
45
+ () => e.value ? Z(e.value) ?? "disconnected" : "disconnected"
46
+ ), d = f(
47
+ () => {
48
+ var o;
49
+ return D[parseInt(((o = e.value) == null ? void 0 : o.clientId.slice(-6)) ?? "0", 16) % D.length];
50
+ }
51
+ );
52
+ return {
53
+ name: G,
54
+ phoneNumber: p,
55
+ initials: w,
56
+ state: B,
57
+ avatarColor: d,
58
+ profilePictureUrl: v,
59
+ profilePictureFailed: k
60
+ };
61
+ }
62
+ const te = { class: "min-w-0 flex flex-col" }, oe = { class: "text-[18px] leading-[24px] font-semibold" }, ne = { class: "text-[13px] leading-[18px] text-fm-color-typo-tertiary break-words" }, ae = {
63
+ key: 0,
64
+ role: "status",
65
+ class: "py-[56px] flex flex-col items-center gap-[12px] text-[14px] text-fm-color-typo-secondary"
66
+ }, se = {
67
+ key: 1,
68
+ class: "py-[40px] flex flex-col items-center text-center gap-[16px]"
69
+ }, ie = {
70
+ role: "alert",
71
+ class: "text-[14px] text-fm-color-typo-error"
72
+ }, le = {
73
+ key: 2,
74
+ class: "grid grid-cols-[minmax(0,1fr)_226px] xs:grid-cols-1 gap-[32px] p-[8px] xs:p-[0px]"
75
+ }, re = { class: "min-w-0 flex flex-col gap-[20px] text-[14px] leading-[20px]" }, ce = { class: "text-fm-color-typo-secondary [text-wrap:pretty]" }, pe = { class: "flex flex-col gap-[10px]" }, ue = { class: "text-[12px] leading-[16px] font-semibold uppercase tracking-[0.06em] text-fm-color-typo-tertiary" }, de = { class: "flex flex-col gap-[10px]" }, fe = { class: "flex flex-col gap-[6px]" }, me = {
76
+ id: "whatsapp-group-invite-link-label",
77
+ class: "font-medium text-fm-color-typo-tertiary"
78
+ }, xe = { class: "flex items-center gap-[8px] border border-fm-color-neutral-gray-200 rounded-[8px] pl-[12px] pr-[4px] py-[4px]" }, ve = {
79
+ id: "whatsapp-group-invite-link",
80
+ role: "textbox",
81
+ "aria-readonly": "true",
82
+ "aria-labelledby": "whatsapp-group-invite-link-label",
83
+ tabindex: "0",
84
+ class: "flex-1 min-w-0 h-[32px] overflow-x-auto overflow-y-hidden whitespace-nowrap text-[13px] leading-[32px] font-mono bg-fm-color-neutral-white rounded-[4px] focus-visible:outline-none focus-visible:ring-[2px] focus-visible:ring-fm-color-primary"
85
+ }, he = ["disabled"], ge = {
86
+ key: 0,
87
+ role: "status",
88
+ class: "sr-only"
89
+ }, ye = {
90
+ key: 1,
91
+ role: "alert",
92
+ class: "text-[12px] leading-[16px] text-fm-color-typo-error"
93
+ }, _e = { class: "text-[12px] leading-[16px] text-fm-color-typo-tertiary" }, be = { class: "flex flex-col items-center gap-[12px] w-[226px] xs:justify-self-center" }, we = { class: "border border-fm-color-neutral-gray-100 rounded-[12px] overflow-hidden" }, Be = ["src", "alt"], ke = ["href"], Ve = /* @__PURE__ */ W({
94
+ __name: "WhatsappNotificationGroupDialog",
95
+ props: /* @__PURE__ */ O({
96
+ account: {}
97
+ }, {
98
+ modelValue: { type: Boolean, required: !0 },
99
+ modelModifiers: {}
100
+ }),
101
+ emits: ["update:modelValue"],
102
+ setup(x) {
103
+ const c = x, b = $(x, "modelValue"), { t: e } = U(), v = f(() => X.getBusinessId() ?? ""), { name: k, phoneNumber: G } = ee(() => c.account), p = m(), w = m(""), B = m(!1), d = m(""), o = m(!1), a = m(!1), r = m("");
104
+ let u, g;
105
+ function y() {
106
+ u == null || u.abort(), clearTimeout(g), o.value = !1, a.value = !1;
107
+ }
108
+ async function I() {
109
+ y();
110
+ const i = new AbortController();
111
+ u = i, B.value = !0, d.value = "", r.value = "", p.value = void 0, w.value = "";
112
+ try {
113
+ if (!v.value)
114
+ throw new Error(e("connect.whatsappBot.errors.selectBusiness"));
115
+ const l = await Y.getNotificationGroup(
116
+ v.value,
117
+ c.account.clientId,
118
+ i.signal
119
+ );
120
+ if (i.signal.aborted) return;
121
+ const A = await Q.toDataURL(l.inviteLink, {
122
+ width: 224,
123
+ margin: 2,
124
+ errorCorrectionLevel: "M"
125
+ });
126
+ if (i.signal.aborted) return;
127
+ p.value = l, w.value = A;
128
+ } catch (l) {
129
+ if (i.signal.aborted) return;
130
+ l instanceof R && l.status === 409 ? d.value = e("connect.whatsappBot.notificationGroup.notReady") : l instanceof R && l.status === 404 ? d.value = e("connect.whatsappBot.errors.accountNotFound") : d.value = v.value ? e("connect.whatsappBot.errors.loadGroup") : e("connect.whatsappBot.errors.selectBusiness");
131
+ } finally {
132
+ i.signal.aborted || (B.value = !1);
133
+ }
134
+ }
135
+ async function q() {
136
+ if (!p.value || !u || a.value) return;
137
+ const i = u;
138
+ a.value = !0, o.value = !1, r.value = "", clearTimeout(g);
139
+ try {
140
+ if (await navigator.clipboard.writeText(p.value.inviteLink), i.signal.aborted) return;
141
+ o.value = !0, g = setTimeout(() => {
142
+ o.value = !1;
143
+ }, 2e3);
144
+ } catch {
145
+ i.signal.aborted || (r.value = e("connect.whatsappBot.errors.copyGroupLink"));
146
+ } finally {
147
+ i.signal.aborted || (a.value = !1);
148
+ }
149
+ }
150
+ return S(
151
+ [b, v, () => c.account.clientId],
152
+ ([i]) => {
153
+ i ? I() : y();
154
+ },
155
+ { immediate: !0 }
156
+ ), z(y), (i, l) => {
157
+ const A = N("FmCircularProgress"), E = N("FmButton"), P = N("FmIcon"), M = N("FmDialog");
158
+ return h(), H(M, {
159
+ modelValue: b.value,
160
+ "onUpdate:modelValue": l[0] || (l[0] = (C) => b.value = C),
161
+ "min-width": "min(640px, calc(100% - 32px))",
162
+ "max-width": "640px",
163
+ "max-height": "90vh",
164
+ "dismiss-away": ""
165
+ }, {
166
+ "dialog-header": T(() => [
167
+ t("div", te, [
168
+ t("h2", oe, n(s(e)("connect.whatsappBot.notificationGroup.dialogTitle")), 1),
169
+ t("p", ne, n(s(k)) + " · " + n(s(G)), 1)
170
+ ])
171
+ ]),
172
+ default: T(() => [
173
+ B.value ? (h(), _("div", ae, [
174
+ L(A),
175
+ V(" " + n(s(e)("connect.whatsappBot.notificationGroup.loading")), 1)
176
+ ])) : d.value ? (h(), _("div", se, [
177
+ t("p", ie, n(d.value), 1),
178
+ L(E, {
179
+ label: s(e)("connect.whatsappBot.tryAgain"),
180
+ "prepend-icon": "refresh",
181
+ class: "!rounded-full [&_.label]:text-[14px]",
182
+ onClick: I
183
+ }, null, 8, ["label"])
184
+ ])) : p.value ? (h(), _("div", le, [
185
+ t("div", re, [
186
+ t("p", ce, n(s(e)("connect.whatsappBot.notificationGroup.scanDescription")), 1),
187
+ t("div", pe, [
188
+ t("h3", ue, n(s(e)("connect.whatsappBot.notificationGroup.postsTitle")), 1),
189
+ t("ul", de, [
190
+ (h(), _(J, null, K(["unanswered", "staffRequests", "humanRequests"], (C) => t("li", {
191
+ key: C,
192
+ class: "flex gap-[10px]"
193
+ }, [
194
+ l[1] || (l[1] = t("span", {
195
+ "aria-hidden": "true",
196
+ class: "w-[6px] h-[6px] rounded-full bg-fm-color-primary shrink-0 mt-[7px]"
197
+ }, null, -1)),
198
+ V(" " + n(s(e)(`connect.whatsappBot.notificationGroup.posts.${C}`)), 1)
199
+ ])), 64))
200
+ ])
201
+ ]),
202
+ t("div", fe, [
203
+ t("span", me, n(s(e)("connect.whatsappBot.notificationGroup.inviteLink")), 1),
204
+ t("div", xe, [
205
+ t("div", ve, n(p.value.inviteLink), 1),
206
+ t("button", {
207
+ type: "button",
208
+ disabled: a.value,
209
+ class: "shrink-0 h-[32px] px-[12px] rounded-[6px] bg-fm-color-neutral-gray-100 text-[13px] font-semibold hover:bg-fm-color-neutral-gray-200 disabled:opacity-50 focus-visible:outline-none focus-visible:ring-[2px] focus-visible:ring-fm-color-primary",
210
+ onClick: q
211
+ }, n(s(e)(
212
+ `connect.whatsappBot.notificationGroup.${o.value ? "copied" : "copy"}`
213
+ )), 9, he)
214
+ ]),
215
+ o.value ? (h(), _("span", ge, n(s(e)("connect.whatsappBot.notificationGroup.copied")), 1)) : F("", !0),
216
+ r.value ? (h(), _("p", ye, n(r.value), 1)) : F("", !0),
217
+ t("p", _e, n(s(e)("connect.whatsappBot.notificationGroup.shareNote")), 1)
218
+ ])
219
+ ]),
220
+ t("div", be, [
221
+ t("div", we, [
222
+ t("img", {
223
+ src: w.value,
224
+ alt: s(e)("connect.whatsappBot.notificationGroup.qrAlt"),
225
+ width: "224",
226
+ height: "224"
227
+ }, null, 8, Be)
228
+ ]),
229
+ t("a", {
230
+ href: p.value.inviteLink,
231
+ target: "_blank",
232
+ rel: "noopener noreferrer",
233
+ class: "w-full h-[40px] flex items-center justify-center gap-[6px] rounded-full bg-fm-color-primary text-fm-color-typo-white text-[14px] font-semibold no-underline hover:opacity-90 focus-visible:outline-none focus-visible:ring-[2px] focus-visible:ring-fm-color-primary focus-visible:ring-offset-[2px]"
234
+ }, [
235
+ V(n(s(e)("connect.whatsappBot.notificationGroup.openWhatsapp")) + " ", 1),
236
+ L(P, {
237
+ name: "open_in_new",
238
+ size: "sm"
239
+ })
240
+ ], 8, ke)
241
+ ])
242
+ ])) : F("", !0)
243
+ ]),
244
+ _: 1
245
+ }, 8, ["modelValue"]);
246
+ };
247
+ }
248
+ });
249
+ export {
250
+ Ve as _,
251
+ ee as u,
252
+ Z as w
253
+ };
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as f, useAttrs as y, resolveComponent as b, openBlock as l, createBlock as v, mergeProps as x, unref as t, createSlots as g, withCtx as h, createElementVNode as a, toDisplayString as n, renderSlot as k, createElementBlock as F, createCommentVNode as S } from "vue";
2
- import { Z as d } from "./zod-CCPTOeUz.js";
3
- import { u as V } from "./vue-i18n-Cw6fF11e.js";
2
+ import { Z as d } from "./zod-CihbDg3N.js";
3
+ import { u as V } from "./vue-i18n-C6c2jsH3.js";
4
4
  const B = { class: "fm-typo-en-body-lg-400 flex gap-4 text-fm-color-typo-primary items-center" }, C = {
5
5
  key: 0,
6
6
  class: "text-fm-color-typo-tertiary"