@feedmepos/mf-connect 0.1.98-beta.87 → 0.1.98-beta.89

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-DZzCW6yw.js → App-D4hRwK-o.js} +10 -10
  2. package/dist/{AuditLogs-C5s1oYtj.js → AuditLogs-D_PrLKVP.js} +13 -13
  3. package/dist/{Bin-B1e-qVtO.js → Bin-DF_1hlo5.js} +8 -8
  4. package/dist/{Broadcast-CwO5ut-E.js → Broadcast-D81xkQ0B.js} +12 -12
  5. package/dist/{CampaignAnalytic-B1KXy3dl.js → CampaignAnalytic-960oR5Nw.js} +7 -7
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DS8RAeUt.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-WOfSfATi.js} +8 -8
  7. package/dist/{Card-BK-p9FW9.js → Card-nF9lexRS.js} +23 -23
  8. package/dist/{Collections-CTF-r_mV.js → Collections-CJbGLkwm.js} +8 -8
  9. package/dist/{Credit-DR2AvPrI.js → Credit-tfInnpDW.js} +12 -12
  10. package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-CixW7_65.js → DateRangeChip.vue_vue_type_script_setup_true_lang-CAPxB3r7.js} +1 -1
  11. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-D53ghi_e.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-BM2UlBtj.js} +35 -35
  12. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BNCvFw9v.js → EffectSheet.vue_vue_type_style_index_0_lang-BfrzJxWQ.js} +6 -6
  13. package/dist/{Experience-BzPvYJ0N.js → Experience-2uX3ESg5.js} +13 -13
  14. package/dist/{FileSaver.min-BBi03O9S.js → FileSaver.min-DqWpgesn.js} +1 -1
  15. package/dist/{Game-DNdM6BpR.js → Game-BQtHns1v.js} +13 -13
  16. package/dist/{GiftCardSetup-yVVt1hCK.js → GiftCardSetup-B4I83SkJ.js} +10 -10
  17. package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-C_REykTp.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-DujMhaOh.js} +7 -7
  18. package/dist/{Goals-RyNCRCoT.js → Goals-DSkXACjH.js} +4 -4
  19. package/dist/{Grab-COgtKEHg.js → Grab-ArpQ-7LU.js} +9 -9
  20. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-DueG1yQj.js → ImageInput.vue_vue_type_script_setup_true_lang-GdfKNEdQ.js} +1 -1
  21. package/dist/{Index-CW5ib46F.js → Index-Bb8k7ofl.js} +10 -10
  22. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-Dbk0uqyl.js → LocationPicker.vue_vue_type_script_setup_true_lang-tHLWrX4C.js} +1 -1
  23. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-s19mfQze.js → LottieAnimation.vue_vue_type_script_setup_true_lang-C5E_mvcD.js} +1 -1
  24. package/dist/{LoyaltyDashboard-CJW9sSpM.js → LoyaltyDashboard-C-U8HulY.js} +15 -15
  25. package/dist/{MainLayout-DJrtcFYj.js → MainLayout-TV3HyBYh.js} +1 -1
  26. package/dist/{MainLayout.vue_vue_type_script_setup_true_lang-fXA-ixLQ.js → MainLayout.vue_vue_type_script_setup_true_lang-lO1k_OLo.js} +3 -3
  27. package/dist/{Marketing-DJD3MCP0.js → Marketing-CWe_R_3E.js} +4 -4
  28. package/dist/MarketingMaterialEdit-TGP6o6Vv.js +1037 -0
  29. package/dist/{Member-B9_6dgmX.js → Member-DDZ8TLLZ.js} +7 -7
  30. package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-B6PrfIdK.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-CweUf6Iv.js} +24 -24
  31. package/dist/{MemberImportHistory-daeSSL3G.js → MemberImportHistory-Til1afm1.js} +7 -7
  32. package/dist/{MemberList-DpMvv6MH.js → MemberList-uoSeAZlO.js} +14 -14
  33. package/dist/{MemberTransactions-CekjmOnU.js → MemberTransactions-MxJWI1es.js} +1 -1
  34. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-Cgb0WN3L.js → MessageInput.vue_vue_type_script_setup_true_lang-B4H67Tvb.js} +10 -10
  35. package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-DKJH_z31.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-DhHMIgza.js} +1 -1
  36. package/dist/{Mission-B3YYFaqK.js → Mission-C_hcFlzC.js} +14 -14
  37. package/dist/{Overview-B3VtDXAN.js → Overview-B3ugdY_2.js} +4 -4
  38. package/dist/{Overview-DcLRK3qr.js → Overview-Bxe-Kfci.js} +21 -21
  39. package/dist/{Point-rE75hllY.js → Point-BBVTyXIL.js} +14 -14
  40. package/dist/{Promotion-CldXbf59.js → Promotion-D-44JTkv.js} +14 -14
  41. package/dist/{Queue-Im8WyRKY.js → Queue-BNjlzhJ_.js} +13 -13
  42. package/dist/{Record-DmP7Q885.js → Record-C34UZ1q6.js} +9 -9
  43. package/dist/{Review-DDaoANvS.js → Review-C4iuNBR7.js} +2 -2
  44. package/dist/{ReviewFacebookCallback-6fQq9t2y.js → ReviewFacebookCallback-Bsp6WSaQ.js} +5 -5
  45. package/dist/{ReviewGoogleCallback-DDmUWLd9.js → ReviewGoogleCallback-Ddqe1tZZ.js} +5 -5
  46. package/dist/{Reward-BzL-toJQ.js → Reward-CjybtjcT.js} +16 -16
  47. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-CrQvlB_E.js → RewardGroup.vue_vue_type_script_setup_true_lang-Do_obBgC.js} +14 -14
  48. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-Dk8kqDSk.js → RuleGroup.vue_vue_type_script_setup_true_lang-BiGexpsh.js} +15 -15
  49. package/dist/{Segment-BweG5YWo.js → Segment-BU5W9wBQ.js} +26 -26
  50. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-BfFtD5TS.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-Buih6X5R.js} +15 -15
  51. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-BsgQ1kqK.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-DN-VwmTf.js} +4 -4
  52. package/dist/{Setting-MW6B10tv.js → Setting-BsCkMHQZ.js} +14 -14
  53. package/dist/{SettingAdvertisements-DP-Wm3vC.js → SettingAdvertisements-CTTFCozw.js} +12 -12
  54. package/dist/{Settings-CczrlaKr.js → Settings-D3_nrJff.js} +5 -5
  55. package/dist/{Store-C9pYfjIe.js → Store-DRWKc7Q7.js} +27 -27
  56. package/dist/{StoreRewards-DecpygTj.js → StoreRewards-_4iqQsak.js} +15 -15
  57. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-Cw63xJWj.js → StoreTransactions.vue_vue_type_script_setup_true_lang-Db4fakO6.js} +25 -25
  58. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-B_t4xibZ.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-CAO3Ycxn.js} +2 -2
  59. package/dist/{Tier-D7dHj_zA.js → Tier-Cj_4Z8PG.js} +27 -27
  60. package/dist/{Title-DqEvTcqS.js → Title-Bjg44PZP.js} +23 -23
  61. package/dist/{Transaction-Z4qjSyBB.js → Transaction-DbehbwRK.js} +2 -2
  62. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-D9X2-IIl.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-DeMdcwb2.js} +6 -6
  63. package/dist/{Voucher-BY8YGlpM.js → Voucher-DARWiV1M.js} +18 -18
  64. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-3j_0rbsk.js → VoucherEditor.vue_vue_type_script_setup_true_lang-BYNjq7K0.js} +12 -12
  65. package/dist/WhatsappAccount-CBx-FoRb.js +158 -0
  66. package/dist/WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-BFUOuRGy.js +39 -0
  67. package/dist/{WhatsappBot-Oo1KHYLi.js → WhatsappBot-MSJq0pE4.js} +229 -221
  68. package/dist/WhatsappBotLogs-CEyUngzi.js +372 -0
  69. package/dist/{WhatsappBotSettings-DL1f_qXt.js → WhatsappBotSettings-NIE8NeN4.js} +5 -5
  70. package/dist/{WhatsappBotTickets-CerGACm5.js → WhatsappBotTickets-OCmEkzeD.js} +3 -3
  71. package/dist/{WhatsappLayout-B2DrnLNS.js → WhatsappLayout-DLPLalle.js} +3 -3
  72. package/dist/WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-D_bVWePp.js +195 -0
  73. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-0cvPcwm5.js → ZodTextField.vue_vue_type_script_setup_true_lang-HVcTakep.js} +2 -2
  74. package/dist/{app-bGZlAIpq.js → app-CsPUjtBR.js} +529 -391
  75. package/dist/app.js +1 -1
  76. package/dist/{base.export-COcyNfbe.js → base.export-CSSDz0q9.js} +2 -2
  77. package/dist/{business-DTPgRJRn.js → business-BwGS0vma.js} +1 -1
  78. package/dist/{campaign-cm9TQ4dw.js → campaign-Bw44Blhh.js} +8 -8
  79. package/dist/{campaign-Cg6Z_tME.js → campaign-CwfENerv.js} +2 -2
  80. package/dist/{campaign.fn-CS5nJBxQ.js → campaign.fn-Bx7g_BvU.js} +2 -2
  81. package/dist/{collection.fn-BYzmqREp.js → collection.fn-Ba8-HPHO.js} +2 -2
  82. package/dist/{currency-Dtmbe1s9.js → currency-CO5xQCxT.js} +1 -1
  83. package/dist/{duplicateCampaign-DFarTXOQ.js → duplicateCampaign-C2FQFuzl.js} +2 -2
  84. package/dist/{effect-DAGCCFgZ.js → effect-BUxZHyCk.js} +1 -1
  85. package/dist/{email-addresses-Dw4rkWem.js → email-addresses-CfdqSZi6.js} +2 -2
  86. package/dist/{feature-flag-3dM_IVQU.js → feature-flag-DpIT0Nh2.js} +1 -1
  87. package/dist/{helper-C-LQhPI2.js → helper-miVbMaVy.js} +1 -1
  88. package/dist/{index-DXR3e2yE.js → index-BC30mczi.js} +9 -9
  89. package/dist/{index-CpqSrwMX.js → index-Bshl0e-c.js} +2 -2
  90. package/dist/{index-lSJu-_m2.js → index-CMGEBPm-.js} +2 -2
  91. package/dist/{index-CJMFN-JV.js → index-CNX6rFiO.js} +3 -3
  92. package/dist/{index-BagVZkdk.js → index-CW07TXqO.js} +2 -2
  93. package/dist/{index-DGpe4auo.js → index-CYVDCxVj.js} +1 -1
  94. package/dist/{index-B1kMvJbU.js → index-Co3X9LyE.js} +1 -1
  95. package/dist/{index-BeW-BxcE.js → index-CxzJwolN.js} +1 -1
  96. package/dist/{index-BoDbRee_.js → index-CyMrx8XA.js} +1 -1
  97. package/dist/{index-CMSKFejw.js → index-D6RtVzN9.js} +2 -2
  98. package/dist/{index-DzelXsaZ.js → index-DIOb3eOI.js} +14 -14
  99. package/dist/{index-9V_mKS4w.js → index-DSwOhkYZ.js} +2 -2
  100. package/dist/{index-DKm7rszt.js → index-DgnQ18-j.js} +1 -1
  101. package/dist/{index-B3T_0jO2.js → index-Dy7VtHTZ.js} +3 -3
  102. package/dist/{index-8c7H1u7j.js → index-L7SBt-2D.js} +19 -13
  103. package/dist/index-RwNlbTO8.js +115 -0
  104. package/dist/{index-DGp5iEyx.js → index-Se-R3ekJ.js} +2 -2
  105. package/dist/{index-B3IhN22s.js → index-bJ2Ur1Yd.js} +1 -1
  106. package/dist/{index-xtTYwD-W.js → index-gP-EJA-Y.js} +2 -2
  107. package/dist/{index-C6iTrQ-p.js → index-mBHnjwCf.js} +10 -10
  108. package/dist/{index-DTDGCVKV.js → index-nZUfIfsn.js} +4 -4
  109. package/dist/{index.esm2017-Bm5C6Wxi.js → index.esm2017-DlOLsAJL.js} +1 -1
  110. package/dist/{loading-DoiqPnnv.js → loading-BEDz7eTi.js} +1 -1
  111. package/dist/{lodash-CrTM0DQe.js → lodash-Bx7d35Zs.js} +1 -1
  112. package/dist/{member-import-_VaTYOMn.js → member-import-D4zgQyJX.js} +1 -1
  113. package/dist/{membership-Dm8t6-K5.js → membership-VJBDeKcE.js} +2 -2
  114. package/dist/{money-D0kv1vnT.js → money-Dh0agFMv.js} +1 -1
  115. package/dist/{number-BymDKXn2.js → number-D2coZpxW.js} +1 -1
  116. package/dist/{objectid-CC_whd1t.js → objectid-DVSB63oC.js} +13 -13
  117. package/dist/{onboarding-P6c1Ebh4.js → onboarding-CLwhjKAL.js} +3 -3
  118. package/dist/{onboardingSetup-Ca4782qf.js → onboardingSetup-78evK8yB.js} +2 -2
  119. package/dist/{plugins-BN9qJUUc.js → plugins-CKViI6Y3.js} +3 -3
  120. package/dist/{MarketingMaterialEdit-NlZLrI0D.js → remy-icon-BhUGu2NI.js} +2 -1034
  121. package/dist/{reward-dfKI7Nq1.js → reward-Drd9EaxJ.js} +1 -1
  122. package/dist/{rule-Cu-_boGe.js → rule-Dr21X2h0.js} +10 -10
  123. package/dist/{template-D2qwGN2m.js → template-yVg3lQKo.js} +6 -6
  124. package/dist/{timezone-DjMsHrhm.js → timezone-CGlmgCYo.js} +1 -1
  125. package/dist/{transaction.fn-Bj5yz8tS.js → transaction.fn-outAFFwM.js} +2 -2
  126. package/dist/{trigger-CFjJj6Ri.js → trigger-C1GL_8pm.js} +7 -7
  127. package/dist/{useMarketingMaterialActions-Dx8ZTmHW.js → useMarketingMaterialActions-D8MIFnMy.js} +3 -3
  128. package/dist/{usePagination-CN2auZK8.js → usePagination-Dlx9q4a8.js} +1 -1
  129. package/dist/useWhatsappAccount-1Yy7aaA9.js +62 -0
  130. package/dist/{user-CL05OSdb.js → user-BtORKvTK.js} +1 -1
  131. package/dist/{vue-i18n-CJMFzslC.js → vue-i18n-CkZqjA2G.js} +415 -415
  132. package/dist/{xlsx-BoSbkiXt.js → xlsx-HAQ29LQq.js} +440 -440
  133. package/dist/{zod-6X3ups5P.js → zod-DByiKRxr.js} +1 -1
  134. package/package.json +1 -1
  135. package/dist/WhatsappAccount-SPlDi9BN.js +0 -342
  136. package/dist/WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-DYXAJ35J.js +0 -97
  137. package/dist/index-DgkRREfK.js +0 -72
@@ -1,12 +1,13 @@
1
- import { defineComponent as M, ref as B, computed as H, watch as R, onBeforeUnmount as K, resolveComponent as b, openBlock as n, createElementBlock as m, createElementVNode as o, normalizeClass as U, unref as e, toDisplayString as r, createBlock as A, withCtx as S, createTextVNode as z, createVNode as k, createCommentVNode as j, withModifiers as ae, Fragment as Q, renderList as q, useModel as se, mergeProps as le, createSlots as re } from "vue";
2
- import { u as G } from "./vue-i18n-CJMFzslC.js";
1
+ import { defineComponent as M, ref as T, computed as L, watch as R, onBeforeUnmount as Q, resolveComponent as w, openBlock as n, createElementBlock as m, createElementVNode as o, normalizeClass as U, unref as e, toDisplayString as r, createBlock as k, withCtx as I, createTextVNode as G, createVNode as A, createCommentVNode as V, withModifiers as ae, Fragment as Z, renderList as q, useModel as se, mergeProps as le, createSlots as re } from "vue";
2
+ import { u as z } from "./vue-i18n-CkZqjA2G.js";
3
3
  import { useRouter as ce } from "vue-router";
4
- import { S as N, a as ie } from "./index-lSJu-_m2.js";
5
- import { w as L } from "./index-8c7H1u7j.js";
6
- import { u as ue, _ as pe, w as de } from "./WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-DYXAJ35J.js";
7
- import { R as T } from "./app-bGZlAIpq.js";
4
+ import { S as D, a as ie } from "./index-CMGEBPm-.js";
5
+ import { w as N } from "./index-L7SBt-2D.js";
6
+ import { u as ue, w as pe } from "./useWhatsappAccount-1Yy7aaA9.js";
7
+ import { R as g } from "./app-CsPUjtBR.js";
8
+ import { _ as de } from "./WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-BFUOuRGy.js";
8
9
  import { b as me } from "./browser-BSAOEeIM.js";
9
- const fe = { class: "flex items-center gap-[12px]" }, xe = ["src"], ve = { key: 1 }, he = { class: "min-w-0 flex-1" }, _e = ["title"], ge = { key: 1 }, ye = { class: "text-[14px] leading-[20px] text-fm-color-typo-secondary break-all" }, be = { class: "relative z-10 flex shrink-0 items-center gap-[12px]" }, we = ["aria-label", "title", "disabled", "aria-busy"], Be = { class: "flex items-center justify-between flex-wrap gap-[8px] border-t border-fm-color-neutral-gray-100 pt-[12px]" }, Te = {
10
+ const fe = { class: "flex items-center gap-[12px]" }, ve = ["src"], xe = { key: 1 }, _e = { class: "min-w-0 flex-1" }, he = ["title"], ge = { key: 1 }, ye = { class: "text-[14px] leading-[20px] text-fm-color-typo-secondary break-all" }, be = { class: "relative z-10 flex shrink-0 items-center gap-[12px]" }, we = ["aria-label", "title", "disabled", "aria-busy"], Be = { class: "flex items-center justify-between flex-wrap gap-[8px] border-t border-fm-color-neutral-gray-100 pt-[12px]" }, Te = {
10
11
  key: 0,
11
12
  class: "text-[12px] text-fm-color-typo-secondary"
12
13
  }, ke = {
@@ -19,50 +20,50 @@ const fe = { class: "flex items-center gap-[12px]" }, xe = ["src"], ve = { key:
19
20
  account: {}
20
21
  },
21
22
  emits: ["removed"],
22
- setup(I, { emit: i }) {
23
- const a = I, f = i, { t: x, locale: u } = G(), l = B(!1), h = B("");
24
- let v;
23
+ setup(F, { emit: i }) {
24
+ const s = F, f = i, { t: v, locale: u } = z(), l = T(!1), _ = T("");
25
+ let x;
25
26
  const {
26
27
  name: $,
27
- phoneNumber: C,
28
- initials: g,
29
- state: F,
30
- avatarColor: E,
31
- profilePictureUrl: _,
28
+ phoneNumber: P,
29
+ initials: y,
30
+ state: E,
31
+ avatarColor: C,
32
+ profilePictureUrl: h,
32
33
  profilePictureFailed: c
33
- } = ue(() => a.account), p = H(() => F.value === "connected"), d = H(() => ({
34
- name: T["$connect-WHATSAPP_ACCOUNT"],
35
- params: { clientId: a.account.clientId }
34
+ } = ue(() => s.account), p = L(() => E.value === "connected"), d = L(() => ({
35
+ name: g["$connect-WHATSAPP_ACCOUNT"],
36
+ params: { clientId: s.account.clientId }
36
37
  }));
37
- function W(P) {
38
+ function W(S) {
38
39
  return new Intl.DateTimeFormat(u.value, {
39
40
  year: "numeric",
40
41
  month: "short",
41
42
  day: "numeric"
42
- }).format(new Date(P));
43
+ }).format(new Date(S));
43
44
  }
44
- async function O() {
45
+ async function j() {
45
46
  if (l.value) return;
46
- const P = N.getBusinessId();
47
- if (!P) {
48
- h.value = x("connect.whatsappBot.errors.selectBusiness");
47
+ const S = D.getBusinessId();
48
+ if (!S) {
49
+ _.value = v("connect.whatsappBot.errors.selectBusiness");
49
50
  return;
50
51
  }
51
- const s = a.account.clientId, t = new AbortController();
52
- v = t, l.value = !0, h.value = "";
52
+ const a = s.account.clientId, t = new AbortController();
53
+ x = t, l.value = !0, _.value = "";
53
54
  try {
54
- await L.deleteClient(P, s, t.signal), t.signal.aborted || f("removed", s);
55
+ await N.deleteClient(S, a, t.signal), t.signal.aborted || f("removed", a);
55
56
  } catch {
56
- t.signal.aborted || (h.value = x("connect.whatsappBot.errors.removeAccount"));
57
+ t.signal.aborted || (_.value = v("connect.whatsappBot.errors.removeAccount"));
57
58
  } finally {
58
- v === t && (v = void 0, l.value = !1);
59
+ x === t && (x = void 0, l.value = !1);
59
60
  }
60
61
  }
61
- function w() {
62
- v == null || v.abort(), v = void 0, l.value = !1, h.value = "";
62
+ function B() {
63
+ x == null || x.abort(), x = void 0, l.value = !1, _.value = "";
63
64
  }
64
- return R(() => N.getBusinessId(), w), K(w), (P, s) => {
65
- const t = b("RouterLink"), y = b("FmIcon"), V = b("FmCircularProgress");
65
+ return R(() => D.getBusinessId(), B), Q(B), (S, a) => {
66
+ const t = w("RouterLink"), b = w("FmIcon"), O = w("FmCircularProgress");
66
67
  return n(), m("li", null, [
67
68
  o("div", {
68
69
  class: U(["relative h-full border border-fm-color-neutral-gray-100 rounded-[16px] p-[20px] flex flex-col gap-[16px] bg-fm-color-neutral-white text-fm-color-typo-primary", {
@@ -72,45 +73,45 @@ const fe = { class: "flex items-center gap-[12px]" }, xe = ["src"], ve = { key:
72
73
  o("div", fe, [
73
74
  o("div", {
74
75
  "aria-hidden": "true",
75
- class: U(["w-[48px] h-[48px] rounded-full overflow-hidden shrink-0 flex items-center justify-center text-[16px] font-semibold text-fm-color-typo-white", e(E)])
76
+ class: U(["w-[48px] h-[48px] rounded-full overflow-hidden shrink-0 flex items-center justify-center text-[16px] font-semibold text-fm-color-typo-white", e(C)])
76
77
  }, [
77
- e(_) && !e(c) ? (n(), m("img", {
78
+ e(h) && !e(c) ? (n(), m("img", {
78
79
  key: 0,
79
- src: e(_),
80
+ src: e(h),
80
81
  alt: "",
81
82
  class: "w-full h-full object-cover",
82
83
  referrerpolicy: "no-referrer",
83
- onError: s[0] || (s[0] = (Z) => c.value = !0)
84
- }, null, 40, xe)) : (n(), m("span", ve, r(e(g)), 1))
84
+ onError: a[0] || (a[0] = (J) => c.value = !0)
85
+ }, null, 40, ve)) : (n(), m("span", xe, r(e(y)), 1))
85
86
  ], 2),
86
- o("div", he, [
87
+ o("div", _e, [
87
88
  o("h2", {
88
89
  class: "text-[16px] leading-[24px] font-semibold truncate",
89
90
  title: e($)
90
91
  }, [
91
- p.value ? (n(), A(t, {
92
+ p.value ? (n(), k(t, {
92
93
  key: 0,
93
94
  to: d.value,
94
95
  class: "text-inherit no-underline after:absolute after:inset-0 after:rounded-[16px] focus-visible:outline-none focus-visible:after:ring-[2px] focus-visible:after:ring-fm-color-primary focus-visible:after:ring-offset-[2px]"
95
96
  }, {
96
- default: S(() => [
97
- z(r(e($)), 1)
97
+ default: I(() => [
98
+ G(r(e($)), 1)
98
99
  ]),
99
100
  _: 1
100
101
  }, 8, ["to"])) : (n(), m("span", ge, r(e($)), 1))
101
- ], 8, _e),
102
- o("p", ye, r(e(C)), 1)
102
+ ], 8, he),
103
+ o("p", ye, r(e(P)), 1)
103
104
  ]),
104
105
  o("div", be, [
105
- p.value ? (n(), A(t, {
106
+ p.value ? (n(), k(t, {
106
107
  key: 0,
107
108
  to: d.value,
108
- "aria-label": e(x)("connect.common.edit"),
109
- title: e(x)("connect.common.edit"),
109
+ "aria-label": e(v)("connect.common.edit"),
110
+ title: e(v)("connect.common.edit"),
110
111
  class: "w-[32px] h-[32px] flex items-center justify-center rounded-[8px] text-fm-color-typo-tertiary no-underline transition-colors hover:bg-fm-color-neutral-gray-100 hover:text-fm-color-typo-primary focus-visible:outline-none focus-visible:ring-[2px] focus-visible:ring-fm-color-primary"
111
112
  }, {
112
- default: S(() => [
113
- k(y, {
113
+ default: I(() => [
114
+ A(b, {
114
115
  name: "edit",
115
116
  size: "sm",
116
117
  outline: "",
@@ -118,21 +119,21 @@ const fe = { class: "flex items-center gap-[12px]" }, xe = ["src"], ve = { key:
118
119
  })
119
120
  ]),
120
121
  _: 1
121
- }, 8, ["to", "aria-label", "title"])) : j("", !0),
122
+ }, 8, ["to", "aria-label", "title"])) : V("", !0),
122
123
  o("button", {
123
124
  type: "button",
124
- "aria-label": e(x)("connect.common.remove"),
125
- title: e(x)("connect.common.remove"),
125
+ "aria-label": e(v)("connect.common.remove"),
126
+ title: e(v)("connect.common.remove"),
126
127
  disabled: l.value,
127
128
  "aria-busy": l.value,
128
129
  class: "w-[32px] h-[32px] flex items-center justify-center rounded-[8px] text-fm-color-typo-tertiary transition-colors hover:bg-fm-color-system-error-100 hover:text-fm-color-typo-error focus-visible:outline-none focus-visible:ring-[2px] focus-visible:ring-fm-color-primary disabled:cursor-wait disabled:opacity-50",
129
- onClick: ae(O, ["stop"])
130
+ onClick: ae(j, ["stop"])
130
131
  }, [
131
- l.value ? (n(), A(V, {
132
+ l.value ? (n(), k(O, {
132
133
  key: 0,
133
134
  size: "md",
134
135
  "aria-hidden": "true"
135
- })) : (n(), A(y, {
136
+ })) : (n(), k(b, {
136
137
  key: 1,
137
138
  name: "delete",
138
139
  size: "sm",
@@ -143,40 +144,40 @@ const fe = { class: "flex items-center gap-[12px]" }, xe = ["src"], ve = { key:
143
144
  ])
144
145
  ]),
145
146
  o("div", Be, [
146
- k(pe, { state: e(F) }, null, 8, ["state"]),
147
- p.value && I.account.connectedAt ? (n(), m("span", Te, r(e(x)("connect.whatsappBot.connectedSince", {
148
- date: W(I.account.connectedAt)
149
- })), 1)) : j("", !0)
147
+ A(de, { state: e(E) }, null, 8, ["state"]),
148
+ p.value && F.account.connectedAt ? (n(), m("span", Te, r(e(v)("connect.whatsappBot.connectedSince", {
149
+ date: W(F.account.connectedAt)
150
+ })), 1)) : V("", !0)
150
151
  ]),
151
- h.value ? (n(), m("p", ke, r(h.value), 1)) : j("", !0)
152
+ _.value ? (n(), m("p", ke, r(_.value), 1)) : V("", !0)
152
153
  ], 2)
153
154
  ]);
154
155
  };
155
156
  }
156
- }), $e = { class: "mt-[24px] grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] xs:grid-cols-1 gap-[16px]" }, Ce = /* @__PURE__ */ M({
157
+ }), $e = { class: "mt-[24px] grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] xs:grid-cols-1 gap-[16px]" }, Pe = /* @__PURE__ */ M({
157
158
  __name: "WhatsappAccountList",
158
159
  props: {
159
160
  accounts: {}
160
161
  },
161
162
  emits: ["removed"],
162
- setup(I, { emit: i }) {
163
- const a = i;
164
- return (f, x) => (n(), m("ul", $e, [
165
- (n(!0), m(Q, null, q(I.accounts, (u) => (n(), A(Ae, {
163
+ setup(F, { emit: i }) {
164
+ const s = i;
165
+ return (f, v) => (n(), m("ul", $e, [
166
+ (n(!0), m(Z, null, q(F.accounts, (u) => (n(), k(Ae, {
166
167
  key: u.clientId,
167
168
  account: u,
168
- onRemoved: x[0] || (x[0] = (l) => a("removed", l))
169
+ onRemoved: v[0] || (v[0] = (l) => s("removed", l))
169
170
  }, null, 8, ["account"]))), 128))
170
171
  ]));
171
172
  }
172
- }), Pe = { class: "text-[18px] font-semibold" }, Se = {
173
+ }), Ce = { class: "text-[18px] font-semibold" }, Se = {
173
174
  key: 0,
174
175
  role: "status",
175
176
  class: "flex flex-col items-center text-center gap-[8px] px-[8px] py-[40px]"
176
177
  }, Ie = { class: "text-[18px] font-semibold" }, Fe = { class: "text-[14px] text-fm-color-typo-secondary break-all" }, Ee = {
177
178
  key: 1,
178
179
  class: "grid grid-cols-[minmax(0,1fr)_232px] xs:grid-cols-1 gap-[32px] p-[8px] xs:p-[0px]"
179
- }, We = { class: "flex flex-col gap-[20px] text-[14px] leading-[20px]" }, Ve = { class: "text-fm-color-typo-secondary" }, De = { class: "flex flex-col gap-[14px]" }, je = { class: "w-[22px] h-[22px] shrink-0 rounded-full bg-fm-color-neutral-gray-100 flex items-center justify-center text-[12px] font-semibold" }, Ne = { key: 0 }, Oe = { class: "font-semibold" }, He = { class: "font-semibold" }, Le = { class: "font-semibold" }, Me = { class: "font-semibold" }, Re = { key: 3 }, Ue = { class: "text-[12px] leading-[16px] text-fm-color-typo-secondary" }, ze = { class: "relative w-[232px] h-[232px] xs:justify-self-center border border-fm-color-neutral-gray-100 rounded-xl flex items-center justify-center overflow-hidden" }, Ge = {
180
+ }, We = { class: "flex flex-col gap-[20px] text-[14px] leading-[20px]" }, Oe = { class: "text-fm-color-typo-secondary" }, He = { class: "flex flex-col gap-[14px]" }, Ve = { class: "w-[22px] h-[22px] shrink-0 rounded-full bg-fm-color-neutral-gray-100 flex items-center justify-center text-[12px] font-semibold" }, De = { key: 0 }, je = { class: "font-semibold" }, Le = { class: "font-semibold" }, Ne = { class: "font-semibold" }, Me = { class: "font-semibold" }, Re = { key: 3 }, Ue = { class: "text-[12px] leading-[16px] text-fm-color-typo-secondary" }, Ge = { class: "relative w-[232px] h-[232px] xs:justify-self-center border border-fm-color-neutral-gray-100 rounded-xl flex items-center justify-center overflow-hidden" }, ze = {
180
181
  key: 0,
181
182
  role: "status",
182
183
  class: "flex flex-col items-center gap-[12px] text-[13px]"
@@ -198,85 +199,85 @@ const fe = { class: "flex items-center gap-[12px]" }, xe = ["src"], ve = { key:
198
199
  modelModifiers: {}
199
200
  },
200
201
  emits: ["update:modelValue"],
201
- setup(I) {
202
- const i = se(I, "modelValue"), { t: a } = G(), f = B(""), x = B(!1), u = B(""), l = B(!1), h = B();
203
- let v, $, C;
204
- function g() {
205
- v == null || v.abort(), clearTimeout($), $ = void 0, clearTimeout(C), C = void 0;
202
+ setup(F) {
203
+ const i = se(F, "modelValue"), { t: s } = z(), f = T(""), v = T(!1), u = T(""), l = T(!1), _ = T();
204
+ let x, $, P;
205
+ function y() {
206
+ x == null || x.abort(), clearTimeout($), $ = void 0, clearTimeout(P), P = void 0;
206
207
  }
207
- async function F(_, c, p) {
208
+ async function E(h, c, p) {
208
209
  if (!p.aborted) {
209
210
  try {
210
- const d = await L.getClient(_, c, p);
211
+ const d = await N.getClient(h, c, p);
211
212
  if (p.aborted) return;
212
213
  if (l.value = d.status === "connected" || d.status === "connecting" && d.connectedAt !== null, d.status === "connected" && d.connectedAt !== null && d.profileStatus === "ready") {
213
- g(), l.value = !1, h.value = d, C = setTimeout(() => {
214
+ y(), l.value = !1, _.value = d, P = setTimeout(() => {
214
215
  i.value = !1;
215
216
  }, 1800);
216
217
  return;
217
218
  }
218
219
  if (d.status === "disconnected") {
219
- g(), l.value = !1, f.value = "", u.value = a("connect.whatsappBot.errors.qrExpired");
220
+ y(), l.value = !1, f.value = "", u.value = s("connect.whatsappBot.errors.qrExpired");
220
221
  return;
221
222
  }
222
223
  } catch (d) {
223
224
  if (p.aborted) return;
224
225
  if (d instanceof ie && d.status === 409) {
225
- g(), l.value = !1, f.value = "", u.value = a("connect.whatsappBot.errors.accountAlreadyLinked");
226
+ y(), l.value = !1, f.value = "", u.value = s("connect.whatsappBot.errors.accountAlreadyLinked");
226
227
  return;
227
228
  }
228
229
  }
229
230
  p.aborted || ($ = setTimeout(() => {
230
- F(_, c, p);
231
+ E(h, c, p);
231
232
  }, 2e3));
232
233
  }
233
234
  }
234
- async function E() {
235
- g();
236
- const _ = new AbortController();
237
- v = _, f.value = "", u.value = "", l.value = !1, h.value = void 0, x.value = !0;
235
+ async function C() {
236
+ y();
237
+ const h = new AbortController();
238
+ x = h, f.value = "", u.value = "", l.value = !1, _.value = void 0, v.value = !0;
238
239
  try {
239
- const c = N.getBusinessId();
240
+ const c = D.getBusinessId();
240
241
  if (!c)
241
- throw new Error(a("connect.whatsappBot.errors.selectBusiness"));
242
- const p = await L.createClient(
242
+ throw new Error(s("connect.whatsappBot.errors.selectBusiness"));
243
+ const p = await N.createClient(
243
244
  c,
244
- _.signal
245
+ h.signal
245
246
  ), d = await me.toDataURL(p.qr, {
246
247
  width: 224,
247
248
  margin: 2,
248
249
  errorCorrectionLevel: "M"
249
250
  });
250
- _.signal.aborted || (f.value = d, F(c, p.clientId, _.signal));
251
+ h.signal.aborted || (f.value = d, E(c, p.clientId, h.signal));
251
252
  } catch (c) {
252
- _.signal.aborted || (u.value = c instanceof Error ? c.message : a("connect.whatsappBot.errors.loadQr"));
253
+ h.signal.aborted || (u.value = c instanceof Error ? c.message : s("connect.whatsappBot.errors.loadQr"));
253
254
  } finally {
254
- _.signal.aborted || (x.value = !1);
255
+ h.signal.aborted || (v.value = !1);
255
256
  }
256
257
  }
257
258
  return R(
258
259
  i,
259
- (_) => {
260
- _ ? E() : g();
260
+ (h) => {
261
+ h ? C() : y();
261
262
  },
262
263
  { immediate: !0 }
263
- ), K(g), (_, c) => {
264
- const p = b("i18n-t"), d = b("FmCircularProgress"), W = b("FmButton"), O = b("FmDialog");
265
- return n(), A(O, {
264
+ ), Q(y), (h, c) => {
265
+ const p = w("i18n-t"), d = w("FmCircularProgress"), W = w("FmButton"), j = w("FmDialog");
266
+ return n(), k(j, {
266
267
  modelValue: i.value,
267
- "onUpdate:modelValue": c[0] || (c[0] = (w) => i.value = w),
268
+ "onUpdate:modelValue": c[0] || (c[0] = (B) => i.value = B),
268
269
  "min-width": "min(720px, calc(100% - 32px))",
269
270
  "max-width": "720px",
270
271
  "max-height": "90vh",
271
272
  "dismiss-away": ""
272
273
  }, {
273
- "dialog-header": S(() => [
274
- o("h2", Pe, r(e(a)("connect.whatsappBot.connectAccount")), 1)
274
+ "dialog-header": I(() => [
275
+ o("h2", Ce, r(e(s)("connect.whatsappBot.connectAccount")), 1)
275
276
  ]),
276
- default: S(() => {
277
- var w, P, s;
277
+ default: I(() => {
278
+ var B, S, a;
278
279
  return [
279
- h.value ? (n(), m("div", Se, [
280
+ _.value ? (n(), m("div", Se, [
280
281
  c[1] || (c[1] = o("div", {
281
282
  "aria-hidden": "true",
282
283
  class: "w-[64px] h-[64px] rounded-full bg-fm-color-system-success-100 text-fm-color-typo-success flex items-center justify-center mb-[8px]"
@@ -294,71 +295,71 @@ const fe = { class: "flex items-center gap-[12px]" }, xe = ["src"], ve = { key:
294
295
  o("path", { d: "M20 6 9 17l-5-5" })
295
296
  ])
296
297
  ], -1)),
297
- o("h3", Ie, r(e(a)("connect.whatsappBot.accountConnected")), 1),
298
- o("p", Fe, r(((w = h.value.account) == null ? void 0 : w.businessName) || ((P = h.value.account) == null ? void 0 : P.name) || e(a)("connect.whatsappBot.unnamedAccount")) + " · " + r(((s = h.value.account) == null ? void 0 : s.phoneNumber) || e(a)("connect.whatsappBot.phoneUnavailable")), 1)
298
+ o("h3", Ie, r(e(s)("connect.whatsappBot.accountConnected")), 1),
299
+ o("p", Fe, r(((B = _.value.account) == null ? void 0 : B.businessName) || ((S = _.value.account) == null ? void 0 : S.name) || e(s)("connect.whatsappBot.unnamedAccount")) + " · " + r(((a = _.value.account) == null ? void 0 : a.phoneNumber) || e(s)("connect.whatsappBot.phoneUnavailable")), 1)
299
300
  ])) : (n(), m("div", Ee, [
300
301
  o("div", We, [
301
- o("p", Ve, r(e(a)("connect.whatsappBot.scanDescription")), 1),
302
- o("ol", De, [
303
- (n(), m(Q, null, q(4, (t) => o("li", {
302
+ o("p", Oe, r(e(s)("connect.whatsappBot.scanDescription")), 1),
303
+ o("ol", He, [
304
+ (n(), m(Z, null, q(4, (t) => o("li", {
304
305
  key: t,
305
306
  class: "flex gap-[12px]"
306
307
  }, [
307
- o("span", je, r(t), 1),
308
- t === 1 ? (n(), m("span", Ne, r(e(a)("connect.whatsappBot.steps.openApp")), 1)) : t === 2 ? (n(), A(p, {
308
+ o("span", Ve, r(t), 1),
309
+ t === 1 ? (n(), m("span", De, r(e(s)("connect.whatsappBot.steps.openApp")), 1)) : t === 2 ? (n(), k(p, {
309
310
  key: 1,
310
311
  keypath: "connect.whatsappBot.steps.openSettings",
311
312
  tag: "span",
312
313
  scope: "global"
313
314
  }, {
314
- menu: S(() => [
315
- o("b", Oe, r(e(a)("connect.whatsappBot.menu")), 1)
315
+ menu: I(() => [
316
+ o("b", je, r(e(s)("connect.whatsappBot.menu")), 1)
316
317
  ]),
317
- settings: S(() => [
318
- o("b", He, r(e(a)("connect.whatsappBot.settings")), 1)
318
+ settings: I(() => [
319
+ o("b", Le, r(e(s)("connect.whatsappBot.settings")), 1)
319
320
  ]),
320
321
  _: 1
321
- })) : t === 3 ? (n(), A(p, {
322
+ })) : t === 3 ? (n(), k(p, {
322
323
  key: 2,
323
324
  keypath: "connect.whatsappBot.steps.linkDevice",
324
325
  tag: "span",
325
326
  scope: "global"
326
327
  }, {
327
- linkedDevices: S(() => [
328
- o("b", Le, r(e(a)("connect.whatsappBot.linkedDevices")), 1)
328
+ linkedDevices: I(() => [
329
+ o("b", Ne, r(e(s)("connect.whatsappBot.linkedDevices")), 1)
329
330
  ]),
330
- linkDevice: S(() => [
331
- o("b", Me, r(e(a)("connect.whatsappBot.linkDevice")), 1)
331
+ linkDevice: I(() => [
332
+ o("b", Me, r(e(s)("connect.whatsappBot.linkDevice")), 1)
332
333
  ]),
333
334
  _: 1
334
- })) : (n(), m("span", Re, r(e(a)("connect.whatsappBot.steps.scanQr")), 1))
335
+ })) : (n(), m("span", Re, r(e(s)("connect.whatsappBot.steps.scanQr")), 1))
335
336
  ])), 64))
336
337
  ]),
337
- o("p", Ue, r(e(a)("connect.whatsappBot.connectionNote")), 1)
338
+ o("p", Ue, r(e(s)("connect.whatsappBot.connectionNote")), 1)
338
339
  ]),
339
- o("div", ze, [
340
- x.value ? (n(), m("div", Ge, [
341
- k(d),
342
- z(r(e(a)("connect.whatsappBot.generatingQr")), 1)
340
+ o("div", Ge, [
341
+ v.value ? (n(), m("div", ze, [
342
+ A(d),
343
+ G(r(e(s)("connect.whatsappBot.generatingQr")), 1)
343
344
  ])) : u.value ? (n(), m("div", Ke, [
344
345
  o("p", Qe, r(u.value), 1),
345
- k(W, {
346
- label: e(a)("connect.whatsappBot.tryAgain"),
346
+ A(W, {
347
+ label: e(s)("connect.whatsappBot.tryAgain"),
347
348
  "prepend-icon": "refresh",
348
- onClick: E
349
+ onClick: C
349
350
  }, null, 8, ["label"])
350
351
  ])) : f.value ? (n(), m("img", {
351
352
  key: 2,
352
353
  src: f.value,
353
- alt: e(a)("connect.whatsappBot.qrAlt"),
354
+ alt: e(s)("connect.whatsappBot.qrAlt"),
354
355
  width: "224",
355
356
  height: "224",
356
357
  class: U({ "opacity-20": l.value })
357
- }, null, 10, Ze)) : j("", !0),
358
+ }, null, 10, Ze)) : V("", !0),
358
359
  l.value ? (n(), m("div", Je, [
359
- k(d),
360
- z(" " + r(e(a)("connect.whatsappBot.connecting")), 1)
361
- ])) : j("", !0)
360
+ A(d),
361
+ G(" " + r(e(s)("connect.whatsappBot.connecting")), 1)
362
+ ])) : V("", !0)
362
363
  ])
363
364
  ]))
364
365
  ];
@@ -370,10 +371,10 @@ const fe = { class: "flex items-center gap-[12px]" }, xe = ["src"], ve = { key:
370
371
  }), Ye = { class: "mt-[24px] border border-fm-color-neutral-gray-200 rounded-[16px] px-[24px] py-[56px] flex flex-col items-center text-center gap-[8px]" }, qe = { class: "text-[20px] leading-[28px] font-bold" }, et = { class: "text-[14px] leading-[20px] text-fm-color-typo-secondary max-w-[420px]" }, tt = /* @__PURE__ */ M({
371
372
  __name: "WhatsappEmptyState",
372
373
  emits: ["connect"],
373
- setup(I, { emit: i }) {
374
- const a = i, { t: f } = G();
375
- return (x, u) => {
376
- const l = b("FmButton");
374
+ setup(F, { emit: i }) {
375
+ const s = i, { t: f } = z();
376
+ return (v, u) => {
377
+ const l = w("FmButton");
377
378
  return n(), m("div", Ye, [
378
379
  u[1] || (u[1] = o("div", { class: "w-[72px] h-[72px] rounded-full bg-fm-color-primary-oats text-fm-color-primary flex items-center justify-center mb-[12px]" }, [
379
380
  o("svg", {
@@ -393,141 +394,145 @@ const fe = { class: "flex items-center gap-[12px]" }, xe = ["src"], ve = { key:
393
394
  ], -1)),
394
395
  o("h2", qe, r(e(f)("connect.whatsappBot.emptyTitle")), 1),
395
396
  o("p", et, r(e(f)("connect.whatsappBot.emptyDescription")), 1),
396
- k(l, {
397
+ A(l, {
397
398
  class: "mt-[16px]",
398
399
  label: e(f)("connect.whatsappBot.connectAccountCta"),
399
400
  "prepend-icon": "add",
400
- onClick: u[0] || (u[0] = (h) => a("connect"))
401
+ onClick: u[0] || (u[0] = (_) => s("connect"))
401
402
  }, null, 8, ["label"])
402
403
  ]);
403
404
  };
404
405
  }
405
406
  }), ot = { class: "px-[24px] xs:px-[12px] pt-[20px] pb-[40px] text-fm-color-typo-primary" }, nt = { class: "flex items-center justify-between gap-[16px] flex-wrap min-h-[40px]" }, at = { class: "flex items-center gap-8" }, st = { class: "text-[24px] leading-[32px] font-semibold tracking-[-0.01em]" }, lt = {
406
- key: 2,
407
+ key: 3,
407
408
  role: "status",
408
409
  class: "mt-[24px] py-[56px] flex flex-col items-center gap-[12px] text-[14px] text-fm-color-typo-secondary"
409
410
  }, rt = {
410
- key: 3,
411
+ key: 4,
411
412
  class: "mt-[24px] border border-fm-color-neutral-gray-200 rounded-[16px] px-[24px] py-[56px] flex flex-col items-center text-center gap-[16px]"
412
413
  }, ct = {
413
414
  role: "alert",
414
415
  class: "text-[14px] text-fm-color-typo-error"
415
416
  }, ht = /* @__PURE__ */ M({
416
417
  __name: "WhatsappBot",
417
- setup(I) {
418
- const { t: i } = G(), a = ce(), f = B([]), x = B(!0), u = B("");
419
- let l, h;
420
- const v = B([]), $ = B(!0), C = B("");
421
- let g, F;
422
- const E = H(
423
- () => f.value.filter((s) => de(s) !== void 0)
424
- ), _ = H(() => [
418
+ setup(F) {
419
+ const { t: i } = z(), s = ce(), f = T([]), v = T(!0), u = T("");
420
+ let l, _;
421
+ const x = T([]), $ = T(!0), P = T("");
422
+ let y, E;
423
+ const C = L(
424
+ () => f.value.filter((a) => pe(a) !== void 0)
425
+ ), h = L(() => [
425
426
  {
426
427
  label: i("connect.whatsappBot.accounts"),
427
- value: T["$connect-WHATSAPP_BOT"],
428
- badge: E.value.length
428
+ value: g["$connect-WHATSAPP_BOT"],
429
+ badge: C.value.length
429
430
  },
430
431
  {
431
432
  label: i("connect.whatsappBot.settings"),
432
- value: T["$connect-WHATSAPP_BOT_SETTINGS"]
433
+ value: g["$connect-WHATSAPP_BOT_SETTINGS"]
434
+ },
435
+ {
436
+ label: i("connect.whatsappBot.logs.title"),
437
+ value: g["$connect-WHATSAPP_BOT_LOGS"]
433
438
  },
434
439
  {
435
440
  label: i("connect.whatsappBot.tickets.title"),
436
- value: T["$connect-WHATSAPP_BOT_TICKETS"],
437
- badge: v.value.length
441
+ value: g["$connect-WHATSAPP_BOT_TICKETS"],
442
+ badge: x.value.length
438
443
  }
439
- ]), c = H(() => {
440
- const s = a.currentRoute.value.name;
441
- return s === T["$connect-WHATSAPP_BOT_SETTINGS"] || s === T["$connect-WHATSAPP_BOT_TICKETS"] ? s : T["$connect-WHATSAPP_BOT"];
444
+ ]), c = L(() => {
445
+ const a = s.currentRoute.value.name;
446
+ return a === g["$connect-WHATSAPP_BOT_SETTINGS"] || a === g["$connect-WHATSAPP_BOT_LOGS"] || a === g["$connect-WHATSAPP_BOT_TICKETS"] ? a : g["$connect-WHATSAPP_BOT"];
442
447
  });
443
- async function p(s = !1) {
444
- clearTimeout(F), g == null || g.abort();
448
+ async function p(a = !1) {
449
+ clearTimeout(E), y == null || y.abort();
445
450
  const t = new AbortController();
446
- g = t, s || ($.value = !0, C.value = "");
451
+ y = t, a || ($.value = !0, P.value = "");
447
452
  try {
448
- const y = N.getBusinessId();
449
- if (!y)
453
+ const b = D.getBusinessId();
454
+ if (!b)
450
455
  throw new Error(i("connect.whatsappBot.errors.selectBusiness"));
451
- const V = await L.listTickets(y, t.signal);
452
- t.signal.aborted || (v.value = V, C.value = "");
453
- } catch (y) {
454
- t.signal.aborted || (C.value = y instanceof Error ? y.message : i("connect.whatsappBot.tickets.loadError"));
456
+ const O = await N.listTickets(b, t.signal);
457
+ t.signal.aborted || (x.value = O, P.value = "");
458
+ } catch (b) {
459
+ t.signal.aborted || (P.value = b instanceof Error ? b.message : i("connect.whatsappBot.tickets.loadError"));
455
460
  } finally {
456
- t.signal.aborted || ($.value = !1, F = setTimeout(() => void p(!0), 1e4));
461
+ t.signal.aborted || ($.value = !1, E = setTimeout(() => void p(!0), 1e4));
457
462
  }
458
463
  }
459
- function d(s) {
460
- v.value = v.value.filter((t) => t.id !== s), p(!0);
464
+ function d(a) {
465
+ x.value = x.value.filter((t) => t.id !== a), p(!0);
461
466
  }
462
- async function W(s = !1) {
463
- clearTimeout(h), l == null || l.abort();
467
+ async function W(a = !1) {
468
+ clearTimeout(_), l == null || l.abort();
464
469
  const t = new AbortController();
465
- l = t, s || (x.value = !0, u.value = "");
470
+ l = t, a || (v.value = !0, u.value = "");
466
471
  try {
467
- const y = N.getBusinessId();
468
- if (!y)
472
+ const b = D.getBusinessId();
473
+ if (!b)
469
474
  throw new Error(i("connect.whatsappBot.errors.selectBusiness"));
470
- const V = await L.listClients(y, t.signal);
471
- t.signal.aborted || (f.value = V, u.value = "");
472
- } catch (y) {
473
- !t.signal.aborted && !s && (u.value = y instanceof Error ? y.message : i("connect.whatsappBot.errors.loadSessions"));
475
+ const O = await N.listClients(b, t.signal);
476
+ t.signal.aborted || (f.value = O, u.value = "");
477
+ } catch (b) {
478
+ !t.signal.aborted && !a && (u.value = b instanceof Error ? b.message : i("connect.whatsappBot.errors.loadSessions"));
474
479
  } finally {
475
- t.signal.aborted || (x.value = !1, h = setTimeout(() => void W(!0), 1e4));
480
+ t.signal.aborted || (v.value = !1, _ = setTimeout(() => void W(!0), 1e4));
476
481
  }
477
482
  }
478
- function O(s) {
483
+ function j(a) {
479
484
  f.value = f.value.filter(
480
- (t) => t.clientId !== s
485
+ (t) => t.clientId !== a
481
486
  ), W(!0);
482
487
  }
483
- const w = B(!1);
484
- function P(s) {
485
- (s === T["$connect-WHATSAPP_BOT"] || s === T["$connect-WHATSAPP_BOT_SETTINGS"] || s === T["$connect-WHATSAPP_BOT_TICKETS"]) && a.push({ name: s });
488
+ const B = T(!1);
489
+ function S(a) {
490
+ (a === g["$connect-WHATSAPP_BOT"] || a === g["$connect-WHATSAPP_BOT_SETTINGS"] || a === g["$connect-WHATSAPP_BOT_LOGS"] || a === g["$connect-WHATSAPP_BOT_TICKETS"]) && s.push({ name: a });
486
491
  }
487
- return R(w, (s) => {
488
- s || W();
492
+ return R(B, (a) => {
493
+ a || W();
489
494
  }), R(
490
- () => N.getBusinessId(),
495
+ () => D.getBusinessId(),
491
496
  () => {
492
- w.value = !1, f.value = [], v.value = [], W(), p();
497
+ B.value = !1, f.value = [], x.value = [], W(), p();
493
498
  },
494
499
  { immediate: !0 }
495
- ), K(() => {
496
- l == null || l.abort(), clearTimeout(h), g == null || g.abort(), clearTimeout(F);
497
- }), (s, t) => {
498
- const y = b("FmPill"), V = b("FmButton"), Z = b("FmBadge"), ee = b("FmTab"), te = b("FmTabs"), J = b("RouterView"), oe = b("FmCircularProgress");
499
- return n(), m(Q, null, [
500
+ ), Q(() => {
501
+ l == null || l.abort(), clearTimeout(_), y == null || y.abort(), clearTimeout(E);
502
+ }), (a, t) => {
503
+ const b = w("FmPill"), O = w("FmButton"), J = w("FmBadge"), ee = w("FmTab"), te = w("FmTabs"), K = w("RouterView"), oe = w("FmCircularProgress");
504
+ return n(), m(Z, null, [
500
505
  o("div", ot, [
501
506
  o("div", nt, [
502
507
  o("div", at, [
503
508
  o("h1", st, r(e(i)("connect.navigation.whatsappBot")), 1),
504
- k(y, { variant: "beta" })
509
+ A(b, { variant: "beta" })
505
510
  ]),
506
- c.value === e(T)["$connect-WHATSAPP_BOT"] && E.value.length ? (n(), A(V, {
511
+ c.value === e(g)["$connect-WHATSAPP_BOT"] && C.value.length ? (n(), k(O, {
507
512
  key: 0,
508
513
  label: e(i)("connect.whatsappBot.connectAccountCta"),
509
514
  "prepend-icon": "add",
510
- onClick: t[0] || (t[0] = (D) => w.value = !0)
511
- }, null, 8, ["label"])) : j("", !0)
515
+ onClick: t[0] || (t[0] = (H) => B.value = !0)
516
+ }, null, 8, ["label"])) : V("", !0)
512
517
  ]),
513
- k(te, {
518
+ A(te, {
514
519
  "model-value": c.value,
515
- items: _.value,
520
+ items: h.value,
516
521
  role: "tablist",
517
522
  "aria-label": e(i)("connect.navigation.whatsappBot"),
518
523
  class: "mt-[16px] border-b border-fm-color-neutral-gray-100"
519
524
  }, {
520
- default: S(({ label: D, value: X, badge: Y, tabsProps: ne }) => [
521
- k(ee, le(ne, {
525
+ default: I(({ label: H, value: X, badge: Y, tabsProps: ne }) => [
526
+ A(ee, le(ne, {
522
527
  "model-value": c.value,
523
- label: D,
528
+ label: H,
524
529
  value: X,
525
- "onUpdate:modelValue": P
530
+ "onUpdate:modelValue": S
526
531
  }), re({ _: 2 }, [
527
532
  Y ? {
528
533
  name: "append",
529
- fn: S(() => [
530
- k(Z, {
534
+ fn: I(() => [
535
+ A(J, {
531
536
  value: Y,
532
537
  variant: "neutral",
533
538
  inline: "",
@@ -542,35 +547,38 @@ const fe = { class: "flex items-center gap-[12px]" }, xe = ["src"], ve = { key:
542
547
  ]),
543
548
  _: 1
544
549
  }, 8, ["model-value", "items", "aria-label"]),
545
- c.value === e(T)["$connect-WHATSAPP_BOT_SETTINGS"] ? (n(), A(J, { key: 0 })) : c.value === e(T)["$connect-WHATSAPP_BOT_TICKETS"] ? (n(), A(J, {
550
+ c.value === e(g)["$connect-WHATSAPP_BOT_SETTINGS"] ? (n(), k(K, { key: 0 })) : c.value === e(g)["$connect-WHATSAPP_BOT_LOGS"] ? (n(), k(K, {
546
551
  key: 1,
547
- tickets: v.value,
552
+ accounts: C.value
553
+ }, null, 8, ["accounts"])) : c.value === e(g)["$connect-WHATSAPP_BOT_TICKETS"] ? (n(), k(K, {
554
+ key: 2,
555
+ tickets: x.value,
548
556
  loading: $.value,
549
- error: C.value,
550
- onRetry: t[1] || (t[1] = (D) => p()),
557
+ error: P.value,
558
+ onRetry: t[1] || (t[1] = (H) => p()),
551
559
  onResolved: d
552
- }, null, 8, ["tickets", "loading", "error"])) : x.value ? (n(), m("div", lt, [
553
- k(oe),
554
- z(" " + r(e(i)("connect.whatsappBot.loadingSessions")), 1)
560
+ }, null, 8, ["tickets", "loading", "error"])) : v.value ? (n(), m("div", lt, [
561
+ A(oe),
562
+ G(" " + r(e(i)("connect.whatsappBot.loadingSessions")), 1)
555
563
  ])) : u.value ? (n(), m("div", rt, [
556
564
  o("p", ct, r(u.value), 1),
557
- k(V, {
565
+ A(O, {
558
566
  label: e(i)("connect.whatsappBot.tryAgain"),
559
567
  "prepend-icon": "refresh",
560
- onClick: t[2] || (t[2] = (D) => W())
568
+ onClick: t[2] || (t[2] = (H) => W())
561
569
  }, null, 8, ["label"])
562
- ])) : E.value.length ? (n(), A(Ce, {
563
- key: 4,
564
- accounts: E.value,
565
- onRemoved: O
566
- }, null, 8, ["accounts"])) : (n(), A(tt, {
570
+ ])) : C.value.length ? (n(), k(Pe, {
567
571
  key: 5,
568
- onConnect: t[3] || (t[3] = (D) => w.value = !0)
572
+ accounts: C.value,
573
+ onRemoved: j
574
+ }, null, 8, ["accounts"])) : (n(), k(tt, {
575
+ key: 6,
576
+ onConnect: t[3] || (t[3] = (H) => B.value = !0)
569
577
  }))
570
578
  ]),
571
- k(Xe, {
572
- modelValue: w.value,
573
- "onUpdate:modelValue": t[4] || (t[4] = (D) => w.value = D)
579
+ A(Xe, {
580
+ modelValue: B.value,
581
+ "onUpdate:modelValue": t[4] || (t[4] = (H) => B.value = H)
574
582
  }, null, 8, ["modelValue"])
575
583
  ], 64);
576
584
  };