@feedmepos/mf-connect 0.0.16-beta.1 → 0.0.16-beta.11

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 (95) hide show
  1. package/dist/{Analytic-C-zZmF5N.js → Analytic-Gq7PoNer.js} +368 -365
  2. package/dist/App-Cikl5jnp.js +177 -0
  3. package/dist/Broadcast-DU3JnBwZ.js +223 -0
  4. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-VWLBlxy1.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-D0I8IZIR.js} +20 -20
  5. package/dist/Card-hIeQ5XUH.js +825 -0
  6. package/dist/Collections-B1SC1rr7.js +453 -0
  7. package/dist/Credit-BgwI8DR3.js +216 -0
  8. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bz6TSmbW.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-D9VR3P2d.js} +1026 -1022
  9. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-AhWnHG02.js → EffectSheet.vue_vue_type_style_index_0_lang-DPgu45MD.js} +29 -29
  10. package/dist/Experience-C2Q-zqV6.js +221 -0
  11. package/dist/Game-DU2pZDGk.js +255 -0
  12. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js +144 -0
  13. package/dist/JsonViewer-v8_C7l5N.js +87 -0
  14. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-DykNOOFD.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js} +1 -1
  15. package/dist/{MainLayout-D0AoA1tk.js → MainLayout-B1aJoR95.js} +2 -2
  16. package/dist/Marketing-DWiTQp9I.js +316 -0
  17. package/dist/Member-BEXKBFry.js +69 -0
  18. package/dist/MemberList-DzMdajIf.js +1733 -0
  19. package/dist/MemberOverview-wL_ailso.js +58 -0
  20. package/dist/{MemberTransactions-CTAx5jIV.js → MemberTransactions-Bciankuu.js} +1 -1
  21. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-C-BtHxSc.js → MessageInput.vue_vue_type_script_setup_true_lang-DH25Hfk3.js} +46 -46
  22. package/dist/Mission-KzwRlaA5.js +259 -0
  23. package/dist/Point-CSKvZXHc.js +222 -0
  24. package/dist/Promotion-IiwPhx8p.js +221 -0
  25. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-CrpJySSp.js → RuleGroup.vue_vue_type_script_setup_true_lang-4zIO3oCr.js} +545 -544
  26. package/dist/Segment-2Q0PonBb.js +447 -0
  27. package/dist/{Setting-Zrj5P_4m.js → Setting-Df5vVRt4.js} +600 -598
  28. package/dist/Store-C0WXCKs6.js +1503 -0
  29. package/dist/StoreRewards-eSSIO0nk.js +401 -0
  30. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-DS4APaHw.js → StoreTransactions.vue_vue_type_script_setup_true_lang-BjnCRKGX.js} +106 -108
  31. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-ZYjWlDJ1.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-b0xTcoEp.js} +1 -1
  32. package/dist/{Tier-DVWJyQ9S.js → Tier-v-1FkRU-.js} +464 -449
  33. package/dist/{Title-B5kX64vs.js → Title-CQ2JWqBW.js} +315 -299
  34. package/dist/Transaction-0OouN_6s.js +39 -0
  35. package/dist/Voucher-CL0cgogx.js +488 -0
  36. package/dist/_commonjsHelpers-BkfeUUK-.js +28 -0
  37. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  38. package/dist/app-Bd19eW7X.js +5381 -0
  39. package/dist/app-CfS25Z66.js +34797 -0
  40. package/dist/app-wDQR6dpb.js +39 -0
  41. package/dist/app.js +5 -3
  42. package/dist/business-dQh3AEot.js +78 -0
  43. package/dist/{campaign-BZJuknWK.js → campaign-BOl8AgKA.js} +12 -12
  44. package/dist/{collection.fn-DoCkZ6z4.js → collection.fn-B_YsXmrP.js} +2 -2
  45. package/dist/dto-B8NfyVPG.js +1169 -0
  46. package/dist/{effect-B8kmnKvY.js → effect-C2jCStXO.js} +1 -1
  47. package/dist/{export-Dm6LYnWo.js → export-BtZc3Yzh.js} +3 -3
  48. package/dist/{helper-DR4XK3nv.js → helper-8oGsrM56.js} +1 -1
  49. package/dist/{index-DcUrk07Q.js → index-6FkKY3q0.js} +3 -3
  50. package/dist/{index-Bu4_26qI.js → index-C7oeXRUl.js} +1 -1
  51. package/dist/{index-CuL5-ORK.js → index-CZKYIefW.js} +6 -7
  52. package/dist/{index-yxJMhfxj.js → index-C_0IFnwi.js} +5 -5
  53. package/dist/{index-BryrRq8O.js → index-DCixRRvz.js} +36 -30
  54. package/dist/{index-CkiYkbXb.js → index-DFgt4-VW.js} +1 -1
  55. package/dist/{index-CWf0mh3a.js → index-DYDhH9bi.js} +177 -168
  56. package/dist/{index-boor8e80.js → index-Di-kWSmf.js} +3 -3
  57. package/dist/{app-DkI7dYRN.js → index-Dn0jdj0o.js} +9665 -13024
  58. package/dist/index-DwKqFNF6.js +3 -0
  59. package/dist/{index-BobRgQrE.js → index-HoacsZDk.js} +2 -2
  60. package/dist/{index-BxkxVtgm.js → index-UTQHDUdW.js} +1 -1
  61. package/dist/{loading-BzV5acUX.js → loading-D_AN6p24.js} +6807 -6805
  62. package/dist/{lodash-mg4435Qq.js → lodash-B5I3zXaY.js} +1 -1
  63. package/dist/{membership-CqbsLHqx.js → membership-Ccrx9R6r.js} +3 -3
  64. package/dist/{money-DA_gtp3q.js → money-waD-f-Zz.js} +1 -1
  65. package/dist/{number-C388eyOu.js → number-CwTGGsh9.js} +1 -1
  66. package/dist/{rule-Clmr5y4j.js → rule-DJ07h3Gh.js} +2 -2
  67. package/dist/{rule-builder-BgqNbM-P.js → rule-builder-DJ-acvVD.js} +1 -1
  68. package/dist/style.css +1 -1
  69. package/dist/template-clxvNnbF.js +190 -0
  70. package/dist/{usePagination-o5fgsZwU.js → usePagination-BeF5K3M7.js} +86 -86
  71. package/dist/vue-i18n-BxwiXSkp.js +2365 -0
  72. package/dist/{xlsx-BRdh9e2p.js → xlsx-BB366cdN.js} +1945 -1945
  73. package/package.json +9 -5
  74. package/dist/Broadcast-X69Mtv3b.js +0 -216
  75. package/dist/Card-D0X3v1UF.js +0 -822
  76. package/dist/Collections-umR6Ehqf.js +0 -452
  77. package/dist/Credit-C1EWF7R0.js +0 -214
  78. package/dist/Experience-CqL8wyPm.js +0 -211
  79. package/dist/Game--kYe64EV.js +0 -250
  80. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-BjOJ3XSL.js +0 -144
  81. package/dist/Marketing-CTCQ5ZmZ.js +0 -308
  82. package/dist/Member-DCduX7zP.js +0 -91
  83. package/dist/MemberList-B0EkXZJu.js +0 -1729
  84. package/dist/MemberOverview-C2n9oJZh.js +0 -58
  85. package/dist/Mission-CVr9rS_D.js +0 -248
  86. package/dist/Point-BnZ6M74y.js +0 -220
  87. package/dist/Promotion-B0PUve5S.js +0 -218
  88. package/dist/Segment-B-XpkyM5.js +0 -445
  89. package/dist/Store-B2gywCt2.js +0 -1503
  90. package/dist/StoreRewards-D8410Q_-.js +0 -434
  91. package/dist/Transaction-CZBO4v4d.js +0 -36
  92. package/dist/Voucher-se-4JF9B.js +0 -481
  93. package/dist/app-B2ImSO3V.js +0 -53382
  94. package/dist/dto-BWpvRpK2.js +0 -1151
  95. package/dist/template-Dwp7heBA.js +0 -190
@@ -0,0 +1,222 @@
1
+ import { defineComponent as j, ref as V, computed as A, h as E, onMounted as M, resolveComponent as l, openBlock as d, createElementBlock as h, Fragment as b, createVNode as r, unref as t, withCtx as g, createElementVNode as n, toDisplayString as c, renderList as H, createBlock as w, resolveDynamicComponent as q } from "vue";
2
+ import { _ as z } from "./campaign-CpzFl8Vr.js";
3
+ import { useDialog as G, components as J } from "@feedmepos/ui-library";
4
+ import { p as Q, u as W } from "./loading-D_AN6p24.js";
5
+ import { u as X } from "./business-dQh3AEot.js";
6
+ import { u as Y } from "./campaign-BOl8AgKA.js";
7
+ import { g as I, b as P } from "./dto-B8NfyVPG.js";
8
+ import { _ as Z } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
9
+ import { _ as ee } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-D9VR3P2d.js";
10
+ import { u as te } from "./template-clxvNnbF.js";
11
+ import { u as oe } from "./vue-i18n-BxwiXSkp.js";
12
+ import { c as _ } from "./index-UTQHDUdW.js";
13
+ const ae = { class: "flex items-center" }, ne = { class: "fm-typo-en-title-md-600 fm-step-title line-clamp-2 mr-8" }, se = { class: "px-24 flex flex-col gap-y-16" }, ie = { class: "flex items-center justify-between w-full" }, re = { class: "flex gap-8 overflow-x-auto" }, le = { class: "space-y-8" }, ce = { class: "flex w-full gap-4 items-center" }, me = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, de = { class: "space-y-4" }, pe = { class: "fm-typo-en-body-lg-600" }, ue = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, fe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ye = { class: "flex flex-col gap-16 text-center" }, ge = { class: "fm-typo-en-title-sm-800" }, _e = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Be = /* @__PURE__ */ j({
14
+ __name: "Point",
15
+ setup(he) {
16
+ const { t: s } = oe(), B = {
17
+ label: s("connect.program.common.actions.create", {
18
+ type: s("connect.program.point.title").toLowerCase()
19
+ }),
20
+ value: "create",
21
+ isPrimary: !0,
22
+ prependIcon: "add"
23
+ }, $ = te("COIN", G()), x = X(), m = Y(), { global: K, minor: C } = W, i = V({
24
+ searchKey: "",
25
+ location: null
26
+ }), u = A(
27
+ () => m.campaigns.point.filter(
28
+ (e) => !i.value.location || !e.targetLocation || e.targetLocation.includes(i.value.location)
29
+ )
30
+ ), N = [
31
+ {
32
+ header: s("connect.program.common.table.title"),
33
+ accessorFn: (e) => e.name
34
+ },
35
+ {
36
+ header: s("connect.program.common.table.status"),
37
+ cell(e) {
38
+ return I(e.row.original);
39
+ }
40
+ },
41
+ {
42
+ header: s("connect.program.common.table.summary"),
43
+ accessorFn: (e) => P(e)
44
+ },
45
+ {
46
+ header: s("connect.program.common.table.actions"),
47
+ cell(e) {
48
+ return E(J.FmButton, {
49
+ variant: "tertiary",
50
+ icon: "delete",
51
+ iconColor: "neutral-gray-400",
52
+ onClick: (o) => {
53
+ o.stopPropagation(), F(e.row.original);
54
+ }
55
+ });
56
+ }
57
+ }
58
+ ], v = V();
59
+ async function F(e) {
60
+ await Q.remove(`Are you sure you want to remove ${e.name}?`) && await C(
61
+ async () => {
62
+ await _.delete(e._id), await m.read("COIN");
63
+ },
64
+ {
65
+ message: `Removing ${e.name}`,
66
+ successMessage: `Removed ${e.name} successfully`
67
+ }
68
+ );
69
+ }
70
+ async function f(e) {
71
+ e ? await o() : $.open(async (p) => {
72
+ await o(p);
73
+ });
74
+ async function o(p) {
75
+ var y;
76
+ (y = v.value) == null || y.showSheet(
77
+ !0,
78
+ "COIN",
79
+ e ? await _.readById(e._id) : void 0,
80
+ p
81
+ );
82
+ }
83
+ }
84
+ async function R(e) {
85
+ await C(
86
+ async () => {
87
+ e.campaign._id ? await _.update(e.campaign._id, e) : await _.create(e), await m.read("COIN");
88
+ },
89
+ {
90
+ message: `${e.campaign._id ? "Updating" : "Creating"} point program`,
91
+ successMessage: `Point program ${e.campaign._id ? "updated" : "created"} successfully`
92
+ }
93
+ );
94
+ }
95
+ return M(async () => {
96
+ await K(async () => {
97
+ await m.read("COIN");
98
+ });
99
+ }), (e, o) => {
100
+ const p = l("FmPill"), y = l("FmPageHead"), k = l("FmSearch"), O = l("FmTable"), S = l("FmButton"), U = l("FmListItem"), D = l("FmList"), T = l("FmCard");
101
+ return d(), h(b, null, [
102
+ r(y, {
103
+ title: t(s)("connect.program.point.title"),
104
+ actions: t(u).length > 0 ? [B] : [],
105
+ "onClick:action": o[0] || (o[0] = () => f())
106
+ }, {
107
+ title: g(() => [
108
+ n("div", ae, [
109
+ n("span", ne, c(t(s)("connect.program.point.title")), 1),
110
+ r(p, { variant: "premium" })
111
+ ])
112
+ ]),
113
+ _: 1
114
+ }, 8, ["title", "actions"]),
115
+ n("div", se, [
116
+ r(k, {
117
+ modelValue: t(i).searchKey,
118
+ "onUpdate:modelValue": o[1] || (o[1] = (a) => t(i).searchKey = a),
119
+ class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
120
+ placeholder: "search",
121
+ collapsible: ""
122
+ }, null, 8, ["modelValue"]),
123
+ t(m).campaigns.point && t(m).campaigns.point.length > 0 ? (d(), h(b, { key: 0 }, [
124
+ n("div", ie, [
125
+ n("div", re, [
126
+ r(Z, {
127
+ modelValue: t(i).location,
128
+ "onUpdate:modelValue": o[2] || (o[2] = (a) => t(i).location = a),
129
+ label: "Location: ",
130
+ "show-item-label": !0,
131
+ icon: "storefront",
132
+ placement: "bottom-start",
133
+ items: t(x).locationItems
134
+ }, null, 8, ["modelValue", "items"])
135
+ ]),
136
+ r(k, {
137
+ modelValue: t(i).searchKey,
138
+ "onUpdate:modelValue": o[3] || (o[3] = (a) => t(i).searchKey = a),
139
+ class: "xs:hidden",
140
+ placeholder: "search",
141
+ collapsible: ""
142
+ }, null, 8, ["modelValue"])
143
+ ]),
144
+ r(O, {
145
+ class: "xs:hidden",
146
+ "row-data": t(u),
147
+ "column-defs": N,
148
+ "search-value": t(i).searchKey,
149
+ "column-filter": [],
150
+ onRowClick: o[4] || (o[4] = (a) => f(a.original)),
151
+ "hide-footer": t(u).length < 10
152
+ }, null, 8, ["row-data", "search-value", "hide-footer"]),
153
+ r(D, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
154
+ default: g(() => [
155
+ (d(!0), h(b, null, H(t(u).filter(
156
+ (a) => a.name.toLowerCase().includes(t(i).searchKey.toLowerCase())
157
+ ), (a) => (d(), w(U, {
158
+ key: a._id.toString(),
159
+ onClick: (L) => f(a),
160
+ class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
161
+ }, {
162
+ default: g(() => [
163
+ n("div", le, [
164
+ n("div", ce, [
165
+ (d(), w(q(t(I)(a)))),
166
+ n("div", me, c(t(s)("program.point.used", { count: a.currentReceive ?? 0 })), 1)
167
+ ]),
168
+ n("div", de, [
169
+ n("div", pe, c(a.name), 1),
170
+ n("div", ue, c(t(P)(a)), 1)
171
+ ]),
172
+ n("div", fe, " Point received: " + c(a.currentReceive ?? 0), 1)
173
+ ]),
174
+ r(S, {
175
+ icon: "delete",
176
+ "icon-color": "neutral-gray-400",
177
+ variant: "tertiary",
178
+ onClick: (L) => (L.stopPropagation(), F(a))
179
+ }, null, 8, ["onClick"])
180
+ ]),
181
+ _: 2
182
+ }, 1032, ["onClick"]))), 128))
183
+ ]),
184
+ _: 1
185
+ })
186
+ ], 64)) : (d(), w(T, {
187
+ key: 1,
188
+ variant: "outlined",
189
+ class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
190
+ }, {
191
+ default: g(() => [
192
+ o[6] || (o[6] = n("img", {
193
+ src: z,
194
+ class: "aspect-square w-[150px]"
195
+ }, null, -1)),
196
+ n("div", ye, [
197
+ n("div", ge, c(t(s)("connect.program.point.empty_state.title")), 1),
198
+ n("div", _e, c(t(s)("connect.program.point.empty_state.description")), 1)
199
+ ]),
200
+ r(S, {
201
+ variant: "primary",
202
+ label: "Create point program",
203
+ disabled: !t(x).isPremium,
204
+ icon: "add",
205
+ onClick: o[5] || (o[5] = (a) => f())
206
+ }, null, 8, ["disabled"])
207
+ ]),
208
+ _: 1
209
+ })),
210
+ r(ee, {
211
+ ref_key: "sheetRef",
212
+ ref: v,
213
+ "onSubmit:modelValue": R
214
+ }, null, 512)
215
+ ])
216
+ ], 64);
217
+ };
218
+ }
219
+ });
220
+ export {
221
+ Be as default
222
+ };
@@ -0,0 +1,221 @@
1
+ import { defineComponent as j, ref as O, computed as E, h as A, onMounted as H, resolveComponent as r, openBlock as m, createElementBlock as _, Fragment as h, createVNode as l, unref as a, createElementVNode as s, withCtx as v, renderList as q, createBlock as w, resolveDynamicComponent as z, toDisplayString as y } from "vue";
2
+ import { _ as G } from "./campaign-CpzFl8Vr.js";
3
+ import { useDialog as J, components as Q } from "@feedmepos/ui-library";
4
+ import { c as P, p as W, u as X } from "./loading-D_AN6p24.js";
5
+ import { u as Y } from "./business-dQh3AEot.js";
6
+ import { u as Z } from "./campaign-BOl8AgKA.js";
7
+ import { u as ee } from "./vue-i18n-BxwiXSkp.js";
8
+ import { g as V } from "./dto-B8NfyVPG.js";
9
+ import { e as I } from "./effect-C2jCStXO.js";
10
+ import { _ as oe } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
11
+ import { _ as te } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-D9VR3P2d.js";
12
+ import { u as ne } from "./template-clxvNnbF.js";
13
+ import { c as g } from "./index-UTQHDUdW.js";
14
+ const ae = { class: "px-24 flex flex-col gap-y-16" }, se = { class: "flex items-center justify-between w-full" }, ie = { class: "flex gap-8 overflow-x-auto" }, le = { class: "space-y-8" }, re = { class: "flex w-full gap-4 items-center" }, ce = { class: "space-y-4" }, me = { class: "fm-typo-en-body-lg-600" }, pe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, de = { class: "flex flex-col gap-16 text-center" }, ue = { class: "fm-typo-en-title-sm-800" }, fe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ve = /* @__PURE__ */ j({
15
+ __name: "Promotion",
16
+ setup(ye) {
17
+ const { t: n } = ee(), L = {
18
+ label: n("connect.promotion.createCampaign"),
19
+ value: "create",
20
+ isPrimary: !0,
21
+ prependIcon: "add"
22
+ }, T = ne("PROMOTION", J()), x = Y(), u = Z(), { global: B, minor: b } = X, i = O({
23
+ searchKey: "",
24
+ location: null
25
+ }), c = E(
26
+ () => u.campaigns.promotion.filter(
27
+ (e) => !i.value.location || !e.targetLocation || e.targetLocation.includes(i.value.location)
28
+ )
29
+ ), R = [
30
+ {
31
+ header: n("connect.promotion.promotionTitle"),
32
+ accessorFn: (e) => e.name
33
+ },
34
+ {
35
+ header: n("connect.promotion.status"),
36
+ cell(e) {
37
+ return V(e.row.original);
38
+ }
39
+ },
40
+ {
41
+ header: n("connect.promotion.type"),
42
+ accessorFn: (e) => `${P.title(e.effect.options.target)} promotion`
43
+ },
44
+ {
45
+ header: n("connect.promotion.summary"),
46
+ accessorFn: (e) => I(e.effect)
47
+ },
48
+ {
49
+ header: n("connect.promotion.actions"),
50
+ cell(e) {
51
+ return A(Q.FmButton, {
52
+ variant: "tertiary",
53
+ icon: "delete",
54
+ iconColor: "neutral-gray-400",
55
+ onClick: (o) => {
56
+ o.stopPropagation(), F(e.row.original);
57
+ }
58
+ });
59
+ }
60
+ }
61
+ ], C = O();
62
+ async function F(e) {
63
+ await W.remove(n("promotion.confirmRemove", { name: e.name })) && await b(
64
+ async () => {
65
+ await g.delete(e._id), await u.read("PROMOTION");
66
+ },
67
+ {
68
+ message: n("promotion.removing", { name: e.name }),
69
+ successMessage: n("promotion.removedSuccessfully", { name: e.name })
70
+ }
71
+ );
72
+ }
73
+ async function f(e) {
74
+ e ? await o() : T.open(async (p) => {
75
+ await o(p);
76
+ });
77
+ async function o(p) {
78
+ var d;
79
+ (d = C.value) == null || d.showSheet(
80
+ !0,
81
+ "PROMOTION",
82
+ e ? await g.readById(e._id) : void 0,
83
+ p
84
+ );
85
+ }
86
+ }
87
+ async function M(e) {
88
+ await b(
89
+ async () => {
90
+ e.campaign._id ? await g.update(e.campaign._id, e) : await g.create(e), await u.read("PROMOTION");
91
+ },
92
+ {
93
+ message: n(e.campaign._id ? "promotion.updating" : "promotion.creating"),
94
+ successMessage: n(
95
+ e.campaign._id ? "promotion.updatedSuccessfully" : "promotion.createdSuccessfully"
96
+ )
97
+ }
98
+ );
99
+ }
100
+ return H(async () => {
101
+ await B(async () => {
102
+ await x.readLocations(), await u.read("PROMOTION");
103
+ });
104
+ }), (e, o) => {
105
+ const p = r("FmPageHead"), d = r("FmSearch"), K = r("FmTable"), N = r("FmChip"), k = r("FmButton"), $ = r("FmListItem"), D = r("FmList"), U = r("FmCard");
106
+ return m(), _(h, null, [
107
+ l(p, {
108
+ title: a(n)("connect.promotion.title"),
109
+ actions: a(c).length > 0 ? [L] : [],
110
+ "onClick:action": o[0] || (o[0] = (t) => f())
111
+ }, null, 8, ["title", "actions"]),
112
+ s("div", ae, [
113
+ l(d, {
114
+ modelValue: i.value.searchKey,
115
+ "onUpdate:modelValue": o[1] || (o[1] = (t) => i.value.searchKey = t),
116
+ class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
117
+ placeholder: a(n)("connect.promotion.search"),
118
+ collapsible: ""
119
+ }, null, 8, ["modelValue", "placeholder"]),
120
+ a(c) && a(c).length > 0 ? (m(), _(h, { key: 0 }, [
121
+ s("div", se, [
122
+ s("div", ie, [
123
+ l(oe, {
124
+ modelValue: i.value.location,
125
+ "onUpdate:modelValue": o[2] || (o[2] = (t) => i.value.location = t),
126
+ label: a(n)("connect.promotion.location"),
127
+ "show-item-label": !0,
128
+ icon: "storefront",
129
+ placement: "bottom-start",
130
+ items: a(x).locationItems
131
+ }, null, 8, ["modelValue", "label", "items"])
132
+ ]),
133
+ l(d, {
134
+ modelValue: i.value.searchKey,
135
+ "onUpdate:modelValue": o[3] || (o[3] = (t) => i.value.searchKey = t),
136
+ class: "xs:hidden",
137
+ placeholder: "search",
138
+ collapsible: ""
139
+ }, null, 8, ["modelValue"])
140
+ ]),
141
+ l(K, {
142
+ class: "xs:hidden",
143
+ "row-data": a(c),
144
+ "column-defs": R,
145
+ "search-value": i.value.searchKey,
146
+ "column-filter": [],
147
+ onRowClick: o[4] || (o[4] = (t) => f(t.original)),
148
+ "hide-footer": a(c).length < 10
149
+ }, null, 8, ["row-data", "search-value", "hide-footer"]),
150
+ l(D, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
151
+ default: v(() => [
152
+ (m(!0), _(h, null, q(a(c).filter(
153
+ (t) => t.name.toLowerCase().includes(i.value.searchKey.toLowerCase())
154
+ ), (t) => (m(), w($, {
155
+ key: t._id.toString(),
156
+ onClick: (S) => f(t),
157
+ class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
158
+ }, {
159
+ default: v(() => [
160
+ s("div", le, [
161
+ s("div", re, [
162
+ (m(), w(z(a(V)(t)))),
163
+ l(N, {
164
+ class: "!text-fm-color-typo-info !bg-fm-color-system-info-100",
165
+ compact: !0,
166
+ label: `${a(P).title(t.effect.options.target)} promotion`
167
+ }, null, 8, ["label"])
168
+ ]),
169
+ s("div", ce, [
170
+ s("div", me, y(t.name), 1),
171
+ s("div", pe, y(a(I)(t.effect)), 1)
172
+ ])
173
+ ]),
174
+ l(k, {
175
+ icon: "delete",
176
+ "icon-color": "neutral-gray-400",
177
+ variant: "tertiary",
178
+ onClick: (S) => (S.stopPropagation(), F(t))
179
+ }, null, 8, ["onClick"])
180
+ ]),
181
+ _: 2
182
+ }, 1032, ["onClick"]))), 128))
183
+ ]),
184
+ _: 1
185
+ })
186
+ ], 64)) : (m(), w(U, {
187
+ key: 1,
188
+ variant: "outlined",
189
+ class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
190
+ }, {
191
+ default: v(() => [
192
+ o[6] || (o[6] = s("img", {
193
+ src: G,
194
+ class: "aspect-square w-[150px]"
195
+ }, null, -1)),
196
+ s("div", de, [
197
+ s("div", ue, y(a(n)("connect.promotion.createPromotionCampaign")), 1),
198
+ s("div", fe, y(a(n)("connect.promotion.description")), 1)
199
+ ]),
200
+ l(k, {
201
+ variant: "primary",
202
+ label: a(n)("connect.promotion.createPromotionCampaign"),
203
+ icon: "add",
204
+ onClick: o[5] || (o[5] = (t) => f())
205
+ }, null, 8, ["label"])
206
+ ]),
207
+ _: 1
208
+ }))
209
+ ]),
210
+ l(te, {
211
+ ref_key: "sheetRef",
212
+ ref: C,
213
+ "onSubmit:modelValue": M
214
+ }, null, 512)
215
+ ], 64);
216
+ };
217
+ }
218
+ });
219
+ export {
220
+ Ve as default
221
+ };