@feedmepos/mf-connect 0.1.98-beta.84 → 0.1.98-beta.85
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/README.md +9 -1
- package/dist/{App-2gK-7sDH.js → App-BxA547CP.js} +409 -403
- package/dist/{AuditLogs-DsvvAt8f.js → AuditLogs-DjsuO-ou.js} +13 -13
- package/dist/{Bin-f4C6ymIq.js → Bin-Cp1JuoPV.js} +8 -8
- package/dist/{Broadcast-tdqUBB_9.js → Broadcast-C-dZ7I7J.js} +12 -12
- package/dist/{CampaignAnalytic-BI7qfGV2.js → CampaignAnalytic-CeJrlblr.js} +7 -7
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CGAIYHt6.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DNshyt4k.js} +8 -8
- package/dist/{Card-CBU8ZOFT.js → Card-BRkDbHgP.js} +23 -23
- package/dist/{Collections-DWPcYM4M.js → Collections-KGkn4jVg.js} +8 -8
- package/dist/{Credit-Cq12WUk_.js → Credit-CYtdA8LR.js} +12 -12
- package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-BwpYtfRw.js → DateRangeChip.vue_vue_type_script_setup_true_lang-B_GGXmKj.js} +1 -1
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-C7b6aFq3.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-CC84YrQj.js} +36 -35
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-KkAGKKsV.js → EffectSheet.vue_vue_type_style_index_0_lang-Y8euxc9u.js} +6 -6
- package/dist/{Experience-BuIgMiB3.js → Experience-DyCWhTIc.js} +13 -13
- package/dist/{FileSaver.min-DS15uUce.js → FileSaver.min-sifwJvOC.js} +1 -1
- package/dist/{Game-_NIMd0cY.js → Game-D2dtBGMx.js} +13 -13
- package/dist/{GiftCardSetup-Bw_8x29B.js → GiftCardSetup-4_wPeuGx.js} +73 -61
- package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-B1sHLgFd.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-DaXZiLCz.js} +7 -7
- package/dist/{Goals-BE_FaHh-.js → Goals-BZriqe6a.js} +4 -4
- package/dist/{Grab-CIIr5EZR.js → Grab-DE43gcBH.js} +9 -9
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-fg6xOcnj.js → ImageInput.vue_vue_type_script_setup_true_lang-BSmoRIp3.js} +1 -1
- package/dist/{Index-BiShzj-5.js → Index-3-__a-F8.js} +10 -10
- package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-DQXs_qw9.js → LocationPicker.vue_vue_type_script_setup_true_lang-DMFmuJHS.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-B6NRhdWR.js → LottieAnimation.vue_vue_type_script_setup_true_lang-aCBsAVgf.js} +1 -1
- package/dist/{LoyaltyDashboard-B5AG4nLL.js → LoyaltyDashboard-BxqVkHWZ.js} +24 -23
- package/dist/MainLayout-VDwSL1-n.js +4 -0
- package/dist/{MainLayout-DxqoiKXJ.js → MainLayout.vue_vue_type_script_setup_true_lang-DKwbltBD.js} +4 -4
- package/dist/{Marketing-rtJPqmHZ.js → Marketing-BkTXd2kV.js} +4 -4
- package/dist/{MarketingMaterialEdit-DZbsKiMW.js → MarketingMaterialEdit-DCmGVhn1.js} +6 -6
- package/dist/{Member-B_4IU8GD.js → Member-BZ-cZyCC.js} +7 -7
- package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-CtQiWe15.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-DeRvNRsk.js} +24 -24
- package/dist/{MemberImportHistory-DepqkpDF.js → MemberImportHistory-CunTfazI.js} +7 -7
- package/dist/{MemberList-RbR2vpfv.js → MemberList-H8H9xzMg.js} +14 -14
- package/dist/{MemberTransactions-BXJy6Ism.js → MemberTransactions-B1GTs17R.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-0OCCIP0v.js → MessageInput.vue_vue_type_script_setup_true_lang-C2K_acoB.js} +10 -10
- package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-DnECpLmj.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-BCRSJoq7.js} +1 -1
- package/dist/{Mission-CMNVAn_S.js → Mission-CNXUBVI4.js} +14 -14
- package/dist/{Overview-C05OOSXQ.js → Overview-CiIMyx-_.js} +21 -21
- package/dist/{Overview-C-QEY2MS.js → Overview-CwoDIRXD.js} +4 -4
- package/dist/{Point-XEJSumy7.js → Point-BpFvqe5M.js} +14 -14
- package/dist/{Promotion-DfzE_BnO.js → Promotion-DwcxXXS3.js} +14 -14
- package/dist/{Queue-D4Td8Bgv.js → Queue-CI9PtRqs.js} +13 -13
- package/dist/{Record-DgkTuKc4.js → Record-Cl73WIoN.js} +9 -9
- package/dist/{Review-8ZMji0fb.js → Review-BQL9TzxZ.js} +2 -2
- package/dist/{ReviewFacebookCallback-Ve87-GyX.js → ReviewFacebookCallback-BVcW6zNJ.js} +5 -5
- package/dist/{ReviewGoogleCallback-DRpVe1uq.js → ReviewGoogleCallback-peKv_-nP.js} +5 -5
- package/dist/{Reward-CEhr7Ns0.js → Reward-6rLOoOkv.js} +16 -16
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-w3QixigS.js → RewardGroup.vue_vue_type_script_setup_true_lang-CZ2OWRik.js} +14 -14
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-CnTY1iff.js → RuleGroup.vue_vue_type_script_setup_true_lang-B7GKzELx.js} +15 -15
- package/dist/{Segment-CeMerVn4.js → Segment-DnrCf_-F.js} +26 -26
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-CQ038K1l.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-DyYWf2RR.js} +15 -15
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-Cq5ywNFY.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-C-GxdVOH.js} +4 -4
- package/dist/{Setting-Rge2DsP0.js → Setting-BlU3XioB.js} +14 -14
- package/dist/{SettingAdvertisements-YXLfS10e.js → SettingAdvertisements-CW9KUQAk.js} +12 -12
- package/dist/{Settings-Cnp1yLCt.js → Settings-DfKCItWN.js} +5 -5
- package/dist/{Store-BqNd-YZA.js → Store-Dh90RjUg.js} +780 -771
- package/dist/{StoreRewards-CtFg932k.js → StoreRewards-BmEJZR1O.js} +15 -15
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-DSLRZ4_T.js → StoreTransactions.vue_vue_type_script_setup_true_lang-C-Efc4SV.js} +25 -25
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-ViE-riFl.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-Bv0_e1wk.js} +2 -2
- package/dist/{Tier-77bfKMw8.js → Tier-C7EiLGJW.js} +27 -27
- package/dist/{Title-ExsDsweT.js → Title-DPf-0vrF.js} +23 -23
- package/dist/{Transaction-rtSeIIw0.js → Transaction-DsAk9Gb9.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CRBQ9Fda.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-Csojc1fI.js} +6 -6
- package/dist/{Voucher-BkZtSGlP.js → Voucher-BKp9CMMe.js} +18 -18
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-4PYSnlPB.js → VoucherEditor.vue_vue_type_script_setup_true_lang-Cpn8legF.js} +12 -12
- package/dist/WhatsappAccount-DjAL89Re.js +342 -0
- package/dist/WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-D25DVRXA.js +97 -0
- package/dist/WhatsappBot-CSy_Z1bz.js +581 -0
- package/dist/{WhatsappBotSettings-BuKmIjV8.js → WhatsappBotSettings-CxcuCZ-V.js} +4 -4
- package/dist/WhatsappBotTickets-DS7_jaE3.js +162 -0
- package/dist/WhatsappLayout-Db3329On.js +21 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CZfhn5Jq.js → ZodTextField.vue_vue_type_script_setup_true_lang-D6Z-3QOR.js} +2 -2
- package/dist/{app-Bc6LqwtE.js → app-BiUEivOU.js} +316 -316
- package/dist/app.js +1 -1
- package/dist/{base.export-Btj8Rg8X.js → base.export-Bvf3GR9p.js} +2 -2
- package/dist/{business-D764zw_0.js → business-DgmJwclv.js} +5 -5
- package/dist/{campaign-BQup_7UA.js → campaign-C9TU71PO.js} +8 -8
- package/dist/{campaign-z0b9Kjkw.js → campaign-DxjYod5y.js} +2 -2
- package/dist/{campaign.fn-CFw7_K_I.js → campaign.fn-BGdwcW0r.js} +2 -2
- package/dist/{collection.fn-C4U4ilHh.js → collection.fn-B9t79SwE.js} +2 -2
- package/dist/{currency-ByFTp6eT.js → currency-K9kgZvJm.js} +1 -1
- package/dist/{duplicateCampaign-CbmUt1Lo.js → duplicateCampaign-CLeVibNm.js} +2 -2
- package/dist/{effect-DsO-mw9A.js → effect-Bj5p3FOF.js} +1 -1
- package/dist/{email-addresses-CL-EMr73.js → email-addresses-CUpmh5j3.js} +2 -2
- package/dist/feature-flag-Dfon0BoK.js +18 -0
- package/dist/{helper-Avy2CxJa.js → helper-iVOlqZr5.js} +1 -1
- package/dist/{index-QesgyoGt.js → index-BIqP1bQh.js} +2 -2
- package/dist/{index-BOX-kv2H.js → index-BRk5I8NE.js} +1 -1
- package/dist/{index-DJBDlwI0.js → index-C57WFxg7.js} +2 -2
- package/dist/{index-0iobnNos.js → index-C641kFzY.js} +1 -1
- package/dist/{index-CqHP5Wpq.js → index-CGctGLsw.js} +1 -1
- package/dist/{index-DUiP6eMM.js → index-COB25nai.js} +583 -576
- package/dist/{index-BYJfzCGF.js → index-CedoUPYn.js} +2 -2
- package/dist/index-Cfr0vxa5.js +1775 -0
- package/dist/{index-BaRq5efe.js → index-Cq0kWJ_W.js} +2 -2
- package/dist/{index-4Gb9FUwx.js → index-D6CbkBm6.js} +3 -3
- package/dist/{index-DLWc6jN6.js → index-DAcwqenP.js} +7 -7
- package/dist/{index-6kHtFMu_.js → index-DJQVYP1Z.js} +1 -1
- package/dist/{index-DIEsCZpR.js → index-DUr59xHS.js} +2 -2
- package/dist/{index-DKVgQIxK.js → index-DXNB9FHg.js} +2 -2
- package/dist/{index-DopAV1p0.js → index-DgkRREfK.js} +18 -14
- package/dist/{index-DV97WJgE.js → index-Dhd9eEjz.js} +1 -1
- package/dist/{index-C_ZRQxuy.js → index-FcdiLtUc.js} +9 -9
- package/dist/{index-Dw1JLMxf.js → index-HctLGyyi.js} +4 -4
- package/dist/{index-BwbjP4YO.js → index-MVfpQsRI.js} +4 -3
- package/dist/{index-BtlTdbMh.js → index-YV22ZWWA.js} +2 -2
- package/dist/{index-BGYPv4nh.js → index-dEfSQ43r.js} +1 -1
- package/dist/{index-BqBHO03o.js → index-onmieavP.js} +5975 -7746
- package/dist/{index.esm2017-6fTAB2zC.js → index.esm2017-BUZxOBD5.js} +1 -1
- package/dist/{loading-Ctv0pifD.js → loading-D3jN17Xy.js} +1 -1
- package/dist/{lodash-voP8B3y-.js → lodash-DvKbipfn.js} +1 -1
- package/dist/{member-import-Cnclh9kc.js → member-import-BuytQk0w.js} +1 -1
- package/dist/{membership-BFw22ljB.js → membership-Beh_I5Kj.js} +2 -2
- package/dist/{money-UKkYKlYB.js → money-C3v95tda.js} +1 -1
- package/dist/{number-C3ZVrlnG.js → number-Cc7Yq2nP.js} +1 -1
- package/dist/{objectid-cm0MpmhJ.js → objectid-fKMrrct7.js} +8 -8
- package/dist/{onboarding-DPlyVNxC.js → onboarding-DJgY8HJr.js} +3 -3
- package/dist/{onboardingSetup-DNxWR49X.js → onboardingSetup-DJJLdr11.js} +2 -2
- package/dist/{plugins-CmODURCb.js → plugins-CcGeLF_l.js} +3 -3
- package/dist/{reward-PFP-zWBV.js → reward-4aAVrRc8.js} +1 -1
- package/dist/{rule-O6gC43w9.js → rule-D6x2GyGw.js} +10 -10
- package/dist/{template-C3wE6QI8.js → template-Dafdx5YI.js} +6 -6
- package/dist/{timezone-h8QjEIVE.js → timezone-BDIlVTOp.js} +1 -1
- package/dist/{transaction.fn-CMLlNsBi.js → transaction.fn-CBVylmzu.js} +2 -2
- package/dist/{trigger-rwKj95on.js → trigger-ChNg0oG9.js} +5 -5
- package/dist/{useMarketingMaterialActions-DFhA_QMl.js → useMarketingMaterialActions-LSsbTrFn.js} +3 -3
- package/dist/{usePagination-DG6Ztr9a.js → usePagination-CqPRf6q3.js} +1 -1
- package/dist/{user-B8GnAjaS.js → user-6kqmEFbR.js} +1 -1
- package/dist/{vue-i18n-Bc5Ls0lk.js → vue-i18n-BJ_ZHWvK.js} +109 -109
- package/dist/{xlsx-CKvgpuVs.js → xlsx-CWXvmWqg.js} +1 -1
- package/dist/{zod-Bt021IY2.js → zod-DBefBbjY.js} +1 -1
- package/package.json +1 -1
- package/dist/WhatsappAccount-BHhjnuXB.js +0 -325
- package/dist/WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-DKFevg6y.js +0 -80
- package/dist/WhatsappBot-DDDfDb-u.js +0 -566
- package/dist/WhatsappBotTickets-D1fGYaRQ.js +0 -153
|
@@ -1,566 +0,0 @@
|
|
|
1
|
-
import { defineComponent as M, ref as w, computed as H, watch as R, onBeforeUnmount as K, resolveComponent as y, openBlock as n, createElementBlock as h, createElementVNode as t, normalizeClass as U, unref as e, toDisplayString as r, 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-Bc5Ls0lk.js";
|
|
3
|
-
import { useRouter as ce } from "vue-router";
|
|
4
|
-
import { S as j, a as ie } from "./index-BqBHO03o.js";
|
|
5
|
-
import { w as L } from "./index-BaRq5efe.js";
|
|
6
|
-
import { u as ue, _ as pe, w as de } from "./WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-DKFevg6y.js";
|
|
7
|
-
import { R as k } from "./app-Bc6LqwtE.js";
|
|
8
|
-
import { b as me } from "./browser-BSAOEeIM.js";
|
|
9
|
-
const fe = { class: "flex items-center gap-[12px]" }, xe = { class: "min-w-0 flex-1" }, ve = ["title"], he = { key: 1 }, _e = { class: "text-[14px] leading-[20px] text-fm-color-typo-secondary break-all" }, ge = { class: "relative z-10 flex shrink-0 items-center gap-[12px]" }, be = ["aria-label", "title", "disabled", "aria-busy"], ye = { class: "flex items-center justify-between flex-wrap gap-[8px] border-t border-fm-color-neutral-gray-100 pt-[12px]" }, we = {
|
|
10
|
-
key: 0,
|
|
11
|
-
class: "text-[12px] text-fm-color-typo-secondary"
|
|
12
|
-
}, Be = {
|
|
13
|
-
key: 0,
|
|
14
|
-
role: "alert",
|
|
15
|
-
class: "text-[14px] text-fm-color-typo-error"
|
|
16
|
-
}, Te = /* @__PURE__ */ M({
|
|
17
|
-
__name: "WhatsappAccountCard",
|
|
18
|
-
props: {
|
|
19
|
-
account: {}
|
|
20
|
-
},
|
|
21
|
-
emits: ["removed"],
|
|
22
|
-
setup(F, { emit: i }) {
|
|
23
|
-
const a = F, d = i, { t: m, locale: u } = G(), l = w(!1), _ = w("");
|
|
24
|
-
let f;
|
|
25
|
-
const { name: $, phoneNumber: P, initials: g, state: E, avatarColor: W } = ue(
|
|
26
|
-
() => a.account
|
|
27
|
-
), x = H(() => E.value === "connected"), c = H(() => ({
|
|
28
|
-
name: k["$connect-WHATSAPP_ACCOUNT"],
|
|
29
|
-
params: { clientId: a.account.clientId }
|
|
30
|
-
}));
|
|
31
|
-
function v(V) {
|
|
32
|
-
return new Intl.DateTimeFormat(u.value, {
|
|
33
|
-
year: "numeric",
|
|
34
|
-
month: "short",
|
|
35
|
-
day: "numeric"
|
|
36
|
-
}).format(new Date(V));
|
|
37
|
-
}
|
|
38
|
-
async function p() {
|
|
39
|
-
if (l.value) return;
|
|
40
|
-
const V = j.getBusinessId();
|
|
41
|
-
if (!V) {
|
|
42
|
-
_.value = m("connect.whatsappBot.errors.selectBusiness");
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
const b = a.account.clientId, B = new AbortController();
|
|
46
|
-
f = B, l.value = !0, _.value = "";
|
|
47
|
-
try {
|
|
48
|
-
await L.deleteClient(V, b, B.signal), B.signal.aborted || d("removed", b);
|
|
49
|
-
} catch {
|
|
50
|
-
B.signal.aborted || (_.value = m("connect.whatsappBot.errors.removeAccount"));
|
|
51
|
-
} finally {
|
|
52
|
-
f === B && (f = void 0, l.value = !1);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
function S() {
|
|
56
|
-
f == null || f.abort(), f = void 0, l.value = !1, _.value = "";
|
|
57
|
-
}
|
|
58
|
-
return R(() => j.getBusinessId(), S), K(S), (V, b) => {
|
|
59
|
-
const B = y("RouterLink"), s = y("FmIcon"), o = y("FmCircularProgress");
|
|
60
|
-
return n(), h("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": x.value
|
|
64
|
-
}])
|
|
65
|
-
}, [
|
|
66
|
-
t("div", fe, [
|
|
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
|
-
}, r(e(g)), 3),
|
|
71
|
-
t("div", xe, [
|
|
72
|
-
t("h2", {
|
|
73
|
-
class: "text-[16px] leading-[24px] font-semibold truncate",
|
|
74
|
-
title: e($)
|
|
75
|
-
}, [
|
|
76
|
-
x.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(r(e($)), 1)
|
|
83
|
-
]),
|
|
84
|
-
_: 1
|
|
85
|
-
}, 8, ["to"])) : (n(), h("span", he, r(e($)), 1))
|
|
86
|
-
], 8, ve),
|
|
87
|
-
t("p", _e, r(e(P)), 1)
|
|
88
|
-
]),
|
|
89
|
-
t("div", ge, [
|
|
90
|
-
x.value ? (n(), C(B, {
|
|
91
|
-
key: 0,
|
|
92
|
-
to: c.value,
|
|
93
|
-
"aria-label": e(m)("connect.common.edit"),
|
|
94
|
-
title: e(m)("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(m)("connect.common.remove"),
|
|
110
|
-
title: e(m)("connect.common.remove"),
|
|
111
|
-
disabled: l.value,
|
|
112
|
-
"aria-busy": l.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(p, ["stop"])
|
|
115
|
-
}, [
|
|
116
|
-
l.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, be)
|
|
128
|
-
])
|
|
129
|
-
]),
|
|
130
|
-
t("div", ye, [
|
|
131
|
-
A(pe, { state: e(E) }, null, 8, ["state"]),
|
|
132
|
-
x.value && F.account.connectedAt ? (n(), h("span", we, r(e(m)("connect.whatsappBot.connectedSince", {
|
|
133
|
-
date: v(F.account.connectedAt)
|
|
134
|
-
})), 1)) : O("", !0)
|
|
135
|
-
]),
|
|
136
|
-
_.value ? (n(), h("p", Be, r(_.value), 1)) : O("", !0)
|
|
137
|
-
], 2)
|
|
138
|
-
]);
|
|
139
|
-
};
|
|
140
|
-
}
|
|
141
|
-
}), ke = { class: "mt-[24px] grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] xs:grid-cols-1 gap-[16px]" }, Ae = /* @__PURE__ */ M({
|
|
142
|
-
__name: "WhatsappAccountList",
|
|
143
|
-
props: {
|
|
144
|
-
accounts: {}
|
|
145
|
-
},
|
|
146
|
-
emits: ["removed"],
|
|
147
|
-
setup(F, { emit: i }) {
|
|
148
|
-
const a = i;
|
|
149
|
-
return (d, m) => (n(), h("ul", ke, [
|
|
150
|
-
(n(!0), h(Q, null, Y(F.accounts, (u) => (n(), C(Te, {
|
|
151
|
-
key: u.clientId,
|
|
152
|
-
account: u,
|
|
153
|
-
onRemoved: m[0] || (m[0] = (l) => a("removed", l))
|
|
154
|
-
}, null, 8, ["account"]))), 128))
|
|
155
|
-
]));
|
|
156
|
-
}
|
|
157
|
-
}), Ce = { class: "text-[18px] font-semibold" }, $e = {
|
|
158
|
-
key: 0,
|
|
159
|
-
role: "status",
|
|
160
|
-
class: "flex flex-col items-center text-center gap-[8px] px-[8px] py-[40px]"
|
|
161
|
-
}, Pe = { class: "text-[18px] font-semibold" }, Se = { class: "text-[14px] text-fm-color-typo-secondary break-all" }, Ie = {
|
|
162
|
-
key: 1,
|
|
163
|
-
class: "grid grid-cols-[minmax(0,1fr)_232px] xs:grid-cols-1 gap-[32px] p-[8px] xs:p-[0px]"
|
|
164
|
-
}, Fe = { class: "flex flex-col gap-[20px] text-[14px] leading-[20px]" }, Ee = { class: "text-fm-color-typo-secondary" }, We = { 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 }, Ne = { class: "font-semibold" }, Oe = { class: "font-semibold" }, je = { class: "font-semibold" }, He = { class: "font-semibold" }, Le = { 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" }, Ue = {
|
|
165
|
-
key: 0,
|
|
166
|
-
role: "status",
|
|
167
|
-
class: "flex flex-col items-center gap-[12px] text-[13px]"
|
|
168
|
-
}, ze = {
|
|
169
|
-
key: 1,
|
|
170
|
-
class: "flex flex-col items-center text-center gap-[12px] p-[12px]"
|
|
171
|
-
}, Ge = {
|
|
172
|
-
role: "alert",
|
|
173
|
-
class: "text-[14px] text-fm-color-typo-error"
|
|
174
|
-
}, Ke = ["src", "alt"], Qe = {
|
|
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
|
-
}, Ze = /* @__PURE__ */ M({
|
|
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(), d = w(""), m = w(!1), u = w(""), l = w(!1), _ = w();
|
|
188
|
-
let f, $, P;
|
|
189
|
-
function g() {
|
|
190
|
-
f == null || f.abort(), clearTimeout($), $ = void 0, clearTimeout(P), P = void 0;
|
|
191
|
-
}
|
|
192
|
-
async function E(x, c, v) {
|
|
193
|
-
if (!v.aborted) {
|
|
194
|
-
try {
|
|
195
|
-
const p = await L.getClient(x, c, v);
|
|
196
|
-
if (v.aborted) return;
|
|
197
|
-
if (l.value = p.status === "connected" || p.status === "connecting" && p.connectedAt !== null, p.status === "connected" && p.connectedAt !== null && p.profileStatus === "ready") {
|
|
198
|
-
g(), l.value = !1, _.value = p, P = setTimeout(() => {
|
|
199
|
-
i.value = !1;
|
|
200
|
-
}, 1800);
|
|
201
|
-
return;
|
|
202
|
-
}
|
|
203
|
-
if (p.status === "disconnected") {
|
|
204
|
-
g(), l.value = !1, d.value = "", u.value = a("connect.whatsappBot.errors.qrExpired");
|
|
205
|
-
return;
|
|
206
|
-
}
|
|
207
|
-
} catch (p) {
|
|
208
|
-
if (v.aborted) return;
|
|
209
|
-
if (p instanceof ie && p.status === 409) {
|
|
210
|
-
g(), l.value = !1, d.value = "", u.value = a("connect.whatsappBot.errors.accountAlreadyLinked");
|
|
211
|
-
return;
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
v.aborted || ($ = setTimeout(() => {
|
|
215
|
-
E(x, c, v);
|
|
216
|
-
}, 2e3));
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
async function W() {
|
|
220
|
-
g();
|
|
221
|
-
const x = new AbortController();
|
|
222
|
-
f = x, d.value = "", u.value = "", l.value = !1, _.value = void 0, m.value = !0;
|
|
223
|
-
try {
|
|
224
|
-
const c = j.getBusinessId();
|
|
225
|
-
if (!c)
|
|
226
|
-
throw new Error(a("connect.whatsappBot.errors.selectBusiness"));
|
|
227
|
-
const v = await L.createClient(
|
|
228
|
-
c,
|
|
229
|
-
x.signal
|
|
230
|
-
), p = await me.toDataURL(v.qr, {
|
|
231
|
-
width: 224,
|
|
232
|
-
margin: 2,
|
|
233
|
-
errorCorrectionLevel: "M"
|
|
234
|
-
});
|
|
235
|
-
x.signal.aborted || (d.value = p, E(c, v.clientId, x.signal));
|
|
236
|
-
} catch (c) {
|
|
237
|
-
x.signal.aborted || (u.value = c instanceof Error ? c.message : a("connect.whatsappBot.errors.loadQr"));
|
|
238
|
-
} finally {
|
|
239
|
-
x.signal.aborted || (m.value = !1);
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
return R(
|
|
243
|
-
i,
|
|
244
|
-
(x) => {
|
|
245
|
-
x ? W() : g();
|
|
246
|
-
},
|
|
247
|
-
{ immediate: !0 }
|
|
248
|
-
), K(g), (x, c) => {
|
|
249
|
-
const v = y("i18n-t"), p = y("FmCircularProgress"), S = y("FmButton"), V = y("FmDialog");
|
|
250
|
-
return n(), C(V, {
|
|
251
|
-
modelValue: i.value,
|
|
252
|
-
"onUpdate:modelValue": c[0] || (c[0] = (b) => i.value = b),
|
|
253
|
-
"min-width": "min(720px, calc(100% - 32px))",
|
|
254
|
-
"max-width": "720px",
|
|
255
|
-
"max-height": "90vh",
|
|
256
|
-
"dismiss-away": ""
|
|
257
|
-
}, {
|
|
258
|
-
"dialog-header": I(() => [
|
|
259
|
-
t("h2", Ce, r(e(a)("connect.whatsappBot.connectAccount")), 1)
|
|
260
|
-
]),
|
|
261
|
-
default: I(() => {
|
|
262
|
-
var b, B, s;
|
|
263
|
-
return [
|
|
264
|
-
_.value ? (n(), h("div", $e, [
|
|
265
|
-
c[1] || (c[1] = t("div", {
|
|
266
|
-
"aria-hidden": "true",
|
|
267
|
-
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]"
|
|
268
|
-
}, [
|
|
269
|
-
t("svg", {
|
|
270
|
-
width: "32",
|
|
271
|
-
height: "32",
|
|
272
|
-
viewBox: "0 0 24 24",
|
|
273
|
-
fill: "none",
|
|
274
|
-
stroke: "currentColor",
|
|
275
|
-
"stroke-width": "2.2",
|
|
276
|
-
"stroke-linecap": "round",
|
|
277
|
-
"stroke-linejoin": "round"
|
|
278
|
-
}, [
|
|
279
|
-
t("path", { d: "M20 6 9 17l-5-5" })
|
|
280
|
-
])
|
|
281
|
-
], -1)),
|
|
282
|
-
t("h3", Pe, r(e(a)("connect.whatsappBot.accountConnected")), 1),
|
|
283
|
-
t("p", Se, r(((b = _.value.account) == null ? void 0 : b.businessName) || ((B = _.value.account) == null ? void 0 : B.name) || e(a)("connect.whatsappBot.unnamedAccount")) + " · " + r(((s = _.value.account) == null ? void 0 : s.phoneNumber) || e(a)("connect.whatsappBot.phoneUnavailable")), 1)
|
|
284
|
-
])) : (n(), h("div", Ie, [
|
|
285
|
-
t("div", Fe, [
|
|
286
|
-
t("p", Ee, r(e(a)("connect.whatsappBot.scanDescription")), 1),
|
|
287
|
-
t("ol", We, [
|
|
288
|
-
(n(), h(Q, null, Y(4, (o) => t("li", {
|
|
289
|
-
key: o,
|
|
290
|
-
class: "flex gap-[12px]"
|
|
291
|
-
}, [
|
|
292
|
-
t("span", Ve, r(o), 1),
|
|
293
|
-
o === 1 ? (n(), h("span", De, r(e(a)("connect.whatsappBot.steps.openApp")), 1)) : o === 2 ? (n(), C(v, {
|
|
294
|
-
key: 1,
|
|
295
|
-
keypath: "connect.whatsappBot.steps.openSettings",
|
|
296
|
-
tag: "span",
|
|
297
|
-
scope: "global"
|
|
298
|
-
}, {
|
|
299
|
-
menu: I(() => [
|
|
300
|
-
t("b", Ne, r(e(a)("connect.whatsappBot.menu")), 1)
|
|
301
|
-
]),
|
|
302
|
-
settings: I(() => [
|
|
303
|
-
t("b", Oe, r(e(a)("connect.whatsappBot.settings")), 1)
|
|
304
|
-
]),
|
|
305
|
-
_: 1
|
|
306
|
-
})) : o === 3 ? (n(), C(v, {
|
|
307
|
-
key: 2,
|
|
308
|
-
keypath: "connect.whatsappBot.steps.linkDevice",
|
|
309
|
-
tag: "span",
|
|
310
|
-
scope: "global"
|
|
311
|
-
}, {
|
|
312
|
-
linkedDevices: I(() => [
|
|
313
|
-
t("b", je, r(e(a)("connect.whatsappBot.linkedDevices")), 1)
|
|
314
|
-
]),
|
|
315
|
-
linkDevice: I(() => [
|
|
316
|
-
t("b", He, r(e(a)("connect.whatsappBot.linkDevice")), 1)
|
|
317
|
-
]),
|
|
318
|
-
_: 1
|
|
319
|
-
})) : (n(), h("span", Le, r(e(a)("connect.whatsappBot.steps.scanQr")), 1))
|
|
320
|
-
])), 64))
|
|
321
|
-
]),
|
|
322
|
-
t("p", Me, r(e(a)("connect.whatsappBot.connectionNote")), 1)
|
|
323
|
-
]),
|
|
324
|
-
t("div", Re, [
|
|
325
|
-
m.value ? (n(), h("div", Ue, [
|
|
326
|
-
A(p),
|
|
327
|
-
z(r(e(a)("connect.whatsappBot.generatingQr")), 1)
|
|
328
|
-
])) : u.value ? (n(), h("div", ze, [
|
|
329
|
-
t("p", Ge, r(u.value), 1),
|
|
330
|
-
A(S, {
|
|
331
|
-
label: e(a)("connect.whatsappBot.tryAgain"),
|
|
332
|
-
"prepend-icon": "refresh",
|
|
333
|
-
onClick: W
|
|
334
|
-
}, null, 8, ["label"])
|
|
335
|
-
])) : d.value ? (n(), h("img", {
|
|
336
|
-
key: 2,
|
|
337
|
-
src: d.value,
|
|
338
|
-
alt: e(a)("connect.whatsappBot.qrAlt"),
|
|
339
|
-
width: "224",
|
|
340
|
-
height: "224",
|
|
341
|
-
class: U({ "opacity-20": l.value })
|
|
342
|
-
}, null, 10, Ke)) : O("", !0),
|
|
343
|
-
l.value ? (n(), h("div", Qe, [
|
|
344
|
-
A(p),
|
|
345
|
-
z(" " + r(e(a)("connect.whatsappBot.connecting")), 1)
|
|
346
|
-
])) : O("", !0)
|
|
347
|
-
])
|
|
348
|
-
]))
|
|
349
|
-
];
|
|
350
|
-
}),
|
|
351
|
-
_: 1
|
|
352
|
-
}, 8, ["modelValue"]);
|
|
353
|
-
};
|
|
354
|
-
}
|
|
355
|
-
}), Je = { 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]" }, Xe = { class: "text-[20px] leading-[28px] font-bold" }, Ye = { class: "text-[14px] leading-[20px] text-fm-color-typo-secondary max-w-[420px]" }, qe = /* @__PURE__ */ M({
|
|
356
|
-
__name: "WhatsappEmptyState",
|
|
357
|
-
emits: ["connect"],
|
|
358
|
-
setup(F, { emit: i }) {
|
|
359
|
-
const a = i, { t: d } = G();
|
|
360
|
-
return (m, u) => {
|
|
361
|
-
const l = y("FmButton");
|
|
362
|
-
return n(), h("div", Je, [
|
|
363
|
-
u[1] || (u[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]" }, [
|
|
364
|
-
t("svg", {
|
|
365
|
-
width: "34",
|
|
366
|
-
height: "34",
|
|
367
|
-
viewBox: "0 0 24 24",
|
|
368
|
-
fill: "none",
|
|
369
|
-
stroke: "currentColor",
|
|
370
|
-
"stroke-width": "1.6",
|
|
371
|
-
"stroke-linecap": "round",
|
|
372
|
-
"stroke-linejoin": "round",
|
|
373
|
-
"aria-hidden": "true"
|
|
374
|
-
}, [
|
|
375
|
-
t("path", { d: "M7.9 20A9 9 0 1 0 4 16.1L2 22Z" }),
|
|
376
|
-
t("path", { d: "M9 10h.01M12 10h.01M15 10h.01" })
|
|
377
|
-
])
|
|
378
|
-
], -1)),
|
|
379
|
-
t("h2", Xe, r(e(d)("connect.whatsappBot.emptyTitle")), 1),
|
|
380
|
-
t("p", Ye, r(e(d)("connect.whatsappBot.emptyDescription")), 1),
|
|
381
|
-
A(l, {
|
|
382
|
-
class: "mt-[16px]",
|
|
383
|
-
label: e(d)("connect.whatsappBot.connectAccountCta"),
|
|
384
|
-
"prepend-icon": "add",
|
|
385
|
-
onClick: u[0] || (u[0] = (_) => a("connect"))
|
|
386
|
-
}, null, 8, ["label"])
|
|
387
|
-
]);
|
|
388
|
-
};
|
|
389
|
-
}
|
|
390
|
-
}), et = { class: "px-[24px] xs:px-[12px] pt-[20px] pb-[40px] text-fm-color-typo-primary" }, tt = { class: "flex items-center justify-between gap-[16px] flex-wrap min-h-[40px]" }, ot = { class: "flex items-center gap-8" }, nt = { class: "text-[24px] leading-[32px] font-semibold tracking-[-0.01em]" }, at = {
|
|
391
|
-
key: 2,
|
|
392
|
-
role: "status",
|
|
393
|
-
class: "mt-[24px] py-[56px] flex flex-col items-center gap-[12px] text-[14px] text-fm-color-typo-secondary"
|
|
394
|
-
}, st = {
|
|
395
|
-
key: 3,
|
|
396
|
-
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]"
|
|
397
|
-
}, lt = {
|
|
398
|
-
role: "alert",
|
|
399
|
-
class: "text-[14px] text-fm-color-typo-error"
|
|
400
|
-
}, xt = /* @__PURE__ */ M({
|
|
401
|
-
__name: "WhatsappBot",
|
|
402
|
-
setup(F) {
|
|
403
|
-
const { t: i } = G(), a = ce(), d = w([]), m = w(!0), u = w("");
|
|
404
|
-
let l, _;
|
|
405
|
-
const f = w([]), $ = w(!0), P = w("");
|
|
406
|
-
let g, E;
|
|
407
|
-
const W = H(
|
|
408
|
-
() => d.value.filter((s) => de(s) !== void 0)
|
|
409
|
-
), x = H(() => [
|
|
410
|
-
{
|
|
411
|
-
label: i("connect.whatsappBot.accounts"),
|
|
412
|
-
value: k["$connect-WHATSAPP_BOT"],
|
|
413
|
-
badge: W.value.length
|
|
414
|
-
},
|
|
415
|
-
{
|
|
416
|
-
label: i("connect.whatsappBot.settings"),
|
|
417
|
-
value: k["$connect-WHATSAPP_BOT_SETTINGS"]
|
|
418
|
-
},
|
|
419
|
-
{
|
|
420
|
-
label: i("connect.whatsappBot.tickets.title"),
|
|
421
|
-
value: k["$connect-WHATSAPP_BOT_TICKETS"],
|
|
422
|
-
badge: f.value.length
|
|
423
|
-
}
|
|
424
|
-
]), c = H(() => {
|
|
425
|
-
const s = a.currentRoute.value.name;
|
|
426
|
-
return s === k["$connect-WHATSAPP_BOT_SETTINGS"] || s === k["$connect-WHATSAPP_BOT_TICKETS"] ? s : k["$connect-WHATSAPP_BOT"];
|
|
427
|
-
});
|
|
428
|
-
async function v(s = !1) {
|
|
429
|
-
clearTimeout(E), g == null || g.abort();
|
|
430
|
-
const o = new AbortController();
|
|
431
|
-
g = o, s || ($.value = !0, P.value = "");
|
|
432
|
-
try {
|
|
433
|
-
const T = j.getBusinessId();
|
|
434
|
-
if (!T)
|
|
435
|
-
throw new Error(i("connect.whatsappBot.errors.selectBusiness"));
|
|
436
|
-
const N = await L.listTickets(T, o.signal);
|
|
437
|
-
o.signal.aborted || (f.value = N, P.value = "");
|
|
438
|
-
} catch (T) {
|
|
439
|
-
o.signal.aborted || (P.value = T instanceof Error ? T.message : i("connect.whatsappBot.tickets.loadError"));
|
|
440
|
-
} finally {
|
|
441
|
-
o.signal.aborted || ($.value = !1, E = setTimeout(() => void v(!0), 1e4));
|
|
442
|
-
}
|
|
443
|
-
}
|
|
444
|
-
function p(s) {
|
|
445
|
-
f.value = f.value.filter((o) => o.id !== s), v(!0);
|
|
446
|
-
}
|
|
447
|
-
async function S(s = !1) {
|
|
448
|
-
clearTimeout(_), l == null || l.abort();
|
|
449
|
-
const o = new AbortController();
|
|
450
|
-
l = o, s || (m.value = !0, u.value = "");
|
|
451
|
-
try {
|
|
452
|
-
const T = j.getBusinessId();
|
|
453
|
-
if (!T)
|
|
454
|
-
throw new Error(i("connect.whatsappBot.errors.selectBusiness"));
|
|
455
|
-
const N = await L.listClients(T, o.signal);
|
|
456
|
-
o.signal.aborted || (d.value = N, u.value = "");
|
|
457
|
-
} catch (T) {
|
|
458
|
-
!o.signal.aborted && !s && (u.value = T instanceof Error ? T.message : i("connect.whatsappBot.errors.loadSessions"));
|
|
459
|
-
} finally {
|
|
460
|
-
o.signal.aborted || (m.value = !1, _ = setTimeout(() => void S(!0), 1e4));
|
|
461
|
-
}
|
|
462
|
-
}
|
|
463
|
-
function V(s) {
|
|
464
|
-
d.value = d.value.filter(
|
|
465
|
-
(o) => o.clientId !== s
|
|
466
|
-
), S(!0);
|
|
467
|
-
}
|
|
468
|
-
const b = w(!1);
|
|
469
|
-
function B(s) {
|
|
470
|
-
(s === k["$connect-WHATSAPP_BOT"] || s === k["$connect-WHATSAPP_BOT_SETTINGS"] || s === k["$connect-WHATSAPP_BOT_TICKETS"]) && a.push({ name: s });
|
|
471
|
-
}
|
|
472
|
-
return R(b, (s) => {
|
|
473
|
-
s || S();
|
|
474
|
-
}), R(
|
|
475
|
-
() => j.getBusinessId(),
|
|
476
|
-
() => {
|
|
477
|
-
b.value = !1, d.value = [], f.value = [], S(), v();
|
|
478
|
-
},
|
|
479
|
-
{ immediate: !0 }
|
|
480
|
-
), K(() => {
|
|
481
|
-
l == null || l.abort(), clearTimeout(_), g == null || g.abort(), clearTimeout(E);
|
|
482
|
-
}), (s, o) => {
|
|
483
|
-
const T = y("FmPill"), N = y("FmButton"), q = y("FmBadge"), ee = y("FmTab"), te = y("FmTabs"), Z = y("RouterView"), oe = y("FmCircularProgress");
|
|
484
|
-
return n(), h(Q, null, [
|
|
485
|
-
t("div", et, [
|
|
486
|
-
t("div", tt, [
|
|
487
|
-
t("div", ot, [
|
|
488
|
-
t("h1", nt, r(e(i)("connect.navigation.whatsappBot")), 1),
|
|
489
|
-
A(T, { variant: "beta" })
|
|
490
|
-
]),
|
|
491
|
-
c.value === e(k)["$connect-WHATSAPP_BOT"] && W.value.length ? (n(), C(N, {
|
|
492
|
-
key: 0,
|
|
493
|
-
label: e(i)("connect.whatsappBot.connectAccountCta"),
|
|
494
|
-
"prepend-icon": "add",
|
|
495
|
-
onClick: o[0] || (o[0] = (D) => b.value = !0)
|
|
496
|
-
}, null, 8, ["label"])) : O("", !0)
|
|
497
|
-
]),
|
|
498
|
-
A(te, {
|
|
499
|
-
"model-value": c.value,
|
|
500
|
-
items: x.value,
|
|
501
|
-
role: "tablist",
|
|
502
|
-
"aria-label": e(i)("connect.navigation.whatsappBot"),
|
|
503
|
-
class: "mt-[16px] border-b border-fm-color-neutral-gray-100"
|
|
504
|
-
}, {
|
|
505
|
-
default: I(({ label: D, value: J, badge: X, tabsProps: ne }) => [
|
|
506
|
-
A(ee, le(ne, {
|
|
507
|
-
"model-value": c.value,
|
|
508
|
-
label: D,
|
|
509
|
-
value: J,
|
|
510
|
-
"onUpdate:modelValue": B
|
|
511
|
-
}), re({ _: 2 }, [
|
|
512
|
-
X ? {
|
|
513
|
-
name: "append",
|
|
514
|
-
fn: I(() => [
|
|
515
|
-
A(q, {
|
|
516
|
-
value: X,
|
|
517
|
-
variant: "neutral",
|
|
518
|
-
inline: "",
|
|
519
|
-
class: U(
|
|
520
|
-
c.value === J ? "bg-fm-color-primary-oats text-fm-color-primary" : "bg-fm-color-neutral-gray-100 text-fm-color-typo-secondary"
|
|
521
|
-
)
|
|
522
|
-
}, null, 8, ["value", "class"])
|
|
523
|
-
]),
|
|
524
|
-
key: "0"
|
|
525
|
-
} : void 0
|
|
526
|
-
]), 1040, ["model-value", "label", "value"])
|
|
527
|
-
]),
|
|
528
|
-
_: 1
|
|
529
|
-
}, 8, ["model-value", "items", "aria-label"]),
|
|
530
|
-
c.value === e(k)["$connect-WHATSAPP_BOT_SETTINGS"] ? (n(), C(Z, { key: 0 })) : c.value === e(k)["$connect-WHATSAPP_BOT_TICKETS"] ? (n(), C(Z, {
|
|
531
|
-
key: 1,
|
|
532
|
-
tickets: f.value,
|
|
533
|
-
loading: $.value,
|
|
534
|
-
error: P.value,
|
|
535
|
-
onRetry: o[1] || (o[1] = (D) => v()),
|
|
536
|
-
onResolved: p
|
|
537
|
-
}, null, 8, ["tickets", "loading", "error"])) : m.value ? (n(), h("div", at, [
|
|
538
|
-
A(oe),
|
|
539
|
-
z(" " + r(e(i)("connect.whatsappBot.loadingSessions")), 1)
|
|
540
|
-
])) : u.value ? (n(), h("div", st, [
|
|
541
|
-
t("p", lt, r(u.value), 1),
|
|
542
|
-
A(N, {
|
|
543
|
-
label: e(i)("connect.whatsappBot.tryAgain"),
|
|
544
|
-
"prepend-icon": "refresh",
|
|
545
|
-
onClick: o[2] || (o[2] = (D) => S())
|
|
546
|
-
}, null, 8, ["label"])
|
|
547
|
-
])) : W.value.length ? (n(), C(Ae, {
|
|
548
|
-
key: 4,
|
|
549
|
-
accounts: W.value,
|
|
550
|
-
onRemoved: V
|
|
551
|
-
}, null, 8, ["accounts"])) : (n(), C(qe, {
|
|
552
|
-
key: 5,
|
|
553
|
-
onConnect: o[3] || (o[3] = (D) => b.value = !0)
|
|
554
|
-
}))
|
|
555
|
-
]),
|
|
556
|
-
A(Ze, {
|
|
557
|
-
modelValue: b.value,
|
|
558
|
-
"onUpdate:modelValue": o[4] || (o[4] = (D) => b.value = D)
|
|
559
|
-
}, null, 8, ["modelValue"])
|
|
560
|
-
], 64);
|
|
561
|
-
};
|
|
562
|
-
}
|
|
563
|
-
});
|
|
564
|
-
export {
|
|
565
|
-
xt as default
|
|
566
|
-
};
|