@feedmepos/mf-connect 0.1.36-prod → 0.1.38-beta.1

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 (113) hide show
  1. package/dist/Analytic-O-qZWrFp.js +761 -0
  2. package/dist/{App-JwvQzmaf.js → App-BWZ2EE71.js} +364 -352
  3. package/dist/AuditLogs-DlmcFEta.js +1887 -0
  4. package/dist/{Bin-Boq091DE.js → Bin-C-Ha-4yF.js} +8 -8
  5. package/dist/{Broadcast-D7BIjPzg.js → Broadcast-Bo3QS8lS.js} +27 -25
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-ZFe69JWe.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-4vUMzH-l.js} +18 -18
  7. package/dist/{Card-C7v8otBk.js → Card-Bs1TDE0e.js} +159 -159
  8. package/dist/{Collections-C_pyDZJp.js → Collections-Dy5RN7Js.js} +103 -91
  9. package/dist/{Credit-B6I7vIo2.js → Credit-Bqc4dw1s.js} +74 -74
  10. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-BUzUIIUW.js +58 -0
  11. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-DHQBxqsk.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-D6AmN3o3.js} +490 -488
  12. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-cqK2WTuO.js → EffectSheet.vue_vue_type_style_index_0_lang-BzwADnKp.js} +91 -89
  13. package/dist/{Experience-RU6iI7eH.js → Experience-C2e2T7B-.js} +42 -42
  14. package/dist/{FilterChip.vue_vue_type_script_setup_true_lang-BrPLkFX8.js → FilterChip.vue_vue_type_script_setup_true_lang-d8rh38tD.js} +2 -6
  15. package/dist/{Game-B9Ojuamc.js → Game-C86eEhcx.js} +32 -32
  16. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js +144 -0
  17. package/dist/{Index-Dv-YN9YC.js → Index-BRGweFco.js} +10 -10
  18. package/dist/Marketing-CnnrnXbS.js +20073 -0
  19. package/dist/{Member-BX81V3ON.js → Member-B3o0Zhcw.js} +76 -76
  20. package/dist/MemberList-BpE1IjED.js +1606 -0
  21. package/dist/MemberOverview-wL_ailso.js +58 -0
  22. package/dist/{MemberTransactions-C0FinB5E.js → MemberTransactions-C4hao-d9.js} +1 -1
  23. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DZS17c8D.js → MessageInput.vue_vue_type_script_setup_true_lang-D9zfmqLs.js} +36 -36
  24. package/dist/{Mission-BV76Qq3Y.js → Mission-BURXfzjd.js} +21 -21
  25. package/dist/{Overview-CMK4VRZl.js → Overview-D_hrrM4O.js} +335 -335
  26. package/dist/{Point-CQWKh1jv.js → Point-CJXkJY5Q.js} +43 -41
  27. package/dist/Promotion-CunJrh42.js +289 -0
  28. package/dist/{Queue-CFNfJSux.js → Queue-v5Itg9J4.js} +52 -52
  29. package/dist/{Record-7_ssnQnB.js → Record-DJe4tg9R.js} +9 -9
  30. package/dist/{Reward-DOe1Tn2f.js → Reward-Y9aHpny5.js} +173 -173
  31. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-BsgR-dCL.js → RewardGroup.vue_vue_type_script_setup_true_lang-1KAjCblO.js} +11 -11
  32. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-BPw5L06B.js → RuleGroup.vue_vue_type_script_setup_true_lang-Cr99ikbK.js} +635 -548
  33. package/dist/Segment-DVT8uDn8.js +882 -0
  34. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-DPsLdEU8.js → SelectItems.vue_vue_type_script_setup_true_lang-BhJ-oVMb.js} +2 -2
  35. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-BAJLRxOM.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-b5bjfBvc.js} +11 -11
  36. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-DUUzFkIc.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-DoKAgSLE.js} +3 -3
  37. package/dist/{Setting-Bojfmtwf.js → Setting-BU5778gG.js} +432 -432
  38. package/dist/{Store-dfiUtq-f.js → Store-IWg0POAU.js} +211 -211
  39. package/dist/StoreRewards-CIjHcVoh.js +423 -0
  40. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-Cx05-OPF.js +1029 -0
  41. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-D8ey57Te.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-BcOvr526.js} +1 -1
  42. package/dist/{Tier-BIDShXJ6.js → Tier-iN30KD7g.js} +107 -107
  43. package/dist/{Title-CDdkVwEu.js → Title-Duh_Srek.js} +133 -131
  44. package/dist/{Transaction-lAUnd1c_.js → Transaction-DLBA7Svl.js} +2 -2
  45. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-BwaD8Nwy.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-DLD5d43d.js} +6 -6
  46. package/dist/{Voucher-BARDbixZ.js → Voucher-cTvlMN0Y.js} +153 -123
  47. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-DkjojUvD.js +419 -0
  48. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CIk3GKLH.js → ZodTextField.vue_vue_type_script_setup_true_lang-C5S-bi5J.js} +1 -1
  49. package/dist/{app-Cq8zUKBx.js → app-A3oEKLq5.js} +1 -1
  50. package/dist/{app-KtD-iU16.js → app-De-yQ1CJ.js} +164 -125
  51. package/dist/app.js +4 -3
  52. package/dist/business-B2JBpm4y.js +79 -0
  53. package/dist/{campaign-NqTts9bj.js → campaign-Bhur0NJx.js} +9 -9
  54. package/dist/{campaign-DwArKZ1r.js → campaign-vkzui6F2.js} +5 -3
  55. package/dist/{campaign.enum-DQayyk1f.js → campaign.enum-DCYkKGhd.js} +1 -1
  56. package/dist/{campaign.fn-6uf_Z5m1.js → campaign.fn--affTEi5.js} +161 -161
  57. package/dist/{collectible.enum-CgjtJh8V.js → collectible.enum-CLBCnfev.js} +1 -1
  58. package/dist/{collection.fn-DuqcY399.js → collection.fn-bA8q0KYy.js} +2 -2
  59. package/dist/{dto-CQRn2lAW.js → dto-RCcWeYE0.js} +4 -4
  60. package/dist/{effect-B-sUUnjd.js → effect-D7qRfPe_.js} +1 -1
  61. package/dist/{email-addresses-D-kPsNBn.js → email-addresses-a8PqViID.js} +1 -1
  62. package/dist/{export-B28oHptg.js → export-BneqNRn4.js} +3 -3
  63. package/dist/{helper-DuBp_oW-.js → helper-DfvvxOyO.js} +1 -1
  64. package/dist/{index-CCNfzZ5t.js → index-2LpkG8Ye.js} +1 -1
  65. package/dist/{index-C2wsUy05.js → index-4kMeSNTr.js} +11447 -10969
  66. package/dist/{index-BgdUU6Za.js → index-B0T9GDIZ.js} +1 -1
  67. package/dist/{index-CczG_ilB.js → index-BWTvsoH0.js} +1 -1
  68. package/dist/index-CMBPIb8x.js +32260 -0
  69. package/dist/{index-DF4V4vur.js → index-CTKMdxSm.js} +1 -1
  70. package/dist/index-CVAWGMus.js +56 -0
  71. package/dist/index-CbsJ6vMJ.js +31 -0
  72. package/dist/{index-CSWnS__O.js → index-CrFUhsZO.js} +1 -1
  73. package/dist/index-CsaQJMAR.js +66 -0
  74. package/dist/{index-CmOaBe_x.js → index-CtDqXnOp.js} +535 -460
  75. package/dist/{index-CECYN1oL.js → index-D0GnMoag.js} +181 -79
  76. package/dist/{index-BCslSeGm.js → index-DMrIQqFt.js} +1 -1
  77. package/dist/{index-BZYbNzed.js → index-DeXvASjP.js} +3 -3
  78. package/dist/{index-CUdis4Jl.js → index-y-7yUm2e.js} +10 -9
  79. package/dist/{index.esm2017-CVwbgLS0.js → index.esm2017-JtyypweZ.js} +127 -127
  80. package/dist/{loading-C-BSh5_w.js → loading-a-FqrwqI.js} +1 -1
  81. package/dist/{membership-BPpTsVq5.js → membership-CGVtil5J.js} +3 -3
  82. package/dist/{money-BSxQcP_f.js → money-CTc1l_Cq.js} +1 -1
  83. package/dist/{number-p7RPdTQ7.js → number-W3R-0nYP.js} +1 -1
  84. package/dist/objectid-BU0Y8iAN.js +145 -0
  85. package/dist/{plugins-5mIceCPA.js → plugins-D2sSgTSl.js} +2 -2
  86. package/dist/remy-vue-client-Cpppk9h-.js +1693 -0
  87. package/dist/{reward-CaZY5kqg.js → reward-atP8vnNn.js} +1 -1
  88. package/dist/{rule-builder-yn_upY7a.js → rule-builder-BB29ZJ_C.js} +17 -17
  89. package/dist/{rule-DB6XK-iD.js → rule-eA5IvnjB.js} +3 -3
  90. package/dist/style.css +1 -1
  91. package/dist/{template-DbmV0nWD.js → template-DhBeDaAm.js} +64 -64
  92. package/dist/{trigger-DPl3HG2o.js → trigger-Bq_pZj1J.js} +7 -7
  93. package/dist/{usePagination-JoYaROkV.js → usePagination-BeF5K3M7.js} +85 -85
  94. package/dist/{user-DzwHXhvX.js → user-B-bhVFIG.js} +1 -1
  95. package/dist/{vue-i18n-BnN9jlFK.js → vue-i18n-D-h8VDSx.js} +343 -343
  96. package/dist/{xlsx-CrsYUgcS.js → xlsx-DsByAcZl.js} +226 -226
  97. package/package.json +5 -3
  98. package/dist/Analytic-C1LCniPD.js +0 -427
  99. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-ByhTB9Ie.js +0 -144
  100. package/dist/Marketing-CFgCJV0g.js +0 -317
  101. package/dist/MemberList-BjX8ND1p.js +0 -1606
  102. package/dist/MemberOverview-C2n9oJZh.js +0 -58
  103. package/dist/Promotion-CnFaEvhL.js +0 -255
  104. package/dist/Segment-DUP0JWK5.js +0 -882
  105. package/dist/StoreRewards-DJj-oM2n.js +0 -423
  106. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-oRUpDbZ_.js +0 -995
  107. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-bDQs5ACo.js +0 -419
  108. package/dist/business-CFMUx5qO.js +0 -78
  109. package/dist/index-CuJ5OZqA.js +0 -29566
  110. package/dist/index-CuvNtC_M.js +0 -61
  111. package/dist/index-Dbd4WA4r.js +0 -61
  112. package/dist/index-mtAI1Gyn.js +0 -44
  113. package/dist/objectid-DkD1hn1F.js +0 -145
@@ -0,0 +1,882 @@
1
+ import { defineComponent as ee, ref as z, resolveComponent as b, openBlock as p, createElementBlock as k, createElementVNode as l, createVNode as r, unref as t, createCommentVNode as le, withCtx as E, Fragment as O, renderList as ie, createBlock as J, toDisplayString as $, normalizeClass as re, onMounted as Se, computed as ce, isRef as Ie, createSlots as Me, h as Y, onBeforeMount as Te } from "vue";
2
+ import { _ as Ee } from "./campaign-CpzFl8Vr.js";
3
+ import { p as Ae } from "./plugins-D2sSgTSl.js";
4
+ import { u as De } from "./loading-a-FqrwqI.js";
5
+ import { FmButtonVariant as ae, useSnackbar as Re, components as X } from "@feedmepos/ui-library";
6
+ import { u as we, _ as be } from "./usePagination-BeF5K3M7.js";
7
+ import { u as Fe } from "./vue-i18n-D-h8VDSx.js";
8
+ import "./index-D0GnMoag.js";
9
+ import { i as $e, j as R, c as fe } from "./index-CtDqXnOp.js";
10
+ import "./index-y-7yUm2e.js";
11
+ import "./index-B0T9GDIZ.js";
12
+ import "./index-DeXvASjP.js";
13
+ import { u as ne, w as he } from "./xlsx-DsByAcZl.js";
14
+ import { e as Pe, M as Be } from "./email-addresses-a8PqViID.js";
15
+ import { Z as Ne } from "./zod-Bg2FbC-D.js";
16
+ import { u as Ve } from "./app-wDQR6dpb.js";
17
+ import { F as ye, z as Ye } from "./index-CMBPIb8x.js";
18
+ import { R as ge } from "./rule-builder-BB29ZJ_C.js";
19
+ import { _ as Ue } from "./ZodTextField.vue_vue_type_script_setup_true_lang-C5S-bi5J.js";
20
+ import { _ as Le } from "./RuleGroup.vue_vue_type_script_setup_true_lang-Cr99ikbK.js";
21
+ import { u as ze, v as Oe, w as je } from "./index.esm2017-JtyypweZ.js";
22
+ import { F as qe } from "./FileSaver.min-NlMItPOc.js";
23
+ import { h as H } from "./moment-BWErdI6_.js";
24
+ import { s as B, u as Ge } from "./membership-CGVtil5J.js";
25
+ import { o as He } from "./objectId-dwaoBfJX.js";
26
+ import { u as Ce } from "./business-B2JBpm4y.js";
27
+ import { f as Je } from "./number-W3R-0nYP.js";
28
+ import { t as Qe } from "./money-CTc1l_Cq.js";
29
+ import "./index-CrFUhsZO.js";
30
+ import { useRouter as We } from "vue-router";
31
+ import { m as ve } from "./index-DMrIQqFt.js";
32
+ import { R as _e } from "./app-De-yQ1CJ.js";
33
+ const Ze = $e.extend({
34
+ _id: ye.optional(),
35
+ business: ye.optional(),
36
+ file: Ye.any().nullish()
37
+ });
38
+ var Ke = { firebase: { apiKey: "AIzaSyAj8JdCHtP0Vc5vZobCfgoLzWxPIn0WUG4", authDomain: "feedme-dev-4c3ef.firebaseapp.com", databaseURL: "https://feedme-dev-4c3ef.firebaseio.com", projectId: "feedme-dev-4c3ef", storageBucket: "feedme-dev-4c3ef.appspot.com", messagingSenderId: "458797803788", appId: "1:458797803788:web:37f2af2926a84288f0c129", measurementId: "G-J2QG09D2Q7" }, assetBucketUrl: "feedme-dev-4c3ef.appspot.com", importFilesBucketUrl: "feedme-dev-4c3ef.appspot.com", clientId: "1a362d621873497b277ea55258cc82594ba148d235257f7bd44ea2acc132d8a4" };
39
+ const Xe = { class: "flex flex-col space-y-16" }, et = {
40
+ key: 0,
41
+ class: /* @__PURE__ */ re([
42
+ "p-16 pl-24 space-x-8",
43
+ "bg-fm-color-primary-oats rounded-lg",
44
+ "flex items-center",
45
+ "justify-between"
46
+ ])
47
+ }, tt = { class: "flex justify-end" }, ot = {
48
+ key: 1,
49
+ class: /* @__PURE__ */ re([
50
+ "flex items-center",
51
+ "border border-fm-color-neutral-gray-300",
52
+ "p-16 space-x-16 rounded-md"
53
+ ])
54
+ }, at = { class: "fm-typo-en-body-lg-400 flex-1 truncate" }, nt = /* @__PURE__ */ ee({
55
+ __name: "ImportSegment",
56
+ props: {
57
+ importFile: {}
58
+ },
59
+ emits: ["update:file"],
60
+ setup(e, { emit: _ }) {
61
+ const x = e, h = _, { t: m } = Fe(), y = z(null), f = z(null), F = ["Id"], i = [
62
+ {
63
+ label: "CSV",
64
+ icon: "csv",
65
+ value: "csv"
66
+ },
67
+ {
68
+ label: "Excel",
69
+ icon: "description",
70
+ value: "xlsx"
71
+ }
72
+ ];
73
+ async function n() {
74
+ if (x.importFile)
75
+ try {
76
+ const S = ze(void 0, Ke.importFilesBucketUrl), g = Oe(S, x.importFile), w = await je(g);
77
+ window.open(w, "_blank");
78
+ } catch (S) {
79
+ console.log(S);
80
+ }
81
+ }
82
+ async function c(S) {
83
+ switch (S) {
84
+ case "csv":
85
+ const g = new Blob([F.join(",")], {
86
+ type: "text/csv;charset=utf-8;"
87
+ });
88
+ qe.saveAs(g, "ImportSegmentTemplate.csv");
89
+ break;
90
+ case "xlsx":
91
+ const w = ne.aoa_to_sheet([F]), I = ne.book_new();
92
+ ne.book_append_sheet(I, w, "Sheet1"), he(I, "ImportSegmentTemplate.xlsx");
93
+ break;
94
+ }
95
+ }
96
+ function C(S) {
97
+ y.value = S, h("update:file", y.value);
98
+ }
99
+ function A(S) {
100
+ var w, I;
101
+ const g = ((I = (w = S.target) == null ? void 0 : w.files) == null ? void 0 : I[0]) ?? null;
102
+ C(g);
103
+ }
104
+ return (S, g) => {
105
+ const w = b("FmButton"), I = b("FmMenuItem"), u = b("FmMenu"), s = b("FmDropField");
106
+ return p(), k("div", Xe, [
107
+ g[2] || (g[2] = l("div", { class: "fm-typo-en-title-sm-800" }, "Upload File", -1)),
108
+ S.importFile ? (p(), k("div", et, [
109
+ r(w, {
110
+ label: t(m)("View uploaded file"),
111
+ variant: t(ae).Plain,
112
+ icon: "file_present",
113
+ onClick: n
114
+ }, null, 8, ["label", "variant"])
115
+ ])) : le("", !0),
116
+ l("div", null, [
117
+ l("div", tt, [
118
+ r(u, { class: "" }, {
119
+ "menu-button": E(() => [
120
+ r(w, {
121
+ variant: "tertiary",
122
+ icon: "download",
123
+ label: "Download Template"
124
+ })
125
+ ]),
126
+ default: E(() => [
127
+ (p(), k(O, null, ie(i, (v) => r(I, {
128
+ key: v.value,
129
+ icon: v.icon,
130
+ label: v.label,
131
+ onClick: (U) => c(v.value),
132
+ selectable: ""
133
+ }, null, 8, ["icon", "label", "onClick"])), 64))
134
+ ]),
135
+ _: 1
136
+ })
137
+ ]),
138
+ y.value ? (p(), k("div", ot, [
139
+ r(w, {
140
+ variant: t(ae).Tertiary,
141
+ "prepend-icon": "attach_file"
142
+ }, null, 8, ["variant"]),
143
+ l("p", at, $(y.value.name), 1),
144
+ l("label", {
145
+ ref_key: "fileLabelRef",
146
+ ref: f,
147
+ htmlFor: "file"
148
+ }, [
149
+ r(w, {
150
+ variant: t(ae).Plain,
151
+ label: t(m)("Replace File"),
152
+ onClick: g[1] || (g[1] = () => {
153
+ var v;
154
+ return (v = f.value) == null ? void 0 : v.click();
155
+ })
156
+ }, null, 8, ["variant", "label"]),
157
+ l("input", {
158
+ id: "file",
159
+ accept: ".csv",
160
+ class: "hidden",
161
+ type: "file",
162
+ multiple: "",
163
+ onChange: A
164
+ }, null, 32)
165
+ ], 512)
166
+ ])) : (p(), J(s, {
167
+ key: 0,
168
+ onFileUpload: g[0] || (g[0] = (v) => C(v)),
169
+ accept: ".csv, .xlsx",
170
+ "max-file-size": 2e7
171
+ }))
172
+ ])
173
+ ]);
174
+ };
175
+ }
176
+ }), st = { class: "space-y-16 pr-12" }, lt = { class: "fm-typo-en-title-md-800" }, it = { class: "flex space-x-8" }, rt = { class: "fm-typo-en-title-md-800 text-fm-color-primary" }, ct = { class: "text-fm-color-typo-secondary" }, dt = /* @__PURE__ */ ee({
177
+ __name: "ReviewSegment",
178
+ props: {
179
+ title: {},
180
+ segment: {}
181
+ },
182
+ setup(e) {
183
+ const _ = e, x = [
184
+ {
185
+ header: "Name",
186
+ accessorFn: (n) => n.name
187
+ },
188
+ {
189
+ header: "Id",
190
+ accessorFn: (n) => n._id
191
+ },
192
+ {
193
+ header: "Customer Since",
194
+ accessorFn: (n) => H(He(n._id.toString())).format("DD MMM YYYY")
195
+ },
196
+ {
197
+ header: "Phone",
198
+ accessorFn: (n) => n.phoneNumber
199
+ },
200
+ {
201
+ header: "Birthday",
202
+ accessorFn: (n) => H(n.birthday).format("DD MMM YYYY")
203
+ },
204
+ {
205
+ header: "Last Visit",
206
+ accessorFn: (n) => H(n.stats.lastVisit).format("DD MMM YYYY")
207
+ }
208
+ ];
209
+ async function h(n) {
210
+ return _.segment._id ? (console.log(n), await B.paginateSegmentUsers(
211
+ _.segment._id,
212
+ n
213
+ )) : {
214
+ resources: [],
215
+ meta: {
216
+ totalResources: 0,
217
+ totalPages: 0,
218
+ skip: n.skip,
219
+ limit: n.limit,
220
+ sortBy: n.sortBy
221
+ }
222
+ };
223
+ }
224
+ const { tableMeta: m, rowData: y, onSort: f, debouncedFetchData: F, onSearch: i } = we(h);
225
+ return Se(async () => {
226
+ await F();
227
+ }), (n, c) => (p(), k("div", st, [
228
+ l("div", lt, $(_.title), 1),
229
+ l("div", it, [
230
+ l("div", rt, $(n.segment.members.length), 1),
231
+ l("div", ct, [
232
+ c[1] || (c[1] = l("div", null, "contacts in your segment", -1)),
233
+ l("div", null, "as of " + $(t(H)(n.segment.lastUpdated).format("DD MMM YYYY")), 1)
234
+ ])
235
+ ]),
236
+ r(be, {
237
+ loading: t(m).isLoading,
238
+ "row-data": t(y),
239
+ "row-count": t(m).totalRows,
240
+ "column-defs": x,
241
+ "page-size": t(m).pageSize,
242
+ "page-count": t(m).pageCount,
243
+ "page-index": t(m).pageIndex,
244
+ onSortChange: t(f),
245
+ onPageChange: c[0] || (c[0] = (C) => t(F)({ pageSize: C.pageSize, pageIndex: C.pageIndex }))
246
+ }, null, 8, ["loading", "row-data", "row-count", "page-size", "page-count", "page-index", "onSortChange"])
247
+ ]));
248
+ }
249
+ }), ut = { class: "space-y-24" }, pt = { class: "grid grid-cols-2 gap-16" }, mt = { class: "fm-typo-en-title-sm-800" }, ft = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, yt = /* @__PURE__ */ ee({
250
+ __name: "SegmentTypeOption",
251
+ props: {
252
+ modelValue: {},
253
+ errorText: {}
254
+ },
255
+ emits: ["update:model-value"],
256
+ setup(e, { emit: _ }) {
257
+ const x = e, h = _, m = [
258
+ {
259
+ label: "Dynamic",
260
+ sublabel: "Segment statistics are based on rules configured and will be recalculated automatically when rule changes.",
261
+ value: R.enum.DYNAMIC
262
+ },
263
+ {
264
+ label: "Static",
265
+ sublabel: "Segment statistics are based on imported data and will not be recalculated.",
266
+ value: R.enum.STATIC
267
+ }
268
+ ];
269
+ function y(f) {
270
+ f !== x.modelValue && h("update:model-value", f);
271
+ }
272
+ return (f, F) => {
273
+ const i = b("FmCard"), n = b("FmHelperText");
274
+ return p(), k("div", ut, [
275
+ l("div", pt, [
276
+ (p(), k(O, null, ie(m, (c) => r(i, {
277
+ variant: "outlined",
278
+ class: re(["p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-2", {
279
+ "col-span-2": m.length == 1,
280
+ "border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": f.modelValue === c.value,
281
+ "hover:bg-fm-color-opacity-sm": f.modelValue !== c.value
282
+ }]),
283
+ onClick: (C) => y(c.value),
284
+ key: c.value
285
+ }, {
286
+ default: E(() => [
287
+ l("div", mt, $(c.label), 1),
288
+ l("div", ft, $(c.sublabel), 1)
289
+ ]),
290
+ _: 2
291
+ }, 1032, ["class", "onClick"])), 64))
292
+ ]),
293
+ f.errorText ? (p(), J(n, {
294
+ key: 0,
295
+ class: "!mt-4",
296
+ text: f.errorText,
297
+ state: "error"
298
+ }, null, 8, ["text"])) : le("", !0)
299
+ ]);
300
+ };
301
+ }
302
+ }), gt = { class: "flex items-center gap-x-8" }, vt = {
303
+ key: 0,
304
+ class: "space-y-16 pr-12"
305
+ }, _t = { class: "flex flex-col space-y-16" }, xt = {
306
+ key: 0,
307
+ class: "flex flex-col space-y-16"
308
+ }, St = {
309
+ key: 1,
310
+ class: "flex flex-col space-y-16"
311
+ }, wt = {
312
+ key: 2,
313
+ class: "flex flex-col space-y-16"
314
+ }, bt = { class: "flex items-center gap-8" }, Ft = /* @__PURE__ */ ee({
315
+ __name: "SegmentSheet",
316
+ emits: ["update:model-value"],
317
+ setup(e, { expose: _, emit: x }) {
318
+ const h = Ve(), m = z(!1), y = z(!1), f = {
319
+ name: "",
320
+ isActive: !0,
321
+ type: R.enum.DYNAMIC,
322
+ rule: ge.scaffoldGroup(),
323
+ members: []
324
+ }, F = Ze, i = z(f), n = ce(() => {
325
+ const u = F.safeParse(i.value);
326
+ return u.success ? [] : u.error.errors;
327
+ });
328
+ function c(u) {
329
+ m.value = !0, y.value = !1, u ? i.value = {
330
+ ...u,
331
+ isActive: u.isActive !== !1,
332
+ type: u.type ?? (u.importFile ? R.enum.STATIC : R.enum.DYNAMIC)
333
+ } : i.value = { ...f };
334
+ }
335
+ function C() {
336
+ m.value = !1;
337
+ }
338
+ async function A() {
339
+ F.safeParse(i.value).success && (y.value = !0);
340
+ }
341
+ function S() {
342
+ y.value = !1;
343
+ }
344
+ async function g() {
345
+ i.value.type === R.enum.STATIC ? (i.value.rule = ge.scaffoldGroup(), i.value.isActive = !0) : i.value.file = void 0, I("update:model-value", i.value);
346
+ }
347
+ async function w(u) {
348
+ i.value.type = u;
349
+ }
350
+ Se(async () => {
351
+ });
352
+ const I = x;
353
+ return _({
354
+ showSheet: c,
355
+ hideSheet: C
356
+ }), (u, s) => {
357
+ const v = b("FmButton"), U = b("FmSwitch"), a = b("FmSideSheet");
358
+ return p(), J(a, {
359
+ modelValue: t(m),
360
+ "onUpdate:modelValue": s[8] || (s[8] = (o) => Ie(m) ? m.value = o : null),
361
+ header: "Add segment",
362
+ "dismiss-away": "",
363
+ "close-button": !0,
364
+ "max-width": 1100
365
+ }, Me({
366
+ "side-sheet-footer": E(() => [
367
+ l("div", bt, [
368
+ t(y) || t(i).type === t(R).enum.STATIC ? (p(), k(O, { key: 0 }, [
369
+ r(v, {
370
+ label: "Save Segment",
371
+ onClick: g,
372
+ loading: t(h).isLoading,
373
+ disabled: t(n).length > 0 || t(h).isLoading
374
+ }, null, 8, ["loading", "disabled"]),
375
+ r(v, {
376
+ label: "Cancel",
377
+ onClick: s[6] || (s[6] = (o) => S()),
378
+ variant: "tertiary"
379
+ })
380
+ ], 64)) : (p(), k(O, { key: 1 }, [
381
+ r(v, {
382
+ label: "Review Segment",
383
+ disabled: t(n).length > 0 || t(h).isLoading,
384
+ onClick: A
385
+ }, null, 8, ["disabled"]),
386
+ r(v, {
387
+ label: "Cancel",
388
+ onClick: s[7] || (s[7] = (o) => C()),
389
+ variant: "tertiary"
390
+ })
391
+ ], 64))
392
+ ])
393
+ ]),
394
+ default: E(() => {
395
+ var o;
396
+ return [
397
+ t(y) ? (p(), J(dt, {
398
+ key: 1,
399
+ title: t(i).name,
400
+ segment: t(i)
401
+ }, null, 8, ["title", "segment"])) : (p(), k("div", vt, [
402
+ r(Ue, {
403
+ modelValue: t(i).name,
404
+ "onUpdate:modelValue": s[1] || (s[1] = (d) => t(i).name = d),
405
+ label: "Segment title",
406
+ schema: t(Ne).typeAtPath(t(F), "name")
407
+ }, null, 8, ["modelValue", "schema"]),
408
+ l("div", _t, [
409
+ s[10] || (s[10] = l("div", { class: "fm-typo-en-title-sm-800" }, "Segment Type", -1)),
410
+ r(yt, {
411
+ "model-value": t(i).type,
412
+ "onUpdate:modelValue": s[2] || (s[2] = (d) => {
413
+ w(d);
414
+ })
415
+ }, null, 8, ["model-value"])
416
+ ]),
417
+ t(i).type === t(R).enum.DYNAMIC ? (p(), k("div", xt, [
418
+ s[11] || (s[11] = l("div", { class: "fm-typo-en-title-sm-800" }, "Segment Filter", -1)),
419
+ r(Le, {
420
+ "trigger-type": "MEMBERSHIP_JOINED",
421
+ includeOnly: "user",
422
+ "model-value": (o = t(i)) == null ? void 0 : o.rule,
423
+ "onUpdate:modelValue": s[3] || (s[3] = (d) => {
424
+ t(i).rule = d;
425
+ })
426
+ }, null, 8, ["model-value"])
427
+ ])) : (p(), k("div", St, [
428
+ r(nt, {
429
+ importFile: t(i).importFile,
430
+ "onUpdate:file": s[4] || (s[4] = (d) => {
431
+ t(i).file = d;
432
+ })
433
+ }, null, 8, ["importFile"])
434
+ ])),
435
+ t(i).type === t(R).enum.DYNAMIC ? (p(), k("div", wt, [
436
+ s[12] || (s[12] = l("div", { class: "fm-typo-en-title-sm-800" }, "Segment Status", -1)),
437
+ r(U, {
438
+ "model-value": t(i).isActive ?? !0,
439
+ "onUpdate:modelValue": s[5] || (s[5] = (d) => t(i).isActive = d),
440
+ label: "Active",
441
+ sublabel: "When enabled, this will recalculate the segment statistics daily.",
442
+ "label-placement": "right"
443
+ }, null, 8, ["model-value"])
444
+ ])) : le("", !0)
445
+ ]))
446
+ ];
447
+ }),
448
+ _: 2
449
+ }, [
450
+ t(y) ? {
451
+ name: "side-sheet-header",
452
+ fn: E(() => [
453
+ l("div", gt, [
454
+ r(v, {
455
+ icon: "arrow_back",
456
+ variant: "tertiary",
457
+ onClick: s[0] || (s[0] = (o) => y.value = !1)
458
+ }),
459
+ s[9] || (s[9] = l("div", null, "Review segment", -1))
460
+ ])
461
+ ]),
462
+ key: "0"
463
+ } : void 0
464
+ ]), 1032, ["modelValue"]);
465
+ };
466
+ }
467
+ }), xe = Ge(), ht = Ce();
468
+ function se(e) {
469
+ const _ = H(e);
470
+ return _.isValid() ? _.format("DD/MM/YYYY") : "";
471
+ }
472
+ const Ct = {
473
+ mapMemberExportRow: (e) => {
474
+ var n, c, C, A, S, g, w, I, u, s, v, U, a, o, d, P, D, N, V, j, q, G, te, M, Q, de, ue, pe;
475
+ const _ = ce(() => ht.locations.map((T) => ({
476
+ label: T.name,
477
+ value: T._id
478
+ }))), x = (n = Pe.parseOneAddress(
479
+ e == null ? void 0 : e.email
480
+ )) != null && n.domain.includes("feedmepos.com") ? void 0 : e.email, h = (C = ((c = e == null ? void 0 : e.collection) == null ? void 0 : c.TITLE) || []) == null ? void 0 : C.reduce(
481
+ (T, L) => {
482
+ var Z, K;
483
+ const W = (K = (Z = xe.sortedTitles) == null ? void 0 : Z.find(
484
+ (oe) => oe._id === L.collectible
485
+ )) == null ? void 0 : K.name;
486
+ return !W || L.balance <= 0 || T.push(W), T;
487
+ },
488
+ []
489
+ ), m = (xe.sortedTitles || []).reduce(
490
+ (T, L) => {
491
+ var Z, K, oe, me;
492
+ const W = (me = (oe = (K = (((Z = e == null ? void 0 : e.collection) == null ? void 0 : Z.TITLE) || []).find(
493
+ (ke) => ke.collectible === L._id
494
+ )) == null ? void 0 : K.expiryBalance) == null ? void 0 : oe[0]) == null ? void 0 : me.expiredAt;
495
+ return T[L.name] = W ? H(W).format("DD/MM/YYYY") : "", T;
496
+ },
497
+ {}
498
+ ), y = ((g = (S = (A = e.collection) == null ? void 0 : A.CREDIT) == null ? void 0 : S.at(0)) == null ? void 0 : g.balance) || 0, f = ((s = (u = (I = (w = e.collection) == null ? void 0 : w.CREDIT) == null ? void 0 : I.at(0)) == null ? void 0 : u.expiryBalance) == null ? void 0 : s.reduce(
499
+ (T, L) => T + L.amount,
500
+ 0
501
+ )) || 0, F = Je(y, 2);
502
+ return {
503
+ ID: e._id.toString(),
504
+ Name: ((v = e.name) == null ? void 0 : v.trim()) || "",
505
+ Phone: ((U = e == null ? void 0 : e.phoneNumber) == null ? void 0 : U.trim()) || "",
506
+ Email: x || "",
507
+ Gender: e.gender || "",
508
+ CardNo: e.cardNo || "",
509
+ Birthday: e != null && e.birthday ? se(e == null ? void 0 : e.birthday) : "",
510
+ Credit: parseFloat((Number(F) - Number(f)).toFixed(2)),
511
+ FreeCredit: Number(f.toFixed(2)),
512
+ TotalCredit: Number(F),
513
+ Exp: e != null && e.collection ? ((d = (o = (a = e.collection) == null ? void 0 : a.POINT) == null ? void 0 : o.at(0)) == null ? void 0 : d.balance) ?? 0 : 0,
514
+ Point: e != null && e.collection ? ((N = (D = (P = e.collection) == null ? void 0 : P.COIN) == null ? void 0 : D.at(0)) == null ? void 0 : N.balance) ?? 0 : 0,
515
+ Level: e != null && e.collection ? ((q = (j = (V = e.collection) == null ? void 0 : V.TIER) == null ? void 0 : j.at(0)) == null ? void 0 : q.balance) ?? 0 : 0,
516
+ Tier: e != null && e.collection ? ((M = (te = (G = e.collection) == null ? void 0 : G.TIER) == null ? void 0 : te.at(0)) == null ? void 0 : M.balance) ?? 0 : 0,
517
+ Titles: h.join(","),
518
+ ...m,
519
+ TotalTransaction: e.stats.visitCount,
520
+ AvgSpent: Qe(Number(e.stats.avgBillSize || 0)).toFormat(
521
+ !1
522
+ ),
523
+ TotalSpent: e.stats.avgBillSize * e.stats.visitCount,
524
+ LastVisit: se(e.stats.lastVisit),
525
+ Feedback: ((Q = e.stats) == null ? void 0 : Q.feedbackCount) || 0,
526
+ LastSeasonTierEarned: ((de = e.stats) == null ? void 0 : de.lastSeasonTierEarned) || 0,
527
+ LastSeasonPointEarned: ((ue = e.stats) == null ? void 0 : ue.lastSeasonPointEarned) || 0,
528
+ JoinedAt: se(e.joinAt || void 0),
529
+ JoinedAtLocation: e.location && ((pe = _.value.find((T) => T.value == e.location)) == null ? void 0 : pe.label) || "-",
530
+ VisitFrequency: `${Number(
531
+ Math.ceil(e.stats.avgVisitFrequency).toFixed(0)
532
+ )}`
533
+ };
534
+ }
535
+ }, kt = { class: "flex items-center" }, It = { class: "fm-typo-en-title-md-600 fm-step-title line-clamp-2 mr-8" }, Mt = { class: "px-24 flex flex-col gap-y-16" }, Tt = { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, Et = { class: "fm-typo-en-body-md-600" }, At = { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, uo = /* @__PURE__ */ ee({
536
+ __name: "Segment",
537
+ setup(e) {
538
+ const { minor: _ } = De, { t: x } = Fe(), h = Ce(), { mapMemberExportRow: m } = Ct, y = Re(), f = We(), F = z(0), i = [
539
+ {
540
+ header: x("connect.loyalty.segment.table.name"),
541
+ accessorFn: (a) => a.name
542
+ },
543
+ {
544
+ header: x("connect.loyalty.segment.table.status"),
545
+ enableSorting: !1,
546
+ cell(a) {
547
+ const o = a.row.original.isActive === !1 ? "Inactive" : "Active";
548
+ return Y(X.FmChip, {
549
+ class: a.row.original.isActive === !1 ? "text-fm-color-typo-error bg-fm-color-system-error-100" : "text-fm-color-typo-success bg-fm-color-system-success-100",
550
+ label: o,
551
+ compact: !0
552
+ });
553
+ }
554
+ },
555
+ {
556
+ header: x("connect.loyalty.segment.table.total_customers"),
557
+ accessorFn: (a) => a.memberCount ?? 0
558
+ },
559
+ {
560
+ header: x("connect.loyalty.segment.table.customer_percentage"),
561
+ accessorFn: (a) => ((a.memberCount ?? 0) * 100 / F.value).toFixed(2)
562
+ },
563
+ {
564
+ header: x("connect.loyalty.segment.table.actions"),
565
+ meta: {
566
+ maxWidth: "100px"
567
+ },
568
+ cell(a) {
569
+ return Y("div", { class: "flex items-center justify-end" }, [
570
+ Y(
571
+ X.FmMenu,
572
+ {
573
+ placement: "bottom-end",
574
+ onClick: (o) => {
575
+ o.stopPropagation();
576
+ }
577
+ },
578
+ {
579
+ "menu-button": () => Y(X.FmButton, {
580
+ icon: "more_vert",
581
+ iconColor: "neutral-gray-400",
582
+ variant: "tertiary"
583
+ }),
584
+ default: () => [
585
+ Y(
586
+ X.FmMenuItem,
587
+ {
588
+ onClick: async (o) => {
589
+ o.stopPropagation(), w(a.row.original);
590
+ }
591
+ },
592
+ {
593
+ label: Y(
594
+ "div",
595
+ {
596
+ class: "fm-typo-en-body-md-400"
597
+ },
598
+ "Export"
599
+ )
600
+ }
601
+ ),
602
+ Y(
603
+ X.FmMenuItem,
604
+ {
605
+ onClick: async (o) => {
606
+ o.stopPropagation(), g(a.row.original);
607
+ }
608
+ },
609
+ {
610
+ label: Y(
611
+ "div",
612
+ {
613
+ class: "text-fm-color-typo-error fm-typo-en-body-md-400"
614
+ },
615
+ "Remove"
616
+ )
617
+ }
618
+ )
619
+ ]
620
+ }
621
+ )
622
+ ]);
623
+ }
624
+ }
625
+ ], n = z(null), { tableMeta: c, rowData: C, debouncedFetchData: A } = we(
626
+ B.readAll
627
+ );
628
+ async function S() {
629
+ await _(
630
+ async () => {
631
+ await B.refreshSegments(), await A({ pageSize: 10, pageIndex: 0 });
632
+ },
633
+ { message: "Refreshing segmentations" }
634
+ );
635
+ }
636
+ async function g(a) {
637
+ await Ae.remove(`Are you sure you want to remove ${a.name}?`) && await _(
638
+ async () => {
639
+ await B.delete(a._id), await A({ pageSize: 10, pageIndex: 0 });
640
+ },
641
+ {
642
+ message: `Removing ${a.name}`,
643
+ successMessage: `Removed ${a.name} successfully`
644
+ }
645
+ );
646
+ }
647
+ async function w(a) {
648
+ const o = {
649
+ sortBy: "_id",
650
+ descending: !1,
651
+ rowsPerPage: 1e3,
652
+ page: 1,
653
+ rowsNumber: 0
654
+ }, d = new Be(), P = (await ve.read({
655
+ limit: 1,
656
+ skip: 0,
657
+ sortBy: o.sortBy,
658
+ descending: o.descending
659
+ })).meta.totalResources ?? 0, D = o.rowsPerPage;
660
+ await _(
661
+ async () => {
662
+ for (let N = 0; N < P; N += D) {
663
+ const V = {
664
+ ...o,
665
+ limit: D,
666
+ skip: o.page - 1,
667
+ sortBy: o.sortBy,
668
+ descending: o.descending
669
+ }, j = await B.paginateSegmentUsers(
670
+ a._id,
671
+ V
672
+ );
673
+ for (const q of j.resources) {
674
+ const G = m(q);
675
+ d.addRecord(G);
676
+ }
677
+ o.page++;
678
+ }
679
+ await he(
680
+ d.buildExcel(),
681
+ `[${a.name}]-members-${(/* @__PURE__ */ new Date()).toISOString()}.xlsx`,
682
+ {
683
+ bookType: "xlsx",
684
+ bookSST: !1,
685
+ type: "array"
686
+ }
687
+ ), o.page = 1;
688
+ },
689
+ {
690
+ message: "Exporting member...",
691
+ successMessage: "Member exported successfully"
692
+ }
693
+ );
694
+ }
695
+ async function I(a) {
696
+ await _(
697
+ async () => {
698
+ var o;
699
+ if (a.type === R.enum.STATIC) {
700
+ const d = new FormData();
701
+ if (d.append("file", a.file), a._id) {
702
+ const { members: P, _id: D, file: N, ...V } = a;
703
+ d.append("segment", JSON.stringify(V)), await B.updateStatic(a._id, d);
704
+ } else {
705
+ const { file: P, ...D } = a;
706
+ d.append("segment", JSON.stringify(D)), await B.createStatic(d);
707
+ }
708
+ a.file && y.open({
709
+ type: "info",
710
+ title: "Import begins soon. Check Queue for updates.",
711
+ action: "View",
712
+ onAction: async () => {
713
+ await f.push({
714
+ name: _e["$connect-QUEUE"],
715
+ query: { type: [fe.enum.SEGMENTATION_IMPORTED] }
716
+ });
717
+ }
718
+ });
719
+ } else if (a._id) {
720
+ const { members: d, _id: P, ...D } = a;
721
+ await B.update(a._id, D);
722
+ } else
723
+ await B.create(a);
724
+ await A({ pageSize: 10, pageIndex: 0 }), (o = n.value) == null || o.hideSheet();
725
+ },
726
+ {
727
+ message: "Saving segment",
728
+ successMessage: "Segment saved"
729
+ }
730
+ );
731
+ }
732
+ function u(a) {
733
+ var o;
734
+ (o = n.value) == null || o.showSheet(a);
735
+ }
736
+ const s = {
737
+ label: x("connect.navigation.queue"),
738
+ value: "queue",
739
+ isPrimary: !1,
740
+ prependIcon: "work_history"
741
+ }, v = ce(() => h.isPremium ? [
742
+ s,
743
+ {
744
+ label: "Refresh segments",
745
+ value: "refresh",
746
+ prependIcon: "refresh"
747
+ },
748
+ {
749
+ label: "Add segment",
750
+ value: "add",
751
+ isPrimary: !0,
752
+ prependIcon: "add"
753
+ }
754
+ ] : []);
755
+ function U(a) {
756
+ switch (a) {
757
+ case "add":
758
+ u();
759
+ break;
760
+ case "refresh":
761
+ S();
762
+ break;
763
+ case "queue":
764
+ f.push({
765
+ name: _e["$connect-QUEUE"],
766
+ query: { type: [fe.enum.SEGMENTATION_IMPORTED] }
767
+ });
768
+ break;
769
+ }
770
+ }
771
+ return Te(async () => {
772
+ const { meta: a } = await ve.read({
773
+ limit: 1,
774
+ skip: 0,
775
+ sortBy: "_id",
776
+ search: void 0,
777
+ descending: !1
778
+ });
779
+ F.value = a.totalResources ?? 0, await A({ pageSize: 10, pageIndex: 0 }), await h.readPremium(), await h.readLocations();
780
+ }), (a, o) => {
781
+ const d = b("FmPill"), P = b("FmPageHead"), D = b("FmIcon"), N = b("FmMenuItem"), V = b("FmMenu"), j = b("FmListItem"), q = b("FmList"), G = b("FmButton"), te = b("FmCard");
782
+ return p(), k(O, null, [
783
+ r(P, {
784
+ title: "Segments",
785
+ actions: t(v),
786
+ "onClick:action": o[0] || (o[0] = (M) => U(M))
787
+ }, {
788
+ title: E(() => [
789
+ l("div", kt, [
790
+ l("span", It, $(t(x)("connect.loyalty.segment.title")), 1),
791
+ r(d, { variant: "premium" })
792
+ ])
793
+ ]),
794
+ _: 1
795
+ }, 8, ["actions"]),
796
+ l("div", Mt, [
797
+ t(C).length > 0 || t(c).searchValue || t(c).isLoading ? (p(), k(O, { key: 0 }, [
798
+ r(be, {
799
+ loading: t(c).isLoading,
800
+ "row-data": t(C),
801
+ "row-count": t(c).totalRows,
802
+ "column-defs": i,
803
+ "shrink-at": !1,
804
+ "page-count": t(c).pageCount,
805
+ "page-index": t(c).pageIndex,
806
+ "page-size": t(c).pageSize,
807
+ onRowClick: o[1] || (o[1] = (M) => {
808
+ u(M.original);
809
+ }),
810
+ onPageChange: t(A)
811
+ }, null, 8, ["loading", "row-data", "row-count", "page-count", "page-index", "page-size", "onPageChange"]),
812
+ r(q, { class: "w-full hidden xs:block" }, {
813
+ default: E(() => [
814
+ (p(!0), k(O, null, ie(t(C), (M) => (p(), J(j, {
815
+ key: M._id.toString(),
816
+ tag: "label",
817
+ onClick: (Q) => u(M)
818
+ }, {
819
+ default: E(() => [
820
+ l("div", null, [
821
+ l("div", Tt, $((M.memberCount ?? 0).toLocaleString()) + " total customers ", 1),
822
+ l("div", Et, $(M.name), 1),
823
+ l("div", At, $(((M.memberCount ?? 0) * 100 / t(F)).toFixed(2)) + "% of customers ", 1)
824
+ ])
825
+ ]),
826
+ append: E(() => [
827
+ r(V, { "stop-click-propagation": !0 }, {
828
+ "menu-button": E(() => [
829
+ r(D, { name: "more_vert" })
830
+ ]),
831
+ default: E(() => [
832
+ r(N, {
833
+ class: "text-fm-color-typo-error fm-typo-en-body-md-400",
834
+ label: "Remove",
835
+ "onUpdate:modelValue": (Q) => Q && g(M)
836
+ }, null, 8, ["onUpdate:modelValue"])
837
+ ]),
838
+ _: 2
839
+ }, 1024)
840
+ ]),
841
+ _: 2
842
+ }, 1032, ["onClick"]))), 128))
843
+ ]),
844
+ _: 1
845
+ })
846
+ ], 64)) : (p(), J(te, {
847
+ key: 1,
848
+ variant: "outlined",
849
+ class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
850
+ }, {
851
+ default: E(() => [
852
+ o[3] || (o[3] = l("img", {
853
+ src: Ee,
854
+ class: "aspect-square w-[150px]"
855
+ }, null, -1)),
856
+ o[4] || (o[4] = l("div", { class: "flex flex-col gap-16 text-center" }, [
857
+ l("div", { class: "fm-typo-en-title-sm-800" }, "Create customer segments"),
858
+ l("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. ")
859
+ ], -1)),
860
+ r(G, {
861
+ variant: "primary",
862
+ label: "Create segment",
863
+ disabled: !t(h).isPremium,
864
+ icon: "add",
865
+ onClick: o[2] || (o[2] = (M) => u())
866
+ }, null, 8, ["disabled"])
867
+ ]),
868
+ _: 1
869
+ })),
870
+ r(Ft, {
871
+ ref_key: "sheetRef",
872
+ ref: n,
873
+ "onUpdate:modelValue": I
874
+ }, null, 512)
875
+ ])
876
+ ], 64);
877
+ };
878
+ }
879
+ });
880
+ export {
881
+ uo as default
882
+ };