@feedmepos/mf-connect 0.1.117-dev → 0.1.118-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 (135) hide show
  1. package/README.md +12 -8
  2. package/dist/{App-BpcsgH7K.js → App-CBFNBDb2.js} +275 -275
  3. package/dist/{AuditLogs-BNnUiVnD.js → AuditLogs-BtSA8b08.js} +13 -13
  4. package/dist/{Bin-Cm0wjQeR.js → Bin-CjmS_Tfn.js} +8 -8
  5. package/dist/{Broadcast-BoJaHqnO.js → Broadcast-BeePmZa1.js} +12 -12
  6. package/dist/{CampaignAnalytic-Eg4xZW0B.js → CampaignAnalytic-CZlnyvOi.js} +7 -7
  7. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BXylK6Ze.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Du3Ah4HP.js} +9 -9
  8. package/dist/{Card-BfkMcFaG.js → Card-C8SzQQ0z.js} +23 -23
  9. package/dist/{Collections-RXmxQbII.js → Collections-BXNWTSZH.js} +8 -8
  10. package/dist/{Credit-CsRPM1jv.js → Credit-CK0-0yD1.js} +12 -12
  11. package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-D2tvK7pw.js → DateRangeChip.vue_vue_type_script_setup_true_lang-BXYpYC7Y.js} +1 -1
  12. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-BgPeHurN.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-CdpnNDzR.js} +1042 -1045
  13. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-CUx8UIIq.js → EffectSheet.vue_vue_type_style_index_0_lang--Oyj3KYg.js} +6 -6
  14. package/dist/{Experience-BC8Pj-v9.js → Experience-CWJaj62g.js} +13 -13
  15. package/dist/{FileSaver.min-DzmoQFA0.js → FileSaver.min-lV9H82L5.js} +1 -1
  16. package/dist/{Game-DJXNHFBs.js → Game-zBV1LYAg.js} +13 -13
  17. package/dist/{GiftCardSetup-_0n8lU-t.js → GiftCardSetup-Cnq9353j.js} +10 -10
  18. package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-C-AiJdui.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-CdgSBdrX.js} +7 -7
  19. package/dist/{Goals-DSZwKpds.js → Goals-Utk08egN.js} +4 -4
  20. package/dist/{Grab-DDc7e-AC.js → Grab-DwMmWmbT.js} +9 -9
  21. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-BZb-H4fM.js → ImageInput.vue_vue_type_script_setup_true_lang-CNPeU9xm.js} +1 -1
  22. package/dist/{Index-Cbi0bquE.js → Index-Bjgs18xf.js} +10 -10
  23. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-GLhMtvzi.js → LocationPicker.vue_vue_type_script_setup_true_lang-DWnf4lXH.js} +1 -1
  24. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-Bt9CO_QR.js → LottieAnimation.vue_vue_type_script_setup_true_lang-Dy_oWJaZ.js} +1 -1
  25. package/dist/{LoyaltyDashboard-fK90c27A.js → LoyaltyDashboard-DmUfujX_.js} +15 -15
  26. package/dist/{MainLayout-Bf-l9yL4.js → MainLayout-DlDZQJfy.js} +1 -1
  27. package/dist/{MainLayout.vue_vue_type_script_setup_true_lang-COR6YYYI.js → MainLayout.vue_vue_type_script_setup_true_lang-yAflY70k.js} +3 -3
  28. package/dist/{Marketing-B7cZGsO-.js → Marketing-B0iKlHP-.js} +4 -4
  29. package/dist/{MarketingMaterialEdit-5IcV2ct6.js → MarketingMaterialEdit-BNHxVb8A.js} +6 -6
  30. package/dist/{Member-BGTrRVdq.js → Member-Bcm3_pWB.js} +7 -7
  31. package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-DJr2hV2W.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-CPp4OpOx.js} +24 -24
  32. package/dist/{MemberImportHistory--FxkTJmu.js → MemberImportHistory-AQgLzB3g.js} +7 -7
  33. package/dist/{MemberList-EjY5dgwt.js → MemberList-CkMTo2uD.js} +14 -14
  34. package/dist/{MemberTransactions-Oia7LIFK.js → MemberTransactions-CxLCVjvw.js} +1 -1
  35. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CLOQZCYy.js → MessageInput.vue_vue_type_script_setup_true_lang-4N20f8Sj.js} +10 -10
  36. package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-Ev3bB8cg.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-DghbYpSQ.js} +1 -1
  37. package/dist/{Mission-BFHYb4aT.js → Mission-CQS1CoDN.js} +14 -14
  38. package/dist/{Overview-BVNyQxFL.js → Overview-NQ287sgq.js} +21 -21
  39. package/dist/{Overview-d5U37aot.js → Overview-UG1IjY7-.js} +4 -4
  40. package/dist/{Point-CXkqH02Z.js → Point-krMa_mb1.js} +14 -14
  41. package/dist/{Promotion-DdxNvlOO.js → Promotion-vFBmJSti.js} +14 -14
  42. package/dist/{Queue-C96oNKyP.js → Queue-BusxSPt-.js} +13 -13
  43. package/dist/{Record-Bj2e2Y4i.js → Record-DjKqn0za.js} +9 -9
  44. package/dist/{Review-CJK5S1oI.js → Review-CqLp8l7U.js} +2 -2
  45. package/dist/{ReviewFacebookCallback-ChG7TRy5.js → ReviewFacebookCallback-D2kMSVFC.js} +5 -5
  46. package/dist/{ReviewGoogleCallback-Dmk4VyGA.js → ReviewGoogleCallback-B1cHR-o2.js} +5 -5
  47. package/dist/Reward-FeSxgzuS.js +444 -0
  48. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-U47m3AAn.js → RewardGroup.vue_vue_type_script_setup_true_lang-CCxVjBsO.js} +14 -14
  49. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-2L6ZGMW7.js → RuleGroup.vue_vue_type_script_setup_true_lang-U403emCF.js} +15 -15
  50. package/dist/{Segment-FYvtCkqH.js → Segment-Nj59F9Nr.js} +26 -26
  51. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-DPZZz2e0.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-Kg9m-0DS.js} +15 -15
  52. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-D8wBgLlS.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BLbDApPL.js} +4 -4
  53. package/dist/{Setting-CUAWjCqa.js → Setting-CCIzNxv-.js} +14 -14
  54. package/dist/{SettingAdvertisements-COIQwUD6.js → SettingAdvertisements-CkPyAg5y.js} +12 -12
  55. package/dist/{Settings-D2gFPvmW.js → Settings-CYjKGCpa.js} +5 -5
  56. package/dist/{Store-BAXwiyvx.js → Store-Bp8Zkzi2.js} +27 -27
  57. package/dist/{StoreRewards-2mUavtUg.js → StoreRewards-DXW5nVyW.js} +15 -15
  58. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-5g3yIL1a.js → StoreTransactions.vue_vue_type_script_setup_true_lang-BYVezFI2.js} +25 -25
  59. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-DHi4rdT1.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-CS6b1cM3.js} +2 -2
  60. package/dist/{Tier-BmAOzRHL.js → Tier-B8Utn9Qb.js} +27 -27
  61. package/dist/{Title-DMxiUg30.js → Title-CwaNSFer.js} +23 -23
  62. package/dist/{Transaction-CF6hXEpN.js → Transaction-ieciAdXP.js} +2 -2
  63. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-BON_t0dL.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-CMwZl4E6.js} +6 -6
  64. package/dist/{Voucher-DrtITxq-.js → Voucher-BKfujj6r.js} +18 -18
  65. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-1DZOzJKx.js → VoucherEditor.vue_vue_type_script_setup_true_lang-CkH-rNqZ.js} +12 -12
  66. package/dist/{WhatsappAccount-Bb0Y7ikk.js → WhatsappAccount-D73WDP7a.js} +66 -64
  67. package/dist/{WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-CPlyzkp4.js → WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-C3L7vWZE.js} +1 -1
  68. package/dist/{WhatsappBot-DNvvaPey.js → WhatsappBot-DTWZAXhi.js} +324 -322
  69. package/dist/{WhatsappBotLogs-C8M-1pvv.js → WhatsappBotLogs-DtDcrjs9.js} +11 -11
  70. package/dist/{WhatsappBotSettings-D6egqUyU.js → WhatsappBotSettings-7_mH9U4y.js} +287 -288
  71. package/dist/WhatsappLayout-BVpaFJ8H.js +21 -0
  72. package/dist/WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-CMeaNKJt.js +261 -0
  73. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CKZscSjU.js → ZodTextField.vue_vue_type_script_setup_true_lang-BO1zA9AR.js} +2 -2
  74. package/dist/{app-BjdLqYQq.js → app-DX7OWVY2.js} +528 -524
  75. package/dist/app.js +1 -1
  76. package/dist/{base.export-B68z5BF6.js → base.export-bamzzexi.js} +2 -2
  77. package/dist/{business-D9fgkHxb.js → business-D3U9HSu9.js} +1 -1
  78. package/dist/{campaign-Dw_ujovr.js → campaign-BqRf2VUO.js} +8 -8
  79. package/dist/{campaign-eMaPX8r6.js → campaign-CKfeN2xN.js} +2 -2
  80. package/dist/{campaign.fn-DFjGNvmN.js → campaign.fn-DQe5LZuT.js} +38 -38
  81. package/dist/{collection.fn-CCOWtB-c.js → collection.fn-BcGqExuE.js} +2 -2
  82. package/dist/{currency-CTLKReFC.js → currency-sjMYWoI8.js} +1 -1
  83. package/dist/{duplicateCampaign-BcpBfUGL.js → duplicateCampaign-CJF3ZLNd.js} +2 -2
  84. package/dist/{effect-CTI1ZH57.js → effect-Cv8ugBR3.js} +1 -1
  85. package/dist/{email-addresses-B74e3bnB.js → email-addresses-CWqtseTn.js} +2 -2
  86. package/dist/{feature-flag-DVdEaChJ.js → feature-flag-BIh6MM4i.js} +159 -159
  87. package/dist/{helper-as9K-piK.js → helper-WnxOxoRK.js} +1 -1
  88. package/dist/{index-CHU3UePP.js → index-5TTGGDnF.js} +1 -1
  89. package/dist/{index-Ba719MYq.js → index-B3CkAr-6.js} +1 -1
  90. package/dist/{index-Czg-2Ni0.js → index-B9XVyhtC.js} +3 -3
  91. package/dist/{index-BW7FoVEA.js → index-BGguMtc0.js} +1 -1
  92. package/dist/{index-BbVbqe4Y.js → index-Bdg48Cus.js} +2 -2
  93. package/dist/{index-B_wRpO02.js → index-BoAmM8QH.js} +2 -2
  94. package/dist/{index-TAoQpeLQ.js → index-BtmVXdRR.js} +1 -1
  95. package/dist/{index-3LjKJhQa.js → index-CDTETsXQ.js} +1 -1
  96. package/dist/{index-DKI8401o.js → index-CeafUn1o.js} +2 -2
  97. package/dist/{index-QHqcSN2q.js → index-CiSTQhs9.js} +1 -1
  98. package/dist/{index-C5V6u2Qd.js → index-ClvaVYkG.js} +2 -2
  99. package/dist/{index-CWLOcQ6j.js → index-CnsSd5Dg.js} +9 -9
  100. package/dist/{index-B0h0iYWP.js → index-D3yYjyaj.js} +2 -2
  101. package/dist/{index-8mBfDn3M.js → index-DDzi_-Lu.js} +7 -7
  102. package/dist/{index-Ckz6u3ac.js → index-DOgDR_QH.js} +2 -2
  103. package/dist/{index-BEKMTiFb.js → index-DqZX-A6e.js} +3 -3
  104. package/dist/{index-DcZiikOH.js → index-DxhNNZ-a.js} +2 -2
  105. package/dist/{index-wsCCqwdr.js → index-DzYFQGSw.js} +2 -2
  106. package/dist/{index-C-iwb2Ln.js → index-I9lmcd2w.js} +2 -2
  107. package/dist/{index-CQxkDpX0.js → index-iiWxryxo.js} +4 -4
  108. package/dist/{index-BhTrG89b.js → index-qI1yx02a.js} +4 -4
  109. package/dist/{index.esm2017-DL6rTGDW.js → index.esm2017-GI2alVO5.js} +1 -1
  110. package/dist/{loading-x6IScY4K.js → loading-Qx5K2WL0.js} +1 -1
  111. package/dist/{lodash-nwnDizYo.js → lodash-CeSjJptg.js} +1 -1
  112. package/dist/{member-import-C-b01Tyd.js → member-import-Cq8G7SsW.js} +1 -1
  113. package/dist/{membership-DfarOMtO.js → membership-BbeavSNs.js} +2 -2
  114. package/dist/{money-CFn-jR4W.js → money-D8YIFaGA.js} +1 -1
  115. package/dist/{number-CSlyDL2x.js → number-DAubZ5bt.js} +1 -1
  116. package/dist/{objectid-zcT6ESET.js → objectid-DeXFWDMh.js} +6 -6
  117. package/dist/{onboarding-DyaFaaF2.js → onboarding-SyFxaTJY.js} +3 -3
  118. package/dist/{onboardingSetup-DQt91O9f.js → onboardingSetup-CLpHlBn8.js} +2 -2
  119. package/dist/{plugins-DEHr0UOe.js → plugins-BHuaMEYA.js} +3 -3
  120. package/dist/{reward-Du_Pv-4p.js → reward-dYWnmAC8.js} +1 -1
  121. package/dist/{rule-DfqmQTVK.js → rule-BVsfOP2h.js} +10 -10
  122. package/dist/{template-CcbNF4PF.js → template-BcdtbhUJ.js} +6 -6
  123. package/dist/{timezone-_4tabIaK.js → timezone-CUc7q5Ii.js} +1 -1
  124. package/dist/{transaction.fn-C46PHwCV.js → transaction.fn-jF9u_cBy.js} +2 -2
  125. package/dist/{trigger-Dipr6btC.js → trigger-COlbQlaB.js} +5 -5
  126. package/dist/{useMarketingMaterialActions-BAw2ZjeF.js → useMarketingMaterialActions-Dq6-gsOW.js} +4 -4
  127. package/dist/{usePagination-D6RZ18zS.js → usePagination-BYZB6ORK.js} +1 -1
  128. package/dist/{user-BCexQj3Q.js → user-DK7L8VFR.js} +1 -1
  129. package/dist/{vue-i18n-DXvyTCZf.js → vue-i18n-CDSTH7g5.js} +162 -162
  130. package/dist/{xlsx-BTxt_Jg6.js → xlsx-CKxXlDzD.js} +1 -1
  131. package/dist/{zod-T4wMYjWT.js → zod-DjtAaF0U.js} +1 -1
  132. package/package.json +1 -1
  133. package/dist/Reward-Dh2YI0Xb.js +0 -442
  134. package/dist/WhatsappLayout-DeQTPuF6.js +0 -21
  135. package/dist/WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-DI0pcHcE.js +0 -253
@@ -1,253 +0,0 @@
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-DXvyTCZf.js";
3
- import { b as Q } from "./browser-BSAOEeIM.js";
4
- import { S as X, a as R } from "./index-DKI8401o.js";
5
- import { w as Y } from "./index-wsCCqwdr.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
- };