@feedmepos/mf-payment 1.3.8 → 1.3.9

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 (56) hide show
  1. package/dist/{OnboardForm-Bwa0XrSf.js → OnboardForm-BlBxXNvQ.js} +4 -4
  2. package/dist/{OnboardForm-DG20No3N.js → OnboardForm-C0YWCDXr.js} +4 -4
  3. package/dist/{OnboardSubmission-BT-hcj-T.js → OnboardSubmission-BUH9EBp9.js} +5 -5
  4. package/dist/{OnboardSubmission-Co9LMiR3.js → OnboardSubmission-BxLJ76Gd.js} +2 -2
  5. package/dist/{PayoutAccount-Jw1n7oj7.js → PayoutAccount-D6TQgPUP.js} +5 -5
  6. package/dist/{PayoutAccount-DSAFBG0R.js → PayoutAccount-DC_bIwCU.js} +5 -5
  7. package/dist/{PayoutAccountSetting-CHRrrPyM.js → PayoutAccountSetting-cePknwDI.js} +3 -3
  8. package/dist/{Restaurant-B4_By3gk.js → Restaurant-B7pxOPfA.js} +4 -4
  9. package/dist/{RestaurantSetting-Dub_-JlB.js → RestaurantSetting-D6KMzqFP.js} +3 -3
  10. package/dist/{Settlement-Y9WvXhNL.js → Settlement-Bth8Ui2Z.js} +3 -3
  11. package/dist/{Settlement-CZ8pzFMH.js → Settlement-IeUvfy80.js} +3 -3
  12. package/dist/{SettlementTransactions-CYKZ3qJR.js → SettlementTransactions-D8KcC1xS.js} +3 -3
  13. package/dist/{SettlementTransactions-CT7yHI03.js → SettlementTransactions-DZGFok3q.js} +3 -3
  14. package/dist/{Status.vue_vue_type_script_setup_true_lang-knGxQsIT.js → Status.vue_vue_type_script_setup_true_lang-DJqdH669.js} +1 -1
  15. package/dist/{Terminal-DpU8bG_E.js → Terminal-CBpKZr2A.js} +5 -5
  16. package/dist/{TerminalSetting-ayjTqDOf.js → TerminalSetting-ClzbzycY.js} +498 -379
  17. package/dist/{Transaction-BglDJkA1.js → Transaction-BVDi8UBy.js} +6 -6
  18. package/dist/{Transaction-BhaE4B7P.js → Transaction-DqMCm2X7.js} +5 -5
  19. package/dist/{TransactionOld-lu-6Wsl0.js → TransactionOld-DNeC5gfJ.js} +4 -4
  20. package/dist/{TransactionTable.vue_vue_type_script_setup_true_lang-DwsA4v2y.js → TransactionTable.vue_vue_type_script_setup_true_lang-Dp26HmG3.js} +3 -3
  21. package/dist/{app-DmL14Ep1.js → app-CU0L5rLn.js} +151 -151
  22. package/dist/app.js +1 -1
  23. package/dist/{assets-CXWjWs3-.js → assets-DWVOr5nK.js} +1 -1
  24. package/dist/{grafana-DMIeh04o.js → grafana-BjVYzsSk.js} +1 -1
  25. package/dist/{index-DYisiI7M.js → index-2Lq-dday.js} +1 -1
  26. package/dist/{index-CggStwHL.js → index-BaS5NvBk.js} +8423 -8356
  27. package/dist/{index-DXzy1nT_.js → index-BuuwDeHB.js} +1 -1
  28. package/dist/{index-BUbV9yXt.js → index-C3ELtK6q.js} +1 -1
  29. package/dist/{index-LG8BpXxO.js → index-C7_F7LKb.js} +1 -1
  30. package/dist/{index-JNNpGY70.js → index-DG_Tv3TM.js} +1 -1
  31. package/dist/{index-CGy1NcLx.js → index-DOFcxZxn.js} +2 -2
  32. package/dist/{index.vue_vue_type_script_setup_true_lang-roF28cJy.js → index.vue_vue_type_script_setup_true_lang-DZpYH6rl.js} +1 -1
  33. package/dist/package.json +2 -2
  34. package/dist/{payout-account-BybhA8NS.js → payout-account-CbmGMzzE.js} +3 -3
  35. package/dist/{plugins-DeB38m6w.js → plugins-C_ElAUdX.js} +1 -1
  36. package/dist/tsconfig.app.tsbuildinfo +1 -1
  37. package/dist/views/admin/payout-account/tabs/PaymentChannel.vue.d.ts +4 -4
  38. package/dist/views/admin/payout-account/tabs/PaymentGateway.vue.d.ts +4 -4
  39. package/dist/views/admin/payout-account/tabs/TokenGateway.vue.d.ts +4 -4
  40. package/dist/views/admin/payout-account/tabs/token/GooglePayToken.vue.d.ts +2 -2
  41. package/dist/views/admin/terminal/TerminalDialog.vue.d.ts +12 -2
  42. package/dist/views/admin/terminal/tabs/EcrGateway.vue.d.ts +12 -2
  43. package/dist/views/admin/terminal/tabs/Information.vue.d.ts +12 -2
  44. package/dist/views/admin/terminal/tabs/QrGateway.vue.d.ts +12 -2
  45. package/dist/views/admin/terminal/tabs/SettingRequest.vue.d.ts +12 -2
  46. package/dist/views/admin/terminal/tabs/SoftposGateway.vue.d.ts +12 -2
  47. package/dist/views/admin/terminal/tabs/ecr/GhlGateway.vue.d.ts +12 -2
  48. package/dist/views/admin/terminal/tabs/ecr/KBankGateway.vue.d.ts +184 -0
  49. package/dist/views/admin/terminal/tabs/ecr/Maybank2Gateway.vue.d.ts +12 -2
  50. package/dist/views/admin/terminal/tabs/ecr/Maybank3Gateway.vue.d.ts +12 -2
  51. package/dist/views/admin/terminal/tabs/ecr/MaybankGateway.vue.d.ts +12 -2
  52. package/dist/views/admin/terminal/tabs/ecr/NetsGateway.vue.d.ts +12 -2
  53. package/dist/views/admin/terminal/tabs/ecr/TerminalGateway.vue.d.ts +12 -2
  54. package/dist/views/admin/terminal/tabs/qr/PromptPayGateway.vue.d.ts +12 -2
  55. package/dist/views/admin/terminal/tabs/settings/KioskMode.vue.d.ts +12 -2
  56. package/package.json +2 -2
@@ -1,14 +1,14 @@
1
- import { defineComponent as U, openBlock as f, createElementBlock as V, Fragment as q, createElementVNode as I, createTextVNode as D, toDisplayString as A, ref as F, resolveComponent as g, createVNode as p, createCommentVNode as C, unref as N, computed as M, isRef as B, createBlock as w, resolveDynamicComponent as Y, normalizeProps as h, mergeProps as L, toRef as R, watch as $, onMounted as O, withCtx as P, renderList as K } from "vue";
2
- import { u as z, e as S } from "./index-CggStwHL.js";
1
+ import { defineComponent as V, openBlock as f, createElementBlock as N, Fragment as M, createElementVNode as _, createTextVNode as A, toDisplayString as B, ref as I, resolveComponent as g, createVNode as v, createCommentVNode as C, unref as S, computed as q, isRef as h, createBlock as w, resolveDynamicComponent as Y, normalizeProps as K, mergeProps as L, toRef as $, watch as P, onMounted as O, withCtx as R, renderList as G } from "vue";
2
+ import { u as z, e as U } from "./index-BaS5NvBk.js";
3
3
  import { useRouter as W } from "vue-router";
4
- import { t as G } from "./index-JNNpGY70.js";
4
+ import { t as D } from "./index-DG_Tv3TM.js";
5
5
  import { _ as X } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
6
- import { u as E } from "./index-BUbV9yXt.js";
7
- import { useSnackbar as H } from "@feedmepos/ui-library";
6
+ import { u as E } from "./index-C3ELtK6q.js";
7
+ import { useSnackbar as Q } from "@feedmepos/ui-library";
8
8
  import { u as Z } from "./error-K1CakhA9.js";
9
9
  import { useCoreStore as j } from "@feedmepos/mf-common";
10
10
  import { z as ee, a as ae } from "./validator-D5jtpt9A.js";
11
- const te = /* @__PURE__ */ U({
11
+ const te = /* @__PURE__ */ V({
12
12
  __name: "Information",
13
13
  props: {
14
14
  terminal: {
@@ -16,23 +16,23 @@ const te = /* @__PURE__ */ U({
16
16
  required: !0
17
17
  }
18
18
  },
19
- setup(_) {
20
- return (m, a) => (f(), V(q, null, [
21
- a[0] || (a[0] = I("b", null, "Name", -1)),
22
- D(": " + A(_.terminal.name), 1),
23
- a[1] || (a[1] = I("br", null, null, -1)),
24
- a[2] || (a[2] = I("b", null, "Status", -1)),
25
- D(": " + A(_.terminal.status), 1),
26
- a[3] || (a[3] = I("br", null, null, -1)),
27
- a[4] || (a[4] = I("b", null, "Device ID", -1)),
28
- D(": " + A(_.terminal.deviceId ?? "-"), 1),
29
- a[5] || (a[5] = I("br", null, null, -1)),
30
- a[6] || (a[6] = I("b", null, "Device Type", -1)),
31
- D(": " + A(_.terminal.deviceType ?? "-"), 1),
32
- a[7] || (a[7] = I("br", null, null, -1))
19
+ setup(F) {
20
+ return (d, a) => (f(), N(M, null, [
21
+ a[0] || (a[0] = _("b", null, "Name", -1)),
22
+ A(": " + B(F.terminal.name), 1),
23
+ a[1] || (a[1] = _("br", null, null, -1)),
24
+ a[2] || (a[2] = _("b", null, "Status", -1)),
25
+ A(": " + B(F.terminal.status), 1),
26
+ a[3] || (a[3] = _("br", null, null, -1)),
27
+ a[4] || (a[4] = _("b", null, "Device ID", -1)),
28
+ A(": " + B(F.terminal.deviceId ?? "-"), 1),
29
+ a[5] || (a[5] = _("br", null, null, -1)),
30
+ a[6] || (a[6] = _("b", null, "Device Type", -1)),
31
+ A(": " + B(F.terminal.deviceType ?? "-"), 1),
32
+ a[7] || (a[7] = _("br", null, null, -1))
33
33
  ], 64));
34
34
  }
35
- }), le = { key: 0 }, ne = { class: "mt-6 space-x-6" }, oe = /* @__PURE__ */ U({
35
+ }), le = { key: 0 }, ne = { class: "mt-6 space-x-6" }, oe = /* @__PURE__ */ V({
36
36
  __name: "KioskMode",
37
37
  props: {
38
38
  terminal: {
@@ -40,58 +40,58 @@ const te = /* @__PURE__ */ U({
40
40
  required: !0
41
41
  }
42
42
  },
43
- setup(_) {
44
- const { isLoading: m, startAsyncCall: a } = z(!1), b = H(), n = F({
43
+ setup(F) {
44
+ const { isLoading: d, startAsyncCall: a } = z(!1), b = Q(), n = I({
45
45
  enable: !1,
46
46
  password: []
47
- }), o = _;
47
+ }), r = F;
48
48
  function e() {
49
- return n.value.enable && n.value.password.filter((d) => !!d).length !== 6 ? b.open({
49
+ return n.value.enable && n.value.password.filter((m) => !!m).length !== 6 ? b.open({
50
50
  type: "error",
51
51
  message: "Unlock PIN is required when setting up kiosk mode for terminal."
52
52
  }) : a(async () => {
53
- const d = { enable: n.value.enable };
54
- d.enable && Object.assign(d, {
53
+ const m = { enable: n.value.enable };
54
+ m.enable && Object.assign(m, {
55
55
  password: n.value.password.join("")
56
56
  });
57
- const s = await G.kioskModeRequest(o.terminal._id, d);
57
+ const s = await D.kioskModeRequest(r.terminal._id, m);
58
58
  if (s === "OK")
59
59
  return b.open({ type: "info", message: "Kiosk mode applied successfully." });
60
- let v = s;
61
- return s === "client_not_connected" && (v = "Terminal not connected to the websocket server."), s.startsWith("terminal: ") && (v = s.replaceAll("terminal: ", "")), b.open({
60
+ let y = s;
61
+ return s === "client_not_connected" && (y = "Terminal not connected to the websocket server."), s.startsWith("terminal: ") && (y = s.replaceAll("terminal: ", "")), b.open({
62
62
  type: "error",
63
- message: v
63
+ message: y
64
64
  });
65
65
  });
66
66
  }
67
- return (d, s) => {
68
- const v = g("FmSwitch"), c = g("FmPinField"), i = g("FmButton");
69
- return f(), V(q, null, [
70
- p(v, {
67
+ return (m, s) => {
68
+ const y = g("FmSwitch"), c = g("FmPinField"), i = g("FmButton");
69
+ return f(), N(M, null, [
70
+ v(y, {
71
71
  modelValue: n.value.enable,
72
72
  "onUpdate:modelValue": s[0] || (s[0] = (t) => n.value.enable = t),
73
73
  label: "Enable Kiosk Mode?"
74
74
  }, null, 8, ["modelValue"]),
75
- n.value.enable ? (f(), V("div", le, [
76
- s[2] || (s[2] = I("p", { class: "mt-6" }, "Unlock PIN: ", -1)),
77
- p(c, {
75
+ n.value.enable ? (f(), N("div", le, [
76
+ s[2] || (s[2] = _("p", { class: "mt-6" }, "Unlock PIN: ", -1)),
77
+ v(c, {
78
78
  modelValue: n.value.password,
79
79
  "onUpdate:modelValue": s[1] || (s[1] = (t) => n.value.password = t)
80
80
  }, null, 8, ["modelValue"])
81
81
  ])) : C("", !0),
82
- I("div", ne, [
83
- p(i, {
82
+ _("div", ne, [
83
+ v(i, {
84
84
  variant: "primary",
85
85
  label: "Send",
86
86
  icon: "send",
87
- loading: N(m),
87
+ loading: S(d),
88
88
  onclick: e
89
89
  }, null, 8, ["loading"])
90
90
  ])
91
91
  ], 64);
92
92
  };
93
93
  }
94
- }), re = /* @__PURE__ */ U({
94
+ }), re = /* @__PURE__ */ V({
95
95
  __name: "SettingRequest",
96
96
  props: {
97
97
  terminal: {
@@ -99,8 +99,8 @@ const te = /* @__PURE__ */ U({
99
99
  required: !0
100
100
  }
101
101
  },
102
- setup(_) {
103
- const { settingTab: m } = E({
102
+ setup(F) {
103
+ const { settingTab: d } = E({
104
104
  settingTab: "kiosk_mode"
105
105
  }), a = [
106
106
  {
@@ -108,29 +108,29 @@ const te = /* @__PURE__ */ U({
108
108
  value: "kiosk_mode",
109
109
  render: oe
110
110
  }
111
- ], b = _, n = M(() => a.find((o) => o.value === m.value));
112
- return (o, e) => {
111
+ ], b = F, n = q(() => a.find((r) => r.value === d.value));
112
+ return (r, e) => {
113
113
  var s;
114
- const d = g("FmTabs");
115
- return f(), V(q, null, [
116
- e[1] || (e[1] = I("p", { className: "mt-1 my-6 text-gray-600" }, [
117
- I("b", null, "Note: "),
118
- D(" Setting request will perform remotely without caching so make sure terminal is connected to the network also to our websocket as well. ")
114
+ const m = g("FmTabs");
115
+ return f(), N(M, null, [
116
+ e[1] || (e[1] = _("p", { className: "mt-1 my-6 text-gray-600" }, [
117
+ _("b", null, "Note: "),
118
+ A(" Setting request will perform remotely without caching so make sure terminal is connected to the network also to our websocket as well. ")
119
119
  ], -1)),
120
- p(d, {
121
- "model-value": N(m),
122
- "onUpdate:modelValue": e[0] || (e[0] = (v) => B(m) ? m.value = v : null),
120
+ v(m, {
121
+ "model-value": S(d),
122
+ "onUpdate:modelValue": e[0] || (e[0] = (y) => h(d) ? d.value = y : null),
123
123
  class: "mb-6",
124
124
  items: a
125
125
  }, null, 8, ["model-value"]),
126
- N(m) ? (f(), w(Y((s = n.value) == null ? void 0 : s.render), h(L({ key: 0 }, { terminal: b.terminal })), null, 16)) : C("", !0)
126
+ S(d) ? (f(), w(Y((s = n.value) == null ? void 0 : s.render), K(L({ key: 0 }, { terminal: b.terminal })), null, 16)) : C("", !0)
127
127
  ], 64);
128
128
  };
129
129
  }
130
130
  }), ue = {
131
131
  key: 0,
132
132
  class: "text-sm text-gray-500"
133
- }, se = { class: "flex mt-6 space-x-6" }, ie = /* @__PURE__ */ U({
133
+ }, ie = { class: "flex mt-6 space-x-6" }, se = /* @__PURE__ */ V({
134
134
  __name: "SoftposGateway",
135
135
  props: {
136
136
  terminal: {
@@ -142,12 +142,12 @@ const te = /* @__PURE__ */ U({
142
142
  required: !0
143
143
  }
144
144
  },
145
- setup(_) {
146
- const m = _, a = j().currentCountry, b = [
145
+ setup(F) {
146
+ const d = F, a = j().currentCountry, b = [
147
147
  {
148
148
  label: "Fiuu Malaysia",
149
149
  value: "cc.feedme.payment.rms",
150
- region: S.F_COUNTRY.enum.MY,
150
+ region: U.F_COUNTRY.enum.MY,
151
151
  gateway: "Fiuu",
152
152
  isLegacy: !0,
153
153
  isOutdated: !0
@@ -155,14 +155,14 @@ const te = /* @__PURE__ */ U({
155
155
  {
156
156
  label: "Fiuu Malaysia V2",
157
157
  value: "cc.feedme.payment.fiuu_my",
158
- region: S.F_COUNTRY.enum.MY,
158
+ region: U.F_COUNTRY.enum.MY,
159
159
  gateway: "Fiuu",
160
160
  isLegacy: !0
161
161
  },
162
162
  {
163
163
  label: "Fiuu Singapore",
164
164
  value: "cc.feedme.payment.fiuu_sg",
165
- region: S.F_COUNTRY.enum.SG,
165
+ region: U.F_COUNTRY.enum.SG,
166
166
  gateway: "Fiuu",
167
167
  isLegacy: !0
168
168
  },
@@ -170,27 +170,27 @@ const te = /* @__PURE__ */ U({
170
170
  label: "Softspace Malaysia",
171
171
  value: "cc.feedme.payment.softspace_my",
172
172
  gateway: "Softspace",
173
- region: S.F_COUNTRY.enum.MY
173
+ region: U.F_COUNTRY.enum.MY
174
174
  },
175
175
  {
176
176
  label: "Digio Thailand",
177
177
  value: "cc.feedme.payment.digio_th",
178
178
  gateway: "Digio",
179
- region: S.F_COUNTRY.enum.TH
179
+ region: U.F_COUNTRY.enum.TH
180
180
  }
181
- ], n = R(() => m.terminal), o = F(), e = F({
181
+ ], n = $(() => d.terminal), r = I(), e = I({
182
182
  packageId: "",
183
183
  uniqueId: "",
184
184
  developerId: "",
185
185
  isUat: !1
186
- }), d = () => {
186
+ }), m = () => {
187
187
  e.value.uniqueId = "", e.value.packageId = "", e.value.developerId = "";
188
188
  }, s = () => {
189
189
  if (!n.value.gateways || n.value.gateways.length === 0)
190
- return d();
190
+ return m();
191
191
  const t = n.value.gateways[0];
192
192
  if (!t.config)
193
- return d();
193
+ return m();
194
194
  switch (t.gateway) {
195
195
  case "Fiuu":
196
196
  e.value = {
@@ -212,74 +212,74 @@ const te = /* @__PURE__ */ U({
212
212
  return;
213
213
  }
214
214
  };
215
- $(n, s), O(s);
216
- async function v(t) {
215
+ P(n, s), O(s);
216
+ async function y(t) {
217
217
  var l;
218
- (l = n.value.gateways) == null || l.splice(t, 1), m.onUpdate(n.value);
218
+ (l = n.value.gateways) == null || l.splice(t, 1), d.onUpdate(n.value);
219
219
  }
220
- const c = M(() => b.filter((t) => t.region === a.value)), i = M(() => c.value.find((t) => t.value === e.value.packageId));
220
+ const c = q(() => b.filter((t) => t.region === a.value)), i = q(() => c.value.find((t) => t.value === e.value.packageId));
221
221
  return (t, l) => {
222
- const u = g("FmSelect"), y = g("FmTextField"), k = g("FmCheckbox"), r = g("FmButton"), x = g("FmForm");
223
- return f(), w(x, {
224
- ref: o.value,
222
+ const u = g("FmSelect"), p = g("FmTextField"), x = g("FmCheckbox"), o = g("FmButton"), T = g("FmForm");
223
+ return f(), w(T, {
224
+ ref: r.value,
225
225
  class: "flex flex-col gap-16 w-[500px]",
226
226
  onValidationSuccess: l[5] || (l[5] = () => {
227
- const T = i.value;
228
- if (!T)
227
+ const k = i.value;
228
+ if (!k)
229
229
  return;
230
- let Q = e.value.uniqueId;
231
- T.isLegacy || (Q = JSON.stringify({ uniqueId: e.value.uniqueId, developerId: e.value.developerId, isUat: e.value.isUat }));
230
+ let H = e.value.uniqueId;
231
+ k.isLegacy || (H = JSON.stringify({ uniqueId: e.value.uniqueId, developerId: e.value.developerId, isUat: e.value.isUat }));
232
232
  const J = {
233
- gateway: T.gateway,
233
+ gateway: k.gateway,
234
234
  config: {
235
- packageId: T.value,
236
- uniqueId: Q
235
+ packageId: k.value,
236
+ uniqueId: H
237
237
  }
238
238
  };
239
- (!n.value.gateways || n.value.gateways.length > 1) && (n.value.gateways = []), n.value.gateways[0] = J, m.onUpdate(n.value);
239
+ (!n.value.gateways || n.value.gateways.length > 1) && (n.value.gateways = []), n.value.gateways[0] = J, d.onUpdate(n.value);
240
240
  })
241
241
  }, {
242
- default: P(() => [
243
- p(u, {
242
+ default: R(() => [
243
+ v(u, {
244
244
  modelValue: e.value.packageId,
245
- "onUpdate:modelValue": l[0] || (l[0] = (T) => e.value.packageId = T),
245
+ "onUpdate:modelValue": l[0] || (l[0] = (k) => e.value.packageId = k),
246
246
  label: "Package ID",
247
247
  items: c.value
248
248
  }, null, 8, ["modelValue", "items"]),
249
- i.value && i.value.isLegacy ? (f(), V(q, { key: 0 }, [
250
- p(y, {
249
+ i.value && i.value.isLegacy ? (f(), N(M, { key: 0 }, [
250
+ v(p, {
251
251
  modelValue: e.value.uniqueId,
252
- "onUpdate:modelValue": l[1] || (l[1] = (T) => e.value.uniqueId = T),
252
+ "onUpdate:modelValue": l[1] || (l[1] = (k) => e.value.uniqueId = k),
253
253
  label: "Unique ID (TID)"
254
254
  }, null, 8, ["modelValue"]),
255
- i.value.isOutdated ? (f(), V("span", ue, " Note: For outdated gateway is no longer continued development, please use the new gateway instead. ")) : C("", !0)
256
- ], 64)) : (f(), V(q, { key: 1 }, [
257
- p(y, {
255
+ i.value.isOutdated ? (f(), N("span", ue, " Note: For outdated gateway is no longer continued development, please use the new gateway instead. ")) : C("", !0)
256
+ ], 64)) : (f(), N(M, { key: 1 }, [
257
+ v(p, {
258
258
  modelValue: e.value.developerId,
259
- "onUpdate:modelValue": l[2] || (l[2] = (T) => e.value.developerId = T),
259
+ "onUpdate:modelValue": l[2] || (l[2] = (k) => e.value.developerId = k),
260
260
  label: "Developer ID (MID)"
261
261
  }, null, 8, ["modelValue"]),
262
- p(y, {
262
+ v(p, {
263
263
  modelValue: e.value.uniqueId,
264
- "onUpdate:modelValue": l[3] || (l[3] = (T) => e.value.uniqueId = T),
264
+ "onUpdate:modelValue": l[3] || (l[3] = (k) => e.value.uniqueId = k),
265
265
  label: "Unique ID (TID)"
266
266
  }, null, 8, ["modelValue"]),
267
- p(k, {
267
+ v(x, {
268
268
  modelValue: e.value.isUat,
269
- "onUpdate:modelValue": l[4] || (l[4] = (T) => e.value.isUat = T),
269
+ "onUpdate:modelValue": l[4] || (l[4] = (k) => e.value.isUat = k),
270
270
  label: "Is UAT (Test)",
271
271
  value: "1"
272
272
  }, null, 8, ["modelValue"])
273
273
  ], 64)),
274
- I("div", se, [
275
- n.value.gateways && n.value.gateways.length > 0 ? (f(), w(r, {
274
+ _("div", ie, [
275
+ n.value.gateways && n.value.gateways.length > 0 ? (f(), w(o, {
276
276
  key: 0,
277
277
  class: "flex-1",
278
278
  variant: "secondary",
279
279
  label: "Delete",
280
- onclick: () => v(0)
280
+ onclick: () => y(0)
281
281
  }, null, 8, ["onclick"])) : C("", !0),
282
- p(r, {
282
+ v(o, {
283
283
  type: "submit",
284
284
  class: "flex-1",
285
285
  variant: "primary",
@@ -294,7 +294,7 @@ const te = /* @__PURE__ */ U({
294
294
  }), ce = {
295
295
  key: 0,
296
296
  class: "flex items-center justify-center min-h-[80vh]"
297
- }, de = { class: "flex mt-6 space-x-6" }, me = /* @__PURE__ */ U({
297
+ }, de = { class: "flex mt-6 space-x-6" }, me = /* @__PURE__ */ V({
298
298
  __name: "TerminalGateway",
299
299
  props: {
300
300
  terminal: {
@@ -306,27 +306,27 @@ const te = /* @__PURE__ */ U({
306
306
  required: !0
307
307
  }
308
308
  },
309
- setup(_) {
310
- const { isLoading: m, startAsyncCall: a } = z(), b = _, n = R(() => b.terminal), o = F(), e = F(), d = F(-1), s = F({
309
+ setup(F) {
310
+ const { isLoading: d, startAsyncCall: a } = z(), b = F, n = $(() => b.terminal), r = I(), e = I(), m = I(-1), s = I({
311
311
  terminalId: ""
312
- }), v = () => {
313
- s.value.terminalId = "", d.value = -1;
312
+ }), y = () => {
313
+ s.value.terminalId = "", m.value = -1;
314
314
  }, c = () => {
315
315
  if (a(async () => {
316
- o.value = await G.getRestaurantTerminals(b.terminal.referenceId);
316
+ r.value = await D.getRestaurantTerminals(b.terminal.referenceId);
317
317
  }), !b.terminal.ecrs)
318
- return v();
319
- const l = b.terminal.ecrs.findIndex((y) => y && y.gateway && y.gateway === "FeedMe");
318
+ return y();
319
+ const l = b.terminal.ecrs.findIndex((p) => p && p.gateway && p.gateway === "FeedMe");
320
320
  if (l === -1)
321
- return v();
322
- d.value = l;
321
+ return y();
322
+ m.value = l;
323
323
  const u = b.terminal.ecrs.at(l);
324
324
  u.gateway === "FeedMe" && u.config && (s.value = {
325
325
  terminalId: u.config.terminalId
326
326
  });
327
327
  };
328
- $(n, c), O(c);
329
- const i = M(() => (o.value ?? []).map((l) => ({
328
+ P(n, c), O(c);
329
+ const i = q(() => (r.value ?? []).map((l) => ({
330
330
  label: l.name ?? l._id,
331
331
  value: l._id
332
332
  })));
@@ -335,34 +335,34 @@ const te = /* @__PURE__ */ U({
335
335
  (u = b.terminal.ecrs) == null || u.splice(l, 1), b.onUpdate(b.terminal);
336
336
  }
337
337
  return (l, u) => {
338
- const y = g("FmCircularProgress"), k = g("FmSelect"), r = g("FmButton"), x = g("FmForm");
339
- return N(m) ? (f(), V("div", ce, [
340
- p(y, { size: "xxl" })
341
- ])) : (f(), w(x, {
338
+ const p = g("FmCircularProgress"), x = g("FmSelect"), o = g("FmButton"), T = g("FmForm");
339
+ return S(d) ? (f(), N("div", ce, [
340
+ v(p, { size: "xxl" })
341
+ ])) : (f(), w(T, {
342
342
  key: 1,
343
343
  ref: e.value,
344
344
  class: "flex flex-col gap-16 w-[500px]",
345
345
  onValidationSuccess: u[1] || (u[1] = () => {
346
- d.value > -1 ? n.value.ecrs[d.value] = { gateway: "FeedMe", config: s.value } : (n.value.ecrs || (n.value.ecrs = []), n.value.ecrs.push({ gateway: "FeedMe", config: s.value })), b.onUpdate(n.value);
346
+ m.value > -1 ? n.value.ecrs[m.value] = { gateway: "FeedMe", config: s.value } : (n.value.ecrs || (n.value.ecrs = []), n.value.ecrs.push({ gateway: "FeedMe", config: s.value })), b.onUpdate(n.value);
347
347
  })
348
348
  }, {
349
- default: P(() => [
350
- p(k, {
349
+ default: R(() => [
350
+ v(x, {
351
351
  modelValue: s.value.terminalId,
352
- "onUpdate:modelValue": u[0] || (u[0] = (T) => s.value.terminalId = T),
352
+ "onUpdate:modelValue": u[0] || (u[0] = (k) => s.value.terminalId = k),
353
353
  label: "Terminal ID",
354
354
  items: i.value,
355
- rules: N(ee)(N(ae).string())
355
+ rules: S(ee)(S(ae).string())
356
356
  }, null, 8, ["modelValue", "items", "rules"]),
357
- I("div", de, [
358
- d.value > -1 ? (f(), w(r, {
357
+ _("div", de, [
358
+ m.value > -1 ? (f(), w(o, {
359
359
  key: 0,
360
360
  class: "flex-1",
361
361
  variant: "secondary",
362
362
  label: "Delete",
363
- onclick: () => t(d.value)
363
+ onclick: () => t(m.value)
364
364
  }, null, 8, ["onclick"])) : C("", !0),
365
- p(r, {
365
+ v(o, {
366
366
  type: "submit",
367
367
  class: "flex-1",
368
368
  variant: "primary",
@@ -374,7 +374,7 @@ const te = /* @__PURE__ */ U({
374
374
  }, 512));
375
375
  };
376
376
  }
377
- }), pe = { class: "flex mt-6 space-x-6" }, ve = /* @__PURE__ */ U({
377
+ }), pe = { class: "flex mt-6 space-x-6" }, ve = /* @__PURE__ */ V({
378
378
  __name: "GhlGateway",
379
379
  props: {
380
380
  terminal: {
@@ -386,58 +386,58 @@ const te = /* @__PURE__ */ U({
386
386
  required: !0
387
387
  }
388
388
  },
389
- setup(_) {
390
- const m = _, a = R(() => m.terminal), b = F(), n = F(-1), o = F({
389
+ setup(F) {
390
+ const d = F, a = $(() => d.terminal), b = I(), n = I(-1), r = I({
391
391
  merchantId: "",
392
392
  terminalId: "",
393
393
  privateKey: ""
394
394
  }), e = () => {
395
- o.value.merchantId = "", o.value.terminalId = "", o.value.privateKey = "", n.value = -1;
396
- }, d = () => {
395
+ r.value.merchantId = "", r.value.terminalId = "", r.value.privateKey = "", n.value = -1;
396
+ }, m = () => {
397
397
  if (!a.value.ecrs)
398
398
  return e();
399
- const v = a.value.ecrs.findIndex((i) => i && i.gateway && i.gateway === "Ghl");
400
- if (v === -1)
399
+ const y = a.value.ecrs.findIndex((i) => i && i.gateway && i.gateway === "Ghl");
400
+ if (y === -1)
401
401
  return e();
402
- n.value = v;
403
- const c = a.value.ecrs.at(v);
404
- c.gateway === "Ghl" && c.config && (o.value = {
402
+ n.value = y;
403
+ const c = a.value.ecrs.at(y);
404
+ c.gateway === "Ghl" && c.config && (r.value = {
405
405
  merchantId: c.config.merchantId,
406
406
  terminalId: c.config.terminalId,
407
407
  privateKey: c.config.privateKey
408
408
  });
409
409
  };
410
- $(a, d), O(d);
411
- async function s(v) {
410
+ P(a, m), O(m);
411
+ async function s(y) {
412
412
  var c;
413
- (c = a.value.ecrs) == null || c.splice(v, 1), m.onUpdate(a.value);
413
+ (c = a.value.ecrs) == null || c.splice(y, 1), d.onUpdate(a.value);
414
414
  }
415
- return (v, c) => {
415
+ return (y, c) => {
416
416
  const i = g("FmTextField"), t = g("FmTextarea"), l = g("FmButton"), u = g("FmForm");
417
417
  return f(), w(u, {
418
418
  ref: b.value,
419
419
  class: "flex flex-col gap-16 w-[500px]",
420
420
  onValidationSuccess: c[3] || (c[3] = () => {
421
- n.value > -1 ? a.value.ecrs[n.value] = { gateway: "Ghl", config: o.value } : (a.value.ecrs || (a.value.ecrs = []), a.value.ecrs.push({ gateway: "Ghl", config: o.value })), m.onUpdate(a.value);
421
+ n.value > -1 ? a.value.ecrs[n.value] = { gateway: "Ghl", config: r.value } : (a.value.ecrs || (a.value.ecrs = []), a.value.ecrs.push({ gateway: "Ghl", config: r.value })), d.onUpdate(a.value);
422
422
  })
423
423
  }, {
424
- default: P(() => [
425
- p(i, {
426
- modelValue: o.value.merchantId,
427
- "onUpdate:modelValue": c[0] || (c[0] = (y) => o.value.merchantId = y),
424
+ default: R(() => [
425
+ v(i, {
426
+ modelValue: r.value.merchantId,
427
+ "onUpdate:modelValue": c[0] || (c[0] = (p) => r.value.merchantId = p),
428
428
  label: "Merchant ID"
429
429
  }, null, 8, ["modelValue"]),
430
- p(i, {
431
- modelValue: o.value.terminalId,
432
- "onUpdate:modelValue": c[1] || (c[1] = (y) => o.value.terminalId = y),
430
+ v(i, {
431
+ modelValue: r.value.terminalId,
432
+ "onUpdate:modelValue": c[1] || (c[1] = (p) => r.value.terminalId = p),
433
433
  label: "Terminal ID"
434
434
  }, null, 8, ["modelValue"]),
435
- p(t, {
436
- modelValue: o.value.privateKey,
437
- "onUpdate:modelValue": c[2] || (c[2] = (y) => o.value.privateKey = y),
435
+ v(t, {
436
+ modelValue: r.value.privateKey,
437
+ "onUpdate:modelValue": c[2] || (c[2] = (p) => r.value.privateKey = p),
438
438
  label: "Private Key"
439
439
  }, null, 8, ["modelValue"]),
440
- I("div", pe, [
440
+ _("div", pe, [
441
441
  n.value > -1 ? (f(), w(l, {
442
442
  key: 0,
443
443
  class: "flex-1",
@@ -445,7 +445,7 @@ const te = /* @__PURE__ */ U({
445
445
  label: "Delete",
446
446
  onclick: () => s(n.value)
447
447
  }, null, 8, ["onclick"])) : C("", !0),
448
- p(l, {
448
+ v(l, {
449
449
  type: "submit",
450
450
  class: "flex-1",
451
451
  variant: "primary",
@@ -457,7 +457,7 @@ const te = /* @__PURE__ */ U({
457
457
  }, 512);
458
458
  };
459
459
  }
460
- }), ye = { class: "flex items-end" }, fe = { class: "flex flex-wrap gap-8 items-center mt-4" }, ge = { class: "flex mt-6 space-x-6" }, be = /* @__PURE__ */ U({
460
+ }), ye = { class: "flex items-end" }, fe = { class: "flex flex-wrap gap-8 items-center mt-4" }, ge = { class: "flex mt-6 space-x-6" }, be = /* @__PURE__ */ V({
461
461
  __name: "MaybankGateway",
462
462
  props: {
463
463
  terminal: {
@@ -469,20 +469,20 @@ const te = /* @__PURE__ */ U({
469
469
  required: !0
470
470
  }
471
471
  },
472
- setup(_) {
473
- const m = _, a = R(() => m.terminal), b = F(), n = F(-1), o = F(), e = F({
472
+ setup(F) {
473
+ const d = F, a = $(() => d.terminal), b = I(), n = I(-1), r = I(), e = I({
474
474
  ip: "",
475
475
  receiptName: "",
476
476
  cardTypes: []
477
- }), d = () => {
477
+ }), m = () => {
478
478
  e.value.ip = "", e.value.receiptName = "", e.value.cardTypes = [], n.value = -1;
479
479
  }, s = () => {
480
480
  var u;
481
481
  if (!a.value.ecrIntegrations)
482
- return d();
483
- const i = a.value.ecrIntegrations, t = i.findIndex((y) => y && y.gateway && y.gateway === "Maybank");
482
+ return m();
483
+ const i = a.value.ecrIntegrations, t = i.findIndex((p) => p && p.gateway && p.gateway === "Maybank");
484
484
  if (t === -1)
485
- return d();
485
+ return m();
486
486
  n.value = t;
487
487
  const l = i.at(t);
488
488
  l.gateway === "Maybank" && l.config && (e.value = {
@@ -491,27 +491,27 @@ const te = /* @__PURE__ */ U({
491
491
  cardTypes: ((u = l.dialogConfig) == null ? void 0 : u.cardTypes) ?? []
492
492
  });
493
493
  };
494
- $(a, s), O(s);
495
- async function v(i) {
494
+ P(a, s), O(s);
495
+ async function y(i) {
496
496
  var t;
497
- (t = a.value.ecrIntegrations) == null || t.splice(i, 1), m.onUpdate(a.value);
497
+ (t = a.value.ecrIntegrations) == null || t.splice(i, 1), d.onUpdate(a.value);
498
498
  }
499
499
  async function c() {
500
- e.value.cardTypes.push(o.value), o.value = "";
500
+ e.value.cardTypes.push(r.value), r.value = "";
501
501
  }
502
502
  return (i, t) => {
503
- const l = g("FmTextField"), u = g("FmButton"), y = g("FmChip"), k = g("FmForm");
504
- return f(), w(k, {
503
+ const l = g("FmTextField"), u = g("FmButton"), p = g("FmChip"), x = g("FmForm");
504
+ return f(), w(x, {
505
505
  ref: b.value,
506
506
  class: "flex flex-col gap-16 w-[500px]",
507
507
  onValidationSuccess: t[3] || (t[3] = () => {
508
- var r, x;
508
+ var o, T;
509
509
  n.value > -1 ? a.value.ecrIntegrations[n.value] = {
510
510
  gateway: "Maybank",
511
511
  config: { ip: e.value.ip },
512
512
  receiptName: e.value.receiptName,
513
513
  dialogConfig: {
514
- ...(x = (r = a.value.ecrIntegrations) == null ? void 0 : r[n.value]) == null ? void 0 : x.dialogConfig,
514
+ ...(T = (o = a.value.ecrIntegrations) == null ? void 0 : o[n.value]) == null ? void 0 : T.dialogConfig,
515
515
  cardTypes: e.value.cardTypes
516
516
  }
517
517
  } : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
@@ -521,51 +521,51 @@ const te = /* @__PURE__ */ U({
521
521
  dialogConfig: {
522
522
  cardTypes: e.value.cardTypes
523
523
  }
524
- })), m.onUpdate(a.value);
524
+ })), d.onUpdate(a.value);
525
525
  })
526
526
  }, {
527
- default: P(() => [
528
- p(l, {
527
+ default: R(() => [
528
+ v(l, {
529
529
  modelValue: e.value.ip,
530
- "onUpdate:modelValue": t[0] || (t[0] = (r) => e.value.ip = r),
530
+ "onUpdate:modelValue": t[0] || (t[0] = (o) => e.value.ip = o),
531
531
  label: "IP Address"
532
532
  }, null, 8, ["modelValue"]),
533
- p(l, {
533
+ v(l, {
534
534
  modelValue: e.value.receiptName,
535
- "onUpdate:modelValue": t[1] || (t[1] = (r) => e.value.receiptName = r),
535
+ "onUpdate:modelValue": t[1] || (t[1] = (o) => e.value.receiptName = o),
536
536
  label: "Receipt Payment Name",
537
537
  "label-info": "Default receipt display will be 'TERMINAL_MAYBANK'"
538
538
  }, null, 8, ["modelValue"]),
539
- I("div", ye, [
540
- p(l, {
541
- modelValue: o.value,
542
- "onUpdate:modelValue": t[2] || (t[2] = (r) => o.value = r),
539
+ _("div", ye, [
540
+ v(l, {
541
+ modelValue: r.value,
542
+ "onUpdate:modelValue": t[2] || (t[2] = (o) => r.value = o),
543
543
  label: "Fallback Card Types",
544
544
  "label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
545
545
  }, null, 8, ["modelValue"]),
546
- p(u, {
546
+ v(u, {
547
547
  class: "ml-4",
548
548
  icon: "add",
549
549
  onClick: c
550
550
  })
551
551
  ]),
552
- I("div", fe, [
553
- (f(!0), V(q, null, K(e.value.cardTypes, (r) => (f(), w(y, {
554
- key: r,
555
- label: r,
552
+ _("div", fe, [
553
+ (f(!0), N(M, null, G(e.value.cardTypes, (o) => (f(), w(p, {
554
+ key: o,
555
+ label: o,
556
556
  removable: !0,
557
- onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(r), 1)
557
+ onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(o), 1)
558
558
  }, null, 8, ["label", "onChipClosed"]))), 128))
559
559
  ]),
560
- I("div", ge, [
560
+ _("div", ge, [
561
561
  n.value > -1 ? (f(), w(u, {
562
562
  key: 0,
563
563
  class: "flex-1",
564
564
  variant: "secondary",
565
565
  label: "Delete",
566
- onclick: () => v(n.value)
566
+ onclick: () => y(n.value)
567
567
  }, null, 8, ["onclick"])) : C("", !0),
568
- p(u, {
568
+ v(u, {
569
569
  type: "submit",
570
570
  class: "flex-1",
571
571
  variant: "primary",
@@ -577,7 +577,7 @@ const te = /* @__PURE__ */ U({
577
577
  }, 512);
578
578
  };
579
579
  }
580
- }), Ie = { class: "flex items-end" }, _e = { class: "flex flex-wrap gap-8 items-center mt-4" }, Fe = { class: "flex mt-6 space-x-6" }, we = /* @__PURE__ */ U({
580
+ }), _e = { class: "flex items-end" }, Ie = { class: "flex flex-wrap gap-8 items-center mt-4" }, Fe = { class: "flex mt-6 space-x-6" }, we = /* @__PURE__ */ V({
581
581
  __name: "Maybank2Gateway",
582
582
  props: {
583
583
  terminal: {
@@ -589,20 +589,20 @@ const te = /* @__PURE__ */ U({
589
589
  required: !0
590
590
  }
591
591
  },
592
- setup(_) {
593
- const m = _, a = R(() => m.terminal), b = F(), n = F(-1), o = F(), e = F({
592
+ setup(F) {
593
+ const d = F, a = $(() => d.terminal), b = I(), n = I(-1), r = I(), e = I({
594
594
  ip: "",
595
595
  receiptName: "",
596
596
  cardTypes: []
597
- }), d = () => {
597
+ }), m = () => {
598
598
  e.value.ip = "", e.value.receiptName = "", e.value.cardTypes = [], n.value = -1;
599
599
  }, s = () => {
600
600
  var u;
601
601
  if (!a.value.ecrIntegrations)
602
- return d();
603
- const i = a.value.ecrIntegrations, t = i.findIndex((y) => y && y.gateway && y.gateway === "Maybank2");
602
+ return m();
603
+ const i = a.value.ecrIntegrations, t = i.findIndex((p) => p && p.gateway && p.gateway === "Maybank2");
604
604
  if (t === -1)
605
- return d();
605
+ return m();
606
606
  n.value = t;
607
607
  const l = i.at(t);
608
608
  l.gateway === "Maybank2" && l.config && (e.value = {
@@ -611,27 +611,27 @@ const te = /* @__PURE__ */ U({
611
611
  cardTypes: ((u = l.dialogConfig) == null ? void 0 : u.cardTypes) ?? []
612
612
  });
613
613
  };
614
- $(a, s), O(s);
615
- async function v(i) {
614
+ P(a, s), O(s);
615
+ async function y(i) {
616
616
  var t;
617
- (t = a.value.ecrIntegrations) == null || t.splice(i, 1), m.onUpdate(a.value);
617
+ (t = a.value.ecrIntegrations) == null || t.splice(i, 1), d.onUpdate(a.value);
618
618
  }
619
619
  async function c() {
620
- e.value.cardTypes.push(o.value), o.value = "";
620
+ e.value.cardTypes.push(r.value), r.value = "";
621
621
  }
622
622
  return (i, t) => {
623
- const l = g("FmTextField"), u = g("FmButton"), y = g("FmChip"), k = g("FmForm");
624
- return f(), w(k, {
623
+ const l = g("FmTextField"), u = g("FmButton"), p = g("FmChip"), x = g("FmForm");
624
+ return f(), w(x, {
625
625
  ref: b.value,
626
626
  class: "flex flex-col gap-16 w-[500px]",
627
627
  onValidationSuccess: t[3] || (t[3] = () => {
628
- var r, x;
628
+ var o, T;
629
629
  n.value > -1 ? a.value.ecrIntegrations[n.value] = {
630
630
  gateway: "Maybank2",
631
631
  config: { ip: e.value.ip },
632
632
  receiptName: e.value.receiptName,
633
633
  dialogConfig: {
634
- ...(x = (r = a.value.ecrIntegrations) == null ? void 0 : r[n.value]) == null ? void 0 : x.dialogConfig,
634
+ ...(T = (o = a.value.ecrIntegrations) == null ? void 0 : o[n.value]) == null ? void 0 : T.dialogConfig,
635
635
  cardTypes: e.value.cardTypes
636
636
  }
637
637
  } : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
@@ -641,51 +641,51 @@ const te = /* @__PURE__ */ U({
641
641
  dialogConfig: {
642
642
  cardTypes: e.value.cardTypes
643
643
  }
644
- })), m.onUpdate(a.value);
644
+ })), d.onUpdate(a.value);
645
645
  })
646
646
  }, {
647
- default: P(() => [
648
- p(l, {
647
+ default: R(() => [
648
+ v(l, {
649
649
  modelValue: e.value.ip,
650
- "onUpdate:modelValue": t[0] || (t[0] = (r) => e.value.ip = r),
650
+ "onUpdate:modelValue": t[0] || (t[0] = (o) => e.value.ip = o),
651
651
  label: "IP Address"
652
652
  }, null, 8, ["modelValue"]),
653
- p(l, {
653
+ v(l, {
654
654
  modelValue: e.value.receiptName,
655
- "onUpdate:modelValue": t[1] || (t[1] = (r) => e.value.receiptName = r),
655
+ "onUpdate:modelValue": t[1] || (t[1] = (o) => e.value.receiptName = o),
656
656
  label: "Receipt Payment Name",
657
657
  "label-info": "Default receipt display will be 'TERMINAL_MAYBANK'"
658
658
  }, null, 8, ["modelValue"]),
659
- I("div", Ie, [
660
- p(l, {
661
- modelValue: o.value,
662
- "onUpdate:modelValue": t[2] || (t[2] = (r) => o.value = r),
659
+ _("div", _e, [
660
+ v(l, {
661
+ modelValue: r.value,
662
+ "onUpdate:modelValue": t[2] || (t[2] = (o) => r.value = o),
663
663
  label: "Fallback Card Types",
664
664
  "label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
665
665
  }, null, 8, ["modelValue"]),
666
- p(u, {
666
+ v(u, {
667
667
  class: "ml-4",
668
668
  icon: "add",
669
669
  onClick: c
670
670
  })
671
671
  ]),
672
- I("div", _e, [
673
- (f(!0), V(q, null, K(e.value.cardTypes, (r) => (f(), w(y, {
674
- key: r,
675
- label: r,
672
+ _("div", Ie, [
673
+ (f(!0), N(M, null, G(e.value.cardTypes, (o) => (f(), w(p, {
674
+ key: o,
675
+ label: o,
676
676
  removable: !0,
677
- onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(r), 1)
677
+ onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(o), 1)
678
678
  }, null, 8, ["label", "onChipClosed"]))), 128))
679
679
  ]),
680
- I("div", Fe, [
680
+ _("div", Fe, [
681
681
  n.value > -1 ? (f(), w(u, {
682
682
  key: 0,
683
683
  class: "flex-1",
684
684
  variant: "secondary",
685
685
  label: "Delete",
686
- onclick: () => v(n.value)
686
+ onclick: () => y(n.value)
687
687
  }, null, 8, ["onclick"])) : C("", !0),
688
- p(u, {
688
+ v(u, {
689
689
  type: "submit",
690
690
  class: "flex-1",
691
691
  variant: "primary",
@@ -697,7 +697,7 @@ const te = /* @__PURE__ */ U({
697
697
  }, 512);
698
698
  };
699
699
  }
700
- }), Te = { class: "flex items-end" }, xe = { class: "flex flex-wrap gap-8 items-center mt-4" }, ke = { class: "flex mt-6 space-x-6" }, Ne = /* @__PURE__ */ U({
700
+ }), Te = { class: "flex items-end" }, xe = { class: "flex flex-wrap gap-8 items-center mt-4" }, ke = { class: "flex mt-6 space-x-6" }, Ne = /* @__PURE__ */ V({
701
701
  __name: "Maybank3Gateway",
702
702
  props: {
703
703
  terminal: {
@@ -709,20 +709,20 @@ const te = /* @__PURE__ */ U({
709
709
  required: !0
710
710
  }
711
711
  },
712
- setup(_) {
713
- const m = _, a = R(() => m.terminal), b = F(), n = F(-1), o = F(), e = F({
712
+ setup(F) {
713
+ const d = F, a = $(() => d.terminal), b = I(), n = I(-1), r = I(), e = I({
714
714
  ip: "",
715
715
  receiptName: "",
716
716
  cardTypes: []
717
- }), d = () => {
717
+ }), m = () => {
718
718
  e.value.ip = "", e.value.receiptName = "", e.value.cardTypes = [], n.value = -1;
719
719
  }, s = () => {
720
720
  var u;
721
721
  if (!a.value.ecrIntegrations)
722
- return d();
723
- const i = a.value.ecrIntegrations, t = i.findIndex((y) => y && y.gateway && y.gateway === "Maybank3");
722
+ return m();
723
+ const i = a.value.ecrIntegrations, t = i.findIndex((p) => p && p.gateway && p.gateway === "Maybank3");
724
724
  if (t === -1)
725
- return d();
725
+ return m();
726
726
  n.value = t;
727
727
  const l = i.at(t);
728
728
  l.gateway === "Maybank3" && l.config && (e.value = {
@@ -731,27 +731,27 @@ const te = /* @__PURE__ */ U({
731
731
  cardTypes: ((u = l.dialogConfig) == null ? void 0 : u.cardTypes) ?? []
732
732
  });
733
733
  };
734
- $(a, s), O(s);
735
- async function v(i) {
734
+ P(a, s), O(s);
735
+ async function y(i) {
736
736
  var t;
737
- (t = a.value.ecrIntegrations) == null || t.splice(i, 1), m.onUpdate(a.value);
737
+ (t = a.value.ecrIntegrations) == null || t.splice(i, 1), d.onUpdate(a.value);
738
738
  }
739
739
  async function c() {
740
- e.value.cardTypes.push(o.value), o.value = "";
740
+ e.value.cardTypes.push(r.value), r.value = "";
741
741
  }
742
742
  return (i, t) => {
743
- const l = g("FmTextField"), u = g("FmButton"), y = g("FmChip"), k = g("FmForm");
744
- return f(), w(k, {
743
+ const l = g("FmTextField"), u = g("FmButton"), p = g("FmChip"), x = g("FmForm");
744
+ return f(), w(x, {
745
745
  ref: b.value,
746
746
  class: "flex flex-col gap-16 w-[500px]",
747
747
  onValidationSuccess: t[3] || (t[3] = () => {
748
- var r, x;
748
+ var o, T;
749
749
  n.value > -1 ? a.value.ecrIntegrations[n.value] = {
750
750
  gateway: "Maybank3",
751
751
  config: { ip: e.value.ip },
752
752
  receiptName: e.value.receiptName,
753
753
  dialogConfig: {
754
- ...(x = (r = a.value.ecrIntegrations) == null ? void 0 : r[n.value]) == null ? void 0 : x.dialogConfig,
754
+ ...(T = (o = a.value.ecrIntegrations) == null ? void 0 : o[n.value]) == null ? void 0 : T.dialogConfig,
755
755
  cardTypes: e.value.cardTypes
756
756
  }
757
757
  } : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
@@ -761,51 +761,51 @@ const te = /* @__PURE__ */ U({
761
761
  dialogConfig: {
762
762
  cardTypes: e.value.cardTypes
763
763
  }
764
- })), m.onUpdate(a.value);
764
+ })), d.onUpdate(a.value);
765
765
  })
766
766
  }, {
767
- default: P(() => [
768
- p(l, {
767
+ default: R(() => [
768
+ v(l, {
769
769
  modelValue: e.value.ip,
770
- "onUpdate:modelValue": t[0] || (t[0] = (r) => e.value.ip = r),
770
+ "onUpdate:modelValue": t[0] || (t[0] = (o) => e.value.ip = o),
771
771
  label: "IP Address"
772
772
  }, null, 8, ["modelValue"]),
773
- p(l, {
773
+ v(l, {
774
774
  modelValue: e.value.receiptName,
775
- "onUpdate:modelValue": t[1] || (t[1] = (r) => e.value.receiptName = r),
775
+ "onUpdate:modelValue": t[1] || (t[1] = (o) => e.value.receiptName = o),
776
776
  label: "Receipt Payment Name",
777
777
  "label-info": "Default receipt display will be 'TERMINAL_MAYBANK'"
778
778
  }, null, 8, ["modelValue"]),
779
- I("div", Te, [
780
- p(l, {
781
- modelValue: o.value,
782
- "onUpdate:modelValue": t[2] || (t[2] = (r) => o.value = r),
779
+ _("div", Te, [
780
+ v(l, {
781
+ modelValue: r.value,
782
+ "onUpdate:modelValue": t[2] || (t[2] = (o) => r.value = o),
783
783
  label: "Fallback Card Types",
784
784
  "label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
785
785
  }, null, 8, ["modelValue"]),
786
- p(u, {
786
+ v(u, {
787
787
  class: "ml-4",
788
788
  icon: "add",
789
789
  onClick: c
790
790
  })
791
791
  ]),
792
- I("div", xe, [
793
- (f(!0), V(q, null, K(e.value.cardTypes, (r) => (f(), w(y, {
794
- key: r,
795
- label: r,
792
+ _("div", xe, [
793
+ (f(!0), N(M, null, G(e.value.cardTypes, (o) => (f(), w(p, {
794
+ key: o,
795
+ label: o,
796
796
  removable: !0,
797
- onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(r), 1)
797
+ onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(o), 1)
798
798
  }, null, 8, ["label", "onChipClosed"]))), 128))
799
799
  ]),
800
- I("div", ke, [
800
+ _("div", ke, [
801
801
  n.value > -1 ? (f(), w(u, {
802
802
  key: 0,
803
803
  class: "flex-1",
804
804
  variant: "secondary",
805
805
  label: "Delete",
806
- onclick: () => v(n.value)
806
+ onclick: () => y(n.value)
807
807
  }, null, 8, ["onclick"])) : C("", !0),
808
- p(u, {
808
+ v(u, {
809
809
  type: "submit",
810
810
  class: "flex-1",
811
811
  variant: "primary",
@@ -817,7 +817,7 @@ const te = /* @__PURE__ */ U({
817
817
  }, 512);
818
818
  };
819
819
  }
820
- }), Ve = { class: "flex items-end" }, Ce = { class: "flex flex-wrap gap-8 items-center mt-4" }, Ue = { class: "flex mt-6 space-x-6" }, Se = /* @__PURE__ */ U({
820
+ }), Ce = { class: "flex items-end" }, Ve = { class: "flex flex-wrap gap-8 items-center mt-4" }, Ue = { class: "flex mt-6 space-x-6" }, Se = /* @__PURE__ */ V({
821
821
  __name: "NetsGateway",
822
822
  props: {
823
823
  terminal: {
@@ -829,20 +829,20 @@ const te = /* @__PURE__ */ U({
829
829
  required: !0
830
830
  }
831
831
  },
832
- setup(_) {
833
- const m = _, a = R(() => m.terminal), b = F(), n = F(-1), o = F(), e = F({
832
+ setup(F) {
833
+ const d = F, a = $(() => d.terminal), b = I(), n = I(-1), r = I(), e = I({
834
834
  ip: "",
835
835
  receiptName: "",
836
836
  cardTypes: []
837
- }), d = () => {
837
+ }), m = () => {
838
838
  e.value.ip = "", e.value.receiptName = "", e.value.cardTypes = [], n.value = -1;
839
839
  }, s = () => {
840
840
  var u;
841
841
  if (!a.value.ecrIntegrations)
842
- return d();
843
- const i = a.value.ecrIntegrations, t = i.findIndex((y) => y && y.gateway && y.gateway === "Nets");
842
+ return m();
843
+ const i = a.value.ecrIntegrations, t = i.findIndex((p) => p && p.gateway && p.gateway === "Nets");
844
844
  if (t === -1)
845
- return d();
845
+ return m();
846
846
  n.value = t;
847
847
  const l = i.at(t);
848
848
  l.gateway === "Nets" && l.config && (e.value = {
@@ -851,27 +851,27 @@ const te = /* @__PURE__ */ U({
851
851
  cardTypes: ((u = l.dialogConfig) == null ? void 0 : u.cardTypes) ?? []
852
852
  });
853
853
  };
854
- $(a, s), O(s);
855
- async function v(i) {
854
+ P(a, s), O(s);
855
+ async function y(i) {
856
856
  var t;
857
- (t = a.value.ecrIntegrations) == null || t.splice(i, 1), m.onUpdate(a.value);
857
+ (t = a.value.ecrIntegrations) == null || t.splice(i, 1), d.onUpdate(a.value);
858
858
  }
859
859
  async function c() {
860
- e.value.cardTypes.push(o.value), o.value = "";
860
+ e.value.cardTypes.push(r.value), r.value = "";
861
861
  }
862
862
  return (i, t) => {
863
- const l = g("FmTextField"), u = g("FmButton"), y = g("FmChip"), k = g("FmForm");
864
- return f(), w(k, {
863
+ const l = g("FmTextField"), u = g("FmButton"), p = g("FmChip"), x = g("FmForm");
864
+ return f(), w(x, {
865
865
  ref: b.value,
866
866
  class: "flex flex-col gap-16 w-[500px]",
867
867
  onValidationSuccess: t[3] || (t[3] = () => {
868
- var r, x;
868
+ var o, T;
869
869
  n.value > -1 ? a.value.ecrIntegrations[n.value] = {
870
870
  gateway: "Nets",
871
871
  config: { ip: e.value.ip },
872
872
  receiptName: e.value.receiptName,
873
873
  dialogConfig: {
874
- ...(x = (r = a.value.ecrIntegrations) == null ? void 0 : r[n.value]) == null ? void 0 : x.dialogConfig,
874
+ ...(T = (o = a.value.ecrIntegrations) == null ? void 0 : o[n.value]) == null ? void 0 : T.dialogConfig,
875
875
  cardTypes: e.value.cardTypes
876
876
  }
877
877
  } : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
@@ -881,51 +881,164 @@ const te = /* @__PURE__ */ U({
881
881
  dialogConfig: {
882
882
  cardTypes: e.value.cardTypes
883
883
  }
884
- })), m.onUpdate(a.value);
884
+ })), d.onUpdate(a.value);
885
885
  })
886
886
  }, {
887
- default: P(() => [
888
- p(l, {
887
+ default: R(() => [
888
+ v(l, {
889
889
  modelValue: e.value.ip,
890
- "onUpdate:modelValue": t[0] || (t[0] = (r) => e.value.ip = r),
890
+ "onUpdate:modelValue": t[0] || (t[0] = (o) => e.value.ip = o),
891
891
  label: "IP Address"
892
892
  }, null, 8, ["modelValue"]),
893
- p(l, {
893
+ v(l, {
894
894
  modelValue: e.value.receiptName,
895
- "onUpdate:modelValue": t[1] || (t[1] = (r) => e.value.receiptName = r),
895
+ "onUpdate:modelValue": t[1] || (t[1] = (o) => e.value.receiptName = o),
896
896
  label: "Receipt Payment Name",
897
897
  "label-info": "Default receipt display will be 'TERMINAL_NETS'"
898
898
  }, null, 8, ["modelValue"]),
899
- I("div", Ve, [
900
- p(l, {
901
- modelValue: o.value,
902
- "onUpdate:modelValue": t[2] || (t[2] = (r) => o.value = r),
899
+ _("div", Ce, [
900
+ v(l, {
901
+ modelValue: r.value,
902
+ "onUpdate:modelValue": t[2] || (t[2] = (o) => r.value = o),
903
+ label: "Fallback Card Types",
904
+ "label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
905
+ }, null, 8, ["modelValue"]),
906
+ v(u, {
907
+ class: "ml-4",
908
+ icon: "add",
909
+ onClick: c
910
+ })
911
+ ]),
912
+ _("div", Ve, [
913
+ (f(!0), N(M, null, G(e.value.cardTypes, (o) => (f(), w(p, {
914
+ key: o,
915
+ label: o,
916
+ removable: !0,
917
+ onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(o), 1)
918
+ }, null, 8, ["label", "onChipClosed"]))), 128))
919
+ ]),
920
+ _("div", Ue, [
921
+ n.value > -1 ? (f(), w(u, {
922
+ key: 0,
923
+ class: "flex-1",
924
+ variant: "secondary",
925
+ label: "Delete",
926
+ onclick: () => y(n.value)
927
+ }, null, 8, ["onclick"])) : C("", !0),
928
+ v(u, {
929
+ type: "submit",
930
+ class: "flex-1",
931
+ variant: "primary",
932
+ label: "Save"
933
+ })
934
+ ])
935
+ ]),
936
+ _: 1
937
+ }, 512);
938
+ };
939
+ }
940
+ }), Me = { class: "flex items-end" }, qe = { class: "flex flex-wrap gap-8 items-center mt-4" }, Oe = { class: "flex mt-6 space-x-6" }, Re = /* @__PURE__ */ V({
941
+ __name: "KBankGateway",
942
+ props: {
943
+ terminal: {
944
+ type: Object,
945
+ required: !0
946
+ },
947
+ onUpdate: {
948
+ type: Function,
949
+ required: !0
950
+ }
951
+ },
952
+ setup(F) {
953
+ const d = F, a = $(() => d.terminal), b = I(), n = I(-1), r = I(), e = I({
954
+ receiptName: "",
955
+ cardTypes: []
956
+ }), m = () => {
957
+ e.value.receiptName = "", e.value.cardTypes = [], n.value = -1;
958
+ }, s = () => {
959
+ var u;
960
+ if (!a.value.ecrIntegrations)
961
+ return m();
962
+ const i = a.value.ecrIntegrations, t = i.findIndex((p) => p && p.gateway && p.gateway === "Maybank2");
963
+ if (t === -1)
964
+ return m();
965
+ n.value = t;
966
+ const l = i.at(t);
967
+ l.gateway === "Maybank2" && l.config && (e.value = {
968
+ receiptName: l.receiptName ?? "",
969
+ cardTypes: ((u = l.dialogConfig) == null ? void 0 : u.cardTypes) ?? []
970
+ });
971
+ };
972
+ P(a, s), O(s);
973
+ async function y(i) {
974
+ var t;
975
+ (t = a.value.ecrIntegrations) == null || t.splice(i, 1), d.onUpdate(a.value);
976
+ }
977
+ async function c() {
978
+ e.value.cardTypes.push(r.value), r.value = "";
979
+ }
980
+ return (i, t) => {
981
+ const l = g("FmTextField"), u = g("FmButton"), p = g("FmChip"), x = g("FmForm");
982
+ return f(), w(x, {
983
+ ref: b.value,
984
+ class: "flex flex-col gap-16 w-[500px]",
985
+ onValidationSuccess: t[2] || (t[2] = () => {
986
+ var o, T;
987
+ n.value > -1 ? a.value.ecrIntegrations[n.value] = {
988
+ gateway: "KBank",
989
+ config: {},
990
+ receiptName: e.value.receiptName,
991
+ dialogConfig: {
992
+ ...(T = (o = a.value.ecrIntegrations) == null ? void 0 : o[n.value]) == null ? void 0 : T.dialogConfig,
993
+ cardTypes: e.value.cardTypes
994
+ }
995
+ } : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
996
+ gateway: "KBank",
997
+ config: {},
998
+ receiptName: e.value.receiptName,
999
+ dialogConfig: {
1000
+ cardTypes: e.value.cardTypes
1001
+ }
1002
+ })), d.onUpdate(a.value);
1003
+ })
1004
+ }, {
1005
+ default: R(() => [
1006
+ v(l, {
1007
+ modelValue: e.value.receiptName,
1008
+ "onUpdate:modelValue": t[0] || (t[0] = (o) => e.value.receiptName = o),
1009
+ label: "Receipt Payment Name",
1010
+ "label-info": "Default receipt display will be 'TERMINAL_MAYBANK'"
1011
+ }, null, 8, ["modelValue"]),
1012
+ _("div", Me, [
1013
+ v(l, {
1014
+ modelValue: r.value,
1015
+ "onUpdate:modelValue": t[1] || (t[1] = (o) => r.value = o),
903
1016
  label: "Fallback Card Types",
904
1017
  "label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
905
1018
  }, null, 8, ["modelValue"]),
906
- p(u, {
1019
+ v(u, {
907
1020
  class: "ml-4",
908
1021
  icon: "add",
909
1022
  onClick: c
910
1023
  })
911
1024
  ]),
912
- I("div", Ce, [
913
- (f(!0), V(q, null, K(e.value.cardTypes, (r) => (f(), w(y, {
914
- key: r,
915
- label: r,
1025
+ _("div", qe, [
1026
+ (f(!0), N(M, null, G(e.value.cardTypes, (o) => (f(), w(p, {
1027
+ key: o,
1028
+ label: o,
916
1029
  removable: !0,
917
- onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(r), 1)
1030
+ onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(o), 1)
918
1031
  }, null, 8, ["label", "onChipClosed"]))), 128))
919
1032
  ]),
920
- I("div", Ue, [
1033
+ _("div", Oe, [
921
1034
  n.value > -1 ? (f(), w(u, {
922
1035
  key: 0,
923
1036
  class: "flex-1",
924
1037
  variant: "secondary",
925
1038
  label: "Delete",
926
- onclick: () => v(n.value)
1039
+ onclick: () => y(n.value)
927
1040
  }, null, 8, ["onclick"])) : C("", !0),
928
- p(u, {
1041
+ v(u, {
929
1042
  type: "submit",
930
1043
  class: "flex-1",
931
1044
  variant: "primary",
@@ -937,7 +1050,7 @@ const te = /* @__PURE__ */ U({
937
1050
  }, 512);
938
1051
  };
939
1052
  }
940
- }), Me = { class: "flex items-center" }, qe = { class: "w-[260px] self-start" }, Oe = { class: "flex-1" }, Pe = /* @__PURE__ */ U({
1053
+ }), $e = { class: "flex items-center" }, Pe = { class: "w-[260px] self-start" }, Ae = { class: "flex-1" }, De = /* @__PURE__ */ V({
941
1054
  __name: "EcrGateway",
942
1055
  props: {
943
1056
  terminal: {
@@ -949,9 +1062,9 @@ const te = /* @__PURE__ */ U({
949
1062
  required: !0
950
1063
  }
951
1064
  },
952
- setup(_) {
953
- var d;
954
- const m = _, a = [
1065
+ setup(F) {
1066
+ var m;
1067
+ const d = F, a = [
955
1068
  {
956
1069
  label: "FeedMe Terminal",
957
1070
  value: "terminal",
@@ -961,58 +1074,64 @@ const te = /* @__PURE__ */ U({
961
1074
  label: "GHL Terminal (V2)",
962
1075
  value: "ghl",
963
1076
  render: ve,
964
- region: [S.F_COUNTRY.enum.MY]
1077
+ region: [U.F_COUNTRY.enum.MY]
965
1078
  },
966
1079
  {
967
1080
  label: "Maybank Terminal (ITB)",
968
1081
  value: "mb-itb",
969
1082
  render: be,
970
- region: [S.F_COUNTRY.enum.MY]
1083
+ region: [U.F_COUNTRY.enum.MY]
971
1084
  },
972
1085
  {
973
1086
  label: "Maybank Terminal (PMA)",
974
1087
  value: "mb-pma",
975
1088
  render: we,
976
- region: [S.F_COUNTRY.enum.MY]
1089
+ region: [U.F_COUNTRY.enum.MY]
977
1090
  },
978
1091
  {
979
1092
  label: "Maybank Terminal (Paysys)",
980
1093
  value: "mb-paysys",
981
1094
  render: Ne,
982
- region: [S.F_COUNTRY.enum.MY]
1095
+ region: [U.F_COUNTRY.enum.MY]
983
1096
  },
984
1097
  {
985
1098
  label: "Nets Terminal",
986
1099
  value: "nets",
987
1100
  render: Se,
988
- region: [S.F_COUNTRY.enum.SG]
1101
+ region: [U.F_COUNTRY.enum.SG]
1102
+ },
1103
+ {
1104
+ label: "KBank Terminal",
1105
+ value: "kbank",
1106
+ render: Re,
1107
+ region: [U.F_COUNTRY.enum.TH]
989
1108
  }
990
- ], b = M(() => a.find((s) => s.value === e.value)), n = j().currentCountry, o = M(() => a.filter((s) => !s.region || s.region.includes(n.value ?? S.F_COUNTRY.enum.MY))), { gatewayTab: e } = E({
991
- gatewayTab: (d = o.value[0]) == null ? void 0 : d.value
1109
+ ], b = q(() => a.find((s) => s.value === e.value)), n = j().currentCountry, r = q(() => a.filter((s) => !s.region || s.region.includes(n.value ?? U.F_COUNTRY.enum.MY))), { gatewayTab: e } = E({
1110
+ gatewayTab: (m = r.value[0]) == null ? void 0 : m.value
992
1111
  });
993
- return (s, v) => {
1112
+ return (s, y) => {
994
1113
  var i;
995
1114
  const c = g("FmTabs");
996
- return f(), V("div", Me, [
997
- I("div", qe, [
998
- p(c, {
999
- "model-value": N(e),
1000
- "onUpdate:modelValue": v[0] || (v[0] = (t) => B(e) ? e.value = t : null),
1115
+ return f(), N("div", $e, [
1116
+ _("div", Pe, [
1117
+ v(c, {
1118
+ "model-value": S(e),
1119
+ "onUpdate:modelValue": y[0] || (y[0] = (t) => h(e) ? e.value = t : null),
1001
1120
  class: "mb-6",
1002
1121
  vertical: !0,
1003
- items: o.value
1122
+ items: r.value
1004
1123
  }, null, 8, ["model-value", "items"])
1005
1124
  ]),
1006
- I("div", Oe, [
1007
- N(e) ? (f(), w(Y((i = b.value) == null ? void 0 : i.render), h(L({ key: 0 }, {
1008
- terminal: m.terminal,
1009
- onUpdate: m.onUpdate
1125
+ _("div", Ae, [
1126
+ S(e) ? (f(), w(Y((i = b.value) == null ? void 0 : i.render), K(L({ key: 0 }, {
1127
+ terminal: d.terminal,
1128
+ onUpdate: d.onUpdate
1010
1129
  })), null, 16)) : C("", !0)
1011
1130
  ])
1012
1131
  ]);
1013
1132
  };
1014
1133
  }
1015
- }), Re = { class: "flex mt-6 space-x-6" }, $e = /* @__PURE__ */ U({
1134
+ }), Ge = { class: "flex mt-6 space-x-6" }, Be = /* @__PURE__ */ V({
1016
1135
  __name: "PromptPayGateway",
1017
1136
  props: {
1018
1137
  terminal: {
@@ -1024,52 +1143,52 @@ const te = /* @__PURE__ */ U({
1024
1143
  required: !0
1025
1144
  }
1026
1145
  },
1027
- setup(_) {
1028
- const m = _, a = R(() => m.terminal), b = F(), n = F(-1), o = F({
1146
+ setup(F) {
1147
+ const d = F, a = $(() => d.terminal), b = I(), n = I(-1), r = I({
1029
1148
  account: "",
1030
1149
  receiptName: ""
1031
1150
  }), e = () => {
1032
- o.value.account = "", o.value.receiptName = "", n.value = -1;
1033
- }, d = () => {
1151
+ r.value.account = "", r.value.receiptName = "", n.value = -1;
1152
+ }, m = () => {
1034
1153
  if (!a.value.qrIntegrations)
1035
1154
  return e();
1036
- const v = a.value.qrIntegrations, c = v.findIndex((t) => t && t.gateway && t.gateway === "PromptPay");
1155
+ const y = a.value.qrIntegrations, c = y.findIndex((t) => t && t.gateway && t.gateway === "PromptPay");
1037
1156
  if (c === -1)
1038
1157
  return e();
1039
1158
  n.value = c;
1040
- const i = v.at(c);
1041
- i.gateway === "PromptPay" && i.config && (o.value = {
1159
+ const i = y.at(c);
1160
+ i.gateway === "PromptPay" && i.config && (r.value = {
1042
1161
  account: i.config.account ?? "",
1043
1162
  receiptName: i.receiptName ?? ""
1044
1163
  });
1045
1164
  };
1046
- $(a, d), O(d);
1047
- async function s(v) {
1165
+ P(a, m), O(m);
1166
+ async function s(y) {
1048
1167
  var c;
1049
- (c = a.value.qrIntegrations) == null || c.splice(v, 1), m.onUpdate(a.value);
1168
+ (c = a.value.qrIntegrations) == null || c.splice(y, 1), d.onUpdate(a.value);
1050
1169
  }
1051
- return (v, c) => {
1170
+ return (y, c) => {
1052
1171
  const i = g("FmTextField"), t = g("FmButton"), l = g("FmForm");
1053
1172
  return f(), w(l, {
1054
1173
  ref: b.value,
1055
1174
  class: "flex flex-col gap-16 w-[500px]",
1056
1175
  onValidationSuccess: c[2] || (c[2] = () => {
1057
- n.value > -1 ? a.value.qrIntegrations[n.value] = { gateway: "PromptPay", config: { account: o.value.account }, receiptName: o.value.receiptName } : (a.value.qrIntegrations || (a.value.qrIntegrations = []), a.value.qrIntegrations.push({ gateway: "PromptPay", config: { account: o.value.account }, receiptName: o.value.receiptName })), m.onUpdate(a.value);
1176
+ n.value > -1 ? a.value.qrIntegrations[n.value] = { gateway: "PromptPay", config: { account: r.value.account }, receiptName: r.value.receiptName } : (a.value.qrIntegrations || (a.value.qrIntegrations = []), a.value.qrIntegrations.push({ gateway: "PromptPay", config: { account: r.value.account }, receiptName: r.value.receiptName })), d.onUpdate(a.value);
1058
1177
  })
1059
1178
  }, {
1060
- default: P(() => [
1061
- p(i, {
1062
- modelValue: o.value.account,
1063
- "onUpdate:modelValue": c[0] || (c[0] = (u) => o.value.account = u),
1179
+ default: R(() => [
1180
+ v(i, {
1181
+ modelValue: r.value.account,
1182
+ "onUpdate:modelValue": c[0] || (c[0] = (u) => r.value.account = u),
1064
1183
  label: "Thai Account / Internal Number"
1065
1184
  }, null, 8, ["modelValue"]),
1066
- p(i, {
1067
- modelValue: o.value.receiptName,
1068
- "onUpdate:modelValue": c[1] || (c[1] = (u) => o.value.receiptName = u),
1185
+ v(i, {
1186
+ modelValue: r.value.receiptName,
1187
+ "onUpdate:modelValue": c[1] || (c[1] = (u) => r.value.receiptName = u),
1069
1188
  label: "Receipt Payment Name",
1070
1189
  "label-info": "Default receipt display will be 'TERMINAL_MAYBANK'"
1071
1190
  }, null, 8, ["modelValue"]),
1072
- I("div", Re, [
1191
+ _("div", Ge, [
1073
1192
  n.value > -1 ? (f(), w(t, {
1074
1193
  key: 0,
1075
1194
  class: "flex-1",
@@ -1077,7 +1196,7 @@ const te = /* @__PURE__ */ U({
1077
1196
  label: "Delete",
1078
1197
  onclick: () => s(n.value)
1079
1198
  }, null, 8, ["onclick"])) : C("", !0),
1080
- p(t, {
1199
+ v(t, {
1081
1200
  type: "submit",
1082
1201
  class: "flex-1",
1083
1202
  variant: "primary",
@@ -1089,7 +1208,7 @@ const te = /* @__PURE__ */ U({
1089
1208
  }, 512);
1090
1209
  };
1091
1210
  }
1092
- }), De = { class: "flex items-center" }, Ge = { class: "w-[260px] self-start" }, Ae = { class: "flex-1" }, Be = /* @__PURE__ */ U({
1211
+ }), he = { class: "flex items-center" }, Ye = { class: "w-[260px] self-start" }, Ke = { class: "flex-1" }, Le = /* @__PURE__ */ V({
1093
1212
  __name: "QrGateway",
1094
1213
  props: {
1095
1214
  terminal: {
@@ -1101,41 +1220,41 @@ const te = /* @__PURE__ */ U({
1101
1220
  required: !0
1102
1221
  }
1103
1222
  },
1104
- setup(_) {
1105
- var d;
1106
- const m = _, a = [
1223
+ setup(F) {
1224
+ var m;
1225
+ const d = F, a = [
1107
1226
  {
1108
1227
  label: "PromptPay",
1109
1228
  value: "promptpay",
1110
- render: $e,
1111
- region: [S.F_COUNTRY.enum.MY]
1229
+ render: Be,
1230
+ region: [U.F_COUNTRY.enum.MY]
1112
1231
  }
1113
- ], b = M(() => a.find((s) => s.value === e.value)), n = j().currentCountry, o = M(() => a.filter((s) => !s.region || s.region.includes(n.value ?? S.F_COUNTRY.enum.MY))), { gatewayTab: e } = E({
1114
- gatewayTab: (d = o.value[0]) == null ? void 0 : d.value
1232
+ ], b = q(() => a.find((s) => s.value === e.value)), n = j().currentCountry, r = q(() => a.filter((s) => !s.region || s.region.includes(n.value ?? U.F_COUNTRY.enum.MY))), { gatewayTab: e } = E({
1233
+ gatewayTab: (m = r.value[0]) == null ? void 0 : m.value
1115
1234
  });
1116
- return (s, v) => {
1235
+ return (s, y) => {
1117
1236
  var i;
1118
1237
  const c = g("FmTabs");
1119
- return f(), V("div", De, [
1120
- I("div", Ge, [
1121
- p(c, {
1122
- "model-value": N(e),
1123
- "onUpdate:modelValue": v[0] || (v[0] = (t) => B(e) ? e.value = t : null),
1238
+ return f(), N("div", he, [
1239
+ _("div", Ye, [
1240
+ v(c, {
1241
+ "model-value": S(e),
1242
+ "onUpdate:modelValue": y[0] || (y[0] = (t) => h(e) ? e.value = t : null),
1124
1243
  class: "mb-6",
1125
1244
  vertical: !0,
1126
- items: o.value
1245
+ items: r.value
1127
1246
  }, null, 8, ["model-value", "items"])
1128
1247
  ]),
1129
- I("div", Ae, [
1130
- N(e) ? (f(), w(Y((i = b.value) == null ? void 0 : i.render), h(L({ key: 0 }, {
1131
- terminal: m.terminal,
1132
- onUpdate: m.onUpdate
1248
+ _("div", Ke, [
1249
+ S(e) ? (f(), w(Y((i = b.value) == null ? void 0 : i.render), K(L({ key: 0 }, {
1250
+ terminal: d.terminal,
1251
+ onUpdate: d.onUpdate
1133
1252
  })), null, 16)) : C("", !0)
1134
1253
  ])
1135
1254
  ]);
1136
1255
  };
1137
1256
  }
1138
- }), We = /* @__PURE__ */ U({
1257
+ }), aa = /* @__PURE__ */ V({
1139
1258
  __name: "TerminalSetting",
1140
1259
  props: {
1141
1260
  terminalId: {
@@ -1143,15 +1262,15 @@ const te = /* @__PURE__ */ U({
1143
1262
  required: !0
1144
1263
  }
1145
1264
  },
1146
- setup(_) {
1147
- const m = _, { tab: a } = E({
1265
+ setup(F) {
1266
+ const d = F, { tab: a } = E({
1148
1267
  tab: "information"
1149
- }), { isLoading: b, startAsyncCall: n } = z(!0), o = W(), e = H(), d = F();
1268
+ }), { isLoading: b, startAsyncCall: n } = z(!0), r = W(), e = Q(), m = I();
1150
1269
  async function s(l) {
1151
1270
  n(async () => {
1152
1271
  try {
1153
- await G.updateById(
1154
- m.terminalId,
1272
+ await D.updateById(
1273
+ d.terminalId,
1155
1274
  {
1156
1275
  name: l.name,
1157
1276
  status: l.status,
@@ -1160,7 +1279,7 @@ const te = /* @__PURE__ */ U({
1160
1279
  ecrIntegrations: l.ecrIntegrations ?? [],
1161
1280
  qrIntegrations: l.qrIntegrations ?? []
1162
1281
  }
1163
- ), d.value = await G.readById(m.terminalId), e.open({
1282
+ ), m.value = await D.readById(d.terminalId), e.open({
1164
1283
  type: "success",
1165
1284
  message: "Terminal updated successfully"
1166
1285
  });
@@ -1173,7 +1292,7 @@ const te = /* @__PURE__ */ U({
1173
1292
  }
1174
1293
  });
1175
1294
  }
1176
- const v = [
1295
+ const y = [
1177
1296
  {
1178
1297
  label: "Information",
1179
1298
  value: "information",
@@ -1191,54 +1310,54 @@ const te = /* @__PURE__ */ U({
1191
1310
  label: "SoftPos Gateway",
1192
1311
  value: "softpos",
1193
1312
  icon: "payment",
1194
- render: ie
1313
+ render: se
1195
1314
  },
1196
1315
  {
1197
1316
  label: "ECR Gateway",
1198
1317
  value: "ecr",
1199
1318
  icon: "point_of_sale",
1200
- render: Pe,
1319
+ render: De,
1201
1320
  onlyFor: ["POS", "KIOSK"]
1202
1321
  },
1203
1322
  {
1204
1323
  label: "QR Gateway",
1205
1324
  value: "qr",
1206
1325
  icon: "qr_code",
1207
- render: Be,
1326
+ render: Le,
1208
1327
  onlyFor: ["POS", "KIOSK"]
1209
1328
  }
1210
1329
  ];
1211
1330
  j().currentCountry;
1212
- const c = M(() => {
1331
+ const c = q(() => {
1213
1332
  var l;
1214
- return (l = v.find((u) => u.value === a.value)) == null ? void 0 : l.render;
1333
+ return (l = y.find((u) => u.value === a.value)) == null ? void 0 : l.render;
1215
1334
  });
1216
1335
  async function i() {
1217
1336
  n(async () => {
1218
- d.value = await G.readById(m.terminalId);
1337
+ m.value = await D.readById(d.terminalId);
1219
1338
  });
1220
1339
  }
1221
- const t = M(() => v.filter((l) => {
1340
+ const t = q(() => y.filter((l) => {
1222
1341
  var u;
1223
- return !l.onlyFor || l.onlyFor.includes(((u = d.value) == null ? void 0 : u.deviceType) ?? "");
1342
+ return !l.onlyFor || l.onlyFor.includes(((u = m.value) == null ? void 0 : u.deviceType) ?? "");
1224
1343
  }));
1225
1344
  return O(i), (l, u) => {
1226
- var k;
1227
- const y = g("FmTabs");
1345
+ var x;
1346
+ const p = g("FmTabs");
1228
1347
  return f(), w(X, {
1229
- title: `Terminal (${(k = d.value) == null ? void 0 : k._id})`,
1230
- loading: N(b),
1231
- onBack: N(o).back
1348
+ title: `Terminal (${(x = m.value) == null ? void 0 : x._id})`,
1349
+ loading: S(b),
1350
+ onBack: S(r).back
1232
1351
  }, {
1233
- default: P(() => [
1234
- p(y, {
1235
- "model-value": N(a),
1236
- "onUpdate:modelValue": u[0] || (u[0] = (r) => B(a) ? a.value = r : null),
1352
+ default: R(() => [
1353
+ v(p, {
1354
+ "model-value": S(a),
1355
+ "onUpdate:modelValue": u[0] || (u[0] = (o) => h(a) ? a.value = o : null),
1237
1356
  class: "mb-6",
1238
1357
  items: t.value
1239
1358
  }, null, 8, ["model-value", "items"]),
1240
- N(a) ? (f(), w(Y(c.value), h(L({ key: 0 }, {
1241
- terminal: d.value,
1359
+ S(a) ? (f(), w(Y(c.value), K(L({ key: 0 }, {
1360
+ terminal: m.value,
1242
1361
  onUpdate: s
1243
1362
  })), null, 16)) : C("", !0)
1244
1363
  ]),
@@ -1248,5 +1367,5 @@ const te = /* @__PURE__ */ U({
1248
1367
  }
1249
1368
  });
1250
1369
  export {
1251
- We as default
1370
+ aa as default
1252
1371
  };