@feedmepos/mf-connect 0.1.0-beta.9 → 0.1.0-prod

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/dist/Analytic-D1vIDmhJ.js +620 -0
  2. package/dist/{App-DQUbRsdA.js → App-DHrfWG8l.js} +249 -250
  3. package/dist/Broadcast-B2rxZAZi.js +216 -0
  4. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-D-BFllvG.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-D2a9rcXK.js} +20 -20
  5. package/dist/Card-Dr6pTTM0.js +824 -0
  6. package/dist/Collections-0tbg0MFt.js +441 -0
  7. package/dist/Credit-KbB_7Jq-.js +214 -0
  8. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-C_ZKNWzb.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-we7ADwFk.js} +999 -1018
  9. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-VBNyvZCJ.js +344 -0
  10. package/dist/Experience-C_Q9Iml8.js +211 -0
  11. package/dist/Game-BwODw7M6.js +250 -0
  12. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-ByhTB9Ie.js +144 -0
  13. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js → MainLayout-DpZC6o3R.js} +53 -19
  14. package/dist/Marketing-QOKTAS_T.js +309 -0
  15. package/dist/Member-d7RIGRm1.js +92 -0
  16. package/dist/MemberList-CK9629ew.js +1737 -0
  17. package/dist/MemberOverview-C2n9oJZh.js +58 -0
  18. package/dist/{MemberTransactions-zSxSnUkK.js → MemberTransactions-D-pnlXiP.js} +1 -1
  19. package/dist/MessageInput.vue_vue_type_script_setup_true_lang-3VS7JnK6.js +203 -0
  20. package/dist/Mission-BAKDm4VZ.js +248 -0
  21. package/dist/Point-Puu0jKz0.js +220 -0
  22. package/dist/Promotion-DRIaUvJi.js +244 -0
  23. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-CTKKhH-r.js → RuleGroup.vue_vue_type_script_setup_true_lang-DTdfYGya.js} +557 -557
  24. package/dist/Segment-DpBxGuuu.js +435 -0
  25. package/dist/Setting-DLB2ywCp.js +1870 -0
  26. package/dist/Store-8DO6ITWc.js +1513 -0
  27. package/dist/StoreRewards-DZfqUeYR.js +429 -0
  28. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-2Jqj_rKv.js → StoreTransactions.vue_vue_type_script_setup_true_lang-RTfozD01.js} +10 -10
  29. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-BkdSj0cX.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-BGI78ycg.js} +1 -1
  30. package/dist/{Tier-Cpl0FV8L.js → Tier-BnQRujpX.js} +453 -481
  31. package/dist/{Title-CbMDd1Et.js → Title-BPf1tUFx.js} +295 -314
  32. package/dist/Transaction-ese0oNrz.js +36 -0
  33. package/dist/Voucher--gtOZQx1.js +485 -0
  34. package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-3LlSDiq0.js +140 -0
  35. package/dist/app-Bt59niI-.js +2974 -0
  36. package/dist/{app-VxaUCtgl.js → app-DHE61XdR.js} +1 -1
  37. package/dist/app.js +3 -5
  38. package/dist/{business-DR7jpnLz.js → business-BSo7EPan.js} +1 -1
  39. package/dist/{campaign-MqcTb329.js → campaign-CsOje3Ap.js} +3 -5
  40. package/dist/{collection.fn-CvEoe61K.js → collection.fn-BYQfFJOr.js} +2 -2
  41. package/dist/dto-CfEXSCq6.js +1145 -0
  42. package/dist/{effect-BjjQeiQg.js → effect-Bn_ofYS3.js} +9 -9
  43. package/dist/{export-B8cvWh5n.js → export-CMR243CF.js} +3 -3
  44. package/dist/{helper-DfgVNY7B.js → helper-BqOQRtvW.js} +1 -1
  45. package/dist/index-BLDYTxnc.js +28058 -0
  46. package/dist/{index-C2JNcGc-.js → index-BWnFs-Cb.js} +281 -299
  47. package/dist/{index-B5NufbUt.js → index-BaBNmzUb.js} +1 -1
  48. package/dist/{index-CWR3qYjb.js → index-Boo5np6l.js} +1 -1
  49. package/dist/{index-BsfWRB8R.js → index-CC1GV8OW.js} +1 -1
  50. package/dist/{index-0UYoh1-7.js → index-CHO4_zsT.js} +1 -1
  51. package/dist/{index-2P9w5u3m.js → index-DEZsrQ2f.js} +3 -3
  52. package/dist/{index-C7zMfUgy.js → index-D_f2lmK2.js} +1 -1
  53. package/dist/{index-Dap5R3vr.js → index-Da142OER.js} +66 -78
  54. package/dist/index-DbP04yeg.js +11 -0
  55. package/dist/{index-DBy30v8N.js → index-DtPe-TEm.js} +3 -3
  56. package/dist/{index-CJ8Uh2Ja.js → index-FvlaxwGB.js} +3 -3
  57. package/dist/{index.esm2017-D1X3PgpO.js → index.esm2017-ePm--Atp.js} +55 -55
  58. package/dist/{loading-CJ3nOovJ.js → loading-KNmEMBUB.js} +460 -469
  59. package/dist/{membership-B1cmSRyk.js → membership-DKoVIS1a.js} +3 -3
  60. package/dist/money-CkD3zl5C.js +15 -0
  61. package/dist/number-BDsGpOXm.js +12 -0
  62. package/dist/{rule-ChWyR-0j.js → rule-CzamI50_.js} +2 -2
  63. package/dist/{rule-builder-CSmOONdb.js → rule-builder-DHf6wfaQ.js} +1 -1
  64. package/dist/style.css +1 -1
  65. package/dist/{template-Cug7aRK0.js → template-CFAIPoD7.js} +63 -63
  66. package/dist/{usePagination-BeF5K3M7.js → usePagination-JoYaROkV.js} +85 -85
  67. package/dist/{xlsx-CfgPFFvp.js → xlsx-BDJMaozs.js} +517 -517
  68. package/package.json +4 -7
  69. package/dist/Analytic-CMXUjK_F.js +0 -622
  70. package/dist/Broadcast-DowFtHv6.js +0 -223
  71. package/dist/Card-C7rhL0pV.js +0 -825
  72. package/dist/Collections-B-1wlk3r.js +0 -453
  73. package/dist/Credit-DDjozmoF.js +0 -220
  74. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-pwMuIgs5.js +0 -345
  75. package/dist/Experience-BbE-c1Op.js +0 -221
  76. package/dist/Game-DQdRpaN-.js +0 -255
  77. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js +0 -144
  78. package/dist/MainLayout-B1aJoR95.js +0 -41
  79. package/dist/Marketing-Dgmxzg4h.js +0 -316
  80. package/dist/Member-w23oRVwN.js +0 -69
  81. package/dist/MemberList-BLIdjznQ.js +0 -1735
  82. package/dist/MemberOverview-wL_ailso.js +0 -58
  83. package/dist/MessageInput.vue_vue_type_script_setup_true_lang-Dy_lMdZA.js +0 -432
  84. package/dist/Mission-Cjt0E083.js +0 -261
  85. package/dist/Point-CQJL3Ewu.js +0 -222
  86. package/dist/Promotion-BYViH3bu.js +0 -247
  87. package/dist/Segment-B9Jj1ak0.js +0 -437
  88. package/dist/Setting-DXWbgRxs.js +0 -1901
  89. package/dist/Store-Dswk2e_z.js +0 -1511
  90. package/dist/StoreRewards-CNUhG_Ue.js +0 -401
  91. package/dist/Transaction-BB-kk-84.js +0 -39
  92. package/dist/Voucher-b1_Jlm6X.js +0 -490
  93. package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-pG-SrXp9.js +0 -56
  94. package/dist/app-DCHKJoql.js +0 -5639
  95. package/dist/dto-jcK3TGB7.js +0 -2770
  96. package/dist/index-Cv7pLAYq.js +0 -3
  97. package/dist/index-LrSSauN2.js +0 -29193
  98. package/dist/money-BEATdGS6.js +0 -15
  99. package/dist/number-CeAYAKCp.js +0 -12
  100. package/dist/vue-i18n-BRhKDHdF.js +0 -2365
  101. package/dist/zod-Bg2FbC-D.js +0 -90
@@ -0,0 +1,435 @@
1
+ import { defineComponent as A, onMounted as E, openBlock as c, createElementBlock as b, createElementVNode as o, toDisplayString as M, unref as e, createVNode as i, createCommentVNode as G, ref as I, computed as j, resolveComponent as p, createBlock as B, isRef as J, createSlots as W, withCtx as _, Fragment as P, onBeforeMount as K, renderList as Q, h as R } from "vue";
2
+ import { _ as X } from "./campaign-CpzFl8Vr.js";
3
+ import { F as U, p as ee, u as te } from "./loading-KNmEMBUB.js";
4
+ import { components as L } from "@feedmepos/ui-library";
5
+ import { u as H, _ as O } from "./usePagination-JoYaROkV.js";
6
+ import { _ as oe, Z as ne } from "./ZodTextField.vue_vue_type_script_setup_true_lang-3LlSDiq0.js";
7
+ import { a as ae } from "./index-DtPe-TEm.js";
8
+ import { u as se } from "./app-wDQR6dpb.js";
9
+ import { R as ie } from "./rule-builder-DHf6wfaQ.js";
10
+ import { _ as le } from "./RuleGroup.vue_vue_type_script_setup_true_lang-DTdfYGya.js";
11
+ import { h as V } from "./moment-BWErdI6_.js";
12
+ import { s as k } from "./membership-DKoVIS1a.js";
13
+ import { o as re } from "./objectId-dwaoBfJX.js";
14
+ import { u as me } from "./business-BSo7EPan.js";
15
+ import { m as de } from "./index-CHO4_zsT.js";
16
+ const ce = ae.extend({
17
+ _id: U.optional(),
18
+ business: U.optional()
19
+ }), ue = { class: "space-y-16 pr-12" }, pe = { class: "fm-typo-en-title-md-800" }, ge = { class: "flex space-x-8" }, fe = { class: "fm-typo-en-title-md-800 text-fm-color-primary" }, _e = { class: "text-fm-color-typo-secondary" }, ye = /* @__PURE__ */ o("div", null, "contacts in your segment", -1), ve = {
20
+ key: 0,
21
+ class: "w-full flex flex-col gap-16 items-center pt-16"
22
+ }, he = /* @__PURE__ */ o("div", { class: "fm-typo-en-body-lg-600" }, "No data found", -1), Se = /* @__PURE__ */ o("div", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " No data to show at the current moment. ", -1), be = [
23
+ he,
24
+ Se
25
+ ], xe = /* @__PURE__ */ A({
26
+ __name: "ReviewSegment",
27
+ props: {
28
+ title: {},
29
+ segment: {}
30
+ },
31
+ setup(D) {
32
+ const y = D, x = [
33
+ {
34
+ header: "Name",
35
+ accessorFn: (n) => n.name
36
+ },
37
+ {
38
+ header: "Id",
39
+ accessorFn: (n) => n._id
40
+ },
41
+ {
42
+ header: "Customer Since",
43
+ accessorFn: (n) => V(re(n._id.toString())).format("DD MMM YYYY")
44
+ },
45
+ {
46
+ header: "Phone",
47
+ accessorFn: (n) => n.phoneNumber
48
+ },
49
+ {
50
+ header: "Birthday",
51
+ accessorFn: (n) => V(n.birthday).format("DD MMM YYYY")
52
+ },
53
+ {
54
+ header: "Last Visit",
55
+ accessorFn: (n) => V(n.stats.lastVisit).format("DD MMM YYYY")
56
+ }
57
+ ], v = async (n) => y.segment._id ? await k.paginateSegmentUsers(y.segment._id, {
58
+ limit: r.value.pageSize,
59
+ skip: n.pageIndex ?? 0,
60
+ sortBy: "_id",
61
+ search: n.searchValue,
62
+ descending: !0
63
+ }) : { resources: [], meta: { totalResources: 0, totalPages: 0 } }, { tableMeta: r, rowData: m, onSort: d, debouncedFetchData: g, onSearch: a } = H(v);
64
+ return E(async () => {
65
+ await g();
66
+ }), (n, w) => (c(), b("div", ue, [
67
+ o("div", pe, M(y.title), 1),
68
+ o("div", ge, [
69
+ o("div", fe, M(n.segment.members.length), 1),
70
+ o("div", _e, [
71
+ ye,
72
+ o("div", null, "as of " + M(e(V)(n.segment.lastUpdated).format("DD MMM YYYY")), 1)
73
+ ])
74
+ ]),
75
+ i(O, {
76
+ loading: e(r).isLoading,
77
+ "row-data": e(m),
78
+ "row-count": e(r).totalRows,
79
+ "column-defs": x,
80
+ "page-size": e(r).pageSize,
81
+ "page-count": e(r).pageCount,
82
+ "page-index": e(r).pageIndex,
83
+ onSortChange: e(d),
84
+ onPageChange: w[0] || (w[0] = (F) => e(g)({ pageSize: F.pageSize, pageIndex: F.pageIndex }))
85
+ }, null, 8, ["loading", "row-data", "row-count", "page-size", "page-count", "page-index", "onSortChange"]),
86
+ e(m).length == 0 ? (c(), b("div", ve, be)) : G("", !0)
87
+ ]));
88
+ }
89
+ }), we = { class: "flex items-center gap-x-8" }, Fe = /* @__PURE__ */ o("div", null, "Review segment", -1), Ce = {
90
+ key: 0,
91
+ class: "space-y-16 pr-12"
92
+ }, ke = /* @__PURE__ */ o("div", { class: "fm-typo-en-title-sm-800" }, "Segment Filter", -1), Me = { class: "flex items-center gap-8" }, $e = /* @__PURE__ */ A({
93
+ __name: "SegmentSheet",
94
+ emits: ["update:model-value"],
95
+ setup(D, { expose: y, emit: x }) {
96
+ const v = se(), r = I(!1), m = I(!1), d = {
97
+ name: "",
98
+ rule: ie.scaffoldGroup(),
99
+ members: []
100
+ }, g = ce, a = I(d), n = j(() => {
101
+ const f = g.safeParse(a.value);
102
+ return f.success ? [] : f.error.errors;
103
+ });
104
+ function w(f) {
105
+ r.value = !0, m.value = !1, f ? a.value = { ...f } : a.value = { ...d };
106
+ }
107
+ function F() {
108
+ r.value = !1;
109
+ }
110
+ async function C() {
111
+ g.safeParse(a.value).success && (m.value = !0);
112
+ }
113
+ function Y() {
114
+ m.value = !1;
115
+ }
116
+ async function t() {
117
+ s("update:model-value", a.value);
118
+ }
119
+ E(async () => {
120
+ });
121
+ const s = x;
122
+ return y({
123
+ showSheet: w,
124
+ hideSheet: F
125
+ }), (f, l) => {
126
+ const h = p("FmButton"), z = p("FmSideSheet");
127
+ return c(), B(z, {
128
+ modelValue: e(r),
129
+ "onUpdate:modelValue": l[5] || (l[5] = (S) => J(r) ? r.value = S : null),
130
+ header: "Add segment",
131
+ "dismiss-away": "",
132
+ "close-button": !0,
133
+ "max-width": 1100
134
+ }, W({
135
+ "side-sheet-footer": _(() => [
136
+ o("div", Me, [
137
+ e(m) ? (c(), b(P, { key: 0 }, [
138
+ i(h, {
139
+ label: "Save Segment",
140
+ onClick: t,
141
+ loading: e(v).isLoading,
142
+ disabled: e(n).length > 0 || e(v).isLoading
143
+ }, null, 8, ["loading", "disabled"]),
144
+ i(h, {
145
+ label: "Cancel",
146
+ onClick: l[3] || (l[3] = (S) => Y()),
147
+ variant: "tertiary"
148
+ })
149
+ ], 64)) : (c(), b(P, { key: 1 }, [
150
+ i(h, {
151
+ label: "Review Segment",
152
+ disabled: e(n).length > 0 || e(v).isLoading,
153
+ onClick: C
154
+ }, null, 8, ["disabled"]),
155
+ i(h, {
156
+ label: "Cancel",
157
+ onClick: l[4] || (l[4] = (S) => F()),
158
+ variant: "tertiary"
159
+ })
160
+ ], 64))
161
+ ])
162
+ ]),
163
+ default: _(() => {
164
+ var S;
165
+ return [
166
+ e(m) ? (c(), B(xe, {
167
+ key: 1,
168
+ title: e(a).name,
169
+ segment: e(a)
170
+ }, null, 8, ["title", "segment"])) : (c(), b("div", Ce, [
171
+ i(oe, {
172
+ modelValue: e(a).name,
173
+ "onUpdate:modelValue": l[1] || (l[1] = ($) => e(a).name = $),
174
+ label: "Segment title",
175
+ schema: e(ne).typeAtPath(e(g), "name")
176
+ }, null, 8, ["modelValue", "schema"]),
177
+ ke,
178
+ i(le, {
179
+ "trigger-type": "MEMBERSHIP_JOINED",
180
+ includeOnly: "user",
181
+ "model-value": (S = e(a)) == null ? void 0 : S.rule,
182
+ "onUpdate:modelValue": l[2] || (l[2] = ($) => {
183
+ e(a).rule = $;
184
+ })
185
+ }, null, 8, ["model-value"])
186
+ ]))
187
+ ];
188
+ }),
189
+ _: 2
190
+ }, [
191
+ e(m) ? {
192
+ name: "side-sheet-header",
193
+ fn: _(() => [
194
+ o("div", we, [
195
+ i(h, {
196
+ icon: "arrow_back",
197
+ variant: "tertiary",
198
+ onClick: l[0] || (l[0] = (S) => m.value = !1)
199
+ }),
200
+ Fe
201
+ ])
202
+ ]),
203
+ key: "0"
204
+ } : void 0
205
+ ]), 1032, ["modelValue"]);
206
+ };
207
+ }
208
+ }), Re = { class: "flex items-center" }, Ie = /* @__PURE__ */ o("span", { class: "fm-typo-en-title-md-600 fm-step-title line-clamp-2 mr-8" }, " Segments ", -1), Pe = { class: "px-24 flex flex-col gap-y-16" }, Ve = { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, Be = { class: "fm-typo-en-body-md-600" }, De = { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, Ye = /* @__PURE__ */ o("img", {
209
+ src: X,
210
+ class: "aspect-square w-[150px]"
211
+ }, null, -1), ze = /* @__PURE__ */ o("div", { class: "flex flex-col gap-16 text-center" }, [
212
+ /* @__PURE__ */ o("div", { class: "fm-typo-en-title-sm-800" }, "Create customer segments"),
213
+ /* @__PURE__ */ o("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Segments allow you to categorize your customers based on various criteria, enabling targeted marketing and personalized experiences. ")
214
+ ], -1), Qe = /* @__PURE__ */ A({
215
+ __name: "Segment",
216
+ setup(D) {
217
+ const { minor: y } = te, x = me(), v = I(0), r = [
218
+ {
219
+ header: "Name",
220
+ accessorFn: (t) => t.name
221
+ },
222
+ {
223
+ header: "Total Customers in this Segment",
224
+ accessorFn: (t) => t.memberCount ?? 0
225
+ },
226
+ {
227
+ header: "% of customers",
228
+ accessorFn: (t) => ((t.memberCount ?? 0) * 100 / v.value).toFixed(2)
229
+ },
230
+ {
231
+ header: "Actions",
232
+ meta: {
233
+ maxWidth: "100px"
234
+ },
235
+ cell(t) {
236
+ return R("div", { class: "flex items-center justify-end" }, [
237
+ R(
238
+ L.FmMenu,
239
+ {
240
+ placement: "bottom-end",
241
+ onClick: (s) => {
242
+ s.stopPropagation();
243
+ }
244
+ },
245
+ {
246
+ "menu-button": () => R(L.FmButton, {
247
+ icon: "more_vert",
248
+ iconColor: "neutral-gray-400",
249
+ variant: "tertiary"
250
+ }),
251
+ default: () => [
252
+ R(
253
+ L.FmMenuItem,
254
+ {
255
+ onClick: async (s) => {
256
+ s.stopPropagation(), w(t.row.original);
257
+ }
258
+ },
259
+ {
260
+ label: R(
261
+ "div",
262
+ {
263
+ class: "text-fm-color-typo-error fm-typo-en-body-md-400"
264
+ },
265
+ "Remove"
266
+ )
267
+ }
268
+ )
269
+ ]
270
+ }
271
+ )
272
+ ]);
273
+ }
274
+ }
275
+ ], m = I(null), { tableMeta: d, rowData: g, debouncedFetchData: a } = H(
276
+ k.readAll
277
+ );
278
+ async function n() {
279
+ await y(
280
+ async () => {
281
+ await k.refreshSegments(), await a({ pageSize: 10, pageIndex: 0 });
282
+ },
283
+ { message: "Refreshing segmentations" }
284
+ );
285
+ }
286
+ async function w(t) {
287
+ await ee.remove(`Are you sure you want to remove ${t.name}?`) && await y(
288
+ async () => {
289
+ await k.delete(t._id), await a({ pageSize: 10, pageIndex: 0 });
290
+ },
291
+ {
292
+ message: `Removing ${t.name}`,
293
+ successMessage: `Removed ${t.name} successfully`
294
+ }
295
+ );
296
+ }
297
+ async function F(t) {
298
+ await y(
299
+ async () => {
300
+ var s;
301
+ if (t._id) {
302
+ const { members: f, _id: l, ...h } = t;
303
+ await k.update(t._id, h);
304
+ } else
305
+ await k.create(t);
306
+ await a({ pageSize: 10, pageIndex: 0 }), (s = m.value) == null || s.hideSheet();
307
+ },
308
+ {
309
+ message: "Saving segment",
310
+ successMessage: "Segment saved"
311
+ }
312
+ );
313
+ }
314
+ function C(t) {
315
+ var s;
316
+ (s = m.value) == null || s.showSheet(t);
317
+ }
318
+ const Y = j(() => x.isPremium ? [
319
+ {
320
+ label: "Refresh segments",
321
+ value: "refresh"
322
+ },
323
+ {
324
+ label: "Add segment",
325
+ value: "add",
326
+ isPrimary: !0,
327
+ prependIcon: "add"
328
+ }
329
+ ] : []);
330
+ return K(async () => {
331
+ const { meta: t } = await de.read({
332
+ limit: 1,
333
+ skip: 0,
334
+ sortBy: "_id",
335
+ search: void 0,
336
+ descending: !1
337
+ });
338
+ v.value = t.totalResources ?? 0, await a({ pageSize: 10, pageIndex: 0 }), await x.readPremium();
339
+ }), (t, s) => {
340
+ const f = p("FmPill"), l = p("FmPageHead"), h = p("FmIcon"), z = p("FmMenuItem"), S = p("FmMenu"), $ = p("FmListItem"), T = p("FmList"), Z = p("FmButton"), q = p("FmCard");
341
+ return c(), b(P, null, [
342
+ i(l, {
343
+ title: "Segments",
344
+ actions: e(Y),
345
+ "onClick:action": s[0] || (s[0] = (u) => u === "add" ? C() : n())
346
+ }, {
347
+ title: _(() => [
348
+ o("div", Re, [
349
+ Ie,
350
+ i(f, { variant: "premium" })
351
+ ])
352
+ ]),
353
+ _: 1
354
+ }, 8, ["actions"]),
355
+ o("div", Pe, [
356
+ e(g).length > 0 || e(d).searchValue || e(d).isLoading ? (c(), b(P, { key: 0 }, [
357
+ i(O, {
358
+ loading: e(d).isLoading,
359
+ "row-data": e(g),
360
+ "row-count": e(d).totalRows,
361
+ "column-defs": r,
362
+ "shrink-at": !1,
363
+ "page-count": e(d).pageCount,
364
+ "page-index": e(d).pageIndex,
365
+ "page-size": e(d).pageSize,
366
+ onRowClick: s[1] || (s[1] = (u) => {
367
+ C(u.original);
368
+ }),
369
+ onPageChange: e(a)
370
+ }, null, 8, ["loading", "row-data", "row-count", "page-count", "page-index", "page-size", "onPageChange"]),
371
+ i(T, { class: "w-full hidden xs:block" }, {
372
+ default: _(() => [
373
+ (c(!0), b(P, null, Q(e(g), (u) => (c(), B($, {
374
+ key: u._id.toString(),
375
+ tag: "label",
376
+ onClick: (N) => C(u)
377
+ }, {
378
+ default: _(() => [
379
+ o("div", null, [
380
+ o("div", Ve, M((u.memberCount ?? 0).toLocaleString()) + " total customers ", 1),
381
+ o("div", Be, M(u.name), 1),
382
+ o("div", De, M(((u.memberCount ?? 0) * 100 / e(v)).toFixed(2)) + "% of customers ", 1)
383
+ ])
384
+ ]),
385
+ append: _(() => [
386
+ i(S, { "stop-click-propagation": !0 }, {
387
+ "menu-button": _(() => [
388
+ i(h, { name: "more_vert" })
389
+ ]),
390
+ default: _(() => [
391
+ i(z, {
392
+ class: "text-fm-color-typo-error fm-typo-en-body-md-400",
393
+ label: "Remove",
394
+ "onUpdate:modelValue": (N) => N && w(u)
395
+ }, null, 8, ["onUpdate:modelValue"])
396
+ ]),
397
+ _: 2
398
+ }, 1024)
399
+ ]),
400
+ _: 2
401
+ }, 1032, ["onClick"]))), 128))
402
+ ]),
403
+ _: 1
404
+ })
405
+ ], 64)) : (c(), B(q, {
406
+ key: 1,
407
+ variant: "outlined",
408
+ class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
409
+ }, {
410
+ default: _(() => [
411
+ Ye,
412
+ ze,
413
+ i(Z, {
414
+ variant: "primary",
415
+ label: "Create segment",
416
+ disabled: !e(x).isPremium,
417
+ icon: "add",
418
+ onClick: s[2] || (s[2] = (u) => C())
419
+ }, null, 8, ["disabled"])
420
+ ]),
421
+ _: 1
422
+ })),
423
+ i($e, {
424
+ ref_key: "sheetRef",
425
+ ref: m,
426
+ "onUpdate:modelValue": F
427
+ }, null, 512)
428
+ ])
429
+ ], 64);
430
+ };
431
+ }
432
+ });
433
+ export {
434
+ Qe as default
435
+ };