@feedmepos/mf-connect 0.1.98-beta.80 → 0.1.98-beta.82
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.
- package/dist/{App-DievprEi.js → App-DIWPN6WH.js} +9 -9
- package/dist/{AuditLogs-DrdqOhZL.js → AuditLogs-BTZKJs5f.js} +13 -13
- package/dist/{Bin-Ci2k3z77.js → Bin-DJXuzg5t.js} +8 -8
- package/dist/{Broadcast-CpDMAG1o.js → Broadcast-DtG0edQa.js} +12 -12
- package/dist/{CampaignAnalytic-uRyGaLaN.js → CampaignAnalytic-DbLBzibb.js} +7 -7
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DtGe2Og1.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-C1yg2-DE.js} +8 -8
- package/dist/{Card-tb98Kyr-.js → Card-bcNLznin.js} +23 -23
- package/dist/{Collections-P1S5WjnJ.js → Collections-DCq-oxmB.js} +8 -8
- package/dist/{Credit-DwK7JYf-.js → Credit-EwMv7P6u.js} +12 -12
- package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-Cyk0iIsd.js → DateRangeChip.vue_vue_type_script_setup_true_lang-EhwxqiPf.js} +1 -1
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-8r29jKh9.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-DkkO_gn1.js} +35 -35
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BML_-v8I.js → EffectSheet.vue_vue_type_style_index_0_lang-BirRksYU.js} +6 -6
- package/dist/{Experience-BejtRlOj.js → Experience-QuulWZ2l.js} +13 -13
- package/dist/{FileSaver.min-C-hmBaHm.js → FileSaver.min-RTo5UlWI.js} +1 -1
- package/dist/{Game-n8qL896g.js → Game-BGGe7pFk.js} +13 -13
- package/dist/{GiftCardSetup-Bgsfcu7N.js → GiftCardSetup-CNPP7HtQ.js} +10 -10
- package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-CzL68PPP.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-yBUVNHEP.js} +7 -7
- package/dist/{Goals-BB8LJlq3.js → Goals-D-Q-ht66.js} +4 -4
- package/dist/{Grab-COq3Ujst.js → Grab-D2jS-RCL.js} +9 -9
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-BmLclEyi.js → ImageInput.vue_vue_type_script_setup_true_lang-Byemh4AD.js} +1 -1
- package/dist/{Index-BdkIinaE.js → Index-QP8P79Tu.js} +10 -10
- package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-DsWv3DVb.js → LocationPicker.vue_vue_type_script_setup_true_lang-CrYa6Vek.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-DvOzGF8c.js → LottieAnimation.vue_vue_type_script_setup_true_lang-BGxbglj5.js} +1 -1
- package/dist/{LoyaltyDashboard-D4Jtpw0n.js → LoyaltyDashboard-Bkquum-3.js} +15 -15
- package/dist/{MainLayout-Ca-Xm3eZ.js → MainLayout-BQ_PiBqS.js} +3 -3
- package/dist/{Marketing-Cpe4s7NZ.js → Marketing-CHTPSOIj.js} +4 -4
- package/dist/{MarketingMaterialEdit-nTeS9VVx.js → MarketingMaterialEdit-BAYHnYKe.js} +6 -6
- package/dist/{Member-DgGZ4Cdg.js → Member-D7xDe5Rt.js} +7 -7
- package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-_O3B-FIA.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-B3074-er.js} +24 -24
- package/dist/{MemberImportHistory-rdlbDVWU.js → MemberImportHistory-BndvQb_w.js} +7 -7
- package/dist/{MemberList-BC4aRJTt.js → MemberList-Ctxdpre8.js} +14 -14
- package/dist/{MemberTransactions-BFfdTttp.js → MemberTransactions-qQXjqnUy.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DXajAQy9.js → MessageInput.vue_vue_type_script_setup_true_lang-Bzc0IePL.js} +10 -10
- package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-8xVDzdO3.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-1fr2pugZ.js} +1 -1
- package/dist/{Mission-BWCNKTjU.js → Mission-B4wOanDj.js} +14 -14
- package/dist/{Overview-i02Wnyjn.js → Overview-D8-Xzdh4.js} +21 -21
- package/dist/{Overview--Q7vzhNK.js → Overview-Dg8Uoyo3.js} +4 -4
- package/dist/{Point-CiWxqny5.js → Point-CS4mzCm5.js} +14 -14
- package/dist/{Promotion-B0G9qfBm.js → Promotion-Ccuo6zoT.js} +14 -14
- package/dist/{Queue-YfwgYmzH.js → Queue-ChNawIta.js} +13 -13
- package/dist/{Record-CCuwrPKW.js → Record-DmH2pbgo.js} +9 -9
- package/dist/{Review-ymsfdh7Q.js → Review-vhLtZ7y7.js} +2 -2
- package/dist/{ReviewFacebookCallback-DyDExWvP.js → ReviewFacebookCallback-TgdFbPrW.js} +5 -5
- package/dist/{ReviewGoogleCallback-DNyg3n2S.js → ReviewGoogleCallback-CpK6sWqa.js} +5 -5
- package/dist/{Reward-BKIb0ezH.js → Reward-645jqAha.js} +16 -16
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-DPaaNgpr.js → RewardGroup.vue_vue_type_script_setup_true_lang-G_iME05g.js} +14 -14
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-BLFLybFn.js → RuleGroup.vue_vue_type_script_setup_true_lang-e3CagrVZ.js} +15 -15
- package/dist/{Segment-D5_pp7fh.js → Segment-fj3Nqtpv.js} +26 -26
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-BLLjIA-D.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-D_yFLAc4.js} +15 -15
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-BRIcZwnU.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-D3JDTWXp.js} +4 -4
- package/dist/{Setting-CD78gIMU.js → Setting-CBVP-Mpb.js} +14 -14
- package/dist/{SettingAdvertisements-C2AIT4s4.js → SettingAdvertisements-BdPPUvDC.js} +12 -12
- package/dist/{Settings-DI_tryQV.js → Settings-BT6OdqEM.js} +5 -5
- package/dist/{Store-BV2JTRNZ.js → Store-nlIBDj84.js} +27 -27
- package/dist/{StoreRewards-Bk55YXyO.js → StoreRewards-DaMOOzw0.js} +15 -15
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-UyV-RU5E.js +1319 -0
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-BrEzWVrH.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-Dnr-6tzT.js} +2 -2
- package/dist/{Tier-CO2K30Ew.js → Tier-DUvEF-Ns.js} +27 -27
- package/dist/{Title-qProQh3T.js → Title-C3FZriO7.js} +23 -23
- package/dist/{Transaction-qL5L-fE_.js → Transaction-Ctd7qzJI.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-Co1BPScS.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-CI8jF-Vn.js} +6 -6
- package/dist/{Voucher-VFD1LY9Y.js → Voucher-IoMmmYh2.js} +18 -18
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-9QyTl7iq.js → VoucherEditor.vue_vue_type_script_setup_true_lang-CdBrD2bP.js} +12 -12
- package/dist/{WhatsappAccount-CxSGqm7H.js → WhatsappAccount-D1a0ABEK.js} +5 -5
- package/dist/WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-DUdFMygT.js +80 -0
- package/dist/WhatsappBot-CVirkYvU.js +561 -0
- package/dist/WhatsappBotSettings-BV_HgL-p.js +394 -0
- package/dist/WhatsappBotTickets-Ca_c5_B2.js +153 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-Bcsi94dw.js → ZodTextField.vue_vue_type_script_setup_true_lang-Z4TFGdcH.js} +2 -2
- package/dist/{app-BEYzXWZO.js → app-Cj6OWO36.js} +4063 -3708
- package/dist/app.js +1 -1
- package/dist/{base.export-S_82Elmg.js → base.export-7wLpz1Vu.js} +2 -2
- package/dist/{business-DH7djUl8.js → business-COKUtA0N.js} +1 -1
- package/dist/{campaign-k_WHxsOR.js → campaign-B2HD3DRn.js} +8 -8
- package/dist/{campaign-DlHDgoFX.js → campaign-CIyWTu9f.js} +2 -2
- package/dist/{campaign.fn-B-4JRzft.js → campaign.fn-DJzUFP-T.js} +2 -2
- package/dist/{collection.fn-zQwWDzZT.js → collection.fn-LB9uKdHM.js} +2 -2
- package/dist/{currency-CQVHXBFe.js → currency-B3pBZiCD.js} +1 -1
- package/dist/{duplicateCampaign-YTXMbJTj.js → duplicateCampaign-CiIDQH1W.js} +2 -2
- package/dist/{effect-CQkVLHWi.js → effect-Bp0w1Vly.js} +1 -1
- package/dist/{email-addresses-BIoVbPGC.js → email-addresses-qxmP-ghm.js} +2 -2
- package/dist/{helper-BCkTvF4m.js → helper-PRIAnsXY.js} +1 -1
- package/dist/{index-BFIHEBnX.js → index-BId5mHYh.js} +3 -3
- package/dist/{index-BAJOC43K.js → index-BLH6nPs9.js} +3 -3
- package/dist/{index-B-bQnb0_.js → index-BV4bWZM1.js} +576 -551
- package/dist/{index-BYvnqARr.js → index-BZ42-wj6.js} +9 -9
- package/dist/{index-CTrcdIkt.js → index-B_fZHfs-.js} +2 -2
- package/dist/{index-BRPajAkE.js → index-C6jzfbh8.js} +7 -7
- package/dist/{index-BJkRTH5T.js → index-CA5-wXVF.js} +1 -1
- package/dist/{index-BTkxgos0.js → index-DA-OPM4v.js} +2 -2
- package/dist/{index-CDIe15AY.js → index-DMRdy2Kz.js} +2 -2
- package/dist/index-DPF_QE13.js +69 -0
- package/dist/index-DS__Cknq.js +74 -0
- package/dist/{index-Dvqguh2B.js → index-DbdZvsUQ.js} +2 -2
- package/dist/{index-BJIQe3QJ.js → index-DgR5Yphl.js} +1 -1
- package/dist/{index-BUP4aHq8.js → index-DiuFB2hK.js} +2 -2
- package/dist/index-DopAV1p0.js +68 -0
- package/dist/{index-CpnchVe1.js → index-F3o5W57q.js} +9 -9
- package/dist/{index-D5AR7A5e.js → index-TRXyLWUu.js} +2 -2
- package/dist/{index-DdOj8Hew.js → index-XzWyheJy.js} +1 -1
- package/dist/{index-C6mOI2Pp.js → index-aTCNe4X_.js} +1 -1
- package/dist/{index-Bonq819P.js → index-fjrIMEy7.js} +1 -1
- package/dist/{index-BOJogkKQ.js → index-nyzNkE9r.js} +1 -1
- package/dist/{index.esm2017-D0fhMMPG.js → index.esm2017-DZIDjb2C.js} +1 -1
- package/dist/{loading-C686AMVG.js → loading-CSdKEjY5.js} +1 -1
- package/dist/{lodash-CANlWUWW.js → lodash-BIB2o8LD.js} +1 -1
- package/dist/{member-import-UzJ6ByIS.js → member-import-PcGNpuqH.js} +1 -1
- package/dist/{membership-DCVzFaFy.js → membership-ivTpKFxy.js} +2 -2
- package/dist/{money-DuazwoX7.js → money-BSDhQ-zg.js} +1 -1
- package/dist/{number-B2HFiV0g.js → number-ByYnVDwR.js} +1 -1
- package/dist/{objectid-Bq-oVMdP.js → objectid-BJu8QMfW.js} +10 -10
- package/dist/{onboarding-BxvNxz-9.js → onboarding-Cr2iuJY2.js} +3 -3
- package/dist/{onboardingSetup-CcvKmyx8.js → onboardingSetup-D6I4p209.js} +2 -2
- package/dist/{plugins-C39O5j42.js → plugins-D3BYIk9P.js} +3 -3
- package/dist/{reward-HYt-2nxt.js → reward-UplovmpX.js} +1 -1
- package/dist/{rule-3xNIYM7z.js → rule-CI8Gfa0f.js} +10 -10
- package/dist/style.css +1 -1
- package/dist/{template-D37Z_b0m.js → template-Bepdb4Vy.js} +6 -6
- package/dist/{timezone-JwnQgpaU.js → timezone-CdDDjOpp.js} +1 -1
- package/dist/{transaction.fn-C5vswLI_.js → transaction.fn-DiRDf20s.js} +2 -2
- package/dist/{trigger-Bc6s2cvq.js → trigger-B9BqJ3WQ.js} +5 -5
- package/dist/{useMarketingMaterialActions-DMGyAXcy.js → useMarketingMaterialActions-Do9xLe-A.js} +3 -3
- package/dist/{usePagination-DLOOwiiY.js → usePagination-CuHuUThw.js} +1 -1
- package/dist/{user-CTIGugVF.js → user-CX4hU-xf.js} +1 -1
- package/dist/{vue-i18n-Dpic36zz.js → vue-i18n-DOpMPUHr.js} +109 -109
- package/dist/{xlsx-CT9_1SFr.js → xlsx-BQVBwvzT.js} +166 -166
- package/dist/{zod-CGVrMcDl.js → zod-Jw_6SDXB.js} +1 -1
- package/package.json +1 -1
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-BZZ1fqwg.js +0 -1331
- package/dist/WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-D8L6izf0.js +0 -96
- package/dist/WhatsappBot-C4Oz7Xwv.js +0 -441
- package/dist/WhatsappBotSettings-CKqaWzwE.js +0 -136
- package/dist/index-D7-Q86HI.js +0 -54
- package/dist/index-hAKRfE-4.js +0 -67
- package/dist/index-o2Ga_qaX.js +0 -39
|
@@ -0,0 +1,561 @@
|
|
|
1
|
+
import { defineComponent as R, ref as w, computed as H, watch as L, onBeforeUnmount as K, resolveComponent as y, openBlock as n, createElementBlock as f, createElementVNode as t, normalizeClass as U, unref as e, toDisplayString as l, createBlock as C, withCtx as I, createTextVNode as z, createVNode as A, createCommentVNode as O, withModifiers as ae, Fragment as Q, renderList as Y, useModel as se, mergeProps as le, createSlots as re } from "vue";
|
|
2
|
+
import { u as G } from "./vue-i18n-DOpMPUHr.js";
|
|
3
|
+
import { useRouter as ce } from "vue-router";
|
|
4
|
+
import { S as j } from "./index-DiuFB2hK.js";
|
|
5
|
+
import { w as M } from "./index-DS__Cknq.js";
|
|
6
|
+
import { u as ie, _ as pe, w as ue } from "./WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-DUdFMygT.js";
|
|
7
|
+
import { R as k } from "./app-Cj6OWO36.js";
|
|
8
|
+
import { b as de } from "./browser-BSAOEeIM.js";
|
|
9
|
+
const me = { class: "flex items-center gap-[12px]" }, fe = { class: "min-w-0 flex-1" }, xe = ["title"], ve = { key: 1 }, he = { class: "text-[14px] leading-[20px] text-fm-color-typo-secondary break-all" }, _e = { class: "relative z-10 flex shrink-0 items-center gap-[12px]" }, ge = ["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]" }, ye = {
|
|
10
|
+
key: 0,
|
|
11
|
+
class: "text-[12px] text-fm-color-typo-secondary"
|
|
12
|
+
}, we = {
|
|
13
|
+
key: 0,
|
|
14
|
+
role: "alert",
|
|
15
|
+
class: "text-[14px] text-fm-color-typo-error"
|
|
16
|
+
}, Be = /* @__PURE__ */ R({
|
|
17
|
+
__name: "WhatsappAccountCard",
|
|
18
|
+
props: {
|
|
19
|
+
account: {}
|
|
20
|
+
},
|
|
21
|
+
emits: ["removed"],
|
|
22
|
+
setup(F, { emit: i }) {
|
|
23
|
+
const a = F, x = i, { t: u, locale: p } = G(), r = w(!1), v = w("");
|
|
24
|
+
let d;
|
|
25
|
+
const { name: $, phoneNumber: P, initials: g, state: E, avatarColor: W } = ie(
|
|
26
|
+
() => a.account
|
|
27
|
+
), m = H(() => E.value === "connected"), c = H(() => ({
|
|
28
|
+
name: k["$connect-WHATSAPP_ACCOUNT"],
|
|
29
|
+
params: { clientId: a.account.clientId }
|
|
30
|
+
}));
|
|
31
|
+
function h(V) {
|
|
32
|
+
return new Intl.DateTimeFormat(p.value, {
|
|
33
|
+
year: "numeric",
|
|
34
|
+
month: "short",
|
|
35
|
+
day: "numeric"
|
|
36
|
+
}).format(new Date(V));
|
|
37
|
+
}
|
|
38
|
+
async function _() {
|
|
39
|
+
if (r.value) return;
|
|
40
|
+
const V = j.getBusinessId();
|
|
41
|
+
if (!V) {
|
|
42
|
+
v.value = u("connect.whatsappBot.errors.selectBusiness");
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
const b = a.account.clientId, B = new AbortController();
|
|
46
|
+
d = B, r.value = !0, v.value = "";
|
|
47
|
+
try {
|
|
48
|
+
await M.deleteClient(V, b, B.signal), B.signal.aborted || x("removed", b);
|
|
49
|
+
} catch {
|
|
50
|
+
B.signal.aborted || (v.value = u("connect.whatsappBot.errors.removeAccount"));
|
|
51
|
+
} finally {
|
|
52
|
+
d === B && (d = void 0, r.value = !1);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
function S() {
|
|
56
|
+
d == null || d.abort(), d = void 0, r.value = !1, v.value = "";
|
|
57
|
+
}
|
|
58
|
+
return L(() => j.getBusinessId(), S), K(S), (V, b) => {
|
|
59
|
+
const B = y("RouterLink"), s = y("FmIcon"), o = y("FmCircularProgress");
|
|
60
|
+
return n(), f("li", null, [
|
|
61
|
+
t("div", {
|
|
62
|
+
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", {
|
|
63
|
+
"cursor-pointer transition-shadow hover:border-fm-color-neutral-gray-200 hover:fm-shadow-light-100": m.value
|
|
64
|
+
}])
|
|
65
|
+
}, [
|
|
66
|
+
t("div", me, [
|
|
67
|
+
t("div", {
|
|
68
|
+
"aria-hidden": "true",
|
|
69
|
+
class: U(["w-[48px] h-[48px] rounded-full shrink-0 flex items-center justify-center text-[16px] font-semibold text-fm-color-typo-white", e(W)])
|
|
70
|
+
}, l(e(g)), 3),
|
|
71
|
+
t("div", fe, [
|
|
72
|
+
t("h2", {
|
|
73
|
+
class: "text-[16px] leading-[24px] font-semibold truncate",
|
|
74
|
+
title: e($)
|
|
75
|
+
}, [
|
|
76
|
+
m.value ? (n(), C(B, {
|
|
77
|
+
key: 0,
|
|
78
|
+
to: c.value,
|
|
79
|
+
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]"
|
|
80
|
+
}, {
|
|
81
|
+
default: I(() => [
|
|
82
|
+
z(l(e($)), 1)
|
|
83
|
+
]),
|
|
84
|
+
_: 1
|
|
85
|
+
}, 8, ["to"])) : (n(), f("span", ve, l(e($)), 1))
|
|
86
|
+
], 8, xe),
|
|
87
|
+
t("p", he, l(e(P)), 1)
|
|
88
|
+
]),
|
|
89
|
+
t("div", _e, [
|
|
90
|
+
m.value ? (n(), C(B, {
|
|
91
|
+
key: 0,
|
|
92
|
+
to: c.value,
|
|
93
|
+
"aria-label": e(u)("connect.common.edit"),
|
|
94
|
+
title: e(u)("connect.common.edit"),
|
|
95
|
+
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"
|
|
96
|
+
}, {
|
|
97
|
+
default: I(() => [
|
|
98
|
+
A(s, {
|
|
99
|
+
name: "edit",
|
|
100
|
+
size: "sm",
|
|
101
|
+
outline: "",
|
|
102
|
+
"aria-hidden": "true"
|
|
103
|
+
})
|
|
104
|
+
]),
|
|
105
|
+
_: 1
|
|
106
|
+
}, 8, ["to", "aria-label", "title"])) : O("", !0),
|
|
107
|
+
t("button", {
|
|
108
|
+
type: "button",
|
|
109
|
+
"aria-label": e(u)("connect.common.remove"),
|
|
110
|
+
title: e(u)("connect.common.remove"),
|
|
111
|
+
disabled: r.value,
|
|
112
|
+
"aria-busy": r.value,
|
|
113
|
+
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",
|
|
114
|
+
onClick: ae(_, ["stop"])
|
|
115
|
+
}, [
|
|
116
|
+
r.value ? (n(), C(o, {
|
|
117
|
+
key: 0,
|
|
118
|
+
size: "md",
|
|
119
|
+
"aria-hidden": "true"
|
|
120
|
+
})) : (n(), C(s, {
|
|
121
|
+
key: 1,
|
|
122
|
+
name: "delete",
|
|
123
|
+
size: "sm",
|
|
124
|
+
outline: "",
|
|
125
|
+
"aria-hidden": "true"
|
|
126
|
+
}))
|
|
127
|
+
], 8, ge)
|
|
128
|
+
])
|
|
129
|
+
]),
|
|
130
|
+
t("div", be, [
|
|
131
|
+
A(pe, { state: e(E) }, null, 8, ["state"]),
|
|
132
|
+
m.value && F.account.connectedAt ? (n(), f("span", ye, l(e(u)("connect.whatsappBot.connectedSince", {
|
|
133
|
+
date: h(F.account.connectedAt)
|
|
134
|
+
})), 1)) : O("", !0)
|
|
135
|
+
]),
|
|
136
|
+
v.value ? (n(), f("p", we, l(v.value), 1)) : O("", !0)
|
|
137
|
+
], 2)
|
|
138
|
+
]);
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
}), Te = { class: "mt-[24px] grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] xs:grid-cols-1 gap-[16px]" }, ke = /* @__PURE__ */ R({
|
|
142
|
+
__name: "WhatsappAccountList",
|
|
143
|
+
props: {
|
|
144
|
+
accounts: {}
|
|
145
|
+
},
|
|
146
|
+
emits: ["removed"],
|
|
147
|
+
setup(F, { emit: i }) {
|
|
148
|
+
const a = i;
|
|
149
|
+
return (x, u) => (n(), f("ul", Te, [
|
|
150
|
+
(n(!0), f(Q, null, Y(F.accounts, (p) => (n(), C(Be, {
|
|
151
|
+
key: p.clientId,
|
|
152
|
+
account: p,
|
|
153
|
+
onRemoved: u[0] || (u[0] = (r) => a("removed", r))
|
|
154
|
+
}, null, 8, ["account"]))), 128))
|
|
155
|
+
]));
|
|
156
|
+
}
|
|
157
|
+
}), Ae = { class: "text-[18px] font-semibold" }, Ce = {
|
|
158
|
+
key: 0,
|
|
159
|
+
role: "status",
|
|
160
|
+
class: "flex flex-col items-center text-center gap-[8px] px-[8px] py-[40px]"
|
|
161
|
+
}, $e = { class: "text-[18px] font-semibold" }, Pe = { class: "text-[14px] text-fm-color-typo-secondary break-all" }, Se = {
|
|
162
|
+
key: 1,
|
|
163
|
+
class: "grid grid-cols-[minmax(0,1fr)_232px] xs:grid-cols-1 gap-[32px] p-[8px] xs:p-[0px]"
|
|
164
|
+
}, Ie = { class: "flex flex-col gap-[20px] text-[14px] leading-[20px]" }, Fe = { class: "text-fm-color-typo-secondary" }, Ee = { class: "flex flex-col gap-[14px]" }, We = { class: "w-[22px] h-[22px] shrink-0 rounded-full bg-fm-color-neutral-gray-100 flex items-center justify-center text-[12px] font-semibold" }, Ve = { key: 0 }, De = { class: "font-semibold" }, Ne = { class: "font-semibold" }, Oe = { class: "font-semibold" }, je = { class: "font-semibold" }, He = { key: 3 }, Me = { class: "text-[12px] leading-[16px] text-fm-color-typo-secondary" }, Re = { 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" }, Le = {
|
|
165
|
+
key: 0,
|
|
166
|
+
role: "status",
|
|
167
|
+
class: "flex flex-col items-center gap-[12px] text-[13px]"
|
|
168
|
+
}, Ue = {
|
|
169
|
+
key: 1,
|
|
170
|
+
class: "flex flex-col items-center text-center gap-[12px] p-[12px]"
|
|
171
|
+
}, ze = {
|
|
172
|
+
role: "alert",
|
|
173
|
+
class: "text-[14px] text-fm-color-typo-error"
|
|
174
|
+
}, Ge = ["src", "alt"], Ke = {
|
|
175
|
+
key: 3,
|
|
176
|
+
role: "status",
|
|
177
|
+
"aria-live": "polite",
|
|
178
|
+
class: "absolute inset-0 bg-fm-color-neutral-white/90 flex flex-col items-center justify-center gap-[10px] text-[13px] font-medium"
|
|
179
|
+
}, Qe = /* @__PURE__ */ R({
|
|
180
|
+
__name: "WhatsappConnectDialog",
|
|
181
|
+
props: {
|
|
182
|
+
modelValue: { type: Boolean, required: !0 },
|
|
183
|
+
modelModifiers: {}
|
|
184
|
+
},
|
|
185
|
+
emits: ["update:modelValue"],
|
|
186
|
+
setup(F) {
|
|
187
|
+
const i = se(F, "modelValue"), { t: a } = G(), x = w(""), u = w(!1), p = w(""), r = w(!1), v = w();
|
|
188
|
+
let d, $, P;
|
|
189
|
+
function g() {
|
|
190
|
+
d == null || d.abort(), clearTimeout($), $ = void 0, clearTimeout(P), P = void 0;
|
|
191
|
+
}
|
|
192
|
+
async function E(m, c, h) {
|
|
193
|
+
if (!h.aborted) {
|
|
194
|
+
try {
|
|
195
|
+
const _ = await M.getClient(m, c, h);
|
|
196
|
+
if (h.aborted) return;
|
|
197
|
+
if (r.value = _.status === "connected" || _.status === "connecting" && _.connectedAt !== null, _.status === "connected" && _.profileStatus === "ready") {
|
|
198
|
+
g(), r.value = !1, v.value = _, P = setTimeout(() => {
|
|
199
|
+
i.value = !1;
|
|
200
|
+
}, 1800);
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
203
|
+
if (_.status === "disconnected") {
|
|
204
|
+
g(), r.value = !1, x.value = "", p.value = a("connect.whatsappBot.errors.qrExpired");
|
|
205
|
+
return;
|
|
206
|
+
}
|
|
207
|
+
} catch {
|
|
208
|
+
}
|
|
209
|
+
h.aborted || ($ = setTimeout(() => {
|
|
210
|
+
E(m, c, h);
|
|
211
|
+
}, 2e3));
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
async function W() {
|
|
215
|
+
g();
|
|
216
|
+
const m = new AbortController();
|
|
217
|
+
d = m, x.value = "", p.value = "", r.value = !1, v.value = void 0, u.value = !0;
|
|
218
|
+
try {
|
|
219
|
+
const c = j.getBusinessId();
|
|
220
|
+
if (!c)
|
|
221
|
+
throw new Error(a("connect.whatsappBot.errors.selectBusiness"));
|
|
222
|
+
const h = await M.createClient(
|
|
223
|
+
c,
|
|
224
|
+
m.signal
|
|
225
|
+
), _ = await de.toDataURL(h.qr, {
|
|
226
|
+
width: 224,
|
|
227
|
+
margin: 2,
|
|
228
|
+
errorCorrectionLevel: "M"
|
|
229
|
+
});
|
|
230
|
+
m.signal.aborted || (x.value = _, E(c, h.clientId, m.signal));
|
|
231
|
+
} catch (c) {
|
|
232
|
+
m.signal.aborted || (p.value = c instanceof Error ? c.message : a("connect.whatsappBot.errors.loadQr"));
|
|
233
|
+
} finally {
|
|
234
|
+
m.signal.aborted || (u.value = !1);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
return L(
|
|
238
|
+
i,
|
|
239
|
+
(m) => {
|
|
240
|
+
m ? W() : g();
|
|
241
|
+
},
|
|
242
|
+
{ immediate: !0 }
|
|
243
|
+
), K(g), (m, c) => {
|
|
244
|
+
const h = y("i18n-t"), _ = y("FmCircularProgress"), S = y("FmButton"), V = y("FmDialog");
|
|
245
|
+
return n(), C(V, {
|
|
246
|
+
modelValue: i.value,
|
|
247
|
+
"onUpdate:modelValue": c[0] || (c[0] = (b) => i.value = b),
|
|
248
|
+
"min-width": "min(720px, calc(100% - 32px))",
|
|
249
|
+
"max-width": "720px",
|
|
250
|
+
"max-height": "90vh",
|
|
251
|
+
"dismiss-away": ""
|
|
252
|
+
}, {
|
|
253
|
+
"dialog-header": I(() => [
|
|
254
|
+
t("h2", Ae, l(e(a)("connect.whatsappBot.connectAccount")), 1)
|
|
255
|
+
]),
|
|
256
|
+
default: I(() => {
|
|
257
|
+
var b, B, s;
|
|
258
|
+
return [
|
|
259
|
+
v.value ? (n(), f("div", Ce, [
|
|
260
|
+
c[1] || (c[1] = t("div", {
|
|
261
|
+
"aria-hidden": "true",
|
|
262
|
+
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]"
|
|
263
|
+
}, [
|
|
264
|
+
t("svg", {
|
|
265
|
+
width: "32",
|
|
266
|
+
height: "32",
|
|
267
|
+
viewBox: "0 0 24 24",
|
|
268
|
+
fill: "none",
|
|
269
|
+
stroke: "currentColor",
|
|
270
|
+
"stroke-width": "2.2",
|
|
271
|
+
"stroke-linecap": "round",
|
|
272
|
+
"stroke-linejoin": "round"
|
|
273
|
+
}, [
|
|
274
|
+
t("path", { d: "M20 6 9 17l-5-5" })
|
|
275
|
+
])
|
|
276
|
+
], -1)),
|
|
277
|
+
t("h3", $e, l(e(a)("connect.whatsappBot.accountConnected")), 1),
|
|
278
|
+
t("p", Pe, l(((b = v.value.account) == null ? void 0 : b.businessName) || ((B = v.value.account) == null ? void 0 : B.name) || e(a)("connect.whatsappBot.unnamedAccount")) + " · " + l(((s = v.value.account) == null ? void 0 : s.phoneNumber) || e(a)("connect.whatsappBot.phoneUnavailable")), 1)
|
|
279
|
+
])) : (n(), f("div", Se, [
|
|
280
|
+
t("div", Ie, [
|
|
281
|
+
t("p", Fe, l(e(a)("connect.whatsappBot.scanDescription")), 1),
|
|
282
|
+
t("ol", Ee, [
|
|
283
|
+
(n(), f(Q, null, Y(4, (o) => t("li", {
|
|
284
|
+
key: o,
|
|
285
|
+
class: "flex gap-[12px]"
|
|
286
|
+
}, [
|
|
287
|
+
t("span", We, l(o), 1),
|
|
288
|
+
o === 1 ? (n(), f("span", Ve, l(e(a)("connect.whatsappBot.steps.openApp")), 1)) : o === 2 ? (n(), C(h, {
|
|
289
|
+
key: 1,
|
|
290
|
+
keypath: "connect.whatsappBot.steps.openSettings",
|
|
291
|
+
tag: "span",
|
|
292
|
+
scope: "global"
|
|
293
|
+
}, {
|
|
294
|
+
menu: I(() => [
|
|
295
|
+
t("b", De, l(e(a)("connect.whatsappBot.menu")), 1)
|
|
296
|
+
]),
|
|
297
|
+
settings: I(() => [
|
|
298
|
+
t("b", Ne, l(e(a)("connect.whatsappBot.settings")), 1)
|
|
299
|
+
]),
|
|
300
|
+
_: 1
|
|
301
|
+
})) : o === 3 ? (n(), C(h, {
|
|
302
|
+
key: 2,
|
|
303
|
+
keypath: "connect.whatsappBot.steps.linkDevice",
|
|
304
|
+
tag: "span",
|
|
305
|
+
scope: "global"
|
|
306
|
+
}, {
|
|
307
|
+
linkedDevices: I(() => [
|
|
308
|
+
t("b", Oe, l(e(a)("connect.whatsappBot.linkedDevices")), 1)
|
|
309
|
+
]),
|
|
310
|
+
linkDevice: I(() => [
|
|
311
|
+
t("b", je, l(e(a)("connect.whatsappBot.linkDevice")), 1)
|
|
312
|
+
]),
|
|
313
|
+
_: 1
|
|
314
|
+
})) : (n(), f("span", He, l(e(a)("connect.whatsappBot.steps.scanQr")), 1))
|
|
315
|
+
])), 64))
|
|
316
|
+
]),
|
|
317
|
+
t("p", Me, l(e(a)("connect.whatsappBot.connectionNote")), 1)
|
|
318
|
+
]),
|
|
319
|
+
t("div", Re, [
|
|
320
|
+
u.value ? (n(), f("div", Le, [
|
|
321
|
+
A(_),
|
|
322
|
+
z(l(e(a)("connect.whatsappBot.generatingQr")), 1)
|
|
323
|
+
])) : p.value ? (n(), f("div", Ue, [
|
|
324
|
+
t("p", ze, l(p.value), 1),
|
|
325
|
+
A(S, {
|
|
326
|
+
label: e(a)("connect.whatsappBot.tryAgain"),
|
|
327
|
+
"prepend-icon": "refresh",
|
|
328
|
+
onClick: W
|
|
329
|
+
}, null, 8, ["label"])
|
|
330
|
+
])) : x.value ? (n(), f("img", {
|
|
331
|
+
key: 2,
|
|
332
|
+
src: x.value,
|
|
333
|
+
alt: e(a)("connect.whatsappBot.qrAlt"),
|
|
334
|
+
width: "224",
|
|
335
|
+
height: "224",
|
|
336
|
+
class: U({ "opacity-20": r.value })
|
|
337
|
+
}, null, 10, Ge)) : O("", !0),
|
|
338
|
+
r.value ? (n(), f("div", Ke, [
|
|
339
|
+
A(_),
|
|
340
|
+
z(" " + l(e(a)("connect.whatsappBot.connecting")), 1)
|
|
341
|
+
])) : O("", !0)
|
|
342
|
+
])
|
|
343
|
+
]))
|
|
344
|
+
];
|
|
345
|
+
}),
|
|
346
|
+
_: 1
|
|
347
|
+
}, 8, ["modelValue"]);
|
|
348
|
+
};
|
|
349
|
+
}
|
|
350
|
+
}), Ze = { 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]" }, Je = { class: "text-[20px] leading-[28px] font-bold" }, Xe = { class: "text-[14px] leading-[20px] text-fm-color-typo-secondary max-w-[420px]" }, Ye = /* @__PURE__ */ R({
|
|
351
|
+
__name: "WhatsappEmptyState",
|
|
352
|
+
emits: ["connect"],
|
|
353
|
+
setup(F, { emit: i }) {
|
|
354
|
+
const a = i, { t: x } = G();
|
|
355
|
+
return (u, p) => {
|
|
356
|
+
const r = y("FmButton");
|
|
357
|
+
return n(), f("div", Ze, [
|
|
358
|
+
p[1] || (p[1] = t("div", { class: "w-[72px] h-[72px] rounded-full bg-fm-color-primary-oats text-fm-color-primary flex items-center justify-center mb-[12px]" }, [
|
|
359
|
+
t("svg", {
|
|
360
|
+
width: "34",
|
|
361
|
+
height: "34",
|
|
362
|
+
viewBox: "0 0 24 24",
|
|
363
|
+
fill: "none",
|
|
364
|
+
stroke: "currentColor",
|
|
365
|
+
"stroke-width": "1.6",
|
|
366
|
+
"stroke-linecap": "round",
|
|
367
|
+
"stroke-linejoin": "round",
|
|
368
|
+
"aria-hidden": "true"
|
|
369
|
+
}, [
|
|
370
|
+
t("path", { d: "M7.9 20A9 9 0 1 0 4 16.1L2 22Z" }),
|
|
371
|
+
t("path", { d: "M9 10h.01M12 10h.01M15 10h.01" })
|
|
372
|
+
])
|
|
373
|
+
], -1)),
|
|
374
|
+
t("h2", Je, l(e(x)("connect.whatsappBot.emptyTitle")), 1),
|
|
375
|
+
t("p", Xe, l(e(x)("connect.whatsappBot.emptyDescription")), 1),
|
|
376
|
+
A(r, {
|
|
377
|
+
class: "mt-[16px]",
|
|
378
|
+
label: e(x)("connect.whatsappBot.connectAccountCta"),
|
|
379
|
+
"prepend-icon": "add",
|
|
380
|
+
onClick: p[0] || (p[0] = (v) => a("connect"))
|
|
381
|
+
}, null, 8, ["label"])
|
|
382
|
+
]);
|
|
383
|
+
};
|
|
384
|
+
}
|
|
385
|
+
}), qe = { class: "px-[24px] xs:px-[12px] pt-[20px] pb-[40px] text-fm-color-typo-primary" }, et = { class: "flex items-center justify-between gap-[16px] flex-wrap min-h-[40px]" }, tt = { class: "flex items-center gap-8" }, ot = { class: "text-[24px] leading-[32px] font-semibold tracking-[-0.01em]" }, nt = {
|
|
386
|
+
key: 2,
|
|
387
|
+
role: "status",
|
|
388
|
+
class: "mt-[24px] py-[56px] flex flex-col items-center gap-[12px] text-[14px] text-fm-color-typo-secondary"
|
|
389
|
+
}, at = {
|
|
390
|
+
key: 3,
|
|
391
|
+
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]"
|
|
392
|
+
}, st = {
|
|
393
|
+
role: "alert",
|
|
394
|
+
class: "text-[14px] text-fm-color-typo-error"
|
|
395
|
+
}, ft = /* @__PURE__ */ R({
|
|
396
|
+
__name: "WhatsappBot",
|
|
397
|
+
setup(F) {
|
|
398
|
+
const { t: i } = G(), a = ce(), x = w([]), u = w(!0), p = w("");
|
|
399
|
+
let r, v;
|
|
400
|
+
const d = w([]), $ = w(!0), P = w("");
|
|
401
|
+
let g, E;
|
|
402
|
+
const W = H(
|
|
403
|
+
() => x.value.filter((s) => ue(s) !== void 0)
|
|
404
|
+
), m = H(() => [
|
|
405
|
+
{
|
|
406
|
+
label: i("connect.whatsappBot.accounts"),
|
|
407
|
+
value: k["$connect-WHATSAPP_BOT"],
|
|
408
|
+
badge: W.value.length
|
|
409
|
+
},
|
|
410
|
+
{
|
|
411
|
+
label: i("connect.whatsappBot.settings"),
|
|
412
|
+
value: k["$connect-WHATSAPP_BOT_SETTINGS"]
|
|
413
|
+
},
|
|
414
|
+
{
|
|
415
|
+
label: i("connect.whatsappBot.tickets.title"),
|
|
416
|
+
value: k["$connect-WHATSAPP_BOT_TICKETS"],
|
|
417
|
+
badge: d.value.length
|
|
418
|
+
}
|
|
419
|
+
]), c = H(() => {
|
|
420
|
+
const s = a.currentRoute.value.name;
|
|
421
|
+
return s === k["$connect-WHATSAPP_BOT_SETTINGS"] || s === k["$connect-WHATSAPP_BOT_TICKETS"] ? s : k["$connect-WHATSAPP_BOT"];
|
|
422
|
+
});
|
|
423
|
+
async function h(s = !1) {
|
|
424
|
+
clearTimeout(E), g == null || g.abort();
|
|
425
|
+
const o = new AbortController();
|
|
426
|
+
g = o, s || ($.value = !0, P.value = "");
|
|
427
|
+
try {
|
|
428
|
+
const T = j.getBusinessId();
|
|
429
|
+
if (!T)
|
|
430
|
+
throw new Error(i("connect.whatsappBot.errors.selectBusiness"));
|
|
431
|
+
const N = await M.listTickets(T, o.signal);
|
|
432
|
+
o.signal.aborted || (d.value = N, P.value = "");
|
|
433
|
+
} catch (T) {
|
|
434
|
+
o.signal.aborted || (P.value = T instanceof Error ? T.message : i("connect.whatsappBot.tickets.loadError"));
|
|
435
|
+
} finally {
|
|
436
|
+
o.signal.aborted || ($.value = !1, E = setTimeout(() => void h(!0), 1e4));
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
function _(s) {
|
|
440
|
+
d.value = d.value.filter((o) => o.id !== s), h(!0);
|
|
441
|
+
}
|
|
442
|
+
async function S(s = !1) {
|
|
443
|
+
clearTimeout(v), r == null || r.abort();
|
|
444
|
+
const o = new AbortController();
|
|
445
|
+
r = o, s || (u.value = !0, p.value = "");
|
|
446
|
+
try {
|
|
447
|
+
const T = j.getBusinessId();
|
|
448
|
+
if (!T)
|
|
449
|
+
throw new Error(i("connect.whatsappBot.errors.selectBusiness"));
|
|
450
|
+
const N = await M.listClients(T, o.signal);
|
|
451
|
+
o.signal.aborted || (x.value = N, p.value = "");
|
|
452
|
+
} catch (T) {
|
|
453
|
+
!o.signal.aborted && !s && (p.value = T instanceof Error ? T.message : i("connect.whatsappBot.errors.loadSessions"));
|
|
454
|
+
} finally {
|
|
455
|
+
o.signal.aborted || (u.value = !1, v = setTimeout(() => void S(!0), 1e4));
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
function V(s) {
|
|
459
|
+
x.value = x.value.filter(
|
|
460
|
+
(o) => o.clientId !== s
|
|
461
|
+
), S(!0);
|
|
462
|
+
}
|
|
463
|
+
const b = w(!1);
|
|
464
|
+
function B(s) {
|
|
465
|
+
(s === k["$connect-WHATSAPP_BOT"] || s === k["$connect-WHATSAPP_BOT_SETTINGS"] || s === k["$connect-WHATSAPP_BOT_TICKETS"]) && a.push({ name: s });
|
|
466
|
+
}
|
|
467
|
+
return L(b, (s) => {
|
|
468
|
+
s || S();
|
|
469
|
+
}), L(
|
|
470
|
+
() => j.getBusinessId(),
|
|
471
|
+
() => {
|
|
472
|
+
b.value = !1, x.value = [], d.value = [], S(), h();
|
|
473
|
+
},
|
|
474
|
+
{ immediate: !0 }
|
|
475
|
+
), K(() => {
|
|
476
|
+
r == null || r.abort(), clearTimeout(v), g == null || g.abort(), clearTimeout(E);
|
|
477
|
+
}), (s, o) => {
|
|
478
|
+
const T = y("FmPill"), N = y("FmButton"), q = y("FmBadge"), ee = y("FmTab"), te = y("FmTabs"), Z = y("RouterView"), oe = y("FmCircularProgress");
|
|
479
|
+
return n(), f(Q, null, [
|
|
480
|
+
t("div", qe, [
|
|
481
|
+
t("div", et, [
|
|
482
|
+
t("div", tt, [
|
|
483
|
+
t("h1", ot, l(e(i)("connect.navigation.whatsappBot")), 1),
|
|
484
|
+
A(T, { variant: "beta" })
|
|
485
|
+
]),
|
|
486
|
+
c.value === e(k)["$connect-WHATSAPP_BOT"] && W.value.length ? (n(), C(N, {
|
|
487
|
+
key: 0,
|
|
488
|
+
label: e(i)("connect.whatsappBot.connectAccountCta"),
|
|
489
|
+
"prepend-icon": "add",
|
|
490
|
+
onClick: o[0] || (o[0] = (D) => b.value = !0)
|
|
491
|
+
}, null, 8, ["label"])) : O("", !0)
|
|
492
|
+
]),
|
|
493
|
+
A(te, {
|
|
494
|
+
"model-value": c.value,
|
|
495
|
+
items: m.value,
|
|
496
|
+
role: "tablist",
|
|
497
|
+
"aria-label": e(i)("connect.navigation.whatsappBot"),
|
|
498
|
+
class: "mt-[16px] border-b border-fm-color-neutral-gray-100"
|
|
499
|
+
}, {
|
|
500
|
+
default: I(({ label: D, value: J, badge: X, tabsProps: ne }) => [
|
|
501
|
+
A(ee, le(ne, {
|
|
502
|
+
"model-value": c.value,
|
|
503
|
+
label: D,
|
|
504
|
+
value: J,
|
|
505
|
+
"onUpdate:modelValue": B
|
|
506
|
+
}), re({ _: 2 }, [
|
|
507
|
+
X ? {
|
|
508
|
+
name: "append",
|
|
509
|
+
fn: I(() => [
|
|
510
|
+
A(q, {
|
|
511
|
+
value: X,
|
|
512
|
+
variant: "neutral",
|
|
513
|
+
inline: "",
|
|
514
|
+
class: U(
|
|
515
|
+
c.value === J ? "bg-fm-color-primary-oats text-fm-color-primary" : "bg-fm-color-neutral-gray-100 text-fm-color-typo-secondary"
|
|
516
|
+
)
|
|
517
|
+
}, null, 8, ["value", "class"])
|
|
518
|
+
]),
|
|
519
|
+
key: "0"
|
|
520
|
+
} : void 0
|
|
521
|
+
]), 1040, ["model-value", "label", "value"])
|
|
522
|
+
]),
|
|
523
|
+
_: 1
|
|
524
|
+
}, 8, ["model-value", "items", "aria-label"]),
|
|
525
|
+
c.value === e(k)["$connect-WHATSAPP_BOT_SETTINGS"] ? (n(), C(Z, { key: 0 })) : c.value === e(k)["$connect-WHATSAPP_BOT_TICKETS"] ? (n(), C(Z, {
|
|
526
|
+
key: 1,
|
|
527
|
+
tickets: d.value,
|
|
528
|
+
loading: $.value,
|
|
529
|
+
error: P.value,
|
|
530
|
+
onRetry: o[1] || (o[1] = (D) => h()),
|
|
531
|
+
onResolved: _
|
|
532
|
+
}, null, 8, ["tickets", "loading", "error"])) : u.value ? (n(), f("div", nt, [
|
|
533
|
+
A(oe),
|
|
534
|
+
z(" " + l(e(i)("connect.whatsappBot.loadingSessions")), 1)
|
|
535
|
+
])) : p.value ? (n(), f("div", at, [
|
|
536
|
+
t("p", st, l(p.value), 1),
|
|
537
|
+
A(N, {
|
|
538
|
+
label: e(i)("connect.whatsappBot.tryAgain"),
|
|
539
|
+
"prepend-icon": "refresh",
|
|
540
|
+
onClick: o[2] || (o[2] = (D) => S())
|
|
541
|
+
}, null, 8, ["label"])
|
|
542
|
+
])) : W.value.length ? (n(), C(ke, {
|
|
543
|
+
key: 4,
|
|
544
|
+
accounts: W.value,
|
|
545
|
+
onRemoved: V
|
|
546
|
+
}, null, 8, ["accounts"])) : (n(), C(Ye, {
|
|
547
|
+
key: 5,
|
|
548
|
+
onConnect: o[3] || (o[3] = (D) => b.value = !0)
|
|
549
|
+
}))
|
|
550
|
+
]),
|
|
551
|
+
A(Qe, {
|
|
552
|
+
modelValue: b.value,
|
|
553
|
+
"onUpdate:modelValue": o[4] || (o[4] = (D) => b.value = D)
|
|
554
|
+
}, null, 8, ["modelValue"])
|
|
555
|
+
], 64);
|
|
556
|
+
};
|
|
557
|
+
}
|
|
558
|
+
});
|
|
559
|
+
export {
|
|
560
|
+
ft as default
|
|
561
|
+
};
|