@feedmepos/mf-payment 1.5.62-dev → 1.5.63-dev

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.
@@ -1,16 +1,16 @@
1
- import { defineComponent as U, openBlock as f, createElementBlock as R, Fragment as P, createElementVNode as I, createTextVNode as Y, toDisplayString as j, ref as b, resolveComponent as g, createVNode as v, createCommentVNode as k, unref as M, computed as S, isRef as z, createBlock as F, resolveDynamicComponent as Q, normalizeProps as J, mergeProps as W, watch as h, onBeforeUnmount as se, toRef as G, onMounted as O, withCtx as q, renderList as $ } from "vue";
2
- import { u as X, p as ce, e as V } from "./index-D2L-xfUj.js";
3
- import { useRouter as de } from "vue-router";
4
- import { t as B } from "./index-CmNdj-l1.js";
5
- import { _ as pe } from "./Layout.vue_vue_type_script_setup_true_lang-BKIvkgA_.js";
6
- import { u as Z } from "./index-CZZ-H3n4.js";
7
- import { useSnackbar as le } from "@feedmepos/ui-library";
8
- import { u as H } from "./error-K1CakhA9.js";
9
- import { useCoreStore as ee } from "@feedmepos/mf-common";
10
- import { o as me } from "./index-BpLbzUH-.js";
11
- import { c as ve } from "./index-MdV54cWO.js";
12
- import { z as ye, a as fe } from "./validator-DzjyJnvv.js";
13
- const ge = /* @__PURE__ */ U({
1
+ import { defineComponent as R, openBlock as f, createElementBlock as M, Fragment as G, createElementVNode as I, createTextVNode as j, toDisplayString as W, ref as b, resolveComponent as g, createVNode as v, createCommentVNode as V, unref as h, computed as C, isRef as Z, createBlock as F, resolveDynamicComponent as ee, normalizeProps as ae, mergeProps as te, watch as P, onBeforeUnmount as pe, toRef as A, onMounted as q, withCtx as O, renderList as Y } from "vue";
2
+ import { u as le, p as me, e as U } from "./index-D2L-xfUj.js";
3
+ import { useRouter as ve } from "vue-router";
4
+ import { t as E } from "./index-CmNdj-l1.js";
5
+ import { _ as ye } from "./Layout.vue_vue_type_script_setup_true_lang-BKIvkgA_.js";
6
+ import { u as ne } from "./index-CZZ-H3n4.js";
7
+ import { useSnackbar as se } from "@feedmepos/ui-library";
8
+ import { u as X } from "./error-K1CakhA9.js";
9
+ import { useI18n as fe, useCoreStore as oe } from "@feedmepos/mf-common";
10
+ import { o as ge } from "./index-BpLbzUH-.js";
11
+ import { c as be } from "./index-MdV54cWO.js";
12
+ import { z as Te, a as _e } from "./validator-DzjyJnvv.js";
13
+ const Ie = /* @__PURE__ */ R({
14
14
  __name: "Information",
15
15
  props: {
16
16
  terminal: {
@@ -19,22 +19,22 @@ const ge = /* @__PURE__ */ U({
19
19
  }
20
20
  },
21
21
  setup(_) {
22
- return (d, a) => (f(), R(P, null, [
22
+ return (d, a) => (f(), M(G, null, [
23
23
  a[0] || (a[0] = I("b", null, "Name", -1)),
24
- Y(": " + j(_.terminal.name), 1),
24
+ j(": " + W(_.terminal.name), 1),
25
25
  a[1] || (a[1] = I("br", null, null, -1)),
26
26
  a[2] || (a[2] = I("b", null, "Status", -1)),
27
- Y(": " + j(_.terminal.status), 1),
27
+ j(": " + W(_.terminal.status), 1),
28
28
  a[3] || (a[3] = I("br", null, null, -1)),
29
29
  a[4] || (a[4] = I("b", null, "Device ID", -1)),
30
- Y(": " + j(_.terminal.deviceId ?? "-"), 1),
30
+ j(": " + W(_.terminal.deviceId ?? "-"), 1),
31
31
  a[5] || (a[5] = I("br", null, null, -1)),
32
32
  a[6] || (a[6] = I("b", null, "Device Type", -1)),
33
- Y(": " + j(_.terminal.deviceType ?? "-"), 1),
33
+ j(": " + W(_.terminal.deviceType ?? "-"), 1),
34
34
  a[7] || (a[7] = I("br", null, null, -1))
35
35
  ], 64));
36
36
  }
37
- }), be = { key: 0 }, Te = { class: "mt-6 space-x-6" }, _e = /* @__PURE__ */ U({
37
+ }), Fe = { key: 0 }, we = { class: "mt-6 space-x-6" }, xe = /* @__PURE__ */ R({
38
38
  __name: "KioskMode",
39
39
  props: {
40
40
  terminal: {
@@ -43,20 +43,20 @@ const ge = /* @__PURE__ */ U({
43
43
  }
44
44
  },
45
45
  setup(_) {
46
- const { isLoading: d, startAsyncCall: a } = X(!1), T = le(), l = b({
46
+ const { isLoading: d, startAsyncCall: a } = le(!1), T = se(), l = b({
47
47
  enable: !1,
48
48
  password: []
49
49
  }), r = _;
50
50
  function e() {
51
- return l.value.enable && l.value.password.filter((p) => !!p).length !== 6 ? T.open({
51
+ return l.value.enable && l.value.password.filter((m) => !!m).length !== 6 ? T.open({
52
52
  type: "error",
53
53
  message: "Unlock PIN is required when setting up kiosk mode for terminal."
54
54
  }) : a(async () => {
55
- const p = { enable: l.value.enable };
56
- p.enable && Object.assign(p, {
55
+ const m = { enable: l.value.enable };
56
+ m.enable && Object.assign(m, {
57
57
  password: l.value.password.join("")
58
58
  });
59
- const c = await B.kioskModeRequest(r.terminal._id, p);
59
+ const c = await E.kioskModeRequest(r.terminal._id, m);
60
60
  if (c === "OK")
61
61
  return T.open({ type: "info", message: "Kiosk mode applied successfully." });
62
62
  let y = c;
@@ -66,34 +66,34 @@ const ge = /* @__PURE__ */ U({
66
66
  });
67
67
  });
68
68
  }
69
- return (p, c) => {
70
- const y = g("FmSwitch"), s = g("FmPinField"), u = g("FmButton");
71
- return f(), R(P, null, [
69
+ return (m, c) => {
70
+ const y = g("FmSwitch"), u = g("FmPinField"), s = g("FmButton");
71
+ return f(), M(G, null, [
72
72
  v(y, {
73
73
  modelValue: l.value.enable,
74
74
  "onUpdate:modelValue": c[0] || (c[0] = (t) => l.value.enable = t),
75
75
  label: "Enable Kiosk Mode?"
76
76
  }, null, 8, ["modelValue"]),
77
- l.value.enable ? (f(), R("div", be, [
77
+ l.value.enable ? (f(), M("div", Fe, [
78
78
  c[2] || (c[2] = I("p", { class: "mt-6" }, "Unlock PIN: ", -1)),
79
- v(s, {
79
+ v(u, {
80
80
  modelValue: l.value.password,
81
81
  "onUpdate:modelValue": c[1] || (c[1] = (t) => l.value.password = t)
82
82
  }, null, 8, ["modelValue"])
83
- ])) : k("", !0),
84
- I("div", Te, [
85
- v(u, {
83
+ ])) : V("", !0),
84
+ I("div", we, [
85
+ v(s, {
86
86
  variant: "primary",
87
87
  label: "Send",
88
88
  icon: "send",
89
- loading: M(d),
89
+ loading: h(d),
90
90
  onclick: e
91
91
  }, null, 8, ["loading"])
92
92
  ])
93
93
  ], 64);
94
94
  };
95
95
  }
96
- }), Ie = /* @__PURE__ */ U({
96
+ }), Ne = /* @__PURE__ */ R({
97
97
  __name: "SettingRequest",
98
98
  props: {
99
99
  terminal: {
@@ -102,135 +102,142 @@ const ge = /* @__PURE__ */ U({
102
102
  }
103
103
  },
104
104
  setup(_) {
105
- const { settingTab: d } = Z({
105
+ const { settingTab: d } = ne({
106
106
  settingTab: "kiosk_mode"
107
107
  }), a = [
108
108
  {
109
109
  label: "Kiosk Mode",
110
110
  value: "kiosk_mode",
111
- render: _e
111
+ render: xe
112
112
  }
113
- ], T = _, l = S(() => a.find((r) => r.value === d.value));
113
+ ], T = _, l = C(() => a.find((r) => r.value === d.value));
114
114
  return (r, e) => {
115
115
  var c;
116
- const p = g("FmTabs");
117
- return f(), R(P, null, [
116
+ const m = g("FmTabs");
117
+ return f(), M(G, null, [
118
118
  e[1] || (e[1] = I("p", { className: "mt-1 my-6 text-gray-600" }, [
119
119
  I("b", null, "Note: "),
120
- Y(" Setting request will perform remotely without caching so make sure terminal is connected to the network also to our websocket as well. ")
120
+ j(" Setting request will perform remotely without caching so make sure terminal is connected to the network also to our websocket as well. ")
121
121
  ], -1)),
122
- v(p, {
123
- "model-value": M(d),
124
- "onUpdate:modelValue": e[0] || (e[0] = (y) => z(d) ? d.value = y : null),
122
+ v(m, {
123
+ "model-value": h(d),
124
+ "onUpdate:modelValue": e[0] || (e[0] = (y) => Z(d) ? d.value = y : null),
125
125
  class: "mb-6",
126
126
  items: a
127
127
  }, null, 8, ["model-value"]),
128
- M(d) ? (f(), F(Q((c = l.value) == null ? void 0 : c.render), J(W({ key: 0 }, { terminal: T.terminal })), null, 16)) : k("", !0)
128
+ h(d) ? (f(), F(ee((c = l.value) == null ? void 0 : c.render), ae(te({ key: 0 }, { terminal: T.terminal })), null, 16)) : V("", !0)
129
129
  ], 64);
130
130
  };
131
131
  }
132
- }), Fe = 2e3, we = 12e4, xe = "Timed out waiting for the Tyro reader to sync. Please try again.";
133
- function Ne(_) {
134
- const { isLoading: d, startLoading: a, stopLoading: T } = X(!1), l = le(), r = b(null), e = S(() => {
135
- var n, x;
136
- const w = (n = _.value.gateways) == null ? void 0 : n.find(
137
- (A) => A.gateway === "Tyro"
132
+ }), ke = 2e3, Ce = 12e4, Ve = "Timed out waiting for the Tyro reader to sync. Please try again.";
133
+ function Se(_) {
134
+ const { isLoading: d, startLoading: a, stopLoading: T } = le(!1), { t: l } = fe(), r = se(), e = b(null), m = C(() => {
135
+ var D, B;
136
+ const k = (D = _.value.gateways) == null ? void 0 : D.find(
137
+ ($) => $.gateway === "Tyro"
138
138
  );
139
- return ((x = w == null ? void 0 : w.config) == null ? void 0 : x.uniqueId) || "";
140
- }), p = S(() => !!e.value), c = S(() => {
141
- var w, n, x;
142
- return ((w = r.value) == null ? void 0 : w.status) === "ready" && !!((x = (n = r.value) == null ? void 0 : n.fields) != null && x.tyroLocationId) && !!_.value.deviceId && !p.value;
143
- }), y = S(() => p.value ? "Synced" : "Sync");
144
- async function s() {
139
+ return ((B = k == null ? void 0 : k.config) == null ? void 0 : B.uniqueId) || "";
140
+ }), c = C(() => !!m.value), y = C(() => {
141
+ var k;
142
+ return ((k = e.value) == null ? void 0 : k.status) === "ready";
143
+ }), u = C(() => {
144
+ var k, D;
145
+ return y.value && !!((D = (k = e.value) == null ? void 0 : k.fields) != null && D.tyroLocationId) && !!_.value.deviceId && !c.value;
146
+ }), s = C(() => !y.value && !c.value), t = C(
147
+ () => l("payment.onboard-submission.tyro.syncDisabledHint")
148
+ ), n = C(() => c.value ? "Synced" : "Sync");
149
+ async function i() {
145
150
  if (!_.value.referenceId) {
146
- r.value = null;
151
+ e.value = null;
147
152
  return;
148
153
  }
149
154
  try {
150
- const w = await me.getByRestaurant(
155
+ const k = await ge.getByRestaurant(
151
156
  _.value.referenceId
152
157
  );
153
- r.value = w.find(
154
- (n) => n.type === ce.FdoOnboardType.enum.tyro
158
+ e.value = k.find(
159
+ (D) => D.type === me.FdoOnboardType.enum.tyro
155
160
  ) ?? null;
156
- } catch (w) {
157
- r.value = null, l.open({
161
+ } catch (k) {
162
+ e.value = null, r.open({
158
163
  type: "error",
159
- message: H(w)
164
+ message: X(k)
160
165
  });
161
166
  }
162
167
  }
163
- const u = ve({
164
- intervalMs: Fe,
165
- timeoutMs: we,
166
- onTick: async ({ isCurrentRun: w, stop: n }) => {
167
- var E, L;
168
- const x = await B.readById(_.value._id);
169
- if (!w())
168
+ const p = be({
169
+ intervalMs: ke,
170
+ timeoutMs: Ce,
171
+ onTick: async ({ isCurrentRun: k, stop: D }) => {
172
+ var H, z;
173
+ const B = await E.readById(_.value._id);
174
+ if (!k())
170
175
  return;
171
- const A = (E = x.gateways) == null ? void 0 : E.find((ae) => ae.gateway === "Tyro");
172
- (A == null ? void 0 : A.gateway) === "Tyro" && ((L = A == null ? void 0 : A.config) != null && L.uniqueId) && (n({ invalidate: !1 }), T(), Object.assign(_.value, x), l.open({
176
+ const $ = (H = B.gateways) == null ? void 0 : H.find((Q) => Q.gateway === "Tyro");
177
+ ($ == null ? void 0 : $.gateway) === "Tyro" && ((z = $ == null ? void 0 : $.config) != null && z.uniqueId) && (D({ invalidate: !1 }), T(), Object.assign(_.value, B), r.open({
173
178
  type: "success",
174
179
  message: "Tyro reader created successfully"
175
180
  }));
176
181
  },
177
182
  onTimeout: () => {
178
- T(), l.open({
183
+ T(), r.open({
179
184
  type: "error",
180
- message: xe
185
+ message: Ve
181
186
  });
182
187
  },
183
- onError: (w) => {
184
- T(), l.open({
188
+ onError: (k) => {
189
+ T(), r.open({
185
190
  type: "error",
186
- message: H(w)
191
+ message: X(k)
187
192
  });
188
193
  }
189
- }), t = u.isPolling;
194
+ }), x = p.isPolling;
190
195
  function o() {
191
- u.stop(), T();
196
+ p.stop(), T();
192
197
  }
193
- function i() {
194
- o(), a(), u.start();
198
+ function w() {
199
+ o(), a(), p.start();
195
200
  }
196
- async function m() {
197
- if (!c.value) {
198
- l.open({
201
+ async function K() {
202
+ if (!u.value) {
203
+ r.open({
199
204
  type: "error",
200
205
  message: "Tyro reader sync is not available"
201
206
  });
202
207
  return;
203
208
  }
204
209
  try {
205
- a(), await B.syncTyroReader(_.value._id), i();
206
- } catch (w) {
207
- o(), l.open({
210
+ a(), await E.syncTyroReader(_.value._id), w();
211
+ } catch (k) {
212
+ o(), r.open({
208
213
  type: "error",
209
- message: H(w)
214
+ message: X(k)
210
215
  });
211
216
  }
212
217
  }
213
- return h(
218
+ return P(
214
219
  () => _.value.referenceId,
215
220
  async () => {
216
- await s();
221
+ await i();
217
222
  },
218
223
  { immediate: !0 }
219
- ), se(() => {
224
+ ), pe(() => {
220
225
  o();
221
226
  }), {
222
227
  isLoading: d,
223
- isPollingTyroReader: t,
224
- uniqueId: e,
225
- canSyncTyroReader: c,
226
- tyroSyncButtonLabel: y,
227
- syncTyroReader: m
228
+ isPollingTyroReader: x,
229
+ uniqueId: m,
230
+ canSyncTyroReader: u,
231
+ showTyroSyncPopover: s,
232
+ tyroSyncPopoverMessage: t,
233
+ tyroSyncButtonLabel: n,
234
+ syncTyroReader: K
228
235
  };
229
236
  }
230
- const ke = {
237
+ const Ue = {
231
238
  key: 0,
232
239
  class: "text-sm text-gray-500"
233
- }, Ce = { class: "flex mt-6 space-x-6" }, Ve = /* @__PURE__ */ U({
240
+ }, Re = { class: "flex mt-6 space-x-6" }, Me = { class: "flex-1" }, he = /* @__PURE__ */ R({
234
241
  __name: "SoftposGateway",
235
242
  props: {
236
243
  terminal: {
@@ -243,11 +250,11 @@ const ke = {
243
250
  }
244
251
  },
245
252
  setup(_) {
246
- const d = _, a = ee().currentCountry, T = [
253
+ const d = _, a = oe().currentCountry, T = [
247
254
  {
248
255
  label: "Fiuu Malaysia",
249
256
  value: "cc.feedme.payment.rms",
250
- region: V.F_COUNTRY.enum.MY,
257
+ region: U.F_COUNTRY.enum.MY,
251
258
  gateway: "Fiuu",
252
259
  isLegacy: !0,
253
260
  isOutdated: !0
@@ -255,14 +262,14 @@ const ke = {
255
262
  {
256
263
  label: "Fiuu Malaysia V2",
257
264
  value: "cc.feedme.payment.fiuu_my",
258
- region: V.F_COUNTRY.enum.MY,
265
+ region: U.F_COUNTRY.enum.MY,
259
266
  gateway: "Fiuu",
260
267
  isLegacy: !0
261
268
  },
262
269
  {
263
270
  label: "Fiuu Singapore",
264
271
  value: "cc.feedme.payment.fiuu_sg",
265
- region: V.F_COUNTRY.enum.SG,
272
+ region: U.F_COUNTRY.enum.SG,
266
273
  gateway: "Fiuu",
267
274
  isLegacy: !0
268
275
  },
@@ -270,47 +277,49 @@ const ke = {
270
277
  label: "Softspace Malaysia",
271
278
  value: "cc.feedme.payment.softspace_my",
272
279
  gateway: "Softspace",
273
- region: V.F_COUNTRY.enum.MY
280
+ region: U.F_COUNTRY.enum.MY
274
281
  },
275
282
  {
276
283
  label: "Digio Thailand",
277
284
  value: "cc.feedme.payment.digio_th",
278
285
  gateway: "Digio",
279
- region: V.F_COUNTRY.enum.TH
286
+ region: U.F_COUNTRY.enum.TH
280
287
  },
281
288
  {
282
289
  label: "Tyro Australia",
283
290
  value: "cc.feedme.payment.tyro_au",
284
291
  gateway: "Tyro",
285
- region: V.F_COUNTRY.enum.AU
292
+ region: U.F_COUNTRY.enum.AU
286
293
  }
287
- ], l = G(() => d.terminal), r = b(), e = b({
294
+ ], l = A(() => d.terminal), r = b(), e = b({
288
295
  packageId: "",
289
296
  uniqueId: "",
290
297
  developerId: "",
291
298
  isUat: !1
292
- }), p = () => {
299
+ }), m = () => {
293
300
  e.value.uniqueId = "", e.value.packageId = "", e.value.developerId = "", e.value.isUat = !1;
294
- }, c = S(() => T.filter((N) => N.region === a.value)), y = S(() => c.value.find(
301
+ }, c = C(() => T.filter((N) => N.region === a.value)), y = C(() => c.value.find(
295
302
  (N) => N.value === e.value.packageId
296
- )), s = S(
303
+ )), u = C(
297
304
  () => {
298
305
  var N;
299
306
  return ((N = y.value) == null ? void 0 : N.gateway) === "Tyro";
300
307
  }
301
308
  ), {
302
- isLoading: u,
309
+ isLoading: s,
303
310
  isPollingTyroReader: t,
304
- uniqueId: o,
311
+ uniqueId: n,
305
312
  canSyncTyroReader: i,
306
- tyroSyncButtonLabel: m,
313
+ showTyroSyncPopover: p,
314
+ tyroSyncPopoverMessage: x,
315
+ tyroSyncButtonLabel: o,
307
316
  syncTyroReader: w
308
- } = Ne(l), n = S(() => s.value ? "button" : "submit"), x = S(() => s.value ? m.value : "Save"), A = S(() => s.value ? u.value : !1), E = S(() => s.value ? !i.value || t.value : !1), L = () => {
317
+ } = Se(l), K = C(() => u.value ? "button" : "submit"), k = C(() => u.value ? o.value : "Save"), D = C(() => u.value ? s.value : !1), B = C(() => u.value ? !i.value || t.value : !1), $ = () => {
309
318
  if (!l.value.gateways || l.value.gateways.length === 0)
310
- return p();
319
+ return m();
311
320
  const N = l.value.gateways[0];
312
321
  if (!N.config)
313
- return p();
322
+ return m();
314
323
  if (N.gateway === "Tyro") {
315
324
  e.value = {
316
325
  packageId: N.config.packageId,
@@ -331,114 +340,136 @@ const ke = {
331
340
  break;
332
341
  case "Softspace":
333
342
  case "Digio":
334
- const C = JSON.parse(N.config.uniqueId);
343
+ const S = JSON.parse(N.config.uniqueId);
335
344
  e.value = {
336
345
  packageId: N.config.packageId,
337
- uniqueId: C.uniqueId,
338
- developerId: C.developerId,
339
- isUat: C.isUat
346
+ uniqueId: S.uniqueId,
347
+ developerId: S.developerId,
348
+ isUat: S.isUat
340
349
  };
341
350
  return;
342
351
  }
343
352
  };
344
- h(l, L), O(L);
345
- async function ae() {
353
+ P(l, $), q($);
354
+ async function H() {
346
355
  const N = y.value;
347
356
  if (!N)
348
357
  return;
349
- let C = e.value.uniqueId;
350
- N.isLegacy || (C = JSON.stringify({
358
+ let S = e.value.uniqueId;
359
+ N.isLegacy || (S = JSON.stringify({
351
360
  uniqueId: e.value.uniqueId,
352
361
  developerId: e.value.developerId,
353
362
  isUat: e.value.isUat
354
363
  }));
355
- const te = {
364
+ const re = {
356
365
  gateway: N.gateway,
357
366
  config: {
358
367
  packageId: N.value,
359
- uniqueId: C
368
+ uniqueId: S
360
369
  }
361
370
  };
362
- (!l.value.gateways || l.value.gateways.length > 1) && (l.value.gateways = []), l.value.gateways[0] = te, await d.onUpdate(l.value);
371
+ (!l.value.gateways || l.value.gateways.length > 1) && (l.value.gateways = []), l.value.gateways[0] = re, await d.onUpdate(l.value);
363
372
  }
364
- async function oe(N) {
365
- var C;
366
- (C = l.value.gateways) == null || C.splice(N, 1), d.onUpdate(l.value);
373
+ async function z(N) {
374
+ var S;
375
+ (S = l.value.gateways) == null || S.splice(N, 1), d.onUpdate(l.value);
367
376
  }
368
- function re() {
369
- s.value && w();
377
+ function Q() {
378
+ u.value && w();
370
379
  }
371
- return (N, C) => {
372
- const te = g("FmSelect"), K = g("FmTextField"), ie = g("FmCheckbox"), ne = g("FmButton"), ue = g("FmForm");
373
- return f(), F(ue, {
380
+ return (N, S) => {
381
+ const re = g("FmSelect"), J = g("FmTextField"), ue = g("FmCheckbox"), ie = g("FmButton"), ce = g("FmTooltip"), de = g("FmForm");
382
+ return f(), F(de, {
374
383
  ref: r.value,
375
384
  class: "flex flex-col gap-16 w-[500px]",
376
- onValidationSuccess: ae
385
+ onValidationSuccess: H
377
386
  }, {
378
- default: q(() => [
379
- v(te, {
387
+ default: O(() => [
388
+ v(re, {
380
389
  modelValue: e.value.packageId,
381
- "onUpdate:modelValue": C[0] || (C[0] = (D) => e.value.packageId = D),
390
+ "onUpdate:modelValue": S[0] || (S[0] = (L) => e.value.packageId = L),
382
391
  label: "Package ID",
383
392
  items: c.value
384
393
  }, null, 8, ["modelValue", "items"]),
385
- s.value ? (f(), F(K, {
394
+ u.value ? (f(), F(J, {
386
395
  key: 0,
387
- "model-value": M(o),
396
+ "model-value": h(n),
388
397
  label: "Unique ID (Reader ID)",
389
398
  disabled: ""
390
- }, null, 8, ["model-value"])) : y.value && y.value.isLegacy ? (f(), R(P, { key: 1 }, [
391
- v(K, {
399
+ }, null, 8, ["model-value"])) : y.value && y.value.isLegacy ? (f(), M(G, { key: 1 }, [
400
+ v(J, {
392
401
  modelValue: e.value.uniqueId,
393
- "onUpdate:modelValue": C[1] || (C[1] = (D) => e.value.uniqueId = D),
402
+ "onUpdate:modelValue": S[1] || (S[1] = (L) => e.value.uniqueId = L),
394
403
  label: "Unique ID (TID)"
395
404
  }, null, 8, ["modelValue"]),
396
- y.value.isOutdated ? (f(), R("span", ke, " Note: For outdated gateway is no longer continued development, please use the new gateway instead. ")) : k("", !0)
397
- ], 64)) : s.value ? k("", !0) : (f(), R(P, { key: 2 }, [
398
- v(K, {
405
+ y.value.isOutdated ? (f(), M("span", Ue, " Note: For outdated gateway is no longer continued development, please use the new gateway instead. ")) : V("", !0)
406
+ ], 64)) : u.value ? V("", !0) : (f(), M(G, { key: 2 }, [
407
+ v(J, {
399
408
  modelValue: e.value.developerId,
400
- "onUpdate:modelValue": C[2] || (C[2] = (D) => e.value.developerId = D),
409
+ "onUpdate:modelValue": S[2] || (S[2] = (L) => e.value.developerId = L),
401
410
  label: "Developer ID (MID)"
402
411
  }, null, 8, ["modelValue"]),
403
- v(K, {
412
+ v(J, {
404
413
  modelValue: e.value.uniqueId,
405
- "onUpdate:modelValue": C[3] || (C[3] = (D) => e.value.uniqueId = D),
414
+ "onUpdate:modelValue": S[3] || (S[3] = (L) => e.value.uniqueId = L),
406
415
  label: "Unique ID (TID)"
407
416
  }, null, 8, ["modelValue"]),
408
- v(ie, {
417
+ v(ue, {
409
418
  modelValue: e.value.isUat,
410
- "onUpdate:modelValue": C[4] || (C[4] = (D) => e.value.isUat = D),
419
+ "onUpdate:modelValue": S[4] || (S[4] = (L) => e.value.isUat = L),
411
420
  label: "Is UAT (Test)",
412
421
  value: "1"
413
422
  }, null, 8, ["modelValue"])
414
423
  ], 64)),
415
- I("div", Ce, [
416
- l.value.gateways && l.value.gateways.length > 0 ? (f(), F(ne, {
424
+ I("div", Re, [
425
+ l.value.gateways && l.value.gateways.length > 0 ? (f(), F(ie, {
417
426
  key: 0,
418
427
  class: "flex-1",
419
428
  variant: "secondary",
420
429
  label: "Delete",
421
- onclick: () => oe(0)
422
- }, null, 8, ["onclick"])) : k("", !0),
423
- v(ne, {
424
- type: n.value,
430
+ onclick: () => z(0)
431
+ }, null, 8, ["onclick"])) : V("", !0),
432
+ u.value && h(p) && B.value ? (f(), F(ce, {
433
+ key: 1,
434
+ class: "flex-1",
435
+ variant: "plain",
436
+ placement: "top",
437
+ content: h(x)
438
+ }, {
439
+ default: O(() => [
440
+ I("div", Me, [
441
+ v(ie, {
442
+ type: K.value,
443
+ class: "w-full",
444
+ variant: "primary",
445
+ loading: D.value,
446
+ disabled: B.value,
447
+ label: k.value,
448
+ onClick: Q
449
+ }, null, 8, ["type", "loading", "disabled", "label"])
450
+ ])
451
+ ]),
452
+ _: 1
453
+ }, 8, ["content"])) : (f(), F(ie, {
454
+ key: 2,
455
+ type: K.value,
425
456
  class: "flex-1",
426
457
  variant: "primary",
427
- loading: A.value,
428
- disabled: E.value,
429
- label: x.value,
430
- onClick: re
431
- }, null, 8, ["type", "loading", "disabled", "label"])
458
+ loading: D.value,
459
+ disabled: B.value,
460
+ label: k.value,
461
+ onClick: Q
462
+ }, null, 8, ["type", "loading", "disabled", "label"]))
432
463
  ])
433
464
  ]),
434
465
  _: 1
435
466
  }, 512);
436
467
  };
437
468
  }
438
- }), Ue = {
469
+ }), Oe = {
439
470
  key: 0,
440
471
  class: "flex items-center justify-center min-h-[80vh]"
441
- }, Se = { class: "flex mt-6 space-x-6" }, Re = /* @__PURE__ */ U({
472
+ }, Pe = { class: "flex mt-6 space-x-6" }, qe = /* @__PURE__ */ R({
442
473
  __name: "TerminalGateway",
443
474
  props: {
444
475
  terminal: {
@@ -451,62 +482,62 @@ const ke = {
451
482
  }
452
483
  },
453
484
  setup(_) {
454
- const { isLoading: d, startAsyncCall: a } = X(), T = _, l = G(() => T.terminal), r = b(), e = b(), p = b(-1), c = b({
485
+ const { isLoading: d, startAsyncCall: a } = le(), T = _, l = A(() => T.terminal), r = b(), e = b(), m = b(-1), c = b({
455
486
  terminalId: ""
456
487
  }), y = () => {
457
- c.value.terminalId = "", p.value = -1;
458
- }, s = () => {
488
+ c.value.terminalId = "", m.value = -1;
489
+ }, u = () => {
459
490
  if (a(async () => {
460
- r.value = await B.getRestaurantTerminals(T.terminal.referenceId);
491
+ r.value = await E.getRestaurantTerminals(T.terminal.referenceId);
461
492
  }), !T.terminal.ecrs)
462
493
  return y();
463
- const o = T.terminal.ecrs.findIndex((m) => m && m.gateway && m.gateway === "FeedMe");
464
- if (o === -1)
494
+ const n = T.terminal.ecrs.findIndex((p) => p && p.gateway && p.gateway === "FeedMe");
495
+ if (n === -1)
465
496
  return y();
466
- p.value = o;
467
- const i = T.terminal.ecrs.at(o);
497
+ m.value = n;
498
+ const i = T.terminal.ecrs.at(n);
468
499
  i.gateway === "FeedMe" && i.config && (c.value = {
469
500
  terminalId: i.config.terminalId
470
501
  });
471
502
  };
472
- h(l, s), O(s);
473
- const u = S(() => (r.value ?? []).map((o) => ({
474
- label: o.name ?? o._id,
475
- value: o._id
503
+ P(l, u), q(u);
504
+ const s = C(() => (r.value ?? []).map((n) => ({
505
+ label: n.name ?? n._id,
506
+ value: n._id
476
507
  })));
477
- async function t(o) {
508
+ async function t(n) {
478
509
  var i;
479
- (i = T.terminal.ecrs) == null || i.splice(o, 1), T.onUpdate(T.terminal);
510
+ (i = T.terminal.ecrs) == null || i.splice(n, 1), T.onUpdate(T.terminal);
480
511
  }
481
- return (o, i) => {
482
- const m = g("FmCircularProgress"), w = g("FmSelect"), n = g("FmButton"), x = g("FmForm");
483
- return M(d) ? (f(), R("div", Ue, [
484
- v(m, { size: "xxl" })
485
- ])) : (f(), F(x, {
512
+ return (n, i) => {
513
+ const p = g("FmCircularProgress"), x = g("FmSelect"), o = g("FmButton"), w = g("FmForm");
514
+ return h(d) ? (f(), M("div", Oe, [
515
+ v(p, { size: "xxl" })
516
+ ])) : (f(), F(w, {
486
517
  key: 1,
487
518
  ref: e.value,
488
519
  class: "flex flex-col gap-16 w-[500px]",
489
520
  onValidationSuccess: i[1] || (i[1] = () => {
490
- p.value > -1 ? l.value.ecrs[p.value] = { gateway: "FeedMe", config: c.value } : (l.value.ecrs || (l.value.ecrs = []), l.value.ecrs.push({ gateway: "FeedMe", config: c.value })), T.onUpdate(l.value);
521
+ m.value > -1 ? l.value.ecrs[m.value] = { gateway: "FeedMe", config: c.value } : (l.value.ecrs || (l.value.ecrs = []), l.value.ecrs.push({ gateway: "FeedMe", config: c.value })), T.onUpdate(l.value);
491
522
  })
492
523
  }, {
493
- default: q(() => [
494
- v(w, {
524
+ default: O(() => [
525
+ v(x, {
495
526
  modelValue: c.value.terminalId,
496
- "onUpdate:modelValue": i[0] || (i[0] = (A) => c.value.terminalId = A),
527
+ "onUpdate:modelValue": i[0] || (i[0] = (K) => c.value.terminalId = K),
497
528
  label: "Terminal ID",
498
- items: u.value,
499
- rules: M(ye)(M(fe).string())
529
+ items: s.value,
530
+ rules: h(Te)(h(_e).string())
500
531
  }, null, 8, ["modelValue", "items", "rules"]),
501
- I("div", Se, [
502
- p.value > -1 ? (f(), F(n, {
532
+ I("div", Pe, [
533
+ m.value > -1 ? (f(), F(o, {
503
534
  key: 0,
504
535
  class: "flex-1",
505
536
  variant: "secondary",
506
537
  label: "Delete",
507
- onclick: () => t(p.value)
508
- }, null, 8, ["onclick"])) : k("", !0),
509
- v(n, {
538
+ onclick: () => t(m.value)
539
+ }, null, 8, ["onclick"])) : V("", !0),
540
+ v(o, {
510
541
  type: "submit",
511
542
  class: "flex-1",
512
543
  variant: "primary",
@@ -518,7 +549,7 @@ const ke = {
518
549
  }, 512));
519
550
  };
520
551
  }
521
- }), Me = { class: "flex mt-6 space-x-6" }, he = /* @__PURE__ */ U({
552
+ }), Ge = { class: "flex mt-6 space-x-6" }, Ae = /* @__PURE__ */ R({
522
553
  __name: "GhlGateway",
523
554
  props: {
524
555
  terminal: {
@@ -531,67 +562,67 @@ const ke = {
531
562
  }
532
563
  },
533
564
  setup(_) {
534
- const d = _, a = G(() => d.terminal), T = b(), l = b(-1), r = b({
565
+ const d = _, a = A(() => d.terminal), T = b(), l = b(-1), r = b({
535
566
  merchantId: "",
536
567
  terminalId: "",
537
568
  privateKey: ""
538
569
  }), e = () => {
539
570
  r.value.merchantId = "", r.value.terminalId = "", r.value.privateKey = "", l.value = -1;
540
- }, p = () => {
571
+ }, m = () => {
541
572
  if (!a.value.ecrs)
542
573
  return e();
543
- const y = a.value.ecrs.findIndex((u) => u && u.gateway && u.gateway === "Ghl");
574
+ const y = a.value.ecrs.findIndex((s) => s && s.gateway && s.gateway === "Ghl");
544
575
  if (y === -1)
545
576
  return e();
546
577
  l.value = y;
547
- const s = a.value.ecrs.at(y);
548
- s.gateway === "Ghl" && s.config && (r.value = {
549
- merchantId: s.config.merchantId,
550
- terminalId: s.config.terminalId,
551
- privateKey: s.config.privateKey || ""
578
+ const u = a.value.ecrs.at(y);
579
+ u.gateway === "Ghl" && u.config && (r.value = {
580
+ merchantId: u.config.merchantId,
581
+ terminalId: u.config.terminalId,
582
+ privateKey: u.config.privateKey || ""
552
583
  });
553
584
  };
554
- h(a, p), O(p);
585
+ P(a, m), q(m);
555
586
  async function c(y) {
556
- var s;
557
- (s = a.value.ecrs) == null || s.splice(y, 1), d.onUpdate(a.value);
587
+ var u;
588
+ (u = a.value.ecrs) == null || u.splice(y, 1), d.onUpdate(a.value);
558
589
  }
559
- return (y, s) => {
560
- const u = g("FmTextField"), t = g("FmTextarea"), o = g("FmButton"), i = g("FmForm");
590
+ return (y, u) => {
591
+ const s = g("FmTextField"), t = g("FmTextarea"), n = g("FmButton"), i = g("FmForm");
561
592
  return f(), F(i, {
562
593
  ref: T.value,
563
594
  class: "flex flex-col gap-16 w-[500px]",
564
- onValidationSuccess: s[3] || (s[3] = () => {
595
+ onValidationSuccess: u[3] || (u[3] = () => {
565
596
  l.value > -1 ? a.value.ecrs[l.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);
566
597
  })
567
598
  }, {
568
- default: q(() => [
569
- v(u, {
599
+ default: O(() => [
600
+ v(s, {
570
601
  modelValue: r.value.merchantId,
571
- "onUpdate:modelValue": s[0] || (s[0] = (m) => r.value.merchantId = m),
602
+ "onUpdate:modelValue": u[0] || (u[0] = (p) => r.value.merchantId = p),
572
603
  label: "Merchant ID"
573
604
  }, null, 8, ["modelValue"]),
574
- v(u, {
605
+ v(s, {
575
606
  modelValue: r.value.terminalId,
576
- "onUpdate:modelValue": s[1] || (s[1] = (m) => r.value.terminalId = m),
607
+ "onUpdate:modelValue": u[1] || (u[1] = (p) => r.value.terminalId = p),
577
608
  label: "Terminal ID"
578
609
  }, null, 8, ["modelValue"]),
579
610
  v(t, {
580
611
  modelValue: r.value.privateKey,
581
- "onUpdate:modelValue": s[2] || (s[2] = (m) => r.value.privateKey = m),
612
+ "onUpdate:modelValue": u[2] || (u[2] = (p) => r.value.privateKey = p),
582
613
  label: "Private Key",
583
614
  "label-mark": "optional",
584
615
  "label-info": "Default will use FeedMe Private Key"
585
616
  }, null, 8, ["modelValue"]),
586
- I("div", Me, [
587
- l.value > -1 ? (f(), F(o, {
617
+ I("div", Ge, [
618
+ l.value > -1 ? (f(), F(n, {
588
619
  key: 0,
589
620
  class: "flex-1",
590
621
  variant: "secondary",
591
622
  label: "Delete",
592
623
  onclick: () => c(l.value)
593
- }, null, 8, ["onclick"])) : k("", !0),
594
- v(o, {
624
+ }, null, 8, ["onclick"])) : V("", !0),
625
+ v(n, {
595
626
  type: "submit",
596
627
  class: "flex-1",
597
628
  variant: "primary",
@@ -603,7 +634,7 @@ const ke = {
603
634
  }, 512);
604
635
  };
605
636
  }
606
- }), Oe = { class: "flex items-end" }, qe = { class: "flex flex-wrap gap-8 items-center mt-4" }, Pe = { class: "flex mt-6 space-x-6" }, Ge = /* @__PURE__ */ U({
637
+ }), De = { class: "flex items-end" }, $e = { class: "flex flex-wrap gap-8 items-center mt-4" }, Be = { class: "flex mt-6 space-x-6" }, Le = /* @__PURE__ */ R({
607
638
  __name: "MaybankGateway",
608
639
  props: {
609
640
  terminal: {
@@ -616,48 +647,48 @@ const ke = {
616
647
  }
617
648
  },
618
649
  setup(_) {
619
- const d = _, a = G(() => d.terminal), T = b(), l = b(-1), r = b(), e = b({
650
+ const d = _, a = A(() => d.terminal), T = b(), l = b(-1), r = b(), e = b({
620
651
  ip: "",
621
652
  receiptName: "",
622
653
  cardTypes: []
623
- }), p = () => {
654
+ }), m = () => {
624
655
  e.value.ip = "", e.value.receiptName = "", e.value.cardTypes = [], l.value = -1;
625
656
  }, c = () => {
626
657
  var i;
627
658
  if (!a.value.ecrIntegrations)
628
- return p();
629
- const u = a.value.ecrIntegrations, t = u.findIndex((m) => m && m.gateway && m.gateway === "Maybank");
659
+ return m();
660
+ const s = a.value.ecrIntegrations, t = s.findIndex((p) => p && p.gateway && p.gateway === "Maybank");
630
661
  if (t === -1)
631
- return p();
662
+ return m();
632
663
  l.value = t;
633
- const o = u.at(t);
634
- o.gateway === "Maybank" && o.config && (e.value = {
635
- ip: o.config.ip ?? "",
636
- receiptName: o.receiptName ?? "",
637
- cardTypes: ((i = o.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
664
+ const n = s.at(t);
665
+ n.gateway === "Maybank" && n.config && (e.value = {
666
+ ip: n.config.ip ?? "",
667
+ receiptName: n.receiptName ?? "",
668
+ cardTypes: ((i = n.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
638
669
  });
639
670
  };
640
- h(a, c), O(c);
641
- async function y(u) {
671
+ P(a, c), q(c);
672
+ async function y(s) {
642
673
  var t;
643
- (t = a.value.ecrIntegrations) == null || t.splice(u, 1), d.onUpdate(a.value);
674
+ (t = a.value.ecrIntegrations) == null || t.splice(s, 1), d.onUpdate(a.value);
644
675
  }
645
- async function s() {
676
+ async function u() {
646
677
  e.value.cardTypes.push(r.value), r.value = "";
647
678
  }
648
- return (u, t) => {
649
- const o = g("FmTextField"), i = g("FmButton"), m = g("FmChip"), w = g("FmForm");
650
- return f(), F(w, {
679
+ return (s, t) => {
680
+ const n = g("FmTextField"), i = g("FmButton"), p = g("FmChip"), x = g("FmForm");
681
+ return f(), F(x, {
651
682
  ref: T.value,
652
683
  class: "flex flex-col gap-16 w-[500px]",
653
684
  onValidationSuccess: t[3] || (t[3] = () => {
654
- var n, x;
685
+ var o, w;
655
686
  l.value > -1 ? a.value.ecrIntegrations[l.value] = {
656
687
  gateway: "Maybank",
657
688
  config: { ip: e.value.ip },
658
689
  receiptName: e.value.receiptName,
659
690
  dialogConfig: {
660
- ...(x = (n = a.value.ecrIntegrations) == null ? void 0 : n[l.value]) == null ? void 0 : x.dialogConfig,
691
+ ...(w = (o = a.value.ecrIntegrations) == null ? void 0 : o[l.value]) == null ? void 0 : w.dialogConfig,
661
692
  cardTypes: e.value.cardTypes
662
693
  }
663
694
  } : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
@@ -670,47 +701,47 @@ const ke = {
670
701
  })), d.onUpdate(a.value);
671
702
  })
672
703
  }, {
673
- default: q(() => [
674
- v(o, {
704
+ default: O(() => [
705
+ v(n, {
675
706
  modelValue: e.value.ip,
676
- "onUpdate:modelValue": t[0] || (t[0] = (n) => e.value.ip = n),
707
+ "onUpdate:modelValue": t[0] || (t[0] = (o) => e.value.ip = o),
677
708
  label: "IP Address"
678
709
  }, null, 8, ["modelValue"]),
679
- v(o, {
710
+ v(n, {
680
711
  modelValue: e.value.receiptName,
681
- "onUpdate:modelValue": t[1] || (t[1] = (n) => e.value.receiptName = n),
712
+ "onUpdate:modelValue": t[1] || (t[1] = (o) => e.value.receiptName = o),
682
713
  label: "Receipt Payment Name",
683
714
  "label-info": "Default receipt display will be 'TERMINAL_MAYBANK'"
684
715
  }, null, 8, ["modelValue"]),
685
- I("div", Oe, [
686
- v(o, {
716
+ I("div", De, [
717
+ v(n, {
687
718
  modelValue: r.value,
688
- "onUpdate:modelValue": t[2] || (t[2] = (n) => r.value = n),
719
+ "onUpdate:modelValue": t[2] || (t[2] = (o) => r.value = o),
689
720
  label: "Fallback Card Types",
690
721
  "label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
691
722
  }, null, 8, ["modelValue"]),
692
723
  v(i, {
693
724
  class: "ml-4",
694
725
  icon: "add",
695
- onClick: s
726
+ onClick: u
696
727
  })
697
728
  ]),
698
- I("div", qe, [
699
- (f(!0), R(P, null, $(e.value.cardTypes, (n) => (f(), F(m, {
700
- key: n,
701
- label: n,
729
+ I("div", $e, [
730
+ (f(!0), M(G, null, Y(e.value.cardTypes, (o) => (f(), F(p, {
731
+ key: o,
732
+ label: o,
702
733
  removable: !0,
703
- onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(n), 1)
734
+ onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(o), 1)
704
735
  }, null, 8, ["label", "onChipClosed"]))), 128))
705
736
  ]),
706
- I("div", Pe, [
737
+ I("div", Be, [
707
738
  l.value > -1 ? (f(), F(i, {
708
739
  key: 0,
709
740
  class: "flex-1",
710
741
  variant: "secondary",
711
742
  label: "Delete",
712
743
  onclick: () => y(l.value)
713
- }, null, 8, ["onclick"])) : k("", !0),
744
+ }, null, 8, ["onclick"])) : V("", !0),
714
745
  v(i, {
715
746
  type: "submit",
716
747
  class: "flex-1",
@@ -723,7 +754,7 @@ const ke = {
723
754
  }, 512);
724
755
  };
725
756
  }
726
- }), Ae = { class: "flex items-end" }, De = { class: "flex flex-wrap gap-8 items-center mt-4" }, $e = { class: "flex mt-6 space-x-6" }, Be = /* @__PURE__ */ U({
757
+ }), Ye = { class: "flex items-end" }, Ee = { class: "flex flex-wrap gap-8 items-center mt-4" }, Ke = { class: "flex mt-6 space-x-6" }, je = /* @__PURE__ */ R({
727
758
  __name: "Maybank2Gateway",
728
759
  props: {
729
760
  terminal: {
@@ -736,48 +767,48 @@ const ke = {
736
767
  }
737
768
  },
738
769
  setup(_) {
739
- const d = _, a = G(() => d.terminal), T = b(), l = b(-1), r = b(), e = b({
770
+ const d = _, a = A(() => d.terminal), T = b(), l = b(-1), r = b(), e = b({
740
771
  ip: "",
741
772
  receiptName: "",
742
773
  cardTypes: []
743
- }), p = () => {
774
+ }), m = () => {
744
775
  e.value.ip = "", e.value.receiptName = "", e.value.cardTypes = [], l.value = -1;
745
776
  }, c = () => {
746
777
  var i;
747
778
  if (!a.value.ecrIntegrations)
748
- return p();
749
- const u = a.value.ecrIntegrations, t = u.findIndex((m) => m && m.gateway && m.gateway === "Maybank2");
779
+ return m();
780
+ const s = a.value.ecrIntegrations, t = s.findIndex((p) => p && p.gateway && p.gateway === "Maybank2");
750
781
  if (t === -1)
751
- return p();
782
+ return m();
752
783
  l.value = t;
753
- const o = u.at(t);
754
- o.gateway === "Maybank2" && o.config && (e.value = {
755
- ip: o.config.ip ?? "",
756
- receiptName: o.receiptName ?? "",
757
- cardTypes: ((i = o.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
784
+ const n = s.at(t);
785
+ n.gateway === "Maybank2" && n.config && (e.value = {
786
+ ip: n.config.ip ?? "",
787
+ receiptName: n.receiptName ?? "",
788
+ cardTypes: ((i = n.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
758
789
  });
759
790
  };
760
- h(a, c), O(c);
761
- async function y(u) {
791
+ P(a, c), q(c);
792
+ async function y(s) {
762
793
  var t;
763
- (t = a.value.ecrIntegrations) == null || t.splice(u, 1), d.onUpdate(a.value);
794
+ (t = a.value.ecrIntegrations) == null || t.splice(s, 1), d.onUpdate(a.value);
764
795
  }
765
- async function s() {
796
+ async function u() {
766
797
  e.value.cardTypes.push(r.value), r.value = "";
767
798
  }
768
- return (u, t) => {
769
- const o = g("FmTextField"), i = g("FmButton"), m = g("FmChip"), w = g("FmForm");
770
- return f(), F(w, {
799
+ return (s, t) => {
800
+ const n = g("FmTextField"), i = g("FmButton"), p = g("FmChip"), x = g("FmForm");
801
+ return f(), F(x, {
771
802
  ref: T.value,
772
803
  class: "flex flex-col gap-16 w-[500px]",
773
804
  onValidationSuccess: t[3] || (t[3] = () => {
774
- var n, x;
805
+ var o, w;
775
806
  l.value > -1 ? a.value.ecrIntegrations[l.value] = {
776
807
  gateway: "Maybank2",
777
808
  config: { ip: e.value.ip },
778
809
  receiptName: e.value.receiptName,
779
810
  dialogConfig: {
780
- ...(x = (n = a.value.ecrIntegrations) == null ? void 0 : n[l.value]) == null ? void 0 : x.dialogConfig,
811
+ ...(w = (o = a.value.ecrIntegrations) == null ? void 0 : o[l.value]) == null ? void 0 : w.dialogConfig,
781
812
  cardTypes: e.value.cardTypes
782
813
  }
783
814
  } : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
@@ -790,47 +821,47 @@ const ke = {
790
821
  })), d.onUpdate(a.value);
791
822
  })
792
823
  }, {
793
- default: q(() => [
794
- v(o, {
824
+ default: O(() => [
825
+ v(n, {
795
826
  modelValue: e.value.ip,
796
- "onUpdate:modelValue": t[0] || (t[0] = (n) => e.value.ip = n),
827
+ "onUpdate:modelValue": t[0] || (t[0] = (o) => e.value.ip = o),
797
828
  label: "IP Address"
798
829
  }, null, 8, ["modelValue"]),
799
- v(o, {
830
+ v(n, {
800
831
  modelValue: e.value.receiptName,
801
- "onUpdate:modelValue": t[1] || (t[1] = (n) => e.value.receiptName = n),
832
+ "onUpdate:modelValue": t[1] || (t[1] = (o) => e.value.receiptName = o),
802
833
  label: "Receipt Payment Name",
803
834
  "label-info": "Default receipt display will be 'TERMINAL_MAYBANK'"
804
835
  }, null, 8, ["modelValue"]),
805
- I("div", Ae, [
806
- v(o, {
836
+ I("div", Ye, [
837
+ v(n, {
807
838
  modelValue: r.value,
808
- "onUpdate:modelValue": t[2] || (t[2] = (n) => r.value = n),
839
+ "onUpdate:modelValue": t[2] || (t[2] = (o) => r.value = o),
809
840
  label: "Fallback Card Types",
810
841
  "label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
811
842
  }, null, 8, ["modelValue"]),
812
843
  v(i, {
813
844
  class: "ml-4",
814
845
  icon: "add",
815
- onClick: s
846
+ onClick: u
816
847
  })
817
848
  ]),
818
- I("div", De, [
819
- (f(!0), R(P, null, $(e.value.cardTypes, (n) => (f(), F(m, {
820
- key: n,
821
- label: n,
849
+ I("div", Ee, [
850
+ (f(!0), M(G, null, Y(e.value.cardTypes, (o) => (f(), F(p, {
851
+ key: o,
852
+ label: o,
822
853
  removable: !0,
823
- onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(n), 1)
854
+ onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(o), 1)
824
855
  }, null, 8, ["label", "onChipClosed"]))), 128))
825
856
  ]),
826
- I("div", $e, [
857
+ I("div", Ke, [
827
858
  l.value > -1 ? (f(), F(i, {
828
859
  key: 0,
829
860
  class: "flex-1",
830
861
  variant: "secondary",
831
862
  label: "Delete",
832
863
  onclick: () => y(l.value)
833
- }, null, 8, ["onclick"])) : k("", !0),
864
+ }, null, 8, ["onclick"])) : V("", !0),
834
865
  v(i, {
835
866
  type: "submit",
836
867
  class: "flex-1",
@@ -843,7 +874,7 @@ const ke = {
843
874
  }, 512);
844
875
  };
845
876
  }
846
- }), Le = { class: "flex items-end" }, Ye = { class: "flex flex-wrap gap-8 items-center mt-4" }, Ee = { class: "flex mt-6 space-x-6" }, Ke = /* @__PURE__ */ U({
877
+ }), He = { class: "flex items-end" }, ze = { class: "flex flex-wrap gap-8 items-center mt-4" }, Qe = { class: "flex mt-6 space-x-6" }, Je = /* @__PURE__ */ R({
847
878
  __name: "Maybank3Gateway",
848
879
  props: {
849
880
  terminal: {
@@ -856,48 +887,48 @@ const ke = {
856
887
  }
857
888
  },
858
889
  setup(_) {
859
- const d = _, a = G(() => d.terminal), T = b(), l = b(-1), r = b(), e = b({
890
+ const d = _, a = A(() => d.terminal), T = b(), l = b(-1), r = b(), e = b({
860
891
  receiptName: "",
861
892
  config: {},
862
893
  cardTypes: []
863
- }), p = () => {
894
+ }), m = () => {
864
895
  e.value.receiptName = "", e.value.cardTypes = [], l.value = -1;
865
896
  }, c = () => {
866
897
  var i;
867
898
  if (!a.value.ecrIntegrations)
868
- return p();
869
- const u = a.value.ecrIntegrations, t = u.findIndex((m) => m && m.gateway && m.gateway === "Maybank3");
899
+ return m();
900
+ const s = a.value.ecrIntegrations, t = s.findIndex((p) => p && p.gateway && p.gateway === "Maybank3");
870
901
  if (t === -1)
871
- return p();
902
+ return m();
872
903
  l.value = t;
873
- const o = u.at(t);
874
- o.gateway === "Maybank3" && o.config && (e.value = {
875
- config: o.config,
876
- receiptName: o.receiptName ?? "",
877
- cardTypes: ((i = o.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
904
+ const n = s.at(t);
905
+ n.gateway === "Maybank3" && n.config && (e.value = {
906
+ config: n.config,
907
+ receiptName: n.receiptName ?? "",
908
+ cardTypes: ((i = n.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
878
909
  });
879
910
  };
880
- h(a, c), O(c);
881
- async function y(u) {
911
+ P(a, c), q(c);
912
+ async function y(s) {
882
913
  var t;
883
- (t = a.value.ecrIntegrations) == null || t.splice(u, 1), d.onUpdate(a.value);
914
+ (t = a.value.ecrIntegrations) == null || t.splice(s, 1), d.onUpdate(a.value);
884
915
  }
885
- async function s() {
916
+ async function u() {
886
917
  e.value.cardTypes.push(r.value), r.value = "";
887
918
  }
888
- return (u, t) => {
889
- const o = g("FmTextField"), i = g("FmButton"), m = g("FmChip"), w = g("FmForm");
890
- return f(), F(w, {
919
+ return (s, t) => {
920
+ const n = g("FmTextField"), i = g("FmButton"), p = g("FmChip"), x = g("FmForm");
921
+ return f(), F(x, {
891
922
  ref: T.value,
892
923
  class: "flex flex-col gap-16 w-[500px]",
893
924
  onValidationSuccess: t[2] || (t[2] = () => {
894
- var n, x;
925
+ var o, w;
895
926
  l.value > -1 ? a.value.ecrIntegrations[l.value] = {
896
927
  gateway: "Maybank3",
897
928
  config: e.value.config,
898
929
  receiptName: e.value.receiptName,
899
930
  dialogConfig: {
900
- ...(x = (n = a.value.ecrIntegrations) == null ? void 0 : n[l.value]) == null ? void 0 : x.dialogConfig,
931
+ ...(w = (o = a.value.ecrIntegrations) == null ? void 0 : o[l.value]) == null ? void 0 : w.dialogConfig,
901
932
  cardTypes: e.value.cardTypes
902
933
  }
903
934
  } : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
@@ -910,42 +941,42 @@ const ke = {
910
941
  })), d.onUpdate(a.value);
911
942
  })
912
943
  }, {
913
- default: q(() => [
914
- v(o, {
944
+ default: O(() => [
945
+ v(n, {
915
946
  modelValue: e.value.receiptName,
916
- "onUpdate:modelValue": t[0] || (t[0] = (n) => e.value.receiptName = n),
947
+ "onUpdate:modelValue": t[0] || (t[0] = (o) => e.value.receiptName = o),
917
948
  label: "Receipt Payment Name",
918
949
  "label-info": "Default receipt display will be 'TERMINAL_MAYBANK'"
919
950
  }, null, 8, ["modelValue"]),
920
- I("div", Le, [
921
- v(o, {
951
+ I("div", He, [
952
+ v(n, {
922
953
  modelValue: r.value,
923
- "onUpdate:modelValue": t[1] || (t[1] = (n) => r.value = n),
954
+ "onUpdate:modelValue": t[1] || (t[1] = (o) => r.value = o),
924
955
  label: "Fallback Card Types",
925
956
  "label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
926
957
  }, null, 8, ["modelValue"]),
927
958
  v(i, {
928
959
  class: "ml-4",
929
960
  icon: "add",
930
- onClick: s
961
+ onClick: u
931
962
  })
932
963
  ]),
933
- I("div", Ye, [
934
- (f(!0), R(P, null, $(e.value.cardTypes, (n) => (f(), F(m, {
935
- key: n,
936
- label: n,
964
+ I("div", ze, [
965
+ (f(!0), M(G, null, Y(e.value.cardTypes, (o) => (f(), F(p, {
966
+ key: o,
967
+ label: o,
937
968
  removable: !0,
938
- onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(n), 1)
969
+ onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(o), 1)
939
970
  }, null, 8, ["label", "onChipClosed"]))), 128))
940
971
  ]),
941
- I("div", Ee, [
972
+ I("div", Qe, [
942
973
  l.value > -1 ? (f(), F(i, {
943
974
  key: 0,
944
975
  class: "flex-1",
945
976
  variant: "secondary",
946
977
  label: "Delete",
947
978
  onclick: () => y(l.value)
948
- }, null, 8, ["onclick"])) : k("", !0),
979
+ }, null, 8, ["onclick"])) : V("", !0),
949
980
  v(i, {
950
981
  type: "submit",
951
982
  class: "flex-1",
@@ -958,7 +989,7 @@ const ke = {
958
989
  }, 512);
959
990
  };
960
991
  }
961
- }), je = { class: "flex items-end" }, He = { class: "flex flex-wrap gap-8 items-center mt-4" }, ze = { class: "flex mt-6 space-x-6" }, Qe = /* @__PURE__ */ U({
992
+ }), We = { class: "flex items-end" }, Xe = { class: "flex flex-wrap gap-8 items-center mt-4" }, Ze = { class: "flex mt-6 space-x-6" }, ea = /* @__PURE__ */ R({
962
993
  __name: "NetsGateway",
963
994
  props: {
964
995
  terminal: {
@@ -971,48 +1002,48 @@ const ke = {
971
1002
  }
972
1003
  },
973
1004
  setup(_) {
974
- const d = _, a = G(() => d.terminal), T = b(), l = b(-1), r = b(), e = b({
1005
+ const d = _, a = A(() => d.terminal), T = b(), l = b(-1), r = b(), e = b({
975
1006
  ip: "",
976
1007
  receiptName: "",
977
1008
  cardTypes: []
978
- }), p = () => {
1009
+ }), m = () => {
979
1010
  e.value.ip = "", e.value.receiptName = "", e.value.cardTypes = [], l.value = -1;
980
1011
  }, c = () => {
981
1012
  var i;
982
1013
  if (!a.value.ecrIntegrations)
983
- return p();
984
- const u = a.value.ecrIntegrations, t = u.findIndex((m) => m && m.gateway && m.gateway === "Nets");
1014
+ return m();
1015
+ const s = a.value.ecrIntegrations, t = s.findIndex((p) => p && p.gateway && p.gateway === "Nets");
985
1016
  if (t === -1)
986
- return p();
1017
+ return m();
987
1018
  l.value = t;
988
- const o = u.at(t);
989
- o.gateway === "Nets" && o.config && (e.value = {
990
- ip: o.config.ip ?? "",
991
- receiptName: o.receiptName ?? "",
992
- cardTypes: ((i = o.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
1019
+ const n = s.at(t);
1020
+ n.gateway === "Nets" && n.config && (e.value = {
1021
+ ip: n.config.ip ?? "",
1022
+ receiptName: n.receiptName ?? "",
1023
+ cardTypes: ((i = n.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
993
1024
  });
994
1025
  };
995
- h(a, c), O(c);
996
- async function y(u) {
1026
+ P(a, c), q(c);
1027
+ async function y(s) {
997
1028
  var t;
998
- (t = a.value.ecrIntegrations) == null || t.splice(u, 1), d.onUpdate(a.value);
1029
+ (t = a.value.ecrIntegrations) == null || t.splice(s, 1), d.onUpdate(a.value);
999
1030
  }
1000
- async function s() {
1031
+ async function u() {
1001
1032
  e.value.cardTypes.push(r.value), r.value = "";
1002
1033
  }
1003
- return (u, t) => {
1004
- const o = g("FmTextField"), i = g("FmButton"), m = g("FmChip"), w = g("FmForm");
1005
- return f(), F(w, {
1034
+ return (s, t) => {
1035
+ const n = g("FmTextField"), i = g("FmButton"), p = g("FmChip"), x = g("FmForm");
1036
+ return f(), F(x, {
1006
1037
  ref: T.value,
1007
1038
  class: "flex flex-col gap-16 w-[500px]",
1008
1039
  onValidationSuccess: t[3] || (t[3] = () => {
1009
- var n, x;
1040
+ var o, w;
1010
1041
  l.value > -1 ? a.value.ecrIntegrations[l.value] = {
1011
1042
  gateway: "Nets",
1012
1043
  config: { ip: e.value.ip },
1013
1044
  receiptName: e.value.receiptName,
1014
1045
  dialogConfig: {
1015
- ...(x = (n = a.value.ecrIntegrations) == null ? void 0 : n[l.value]) == null ? void 0 : x.dialogConfig,
1046
+ ...(w = (o = a.value.ecrIntegrations) == null ? void 0 : o[l.value]) == null ? void 0 : w.dialogConfig,
1016
1047
  cardTypes: e.value.cardTypes
1017
1048
  }
1018
1049
  } : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
@@ -1025,47 +1056,47 @@ const ke = {
1025
1056
  })), d.onUpdate(a.value);
1026
1057
  })
1027
1058
  }, {
1028
- default: q(() => [
1029
- v(o, {
1059
+ default: O(() => [
1060
+ v(n, {
1030
1061
  modelValue: e.value.ip,
1031
- "onUpdate:modelValue": t[0] || (t[0] = (n) => e.value.ip = n),
1062
+ "onUpdate:modelValue": t[0] || (t[0] = (o) => e.value.ip = o),
1032
1063
  label: "IP Address"
1033
1064
  }, null, 8, ["modelValue"]),
1034
- v(o, {
1065
+ v(n, {
1035
1066
  modelValue: e.value.receiptName,
1036
- "onUpdate:modelValue": t[1] || (t[1] = (n) => e.value.receiptName = n),
1067
+ "onUpdate:modelValue": t[1] || (t[1] = (o) => e.value.receiptName = o),
1037
1068
  label: "Receipt Payment Name",
1038
1069
  "label-info": "Default receipt display will be 'TERMINAL_NETS'"
1039
1070
  }, null, 8, ["modelValue"]),
1040
- I("div", je, [
1041
- v(o, {
1071
+ I("div", We, [
1072
+ v(n, {
1042
1073
  modelValue: r.value,
1043
- "onUpdate:modelValue": t[2] || (t[2] = (n) => r.value = n),
1074
+ "onUpdate:modelValue": t[2] || (t[2] = (o) => r.value = o),
1044
1075
  label: "Fallback Card Types",
1045
1076
  "label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
1046
1077
  }, null, 8, ["modelValue"]),
1047
1078
  v(i, {
1048
1079
  class: "ml-4",
1049
1080
  icon: "add",
1050
- onClick: s
1081
+ onClick: u
1051
1082
  })
1052
1083
  ]),
1053
- I("div", He, [
1054
- (f(!0), R(P, null, $(e.value.cardTypes, (n) => (f(), F(m, {
1055
- key: n,
1056
- label: n,
1084
+ I("div", Xe, [
1085
+ (f(!0), M(G, null, Y(e.value.cardTypes, (o) => (f(), F(p, {
1086
+ key: o,
1087
+ label: o,
1057
1088
  removable: !0,
1058
- onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(n), 1)
1089
+ onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(o), 1)
1059
1090
  }, null, 8, ["label", "onChipClosed"]))), 128))
1060
1091
  ]),
1061
- I("div", ze, [
1092
+ I("div", Ze, [
1062
1093
  l.value > -1 ? (f(), F(i, {
1063
1094
  key: 0,
1064
1095
  class: "flex-1",
1065
1096
  variant: "secondary",
1066
1097
  label: "Delete",
1067
1098
  onclick: () => y(l.value)
1068
- }, null, 8, ["onclick"])) : k("", !0),
1099
+ }, null, 8, ["onclick"])) : V("", !0),
1069
1100
  v(i, {
1070
1101
  type: "submit",
1071
1102
  class: "flex-1",
@@ -1078,7 +1109,7 @@ const ke = {
1078
1109
  }, 512);
1079
1110
  };
1080
1111
  }
1081
- }), Je = { class: "flex items-end" }, We = { class: "flex flex-wrap gap-8 items-center mt-4" }, Xe = { class: "flex mt-6 space-x-6" }, Ze = /* @__PURE__ */ U({
1112
+ }), aa = { class: "flex items-end" }, ta = { class: "flex flex-wrap gap-8 items-center mt-4" }, la = { class: "flex mt-6 space-x-6" }, na = /* @__PURE__ */ R({
1082
1113
  __name: "KBankGateway",
1083
1114
  props: {
1084
1115
  terminal: {
@@ -1091,46 +1122,46 @@ const ke = {
1091
1122
  }
1092
1123
  },
1093
1124
  setup(_) {
1094
- const d = _, a = G(() => d.terminal), T = b(), l = b(-1), r = b(), e = b({
1125
+ const d = _, a = A(() => d.terminal), T = b(), l = b(-1), r = b(), e = b({
1095
1126
  receiptName: "",
1096
1127
  cardTypes: []
1097
- }), p = () => {
1128
+ }), m = () => {
1098
1129
  e.value.receiptName = "", e.value.cardTypes = [], l.value = -1;
1099
1130
  }, c = () => {
1100
1131
  var i;
1101
1132
  if (!a.value.ecrIntegrations)
1102
- return p();
1103
- const u = a.value.ecrIntegrations, t = u.findIndex((m) => m && m.gateway && m.gateway === "Kbank");
1133
+ return m();
1134
+ const s = a.value.ecrIntegrations, t = s.findIndex((p) => p && p.gateway && p.gateway === "Kbank");
1104
1135
  if (t === -1)
1105
- return p();
1136
+ return m();
1106
1137
  l.value = t;
1107
- const o = u.at(t);
1108
- o.gateway === "Kbank" && o.config && (e.value = {
1109
- receiptName: o.receiptName ?? "",
1110
- cardTypes: ((i = o.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
1138
+ const n = s.at(t);
1139
+ n.gateway === "Kbank" && n.config && (e.value = {
1140
+ receiptName: n.receiptName ?? "",
1141
+ cardTypes: ((i = n.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
1111
1142
  });
1112
1143
  };
1113
- h(a, c), O(c);
1114
- async function y(u) {
1144
+ P(a, c), q(c);
1145
+ async function y(s) {
1115
1146
  var t;
1116
- (t = a.value.ecrIntegrations) == null || t.splice(u, 1), d.onUpdate(a.value);
1147
+ (t = a.value.ecrIntegrations) == null || t.splice(s, 1), d.onUpdate(a.value);
1117
1148
  }
1118
- async function s() {
1149
+ async function u() {
1119
1150
  e.value.cardTypes.push(r.value), r.value = "";
1120
1151
  }
1121
- return (u, t) => {
1122
- const o = g("FmTextField"), i = g("FmButton"), m = g("FmChip"), w = g("FmForm");
1123
- return f(), F(w, {
1152
+ return (s, t) => {
1153
+ const n = g("FmTextField"), i = g("FmButton"), p = g("FmChip"), x = g("FmForm");
1154
+ return f(), F(x, {
1124
1155
  ref: T.value,
1125
1156
  class: "flex flex-col gap-16 w-[500px]",
1126
1157
  onValidationSuccess: t[2] || (t[2] = () => {
1127
- var n, x;
1158
+ var o, w;
1128
1159
  l.value > -1 ? a.value.ecrIntegrations[l.value] = {
1129
1160
  gateway: "Kbank",
1130
1161
  config: {},
1131
1162
  receiptName: e.value.receiptName,
1132
1163
  dialogConfig: {
1133
- ...(x = (n = a.value.ecrIntegrations) == null ? void 0 : n[l.value]) == null ? void 0 : x.dialogConfig,
1164
+ ...(w = (o = a.value.ecrIntegrations) == null ? void 0 : o[l.value]) == null ? void 0 : w.dialogConfig,
1134
1165
  cardTypes: e.value.cardTypes
1135
1166
  }
1136
1167
  } : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
@@ -1143,42 +1174,42 @@ const ke = {
1143
1174
  })), d.onUpdate(a.value);
1144
1175
  })
1145
1176
  }, {
1146
- default: q(() => [
1147
- v(o, {
1177
+ default: O(() => [
1178
+ v(n, {
1148
1179
  modelValue: e.value.receiptName,
1149
- "onUpdate:modelValue": t[0] || (t[0] = (n) => e.value.receiptName = n),
1180
+ "onUpdate:modelValue": t[0] || (t[0] = (o) => e.value.receiptName = o),
1150
1181
  label: "Receipt Payment Name",
1151
1182
  "label-info": "Default receipt display will be 'TERMINAL_KBANK'"
1152
1183
  }, null, 8, ["modelValue"]),
1153
- I("div", Je, [
1154
- v(o, {
1184
+ I("div", aa, [
1185
+ v(n, {
1155
1186
  modelValue: r.value,
1156
- "onUpdate:modelValue": t[1] || (t[1] = (n) => r.value = n),
1187
+ "onUpdate:modelValue": t[1] || (t[1] = (o) => r.value = o),
1157
1188
  label: "Fallback Card Types",
1158
1189
  "label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
1159
1190
  }, null, 8, ["modelValue"]),
1160
1191
  v(i, {
1161
1192
  class: "ml-4",
1162
1193
  icon: "add",
1163
- onClick: s
1194
+ onClick: u
1164
1195
  })
1165
1196
  ]),
1166
- I("div", We, [
1167
- (f(!0), R(P, null, $(e.value.cardTypes, (n) => (f(), F(m, {
1168
- key: n,
1169
- label: n,
1197
+ I("div", ta, [
1198
+ (f(!0), M(G, null, Y(e.value.cardTypes, (o) => (f(), F(p, {
1199
+ key: o,
1200
+ label: o,
1170
1201
  removable: !0,
1171
- onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(n), 1)
1202
+ onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(o), 1)
1172
1203
  }, null, 8, ["label", "onChipClosed"]))), 128))
1173
1204
  ]),
1174
- I("div", Xe, [
1205
+ I("div", la, [
1175
1206
  l.value > -1 ? (f(), F(i, {
1176
1207
  key: 0,
1177
1208
  class: "flex-1",
1178
1209
  variant: "secondary",
1179
1210
  label: "Delete",
1180
1211
  onclick: () => y(l.value)
1181
- }, null, 8, ["onclick"])) : k("", !0),
1212
+ }, null, 8, ["onclick"])) : V("", !0),
1182
1213
  v(i, {
1183
1214
  type: "submit",
1184
1215
  class: "flex-1",
@@ -1191,7 +1222,7 @@ const ke = {
1191
1222
  }, 512);
1192
1223
  };
1193
1224
  }
1194
- }), ea = { class: "flex mt-6 space-x-6" }, aa = /* @__PURE__ */ U({
1225
+ }), oa = { class: "flex mt-6 space-x-6" }, ra = /* @__PURE__ */ R({
1195
1226
  __name: "Ghl2Gateway",
1196
1227
  props: {
1197
1228
  terminal: {
@@ -1204,35 +1235,35 @@ const ke = {
1204
1235
  }
1205
1236
  },
1206
1237
  setup(_) {
1207
- const d = _, a = G(() => d.terminal), T = b(), l = b(-1), r = b({
1238
+ const d = _, a = A(() => d.terminal), T = b(), l = b(-1), r = b({
1208
1239
  ip: "",
1209
1240
  receiptName: ""
1210
1241
  }), e = () => {
1211
1242
  r.value.ip = "", r.value.receiptName = "", l.value = -1;
1212
- }, p = () => {
1243
+ }, m = () => {
1213
1244
  if (!a.value.ecrIntegrations)
1214
1245
  return e();
1215
- const y = a.value.ecrIntegrations, s = y.findIndex((t) => t && t.gateway && t.gateway === "Ghl2");
1216
- if (s === -1)
1246
+ const y = a.value.ecrIntegrations, u = y.findIndex((t) => t && t.gateway && t.gateway === "Ghl2");
1247
+ if (u === -1)
1217
1248
  return e();
1218
- l.value = s;
1219
- const u = y.at(s);
1220
- u.gateway === "Ghl2" && u.config && (r.value = {
1221
- ip: u.config.ip ?? "",
1222
- receiptName: u.receiptName ?? ""
1249
+ l.value = u;
1250
+ const s = y.at(u);
1251
+ s.gateway === "Ghl2" && s.config && (r.value = {
1252
+ ip: s.config.ip ?? "",
1253
+ receiptName: s.receiptName ?? ""
1223
1254
  });
1224
1255
  };
1225
- h(a, p), O(p);
1256
+ P(a, m), q(m);
1226
1257
  async function c(y) {
1227
- var s;
1228
- (s = a.value.ecrIntegrations) == null || s.splice(y, 1), d.onUpdate(a.value);
1258
+ var u;
1259
+ (u = a.value.ecrIntegrations) == null || u.splice(y, 1), d.onUpdate(a.value);
1229
1260
  }
1230
- return (y, s) => {
1231
- const u = g("FmTextField"), t = g("FmButton"), o = g("FmForm");
1232
- return f(), F(o, {
1261
+ return (y, u) => {
1262
+ const s = g("FmTextField"), t = g("FmButton"), n = g("FmForm");
1263
+ return f(), F(n, {
1233
1264
  ref: T.value,
1234
1265
  class: "flex flex-col gap-16 w-[500px]",
1235
- onValidationSuccess: s[2] || (s[2] = () => {
1266
+ onValidationSuccess: u[2] || (u[2] = () => {
1236
1267
  a.value.ecrIntegrations || (a.value.ecrIntegrations = []), l.value > -1 ? a.value.ecrIntegrations[l.value] = {
1237
1268
  gateway: "Ghl2",
1238
1269
  config: { ip: r.value.ip },
@@ -1244,26 +1275,26 @@ const ke = {
1244
1275
  }), d.onUpdate(a.value);
1245
1276
  })
1246
1277
  }, {
1247
- default: q(() => [
1248
- v(u, {
1278
+ default: O(() => [
1279
+ v(s, {
1249
1280
  modelValue: r.value.ip,
1250
- "onUpdate:modelValue": s[0] || (s[0] = (i) => r.value.ip = i),
1281
+ "onUpdate:modelValue": u[0] || (u[0] = (i) => r.value.ip = i),
1251
1282
  label: "IP Address"
1252
1283
  }, null, 8, ["modelValue"]),
1253
- v(u, {
1284
+ v(s, {
1254
1285
  modelValue: r.value.receiptName,
1255
- "onUpdate:modelValue": s[1] || (s[1] = (i) => r.value.receiptName = i),
1286
+ "onUpdate:modelValue": u[1] || (u[1] = (i) => r.value.receiptName = i),
1256
1287
  label: "Receipt Payment Name",
1257
1288
  "label-info": "Default receipt display will be 'TERMINAL_GHL_2'"
1258
1289
  }, null, 8, ["modelValue"]),
1259
- I("div", ea, [
1290
+ I("div", oa, [
1260
1291
  l.value > -1 ? (f(), F(t, {
1261
1292
  key: 0,
1262
1293
  class: "flex-1",
1263
1294
  variant: "secondary",
1264
1295
  label: "Delete",
1265
1296
  onclick: () => c(l.value)
1266
- }, null, 8, ["onclick"])) : k("", !0),
1297
+ }, null, 8, ["onclick"])) : V("", !0),
1267
1298
  v(t, {
1268
1299
  type: "submit",
1269
1300
  class: "flex-1",
@@ -1276,7 +1307,7 @@ const ke = {
1276
1307
  }, 512);
1277
1308
  };
1278
1309
  }
1279
- }), ta = { class: "flex items-end" }, la = { class: "flex flex-wrap gap-8 items-center mt-4" }, na = { class: "flex mt-6 space-x-6" }, oa = /* @__PURE__ */ U({
1310
+ }), ia = { class: "flex items-end" }, sa = { class: "flex flex-wrap gap-8 items-center mt-4" }, ua = { class: "flex mt-6 space-x-6" }, ca = /* @__PURE__ */ R({
1280
1311
  __name: "Ghl3Gateway",
1281
1312
  props: {
1282
1313
  terminal: {
@@ -1289,50 +1320,50 @@ const ke = {
1289
1320
  }
1290
1321
  },
1291
1322
  setup(_) {
1292
- const d = _, a = G(() => d.terminal), T = b(), l = b(-1), r = b(), e = b({
1323
+ const d = _, a = A(() => d.terminal), T = b(), l = b(-1), r = b(), e = b({
1293
1324
  receiptName: "",
1294
1325
  config: {},
1295
1326
  cardTypes: []
1296
- }), p = () => {
1327
+ }), m = () => {
1297
1328
  e.value.receiptName = "", e.value.cardTypes = [], l.value = -1;
1298
1329
  }, c = () => {
1299
1330
  var i;
1300
1331
  if (!a.value.ecrIntegrations)
1301
- return p();
1302
- const u = a.value.ecrIntegrations, t = u.findIndex(
1303
- (m) => m && m.gateway && m.gateway === "Ghl3"
1332
+ return m();
1333
+ const s = a.value.ecrIntegrations, t = s.findIndex(
1334
+ (p) => p && p.gateway && p.gateway === "Ghl3"
1304
1335
  );
1305
1336
  if (t === -1)
1306
- return p();
1337
+ return m();
1307
1338
  l.value = t;
1308
- const o = u.at(t);
1309
- o.gateway === "Ghl3" && o.config && (e.value = {
1310
- config: o.config,
1311
- receiptName: o.receiptName ?? "",
1312
- cardTypes: ((i = o.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
1339
+ const n = s.at(t);
1340
+ n.gateway === "Ghl3" && n.config && (e.value = {
1341
+ config: n.config,
1342
+ receiptName: n.receiptName ?? "",
1343
+ cardTypes: ((i = n.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
1313
1344
  });
1314
1345
  };
1315
- h(a, c), O(c);
1316
- async function y(u) {
1346
+ P(a, c), q(c);
1347
+ async function y(s) {
1317
1348
  var t;
1318
- (t = a.value.ecrIntegrations) == null || t.splice(u, 1), d.onUpdate(a.value);
1349
+ (t = a.value.ecrIntegrations) == null || t.splice(s, 1), d.onUpdate(a.value);
1319
1350
  }
1320
- async function s() {
1351
+ async function u() {
1321
1352
  e.value.cardTypes.push(r.value), r.value = "";
1322
1353
  }
1323
- return (u, t) => {
1324
- const o = g("FmTextField"), i = g("FmButton"), m = g("FmChip"), w = g("FmForm");
1325
- return f(), F(w, {
1354
+ return (s, t) => {
1355
+ const n = g("FmTextField"), i = g("FmButton"), p = g("FmChip"), x = g("FmForm");
1356
+ return f(), F(x, {
1326
1357
  ref: T.value,
1327
1358
  class: "flex flex-col gap-16 w-[500px]",
1328
1359
  onValidationSuccess: t[2] || (t[2] = () => {
1329
- var n, x;
1360
+ var o, w;
1330
1361
  l.value > -1 ? a.value.ecrIntegrations[l.value] = {
1331
1362
  gateway: "Ghl3",
1332
1363
  config: e.value.config,
1333
1364
  receiptName: e.value.receiptName,
1334
1365
  dialogConfig: {
1335
- ...(x = (n = a.value.ecrIntegrations) == null ? void 0 : n[l.value]) == null ? void 0 : x.dialogConfig,
1366
+ ...(w = (o = a.value.ecrIntegrations) == null ? void 0 : o[l.value]) == null ? void 0 : w.dialogConfig,
1336
1367
  cardTypes: e.value.cardTypes
1337
1368
  }
1338
1369
  } : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
@@ -1345,42 +1376,42 @@ const ke = {
1345
1376
  })), d.onUpdate(a.value);
1346
1377
  })
1347
1378
  }, {
1348
- default: q(() => [
1349
- v(o, {
1379
+ default: O(() => [
1380
+ v(n, {
1350
1381
  modelValue: e.value.receiptName,
1351
- "onUpdate:modelValue": t[0] || (t[0] = (n) => e.value.receiptName = n),
1382
+ "onUpdate:modelValue": t[0] || (t[0] = (o) => e.value.receiptName = o),
1352
1383
  label: "Receipt Payment Name",
1353
1384
  "label-info": "Default receipt display will be 'TERMINAL_GHL'"
1354
1385
  }, null, 8, ["modelValue"]),
1355
- I("div", ta, [
1356
- v(o, {
1386
+ I("div", ia, [
1387
+ v(n, {
1357
1388
  modelValue: r.value,
1358
- "onUpdate:modelValue": t[1] || (t[1] = (n) => r.value = n),
1389
+ "onUpdate:modelValue": t[1] || (t[1] = (o) => r.value = o),
1359
1390
  label: "Fallback Card Types",
1360
1391
  "label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
1361
1392
  }, null, 8, ["modelValue"]),
1362
1393
  v(i, {
1363
1394
  class: "ml-4",
1364
1395
  icon: "add",
1365
- onClick: s
1396
+ onClick: u
1366
1397
  })
1367
1398
  ]),
1368
- I("div", la, [
1369
- (f(!0), R(P, null, $(e.value.cardTypes, (n) => (f(), F(m, {
1370
- key: n,
1371
- label: n,
1399
+ I("div", sa, [
1400
+ (f(!0), M(G, null, Y(e.value.cardTypes, (o) => (f(), F(p, {
1401
+ key: o,
1402
+ label: o,
1372
1403
  removable: !0,
1373
- onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(n), 1)
1404
+ onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(o), 1)
1374
1405
  }, null, 8, ["label", "onChipClosed"]))), 128))
1375
1406
  ]),
1376
- I("div", na, [
1407
+ I("div", ua, [
1377
1408
  l.value > -1 ? (f(), F(i, {
1378
1409
  key: 0,
1379
1410
  class: "flex-1",
1380
1411
  variant: "secondary",
1381
1412
  label: "Delete",
1382
1413
  onclick: () => y(l.value)
1383
- }, null, 8, ["onclick"])) : k("", !0),
1414
+ }, null, 8, ["onclick"])) : V("", !0),
1384
1415
  v(i, {
1385
1416
  type: "submit",
1386
1417
  class: "flex-1",
@@ -1393,7 +1424,7 @@ const ke = {
1393
1424
  }, 512);
1394
1425
  };
1395
1426
  }
1396
- }), ra = { class: "flex items-end" }, ia = { class: "flex flex-wrap gap-8 items-center mt-4" }, ua = { class: "flex mt-6 space-x-6" }, sa = /* @__PURE__ */ U({
1427
+ }), da = { class: "flex items-end" }, pa = { class: "flex flex-wrap gap-8 items-center mt-4" }, ma = { class: "flex mt-6 space-x-6" }, va = /* @__PURE__ */ R({
1397
1428
  __name: "HlbbGateway",
1398
1429
  props: {
1399
1430
  terminal: {
@@ -1406,50 +1437,50 @@ const ke = {
1406
1437
  }
1407
1438
  },
1408
1439
  setup(_) {
1409
- const d = _, a = G(() => d.terminal), T = b(), l = b(-1), r = b(), e = b({
1440
+ const d = _, a = A(() => d.terminal), T = b(), l = b(-1), r = b(), e = b({
1410
1441
  receiptName: "",
1411
1442
  config: {},
1412
1443
  cardTypes: []
1413
- }), p = () => {
1444
+ }), m = () => {
1414
1445
  e.value.receiptName = "", e.value.cardTypes = [], l.value = -1;
1415
1446
  }, c = () => {
1416
1447
  var i;
1417
1448
  if (!a.value.ecrIntegrations)
1418
- return p();
1419
- const u = a.value.ecrIntegrations, t = u.findIndex(
1420
- (m) => m && m.gateway && m.gateway === "Hlbb"
1449
+ return m();
1450
+ const s = a.value.ecrIntegrations, t = s.findIndex(
1451
+ (p) => p && p.gateway && p.gateway === "Hlbb"
1421
1452
  );
1422
1453
  if (t === -1)
1423
- return p();
1454
+ return m();
1424
1455
  l.value = t;
1425
- const o = u.at(t);
1426
- o.gateway === "Hlbb" && o.config && (e.value = {
1427
- config: o.config,
1428
- receiptName: o.receiptName ?? "",
1429
- cardTypes: ((i = o.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
1456
+ const n = s.at(t);
1457
+ n.gateway === "Hlbb" && n.config && (e.value = {
1458
+ config: n.config,
1459
+ receiptName: n.receiptName ?? "",
1460
+ cardTypes: ((i = n.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
1430
1461
  });
1431
1462
  };
1432
- h(a, c), O(c);
1433
- async function y(u) {
1463
+ P(a, c), q(c);
1464
+ async function y(s) {
1434
1465
  var t;
1435
- (t = a.value.ecrIntegrations) == null || t.splice(u, 1), d.onUpdate(a.value);
1466
+ (t = a.value.ecrIntegrations) == null || t.splice(s, 1), d.onUpdate(a.value);
1436
1467
  }
1437
- async function s() {
1468
+ async function u() {
1438
1469
  e.value.cardTypes.push(r.value), r.value = "";
1439
1470
  }
1440
- return (u, t) => {
1441
- const o = g("FmTextField"), i = g("FmButton"), m = g("FmChip"), w = g("FmForm");
1442
- return f(), F(w, {
1471
+ return (s, t) => {
1472
+ const n = g("FmTextField"), i = g("FmButton"), p = g("FmChip"), x = g("FmForm");
1473
+ return f(), F(x, {
1443
1474
  ref: T.value,
1444
1475
  class: "flex flex-col gap-16 w-[500px]",
1445
1476
  onValidationSuccess: t[2] || (t[2] = () => {
1446
- var n, x;
1477
+ var o, w;
1447
1478
  l.value > -1 ? a.value.ecrIntegrations[l.value] = {
1448
1479
  gateway: "Hlbb",
1449
1480
  config: e.value.config,
1450
1481
  receiptName: e.value.receiptName,
1451
1482
  dialogConfig: {
1452
- ...(x = (n = a.value.ecrIntegrations) == null ? void 0 : n[l.value]) == null ? void 0 : x.dialogConfig,
1483
+ ...(w = (o = a.value.ecrIntegrations) == null ? void 0 : o[l.value]) == null ? void 0 : w.dialogConfig,
1453
1484
  cardTypes: e.value.cardTypes
1454
1485
  }
1455
1486
  } : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
@@ -1462,42 +1493,42 @@ const ke = {
1462
1493
  })), d.onUpdate(a.value);
1463
1494
  })
1464
1495
  }, {
1465
- default: q(() => [
1466
- v(o, {
1496
+ default: O(() => [
1497
+ v(n, {
1467
1498
  modelValue: e.value.receiptName,
1468
- "onUpdate:modelValue": t[0] || (t[0] = (n) => e.value.receiptName = n),
1499
+ "onUpdate:modelValue": t[0] || (t[0] = (o) => e.value.receiptName = o),
1469
1500
  label: "Receipt Payment Name",
1470
1501
  "label-info": "Default receipt display will be 'TERMINAL_MAYBANK'"
1471
1502
  }, null, 8, ["modelValue"]),
1472
- I("div", ra, [
1473
- v(o, {
1503
+ I("div", da, [
1504
+ v(n, {
1474
1505
  modelValue: r.value,
1475
- "onUpdate:modelValue": t[1] || (t[1] = (n) => r.value = n),
1506
+ "onUpdate:modelValue": t[1] || (t[1] = (o) => r.value = o),
1476
1507
  label: "Fallback Card Types",
1477
1508
  "label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
1478
1509
  }, null, 8, ["modelValue"]),
1479
1510
  v(i, {
1480
1511
  class: "ml-4",
1481
1512
  icon: "add",
1482
- onClick: s
1513
+ onClick: u
1483
1514
  })
1484
1515
  ]),
1485
- I("div", ia, [
1486
- (f(!0), R(P, null, $(e.value.cardTypes, (n) => (f(), F(m, {
1487
- key: n,
1488
- label: n,
1516
+ I("div", pa, [
1517
+ (f(!0), M(G, null, Y(e.value.cardTypes, (o) => (f(), F(p, {
1518
+ key: o,
1519
+ label: o,
1489
1520
  removable: !0,
1490
- onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(n), 1)
1521
+ onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(o), 1)
1491
1522
  }, null, 8, ["label", "onChipClosed"]))), 128))
1492
1523
  ]),
1493
- I("div", ua, [
1524
+ I("div", ma, [
1494
1525
  l.value > -1 ? (f(), F(i, {
1495
1526
  key: 0,
1496
1527
  class: "flex-1",
1497
1528
  variant: "secondary",
1498
1529
  label: "Delete",
1499
1530
  onclick: () => y(l.value)
1500
- }, null, 8, ["onclick"])) : k("", !0),
1531
+ }, null, 8, ["onclick"])) : V("", !0),
1501
1532
  v(i, {
1502
1533
  type: "submit",
1503
1534
  class: "flex-1",
@@ -1510,7 +1541,7 @@ const ke = {
1510
1541
  }, 512);
1511
1542
  };
1512
1543
  }
1513
- }), ca = { class: "flex items-end" }, da = { class: "flex flex-wrap gap-8 items-center mt-4" }, pa = { class: "flex mt-6 space-x-6" }, ma = /* @__PURE__ */ U({
1544
+ }), ya = { class: "flex items-end" }, fa = { class: "flex flex-wrap gap-8 items-center mt-4" }, ga = { class: "flex mt-6 space-x-6" }, ba = /* @__PURE__ */ R({
1514
1545
  __name: "GlobalPaymentsGateway",
1515
1546
  props: {
1516
1547
  terminal: {
@@ -1523,50 +1554,50 @@ const ke = {
1523
1554
  }
1524
1555
  },
1525
1556
  setup(_) {
1526
- const d = _, a = G(() => d.terminal), T = b(), l = b(-1), r = b(), e = b({
1557
+ const d = _, a = A(() => d.terminal), T = b(), l = b(-1), r = b(), e = b({
1527
1558
  ip: "",
1528
1559
  receiptName: "",
1529
1560
  cardTypes: []
1530
- }), p = () => {
1561
+ }), m = () => {
1531
1562
  e.value.ip = "", e.value.receiptName = "", e.value.cardTypes = [], l.value = -1;
1532
1563
  }, c = () => {
1533
1564
  var i;
1534
1565
  if (!a.value.ecrIntegrations)
1535
- return p();
1536
- const u = a.value.ecrIntegrations, t = u.findIndex(
1537
- (m) => m && m.gateway && m.gateway === "GlobalPayments"
1566
+ return m();
1567
+ const s = a.value.ecrIntegrations, t = s.findIndex(
1568
+ (p) => p && p.gateway && p.gateway === "GlobalPayments"
1538
1569
  );
1539
1570
  if (t === -1)
1540
- return p();
1571
+ return m();
1541
1572
  l.value = t;
1542
- const o = u.at(t);
1543
- o.gateway === "GlobalPayments" && o.config && (e.value = {
1544
- ip: o.config.ip ?? "",
1545
- receiptName: o.receiptName ?? "",
1546
- cardTypes: ((i = o.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
1573
+ const n = s.at(t);
1574
+ n.gateway === "GlobalPayments" && n.config && (e.value = {
1575
+ ip: n.config.ip ?? "",
1576
+ receiptName: n.receiptName ?? "",
1577
+ cardTypes: ((i = n.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
1547
1578
  });
1548
1579
  };
1549
- h(a, c), O(c);
1550
- async function y(u) {
1580
+ P(a, c), q(c);
1581
+ async function y(s) {
1551
1582
  var t;
1552
- (t = a.value.ecrIntegrations) == null || t.splice(u, 1), d.onUpdate(a.value);
1583
+ (t = a.value.ecrIntegrations) == null || t.splice(s, 1), d.onUpdate(a.value);
1553
1584
  }
1554
- async function s() {
1585
+ async function u() {
1555
1586
  e.value.cardTypes.push(r.value), r.value = "";
1556
1587
  }
1557
- return (u, t) => {
1558
- const o = g("FmTextField"), i = g("FmButton"), m = g("FmChip"), w = g("FmForm");
1559
- return f(), F(w, {
1588
+ return (s, t) => {
1589
+ const n = g("FmTextField"), i = g("FmButton"), p = g("FmChip"), x = g("FmForm");
1590
+ return f(), F(x, {
1560
1591
  ref: T.value,
1561
1592
  class: "flex flex-col gap-16 w-[500px]",
1562
1593
  onValidationSuccess: t[3] || (t[3] = () => {
1563
- var n, x;
1594
+ var o, w;
1564
1595
  l.value > -1 ? a.value.ecrIntegrations[l.value] = {
1565
1596
  gateway: "GlobalPayments",
1566
1597
  config: { ip: e.value.ip },
1567
1598
  receiptName: e.value.receiptName,
1568
1599
  dialogConfig: {
1569
- ...(x = (n = a.value.ecrIntegrations) == null ? void 0 : n[l.value]) == null ? void 0 : x.dialogConfig,
1600
+ ...(w = (o = a.value.ecrIntegrations) == null ? void 0 : o[l.value]) == null ? void 0 : w.dialogConfig,
1570
1601
  cardTypes: e.value.cardTypes
1571
1602
  }
1572
1603
  } : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
@@ -1579,47 +1610,47 @@ const ke = {
1579
1610
  })), d.onUpdate(a.value);
1580
1611
  })
1581
1612
  }, {
1582
- default: q(() => [
1583
- v(o, {
1613
+ default: O(() => [
1614
+ v(n, {
1584
1615
  modelValue: e.value.ip,
1585
- "onUpdate:modelValue": t[0] || (t[0] = (n) => e.value.ip = n),
1616
+ "onUpdate:modelValue": t[0] || (t[0] = (o) => e.value.ip = o),
1586
1617
  label: "IP Address"
1587
1618
  }, null, 8, ["modelValue"]),
1588
- v(o, {
1619
+ v(n, {
1589
1620
  modelValue: e.value.receiptName,
1590
- "onUpdate:modelValue": t[1] || (t[1] = (n) => e.value.receiptName = n),
1621
+ "onUpdate:modelValue": t[1] || (t[1] = (o) => e.value.receiptName = o),
1591
1622
  label: "Receipt Payment Name",
1592
1623
  "label-info": "Default receipt display will be 'TERMINAL_GP'"
1593
1624
  }, null, 8, ["modelValue"]),
1594
- I("div", ca, [
1595
- v(o, {
1625
+ I("div", ya, [
1626
+ v(n, {
1596
1627
  modelValue: r.value,
1597
- "onUpdate:modelValue": t[2] || (t[2] = (n) => r.value = n),
1628
+ "onUpdate:modelValue": t[2] || (t[2] = (o) => r.value = o),
1598
1629
  label: "Fallback Card Types",
1599
1630
  "label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
1600
1631
  }, null, 8, ["modelValue"]),
1601
1632
  v(i, {
1602
1633
  class: "ml-4",
1603
1634
  icon: "add",
1604
- onClick: s
1635
+ onClick: u
1605
1636
  })
1606
1637
  ]),
1607
- I("div", da, [
1608
- (f(!0), R(P, null, $(e.value.cardTypes, (n) => (f(), F(m, {
1609
- key: n,
1610
- label: n,
1638
+ I("div", fa, [
1639
+ (f(!0), M(G, null, Y(e.value.cardTypes, (o) => (f(), F(p, {
1640
+ key: o,
1641
+ label: o,
1611
1642
  removable: !0,
1612
- onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(n), 1)
1643
+ onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(o), 1)
1613
1644
  }, null, 8, ["label", "onChipClosed"]))), 128))
1614
1645
  ]),
1615
- I("div", pa, [
1646
+ I("div", ga, [
1616
1647
  l.value > -1 ? (f(), F(i, {
1617
1648
  key: 0,
1618
1649
  class: "flex-1",
1619
1650
  variant: "secondary",
1620
1651
  label: "Delete",
1621
1652
  onclick: () => y(l.value)
1622
- }, null, 8, ["onclick"])) : k("", !0),
1653
+ }, null, 8, ["onclick"])) : V("", !0),
1623
1654
  v(i, {
1624
1655
  type: "submit",
1625
1656
  class: "flex-1",
@@ -1632,7 +1663,7 @@ const ke = {
1632
1663
  }, 512);
1633
1664
  };
1634
1665
  }
1635
- }), va = { class: "flex items-end" }, ya = { class: "flex flex-wrap gap-8 items-center mt-4" }, fa = { class: "flex mt-6 space-x-6" }, ga = /* @__PURE__ */ U({
1666
+ }), Ta = { class: "flex items-end" }, _a = { class: "flex flex-wrap gap-8 items-center mt-4" }, Ia = { class: "flex mt-6 space-x-6" }, Fa = /* @__PURE__ */ R({
1636
1667
  __name: "OmaGateway",
1637
1668
  props: {
1638
1669
  terminal: {
@@ -1645,48 +1676,48 @@ const ke = {
1645
1676
  }
1646
1677
  },
1647
1678
  setup(_) {
1648
- const d = _, a = G(() => d.terminal), T = b(), l = b(-1), r = b(), e = b({
1679
+ const d = _, a = A(() => d.terminal), T = b(), l = b(-1), r = b(), e = b({
1649
1680
  receiptName: "",
1650
1681
  cardTypes: []
1651
- }), p = () => {
1682
+ }), m = () => {
1652
1683
  e.value.receiptName = "", e.value.cardTypes = [], l.value = -1;
1653
1684
  }, c = () => {
1654
1685
  var i;
1655
1686
  if (!a.value.ecrIntegrations)
1656
- return p();
1657
- const u = a.value.ecrIntegrations, t = u.findIndex(
1658
- (m) => m && m.gateway && m.gateway === "Oma"
1687
+ return m();
1688
+ const s = a.value.ecrIntegrations, t = s.findIndex(
1689
+ (p) => p && p.gateway && p.gateway === "Oma"
1659
1690
  );
1660
1691
  if (t === -1)
1661
- return p();
1692
+ return m();
1662
1693
  l.value = t;
1663
- const o = u.at(t);
1664
- o.gateway === "Oma" && o.config && (e.value = {
1665
- receiptName: o.receiptName ?? "",
1666
- cardTypes: ((i = o.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
1694
+ const n = s.at(t);
1695
+ n.gateway === "Oma" && n.config && (e.value = {
1696
+ receiptName: n.receiptName ?? "",
1697
+ cardTypes: ((i = n.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
1667
1698
  });
1668
1699
  };
1669
- h(a, c), O(c);
1670
- async function y(u) {
1700
+ P(a, c), q(c);
1701
+ async function y(s) {
1671
1702
  var t;
1672
- (t = a.value.ecrIntegrations) == null || t.splice(u, 1), d.onUpdate(a.value);
1703
+ (t = a.value.ecrIntegrations) == null || t.splice(s, 1), d.onUpdate(a.value);
1673
1704
  }
1674
- async function s() {
1705
+ async function u() {
1675
1706
  e.value.cardTypes.push(r.value), r.value = "";
1676
1707
  }
1677
- return (u, t) => {
1678
- const o = g("FmTextField"), i = g("FmButton"), m = g("FmChip"), w = g("FmForm");
1679
- return f(), F(w, {
1708
+ return (s, t) => {
1709
+ const n = g("FmTextField"), i = g("FmButton"), p = g("FmChip"), x = g("FmForm");
1710
+ return f(), F(x, {
1680
1711
  ref: T.value,
1681
1712
  class: "flex flex-col gap-16 w-[500px]",
1682
1713
  onValidationSuccess: t[2] || (t[2] = () => {
1683
- var n, x;
1714
+ var o, w;
1684
1715
  l.value > -1 ? a.value.ecrIntegrations[l.value] = {
1685
1716
  gateway: "Oma",
1686
1717
  config: {},
1687
1718
  receiptName: e.value.receiptName,
1688
1719
  dialogConfig: {
1689
- ...(x = (n = a.value.ecrIntegrations) == null ? void 0 : n[l.value]) == null ? void 0 : x.dialogConfig,
1720
+ ...(w = (o = a.value.ecrIntegrations) == null ? void 0 : o[l.value]) == null ? void 0 : w.dialogConfig,
1690
1721
  cardTypes: e.value.cardTypes
1691
1722
  }
1692
1723
  } : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
@@ -1699,42 +1730,42 @@ const ke = {
1699
1730
  })), d.onUpdate(a.value);
1700
1731
  })
1701
1732
  }, {
1702
- default: q(() => [
1703
- v(o, {
1733
+ default: O(() => [
1734
+ v(n, {
1704
1735
  modelValue: e.value.receiptName,
1705
- "onUpdate:modelValue": t[0] || (t[0] = (n) => e.value.receiptName = n),
1736
+ "onUpdate:modelValue": t[0] || (t[0] = (o) => e.value.receiptName = o),
1706
1737
  label: "Receipt Payment Name",
1707
1738
  "label-info": "Default receipt display will be 'TERMINAL_OMA'"
1708
1739
  }, null, 8, ["modelValue"]),
1709
- I("div", va, [
1710
- v(o, {
1740
+ I("div", Ta, [
1741
+ v(n, {
1711
1742
  modelValue: r.value,
1712
- "onUpdate:modelValue": t[1] || (t[1] = (n) => r.value = n),
1743
+ "onUpdate:modelValue": t[1] || (t[1] = (o) => r.value = o),
1713
1744
  label: "Fallback Card Types",
1714
1745
  "label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
1715
1746
  }, null, 8, ["modelValue"]),
1716
1747
  v(i, {
1717
1748
  class: "ml-4",
1718
1749
  icon: "add",
1719
- onClick: s
1750
+ onClick: u
1720
1751
  })
1721
1752
  ]),
1722
- I("div", ya, [
1723
- (f(!0), R(P, null, $(e.value.cardTypes, (n) => (f(), F(m, {
1724
- key: n,
1725
- label: n,
1753
+ I("div", _a, [
1754
+ (f(!0), M(G, null, Y(e.value.cardTypes, (o) => (f(), F(p, {
1755
+ key: o,
1756
+ label: o,
1726
1757
  removable: !0,
1727
- onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(n), 1)
1758
+ onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(o), 1)
1728
1759
  }, null, 8, ["label", "onChipClosed"]))), 128))
1729
1760
  ]),
1730
- I("div", fa, [
1761
+ I("div", Ia, [
1731
1762
  l.value > -1 ? (f(), F(i, {
1732
1763
  key: 0,
1733
1764
  class: "flex-1",
1734
1765
  variant: "secondary",
1735
1766
  label: "Delete",
1736
1767
  onclick: () => y(l.value)
1737
- }, null, 8, ["onclick"])) : k("", !0),
1768
+ }, null, 8, ["onclick"])) : V("", !0),
1738
1769
  v(i, {
1739
1770
  type: "submit",
1740
1771
  class: "flex-1",
@@ -1747,7 +1778,7 @@ const ke = {
1747
1778
  }, 512);
1748
1779
  };
1749
1780
  }
1750
- }), ba = { class: "flex items-center" }, Ta = { class: "w-[260px] self-start" }, _a = { class: "flex-1" }, Ia = /* @__PURE__ */ U({
1781
+ }), wa = { class: "flex items-center" }, xa = { class: "w-[260px] self-start" }, Na = { class: "flex-1" }, ka = /* @__PURE__ */ R({
1751
1782
  __name: "EcrGateway",
1752
1783
  props: {
1753
1784
  terminal: {
@@ -1760,108 +1791,108 @@ const ke = {
1760
1791
  }
1761
1792
  },
1762
1793
  setup(_) {
1763
- var p;
1794
+ var m;
1764
1795
  const d = _, a = [
1765
1796
  {
1766
1797
  label: "FeedMe Terminal",
1767
1798
  value: "terminal",
1768
- render: Re
1799
+ render: qe
1769
1800
  },
1770
1801
  {
1771
1802
  label: "GHL Terminal",
1772
1803
  value: "ghl",
1773
- render: he,
1774
- region: [V.F_COUNTRY.enum.MY]
1804
+ render: Ae,
1805
+ region: [U.F_COUNTRY.enum.MY]
1775
1806
  },
1776
1807
  {
1777
1808
  label: "GHL2 Terminal",
1778
1809
  value: "ghl2",
1779
- render: aa,
1780
- region: [V.F_COUNTRY.enum.MY]
1810
+ render: ra,
1811
+ region: [U.F_COUNTRY.enum.MY]
1781
1812
  },
1782
1813
  {
1783
1814
  label: "ITB Maybank Terminal",
1784
1815
  value: "mb-itb",
1785
- render: Ge,
1786
- region: [V.F_COUNTRY.enum.MY]
1816
+ render: Le,
1817
+ region: [U.F_COUNTRY.enum.MY]
1787
1818
  },
1788
1819
  {
1789
1820
  label: "PMA Maybank Terminal",
1790
1821
  value: "mb-pma",
1791
- render: Be,
1792
- region: [V.F_COUNTRY.enum.MY]
1822
+ render: je,
1823
+ region: [U.F_COUNTRY.enum.MY]
1793
1824
  },
1794
1825
  {
1795
1826
  label: "Paysys Maybank Terminal",
1796
1827
  value: "mb-paysys",
1797
- render: Ke,
1798
- region: [V.F_COUNTRY.enum.MY]
1828
+ render: Je,
1829
+ region: [U.F_COUNTRY.enum.MY]
1799
1830
  },
1800
1831
  {
1801
1832
  label: "Nets Terminal",
1802
1833
  value: "nets",
1803
- render: Qe,
1804
- region: [V.F_COUNTRY.enum.SG]
1834
+ render: ea,
1835
+ region: [U.F_COUNTRY.enum.SG]
1805
1836
  },
1806
1837
  {
1807
1838
  label: "KBank Terminal",
1808
1839
  value: "kbank",
1809
- render: Ze,
1810
- region: [V.F_COUNTRY.enum.TH]
1840
+ render: na,
1841
+ region: [U.F_COUNTRY.enum.TH]
1811
1842
  },
1812
1843
  {
1813
1844
  label: "GHL Terminal",
1814
1845
  value: "ghl3",
1815
- render: oa,
1816
- region: [V.F_COUNTRY.enum.TH]
1846
+ render: ca,
1847
+ region: [U.F_COUNTRY.enum.TH]
1817
1848
  },
1818
1849
  {
1819
1850
  label: "Paysys HLBB Terminal",
1820
1851
  value: "hlbb",
1821
- render: sa,
1822
- region: [V.F_COUNTRY.enum.MY]
1852
+ render: va,
1853
+ region: [U.F_COUNTRY.enum.MY]
1823
1854
  },
1824
1855
  {
1825
1856
  label: "GPAP Terminal",
1826
1857
  value: "globalpayments",
1827
- render: ma,
1828
- region: [V.F_COUNTRY.enum.SG]
1858
+ render: ba,
1859
+ region: [U.F_COUNTRY.enum.SG]
1829
1860
  },
1830
1861
  {
1831
1862
  label: "OMA Terminal",
1832
1863
  value: "oma",
1833
- render: ga,
1834
- region: [V.F_COUNTRY.enum.PK]
1864
+ render: Fa,
1865
+ region: [U.F_COUNTRY.enum.PK]
1835
1866
  }
1836
- ], T = S(() => a.find((c) => c.value === e.value)), l = ee().currentCountry, r = S(() => a.filter(
1837
- (c) => !c.region || c.region.includes(l.value ?? V.F_COUNTRY.enum.MY)
1838
- )), { gatewayTab: e } = Z({
1839
- gatewayTab: (p = r.value[0]) == null ? void 0 : p.value
1867
+ ], T = C(() => a.find((c) => c.value === e.value)), l = oe().currentCountry, r = C(() => a.filter(
1868
+ (c) => !c.region || c.region.includes(l.value ?? U.F_COUNTRY.enum.MY)
1869
+ )), { gatewayTab: e } = ne({
1870
+ gatewayTab: (m = r.value[0]) == null ? void 0 : m.value
1840
1871
  });
1841
1872
  return (c, y) => {
1842
- var u;
1843
- const s = g("FmTabs");
1844
- return f(), R("div", ba, [
1845
- I("div", Ta, [
1846
- v(s, {
1847
- "model-value": M(e),
1848
- "onUpdate:modelValue": y[0] || (y[0] = (t) => z(e) ? e.value = t : null),
1873
+ var s;
1874
+ const u = g("FmTabs");
1875
+ return f(), M("div", wa, [
1876
+ I("div", xa, [
1877
+ v(u, {
1878
+ "model-value": h(e),
1879
+ "onUpdate:modelValue": y[0] || (y[0] = (t) => Z(e) ? e.value = t : null),
1849
1880
  class: "mb-6",
1850
1881
  vertical: !0,
1851
1882
  items: r.value,
1852
1883
  "show-more-at": Number.POSITIVE_INFINITY
1853
1884
  }, null, 8, ["model-value", "items", "show-more-at"])
1854
1885
  ]),
1855
- I("div", _a, [
1856
- M(e) ? (f(), F(Q((u = T.value) == null ? void 0 : u.render), J(W({ key: 0 }, {
1886
+ I("div", Na, [
1887
+ h(e) ? (f(), F(ee((s = T.value) == null ? void 0 : s.render), ae(te({ key: 0 }, {
1857
1888
  terminal: d.terminal,
1858
1889
  onUpdate: d.onUpdate
1859
- })), null, 16)) : k("", !0)
1890
+ })), null, 16)) : V("", !0)
1860
1891
  ])
1861
1892
  ]);
1862
1893
  };
1863
1894
  }
1864
- }), Fa = { class: "flex mt-6 space-x-6" }, wa = /* @__PURE__ */ U({
1895
+ }), Ca = { class: "flex mt-6 space-x-6" }, Va = /* @__PURE__ */ R({
1865
1896
  __name: "PromptPayGateway",
1866
1897
  props: {
1867
1898
  terminal: {
@@ -1874,59 +1905,59 @@ const ke = {
1874
1905
  }
1875
1906
  },
1876
1907
  setup(_) {
1877
- const d = _, a = G(() => d.terminal), T = b(), l = b(-1), r = b({
1908
+ const d = _, a = A(() => d.terminal), T = b(), l = b(-1), r = b({
1878
1909
  account: "",
1879
1910
  receiptName: ""
1880
1911
  }), e = () => {
1881
1912
  r.value.account = "", r.value.receiptName = "", l.value = -1;
1882
- }, p = () => {
1913
+ }, m = () => {
1883
1914
  if (!a.value.qrIntegrations)
1884
1915
  return e();
1885
- const y = a.value.qrIntegrations, s = y.findIndex((t) => t && t.gateway && t.gateway === "PROMPTPAY");
1886
- if (s === -1)
1916
+ const y = a.value.qrIntegrations, u = y.findIndex((t) => t && t.gateway && t.gateway === "PROMPTPAY");
1917
+ if (u === -1)
1887
1918
  return e();
1888
- l.value = s;
1889
- const u = y.at(s);
1890
- u.gateway === "PROMPTPAY" && u.config && (r.value = {
1891
- account: u.config.account ?? "",
1892
- receiptName: u.receiptName ?? ""
1919
+ l.value = u;
1920
+ const s = y.at(u);
1921
+ s.gateway === "PROMPTPAY" && s.config && (r.value = {
1922
+ account: s.config.account ?? "",
1923
+ receiptName: s.receiptName ?? ""
1893
1924
  });
1894
1925
  };
1895
- h(a, p), O(p);
1926
+ P(a, m), q(m);
1896
1927
  async function c(y) {
1897
- var s;
1898
- (s = a.value.qrIntegrations) == null || s.splice(y, 1), d.onUpdate(a.value);
1928
+ var u;
1929
+ (u = a.value.qrIntegrations) == null || u.splice(y, 1), d.onUpdate(a.value);
1899
1930
  }
1900
- return (y, s) => {
1901
- const u = g("FmTextField"), t = g("FmButton"), o = g("FmForm");
1902
- return f(), F(o, {
1931
+ return (y, u) => {
1932
+ const s = g("FmTextField"), t = g("FmButton"), n = g("FmForm");
1933
+ return f(), F(n, {
1903
1934
  ref: T.value,
1904
1935
  class: "flex flex-col gap-16 w-[500px]",
1905
- onValidationSuccess: s[2] || (s[2] = () => {
1936
+ onValidationSuccess: u[2] || (u[2] = () => {
1906
1937
  l.value > -1 ? a.value.qrIntegrations[l.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);
1907
1938
  })
1908
1939
  }, {
1909
- default: q(() => [
1910
- v(u, {
1940
+ default: O(() => [
1941
+ v(s, {
1911
1942
  modelValue: r.value.account,
1912
- "onUpdate:modelValue": s[0] || (s[0] = (i) => r.value.account = i),
1943
+ "onUpdate:modelValue": u[0] || (u[0] = (i) => r.value.account = i),
1913
1944
  label: "Thai Phone Number / Thai Naitonal ID",
1914
1945
  "label-info": "Thai Phone Number can be prefixed with 66 or 0 will be fine both will works well."
1915
1946
  }, null, 8, ["modelValue"]),
1916
- v(u, {
1947
+ v(s, {
1917
1948
  modelValue: r.value.receiptName,
1918
- "onUpdate:modelValue": s[1] || (s[1] = (i) => r.value.receiptName = i),
1949
+ "onUpdate:modelValue": u[1] || (u[1] = (i) => r.value.receiptName = i),
1919
1950
  label: "Receipt Payment Name",
1920
1951
  "label-info": "Default receipt display will be 'TERMINAL_MAYBANK'"
1921
1952
  }, null, 8, ["modelValue"]),
1922
- I("div", Fa, [
1953
+ I("div", Ca, [
1923
1954
  l.value > -1 ? (f(), F(t, {
1924
1955
  key: 0,
1925
1956
  class: "flex-1",
1926
1957
  variant: "secondary",
1927
1958
  label: "Delete",
1928
1959
  onclick: () => c(l.value)
1929
- }, null, 8, ["onclick"])) : k("", !0),
1960
+ }, null, 8, ["onclick"])) : V("", !0),
1930
1961
  v(t, {
1931
1962
  type: "submit",
1932
1963
  class: "flex-1",
@@ -1939,7 +1970,7 @@ const ke = {
1939
1970
  }, 512);
1940
1971
  };
1941
1972
  }
1942
- }), xa = { class: "flex items-center" }, Na = { class: "w-[260px] self-start" }, ka = { class: "flex-1" }, Ca = /* @__PURE__ */ U({
1973
+ }), Sa = { class: "flex items-center" }, Ua = { class: "w-[260px] self-start" }, Ra = { class: "flex-1" }, Ma = /* @__PURE__ */ R({
1943
1974
  __name: "QrGateway",
1944
1975
  props: {
1945
1976
  terminal: {
@@ -1952,40 +1983,40 @@ const ke = {
1952
1983
  }
1953
1984
  },
1954
1985
  setup(_) {
1955
- var p;
1986
+ var m;
1956
1987
  const d = _, a = [
1957
1988
  {
1958
1989
  label: "PromptPay",
1959
1990
  value: "promptpay",
1960
- render: wa,
1961
- region: [V.F_COUNTRY.enum.TH]
1991
+ render: Va,
1992
+ region: [U.F_COUNTRY.enum.TH]
1962
1993
  }
1963
- ], T = S(() => a.find((c) => c.value === e.value)), l = ee().currentCountry, r = S(() => a.filter((c) => !c.region || c.region.includes(l.value ?? V.F_COUNTRY.enum.MY))), { gatewayTab: e } = Z({
1964
- gatewayTab: (p = r.value[0]) == null ? void 0 : p.value
1994
+ ], T = C(() => a.find((c) => c.value === e.value)), l = oe().currentCountry, r = C(() => a.filter((c) => !c.region || c.region.includes(l.value ?? U.F_COUNTRY.enum.MY))), { gatewayTab: e } = ne({
1995
+ gatewayTab: (m = r.value[0]) == null ? void 0 : m.value
1965
1996
  });
1966
1997
  return (c, y) => {
1967
- var u;
1968
- const s = g("FmTabs");
1969
- return f(), R("div", xa, [
1970
- I("div", Na, [
1971
- v(s, {
1972
- "model-value": M(e),
1973
- "onUpdate:modelValue": y[0] || (y[0] = (t) => z(e) ? e.value = t : null),
1998
+ var s;
1999
+ const u = g("FmTabs");
2000
+ return f(), M("div", Sa, [
2001
+ I("div", Ua, [
2002
+ v(u, {
2003
+ "model-value": h(e),
2004
+ "onUpdate:modelValue": y[0] || (y[0] = (t) => Z(e) ? e.value = t : null),
1974
2005
  class: "mb-6",
1975
2006
  vertical: !0,
1976
2007
  items: r.value
1977
2008
  }, null, 8, ["model-value", "items"])
1978
2009
  ]),
1979
- I("div", ka, [
1980
- M(e) ? (f(), F(Q((u = T.value) == null ? void 0 : u.render), J(W({ key: 0 }, {
2010
+ I("div", Ra, [
2011
+ h(e) ? (f(), F(ee((s = T.value) == null ? void 0 : s.render), ae(te({ key: 0 }, {
1981
2012
  terminal: d.terminal,
1982
2013
  onUpdate: d.onUpdate
1983
- })), null, 16)) : k("", !0)
2014
+ })), null, 16)) : V("", !0)
1984
2015
  ])
1985
2016
  ]);
1986
2017
  };
1987
2018
  }
1988
- }), $a = /* @__PURE__ */ U({
2019
+ }), Ka = /* @__PURE__ */ R({
1989
2020
  __name: "TerminalSetting",
1990
2021
  props: {
1991
2022
  terminalId: {
@@ -1994,23 +2025,23 @@ const ke = {
1994
2025
  }
1995
2026
  },
1996
2027
  setup(_) {
1997
- const d = _, { tab: a } = Z({
2028
+ const d = _, { tab: a } = ne({
1998
2029
  tab: "information"
1999
- }), { isLoading: T, startAsyncCall: l } = X(!0), r = de(), e = le(), p = b();
2000
- async function c(o) {
2030
+ }), { isLoading: T, startAsyncCall: l } = le(!0), r = ve(), e = se(), m = b();
2031
+ async function c(n) {
2001
2032
  l(async () => {
2002
2033
  try {
2003
- await B.updateById(
2034
+ await E.updateById(
2004
2035
  d.terminalId,
2005
2036
  {
2006
- name: o.name,
2007
- status: o.status,
2008
- ecrs: o.ecrs ?? [],
2009
- gateways: o.gateways ?? [],
2010
- ecrIntegrations: o.ecrIntegrations ?? [],
2011
- qrIntegrations: o.qrIntegrations ?? []
2037
+ name: n.name,
2038
+ status: n.status,
2039
+ ecrs: n.ecrs ?? [],
2040
+ gateways: n.gateways ?? [],
2041
+ ecrIntegrations: n.ecrIntegrations ?? [],
2042
+ qrIntegrations: n.qrIntegrations ?? []
2012
2043
  }
2013
- ), p.value = await B.readById(d.terminalId), e.open({
2044
+ ), m.value = await E.readById(d.terminalId), e.open({
2014
2045
  type: "success",
2015
2046
  message: "Terminal updated successfully"
2016
2047
  });
@@ -2018,7 +2049,7 @@ const ke = {
2018
2049
  e.open({
2019
2050
  type: "error",
2020
2051
  title: "Error occurs when update terminal",
2021
- message: H(i)
2052
+ message: X(i)
2022
2053
  });
2023
2054
  }
2024
2055
  });
@@ -2028,69 +2059,69 @@ const ke = {
2028
2059
  label: "Information",
2029
2060
  value: "information",
2030
2061
  icon: "overview",
2031
- render: ge
2062
+ render: Ie
2032
2063
  },
2033
2064
  {
2034
2065
  label: "Setting Request",
2035
2066
  value: "settings",
2036
2067
  icon: "settings",
2037
- render: Ie,
2068
+ render: Ne,
2038
2069
  onlyFor: ["TERMINAL"]
2039
2070
  },
2040
2071
  {
2041
2072
  label: "SoftPos Gateway",
2042
2073
  value: "softpos",
2043
2074
  icon: "payment",
2044
- render: Ve
2075
+ render: he
2045
2076
  },
2046
2077
  {
2047
2078
  label: "ECR Gateway",
2048
2079
  value: "ecr",
2049
2080
  icon: "point_of_sale",
2050
- render: Ia,
2081
+ render: ka,
2051
2082
  onlyFor: ["POS", "KIOSK"]
2052
2083
  },
2053
2084
  {
2054
2085
  label: "QR Gateway",
2055
2086
  value: "qr",
2056
2087
  icon: "qr_code",
2057
- render: Ca,
2088
+ render: Ma,
2058
2089
  onlyFor: ["POS", "KIOSK"]
2059
2090
  }
2060
2091
  ];
2061
- ee().currentCountry;
2062
- const s = S(() => {
2063
- var o;
2064
- return (o = y.find((i) => i.value === a.value)) == null ? void 0 : o.render;
2092
+ oe().currentCountry;
2093
+ const u = C(() => {
2094
+ var n;
2095
+ return (n = y.find((i) => i.value === a.value)) == null ? void 0 : n.render;
2065
2096
  });
2066
- async function u() {
2097
+ async function s() {
2067
2098
  l(async () => {
2068
- p.value = await B.readById(d.terminalId);
2099
+ m.value = await E.readById(d.terminalId);
2069
2100
  });
2070
2101
  }
2071
- const t = S(() => y.filter((o) => {
2102
+ const t = C(() => y.filter((n) => {
2072
2103
  var i;
2073
- return !o.onlyFor || o.onlyFor.includes(((i = p.value) == null ? void 0 : i.deviceType) ?? "");
2104
+ return !n.onlyFor || n.onlyFor.includes(((i = m.value) == null ? void 0 : i.deviceType) ?? "");
2074
2105
  }));
2075
- return O(u), (o, i) => {
2076
- var w, n;
2077
- const m = g("FmTabs");
2078
- return f(), F(pe, {
2079
- title: `${(w = p.value) == null ? void 0 : w.deviceType} (${(n = p.value) == null ? void 0 : n._id})`,
2080
- loading: M(T),
2081
- onBack: M(r).back
2106
+ return q(s), (n, i) => {
2107
+ var x, o;
2108
+ const p = g("FmTabs");
2109
+ return f(), F(ye, {
2110
+ title: `${(x = m.value) == null ? void 0 : x.deviceType} (${(o = m.value) == null ? void 0 : o._id})`,
2111
+ loading: h(T),
2112
+ onBack: h(r).back
2082
2113
  }, {
2083
- default: q(() => [
2084
- v(m, {
2085
- "model-value": M(a),
2086
- "onUpdate:modelValue": i[0] || (i[0] = (x) => z(a) ? a.value = x : null),
2114
+ default: O(() => [
2115
+ v(p, {
2116
+ "model-value": h(a),
2117
+ "onUpdate:modelValue": i[0] || (i[0] = (w) => Z(a) ? a.value = w : null),
2087
2118
  class: "mb-6",
2088
2119
  items: t.value
2089
2120
  }, null, 8, ["model-value", "items"]),
2090
- M(a) ? (f(), F(Q(s.value), J(W({ key: 0 }, {
2091
- terminal: p.value,
2121
+ h(a) ? (f(), F(ee(u.value), ae(te({ key: 0 }, {
2122
+ terminal: m.value,
2092
2123
  onUpdate: c
2093
- })), null, 16)) : k("", !0)
2124
+ })), null, 16)) : V("", !0)
2094
2125
  ]),
2095
2126
  _: 1
2096
2127
  }, 8, ["title", "loading", "onBack"]);
@@ -2098,5 +2129,5 @@ const ke = {
2098
2129
  }
2099
2130
  });
2100
2131
  export {
2101
- $a as default
2132
+ Ka as default
2102
2133
  };