@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
|
@@ -0,0 +1,581 @@
|
|
|
1
|
+
import { defineComponent as M, ref as B, computed as H, watch as R, onBeforeUnmount as K, resolveComponent as b, openBlock as n, createElementBlock as m, createElementVNode as o, normalizeClass as U, unref as e, toDisplayString as r, createBlock as A, withCtx as S, createTextVNode as z, createVNode as k, createCommentVNode as j, withModifiers as ae, Fragment as Q, renderList as q, useModel as se, mergeProps as le, createSlots as re } from "vue";
|
|
2
|
+
import { u as G } from "./vue-i18n-BJ_ZHWvK.js";
|
|
3
|
+
import { useRouter as ce } from "vue-router";
|
|
4
|
+
import { S as N, a as ie } from "./index-Cfr0vxa5.js";
|
|
5
|
+
import { w as L } from "./index-Cq0kWJ_W.js";
|
|
6
|
+
import { u as ue, _ as pe, w as de } from "./WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-D25DVRXA.js";
|
|
7
|
+
import { R as T } from "./app-BiUEivOU.js";
|
|
8
|
+
import { b as me } from "./browser-BSAOEeIM.js";
|
|
9
|
+
const fe = { class: "flex items-center gap-[12px]" }, xe = ["src"], ve = { key: 1 }, he = { class: "min-w-0 flex-1" }, _e = ["title"], ge = { key: 1 }, ye = { class: "text-[14px] leading-[20px] text-fm-color-typo-secondary break-all" }, be = { class: "relative z-10 flex shrink-0 items-center gap-[12px]" }, we = ["aria-label", "title", "disabled", "aria-busy"], Be = { class: "flex items-center justify-between flex-wrap gap-[8px] border-t border-fm-color-neutral-gray-100 pt-[12px]" }, Te = {
|
|
10
|
+
key: 0,
|
|
11
|
+
class: "text-[12px] text-fm-color-typo-secondary"
|
|
12
|
+
}, ke = {
|
|
13
|
+
key: 0,
|
|
14
|
+
role: "alert",
|
|
15
|
+
class: "text-[14px] text-fm-color-typo-error"
|
|
16
|
+
}, Ae = /* @__PURE__ */ M({
|
|
17
|
+
__name: "WhatsappAccountCard",
|
|
18
|
+
props: {
|
|
19
|
+
account: {}
|
|
20
|
+
},
|
|
21
|
+
emits: ["removed"],
|
|
22
|
+
setup(I, { emit: i }) {
|
|
23
|
+
const a = I, f = i, { t: x, locale: u } = G(), l = B(!1), h = B("");
|
|
24
|
+
let v;
|
|
25
|
+
const {
|
|
26
|
+
name: $,
|
|
27
|
+
phoneNumber: C,
|
|
28
|
+
initials: g,
|
|
29
|
+
state: F,
|
|
30
|
+
avatarColor: E,
|
|
31
|
+
profilePictureUrl: _,
|
|
32
|
+
profilePictureFailed: c
|
|
33
|
+
} = ue(() => a.account), p = H(() => F.value === "connected"), d = H(() => ({
|
|
34
|
+
name: T["$connect-WHATSAPP_ACCOUNT"],
|
|
35
|
+
params: { clientId: a.account.clientId }
|
|
36
|
+
}));
|
|
37
|
+
function W(P) {
|
|
38
|
+
return new Intl.DateTimeFormat(u.value, {
|
|
39
|
+
year: "numeric",
|
|
40
|
+
month: "short",
|
|
41
|
+
day: "numeric"
|
|
42
|
+
}).format(new Date(P));
|
|
43
|
+
}
|
|
44
|
+
async function O() {
|
|
45
|
+
if (l.value) return;
|
|
46
|
+
const P = N.getBusinessId();
|
|
47
|
+
if (!P) {
|
|
48
|
+
h.value = x("connect.whatsappBot.errors.selectBusiness");
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
const s = a.account.clientId, t = new AbortController();
|
|
52
|
+
v = t, l.value = !0, h.value = "";
|
|
53
|
+
try {
|
|
54
|
+
await L.deleteClient(P, s, t.signal), t.signal.aborted || f("removed", s);
|
|
55
|
+
} catch {
|
|
56
|
+
t.signal.aborted || (h.value = x("connect.whatsappBot.errors.removeAccount"));
|
|
57
|
+
} finally {
|
|
58
|
+
v === t && (v = void 0, l.value = !1);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
function w() {
|
|
62
|
+
v == null || v.abort(), v = void 0, l.value = !1, h.value = "";
|
|
63
|
+
}
|
|
64
|
+
return R(() => N.getBusinessId(), w), K(w), (P, s) => {
|
|
65
|
+
const t = b("RouterLink"), y = b("FmIcon"), V = b("FmCircularProgress");
|
|
66
|
+
return n(), m("li", null, [
|
|
67
|
+
o("div", {
|
|
68
|
+
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", {
|
|
69
|
+
"cursor-pointer transition-shadow hover:border-fm-color-neutral-gray-200 hover:fm-shadow-light-100": p.value
|
|
70
|
+
}])
|
|
71
|
+
}, [
|
|
72
|
+
o("div", fe, [
|
|
73
|
+
o("div", {
|
|
74
|
+
"aria-hidden": "true",
|
|
75
|
+
class: U(["w-[48px] h-[48px] rounded-full overflow-hidden shrink-0 flex items-center justify-center text-[16px] font-semibold text-fm-color-typo-white", e(E)])
|
|
76
|
+
}, [
|
|
77
|
+
e(_) && !e(c) ? (n(), m("img", {
|
|
78
|
+
key: 0,
|
|
79
|
+
src: e(_),
|
|
80
|
+
alt: "",
|
|
81
|
+
class: "w-full h-full object-cover",
|
|
82
|
+
referrerpolicy: "no-referrer",
|
|
83
|
+
onError: s[0] || (s[0] = (Z) => c.value = !0)
|
|
84
|
+
}, null, 40, xe)) : (n(), m("span", ve, r(e(g)), 1))
|
|
85
|
+
], 2),
|
|
86
|
+
o("div", he, [
|
|
87
|
+
o("h2", {
|
|
88
|
+
class: "text-[16px] leading-[24px] font-semibold truncate",
|
|
89
|
+
title: e($)
|
|
90
|
+
}, [
|
|
91
|
+
p.value ? (n(), A(t, {
|
|
92
|
+
key: 0,
|
|
93
|
+
to: d.value,
|
|
94
|
+
class: "text-inherit no-underline after:absolute after:inset-0 after:rounded-[16px] focus-visible:outline-none focus-visible:after:ring-[2px] focus-visible:after:ring-fm-color-primary focus-visible:after:ring-offset-[2px]"
|
|
95
|
+
}, {
|
|
96
|
+
default: S(() => [
|
|
97
|
+
z(r(e($)), 1)
|
|
98
|
+
]),
|
|
99
|
+
_: 1
|
|
100
|
+
}, 8, ["to"])) : (n(), m("span", ge, r(e($)), 1))
|
|
101
|
+
], 8, _e),
|
|
102
|
+
o("p", ye, r(e(C)), 1)
|
|
103
|
+
]),
|
|
104
|
+
o("div", be, [
|
|
105
|
+
p.value ? (n(), A(t, {
|
|
106
|
+
key: 0,
|
|
107
|
+
to: d.value,
|
|
108
|
+
"aria-label": e(x)("connect.common.edit"),
|
|
109
|
+
title: e(x)("connect.common.edit"),
|
|
110
|
+
class: "w-[32px] h-[32px] flex items-center justify-center rounded-[8px] text-fm-color-typo-tertiary no-underline transition-colors hover:bg-fm-color-neutral-gray-100 hover:text-fm-color-typo-primary focus-visible:outline-none focus-visible:ring-[2px] focus-visible:ring-fm-color-primary"
|
|
111
|
+
}, {
|
|
112
|
+
default: S(() => [
|
|
113
|
+
k(y, {
|
|
114
|
+
name: "edit",
|
|
115
|
+
size: "sm",
|
|
116
|
+
outline: "",
|
|
117
|
+
"aria-hidden": "true"
|
|
118
|
+
})
|
|
119
|
+
]),
|
|
120
|
+
_: 1
|
|
121
|
+
}, 8, ["to", "aria-label", "title"])) : j("", !0),
|
|
122
|
+
o("button", {
|
|
123
|
+
type: "button",
|
|
124
|
+
"aria-label": e(x)("connect.common.remove"),
|
|
125
|
+
title: e(x)("connect.common.remove"),
|
|
126
|
+
disabled: l.value,
|
|
127
|
+
"aria-busy": l.value,
|
|
128
|
+
class: "w-[32px] h-[32px] flex items-center justify-center rounded-[8px] text-fm-color-typo-tertiary transition-colors hover:bg-fm-color-system-error-100 hover:text-fm-color-typo-error focus-visible:outline-none focus-visible:ring-[2px] focus-visible:ring-fm-color-primary disabled:cursor-wait disabled:opacity-50",
|
|
129
|
+
onClick: ae(O, ["stop"])
|
|
130
|
+
}, [
|
|
131
|
+
l.value ? (n(), A(V, {
|
|
132
|
+
key: 0,
|
|
133
|
+
size: "md",
|
|
134
|
+
"aria-hidden": "true"
|
|
135
|
+
})) : (n(), A(y, {
|
|
136
|
+
key: 1,
|
|
137
|
+
name: "delete",
|
|
138
|
+
size: "sm",
|
|
139
|
+
outline: "",
|
|
140
|
+
"aria-hidden": "true"
|
|
141
|
+
}))
|
|
142
|
+
], 8, we)
|
|
143
|
+
])
|
|
144
|
+
]),
|
|
145
|
+
o("div", Be, [
|
|
146
|
+
k(pe, { state: e(F) }, null, 8, ["state"]),
|
|
147
|
+
p.value && I.account.connectedAt ? (n(), m("span", Te, r(e(x)("connect.whatsappBot.connectedSince", {
|
|
148
|
+
date: W(I.account.connectedAt)
|
|
149
|
+
})), 1)) : j("", !0)
|
|
150
|
+
]),
|
|
151
|
+
h.value ? (n(), m("p", ke, r(h.value), 1)) : j("", !0)
|
|
152
|
+
], 2)
|
|
153
|
+
]);
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
}), $e = { class: "mt-[24px] grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] xs:grid-cols-1 gap-[16px]" }, Ce = /* @__PURE__ */ M({
|
|
157
|
+
__name: "WhatsappAccountList",
|
|
158
|
+
props: {
|
|
159
|
+
accounts: {}
|
|
160
|
+
},
|
|
161
|
+
emits: ["removed"],
|
|
162
|
+
setup(I, { emit: i }) {
|
|
163
|
+
const a = i;
|
|
164
|
+
return (f, x) => (n(), m("ul", $e, [
|
|
165
|
+
(n(!0), m(Q, null, q(I.accounts, (u) => (n(), A(Ae, {
|
|
166
|
+
key: u.clientId,
|
|
167
|
+
account: u,
|
|
168
|
+
onRemoved: x[0] || (x[0] = (l) => a("removed", l))
|
|
169
|
+
}, null, 8, ["account"]))), 128))
|
|
170
|
+
]));
|
|
171
|
+
}
|
|
172
|
+
}), Pe = { class: "text-[18px] font-semibold" }, Se = {
|
|
173
|
+
key: 0,
|
|
174
|
+
role: "status",
|
|
175
|
+
class: "flex flex-col items-center text-center gap-[8px] px-[8px] py-[40px]"
|
|
176
|
+
}, Ie = { class: "text-[18px] font-semibold" }, Fe = { class: "text-[14px] text-fm-color-typo-secondary break-all" }, Ee = {
|
|
177
|
+
key: 1,
|
|
178
|
+
class: "grid grid-cols-[minmax(0,1fr)_232px] xs:grid-cols-1 gap-[32px] p-[8px] xs:p-[0px]"
|
|
179
|
+
}, We = { class: "flex flex-col gap-[20px] text-[14px] leading-[20px]" }, Ve = { class: "text-fm-color-typo-secondary" }, De = { class: "flex flex-col gap-[14px]" }, je = { class: "w-[22px] h-[22px] shrink-0 rounded-full bg-fm-color-neutral-gray-100 flex items-center justify-center text-[12px] font-semibold" }, Ne = { key: 0 }, Oe = { class: "font-semibold" }, He = { class: "font-semibold" }, Le = { class: "font-semibold" }, Me = { class: "font-semibold" }, Re = { key: 3 }, Ue = { class: "text-[12px] leading-[16px] text-fm-color-typo-secondary" }, ze = { class: "relative w-[232px] h-[232px] xs:justify-self-center border border-fm-color-neutral-gray-100 rounded-xl flex items-center justify-center overflow-hidden" }, Ge = {
|
|
180
|
+
key: 0,
|
|
181
|
+
role: "status",
|
|
182
|
+
class: "flex flex-col items-center gap-[12px] text-[13px]"
|
|
183
|
+
}, Ke = {
|
|
184
|
+
key: 1,
|
|
185
|
+
class: "flex flex-col items-center text-center gap-[12px] p-[12px]"
|
|
186
|
+
}, Qe = {
|
|
187
|
+
role: "alert",
|
|
188
|
+
class: "text-[14px] text-fm-color-typo-error"
|
|
189
|
+
}, Ze = ["src", "alt"], Je = {
|
|
190
|
+
key: 3,
|
|
191
|
+
role: "status",
|
|
192
|
+
"aria-live": "polite",
|
|
193
|
+
class: "absolute inset-0 bg-fm-color-neutral-white/90 flex flex-col items-center justify-center gap-[10px] text-[13px] font-medium"
|
|
194
|
+
}, Xe = /* @__PURE__ */ M({
|
|
195
|
+
__name: "WhatsappConnectDialog",
|
|
196
|
+
props: {
|
|
197
|
+
modelValue: { type: Boolean, required: !0 },
|
|
198
|
+
modelModifiers: {}
|
|
199
|
+
},
|
|
200
|
+
emits: ["update:modelValue"],
|
|
201
|
+
setup(I) {
|
|
202
|
+
const i = se(I, "modelValue"), { t: a } = G(), f = B(""), x = B(!1), u = B(""), l = B(!1), h = B();
|
|
203
|
+
let v, $, C;
|
|
204
|
+
function g() {
|
|
205
|
+
v == null || v.abort(), clearTimeout($), $ = void 0, clearTimeout(C), C = void 0;
|
|
206
|
+
}
|
|
207
|
+
async function F(_, c, p) {
|
|
208
|
+
if (!p.aborted) {
|
|
209
|
+
try {
|
|
210
|
+
const d = await L.getClient(_, c, p);
|
|
211
|
+
if (p.aborted) return;
|
|
212
|
+
if (l.value = d.status === "connected" || d.status === "connecting" && d.connectedAt !== null, d.status === "connected" && d.connectedAt !== null && d.profileStatus === "ready") {
|
|
213
|
+
g(), l.value = !1, h.value = d, C = setTimeout(() => {
|
|
214
|
+
i.value = !1;
|
|
215
|
+
}, 1800);
|
|
216
|
+
return;
|
|
217
|
+
}
|
|
218
|
+
if (d.status === "disconnected") {
|
|
219
|
+
g(), l.value = !1, f.value = "", u.value = a("connect.whatsappBot.errors.qrExpired");
|
|
220
|
+
return;
|
|
221
|
+
}
|
|
222
|
+
} catch (d) {
|
|
223
|
+
if (p.aborted) return;
|
|
224
|
+
if (d instanceof ie && d.status === 409) {
|
|
225
|
+
g(), l.value = !1, f.value = "", u.value = a("connect.whatsappBot.errors.accountAlreadyLinked");
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
p.aborted || ($ = setTimeout(() => {
|
|
230
|
+
F(_, c, p);
|
|
231
|
+
}, 2e3));
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
async function E() {
|
|
235
|
+
g();
|
|
236
|
+
const _ = new AbortController();
|
|
237
|
+
v = _, f.value = "", u.value = "", l.value = !1, h.value = void 0, x.value = !0;
|
|
238
|
+
try {
|
|
239
|
+
const c = N.getBusinessId();
|
|
240
|
+
if (!c)
|
|
241
|
+
throw new Error(a("connect.whatsappBot.errors.selectBusiness"));
|
|
242
|
+
const p = await L.createClient(
|
|
243
|
+
c,
|
|
244
|
+
_.signal
|
|
245
|
+
), d = await me.toDataURL(p.qr, {
|
|
246
|
+
width: 224,
|
|
247
|
+
margin: 2,
|
|
248
|
+
errorCorrectionLevel: "M"
|
|
249
|
+
});
|
|
250
|
+
_.signal.aborted || (f.value = d, F(c, p.clientId, _.signal));
|
|
251
|
+
} catch (c) {
|
|
252
|
+
_.signal.aborted || (u.value = c instanceof Error ? c.message : a("connect.whatsappBot.errors.loadQr"));
|
|
253
|
+
} finally {
|
|
254
|
+
_.signal.aborted || (x.value = !1);
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
return R(
|
|
258
|
+
i,
|
|
259
|
+
(_) => {
|
|
260
|
+
_ ? E() : g();
|
|
261
|
+
},
|
|
262
|
+
{ immediate: !0 }
|
|
263
|
+
), K(g), (_, c) => {
|
|
264
|
+
const p = b("i18n-t"), d = b("FmCircularProgress"), W = b("FmButton"), O = b("FmDialog");
|
|
265
|
+
return n(), A(O, {
|
|
266
|
+
modelValue: i.value,
|
|
267
|
+
"onUpdate:modelValue": c[0] || (c[0] = (w) => i.value = w),
|
|
268
|
+
"min-width": "min(720px, calc(100% - 32px))",
|
|
269
|
+
"max-width": "720px",
|
|
270
|
+
"max-height": "90vh",
|
|
271
|
+
"dismiss-away": ""
|
|
272
|
+
}, {
|
|
273
|
+
"dialog-header": S(() => [
|
|
274
|
+
o("h2", Pe, r(e(a)("connect.whatsappBot.connectAccount")), 1)
|
|
275
|
+
]),
|
|
276
|
+
default: S(() => {
|
|
277
|
+
var w, P, s;
|
|
278
|
+
return [
|
|
279
|
+
h.value ? (n(), m("div", Se, [
|
|
280
|
+
c[1] || (c[1] = o("div", {
|
|
281
|
+
"aria-hidden": "true",
|
|
282
|
+
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]"
|
|
283
|
+
}, [
|
|
284
|
+
o("svg", {
|
|
285
|
+
width: "32",
|
|
286
|
+
height: "32",
|
|
287
|
+
viewBox: "0 0 24 24",
|
|
288
|
+
fill: "none",
|
|
289
|
+
stroke: "currentColor",
|
|
290
|
+
"stroke-width": "2.2",
|
|
291
|
+
"stroke-linecap": "round",
|
|
292
|
+
"stroke-linejoin": "round"
|
|
293
|
+
}, [
|
|
294
|
+
o("path", { d: "M20 6 9 17l-5-5" })
|
|
295
|
+
])
|
|
296
|
+
], -1)),
|
|
297
|
+
o("h3", Ie, r(e(a)("connect.whatsappBot.accountConnected")), 1),
|
|
298
|
+
o("p", Fe, r(((w = h.value.account) == null ? void 0 : w.businessName) || ((P = h.value.account) == null ? void 0 : P.name) || e(a)("connect.whatsappBot.unnamedAccount")) + " · " + r(((s = h.value.account) == null ? void 0 : s.phoneNumber) || e(a)("connect.whatsappBot.phoneUnavailable")), 1)
|
|
299
|
+
])) : (n(), m("div", Ee, [
|
|
300
|
+
o("div", We, [
|
|
301
|
+
o("p", Ve, r(e(a)("connect.whatsappBot.scanDescription")), 1),
|
|
302
|
+
o("ol", De, [
|
|
303
|
+
(n(), m(Q, null, q(4, (t) => o("li", {
|
|
304
|
+
key: t,
|
|
305
|
+
class: "flex gap-[12px]"
|
|
306
|
+
}, [
|
|
307
|
+
o("span", je, r(t), 1),
|
|
308
|
+
t === 1 ? (n(), m("span", Ne, r(e(a)("connect.whatsappBot.steps.openApp")), 1)) : t === 2 ? (n(), A(p, {
|
|
309
|
+
key: 1,
|
|
310
|
+
keypath: "connect.whatsappBot.steps.openSettings",
|
|
311
|
+
tag: "span",
|
|
312
|
+
scope: "global"
|
|
313
|
+
}, {
|
|
314
|
+
menu: S(() => [
|
|
315
|
+
o("b", Oe, r(e(a)("connect.whatsappBot.menu")), 1)
|
|
316
|
+
]),
|
|
317
|
+
settings: S(() => [
|
|
318
|
+
o("b", He, r(e(a)("connect.whatsappBot.settings")), 1)
|
|
319
|
+
]),
|
|
320
|
+
_: 1
|
|
321
|
+
})) : t === 3 ? (n(), A(p, {
|
|
322
|
+
key: 2,
|
|
323
|
+
keypath: "connect.whatsappBot.steps.linkDevice",
|
|
324
|
+
tag: "span",
|
|
325
|
+
scope: "global"
|
|
326
|
+
}, {
|
|
327
|
+
linkedDevices: S(() => [
|
|
328
|
+
o("b", Le, r(e(a)("connect.whatsappBot.linkedDevices")), 1)
|
|
329
|
+
]),
|
|
330
|
+
linkDevice: S(() => [
|
|
331
|
+
o("b", Me, r(e(a)("connect.whatsappBot.linkDevice")), 1)
|
|
332
|
+
]),
|
|
333
|
+
_: 1
|
|
334
|
+
})) : (n(), m("span", Re, r(e(a)("connect.whatsappBot.steps.scanQr")), 1))
|
|
335
|
+
])), 64))
|
|
336
|
+
]),
|
|
337
|
+
o("p", Ue, r(e(a)("connect.whatsappBot.connectionNote")), 1)
|
|
338
|
+
]),
|
|
339
|
+
o("div", ze, [
|
|
340
|
+
x.value ? (n(), m("div", Ge, [
|
|
341
|
+
k(d),
|
|
342
|
+
z(r(e(a)("connect.whatsappBot.generatingQr")), 1)
|
|
343
|
+
])) : u.value ? (n(), m("div", Ke, [
|
|
344
|
+
o("p", Qe, r(u.value), 1),
|
|
345
|
+
k(W, {
|
|
346
|
+
label: e(a)("connect.whatsappBot.tryAgain"),
|
|
347
|
+
"prepend-icon": "refresh",
|
|
348
|
+
onClick: E
|
|
349
|
+
}, null, 8, ["label"])
|
|
350
|
+
])) : f.value ? (n(), m("img", {
|
|
351
|
+
key: 2,
|
|
352
|
+
src: f.value,
|
|
353
|
+
alt: e(a)("connect.whatsappBot.qrAlt"),
|
|
354
|
+
width: "224",
|
|
355
|
+
height: "224",
|
|
356
|
+
class: U({ "opacity-20": l.value })
|
|
357
|
+
}, null, 10, Ze)) : j("", !0),
|
|
358
|
+
l.value ? (n(), m("div", Je, [
|
|
359
|
+
k(d),
|
|
360
|
+
z(" " + r(e(a)("connect.whatsappBot.connecting")), 1)
|
|
361
|
+
])) : j("", !0)
|
|
362
|
+
])
|
|
363
|
+
]))
|
|
364
|
+
];
|
|
365
|
+
}),
|
|
366
|
+
_: 1
|
|
367
|
+
}, 8, ["modelValue"]);
|
|
368
|
+
};
|
|
369
|
+
}
|
|
370
|
+
}), Ye = { class: "mt-[24px] border border-fm-color-neutral-gray-200 rounded-[16px] px-[24px] py-[56px] flex flex-col items-center text-center gap-[8px]" }, qe = { class: "text-[20px] leading-[28px] font-bold" }, et = { class: "text-[14px] leading-[20px] text-fm-color-typo-secondary max-w-[420px]" }, tt = /* @__PURE__ */ M({
|
|
371
|
+
__name: "WhatsappEmptyState",
|
|
372
|
+
emits: ["connect"],
|
|
373
|
+
setup(I, { emit: i }) {
|
|
374
|
+
const a = i, { t: f } = G();
|
|
375
|
+
return (x, u) => {
|
|
376
|
+
const l = b("FmButton");
|
|
377
|
+
return n(), m("div", Ye, [
|
|
378
|
+
u[1] || (u[1] = o("div", { class: "w-[72px] h-[72px] rounded-full bg-fm-color-primary-oats text-fm-color-primary flex items-center justify-center mb-[12px]" }, [
|
|
379
|
+
o("svg", {
|
|
380
|
+
width: "34",
|
|
381
|
+
height: "34",
|
|
382
|
+
viewBox: "0 0 24 24",
|
|
383
|
+
fill: "none",
|
|
384
|
+
stroke: "currentColor",
|
|
385
|
+
"stroke-width": "1.6",
|
|
386
|
+
"stroke-linecap": "round",
|
|
387
|
+
"stroke-linejoin": "round",
|
|
388
|
+
"aria-hidden": "true"
|
|
389
|
+
}, [
|
|
390
|
+
o("path", { d: "M7.9 20A9 9 0 1 0 4 16.1L2 22Z" }),
|
|
391
|
+
o("path", { d: "M9 10h.01M12 10h.01M15 10h.01" })
|
|
392
|
+
])
|
|
393
|
+
], -1)),
|
|
394
|
+
o("h2", qe, r(e(f)("connect.whatsappBot.emptyTitle")), 1),
|
|
395
|
+
o("p", et, r(e(f)("connect.whatsappBot.emptyDescription")), 1),
|
|
396
|
+
k(l, {
|
|
397
|
+
class: "mt-[16px]",
|
|
398
|
+
label: e(f)("connect.whatsappBot.connectAccountCta"),
|
|
399
|
+
"prepend-icon": "add",
|
|
400
|
+
onClick: u[0] || (u[0] = (h) => a("connect"))
|
|
401
|
+
}, null, 8, ["label"])
|
|
402
|
+
]);
|
|
403
|
+
};
|
|
404
|
+
}
|
|
405
|
+
}), ot = { class: "px-[24px] xs:px-[12px] pt-[20px] pb-[40px] text-fm-color-typo-primary" }, nt = { class: "flex items-center justify-between gap-[16px] flex-wrap min-h-[40px]" }, at = { class: "flex items-center gap-8" }, st = { class: "text-[24px] leading-[32px] font-semibold tracking-[-0.01em]" }, lt = {
|
|
406
|
+
key: 2,
|
|
407
|
+
role: "status",
|
|
408
|
+
class: "mt-[24px] py-[56px] flex flex-col items-center gap-[12px] text-[14px] text-fm-color-typo-secondary"
|
|
409
|
+
}, rt = {
|
|
410
|
+
key: 3,
|
|
411
|
+
class: "mt-[24px] border border-fm-color-neutral-gray-200 rounded-[16px] px-[24px] py-[56px] flex flex-col items-center text-center gap-[16px]"
|
|
412
|
+
}, ct = {
|
|
413
|
+
role: "alert",
|
|
414
|
+
class: "text-[14px] text-fm-color-typo-error"
|
|
415
|
+
}, ht = /* @__PURE__ */ M({
|
|
416
|
+
__name: "WhatsappBot",
|
|
417
|
+
setup(I) {
|
|
418
|
+
const { t: i } = G(), a = ce(), f = B([]), x = B(!0), u = B("");
|
|
419
|
+
let l, h;
|
|
420
|
+
const v = B([]), $ = B(!0), C = B("");
|
|
421
|
+
let g, F;
|
|
422
|
+
const E = H(
|
|
423
|
+
() => f.value.filter((s) => de(s) !== void 0)
|
|
424
|
+
), _ = H(() => [
|
|
425
|
+
{
|
|
426
|
+
label: i("connect.whatsappBot.accounts"),
|
|
427
|
+
value: T["$connect-WHATSAPP_BOT"],
|
|
428
|
+
badge: E.value.length
|
|
429
|
+
},
|
|
430
|
+
{
|
|
431
|
+
label: i("connect.whatsappBot.settings"),
|
|
432
|
+
value: T["$connect-WHATSAPP_BOT_SETTINGS"]
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
label: i("connect.whatsappBot.tickets.title"),
|
|
436
|
+
value: T["$connect-WHATSAPP_BOT_TICKETS"],
|
|
437
|
+
badge: v.value.length
|
|
438
|
+
}
|
|
439
|
+
]), c = H(() => {
|
|
440
|
+
const s = a.currentRoute.value.name;
|
|
441
|
+
return s === T["$connect-WHATSAPP_BOT_SETTINGS"] || s === T["$connect-WHATSAPP_BOT_TICKETS"] ? s : T["$connect-WHATSAPP_BOT"];
|
|
442
|
+
});
|
|
443
|
+
async function p(s = !1) {
|
|
444
|
+
clearTimeout(F), g == null || g.abort();
|
|
445
|
+
const t = new AbortController();
|
|
446
|
+
g = t, s || ($.value = !0, C.value = "");
|
|
447
|
+
try {
|
|
448
|
+
const y = N.getBusinessId();
|
|
449
|
+
if (!y)
|
|
450
|
+
throw new Error(i("connect.whatsappBot.errors.selectBusiness"));
|
|
451
|
+
const V = await L.listTickets(y, t.signal);
|
|
452
|
+
t.signal.aborted || (v.value = V, C.value = "");
|
|
453
|
+
} catch (y) {
|
|
454
|
+
t.signal.aborted || (C.value = y instanceof Error ? y.message : i("connect.whatsappBot.tickets.loadError"));
|
|
455
|
+
} finally {
|
|
456
|
+
t.signal.aborted || ($.value = !1, F = setTimeout(() => void p(!0), 1e4));
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
function d(s) {
|
|
460
|
+
v.value = v.value.filter((t) => t.id !== s), p(!0);
|
|
461
|
+
}
|
|
462
|
+
async function W(s = !1) {
|
|
463
|
+
clearTimeout(h), l == null || l.abort();
|
|
464
|
+
const t = new AbortController();
|
|
465
|
+
l = t, s || (x.value = !0, u.value = "");
|
|
466
|
+
try {
|
|
467
|
+
const y = N.getBusinessId();
|
|
468
|
+
if (!y)
|
|
469
|
+
throw new Error(i("connect.whatsappBot.errors.selectBusiness"));
|
|
470
|
+
const V = await L.listClients(y, t.signal);
|
|
471
|
+
t.signal.aborted || (f.value = V, u.value = "");
|
|
472
|
+
} catch (y) {
|
|
473
|
+
!t.signal.aborted && !s && (u.value = y instanceof Error ? y.message : i("connect.whatsappBot.errors.loadSessions"));
|
|
474
|
+
} finally {
|
|
475
|
+
t.signal.aborted || (x.value = !1, h = setTimeout(() => void W(!0), 1e4));
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
function O(s) {
|
|
479
|
+
f.value = f.value.filter(
|
|
480
|
+
(t) => t.clientId !== s
|
|
481
|
+
), W(!0);
|
|
482
|
+
}
|
|
483
|
+
const w = B(!1);
|
|
484
|
+
function P(s) {
|
|
485
|
+
(s === T["$connect-WHATSAPP_BOT"] || s === T["$connect-WHATSAPP_BOT_SETTINGS"] || s === T["$connect-WHATSAPP_BOT_TICKETS"]) && a.push({ name: s });
|
|
486
|
+
}
|
|
487
|
+
return R(w, (s) => {
|
|
488
|
+
s || W();
|
|
489
|
+
}), R(
|
|
490
|
+
() => N.getBusinessId(),
|
|
491
|
+
() => {
|
|
492
|
+
w.value = !1, f.value = [], v.value = [], W(), p();
|
|
493
|
+
},
|
|
494
|
+
{ immediate: !0 }
|
|
495
|
+
), K(() => {
|
|
496
|
+
l == null || l.abort(), clearTimeout(h), g == null || g.abort(), clearTimeout(F);
|
|
497
|
+
}), (s, t) => {
|
|
498
|
+
const y = b("FmPill"), V = b("FmButton"), Z = b("FmBadge"), ee = b("FmTab"), te = b("FmTabs"), J = b("RouterView"), oe = b("FmCircularProgress");
|
|
499
|
+
return n(), m(Q, null, [
|
|
500
|
+
o("div", ot, [
|
|
501
|
+
o("div", nt, [
|
|
502
|
+
o("div", at, [
|
|
503
|
+
o("h1", st, r(e(i)("connect.navigation.whatsappBot")), 1),
|
|
504
|
+
k(y, { variant: "beta" })
|
|
505
|
+
]),
|
|
506
|
+
c.value === e(T)["$connect-WHATSAPP_BOT"] && E.value.length ? (n(), A(V, {
|
|
507
|
+
key: 0,
|
|
508
|
+
label: e(i)("connect.whatsappBot.connectAccountCta"),
|
|
509
|
+
"prepend-icon": "add",
|
|
510
|
+
onClick: t[0] || (t[0] = (D) => w.value = !0)
|
|
511
|
+
}, null, 8, ["label"])) : j("", !0)
|
|
512
|
+
]),
|
|
513
|
+
k(te, {
|
|
514
|
+
"model-value": c.value,
|
|
515
|
+
items: _.value,
|
|
516
|
+
role: "tablist",
|
|
517
|
+
"aria-label": e(i)("connect.navigation.whatsappBot"),
|
|
518
|
+
class: "mt-[16px] border-b border-fm-color-neutral-gray-100"
|
|
519
|
+
}, {
|
|
520
|
+
default: S(({ label: D, value: X, badge: Y, tabsProps: ne }) => [
|
|
521
|
+
k(ee, le(ne, {
|
|
522
|
+
"model-value": c.value,
|
|
523
|
+
label: D,
|
|
524
|
+
value: X,
|
|
525
|
+
"onUpdate:modelValue": P
|
|
526
|
+
}), re({ _: 2 }, [
|
|
527
|
+
Y ? {
|
|
528
|
+
name: "append",
|
|
529
|
+
fn: S(() => [
|
|
530
|
+
k(Z, {
|
|
531
|
+
value: Y,
|
|
532
|
+
variant: "neutral",
|
|
533
|
+
inline: "",
|
|
534
|
+
class: U(
|
|
535
|
+
c.value === X ? "bg-fm-color-primary-oats text-fm-color-primary" : "bg-fm-color-neutral-gray-100 text-fm-color-typo-secondary"
|
|
536
|
+
)
|
|
537
|
+
}, null, 8, ["value", "class"])
|
|
538
|
+
]),
|
|
539
|
+
key: "0"
|
|
540
|
+
} : void 0
|
|
541
|
+
]), 1040, ["model-value", "label", "value"])
|
|
542
|
+
]),
|
|
543
|
+
_: 1
|
|
544
|
+
}, 8, ["model-value", "items", "aria-label"]),
|
|
545
|
+
c.value === e(T)["$connect-WHATSAPP_BOT_SETTINGS"] ? (n(), A(J, { key: 0 })) : c.value === e(T)["$connect-WHATSAPP_BOT_TICKETS"] ? (n(), A(J, {
|
|
546
|
+
key: 1,
|
|
547
|
+
tickets: v.value,
|
|
548
|
+
loading: $.value,
|
|
549
|
+
error: C.value,
|
|
550
|
+
onRetry: t[1] || (t[1] = (D) => p()),
|
|
551
|
+
onResolved: d
|
|
552
|
+
}, null, 8, ["tickets", "loading", "error"])) : x.value ? (n(), m("div", lt, [
|
|
553
|
+
k(oe),
|
|
554
|
+
z(" " + r(e(i)("connect.whatsappBot.loadingSessions")), 1)
|
|
555
|
+
])) : u.value ? (n(), m("div", rt, [
|
|
556
|
+
o("p", ct, r(u.value), 1),
|
|
557
|
+
k(V, {
|
|
558
|
+
label: e(i)("connect.whatsappBot.tryAgain"),
|
|
559
|
+
"prepend-icon": "refresh",
|
|
560
|
+
onClick: t[2] || (t[2] = (D) => W())
|
|
561
|
+
}, null, 8, ["label"])
|
|
562
|
+
])) : E.value.length ? (n(), A(Ce, {
|
|
563
|
+
key: 4,
|
|
564
|
+
accounts: E.value,
|
|
565
|
+
onRemoved: O
|
|
566
|
+
}, null, 8, ["accounts"])) : (n(), A(tt, {
|
|
567
|
+
key: 5,
|
|
568
|
+
onConnect: t[3] || (t[3] = (D) => w.value = !0)
|
|
569
|
+
}))
|
|
570
|
+
]),
|
|
571
|
+
k(Xe, {
|
|
572
|
+
modelValue: w.value,
|
|
573
|
+
"onUpdate:modelValue": t[4] || (t[4] = (D) => w.value = D)
|
|
574
|
+
}, null, 8, ["modelValue"])
|
|
575
|
+
], 64);
|
|
576
|
+
};
|
|
577
|
+
}
|
|
578
|
+
});
|
|
579
|
+
export {
|
|
580
|
+
ht as default
|
|
581
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent as W, mergeModels as U, useModel as O, resolveComponent as w, openBlock as d, createElementBlock as c, createElementVNode as i, toDisplayString as u, unref as e, createVNode as b, computed as F, Fragment as L, renderList as Q, normalizeClass as M, createTextVNode as P, createCommentVNode as S, withDirectives as oe, vModelRadio as le, ref as g, watch as j, onBeforeUnmount as ae, createBlock as se } from "vue";
|
|
2
|
-
import { u as D } from "./vue-i18n-
|
|
3
|
-
import { F as Y, a as C, b as ne, c as re, d as ie, e as N, f as de } from "./index-
|
|
4
|
-
import { S as ce } from "./index-
|
|
5
|
-
import { w as J } from "./index-
|
|
2
|
+
import { u as D } from "./vue-i18n-BJ_ZHWvK.js";
|
|
3
|
+
import { F as Y, a as C, b as ne, c as re, d as ie, e as N, f as de } from "./index-DgkRREfK.js";
|
|
4
|
+
import { S as ce } from "./index-Cfr0vxa5.js";
|
|
5
|
+
import { w as J } from "./index-Cq0kWJ_W.js";
|
|
6
6
|
const pe = { class: "flex flex-col gap-[16px]" }, ue = { class: "flex flex-col gap-[4px]" }, me = { class: "text-[16px] leading-[24px] font-semibold" }, ve = { class: "text-[14px] leading-[20px] text-fm-color-typo-secondary" }, xe = /* @__PURE__ */ W({
|
|
7
7
|
__name: "BotInstructions",
|
|
8
8
|
props: /* @__PURE__ */ U({
|