@feedmepos/mf-connect 0.1.113-beta.3 → 0.1.114-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{App-YfpYV7C0.js → App-CIWTDYuZ.js} +11 -11
- package/dist/{AuditLogs-kD0_HO_p.js → AuditLogs-BluLDXu9.js} +12 -12
- package/dist/{Bin-Dr-Xp3pn.js → Bin-jS6pM4L3.js} +8 -8
- package/dist/{Broadcast-CEbHu2xA.js → Broadcast-DBqsSZ0S.js} +12 -12
- package/dist/{CampaignAnalytic-DDiGxPwp.js → CampaignAnalytic-DJrjXD4H.js} +7 -7
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Cc_Yho9-.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CzwigRLi.js} +8 -8
- package/dist/{Card-BUnwg0eM.js → Card-B10nLilL.js} +22 -22
- package/dist/{Collections-CKyBkKq2.js → Collections-BN42A73p.js} +8 -8
- package/dist/{Credit-CJOXWLV1.js → Credit-0SS26HGE.js} +12 -12
- package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-DmEBLeNI.js → DateRangeChip.vue_vue_type_script_setup_true_lang-B3wozBFs.js} +1 -1
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-Ce5R4Un6.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-BRd5RVYe.js} +35 -35
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-CMFmlqfF.js → EffectSheet.vue_vue_type_style_index_0_lang-zV9dLCWp.js} +6 -6
- package/dist/{Experience-C_Am5CTY.js → Experience-D7qPzsrc.js} +13 -13
- package/dist/{FileSaver.min-CueAGbjq.js → FileSaver.min-BKWoklMK.js} +1 -1
- package/dist/{Game-B6GO_LVU.js → Game-BoYMwfog.js} +13 -13
- package/dist/{GiftCardSetup-CVLDDpI2.js → GiftCardSetup-B87O0xzo.js} +10 -10
- package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-isfGhKO1.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-B3uGbEFY.js} +7 -7
- package/dist/{Goals-BX-sMV2V.js → Goals-CVxf3xCA.js} +4 -4
- package/dist/{Grab-Bh335Srh.js → Grab-mGL1Mue_.js} +9 -9
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-srSgUY3e.js → ImageInput.vue_vue_type_script_setup_true_lang-HipBZ1_T.js} +1 -1
- package/dist/{Index-CyXRbwcm.js → Index-Dptuy-6c.js} +10 -10
- package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-S3GB2Ems.js → LocationPicker.vue_vue_type_script_setup_true_lang-Cjc4UeKz.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-ZlWHXwXZ.js → LottieAnimation.vue_vue_type_script_setup_true_lang-Bh0ari3f.js} +1 -1
- package/dist/{LoyaltyDashboard-DrTq8oiu.js → LoyaltyDashboard-BxhI6RAE.js} +15 -15
- package/dist/{MainLayout-KbKkpX5n.js → MainLayout-YfDxvZXl.js} +1 -1
- package/dist/{MainLayout.vue_vue_type_script_setup_true_lang-2D5ate_s.js → MainLayout.vue_vue_type_script_setup_true_lang-BgXpznbi.js} +3 -3
- package/dist/{Marketing-DQT1MWQg.js → Marketing-C2cVJacf.js} +4 -4
- package/dist/{MarketingMaterialEdit-fSqr53-M.js → MarketingMaterialEdit-DkOEy_L-.js} +6 -6
- package/dist/{Member-DwDUCzlv.js → Member-DufbKDOh.js} +7 -7
- package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-DaQ4Lw8f.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-CU8EmBxy.js} +23 -23
- package/dist/{MemberImportHistory-D4ezvJGZ.js → MemberImportHistory-DlFN-uQl.js} +7 -7
- package/dist/{MemberList-DFieV7Qk.js → MemberList-B344n8I4.js} +14 -14
- package/dist/{MemberTransactions-BPOXyAuC.js → MemberTransactions-BS7H640M.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DhfsgDd4.js → MessageInput.vue_vue_type_script_setup_true_lang-CxDtXvwd.js} +10 -10
- package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-CX8bk_IQ.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-lY0jlyOG.js} +1 -1
- package/dist/{Mission-nErb05Es.js → Mission-D2ed_oKn.js} +14 -14
- package/dist/{Overview-DuJr_hAg.js → Overview-CLh_T6YY.js} +4 -4
- package/dist/{Overview-7G31a7B-.js → Overview-DJa-hXDC.js} +20 -20
- package/dist/{Point-PWDLemD4.js → Point-DAPeg1VD.js} +14 -14
- package/dist/{Promotion-N80Tj8M6.js → Promotion-CPPCMMFl.js} +14 -14
- package/dist/{Queue-M7ZpgiMT.js → Queue-BcPwCRcM.js} +12 -12
- package/dist/{Record-NhxrdvWv.js → Record-C5XKn--g.js} +9 -9
- package/dist/{Review-DiAaAzIG.js → Review-Cc51luIv.js} +2 -2
- package/dist/{ReviewFacebookCallback-JdyxFbNl.js → ReviewFacebookCallback-BSGInFB8.js} +5 -5
- package/dist/{ReviewGoogleCallback-BXbI3Bsh.js → ReviewGoogleCallback-C1gY4vcP.js} +5 -5
- package/dist/{Reward-yTaOqOT8.js → Reward-k1R3hLiF.js} +16 -16
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-BWPfjZ9K.js → RewardGroup.vue_vue_type_script_setup_true_lang-BGbbGVK4.js} +13 -13
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-Cz2H9MKe.js → RuleGroup.vue_vue_type_script_setup_true_lang-Coh3L11L.js} +14 -14
- package/dist/{Segment-DE9Bcd6R.js → Segment-DsBnIvje.js} +25 -25
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-pmv0cb4J.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-CMKpvXN-.js} +14 -14
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-BeWwkTix.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-LyAtRMs8.js} +4 -4
- package/dist/{Setting-C0JAxIRT.js → Setting-BRueNgc4.js} +14 -14
- package/dist/{SettingAdvertisements-DxueyKU8.js → SettingAdvertisements-BrVcQyhF.js} +12 -12
- package/dist/{Settings-Cs46AcxZ.js → Settings-fOvXd29Z.js} +5 -5
- package/dist/{Store-DqQae9nE.js → Store-rrh2pIHH.js} +26 -26
- package/dist/{StoreRewards-JxSUsOzJ.js → StoreRewards-D-jivVKr.js} +15 -15
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-qgrBtUNX.js → StoreTransactions.vue_vue_type_script_setup_true_lang-CvQXsZbH.js} +24 -24
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-D7ifzgsI.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-DbnY9VE9.js} +2 -2
- package/dist/{Tier-DWhgWush.js → Tier-DJiLtw3M.js} +26 -26
- package/dist/{Title-DUNeMdz8.js → Title-s0bzA7yZ.js} +22 -22
- package/dist/{Transaction-DAv-LVhC.js → Transaction-CQ-CJ_eh.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-Cih-9IoW.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-Bfy8SZH1.js} +6 -6
- package/dist/{Voucher-uLTq9RSK.js → Voucher-9vydRET7.js} +18 -18
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-BevVL_Kx.js → VoucherEditor.vue_vue_type_script_setup_true_lang-Dq7veRL5.js} +12 -12
- package/dist/{WhatsappAccount-BpXQ4q0P.js → WhatsappAccount-D12Hvzfl.js} +52 -51
- package/dist/{WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-EssnbsgT.js → WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-BrZEDi6O.js} +1 -1
- package/dist/WhatsappBot-o5b_0CnB.js +629 -0
- package/dist/{WhatsappBotLogs-DDN4H_bv.js → WhatsappBotLogs-CK_V_iT5.js} +39 -39
- package/dist/WhatsappBotSettings-BooibLUg.js +694 -0
- package/dist/{WhatsappLayout-DSnq84Uo.js → WhatsappLayout-bOyNHGUI.js} +3 -3
- package/dist/WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-Cytrffdh.js +253 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CR-F0x1r.js → ZodTextField.vue_vue_type_script_setup_true_lang-96t_eUzk.js} +2 -2
- package/dist/{app-Devzv4gO.js → app-DV3e2LkD.js} +342 -267
- package/dist/app.js +1 -1
- package/dist/{base.export-CCSMkvAm.js → base.export-DQUUtGmy.js} +2 -2
- package/dist/{business-BjAmUqNA.js → business-BZ0boE-5.js} +1 -1
- package/dist/{campaign-C5c47GqT.js → campaign-CsfFq2S-.js} +8 -8
- package/dist/{campaign-CTe-T5Gd.js → campaign-DMrtYWcs.js} +2 -2
- package/dist/{campaign.fn-DxAO8A5b.js → campaign.fn-C-CdNNdR.js} +185 -185
- package/dist/{collection.fn-C9l-OtNt.js → collection.fn-C-rryKSc.js} +2 -2
- package/dist/{currency-mwm4AWXK.js → currency-BOd9iVZV.js} +1 -1
- package/dist/{duplicateCampaign-BbC4AwQ1.js → duplicateCampaign-ey_rW0Bz.js} +2 -2
- package/dist/{effect-D8ba9z0K.js → effect-BP6Hkxmj.js} +1 -1
- package/dist/{email-addresses-BR5J6_Jz.js → email-addresses-CO61QAq0.js} +2 -2
- package/dist/{feature-flag-C-5NdFW8.js → feature-flag-Bq1SgbYC.js} +1 -1
- package/dist/{feature-flag-CNcU4_3r.js → feature-flag-lvPP0ED-.js} +1 -1
- package/dist/{helper-D9cEaMIv.js → helper-BRpts-M-.js} +1 -1
- package/dist/{index-OvnHt5x5.js → index-03WIXl-H.js} +2 -2
- package/dist/{index-BfoDdVQS.js → index-B0RavybO.js} +2 -2
- package/dist/{index-BvY2hQac.js → index-BDNkoALK.js} +1 -1
- package/dist/{index-CmzjBrHR.js → index-BV5aPSYo.js} +8 -8
- package/dist/{index-B_gzo75q.js → index-Bk20uvPY.js} +1 -1
- package/dist/{index-Drmh0FT-.js → index-Bn19rfby.js} +3 -3
- package/dist/{index-DwTBiVts.js → index-Cj-eugzc.js} +1 -1
- package/dist/{index-DtcUCknS.js → index-CoROn5OA.js} +2 -2
- package/dist/{index-DnepoNWn.js → index-CrBhcMaL.js} +3 -3
- package/dist/{index-CZfqqrVu.js → index-CsBjAM3E.js} +1 -1
- package/dist/{index-yGSko6Eq.js → index-D1t4_KaG.js} +1 -1
- package/dist/{index-B7HH6vKF.js → index-D3wGTCWf.js} +2 -2
- package/dist/{index-D34iYRdc.js → index-D41kjcrZ.js} +4 -4
- package/dist/{index-B1jP-_Z_.js → index-DIZLkVe0.js} +10 -10
- package/dist/{index-Ct6YjTIW.js → index-DucKyzrD.js} +2 -2
- package/dist/{index-D4k1G2oE.js → index-R5WS21OL.js} +1 -1
- package/dist/{index-BFaZp6Et.js → index-VYI0zWNC.js} +2 -2
- package/dist/{index-0H82-X0n.js → index-ZRE89TKq.js} +1 -1
- package/dist/{index-Byg4ztr-.js → index-_Cj-bsd_.js} +14 -14
- package/dist/{index-VqAbYyHH.js → index-mToWKHVs.js} +2 -2
- package/dist/{index.esm2017-DLb2VyCT.js → index.esm2017-B_Sag8Pg.js} +76 -76
- package/dist/{loading-CUNk5u1d.js → loading-C5fVI0ry.js} +1 -1
- package/dist/{lodash-BJXravls.js → lodash-COo8_xCU.js} +1 -1
- package/dist/{member-import-DjYoddBi.js → member-import-I_pKwUfF.js} +1 -1
- package/dist/{membership-ByJUFP8f.js → membership-BgfH9Kva.js} +2 -2
- package/dist/{money-Bf2IEMJJ.js → money-Cr07YDlV.js} +1 -1
- package/dist/{number-CRBHrRUL.js → number-DFsj0dkh.js} +1 -1
- package/dist/objectid-Cu89BzwI.js +145 -0
- package/dist/{onboarding-CQ3lw7eY.js → onboarding-DlkJCm-5.js} +3 -3
- package/dist/{onboardingSetup-CsdZKGFk.js → onboardingSetup-BEhVj613.js} +2 -2
- package/dist/{plugins-iTZLbJGy.js → plugins-CPTtiKqf.js} +3 -3
- package/dist/{reward-DTN6JpEd.js → reward-DqY0mQ_5.js} +1 -1
- package/dist/{rule-BYACNQOL.js → rule-mJJ48eKw.js} +9 -9
- package/dist/{template--Vr0PCjB.js → template-C1QftpDG.js} +6 -6
- package/dist/{timezone-DwzjOED-.js → timezone-BBgBHels.js} +1 -1
- package/dist/{transaction.fn-DapYe3n7.js → transaction.fn-Sr0hj3kY.js} +2 -2
- package/dist/{trigger-D8r76yb0.js → trigger-PUP0mwKM.js} +7 -7
- package/dist/{useMarketingMaterialActions-CdMmibPE.js → useMarketingMaterialActions-faslwaHd.js} +3 -3
- package/dist/{usePagination-BRcQJkO1.js → usePagination-Be6nIQ9y.js} +1 -1
- package/dist/{user-vBZFKqXQ.js → user-DBSYzG_9.js} +1 -1
- package/dist/{vue-i18n-Cw6fF11e.js → vue-i18n-C6c2jsH3.js} +409 -409
- package/dist/{xlsx-Muy_Rjhk.js → xlsx-Bfo19lFv.js} +224 -224
- package/dist/{zod-CCPTOeUz.js → zod-CihbDg3N.js} +1 -1
- package/package.json +1 -1
- package/dist/WhatsappBot-DB4NRZMd.js +0 -589
- package/dist/WhatsappBotSettings-Bkv1VNwF.js +0 -387
- package/dist/WhatsappBotTickets-DAKgnE6T.js +0 -162
- package/dist/WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-1BvxPD-k.js +0 -195
- package/dist/objectid-58gyOvdR.js +0 -145
- package/dist/useWhatsappAccount-BOJ8fz84.js +0 -62
package/package.json
CHANGED
|
@@ -1,589 +0,0 @@
|
|
|
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-Cw6fF11e.js";
|
|
3
|
-
import { useRouter as ce } from "vue-router";
|
|
4
|
-
import { S as D, a as ie } from "./index-OvnHt5x5.js";
|
|
5
|
-
import { w as N } from "./index-0H82-X0n.js";
|
|
6
|
-
import { u as ue, w as pe } from "./useWhatsappAccount-BOJ8fz84.js";
|
|
7
|
-
import { R as g } from "./app-Devzv4gO.js";
|
|
8
|
-
import { _ as de } from "./WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-EssnbsgT.js";
|
|
9
|
-
import { b as me } from "./browser-BSAOEeIM.js";
|
|
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 = {
|
|
11
|
-
key: 0,
|
|
12
|
-
class: "text-[12px] text-fm-color-typo-secondary"
|
|
13
|
-
}, ke = {
|
|
14
|
-
key: 0,
|
|
15
|
-
role: "alert",
|
|
16
|
-
class: "text-[14px] text-fm-color-typo-error"
|
|
17
|
-
}, Ae = /* @__PURE__ */ M({
|
|
18
|
-
__name: "WhatsappAccountCard",
|
|
19
|
-
props: {
|
|
20
|
-
account: {}
|
|
21
|
-
},
|
|
22
|
-
emits: ["removed"],
|
|
23
|
-
setup(F, { emit: i }) {
|
|
24
|
-
const s = F, f = i, { t: v, locale: u } = z(), l = T(!1), _ = T("");
|
|
25
|
-
let x;
|
|
26
|
-
const {
|
|
27
|
-
name: $,
|
|
28
|
-
phoneNumber: P,
|
|
29
|
-
initials: y,
|
|
30
|
-
state: E,
|
|
31
|
-
avatarColor: C,
|
|
32
|
-
profilePictureUrl: h,
|
|
33
|
-
profilePictureFailed: c
|
|
34
|
-
} = ue(() => s.account), p = L(() => E.value === "connected"), d = L(() => ({
|
|
35
|
-
name: g["$connect-WHATSAPP_ACCOUNT"],
|
|
36
|
-
params: { clientId: s.account.clientId }
|
|
37
|
-
}));
|
|
38
|
-
function W(S) {
|
|
39
|
-
return new Intl.DateTimeFormat(u.value, {
|
|
40
|
-
year: "numeric",
|
|
41
|
-
month: "short",
|
|
42
|
-
day: "numeric"
|
|
43
|
-
}).format(new Date(S));
|
|
44
|
-
}
|
|
45
|
-
async function j() {
|
|
46
|
-
if (l.value) return;
|
|
47
|
-
const S = D.getBusinessId();
|
|
48
|
-
if (!S) {
|
|
49
|
-
_.value = v("connect.whatsappBot.errors.selectBusiness");
|
|
50
|
-
return;
|
|
51
|
-
}
|
|
52
|
-
const a = s.account.clientId, t = new AbortController();
|
|
53
|
-
x = t, l.value = !0, _.value = "";
|
|
54
|
-
try {
|
|
55
|
-
await N.deleteClient(S, a, t.signal), t.signal.aborted || f("removed", a);
|
|
56
|
-
} catch {
|
|
57
|
-
t.signal.aborted || (_.value = v("connect.whatsappBot.errors.removeAccount"));
|
|
58
|
-
} finally {
|
|
59
|
-
x === t && (x = void 0, l.value = !1);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
function B() {
|
|
63
|
-
x == null || x.abort(), x = void 0, l.value = !1, _.value = "";
|
|
64
|
-
}
|
|
65
|
-
return R(() => D.getBusinessId(), B), Q(B), (S, a) => {
|
|
66
|
-
const t = w("RouterLink"), b = w("FmIcon"), O = w("FmCircularProgress");
|
|
67
|
-
return n(), m("li", null, [
|
|
68
|
-
o("div", {
|
|
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", {
|
|
70
|
-
"cursor-pointer transition-shadow hover:border-fm-color-neutral-gray-200 hover:fm-shadow-light-100": p.value
|
|
71
|
-
}])
|
|
72
|
-
}, [
|
|
73
|
-
o("div", fe, [
|
|
74
|
-
o("div", {
|
|
75
|
-
"aria-hidden": "true",
|
|
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)])
|
|
77
|
-
}, [
|
|
78
|
-
e(h) && !e(c) ? (n(), m("img", {
|
|
79
|
-
key: 0,
|
|
80
|
-
src: e(h),
|
|
81
|
-
alt: "",
|
|
82
|
-
class: "w-full h-full object-cover",
|
|
83
|
-
referrerpolicy: "no-referrer",
|
|
84
|
-
onError: a[0] || (a[0] = (J) => c.value = !0)
|
|
85
|
-
}, null, 40, ve)) : (n(), m("span", xe, r(e(y)), 1))
|
|
86
|
-
], 2),
|
|
87
|
-
o("div", _e, [
|
|
88
|
-
o("h2", {
|
|
89
|
-
class: "text-[16px] leading-[24px] font-semibold truncate",
|
|
90
|
-
title: e($)
|
|
91
|
-
}, [
|
|
92
|
-
p.value ? (n(), k(t, {
|
|
93
|
-
key: 0,
|
|
94
|
-
to: d.value,
|
|
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]"
|
|
96
|
-
}, {
|
|
97
|
-
default: I(() => [
|
|
98
|
-
G(r(e($)), 1)
|
|
99
|
-
]),
|
|
100
|
-
_: 1
|
|
101
|
-
}, 8, ["to"])) : (n(), m("span", ge, r(e($)), 1))
|
|
102
|
-
], 8, he),
|
|
103
|
-
o("p", ye, r(e(P)), 1)
|
|
104
|
-
]),
|
|
105
|
-
o("div", be, [
|
|
106
|
-
p.value ? (n(), k(t, {
|
|
107
|
-
key: 0,
|
|
108
|
-
to: d.value,
|
|
109
|
-
"aria-label": e(v)("connect.common.edit"),
|
|
110
|
-
title: e(v)("connect.common.edit"),
|
|
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"
|
|
112
|
-
}, {
|
|
113
|
-
default: I(() => [
|
|
114
|
-
A(b, {
|
|
115
|
-
name: "edit",
|
|
116
|
-
size: "sm",
|
|
117
|
-
outline: "",
|
|
118
|
-
"aria-hidden": "true"
|
|
119
|
-
})
|
|
120
|
-
]),
|
|
121
|
-
_: 1
|
|
122
|
-
}, 8, ["to", "aria-label", "title"])) : V("", !0),
|
|
123
|
-
o("button", {
|
|
124
|
-
type: "button",
|
|
125
|
-
"aria-label": e(v)("connect.common.remove"),
|
|
126
|
-
title: e(v)("connect.common.remove"),
|
|
127
|
-
disabled: l.value,
|
|
128
|
-
"aria-busy": l.value,
|
|
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",
|
|
130
|
-
onClick: ae(j, ["stop"])
|
|
131
|
-
}, [
|
|
132
|
-
l.value ? (n(), k(O, {
|
|
133
|
-
key: 0,
|
|
134
|
-
size: "md",
|
|
135
|
-
"aria-hidden": "true"
|
|
136
|
-
})) : (n(), k(b, {
|
|
137
|
-
key: 1,
|
|
138
|
-
name: "delete",
|
|
139
|
-
size: "sm",
|
|
140
|
-
outline: "",
|
|
141
|
-
"aria-hidden": "true"
|
|
142
|
-
}))
|
|
143
|
-
], 8, we)
|
|
144
|
-
])
|
|
145
|
-
]),
|
|
146
|
-
o("div", Be, [
|
|
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)
|
|
151
|
-
]),
|
|
152
|
-
_.value ? (n(), m("p", ke, r(_.value), 1)) : V("", !0)
|
|
153
|
-
], 2)
|
|
154
|
-
]);
|
|
155
|
-
};
|
|
156
|
-
}
|
|
157
|
-
}), $e = { class: "mt-[24px] grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] xs:grid-cols-1 gap-[16px]" }, Pe = /* @__PURE__ */ M({
|
|
158
|
-
__name: "WhatsappAccountList",
|
|
159
|
-
props: {
|
|
160
|
-
accounts: {}
|
|
161
|
-
},
|
|
162
|
-
emits: ["removed"],
|
|
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, {
|
|
167
|
-
key: u.clientId,
|
|
168
|
-
account: u,
|
|
169
|
-
onRemoved: v[0] || (v[0] = (l) => s("removed", l))
|
|
170
|
-
}, null, 8, ["account"]))), 128))
|
|
171
|
-
]));
|
|
172
|
-
}
|
|
173
|
-
}), Ce = { class: "text-[18px] font-semibold" }, Se = {
|
|
174
|
-
key: 0,
|
|
175
|
-
role: "status",
|
|
176
|
-
class: "flex flex-col items-center text-center gap-[8px] px-[8px] py-[40px]"
|
|
177
|
-
}, Ie = { class: "text-[18px] font-semibold" }, Fe = { class: "text-[14px] text-fm-color-typo-secondary break-all" }, Ee = {
|
|
178
|
-
key: 1,
|
|
179
|
-
class: "grid grid-cols-[minmax(0,1fr)_232px] xs:grid-cols-1 gap-[32px] p-[8px] xs:p-[0px]"
|
|
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 = {
|
|
181
|
-
key: 0,
|
|
182
|
-
role: "status",
|
|
183
|
-
class: "flex flex-col items-center gap-[12px] text-[13px]"
|
|
184
|
-
}, Ke = {
|
|
185
|
-
key: 1,
|
|
186
|
-
class: "flex flex-col items-center text-center gap-[12px] p-[12px]"
|
|
187
|
-
}, Qe = {
|
|
188
|
-
role: "alert",
|
|
189
|
-
class: "text-[14px] text-fm-color-typo-error"
|
|
190
|
-
}, Ze = ["src", "alt"], Je = {
|
|
191
|
-
key: 3,
|
|
192
|
-
role: "status",
|
|
193
|
-
"aria-live": "polite",
|
|
194
|
-
class: "absolute inset-0 bg-fm-color-neutral-white/90 flex flex-col items-center justify-center gap-[10px] text-[13px] font-medium"
|
|
195
|
-
}, Xe = /* @__PURE__ */ M({
|
|
196
|
-
__name: "WhatsappConnectDialog",
|
|
197
|
-
props: {
|
|
198
|
-
modelValue: { type: Boolean, required: !0 },
|
|
199
|
-
modelModifiers: {}
|
|
200
|
-
},
|
|
201
|
-
emits: ["update:modelValue"],
|
|
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;
|
|
207
|
-
}
|
|
208
|
-
async function E(h, c, p) {
|
|
209
|
-
if (!p.aborted) {
|
|
210
|
-
try {
|
|
211
|
-
const d = await N.getClient(h, c, p);
|
|
212
|
-
if (p.aborted) return;
|
|
213
|
-
if (l.value = d.status === "connected" || d.status === "connecting" && d.connectedAt !== null, d.status === "connected" && d.connectedAt !== null && d.profileStatus === "ready") {
|
|
214
|
-
y(), l.value = !1, _.value = d, P = setTimeout(() => {
|
|
215
|
-
i.value = !1;
|
|
216
|
-
}, 1800);
|
|
217
|
-
return;
|
|
218
|
-
}
|
|
219
|
-
if (d.status === "disconnected") {
|
|
220
|
-
y(), l.value = !1, f.value = "", u.value = s("connect.whatsappBot.errors.qrExpired");
|
|
221
|
-
return;
|
|
222
|
-
}
|
|
223
|
-
} catch (d) {
|
|
224
|
-
if (p.aborted) return;
|
|
225
|
-
if (d instanceof ie && d.status === 409) {
|
|
226
|
-
y(), l.value = !1, f.value = "", u.value = s("connect.whatsappBot.errors.accountAlreadyLinked");
|
|
227
|
-
return;
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
p.aborted || ($ = setTimeout(() => {
|
|
231
|
-
E(h, c, p);
|
|
232
|
-
}, 2e3));
|
|
233
|
-
}
|
|
234
|
-
}
|
|
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;
|
|
239
|
-
try {
|
|
240
|
-
const c = D.getBusinessId();
|
|
241
|
-
if (!c)
|
|
242
|
-
throw new Error(s("connect.whatsappBot.errors.selectBusiness"));
|
|
243
|
-
const p = await N.createClient(
|
|
244
|
-
c,
|
|
245
|
-
h.signal
|
|
246
|
-
), d = await me.toDataURL(p.qr, {
|
|
247
|
-
width: 224,
|
|
248
|
-
margin: 2,
|
|
249
|
-
errorCorrectionLevel: "M"
|
|
250
|
-
});
|
|
251
|
-
h.signal.aborted || (f.value = d, E(c, p.clientId, h.signal));
|
|
252
|
-
} catch (c) {
|
|
253
|
-
h.signal.aborted || (u.value = c instanceof Error ? c.message : s("connect.whatsappBot.errors.loadQr"));
|
|
254
|
-
} finally {
|
|
255
|
-
h.signal.aborted || (v.value = !1);
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
return R(
|
|
259
|
-
i,
|
|
260
|
-
(h) => {
|
|
261
|
-
h ? C() : y();
|
|
262
|
-
},
|
|
263
|
-
{ immediate: !0 }
|
|
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, {
|
|
267
|
-
modelValue: i.value,
|
|
268
|
-
"onUpdate:modelValue": c[0] || (c[0] = (B) => i.value = B),
|
|
269
|
-
"min-width": "min(720px, calc(100% - 32px))",
|
|
270
|
-
"max-width": "720px",
|
|
271
|
-
"max-height": "90vh",
|
|
272
|
-
"dismiss-away": ""
|
|
273
|
-
}, {
|
|
274
|
-
"dialog-header": I(() => [
|
|
275
|
-
o("h2", Ce, r(e(s)("connect.whatsappBot.connectAccount")), 1)
|
|
276
|
-
]),
|
|
277
|
-
default: I(() => {
|
|
278
|
-
var B, S, a;
|
|
279
|
-
return [
|
|
280
|
-
_.value ? (n(), m("div", Se, [
|
|
281
|
-
c[1] || (c[1] = o("div", {
|
|
282
|
-
"aria-hidden": "true",
|
|
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]"
|
|
284
|
-
}, [
|
|
285
|
-
o("svg", {
|
|
286
|
-
width: "32",
|
|
287
|
-
height: "32",
|
|
288
|
-
viewBox: "0 0 24 24",
|
|
289
|
-
fill: "none",
|
|
290
|
-
stroke: "currentColor",
|
|
291
|
-
"stroke-width": "2.2",
|
|
292
|
-
"stroke-linecap": "round",
|
|
293
|
-
"stroke-linejoin": "round"
|
|
294
|
-
}, [
|
|
295
|
-
o("path", { d: "M20 6 9 17l-5-5" })
|
|
296
|
-
])
|
|
297
|
-
], -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)
|
|
300
|
-
])) : (n(), m("div", Ee, [
|
|
301
|
-
o("div", We, [
|
|
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", {
|
|
305
|
-
key: t,
|
|
306
|
-
class: "flex gap-[12px]"
|
|
307
|
-
}, [
|
|
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, {
|
|
310
|
-
key: 1,
|
|
311
|
-
keypath: "connect.whatsappBot.steps.openSettings",
|
|
312
|
-
tag: "span",
|
|
313
|
-
scope: "global"
|
|
314
|
-
}, {
|
|
315
|
-
menu: I(() => [
|
|
316
|
-
o("b", je, r(e(s)("connect.whatsappBot.menu")), 1)
|
|
317
|
-
]),
|
|
318
|
-
settings: I(() => [
|
|
319
|
-
o("b", Le, r(e(s)("connect.whatsappBot.settings")), 1)
|
|
320
|
-
]),
|
|
321
|
-
_: 1
|
|
322
|
-
})) : t === 3 ? (n(), k(p, {
|
|
323
|
-
key: 2,
|
|
324
|
-
keypath: "connect.whatsappBot.steps.linkDevice",
|
|
325
|
-
tag: "span",
|
|
326
|
-
scope: "global"
|
|
327
|
-
}, {
|
|
328
|
-
linkedDevices: I(() => [
|
|
329
|
-
o("b", Ne, r(e(s)("connect.whatsappBot.linkedDevices")), 1)
|
|
330
|
-
]),
|
|
331
|
-
linkDevice: I(() => [
|
|
332
|
-
o("b", Me, r(e(s)("connect.whatsappBot.linkDevice")), 1)
|
|
333
|
-
]),
|
|
334
|
-
_: 1
|
|
335
|
-
})) : (n(), m("span", Re, r(e(s)("connect.whatsappBot.steps.scanQr")), 1))
|
|
336
|
-
])), 64))
|
|
337
|
-
]),
|
|
338
|
-
o("p", Ue, r(e(s)("connect.whatsappBot.connectionNote")), 1)
|
|
339
|
-
]),
|
|
340
|
-
o("div", Ge, [
|
|
341
|
-
v.value ? (n(), m("div", ze, [
|
|
342
|
-
A(d),
|
|
343
|
-
G(r(e(s)("connect.whatsappBot.generatingQr")), 1)
|
|
344
|
-
])) : u.value ? (n(), m("div", Ke, [
|
|
345
|
-
o("p", Qe, r(u.value), 1),
|
|
346
|
-
A(W, {
|
|
347
|
-
label: e(s)("connect.whatsappBot.tryAgain"),
|
|
348
|
-
"prepend-icon": "refresh",
|
|
349
|
-
onClick: C
|
|
350
|
-
}, null, 8, ["label"])
|
|
351
|
-
])) : f.value ? (n(), m("img", {
|
|
352
|
-
key: 2,
|
|
353
|
-
src: f.value,
|
|
354
|
-
alt: e(s)("connect.whatsappBot.qrAlt"),
|
|
355
|
-
width: "224",
|
|
356
|
-
height: "224",
|
|
357
|
-
class: U({ "opacity-20": l.value })
|
|
358
|
-
}, null, 10, Ze)) : V("", !0),
|
|
359
|
-
l.value ? (n(), m("div", Je, [
|
|
360
|
-
A(d),
|
|
361
|
-
G(" " + r(e(s)("connect.whatsappBot.connecting")), 1)
|
|
362
|
-
])) : V("", !0)
|
|
363
|
-
])
|
|
364
|
-
]))
|
|
365
|
-
];
|
|
366
|
-
}),
|
|
367
|
-
_: 1
|
|
368
|
-
}, 8, ["modelValue"]);
|
|
369
|
-
};
|
|
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({
|
|
372
|
-
__name: "WhatsappEmptyState",
|
|
373
|
-
emits: ["connect"],
|
|
374
|
-
setup(F, { emit: i }) {
|
|
375
|
-
const s = i, { t: f } = z();
|
|
376
|
-
return (v, u) => {
|
|
377
|
-
const l = w("FmButton");
|
|
378
|
-
return n(), m("div", Ye, [
|
|
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]" }, [
|
|
380
|
-
o("svg", {
|
|
381
|
-
width: "34",
|
|
382
|
-
height: "34",
|
|
383
|
-
viewBox: "0 0 24 24",
|
|
384
|
-
fill: "none",
|
|
385
|
-
stroke: "currentColor",
|
|
386
|
-
"stroke-width": "1.6",
|
|
387
|
-
"stroke-linecap": "round",
|
|
388
|
-
"stroke-linejoin": "round",
|
|
389
|
-
"aria-hidden": "true"
|
|
390
|
-
}, [
|
|
391
|
-
o("path", { d: "M7.9 20A9 9 0 1 0 4 16.1L2 22Z" }),
|
|
392
|
-
o("path", { d: "M9 10h.01M12 10h.01M15 10h.01" })
|
|
393
|
-
])
|
|
394
|
-
], -1)),
|
|
395
|
-
o("h2", qe, r(e(f)("connect.whatsappBot.emptyTitle")), 1),
|
|
396
|
-
o("p", et, r(e(f)("connect.whatsappBot.emptyDescription")), 1),
|
|
397
|
-
A(l, {
|
|
398
|
-
class: "mt-[16px]",
|
|
399
|
-
label: e(f)("connect.whatsappBot.connectAccountCta"),
|
|
400
|
-
"prepend-icon": "add",
|
|
401
|
-
onClick: u[0] || (u[0] = (_) => s("connect"))
|
|
402
|
-
}, null, 8, ["label"])
|
|
403
|
-
]);
|
|
404
|
-
};
|
|
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 = {
|
|
407
|
-
key: 3,
|
|
408
|
-
role: "status",
|
|
409
|
-
class: "mt-[24px] py-[56px] flex flex-col items-center gap-[12px] text-[14px] text-fm-color-typo-secondary"
|
|
410
|
-
}, rt = {
|
|
411
|
-
key: 4,
|
|
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]"
|
|
413
|
-
}, ct = {
|
|
414
|
-
role: "alert",
|
|
415
|
-
class: "text-[14px] text-fm-color-typo-error"
|
|
416
|
-
}, ht = /* @__PURE__ */ M({
|
|
417
|
-
__name: "WhatsappBot",
|
|
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(() => [
|
|
426
|
-
{
|
|
427
|
-
label: i("connect.whatsappBot.accounts"),
|
|
428
|
-
value: g["$connect-WHATSAPP_BOT"],
|
|
429
|
-
badge: C.value.length
|
|
430
|
-
},
|
|
431
|
-
{
|
|
432
|
-
label: i("connect.whatsappBot.settings"),
|
|
433
|
-
value: g["$connect-WHATSAPP_BOT_SETTINGS"]
|
|
434
|
-
},
|
|
435
|
-
{
|
|
436
|
-
label: i("connect.whatsappBot.logs.title"),
|
|
437
|
-
value: g["$connect-WHATSAPP_BOT_LOGS"]
|
|
438
|
-
},
|
|
439
|
-
{
|
|
440
|
-
label: i("connect.whatsappBot.tickets.title"),
|
|
441
|
-
value: g["$connect-WHATSAPP_BOT_TICKETS"],
|
|
442
|
-
badge: x.value.length
|
|
443
|
-
}
|
|
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"];
|
|
447
|
-
});
|
|
448
|
-
async function p(a = !1) {
|
|
449
|
-
clearTimeout(E), y == null || y.abort();
|
|
450
|
-
const t = new AbortController();
|
|
451
|
-
y = t, a || ($.value = !0, P.value = "");
|
|
452
|
-
try {
|
|
453
|
-
const b = D.getBusinessId();
|
|
454
|
-
if (!b)
|
|
455
|
-
throw new Error(i("connect.whatsappBot.errors.selectBusiness"));
|
|
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"));
|
|
460
|
-
} finally {
|
|
461
|
-
t.signal.aborted || ($.value = !1, E = setTimeout(() => void p(!0), 1e4));
|
|
462
|
-
}
|
|
463
|
-
}
|
|
464
|
-
function d(a) {
|
|
465
|
-
x.value = x.value.filter((t) => t.id !== a), p(!0);
|
|
466
|
-
}
|
|
467
|
-
async function W(a = !1) {
|
|
468
|
-
clearTimeout(_), l == null || l.abort();
|
|
469
|
-
const t = new AbortController();
|
|
470
|
-
l = t, a || (v.value = !0, u.value = "");
|
|
471
|
-
try {
|
|
472
|
-
const b = D.getBusinessId();
|
|
473
|
-
if (!b)
|
|
474
|
-
throw new Error(i("connect.whatsappBot.errors.selectBusiness"));
|
|
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"));
|
|
479
|
-
} finally {
|
|
480
|
-
t.signal.aborted || (v.value = !1, _ = setTimeout(() => void W(!0), 1e4));
|
|
481
|
-
}
|
|
482
|
-
}
|
|
483
|
-
function j(a) {
|
|
484
|
-
f.value = f.value.filter(
|
|
485
|
-
(t) => t.clientId !== a
|
|
486
|
-
), W(!0);
|
|
487
|
-
}
|
|
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 });
|
|
491
|
-
}
|
|
492
|
-
return R(B, (a) => {
|
|
493
|
-
a || W();
|
|
494
|
-
}), R(
|
|
495
|
-
() => D.getBusinessId(),
|
|
496
|
-
() => {
|
|
497
|
-
B.value = !1, f.value = [], x.value = [], W(), p();
|
|
498
|
-
},
|
|
499
|
-
{ immediate: !0 }
|
|
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, [
|
|
505
|
-
o("div", ot, [
|
|
506
|
-
o("div", nt, [
|
|
507
|
-
o("div", at, [
|
|
508
|
-
o("h1", st, r(e(i)("connect.navigation.whatsappBot")), 1),
|
|
509
|
-
A(b, { variant: "beta" })
|
|
510
|
-
]),
|
|
511
|
-
c.value === e(g)["$connect-WHATSAPP_BOT"] && C.value.length ? (n(), k(O, {
|
|
512
|
-
key: 0,
|
|
513
|
-
label: e(i)("connect.whatsappBot.connectAccountCta"),
|
|
514
|
-
"prepend-icon": "add",
|
|
515
|
-
onClick: t[0] || (t[0] = (H) => B.value = !0)
|
|
516
|
-
}, null, 8, ["label"])) : V("", !0)
|
|
517
|
-
]),
|
|
518
|
-
A(te, {
|
|
519
|
-
"model-value": c.value,
|
|
520
|
-
items: h.value,
|
|
521
|
-
role: "tablist",
|
|
522
|
-
"aria-label": e(i)("connect.navigation.whatsappBot"),
|
|
523
|
-
class: "mt-[16px] border-b border-fm-color-neutral-gray-100"
|
|
524
|
-
}, {
|
|
525
|
-
default: I(({ label: H, value: X, badge: Y, tabsProps: ne }) => [
|
|
526
|
-
A(ee, le(ne, {
|
|
527
|
-
"model-value": c.value,
|
|
528
|
-
label: H,
|
|
529
|
-
value: X,
|
|
530
|
-
"onUpdate:modelValue": S
|
|
531
|
-
}), re({ _: 2 }, [
|
|
532
|
-
Y ? {
|
|
533
|
-
name: "append",
|
|
534
|
-
fn: I(() => [
|
|
535
|
-
A(J, {
|
|
536
|
-
value: Y,
|
|
537
|
-
variant: "neutral",
|
|
538
|
-
inline: "",
|
|
539
|
-
class: U(
|
|
540
|
-
c.value === X ? "bg-fm-color-primary-oats text-fm-color-primary" : "bg-fm-color-neutral-gray-100 text-fm-color-typo-secondary"
|
|
541
|
-
)
|
|
542
|
-
}, null, 8, ["value", "class"])
|
|
543
|
-
]),
|
|
544
|
-
key: "0"
|
|
545
|
-
} : void 0
|
|
546
|
-
]), 1040, ["model-value", "label", "value"])
|
|
547
|
-
]),
|
|
548
|
-
_: 1
|
|
549
|
-
}, 8, ["model-value", "items", "aria-label"]),
|
|
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, {
|
|
551
|
-
key: 1,
|
|
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,
|
|
556
|
-
loading: $.value,
|
|
557
|
-
error: P.value,
|
|
558
|
-
onRetry: t[1] || (t[1] = (H) => p()),
|
|
559
|
-
onResolved: d
|
|
560
|
-
}, null, 8, ["tickets", "loading", "error"])) : v.value ? (n(), m("div", lt, [
|
|
561
|
-
A(oe),
|
|
562
|
-
G(" " + r(e(i)("connect.whatsappBot.loadingSessions")), 1)
|
|
563
|
-
])) : u.value ? (n(), m("div", rt, [
|
|
564
|
-
o("p", ct, r(u.value), 1),
|
|
565
|
-
A(O, {
|
|
566
|
-
label: e(i)("connect.whatsappBot.tryAgain"),
|
|
567
|
-
"prepend-icon": "refresh",
|
|
568
|
-
onClick: t[2] || (t[2] = (H) => W())
|
|
569
|
-
}, null, 8, ["label"])
|
|
570
|
-
])) : C.value.length ? (n(), k(Pe, {
|
|
571
|
-
key: 5,
|
|
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)
|
|
577
|
-
}))
|
|
578
|
-
]),
|
|
579
|
-
A(Xe, {
|
|
580
|
-
modelValue: B.value,
|
|
581
|
-
"onUpdate:modelValue": t[4] || (t[4] = (H) => B.value = H)
|
|
582
|
-
}, null, 8, ["modelValue"])
|
|
583
|
-
], 64);
|
|
584
|
-
};
|
|
585
|
-
}
|
|
586
|
-
});
|
|
587
|
-
export {
|
|
588
|
-
ht as default
|
|
589
|
-
};
|