@feedmepos/mf-connect 0.1.97-prod → 0.1.98-beta.2

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 (116) hide show
  1. package/dist/{App-DHAyGCKP.js → App-BWBeJksP.js} +118 -106
  2. package/dist/AuditLogs-CWVUX5o0.js +2013 -0
  3. package/dist/{Bin-BxyU2xtK.js → Bin-jXmZpGfg.js} +8 -8
  4. package/dist/{Broadcast-BJjehb02.js → Broadcast-C76pTADb.js} +18 -17
  5. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BCxP8rEW.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-9kfq8OXE.js} +5 -6
  6. package/dist/{Card-BYDuADCn.js → Card-qXn83BYu.js} +19 -19
  7. package/dist/{Collections-BlPEkNm8.js → Collections-DGXUQSbz.js} +197 -185
  8. package/dist/{Credit-D9Eqxv2E.js → Credit-CpmrPZx9.js} +18 -17
  9. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js +58 -0
  10. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-DAnw5TFZ.js +3377 -0
  11. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-hpNgkLOt.js → EffectSheet.vue_vue_type_style_index_0_lang-BCAotF0P.js} +6 -6
  12. package/dist/{Experience-DGumSpYK.js → Experience-CuOq7hd3.js} +35 -34
  13. package/dist/{FileSaver.min-D_TpPHp3.js → FileSaver.min-Cjv6SzrG.js} +1 -1
  14. package/dist/{Game-DDsYLdKu.js → Game-D0KfLD-b.js} +16 -15
  15. package/dist/Grab-L1h7bHD7.js +300 -0
  16. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-R00i7YNe.js → ImageInput.vue_vue_type_script_setup_true_lang-DMAaHxzm.js} +1 -1
  17. package/dist/{Index-DwRbFOsj.js → Index-DxwMHEV3.js} +10 -10
  18. package/dist/LocationPicker.vue_vue_type_script_setup_true_lang-i9-B25xO.js +48 -0
  19. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-D_HOJBzW.js → LottieAnimation.vue_vue_type_script_setup_true_lang-D84v7zC_.js} +1 -1
  20. package/dist/LoyaltyDashboard-B5wg1EUC.js +1082 -0
  21. package/dist/{MainLayout-BEUAguIP.js → MainLayout-Cgi3Z3EM.js} +1 -1
  22. package/dist/{Marketing-WdhEZvmz.js → Marketing-Cl5OSBI1.js} +4 -4
  23. package/dist/{MarketingMaterialEdit-DUIkUA79.js → MarketingMaterialEdit-CzYTbdJd.js} +214 -211
  24. package/dist/{Member-jL3RMGsZ.js → Member-D29x5Cic.js} +20 -20
  25. package/dist/{MemberList-B1bdPK63.js → MemberList-DDPe6Ymr.js} +50 -51
  26. package/dist/{MemberTransactions-BNKJ0wtr.js → MemberTransactions-3mboVWAx.js} +1 -1
  27. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-Cvsz00_4.js → MessageInput.vue_vue_type_script_setup_true_lang-C2HlA9O8.js} +11 -11
  28. package/dist/{Mission-CoXzS7U6.js → Mission-CMPc4NLe.js} +35 -34
  29. package/dist/{Overview-B16wZUSV.js → Overview-sJ2kuP4U.js} +19 -19
  30. package/dist/{Point-CORBv0y2.js → Point-BBP4UEhf.js} +30 -29
  31. package/dist/{Promotion-DQ4WnFkH.js → Promotion-Bt0RLGsd.js} +111 -105
  32. package/dist/{Queue-BW97QEY2.js → Queue-CzVsoIDM.js} +43 -43
  33. package/dist/{Record-DZOhwf13.js → Record-CAoGgaxo.js} +10 -10
  34. package/dist/Review-CVBJlwGK.js +959 -0
  35. package/dist/ReviewFacebookCallback-RGWdxXYf.js +243 -0
  36. package/dist/ReviewGoogleCallback-L7_Jjbkx.js +208 -0
  37. package/dist/{Reward-Bi9mpuyH.js → Reward-CrpFlr0a.js} +17 -17
  38. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-Dtosx1wE.js → RewardGroup.vue_vue_type_script_setup_true_lang-DW-WFNI6.js} +12 -12
  39. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-DlcsO8fk.js +1911 -0
  40. package/dist/{Segment-COhS8SPv.js → Segment-Cy-QwYQQ.js} +77 -78
  41. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-By_BQodK.js → SelectItems.vue_vue_type_script_setup_true_lang-ovvxxcrQ.js} +3 -3
  42. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-BoEnwoYd.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-D69bJtyd.js} +12 -12
  43. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-DonadRJT.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-DQyoPZ_6.js} +4 -4
  44. package/dist/{Setting-BNtYrzdN.js → Setting-DEQIJ4fY.js} +259 -248
  45. package/dist/{SettingAdvertisements-Cne8GikV.js → SettingAdvertisements-NuwjCPLN.js} +13 -13
  46. package/dist/{Store-iTgtmUVL.js → Store-Cw2J_ecA.js} +24 -24
  47. package/dist/{StoreRewards-DLawXBsl.js → StoreRewards-BK5rDAaK.js} +16 -16
  48. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-B3jwaYHX.js +1130 -0
  49. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-D_OdWctk.js +7007 -0
  50. package/dist/{Tier-BbZMbFSd.js → Tier-CwZ40RYc.js} +544 -469
  51. package/dist/{Title-Co5XWIJm.js → Title-DU7KmsK2.js} +93 -92
  52. package/dist/{Transaction-CoUbt5rr.js → Transaction-Uh5Ozt93.js} +2 -2
  53. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CzJpNT94.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BtnUNkcS.js} +6 -6
  54. package/dist/{Voucher-CXojttH0.js → Voucher-BF6ARaRe.js} +28 -27
  55. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-Bxkds9_4.js → VoucherEditor.vue_vue_type_script_setup_true_lang-C7msPJdi.js} +12 -12
  56. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CHVqFzLm.js → ZodTextField.vue_vue_type_script_setup_true_lang-BrR2WA1K.js} +2 -2
  57. package/dist/{app-_LtKE4PZ.js → app-DlECkPwT.js} +3408 -2913
  58. package/dist/app.js +4 -3
  59. package/dist/{business-CchrWCX9.js → business-BSe9C-xG.js} +1 -1
  60. package/dist/{campaign-N2x2N6OP.js → campaign-BNS2RxKc.js} +114 -64
  61. package/dist/{campaign-D2RzC0L1.js → campaign-CXw3jpdr.js} +13 -7
  62. package/dist/{campaign.enum-DqJsu1At.js → campaign.enum-CnMa2Tia.js} +3 -2
  63. package/dist/{campaign.fn-Da4r_dvc.js → campaign.fn-CNOinW8t.js} +131 -131
  64. package/dist/{collectible.enum-CHheiKkA.js → collectible.enum-BIvEz79q.js} +1 -1
  65. package/dist/duplicateCampaign-Co2TdbrL.js +51 -0
  66. package/dist/{effect-DADvE7lZ.js → effect-Bt8PE3-M.js} +1 -1
  67. package/dist/{email-addresses-DzUHQuVs.js → email-addresses-Dh95ALqP.js} +2 -2
  68. package/dist/{export-uzECYleM.js → export-DIIgAwP7.js} +3 -3
  69. package/dist/{helper-DMsYRFIM.js → helper-8zEdQ9jm.js} +1 -1
  70. package/dist/{index-CEVpWmjC.js → index-0BNEvaYc.js} +7 -7
  71. package/dist/{index-r8TuEpzi.js → index-BAlFstx4.js} +1 -1
  72. package/dist/{index-C2h4SP0A.js → index-BP5qSDQw.js} +806 -205
  73. package/dist/{index-KYtKBtvK.js → index-Bqxe3Gbq.js} +3 -3
  74. package/dist/{index-CrPHsZg1.js → index-CWypTyOP.js} +1554 -1270
  75. package/dist/{index-DXl_Qtu-.js → index-CfxDirFl.js} +1 -1
  76. package/dist/{index-Bc-pgOn6.js → index-DDp0nMys.js} +1 -1
  77. package/dist/index-DW4-mTTG.js +52 -0
  78. package/dist/{timezone-B_KZGqyd.js → index-DdCPfF8x.js} +21 -20
  79. package/dist/index-IPOrNVQw.js +67 -0
  80. package/dist/{index-XJX8_Wlh.js → index-SsUBL4IR.js} +1 -1
  81. package/dist/{index-Ct1Qf7kH.js → index-VS1hWlhk.js} +1 -1
  82. package/dist/{index-B9RmImNP.js → index-ZKJoXi1-.js} +3 -3
  83. package/dist/{index-DQ6H1MEw.js → index-rwlkBKrS.js} +1996 -1968
  84. package/dist/{index.esm2017-D9jjiQqn.js → index.esm2017-CgR02aQB.js} +209 -209
  85. package/dist/{loading-DK8UdxtS.js → loading-CxY9qhzD.js} +1 -1
  86. package/dist/{lodash-CgcQgDO8.js → lodash-CELsN1M_.js} +1 -1
  87. package/dist/{membership-Cs4GzRnn.js → membership-BoQMuerb.js} +3 -3
  88. package/dist/{money-TgbWserQ.js → money-CH913hGN.js} +1 -1
  89. package/dist/{number-fLCh4B45.js → number-CO-WbLdr.js} +1 -1
  90. package/dist/object-BYyQ0PZp.js +18 -0
  91. package/dist/objectid-BM2Ygj-U.js +145 -0
  92. package/dist/{plugins-DYcrIMpx.js → plugins-YK45gSb1.js} +94 -95
  93. package/dist/{reward-uQ8Oz8Fd.js → reward-3aFPahH6.js} +1 -1
  94. package/dist/{rule-BcbgF0xS.js → rule-DC9my0Vg.js} +505 -487
  95. package/dist/style.css +1 -1
  96. package/dist/template-tDq12e1p.js +188 -0
  97. package/dist/{trigger-c-_77EFL.js → trigger-DoPHRgKt.js} +5 -5
  98. package/dist/{useMarketingMaterialActions-BCqwGe4e.js → useMarketingMaterialActions-CEd6ODsz.js} +3 -3
  99. package/dist/{usePagination-C3cT5BmC.js → usePagination-C8FUj5q_.js} +1 -1
  100. package/dist/{user-CRIo5MyA.js → user-Dhlhrnf8.js} +1 -1
  101. package/dist/{vue-i18n-BU_SuDqj.js → vue-i18n-B-92uhPn.js} +175 -175
  102. package/dist/{xlsx-Bw1AshOG.js → xlsx-Dmxne1eM.js} +166 -166
  103. package/dist/{zod-CzlTW8Al.js → zod-Dcdy9Dm3.js} +1 -1
  104. package/package.json +8 -4
  105. package/dist/Analytic-Ccb5IKBy.js +0 -426
  106. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bf8Rc-Eh.js +0 -2223
  107. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CrvTdEPu.js +0 -1888
  108. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-Cl8JEYjx.js +0 -1118
  109. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-DEEz7iEu.js +0 -142
  110. package/dist/collection.fn-BqDPyvUe.js +0 -26
  111. package/dist/dto-CstKk_3g.js +0 -216
  112. package/dist/index-_KlH62Ed.js +0 -55
  113. package/dist/object-qECH92oz.js +0 -26
  114. package/dist/objectid-CVxLIQ5K.js +0 -145
  115. package/dist/rule-builder-CIkRKgap.js +0 -102
  116. package/dist/template-wZEVj8lZ.js +0 -236
@@ -1,10 +1,10 @@
1
1
  import { defineComponent as B, ref as O, onMounted as Q, computed as G, resolveComponent as x, openBlock as d, createElementBlock as b, renderSlot as W, toDisplayString as V, createCommentVNode as f, createBlock as u, unref as e, isRef as q, createVNode as h, normalizeClass as Z, watch as X, withCtx as w, resolveDynamicComponent as P, Fragment as _, createElementVNode as k, createTextVNode as ee } from "vue";
2
- import { z as te, l as le } from "./app-_LtKE4PZ.js";
3
- import { Z as r } from "./zod-CzlTW8Al.js";
4
- import { g as oe, f as ae } from "./index-DQ6H1MEw.js";
5
- import { u as I } from "./vue-i18n-BU_SuDqj.js";
6
- import { s as S } from "./effect-DADvE7lZ.js";
7
- import { p as ne } from "./plugins-DYcrIMpx.js";
2
+ import { z as te, l as le } from "./app-DlECkPwT.js";
3
+ import { Z as r } from "./zod-Dcdy9Dm3.js";
4
+ import { g as oe, f as ae } from "./index-rwlkBKrS.js";
5
+ import { u as I } from "./vue-i18n-B-92uhPn.js";
6
+ import { s as S } from "./effect-Bt8PE3-M.js";
7
+ import { p as ne } from "./plugins-YK45gSb1.js";
8
8
  const ie = { class: "flex flex-col gap-8" }, de = {
9
9
  key: 0,
10
10
  class: "fm-typo-en-body-lg-600"
@@ -1,34 +1,35 @@
1
- import { defineComponent as M, ref as P, computed as H, onMounted as q, resolveComponent as m, openBlock as d, createElementBlock as w, Fragment as C, createVNode as i, unref as o, createElementVNode as n, withCtx as v, renderList as z, createBlock as b, resolveDynamicComponent as G, toDisplayString as _, h as k } from "vue";
1
+ import { defineComponent as M, ref as P, computed as H, onMounted as q, resolveComponent as m, openBlock as d, createElementBlock as w, Fragment as C, createVNode as s, unref as o, createElementVNode as n, withCtx as v, renderList as z, createBlock as b, resolveDynamicComponent as G, toDisplayString as _, h as k } from "vue";
2
2
  import { _ as J } from "./campaign-CpzFl8Vr.js";
3
3
  import { useDialog as Q, components as B } from "@feedmepos/ui-library";
4
- import { p as W } from "./plugins-DYcrIMpx.js";
5
- import { u as X } from "./loading-DK8UdxtS.js";
6
- import { u as Y } from "./business-CchrWCX9.js";
7
- import { u as Z, c as u } from "./campaign-D2RzC0L1.js";
8
- import { a as I, b as V, g as ee } from "./campaign-N2x2N6OP.js";
9
- import { u as te, c as oe, p as ae } from "./template-wZEVj8lZ.js";
10
- import { u as ne } from "./vue-i18n-BU_SuDqj.js";
11
- import { _ as re } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
12
- import { _ as se } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bf8Rc-Eh.js";
13
- const ie = { class: "px-24 flex flex-col gap-y-16" }, ce = { class: "flex items-center justify-between w-full" }, le = { class: "flex gap-8 overflow-x-auto" }, me = { class: "space-y-8" }, pe = { class: "flex w-full gap-4 items-center" }, de = { class: "space-y-4" }, ue = { class: "fm-typo-en-body-lg-600" }, fe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ge = { class: "flex items-center gap-8" }, ye = { class: "flex flex-col gap-16 text-center" }, _e = { class: "fm-typo-en-title-sm-800" }, he = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Te = /* @__PURE__ */ M({
4
+ import { p as W } from "./plugins-YK45gSb1.js";
5
+ import { u as X } from "./loading-CxY9qhzD.js";
6
+ import { u as Y } from "./business-BSe9C-xG.js";
7
+ import { u as Z, c as u } from "./campaign-CXw3jpdr.js";
8
+ import { b as I, c as V, a as ee } from "./campaign-BNS2RxKc.js";
9
+ import { c as te, p as oe } from "./duplicateCampaign-Co2TdbrL.js";
10
+ import { u as ae } from "./vue-i18n-B-92uhPn.js";
11
+ import { _ as ne } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
12
+ import { _ as re } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-DAnw5TFZ.js";
13
+ import { u as ie } from "./template-tDq12e1p.js";
14
+ const se = { class: "px-24 flex flex-col gap-y-16" }, ce = { class: "flex items-center justify-between w-full" }, le = { class: "flex gap-8 overflow-x-auto" }, me = { class: "space-y-8" }, pe = { class: "flex w-full gap-4 items-center" }, de = { class: "space-y-4" }, ue = { class: "fm-typo-en-body-lg-600" }, fe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ge = { class: "flex items-center gap-8" }, ye = { class: "flex flex-col gap-16 text-center" }, _e = { class: "fm-typo-en-title-sm-800" }, he = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ne = /* @__PURE__ */ M({
14
15
  __name: "Experience",
15
16
  setup(xe) {
16
- const { t: r } = ne(), T = {
17
+ const { t: r } = ae(), T = {
17
18
  label: r("connect.program.common.actions.create", {
18
19
  type: r("connect.program.experience.title").toLowerCase()
19
20
  }),
20
21
  value: "create",
21
22
  isPrimary: !0,
22
23
  prependIcon: "add"
23
- }, N = te("POINT", Q()), $ = Y(), p = Z(), { global: D, minor: F } = X, c = P({
24
+ }, N = ie("POINT", Q()), $ = Y(), p = Z(), { global: D, minor: F } = X, c = P({
24
25
  searchKey: "",
25
26
  location: []
26
27
  });
27
28
  function K(e) {
28
29
  const t = c.value.location;
29
30
  return !t || t.length === 0 || !e.targetLocation ? !0 : Array.isArray(t) ? t.some((l) => {
30
- var s;
31
- return (s = e == null ? void 0 : e.targetLocation) == null ? void 0 : s.includes(l);
31
+ var i;
32
+ return (i = e == null ? void 0 : e.targetLocation) == null ? void 0 : i.includes(l);
32
33
  }) : e.targetLocation.includes(t);
33
34
  }
34
35
  const f = H(
@@ -90,8 +91,8 @@ const ie = { class: "px-24 flex flex-col gap-y-16" }, ce = { class: "flex items-
90
91
  await t(l);
91
92
  });
92
93
  async function t(l) {
93
- var s;
94
- (s = h.value) == null || s.showSheet(
94
+ var i;
95
+ (i = h.value) == null || i.showSheet(
95
96
  !0,
96
97
  "POINT",
97
98
  e ? await u.readById(e._id) : void 0,
@@ -100,13 +101,13 @@ const ie = { class: "px-24 flex flex-col gap-y-16" }, ce = { class: "flex items-
100
101
  }
101
102
  }
102
103
  async function L(e) {
103
- var s;
104
- if (!await oe(e.name))
104
+ var i;
105
+ if (!await te(e.name))
105
106
  return;
106
- const t = await u.readById(e._id), l = ae(t, {
107
+ const t = await u.readById(e._id), l = oe(t, {
107
108
  keepCollectible: !0
108
109
  });
109
- (s = h.value) == null || s.showSheet(
110
+ (i = h.value) == null || i.showSheet(
110
111
  !0,
111
112
  "POINT",
112
113
  l,
@@ -134,15 +135,15 @@ const ie = { class: "px-24 flex flex-col gap-y-16" }, ce = { class: "flex items-
134
135
  await p.read("POINT");
135
136
  });
136
137
  }), (e, t) => {
137
- const l = m("FmPageHead"), s = m("FmSearch"), R = m("FmTable"), x = m("FmButton"), j = m("FmListItem"), E = m("FmList"), U = m("FmCard");
138
+ const l = m("FmPageHead"), i = m("FmSearch"), R = m("FmTable"), x = m("FmButton"), j = m("FmListItem"), E = m("FmList"), U = m("FmCard");
138
139
  return d(), w(C, null, [
139
- i(l, {
140
+ s(l, {
140
141
  title: o(r)("connect.program.experience.title"),
141
142
  actions: o(f).length > 0 ? [T] : [],
142
143
  "onClick:action": t[0] || (t[0] = () => g())
143
144
  }, null, 8, ["title", "actions"]),
144
- n("div", ie, [
145
- i(s, {
145
+ n("div", se, [
146
+ s(i, {
146
147
  modelValue: o(c).searchKey,
147
148
  "onUpdate:modelValue": t[1] || (t[1] = (a) => o(c).searchKey = a),
148
149
  class: "hidden xs:!block sm:!block border-b-2 border-fm-color-neutral-gray-100",
@@ -152,7 +153,7 @@ const ie = { class: "px-24 flex flex-col gap-y-16" }, ce = { class: "flex items-
152
153
  o(p).campaigns.experience && o(p).campaigns.experience.length > 0 ? (d(), w(C, { key: 0 }, [
153
154
  n("div", ce, [
154
155
  n("div", le, [
155
- i(re, {
156
+ s(ne, {
156
157
  label: `${o(r)("connect.common.location")}: `,
157
158
  "right-icon": "keyboard_arrow_down",
158
159
  modelValue: o(c).location,
@@ -162,7 +163,7 @@ const ie = { class: "px-24 flex flex-col gap-y-16" }, ce = { class: "flex items-
162
163
  items: o($).locationOptions
163
164
  }, null, 8, ["label", "modelValue", "items"])
164
165
  ]),
165
- i(s, {
166
+ s(i, {
166
167
  modelValue: o(c).searchKey,
167
168
  "onUpdate:modelValue": t[3] || (t[3] = (a) => o(c).searchKey = a),
168
169
  class: "xs:hidden sm:hidden",
@@ -170,7 +171,7 @@ const ie = { class: "px-24 flex flex-col gap-y-16" }, ce = { class: "flex items-
170
171
  collapsible: ""
171
172
  }, null, 8, ["modelValue"])
172
173
  ]),
173
- i(R, {
174
+ s(R, {
174
175
  class: "xs:hidden sm:hidden",
175
176
  "row-data": o(f),
176
177
  "column-defs": O,
@@ -179,7 +180,7 @@ const ie = { class: "px-24 flex flex-col gap-y-16" }, ce = { class: "flex items-
179
180
  onRowClick: t[4] || (t[4] = (a) => g(a.original)),
180
181
  "hide-footer": o(f).length < 10
181
182
  }, null, 8, ["row-data", "search-value", "hide-footer"]),
182
- i(E, { class: "hidden xs:!flex sm:!flex flex-col mx-[-24px]" }, {
183
+ s(E, { class: "hidden xs:!flex sm:!flex flex-col mx-[-24px]" }, {
183
184
  default: v(() => [
184
185
  (d(!0), w(C, null, z(o(f).filter(
185
186
  (a) => a.name.toLowerCase().includes(o(c).searchKey.toLowerCase())
@@ -199,7 +200,7 @@ const ie = { class: "px-24 flex flex-col gap-y-16" }, ce = { class: "flex items-
199
200
  ])
200
201
  ]),
201
202
  n("div", ge, [
202
- i(x, {
203
+ s(x, {
203
204
  icon: "content_copy",
204
205
  "icon-color": "neutral-gray-400",
205
206
  variant: "tertiary",
@@ -207,7 +208,7 @@ const ie = { class: "px-24 flex flex-col gap-y-16" }, ce = { class: "flex items-
207
208
  y.stopPropagation(), await L(a);
208
209
  }
209
210
  }, null, 8, ["onClick"]),
210
- i(x, {
211
+ s(x, {
211
212
  icon: "delete",
212
213
  "icon-color": "neutral-gray-400",
213
214
  variant: "tertiary",
@@ -234,7 +235,7 @@ const ie = { class: "px-24 flex flex-col gap-y-16" }, ce = { class: "flex items-
234
235
  n("div", _e, _(o(r)("connect.program.experience.empty_state.title")), 1),
235
236
  n("div", he, _(o(r)("connect.program.experience.empty_state.description")), 1)
236
237
  ]),
237
- i(x, {
238
+ s(x, {
238
239
  variant: "primary",
239
240
  label: "Create experience program",
240
241
  icon: "add",
@@ -243,7 +244,7 @@ const ie = { class: "px-24 flex flex-col gap-y-16" }, ce = { class: "flex items-
243
244
  ]),
244
245
  _: 1
245
246
  })),
246
- i(se, {
247
+ s(re, {
247
248
  ref_key: "sheetRef",
248
249
  ref: h,
249
250
  "onSubmit:modelValue": A
@@ -254,5 +255,5 @@ const ie = { class: "px-24 flex flex-col gap-y-16" }, ce = { class: "flex items-
254
255
  }
255
256
  });
256
257
  export {
257
- Te as default
258
+ Ne as default
258
259
  };
@@ -1,4 +1,4 @@
1
- import { c as s } from "./app-_LtKE4PZ.js";
1
+ import { c as s } from "./app-DlECkPwT.js";
2
2
  var E = { exports: {} };
3
3
  (function(h, j) {
4
4
  (function(p, i) {
@@ -1,17 +1,18 @@
1
1
  import { defineComponent as W, ref as P, computed as J, onMounted as Q, resolveComponent as m, openBlock as f, createElementBlock as V, Fragment as A, createVNode as r, unref as o, withCtx as x, createElementVNode as n, toDisplayString as g, renderList as X, createBlock as L, resolveDynamicComponent as Y, h as c } from "vue";
2
2
  import { _ as Z } from "./campaign-CpzFl8Vr.js";
3
3
  import { useDialog as ee, components as y } from "@feedmepos/ui-library";
4
- import { c as te, p as oe } from "./plugins-DYcrIMpx.js";
5
- import { u as ae } from "./loading-DK8UdxtS.js";
6
- import { u as ne } from "./business-CchrWCX9.js";
7
- import { u as ie, c as _ } from "./campaign-D2RzC0L1.js";
8
- import { a as D, b as G, g as se } from "./campaign-N2x2N6OP.js";
9
- import { c as re, p as le, u as ce } from "./template-wZEVj8lZ.js";
10
- import { _ as me } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
11
- import { _ as de } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bf8Rc-Eh.js";
12
- import { u as ue } from "./vue-i18n-BU_SuDqj.js";
13
- import { _ as pe } from "./SendCollectionSheet.vue_vue_type_script_setup_true_lang-BoEnwoYd.js";
14
- const fe = { class: "flex items-center" }, ge = { class: "fm-typo-en-title-md-600 fm-step-title line-clamp-2 mr-8" }, ye = { class: "px-24 flex flex-col gap-y-16" }, _e = { class: "flex items-center justify-between w-full" }, he = { class: "flex gap-8 overflow-x-auto" }, we = { class: "space-y-8" }, Ce = { class: "flex w-full gap-4 items-center" }, xe = { class: "space-y-4" }, ve = { class: "fm-typo-en-body-lg-600" }, be = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ke = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Fe = { class: "flex items-center gap-8" }, Se = { class: "flex flex-col gap-16 text-center" }, Pe = { class: "fm-typo-en-title-sm-800" }, Ve = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, He = /* @__PURE__ */ W({
4
+ import { c as te, p as oe } from "./plugins-YK45gSb1.js";
5
+ import { u as ae } from "./loading-CxY9qhzD.js";
6
+ import { u as ne } from "./business-BSe9C-xG.js";
7
+ import { u as ie, c as _ } from "./campaign-CXw3jpdr.js";
8
+ import { b as D, c as G, a as se } from "./campaign-BNS2RxKc.js";
9
+ import { c as re, p as le } from "./duplicateCampaign-Co2TdbrL.js";
10
+ import { _ as ce } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
11
+ import { _ as me } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-DAnw5TFZ.js";
12
+ import { u as de } from "./template-tDq12e1p.js";
13
+ import { u as ue } from "./vue-i18n-B-92uhPn.js";
14
+ import { _ as pe } from "./SendCollectionSheet.vue_vue_type_script_setup_true_lang-D69bJtyd.js";
15
+ const fe = { class: "flex items-center" }, ge = { class: "fm-typo-en-title-md-600 fm-step-title line-clamp-2 mr-8" }, ye = { class: "px-24 flex flex-col gap-y-16" }, _e = { class: "flex items-center justify-between w-full" }, he = { class: "flex gap-8 overflow-x-auto" }, we = { class: "space-y-8" }, Ce = { class: "flex w-full gap-4 items-center" }, xe = { class: "space-y-4" }, ve = { class: "fm-typo-en-body-lg-600" }, be = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ke = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Fe = { class: "flex items-center gap-8" }, Se = { class: "flex flex-col gap-16 text-center" }, Pe = { class: "fm-typo-en-title-sm-800" }, Ve = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ne = /* @__PURE__ */ W({
15
16
  __name: "Game",
16
17
  setup(Ae) {
17
18
  const { t: d } = ue(), K = {
@@ -21,7 +22,7 @@ const fe = { class: "flex items-center" }, ge = { class: "fm-typo-en-title-md-60
21
22
  value: "create",
22
23
  isPrimary: !0,
23
24
  prependIcon: "add"
24
- }, B = ee(), U = ce("GAME", B), h = ne(), u = ie(), { global: I, minor: R } = ae, l = P({
25
+ }, B = ee(), U = de("GAME", B), h = ne(), u = ie(), { global: I, minor: R } = ae, l = P({
25
26
  searchKey: "",
26
27
  location: []
27
28
  });
@@ -212,7 +213,7 @@ const fe = { class: "flex items-center" }, ge = { class: "fm-typo-en-title-md-60
212
213
  o(u).campaigns.token && o(u).campaigns.token.length > 0 ? (f(), V(A, { key: 0 }, [
213
214
  n("div", _e, [
214
215
  n("div", he, [
215
- r(me, {
216
+ r(ce, {
216
217
  label: `${o(d)("connect.common.location")}: `,
217
218
  "right-icon": "keyboard_arrow_down",
218
219
  modelValue: o(l).location,
@@ -310,7 +311,7 @@ const fe = { class: "flex items-center" }, ge = { class: "fm-typo-en-title-md-60
310
311
  ]),
311
312
  _: 1
312
313
  })),
313
- r(de, {
314
+ r(me, {
314
315
  ref_key: "sheetRef",
315
316
  ref: v,
316
317
  "onSubmit:modelValue": H
@@ -325,5 +326,5 @@ const fe = { class: "flex items-center" }, ge = { class: "fm-typo-en-title-md-60
325
326
  }
326
327
  });
327
328
  export {
328
- He as default
329
+ Ne as default
329
330
  };
@@ -0,0 +1,300 @@
1
+ import { defineComponent as q, ref as L, computed as z, h as J, onMounted as Q, resolveComponent as u, openBlock as f, createElementBlock as k, Fragment as F, createVNode as l, unref as i, withCtx as x, createElementVNode as m, renderList as W, createBlock as O, resolveDynamicComponent as X, toDisplayString as Y } from "vue";
2
+ import { _ as Z } from "./campaign-CpzFl8Vr.js";
3
+ import { useDialog as ee, components as te } from "@feedmepos/ui-library";
4
+ import { p as P } from "./plugins-YK45gSb1.js";
5
+ import { u as oe } from "./loading-CxY9qhzD.js";
6
+ import { u as ne } from "./business-BSe9C-xG.js";
7
+ import { u as ae, c as C } from "./campaign-CXw3jpdr.js";
8
+ import { u as se } from "./vue-i18n-B-92uhPn.js";
9
+ import { h as d } from "./moment-D7p2TMB-.js";
10
+ import { a as re, b as V } from "./campaign-BNS2RxKc.js";
11
+ import { s as ie, _ as ce } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-DAnw5TFZ.js";
12
+ import { u as le } from "./template-tDq12e1p.js";
13
+ import { _ as $ } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
14
+ const me = { class: "px-24 flex flex-col gap-y-16" }, ue = { class: "flex items-center justify-between w-full" }, de = { class: "flex gap-8 overflow-x-auto" }, pe = { class: "space-y-8" }, fe = { class: "flex w-full gap-4 items-center" }, ge = { class: "flex flex-col gap-16 text-center" }, ye = { class: "fm-typo-en-title-sm-800" }, be = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ye = /* @__PURE__ */ q({
15
+ __name: "Grab",
16
+ setup(_e) {
17
+ const { t: o } = se(), I = {
18
+ label: o("connect.grab.createCampaign"),
19
+ value: "create",
20
+ isPrimary: !0,
21
+ prependIcon: "add"
22
+ }, A = le("GRAB", ee()), S = ne(), g = ae(), { global: R, minor: T } = oe, K = [
23
+ {
24
+ label: "Bill promotion",
25
+ value: "BILL"
26
+ },
27
+ {
28
+ label: "Item promotion",
29
+ value: "ITEM"
30
+ }
31
+ ], c = L({
32
+ searchKey: "",
33
+ location: [],
34
+ effectType: []
35
+ });
36
+ function E(e) {
37
+ const t = c.value.location;
38
+ return !t || t.length === 0 || !e.targetLocation ? !0 : Array.isArray(t) ? t.some((a) => {
39
+ var r;
40
+ return (r = e == null ? void 0 : e.targetLocation) == null ? void 0 : r.includes(a);
41
+ }) : e.targetLocation.includes(t);
42
+ }
43
+ function j(e) {
44
+ var r, s;
45
+ const t = c.value.effectType;
46
+ if (!t || t.length === 0) return !0;
47
+ const a = (s = (r = e.effect) == null ? void 0 : r.options) == null ? void 0 : s.target;
48
+ return t.includes(a);
49
+ }
50
+ const p = z(
51
+ () => g.campaigns.grab.filter(
52
+ (e) => E(e) && j(e)
53
+ )
54
+ ), G = [
55
+ {
56
+ header: o("connect.grab.promotionTitle"),
57
+ accessorFn: (e) => e.name
58
+ },
59
+ {
60
+ header: o("connect.grab.period"),
61
+ accessorFn: (e) => {
62
+ const t = d(e.timeframeOptions.start).format("DD/MM/YYYY"), a = d(e.timeframeOptions.end).format("DD/MM/YYYY");
63
+ return `${t} - ${a}`;
64
+ }
65
+ },
66
+ {
67
+ header: o("connect.grab.status"),
68
+ accessorFn: (e) => re(e),
69
+ cell(e) {
70
+ return V(e.row.original);
71
+ }
72
+ },
73
+ {
74
+ header: o("connect.grab.summary"),
75
+ cell(e) {
76
+ const t = ie(e.row.original.discount);
77
+ return t ? `${t.type} - ${t.adjustment}` : "-";
78
+ }
79
+ },
80
+ {
81
+ header: o("connect.grab.actions"),
82
+ cell(e) {
83
+ return J(te.FmButton, {
84
+ variant: "tertiary",
85
+ icon: "delete",
86
+ iconColor: "neutral-gray-400",
87
+ onClick: (t) => {
88
+ t.stopPropagation(), D(e.row.original);
89
+ }
90
+ });
91
+ }
92
+ }
93
+ ], B = L();
94
+ async function D(e) {
95
+ await P.remove(o("connect.grab.confirmRemove", { name: e.name })) && await T(
96
+ async () => {
97
+ await C.delete(e._id), await g.read("PROMOTION");
98
+ },
99
+ {
100
+ message: o("connect.grab.removing", { name: e.name }),
101
+ successMessage: o("connect.grab.removedSuccessfully", {
102
+ name: e.name
103
+ })
104
+ }
105
+ );
106
+ }
107
+ async function b(e) {
108
+ e ? await t() : A.open(async (a) => {
109
+ await t(a);
110
+ });
111
+ async function t(a) {
112
+ var r;
113
+ (r = B.value) == null || r.showSheet(
114
+ !0,
115
+ "GRAB",
116
+ e ? await C.readById(e._id) : void 0,
117
+ a
118
+ );
119
+ }
120
+ }
121
+ async function N(e) {
122
+ var a;
123
+ const t = await U(e.campaign);
124
+ if (t.length > 0) {
125
+ const r = t.map(
126
+ (s) => `"${s.name}" (${d(s.timeframeOptions.start).format("DD/MM/YYYY")} - ${d(s.timeframeOptions.end).format("DD/MM/YYYY")})`
127
+ ).join(`
128
+ `);
129
+ return await ((a = P.dialog) == null ? void 0 : a.open({
130
+ title: o("connect.grab.conflictDetected"),
131
+ message: o("connect.grab.conflictMessage", {
132
+ conflicts: r
133
+ }),
134
+ closeButton: !0,
135
+ overlay: !0,
136
+ primaryActions: {
137
+ close: !0,
138
+ text: "OK"
139
+ }
140
+ })), !1;
141
+ }
142
+ await T(
143
+ async () => (e.campaign._id ? await C.update(e.campaign._id, e) : await C.create(e), await g.read("PROMOTION"), !0),
144
+ {
145
+ message: o(
146
+ e.campaign._id ? "connect.grab.updating" : "connect.grab.creating"
147
+ ),
148
+ successMessage: o(
149
+ e.campaign._id ? "connect.grab.updatedSuccessfully" : "connect.grab.createdSuccessfully"
150
+ )
151
+ }
152
+ );
153
+ }
154
+ async function U(e) {
155
+ const t = g.campaigns.grab, a = [], r = !!e._id;
156
+ for (const s of t) {
157
+ if (r && s._id === e._id) continue;
158
+ const _ = d(e.timeframeOptions.start), y = d(e.timeframeOptions.end), h = d(s.timeframeOptions.start), v = d(s.timeframeOptions.end);
159
+ if (_.isBefore(v) && y.isAfter(h) || h.isBefore(y) && v.isAfter(_)) {
160
+ const n = e.discount, w = s.discount;
161
+ n.scope.type === w.scope.type && a.push(s);
162
+ }
163
+ }
164
+ return a;
165
+ }
166
+ async function H(e) {
167
+ switch (e) {
168
+ case "create":
169
+ b();
170
+ break;
171
+ }
172
+ }
173
+ return Q(async () => {
174
+ await R(async () => {
175
+ await S.readLocations(), await g.read("PROMOTION");
176
+ });
177
+ }), (e, t) => {
178
+ const a = u("FmPill"), r = u("FmPageHead"), s = u("FmSearch"), _ = u("FmTable"), y = u("FmButton"), h = u("FmListItem"), v = u("FmList"), M = u("FmCard");
179
+ return f(), k(F, null, [
180
+ l(r, {
181
+ title: i(o)("connect.grab.title"),
182
+ actions: i(p).length > 0 ? [I] : [],
183
+ "onClick:action": H
184
+ }, {
185
+ prepend: x(() => [
186
+ l(a, { variant: "beta" }),
187
+ l(a, { variant: "premium" })
188
+ ]),
189
+ _: 1
190
+ }, 8, ["title", "actions"]),
191
+ m("div", me, [
192
+ l(s, {
193
+ modelValue: c.value.searchKey,
194
+ "onUpdate:modelValue": t[0] || (t[0] = (n) => c.value.searchKey = n),
195
+ class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
196
+ placeholder: i(o)("connect.grab.search"),
197
+ collapsible: ""
198
+ }, null, 8, ["modelValue", "placeholder"]),
199
+ i(p) && i(p).length > 0 ? (f(), k(F, { key: 0 }, [
200
+ m("div", ue, [
201
+ m("div", de, [
202
+ l($, {
203
+ label: `${i(o)("connect.common.location")}: `,
204
+ "right-icon": "keyboard_arrow_down",
205
+ modelValue: c.value.location,
206
+ "onUpdate:modelValue": t[1] || (t[1] = (n) => c.value.location = n),
207
+ icon: "storefront",
208
+ "show-item-label": !0,
209
+ items: i(S).locationOptions
210
+ }, null, 8, ["label", "modelValue", "items"]),
211
+ l($, {
212
+ label: "Type:",
213
+ "right-icon": "keyboard_arrow_down",
214
+ modelValue: c.value.effectType,
215
+ "onUpdate:modelValue": t[2] || (t[2] = (n) => c.value.effectType = n),
216
+ icon: "filter_list",
217
+ "show-item-label": !0,
218
+ items: K
219
+ }, null, 8, ["modelValue"])
220
+ ]),
221
+ l(s, {
222
+ modelValue: c.value.searchKey,
223
+ "onUpdate:modelValue": t[3] || (t[3] = (n) => c.value.searchKey = n),
224
+ class: "xs:hidden",
225
+ placeholder: "search",
226
+ collapsible: ""
227
+ }, null, 8, ["modelValue"])
228
+ ]),
229
+ l(_, {
230
+ class: "xs:hidden",
231
+ "row-data": i(p),
232
+ "column-defs": G,
233
+ "search-value": c.value.searchKey,
234
+ "column-filter": [],
235
+ onRowClick: t[4] || (t[4] = (n) => b(n.original)),
236
+ "hide-footer": i(p).length < 10
237
+ }, null, 8, ["row-data", "search-value", "hide-footer"]),
238
+ l(v, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
239
+ default: x(() => [
240
+ (f(!0), k(F, null, W(i(p).filter(
241
+ (n) => n.name.toLowerCase().includes(c.value.searchKey.toLowerCase())
242
+ ), (n) => (f(), O(h, {
243
+ key: n._id.toString(),
244
+ onClick: (w) => b(n),
245
+ class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
246
+ }, {
247
+ default: x(() => [
248
+ m("div", pe, [
249
+ m("div", fe, [
250
+ (f(), O(X(i(V)(n))))
251
+ ])
252
+ ]),
253
+ l(y, {
254
+ icon: "delete",
255
+ "icon-color": "neutral-gray-400",
256
+ variant: "tertiary",
257
+ onClick: (w) => (w.stopPropagation(), D(n))
258
+ }, null, 8, ["onClick"])
259
+ ]),
260
+ _: 2
261
+ }, 1032, ["onClick"]))), 128))
262
+ ]),
263
+ _: 1
264
+ })
265
+ ], 64)) : (f(), O(M, {
266
+ key: 1,
267
+ variant: "outlined",
268
+ class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
269
+ }, {
270
+ default: x(() => [
271
+ t[6] || (t[6] = m("img", {
272
+ src: Z,
273
+ class: "aspect-square w-[150px]"
274
+ }, null, -1)),
275
+ m("div", ge, [
276
+ m("div", ye, Y(i(o)("connect.grab.createPromotionCampaign")), 1),
277
+ m("div", be, Y(i(o)("connect.grab.description")), 1)
278
+ ]),
279
+ l(y, {
280
+ variant: "primary",
281
+ label: i(o)("connect.grab.createPromotionCampaign"),
282
+ icon: "add",
283
+ onClick: t[5] || (t[5] = (n) => b())
284
+ }, null, 8, ["label"])
285
+ ]),
286
+ _: 1
287
+ }))
288
+ ]),
289
+ l(ce, {
290
+ ref_key: "sheetRef",
291
+ ref: B,
292
+ "onSubmit:modelValue": N
293
+ }, null, 512)
294
+ ], 64);
295
+ };
296
+ }
297
+ });
298
+ export {
299
+ Ye as default
300
+ };
@@ -1,5 +1,5 @@
1
1
  import { openBlock as l, createElementBlock as o, createElementVNode as r, defineComponent as $, ref as b, onMounted as I, resolveComponent as f, renderSlot as x, toDisplayString as s, createCommentVNode as h, normalizeStyle as V, unref as i, Fragment as w, createVNode as F, withCtx as g, createTextVNode as p, normalizeClass as z, createBlock as k } from "vue";
2
- import { u as R } from "./vue-i18n-BU_SuDqj.js";
2
+ import { u as R } from "./vue-i18n-B-92uhPn.js";
3
3
  import { _ as H } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
4
  const N = {}, D = { class: "animate-pulse flex space-x-4 bg-gray-300 dark:bg-gray-700 items-center justify-center rounded w-full h-full" };
5
5
  function L(e, d) {
@@ -1,16 +1,16 @@
1
1
  import { defineComponent as U, ref as g, watch as O, onMounted as I, resolveComponent as m, openBlock as b, createBlock as j, withCtx as P, createTextVNode as z, toDisplayString as B, createElementVNode as c, createVNode as o, unref as e, createElementBlock as F, createCommentVNode as W, normalizeClass as G, computed as L, Fragment as q, isRef as J } from "vue";
2
- import { u as H } from "./vue-i18n-BU_SuDqj.js";
3
- import "./index-Bc-pgOn6.js";
2
+ import { u as H } from "./vue-i18n-B-92uhPn.js";
3
+ import "./index-DDp0nMys.js";
4
4
  import { useRouter as K } from "vue-router";
5
- import { u as Q } from "./loading-DK8UdxtS.js";
6
- import { f as V, p as X } from "./plugins-DYcrIMpx.js";
7
- import { u as Y, _ as Z } from "./RewardGroup.vue_vue_type_script_setup_true_lang-Dtosx1wE.js";
5
+ import { u as Q } from "./loading-CxY9qhzD.js";
6
+ import { f as V, p as X } from "./plugins-YK45gSb1.js";
7
+ import { u as Y, _ as Z } from "./RewardGroup.vue_vue_type_script_setup_true_lang-DW-WFNI6.js";
8
8
  import { useDialog as ee, useSnackbar as ne, FmButtonVariant as p } from "@feedmepos/ui-library";
9
- import { r as N } from "./index-XJX8_Wlh.js";
10
- import { u as ae } from "./reward-uQ8Oz8Fd.js";
11
- import { u as oe } from "./business-CchrWCX9.js";
12
- import { u as te } from "./membership-Cs4GzRnn.js";
13
- import { R as $ } from "./app-_LtKE4PZ.js";
9
+ import { r as N } from "./index-SsUBL4IR.js";
10
+ import { u as ae } from "./reward-3aFPahH6.js";
11
+ import { u as oe } from "./business-BSe9C-xG.js";
12
+ import { u as te } from "./membership-BoQMuerb.js";
13
+ import { R as $ } from "./app-DlECkPwT.js";
14
14
  const re = { class: "space-y-24" }, le = {
15
15
  key: 0,
16
16
  class: /* @__PURE__ */ G([
@@ -0,0 +1,48 @@
1
+ import { defineComponent as g, openBlock as t, createElementBlock as o, createElementVNode as i, toDisplayString as r, unref as c, createCommentVNode as m, Fragment as y, renderList as _, normalizeClass as d, createVNode as b } from "vue";
2
+ import { u as x } from "./vue-i18n-B-92uhPn.js";
3
+ import { components as h } from "@feedmepos/ui-library";
4
+ const k = { class: "border-t border-fm-color-neutral-gray-200 bg-fm-color-neutral-gray-50 p-12 flex flex-col gap-8" }, v = { class: "fm-typo-en-body-sm-600 text-fm-color-neutral-gray-500 px-4" }, S = {
5
+ key: 0,
6
+ class: "fm-typo-en-body-sm-400 text-fm-color-neutral-gray-400 px-4 py-8"
7
+ }, C = ["onClick"], I = { class: "fm-typo-en-body-md-400 flex-1 truncate" }, L = {
8
+ key: 0,
9
+ class: "fm-typo-en-body-sm-400 text-fm-color-neutral-gray-400 shrink-0"
10
+ }, F = /* @__PURE__ */ g({
11
+ __name: "LocationPicker",
12
+ props: {
13
+ locations: {},
14
+ selectedIds: {}
15
+ },
16
+ emits: ["toggle"],
17
+ setup(n, { emit: p }) {
18
+ const f = n, { t: a } = x(), u = p;
19
+ function s(l) {
20
+ return f.selectedIds.includes(l);
21
+ }
22
+ return (l, w) => (t(), o("div", k, [
23
+ i("p", v, r(c(a)("connect.review.selectLocations")), 1),
24
+ n.locations.length === 0 ? (t(), o("p", S, r(c(a)("connect.review.noAvailableLocations")), 1)) : m("", !0),
25
+ (t(!0), o(y, null, _(n.locations, (e) => (t(), o("button", {
26
+ key: e._id.toString(),
27
+ class: d([
28
+ "flex items-center gap-12 p-12 rounded-lg bg-white border text-left transition-colors",
29
+ s(e._id.toString()) ? "border-fm-color-primary-500 bg-fm-color-primary-50" : "border-fm-color-neutral-gray-200 hover:border-fm-color-primary-300"
30
+ ]),
31
+ onClick: (N) => u("toggle", e)
32
+ }, [
33
+ b(c(h).FmIcon, {
34
+ name: s(e._id.toString()) ? "check_box" : "check_box_outline_blank",
35
+ class: d([
36
+ s(e._id.toString()) ? "text-fm-color-primary-500" : "text-fm-color-neutral-gray-300",
37
+ "shrink-0"
38
+ ])
39
+ }, null, 8, ["name", "class"]),
40
+ i("span", I, r(e.name), 1),
41
+ e.code ? (t(), o("span", L, r(e.code), 1)) : m("", !0)
42
+ ], 10, C))), 128))
43
+ ]));
44
+ }
45
+ });
46
+ export {
47
+ F as _
48
+ };