@feedmepos/mf-order-setting 0.0.102 → 0.0.103

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (139) hide show
  1. package/dist/{DisplaySystemView-jnt6letY.js → DisplaySystemView-BBiZqcWq.js} +1497 -1468
  2. package/dist/{FoodCourtInvitationsView-DoynqFWB.js → FoodCourtInvitationsView-DwOkVs9m.js} +4 -4
  3. package/dist/{FoodCourtOrderSettingsView-DYZLhTHy.js → FoodCourtOrderSettingsView-C9Ag5Bsg.js} +1 -1
  4. package/dist/FoodCourtOrdersView-y4EwK3sn.js +1173 -0
  5. package/dist/{FoodCourtStallsView-CRMTt5BB.js → FoodCourtStallsView-Bi8H-yR7.js} +2 -2
  6. package/dist/{FoodCourtStatusView-C-b-eI-8.js → FoodCourtStatusView-jugAzTKg.js} +1 -1
  7. package/dist/KioskDevicesView-CYiew4X5.js +4 -0
  8. package/dist/KioskDevicesView.vue_vue_type_script_setup_true_lang-BCvbeo7R.js +1497 -0
  9. package/dist/KioskSettingView-AKBiij9a.js +1124 -0
  10. package/dist/KioskView-zKB6mC8I.js +765 -0
  11. package/dist/{OrderSettingsView-BBCnekaj.js → OrderSettingsView-CoV_yX3m.js} +22064 -21635
  12. package/dist/{RestaurantSelector.vue_vue_type_script_setup_true_lang-DjoTyV6m.js → RestaurantSelector.vue_vue_type_script_setup_true_lang-KSMU_jGl.js} +1 -1
  13. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  14. package/dist/{app-Dvk30CIa.js → app-CmuI6uSl.js} +3589 -2902
  15. package/dist/app.js +1 -1
  16. package/dist/{dayjs.min-DUFHhM7O.js → dayjs.min-B3MssMma.js} +1 -1
  17. package/dist/{featureFlag-BvcirzHS.js → featureFlag-CWvkPOBY.js} +123 -130
  18. package/dist/frontend/mf-order/src/api/food-court/index.d.ts +51 -0
  19. package/dist/frontend/mf-order/src/api/kiosk/index.d.ts +4 -0
  20. package/dist/frontend/mf-order/src/api/payment/index.d.ts +8 -0
  21. package/dist/frontend/mf-order/src/api/queue/index.d.ts +13 -0
  22. package/dist/frontend/mf-order/src/api/restaurant-setting/index.d.ts +9 -1
  23. package/dist/frontend/mf-order/src/app.d.ts +687 -0
  24. package/dist/frontend/mf-order/src/main.d.ts +687 -0
  25. package/dist/frontend/mf-order/src/modules/display-system/interface.d.ts +5 -0
  26. package/dist/frontend/mf-order/src/modules/kiosk/interface.d.ts +4 -0
  27. package/dist/frontend/mf-order/src/modules/kiosk/license.d.ts +92 -0
  28. package/dist/frontend/mf-order/src/modules/kiosk/outletLoad.d.ts +15 -0
  29. package/dist/frontend/mf-order/src/modules/kiosk/settingsSections.d.ts +24 -0
  30. package/dist/frontend/mf-order/src/modules/kiosk/useKioskSettings.d.ts +29 -0
  31. package/dist/frontend/mf-order/src/modules/payment/paymentDevice.d.ts +58 -0
  32. package/dist/frontend/mf-order/src/stores/kiosk/index.d.ts +67 -1
  33. package/dist/frontend/mf-order/src/stores/order-setting/index.d.ts +19 -10
  34. package/dist/frontend/mf-order/src/stores/payment/index.d.ts +59 -1
  35. package/dist/frontend/mf-order/src/views/food-court/food-court-export.d.ts +38 -0
  36. package/dist/frontend/mf-order/src/views/kiosk/devices/KioskDeviceCard.vue.d.ts +3 -0
  37. package/dist/frontend/mf-order/src/views/kiosk/devices/KioskDevicesView.vue.d.ts +7 -0
  38. package/dist/frontend/mf-order/src/views/kiosk/devices/KioskLicenseSummary.vue.d.ts +7 -0
  39. package/dist/frontend/mf-order/src/views/kiosk/devices/KioskLicensesView.vue.d.ts +6 -0
  40. package/dist/frontend/mf-order/src/views/kiosk/devices/KioskOtpDialog.vue.d.ts +3 -0
  41. package/dist/frontend/mf-order/src/views/kiosk/devices/KioskPaymentDeviceCard.vue.d.ts +17 -0
  42. package/dist/frontend/mf-order/src/views/kiosk/settings/KioskSettingView.vue.d.ts +5 -2
  43. package/dist/frontend/mf-order/src/views/order-settings/pickup/PickUpSettingDialogContent.vue.d.ts +0 -9
  44. package/dist/frontend/mf-order/src/views/order-settings/pos-status/PosOrderingStatus.vue.d.ts +17 -0
  45. package/dist/frontend/mf-order/src/views/order-settings/pos-status/pos-status.d.ts +44 -0
  46. package/dist/frontend/mf-order/src/views/order-settings/queue/called-message.d.ts +1 -0
  47. package/dist/frontend/mf-order/src/views/order-settings/queue/phone-join-mode.d.ts +25 -0
  48. package/dist/frontend/mf-order/tsconfig.app.tsbuildinfo +1 -1
  49. package/dist/{index-C4n5H7t3.js → index-BQa8AudZ.js} +3 -3
  50. package/dist/index-CMOvrim4.js +147 -0
  51. package/dist/{index-CW4VlFWz.js → index-D5qh2_4b.js} +1 -1
  52. package/dist/{index-C5n6lil6.js → index-Dup6kWLX.js} +6 -6
  53. package/dist/{index-CGxCWKHB.js → index-wuFIsXHT.js} +188 -179
  54. package/dist/{order.dto-Cb_gh3iB.js → order.dto-BD9raQG5.js} +2782 -2735
  55. package/dist/package/entity/display/blocks.d.ts +12 -2
  56. package/dist/package/entity/marketing/marketing.dto.d.ts +18 -18
  57. package/dist/package/entity/order-platform/external/reconciliation/external-reconciliation.do.d.ts +24 -24
  58. package/dist/package/entity/order-platform/menu.dto.d.ts +20 -20
  59. package/dist/package/entity/order-setting/order-setting.do.d.ts +10 -0
  60. package/dist/package/entity/order-setting/order-setting.dto.d.ts +26 -0
  61. package/dist/package/entity/order-setting/queue/queue.do.d.ts +23 -0
  62. package/dist/package/entity/order-setting/queue/queue.dto.d.ts +14 -0
  63. package/dist/package/entity/queue/queue.do.d.ts +153 -0
  64. package/dist/package/entity/queue/queue.dto.d.ts +221 -2
  65. package/dist/package/entity/queue/queue.enum.d.ts +5 -0
  66. package/dist/package/entity/restaurant/restaurant.dto.d.ts +20 -0
  67. package/dist/style.css +1 -1
  68. package/dist/{index-ILnighyU.js → useInternalUser-CHtaur9A.js} +93 -81
  69. package/package.json +2 -1
  70. package/src/api/food-court/index.ts +63 -0
  71. package/src/api/kiosk/index.ts +8 -0
  72. package/src/api/payment/index.ts +18 -1
  73. package/src/api/queue/index.ts +39 -0
  74. package/src/api/restaurant-setting/index.ts +14 -0
  75. package/src/locales/en-US.json +197 -26
  76. package/src/locales/ja-JP.json +193 -23
  77. package/src/locales/th-TH.json +193 -21
  78. package/src/locales/zh-CN.json +197 -23
  79. package/src/modules/display-system/interface.spec.ts +26 -1
  80. package/src/modules/display-system/interface.ts +20 -0
  81. package/src/modules/kiosk/interface.ts +4 -0
  82. package/src/modules/kiosk/license.spec.ts +167 -0
  83. package/src/modules/kiosk/license.ts +175 -0
  84. package/src/modules/kiosk/outletLoad.spec.ts +25 -0
  85. package/src/modules/kiosk/outletLoad.ts +19 -0
  86. package/src/modules/kiosk/settingsSections.spec.ts +85 -0
  87. package/src/modules/kiosk/settingsSections.ts +82 -0
  88. package/src/modules/kiosk/useKioskSettings.spec.ts +157 -0
  89. package/src/modules/kiosk/useKioskSettings.ts +61 -0
  90. package/src/modules/payment/paymentDevice.spec.ts +175 -0
  91. package/src/modules/payment/paymentDevice.ts +156 -0
  92. package/src/stores/kiosk/index.ts +16 -1
  93. package/src/stores/kiosk/mapper.ts +2 -0
  94. package/src/stores/order-setting/index.spec.ts +83 -0
  95. package/src/stores/order-setting/index.ts +49 -27
  96. package/src/stores/payment/index.spec.ts +86 -0
  97. package/src/stores/payment/index.ts +48 -2
  98. package/src/views/display-system/DisplayInspector.vue +17 -8
  99. package/src/views/display-system/DisplayTemplateEditor.vue +3 -1
  100. package/src/views/food-court/FoodCourtOrdersView.vue +46 -1
  101. package/src/views/food-court/food-court-export.spec.ts +151 -0
  102. package/src/views/food-court/food-court-export.ts +283 -0
  103. package/src/views/kiosk/KioskStatePanel.vue +2 -2
  104. package/src/views/kiosk/KioskView.vue +219 -82
  105. package/src/views/kiosk/devices/KioskDeviceCard.vue +148 -23
  106. package/src/views/kiosk/devices/KioskDevicesView.vue +48 -10
  107. package/src/views/kiosk/devices/KioskLicenseSummary.vue +79 -0
  108. package/src/views/kiosk/devices/KioskLicensesView.vue +152 -0
  109. package/src/views/kiosk/devices/KioskOtpDialog.vue +41 -1
  110. package/src/views/kiosk/devices/KioskPaymentDeviceCard.spec.ts +97 -0
  111. package/src/views/kiosk/devices/KioskPaymentDeviceCard.vue +221 -0
  112. package/src/views/kiosk/settings/KioskPaymentTypeSection.vue +1 -1
  113. package/src/views/kiosk/settings/KioskSettingView.vue +702 -419
  114. package/src/views/order-settings/delivery/DeliverySetting.vue +4 -0
  115. package/src/views/order-settings/dine-in/DineInSetting.vue +4 -0
  116. package/src/views/order-settings/pickup/PickUpSetting.vue +4 -4
  117. package/src/views/order-settings/pickup/PickUpSettingDialogContent.vue +0 -23
  118. package/src/views/order-settings/pos-status/PosOrderingStatus.spec.ts +207 -0
  119. package/src/views/order-settings/pos-status/PosOrderingStatus.vue +209 -0
  120. package/src/views/order-settings/pos-status/pos-status.spec.ts +103 -0
  121. package/src/views/order-settings/pos-status/pos-status.ts +86 -0
  122. package/src/views/order-settings/queue/QueueSetting.source.spec.ts +43 -0
  123. package/src/views/order-settings/queue/QueueSetting.vue +289 -15
  124. package/src/views/order-settings/queue/called-message.spec.ts +29 -1
  125. package/src/views/order-settings/queue/called-message.ts +18 -0
  126. package/src/views/order-settings/queue/phone-join-mode.spec.ts +90 -0
  127. package/src/views/order-settings/queue/phone-join-mode.ts +49 -0
  128. package/dist/FoodCourtOrdersView-CAPOycT3.js +0 -544
  129. package/dist/KioskDevicesView-B0U9JxRl.js +0 -4
  130. package/dist/KioskDevicesView.vue_vue_type_script_setup_true_lang-V3ai4FVI.js +0 -937
  131. package/dist/KioskSettingView-rdom_aS8.js +0 -880
  132. package/dist/KioskView-DOON9zR6.js +0 -516
  133. package/dist/frontend/mf-order/src/views/kiosk/settings/KioskDisplayStandSection.vue.d.ts +0 -10
  134. package/dist/frontend/mf-order/src/views/kiosk/settings/KioskInstructionSection.vue.d.ts +0 -15
  135. package/dist/frontend/mf-order/src/views/kiosk/settings/KioskPickAtCounterSection.vue.d.ts +0 -10
  136. package/dist/index-CaHG3M7C.js +0 -135
  137. package/src/views/kiosk/settings/KioskDisplayStandSection.vue +0 -189
  138. package/src/views/kiosk/settings/KioskInstructionSection.vue +0 -40
  139. package/src/views/kiosk/settings/KioskPickAtCounterSection.vue +0 -68
@@ -0,0 +1,1124 @@
1
+ import { defineComponent as Re, computed as C, ref as R, onMounted as ve, resolveComponent as E, openBlock as k, createBlock as de, withCtx as L, createVNode as i, unref as a, createElementVNode as t, withDirectives as A, vShow as U, toDisplayString as u, reactive as ta, watch as Ce, nextTick as me, onBeforeUnmount as na, createElementBlock as V, normalizeStyle as Pe, Fragment as B, renderList as j, normalizeClass as ae, createCommentVNode as D, toRaw as oa } from "vue";
2
+ import { e as Ve, b as Ee, s as Fe, d as sa, r as Te, f as Ae, h as ra } from "./app-CmuI6uSl.js";
3
+ import { b as h, K as da, c as ia } from "./order.dto-BD9raQG5.js";
4
+ import { _ as ua, u as ca } from "./index-wuFIsXHT.js";
5
+ import { useI18n as Ne, FeedMeAuth as Oe, useCoreStore as pa } from "@feedmepos/mf-common";
6
+ import { u as ma } from "./index-Cmb4sEqq.js";
7
+ import { useSnackbar as ya } from "@feedmepos/ui-library";
8
+ const fa = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary ml-7" }, va = { class: "ml-7" }, ba = { class: "ml-7" }, ga = { class: "flex flex-row flex-wrap gap-x-24 gap-y-8" }, xa = /* @__PURE__ */ Re({
9
+ __name: "KioskPaymentTypeSection",
10
+ props: {
11
+ paymentTypes: {
12
+ type: Array,
13
+ required: !0
14
+ },
15
+ offlinePaymentTypes: {
16
+ type: Array,
17
+ required: !0
18
+ },
19
+ allowEPayment: {
20
+ type: [Boolean, String],
21
+ required: !0
22
+ },
23
+ allowCredit: {
24
+ type: [Boolean, String],
25
+ default: !1
26
+ },
27
+ ePaymentTypes: {
28
+ type: Object,
29
+ required: !0
30
+ }
31
+ },
32
+ emits: ["update:paymentTypes", "update:offlinePaymentTypes", "update:ePaymentTypes"],
33
+ setup(n, { emit: r }) {
34
+ const { t: e } = Ne(), c = n, v = r, I = C(() => (c.paymentTypes || []).includes(Ve.F_ORDER_PAYMENT_TYPE.enum.ePayment)), y = R(), b = R([]), T = R(!1), g = R(!1), p = R(!1), P = () => {
35
+ Object.keys(c.ePaymentTypes).length !== 0 && (c.ePaymentTypes.terminal && (g.value = !0), c.ePaymentTypes.card.terminal ? (y.value = h.enum.TERMINAL, T.value = !0) : c.ePaymentTypes.card.nfc && (y.value = h.enum.NFC, T.value = !0), c.ePaymentTypes.eWallet.qrPay && (b.value.push(h.enum.QRPAY), p.value = !0), c.ePaymentTypes.eWallet.scanPay && (b.value.push(h.enum.SCANPAY), p.value = !0));
36
+ };
37
+ P();
38
+ const W = (x) => {
39
+ const m = {
40
+ terminal: !1,
41
+ card: {
42
+ terminal: !1,
43
+ nfc: !1
44
+ },
45
+ eWallet: {
46
+ qrPay: !1,
47
+ scanPay: !1
48
+ }
49
+ };
50
+ I.value && (x == h.enum.TERMINAL && (m.card.terminal = !0), x == h.enum.NFC && (m.card.nfc = !0), b.value.length > 0 && (b.value.includes(h.enum.QRPAY) && (m.eWallet.qrPay = !0), b.value.includes(h.enum.SCANPAY) && (m.eWallet.scanPay = !0))), g.value && (m.terminal = !0), v("update:ePaymentTypes", m);
51
+ }, M = () => {
52
+ const x = {
53
+ terminal: !1,
54
+ card: {
55
+ terminal: !1,
56
+ nfc: !1
57
+ },
58
+ eWallet: {
59
+ qrPay: !1,
60
+ scanPay: !1,
61
+ terminalScanPay: !1,
62
+ terminalQrPay: !1
63
+ }
64
+ };
65
+ I.value && (y.value && (y.value === h.enum.TERMINAL && (x.card.terminal = !0), y.value === h.enum.NFC && (x.card.nfc = !0)), g.value && (x.terminal = !0), b.value.includes(h.enum.QRPAY) && (x.eWallet.qrPay = !0), b.value.includes(h.enum.SCANPAY) && (x.eWallet.scanPay = !0), b.value.includes(h.enum.TERMINAL_SCAN_PAY) && (x.eWallet.terminalScanPay = !0), b.value.includes(h.enum.TERMINAL_QR_PAY) && (x.eWallet.terminalQrPay = !0)), v("update:ePaymentTypes", x);
66
+ }, o = (x) => {
67
+ y.value = "", x && (y.value = h.enum.TERMINAL), M();
68
+ }, K = (x) => {
69
+ b.value = [], x && (b.value = [
70
+ h.enum.QRPAY,
71
+ h.enum.SCANPAY
72
+ ]), M();
73
+ }, H = (x) => {
74
+ v("update:paymentTypes", x), x.includes(Ve.F_ORDER_PAYMENT_TYPE.enum.ePayment) || (T.value = !1, p.value = !1, o(!1), K(!1));
75
+ };
76
+ return ve(() => {
77
+ P();
78
+ }), (x, m) => {
79
+ const q = E("FmSwitch"), G = E("FmRadio"), ue = E("FmRadioGroup"), Q = E("FmCardSection"), X = E("FmCard"), Y = E("FmCheckbox");
80
+ return k(), de(ua, {
81
+ "payment-types": n.paymentTypes,
82
+ "offline-payment-types": n.offlinePaymentTypes,
83
+ "allow-e-payment": c.allowEPayment,
84
+ "allow-credit": c.allowCredit,
85
+ "onUpdate:paymentTypes": H,
86
+ "onUpdate:offlinePaymentTypes": m[8] || (m[8] = (S) => v("update:offlinePaymentTypes", S || []))
87
+ }, {
88
+ "e-payment-note": L(() => [
89
+ t("div", fa, u(a(e)("order.legacyEPaymentNote")), 1)
90
+ ]),
91
+ "e-payment-content": L(() => [
92
+ i(X, { variant: "outlined" }, {
93
+ default: L(() => [
94
+ i(Q, null, {
95
+ default: L(() => [
96
+ i(q, {
97
+ label: a(e)("order.bankCard"),
98
+ sublabel: a(e)("order.cardPaymentDescription"),
99
+ "label-placement": "right",
100
+ modelValue: T.value,
101
+ "onUpdate:modelValue": [
102
+ m[0] || (m[0] = (S) => T.value = S),
103
+ o
104
+ ]
105
+ }, null, 8, ["label", "sublabel", "modelValue"]),
106
+ m[9] || (m[9] = t("br", null, null, -1)),
107
+ A(t("div", va, [
108
+ i(ue, {
109
+ modelValue: y.value,
110
+ "onUpdate:modelValue": [
111
+ m[1] || (m[1] = (S) => y.value = S),
112
+ W
113
+ ],
114
+ inline: ""
115
+ }, {
116
+ default: L(() => [
117
+ i(G, {
118
+ label: a(e)("order.terminal"),
119
+ value: a(h).enum.TERMINAL
120
+ }, null, 8, ["label", "value"]),
121
+ i(G, {
122
+ label: a(e)("order.nfc"),
123
+ value: a(h).enum.NFC
124
+ }, null, 8, ["label", "value"])
125
+ ]),
126
+ _: 1
127
+ }, 8, ["modelValue"])
128
+ ], 512), [
129
+ [U, T.value]
130
+ ])
131
+ ]),
132
+ _: 1
133
+ })
134
+ ]),
135
+ _: 1
136
+ }),
137
+ i(X, {
138
+ variant: "outlined",
139
+ class: "mt-2"
140
+ }, {
141
+ default: L(() => [
142
+ i(Q, null, {
143
+ default: L(() => [
144
+ i(q, {
145
+ label: a(e)("order.terminal"),
146
+ sublabel: a(e)("order.terminalPaymentDescription"),
147
+ "label-placement": "right",
148
+ modelValue: g.value,
149
+ "onUpdate:modelValue": [
150
+ m[2] || (m[2] = (S) => g.value = S),
151
+ M
152
+ ]
153
+ }, null, 8, ["label", "sublabel", "modelValue"])
154
+ ]),
155
+ _: 1
156
+ })
157
+ ]),
158
+ _: 1
159
+ }),
160
+ i(X, {
161
+ variant: "outlined",
162
+ class: "mt-2"
163
+ }, {
164
+ default: L(() => [
165
+ i(Q, null, {
166
+ default: L(() => [
167
+ i(q, {
168
+ label: a(e)("order.eWallet"),
169
+ sublabel: a(e)("order.eWalletDescription"),
170
+ "label-placement": "right",
171
+ modelValue: p.value,
172
+ "onUpdate:modelValue": [
173
+ m[3] || (m[3] = (S) => p.value = S),
174
+ K
175
+ ]
176
+ }, null, 8, ["label", "sublabel", "modelValue"]),
177
+ m[10] || (m[10] = t("br", null, null, -1)),
178
+ A(t("div", ba, [
179
+ t("div", ga, [
180
+ i(Y, {
181
+ modelValue: b.value,
182
+ "onUpdate:modelValue": [
183
+ m[4] || (m[4] = (S) => b.value = S),
184
+ M
185
+ ],
186
+ label: a(e)("order.qrPay"),
187
+ value: a(h).enum.QRPAY
188
+ }, null, 8, ["modelValue", "label", "value"]),
189
+ i(Y, {
190
+ modelValue: b.value,
191
+ "onUpdate:modelValue": [
192
+ m[5] || (m[5] = (S) => b.value = S),
193
+ M
194
+ ],
195
+ label: a(e)("order.scanPay"),
196
+ value: a(h).enum.SCANPAY
197
+ }, null, 8, ["modelValue", "label", "value"]),
198
+ i(Y, {
199
+ modelValue: b.value,
200
+ "onUpdate:modelValue": [
201
+ m[6] || (m[6] = (S) => b.value = S),
202
+ M
203
+ ],
204
+ label: a(e)("order.terminalScanPay"),
205
+ value: a(h).enum.TERMINAL_SCAN_PAY
206
+ }, null, 8, ["modelValue", "label", "value"]),
207
+ i(Y, {
208
+ modelValue: b.value,
209
+ "onUpdate:modelValue": [
210
+ m[7] || (m[7] = (S) => b.value = S),
211
+ M
212
+ ],
213
+ label: a(e)("order.terminalQrPay"),
214
+ value: a(h).enum.TERMINAL_QR_PAY
215
+ }, null, 8, ["modelValue", "label", "value"])
216
+ ])
217
+ ], 512), [
218
+ [U, p.value]
219
+ ])
220
+ ]),
221
+ _: 1
222
+ })
223
+ ]),
224
+ _: 1
225
+ })
226
+ ]),
227
+ _: 1
228
+ }, 8, ["payment-types", "offline-payment-types", "allow-e-payment", "allow-credit"]);
229
+ };
230
+ }
231
+ }), _a = {
232
+ "en-US": "English",
233
+ "zh-CN": "中文",
234
+ "th-TH": "ไทย",
235
+ "vi-VN": "Tiếng Việt",
236
+ "id-ID": "Bahasa Indonesia",
237
+ "ko-KR": "한국어",
238
+ "ja-JP": "日本語",
239
+ "ar-SA": "العربية"
240
+ }, ha = da.map((n) => ({
241
+ code: n,
242
+ label: _a[n]
243
+ }));
244
+ var Sa = { firebase: {} }, ka = {};
245
+ let re = null;
246
+ function Ia(n) {
247
+ var c;
248
+ const r = (c = n.name.split(".").pop()) == null ? void 0 : c.toLowerCase();
249
+ return r && /^[a-z0-9]+$/.test(r) ? r : {
250
+ "image/jpeg": "jpg",
251
+ "image/png": "png",
252
+ "image/webp": "webp",
253
+ "image/gif": "gif"
254
+ }[n.type] ?? "bin";
255
+ }
256
+ function wa() {
257
+ var e;
258
+ return (((e = ka.firebase) == null ? void 0 : e.storageBucket) ?? Sa.firebase.storageBucket ?? "image.feedme.cc").replace(/^https?:\/\//, "").replace(/\/+$/, "");
259
+ }
260
+ function Ca(n) {
261
+ const r = n.replace(/^\/+/, "");
262
+ return `https://${wa()}/${r}`;
263
+ }
264
+ async function Pa() {
265
+ const n = Ee();
266
+ if (!n.currentUser && (await n.authStateReady(), !n.currentUser && (re || (re = (async () => {
267
+ const r = await Oe.getCustomToken();
268
+ await Fe(n, r);
269
+ })().finally(() => {
270
+ re = null;
271
+ })), await re, !n.currentUser)))
272
+ throw new Error("User not authenticated for image upload");
273
+ }
274
+ async function Va() {
275
+ const n = Ee();
276
+ n.currentUser && await ra(n);
277
+ const r = await Oe.getCustomToken();
278
+ await Fe(n, r);
279
+ }
280
+ async function Ta(n, r) {
281
+ const e = sa(), c = Te(e, n);
282
+ try {
283
+ await Ae(c, r, {
284
+ contentType: r.type || void 0
285
+ });
286
+ return;
287
+ } catch (I) {
288
+ if ((I == null ? void 0 : I.code) !== "storage/unauthorized")
289
+ throw I;
290
+ }
291
+ await Va();
292
+ const v = Te(e, n);
293
+ await Ae(v, r, {
294
+ contentType: r.type || void 0
295
+ });
296
+ }
297
+ async function Aa(n, r) {
298
+ await Pa();
299
+ const e = n.replace(/^\/+/, "").replace(/\/+$/, ""), c = Ia(r), v = `${Date.now()}_${Math.random().toString(36).slice(2, 10)}.${c}`, I = `${e}/${v}`;
300
+ return await Ta(I, r), Ca(I);
301
+ }
302
+ const le = 8, Ue = 6, Le = 2, $e = 60, Ua = {
303
+ landscape: "coverImageLandscape",
304
+ portrait: "coverImagePortrait"
305
+ };
306
+ function Me(n) {
307
+ if (!Array.isArray(n)) return [];
308
+ const r = /* @__PURE__ */ new Set(), e = [];
309
+ for (const c of n) {
310
+ const v = typeof c == "string" ? c.trim() : "";
311
+ !v || r.has(v) || (r.add(v), e.push(v));
312
+ }
313
+ return e;
314
+ }
315
+ function ie(n, r) {
316
+ var e;
317
+ return Me((e = n.coverCarousel) == null ? void 0 : e[r]);
318
+ }
319
+ function Ra(n, r) {
320
+ const e = n[Ua[r]], c = typeof e == "string" ? e.trim() : "";
321
+ return c.length > 0 ? c : null;
322
+ }
323
+ function Ea(n, r) {
324
+ const e = ie(n, r);
325
+ if (e.length > 0) return e;
326
+ const c = Ra(n, r);
327
+ return c ? [c] : [];
328
+ }
329
+ function Fa(n) {
330
+ var e;
331
+ const r = (e = n.coverCarousel) == null ? void 0 : e.intervalMs;
332
+ return typeof r != "number" || !Number.isFinite(r) || r <= 0 ? null : Math.round(r / 1e3);
333
+ }
334
+ function De(n, r, e) {
335
+ return n.length === 0 && r.length === 0 ? null : {
336
+ landscape: n.length > 0 ? n : void 0,
337
+ portrait: r.length > 0 ? r : void 0,
338
+ intervalMs: typeof e == "number" && e > 0 ? e : void 0
339
+ };
340
+ }
341
+ function Na(n, r, e) {
342
+ var y;
343
+ const c = Me(e).slice(0, le), v = r === "landscape" ? "portrait" : "landscape", I = {
344
+ [r]: c.length > 1 ? c : [],
345
+ [v]: ie(n, v)
346
+ };
347
+ return {
348
+ coverImageLandscape: r === "landscape" ? c[0] ?? null : n.coverImageLandscape,
349
+ coverImagePortrait: r === "portrait" ? c[0] ?? null : n.coverImagePortrait,
350
+ coverCarousel: De(
351
+ I.landscape,
352
+ I.portrait,
353
+ (y = n.coverCarousel) == null ? void 0 : y.intervalMs
354
+ )
355
+ };
356
+ }
357
+ function Oa(n, r) {
358
+ const e = r == null || !Number.isFinite(r) ? null : Math.min($e, Math.max(Le, Math.round(r)));
359
+ return {
360
+ coverImageLandscape: n.coverImageLandscape,
361
+ coverImagePortrait: n.coverImagePortrait,
362
+ coverCarousel: De(
363
+ ie(n, "landscape"),
364
+ ie(n, "portrait"),
365
+ e == null ? null : e * 1e3
366
+ )
367
+ };
368
+ }
369
+ function La(n, r, e) {
370
+ if (r === e) return [...n];
371
+ if (r < 0 || e < 0 || r >= n.length || e >= n.length) return [...n];
372
+ const c = [...n], [v] = c.splice(r, 1);
373
+ return c.splice(e, 0, v), c;
374
+ }
375
+ const We = ["ordering", "look", "payment", "updates"];
376
+ function $a(n) {
377
+ return We.filter((r) => r !== "updates" || n);
378
+ }
379
+ const Ge = 1e5;
380
+ function Ma(n) {
381
+ var c, v, I, y, b, T, g;
382
+ const r = /* @__PURE__ */ new Set();
383
+ if (n.dineIn.enabled && n.dineIn.displayStand.enabled) {
384
+ const { padDigit: p, standSlotRange: P } = n.dineIn.displayStand;
385
+ p != null && p >= 0 && P.min != null && P.max != null && P.min <= P.max || r.add("ordering");
386
+ }
387
+ n.minWeighGrams != null && (!Number.isInteger(n.minWeighGrams) || n.minWeighGrams < 1 || n.minWeighGrams > Ge) && r.add("ordering"), n.languages != null && n.languages.length === 0 && r.add("look");
388
+ const e = n.paymentSetting;
389
+ if ((c = e == null ? void 0 : e.paymentTypes) != null && c.includes(ia.enum.ePayment)) {
390
+ const p = e.ePaymentTypes, P = ((v = p == null ? void 0 : p.card) == null ? void 0 : v.terminal) || ((I = p == null ? void 0 : p.card) == null ? void 0 : I.nfc), W = ((y = p == null ? void 0 : p.eWallet) == null ? void 0 : y.qrPay) || ((b = p == null ? void 0 : p.eWallet) == null ? void 0 : b.scanPay) || ((T = p == null ? void 0 : p.eWallet) == null ? void 0 : T.terminalScanPay) || ((g = p == null ? void 0 : p.eWallet) == null ? void 0 : g.terminalQrPay);
391
+ (!p || !P && !W && !p.terminal) && r.add("payment");
392
+ }
393
+ return We.filter((p) => r.has(p));
394
+ }
395
+ function ye(n) {
396
+ var r, e;
397
+ return !!((r = n == null ? void 0 : n.payAtCounter) != null && r.trim() || (e = n == null ? void 0 : n.paid) != null && e.trim());
398
+ }
399
+ const Da = ["aria-label"], Wa = {
400
+ role: "tablist",
401
+ "aria-orientation": "vertical",
402
+ class: "flex flex-col gap-4 xs:flex-row xs:flex-wrap xs:gap-8"
403
+ }, Ga = ["id", "aria-selected", "aria-controls", "onClick"], Ya = { class: "flex-1 min-w-0 max-w-[720px]" }, za = {
404
+ id: "kiosk-settings-panel-ordering",
405
+ role: "tabpanel",
406
+ "aria-labelledby": "kiosk-settings-tab-ordering",
407
+ class: "flex flex-col gap-32"
408
+ }, Ba = { class: "flex flex-col gap-4" }, ja = { class: "fm-typo-en-title-md-600" }, Ka = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ha = { class: "flex flex-col gap-8" }, qa = { class: "fm-typo-en-title-sm-600" }, Qa = { class: "flex flex-col gap-16 pt-8" }, Xa = { class: "flex flex-col gap-8" }, Ja = { class: "ml-[60px] xs:ml-0 flex flex-col gap-8" }, Za = { class: "flex flex-row flex-wrap items-center gap-x-8" }, el = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, al = { class: "border p-16 fm-corner-radius-lg flex flex-col gap-8" }, ll = { class: "fm-typo-en-body-md-600" }, tl = { class: "flex flex-col gap-8" }, nl = { class: "ml-[60px] xs:ml-0 flex flex-col gap-8" }, ol = { class: "fm-typo-en-body-md-600" }, sl = { class: "grid grid-cols-4 gap-12 xs:grid-cols-2" }, rl = { class: "flex flex-row flex-wrap items-center gap-x-8" }, dl = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, il = { class: "border p-16 fm-corner-radius-lg flex flex-col gap-8" }, ul = { class: "fm-typo-en-body-md-600" }, cl = { class: "flex flex-col gap-8" }, pl = { class: "fm-typo-en-title-sm-600" }, ml = { class: "ml-[60px] xs:ml-0 flex flex-col gap-8" }, yl = { class: "flex flex-row flex-wrap items-center gap-x-8" }, fl = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, vl = { class: "border p-16 fm-corner-radius-lg flex flex-col gap-8" }, bl = { class: "fm-typo-en-body-md-600" }, gl = { class: "flex flex-col gap-8" }, xl = { class: "fm-typo-en-title-sm-600" }, _l = { class: "flex flex-col gap-8" }, hl = { class: "fm-typo-en-title-sm-600" }, Sl = { class: "flex flex-col gap-8" }, kl = { class: "fm-typo-en-title-sm-600" }, Il = { class: "flex flex-col gap-8" }, wl = { class: "fm-typo-en-title-sm-600" }, Cl = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Pl = {
409
+ id: "kiosk-settings-panel-look",
410
+ role: "tabpanel",
411
+ "aria-labelledby": "kiosk-settings-tab-look",
412
+ class: "flex flex-col gap-32"
413
+ }, Vl = { class: "flex flex-col gap-4" }, Tl = { class: "fm-typo-en-title-md-600" }, Al = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ul = { class: "flex flex-col gap-8" }, Rl = { class: "fm-typo-en-title-sm-600" }, El = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Fl = { class: "ml-[60px] xs:ml-0 grid grid-cols-2 xs:grid-cols-1 gap-8" }, Nl = {
414
+ key: 0,
415
+ class: "ml-[60px] xs:ml-0 fm-typo-en-body-sm-400 text-fm-color-system-error-300"
416
+ }, Ol = { class: "flex flex-col gap-8" }, Ll = { class: "fm-typo-en-title-sm-600" }, $l = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Ml = { class: "flex flex-row flex-wrap items-end gap-24 pt-4" }, Dl = { class: "fm-typo-en-body-sm-600" }, Wl = { class: "flex flex-row gap-4" }, Gl = ["src", "alt"], Yl = ["aria-label"], zl = {
417
+ id: "kiosk-settings-panel-payment",
418
+ role: "tabpanel",
419
+ "aria-labelledby": "kiosk-settings-tab-payment",
420
+ class: "flex flex-col gap-32"
421
+ }, Bl = { class: "flex flex-col gap-4" }, jl = { class: "fm-typo-en-title-md-600" }, Kl = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Hl = {
422
+ key: 0,
423
+ id: "kiosk-settings-panel-updates",
424
+ role: "tabpanel",
425
+ "aria-labelledby": "kiosk-settings-tab-updates",
426
+ class: "flex flex-col gap-32"
427
+ }, ql = { class: "flex flex-col gap-4" }, Ql = { class: "fm-typo-en-title-md-600" }, Xl = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Jl = { class: "flex flex-col gap-4 max-w-[360px]" }, Zl = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, et = { class: "fm-typo-en-title-sm-600 text-fm-color-typo-primary" }, at = { class: "flex flex-col gap-16" }, lt = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, tt = { class: "fm-typo-en-body-md-600" }, nt = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, ot = { class: "flex flex-wrap items-start gap-8" }, st = { class: "relative" }, rt = ["src", "alt"], dt = { class: "absolute top-2 left-2 px-2 rounded-full bg-fm-color-typo-primary text-fm-color-neutral-white fm-typo-en-body-sm-400" }, it = { class: "flex items-center gap-1" }, ut = { key: 0 }, ct = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, pt = { class: "w-full flex flex-row items-center justify-between gap-12 xs:flex-col xs:items-stretch" }, mt = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, yt = { class: "flex flex-row gap-8" }, ft = { key: 1 }, vt = 10 * 1e3 * 1e3, fe = 24, It = /* @__PURE__ */ Re({
428
+ __name: "KioskSettingView",
429
+ props: {
430
+ restaurantId: {},
431
+ form: {},
432
+ save: { type: Function }
433
+ },
434
+ emits: ["dirtyChange"],
435
+ setup(n, { emit: r }) {
436
+ const { t: e } = Ne(), c = pa(), v = C(() => {
437
+ var d;
438
+ return ((d = c.sessionUser.value) == null ? void 0 : d.role.isAdmin) ?? !1;
439
+ }), I = C(() => $a(v.value)), y = R("ordering"), b = {
440
+ ordering: { title: "order.settingsSectionOrdering" },
441
+ look: { title: "order.settingsSectionLook" },
442
+ payment: { title: "order.settingsSectionPayment" },
443
+ updates: { title: "order.settingsSectionUpdates" }
444
+ }, T = R(!1), g = ta({ pickUp: !1, displayStand: !1, takeaway: !1 }), p = n, P = ya(), W = r;
445
+ function M(d) {
446
+ return structuredClone(oa(d));
447
+ }
448
+ const o = R(M(p.form)), K = ha, H = C(() => o.value.languages != null), x = C(() => o.value.languages ?? []);
449
+ function m(d) {
450
+ o.value.languages = d ? ["en-US"] : null;
451
+ }
452
+ function q(d, s) {
453
+ const _ = o.value.languages ?? [];
454
+ o.value.languages = s ? K.filter((f) => f.code === d || _.includes(f.code)).map((f) => f.code) : _.filter((f) => f !== d);
455
+ }
456
+ const G = (d) => d < 0 ? e("order.nonNegativeRule") : !0, ue = (d) => d <= (o.value.dineIn.displayStand.standSlotRange.min ?? 0) ? e("order.greaterThanMinRule") : !0, Q = C(() => [G]), X = C(() => [G]), Y = C(() => [G, ue]), S = C(() => Ma(o.value)), Ye = C(() => {
457
+ var _;
458
+ const d = o.value, s = (_ = d.otaChannel) == null ? void 0 : _.trim();
459
+ return S.value.length > 0 ? null : {
460
+ ...d,
461
+ otaChannel: s || void 0,
462
+ dineIn: {
463
+ ...d.dineIn,
464
+ displayStand: {
465
+ ...d.dineIn.displayStand,
466
+ enabled: d.dineIn.enabled && d.dineIn.displayStand.enabled,
467
+ padDigit: d.dineIn.displayStand.padDigit ?? 0,
468
+ standSlotRange: {
469
+ min: d.dineIn.displayStand.standSlotRange.min ?? 0,
470
+ max: d.dineIn.displayStand.standSlotRange.max ?? 10
471
+ },
472
+ prefix: d.dineIn.displayStand.prefix ?? ""
473
+ }
474
+ }
475
+ };
476
+ }), { startAsyncCall: ze } = ma();
477
+ function Be(d) {
478
+ o.value.paymentSetting.paymentTypes = d;
479
+ }
480
+ function je(d) {
481
+ o.value.paymentSetting.ePaymentTypes = d;
482
+ }
483
+ const Ke = ca(), be = [
484
+ {
485
+ value: "landscape",
486
+ labelKey: "order.coverImageLandscape",
487
+ hintKey: "order.coverImageLandscapeHint",
488
+ previewClass: "w-[280px] aspect-video",
489
+ thumbClass: "h-[56px] aspect-video",
490
+ dropClass: "w-[280px] aspect-video"
491
+ },
492
+ {
493
+ value: "portrait",
494
+ labelKey: "order.coverImagePortrait",
495
+ hintKey: "order.coverImagePortraitHint",
496
+ previewClass: "w-[160px] aspect-[9/16]",
497
+ thumbClass: "h-[72px] aspect-[9/16]",
498
+ dropClass: "w-[160px] aspect-[9/16]"
499
+ }
500
+ ];
501
+ function N(d) {
502
+ return Ea(o.value, d);
503
+ }
504
+ const He = C(
505
+ () => N("landscape").length > 1 || N("portrait").length > 1
506
+ );
507
+ function ce(d, s) {
508
+ Object.assign(
509
+ o.value,
510
+ Na(o.value, d, s)
511
+ );
512
+ }
513
+ function ge(d, s, _) {
514
+ ce(d, La(N(d), s, _));
515
+ }
516
+ function qe(d, s) {
517
+ const _ = N(d).filter((f, w) => w !== s);
518
+ ce(d, _);
519
+ }
520
+ const xe = C({
521
+ get: () => o.value.minWeighGrams ?? null,
522
+ set: (d) => {
523
+ o.value.minWeighGrams = typeof d == "number" && Number.isFinite(d) && d >= 1 ? Math.trunc(d) : null;
524
+ }
525
+ }), _e = C({
526
+ get: () => Fa(o.value),
527
+ set: (d) => {
528
+ Object.assign(
529
+ o.value,
530
+ Oa(o.value, d)
531
+ );
532
+ }
533
+ });
534
+ async function Qe(d, s) {
535
+ if (!(N(d).length >= le))
536
+ try {
537
+ const _ = await ze(async () => {
538
+ const f = `/restaurant/${p.restaurantId}/kiosk/cover-${d}`;
539
+ return await Aa(f, s);
540
+ });
541
+ ce(d, [...N(d), _]), P.open({
542
+ title: e("order.imageUploadSuccess"),
543
+ type: "success"
544
+ });
545
+ } catch (_) {
546
+ console.error(_), P.open({
547
+ title: e("order.imageUploadFailed"),
548
+ type: "error"
549
+ });
550
+ }
551
+ }
552
+ function Xe(d, s) {
553
+ var w, O;
554
+ const _ = e(d === "landscape" ? "order.coverImageLandscape" : "order.coverImagePortrait"), f = (O = (w = s[0]) == null ? void 0 : w.reason) == null ? void 0 : O[0];
555
+ P.open({
556
+ title: f ? `${e("order.imageUploadRejected")}: ${_} (${f})` : `${e("order.imageUploadRejected")}: ${_}`,
557
+ type: "error"
558
+ });
559
+ }
560
+ const Je = C(() => Ke.getRestaurantEPayment()), he = C({
561
+ get: () => (o.value.dineIn.displayStand.enabled && o.value.dineIn.displayStand.enablePaxDialog || o.value.dineIn.pickUp.enablePaxDialog) ?? !1,
562
+ set: (d) => {
563
+ o.value.dineIn.displayStand.enablePaxDialog = d, o.value.dineIn.pickUp.enablePaxDialog = d;
564
+ }
565
+ });
566
+ Ce(
567
+ () => [
568
+ o.value.dineIn.enabled,
569
+ o.value.dineIn.pickUp.enabled,
570
+ o.value.dineIn.displayStand.enabled
571
+ ],
572
+ ([d, s, _], f) => {
573
+ const w = (f == null ? void 0 : f[0]) ?? !1;
574
+ d && !s && !_ && (o.value.dineIn.pickUp.enabled = !0, w || P.open({
575
+ title: e("order.dineInModeAutoCorrected"),
576
+ type: "info"
577
+ }));
578
+ },
579
+ { immediate: !0 }
580
+ );
581
+ const te = R(null), pe = () => JSON.stringify(o.value), J = C(() => te.value !== null && pe() !== te.value);
582
+ Ce(J, (d) => W("dirtyChange", d)), ve(async () => {
583
+ await me(), te.value = pe();
584
+ });
585
+ async function Se() {
586
+ o.value = M(p.form), await me(), te.value = pe();
587
+ }
588
+ const Z = R(!1), ne = R(null), oe = R(null), ke = R({}), Ie = R(0);
589
+ let z = null;
590
+ function se() {
591
+ var _;
592
+ const d = ne.value;
593
+ if (!d) return;
594
+ const s = d.getBoundingClientRect();
595
+ ke.value = {
596
+ left: `${s.left - fe}px`,
597
+ width: `${s.width + 2 * fe}px`
598
+ }, Ie.value = (((_ = oe.value) == null ? void 0 : _.offsetHeight) ?? 0) + fe;
599
+ }
600
+ ve(() => {
601
+ se(), z = new ResizeObserver(se), ne.value && z.observe(ne.value), oe.value && z.observe(oe.value), window.addEventListener("resize", se);
602
+ }), na(() => {
603
+ z == null || z.disconnect(), window.removeEventListener("resize", se);
604
+ });
605
+ async function Ze() {
606
+ const d = Ye.value;
607
+ if (!d) {
608
+ y.value = S.value[0] ?? y.value, P.open({
609
+ title: e("order.failedToUpdateSetting"),
610
+ type: "error"
611
+ });
612
+ return;
613
+ }
614
+ Z.value = !0;
615
+ try {
616
+ await p.save(d), await me(), await Se();
617
+ } catch {
618
+ } finally {
619
+ Z.value = !1;
620
+ }
621
+ }
622
+ return (d, s) => {
623
+ const _ = E("FmIcon"), f = E("FmSwitch"), w = E("FmButton"), O = E("FmTextField"), ee = E("FmStepperField"), ea = E("FmCheckbox"), aa = E("FmDropField"), la = E("FmDialog");
624
+ return o.value ? (k(), V("div", {
625
+ key: 0,
626
+ ref_key: "formRoot",
627
+ ref: ne,
628
+ class: "flex flex-row gap-32 xs:flex-col xs:gap-16",
629
+ style: Pe({ paddingBottom: `${Ie.value}px` })
630
+ }, [
631
+ t("nav", {
632
+ "aria-label": a(e)("order.settingsSectionsLabel"),
633
+ class: "w-[200px] shrink-0 xs:w-full"
634
+ }, [
635
+ t("div", Wa, [
636
+ (k(!0), V(B, null, j(I.value, (l) => (k(), V("button", {
637
+ id: `kiosk-settings-tab-${l}`,
638
+ key: l,
639
+ type: "button",
640
+ role: "tab",
641
+ "aria-selected": y.value === l,
642
+ "aria-controls": `kiosk-settings-panel-${l}`,
643
+ class: ae([
644
+ "flex flex-row items-center justify-between gap-8 px-12 py-8 fm-corner-radius-md text-left whitespace-nowrap fm-typo-en-body-md-600 transition-colors",
645
+ y.value === l ? "bg-fm-color-neutral-gray-100 text-fm-color-typo-primary" : "text-fm-color-typo-secondary hover:bg-fm-color-neutral-gray-100"
646
+ ]),
647
+ onClick: ($) => y.value = l
648
+ }, [
649
+ t("span", null, u(a(e)(b[l].title)), 1),
650
+ S.value.includes(l) ? (k(), de(_, {
651
+ key: 0,
652
+ name: "error",
653
+ size: "sm",
654
+ color: "system-error-300",
655
+ "aria-label": a(e)("order.settingsSectionError")
656
+ }, null, 8, ["aria-label"])) : D("", !0)
657
+ ], 10, Ga))), 128))
658
+ ])
659
+ ], 8, Da),
660
+ t("div", Ya, [
661
+ A(t("section", za, [
662
+ t("div", Ba, [
663
+ t("h2", ja, u(a(e)("order.settingsSectionOrdering")), 1),
664
+ t("p", Ka, u(a(e)("order.settingsSectionOrderingHint")), 1)
665
+ ]),
666
+ t("div", Ha, [
667
+ t("span", qa, u(a(e)("order.dineIn")), 1),
668
+ i(f, {
669
+ modelValue: o.value.dineIn.enabled,
670
+ "onUpdate:modelValue": s[0] || (s[0] = (l) => o.value.dineIn.enabled = l),
671
+ label: a(e)("order.dineInSwitch"),
672
+ sublabel: a(e)("order.dineInSwitchHint"),
673
+ "label-placement": "right"
674
+ }, null, 8, ["modelValue", "label", "sublabel"]),
675
+ A(t("div", Qa, [
676
+ t("div", Xa, [
677
+ i(f, {
678
+ modelValue: o.value.dineIn.pickUp.enabled,
679
+ "onUpdate:modelValue": s[1] || (s[1] = (l) => o.value.dineIn.pickUp.enabled = l),
680
+ label: a(e)("order.pickAtCounter"),
681
+ "label-placement": "right"
682
+ }, null, 8, ["modelValue", "label"]),
683
+ A(t("div", Ja, [
684
+ t("div", Za, [
685
+ i(w, {
686
+ class: "-ml-[12px]",
687
+ variant: "tertiary",
688
+ size: "md",
689
+ label: a(e)("order.customiseMessages"),
690
+ "append-icon": g.pickUp ? "expand_less" : "expand_more",
691
+ "aria-expanded": g.pickUp,
692
+ onClick: s[2] || (s[2] = (l) => g.pickUp = !g.pickUp)
693
+ }, null, 8, ["label", "append-icon", "aria-expanded"]),
694
+ t("span", el, u(a(ye)(o.value.dineIn.pickUp.submitOrderInstruction) ? a(e)("order.messagesCustom") : a(e)("order.messagesDefault")), 1)
695
+ ]),
696
+ A(t("div", al, [
697
+ t("span", ll, u(a(e)("order.submitOrderInstruction")), 1),
698
+ i(O, {
699
+ modelValue: o.value.dineIn.pickUp.submitOrderInstruction.payAtCounter,
700
+ "onUpdate:modelValue": s[3] || (s[3] = (l) => o.value.dineIn.pickUp.submitOrderInstruction.payAtCounter = l),
701
+ label: a(e)("order.payAtCounter"),
702
+ placeholder: "Collect your transaction slip below and present it to the cashier"
703
+ }, null, 8, ["modelValue", "label"]),
704
+ i(O, {
705
+ modelValue: o.value.dineIn.pickUp.submitOrderInstruction.paid,
706
+ "onUpdate:modelValue": s[4] || (s[4] = (l) => o.value.dineIn.pickUp.submitOrderInstruction.paid = l),
707
+ label: a(e)("order.paid"),
708
+ placeholder: "Please wait as we prepare your food. We'll call your number when it's ready."
709
+ }, null, 8, ["modelValue", "label"])
710
+ ], 512), [
711
+ [U, g.pickUp]
712
+ ])
713
+ ], 512), [
714
+ [U, o.value.dineIn.pickUp.enabled]
715
+ ])
716
+ ]),
717
+ t("div", tl, [
718
+ i(f, {
719
+ modelValue: o.value.dineIn.displayStand.enabled,
720
+ "onUpdate:modelValue": s[5] || (s[5] = (l) => o.value.dineIn.displayStand.enabled = l),
721
+ label: a(e)("order.displayStand"),
722
+ "label-placement": "right"
723
+ }, null, 8, ["modelValue", "label"]),
724
+ A(t("div", nl, [
725
+ t("span", ol, u(a(e)("order.tableServiceSetting")), 1),
726
+ t("div", sl, [
727
+ i(O, {
728
+ modelValue: o.value.dineIn.displayStand.prefix,
729
+ "onUpdate:modelValue": s[6] || (s[6] = (l) => o.value.dineIn.displayStand.prefix = l),
730
+ label: a(e)("order.prefix"),
731
+ placeholder: a(e)("order.prefix")
732
+ }, null, 8, ["modelValue", "label", "placeholder"]),
733
+ i(ee, {
734
+ modelValue: o.value.dineIn.displayStand.standSlotRange.min,
735
+ "onUpdate:modelValue": s[7] || (s[7] = (l) => o.value.dineIn.displayStand.standSlotRange.min = l),
736
+ label: a(e)("order.start"),
737
+ labelMark: "required",
738
+ rules: X.value,
739
+ placeholder: a(e)("order.enterANumber")
740
+ }, null, 8, ["modelValue", "label", "rules", "placeholder"]),
741
+ i(ee, {
742
+ modelValue: o.value.dineIn.displayStand.standSlotRange.max,
743
+ "onUpdate:modelValue": s[8] || (s[8] = (l) => o.value.dineIn.displayStand.standSlotRange.max = l),
744
+ label: a(e)("order.end"),
745
+ labelMark: "required",
746
+ rules: Y.value,
747
+ placeholder: a(e)("order.enterANumber")
748
+ }, null, 8, ["modelValue", "label", "rules", "placeholder"]),
749
+ i(ee, {
750
+ modelValue: o.value.dineIn.displayStand.padDigit,
751
+ "onUpdate:modelValue": s[9] || (s[9] = (l) => o.value.dineIn.displayStand.padDigit = l),
752
+ label: a(e)("order.padDigit"),
753
+ labelMark: "required",
754
+ rules: Q.value,
755
+ placeholder: a(e)("order.padDigit")
756
+ }, null, 8, ["modelValue", "label", "rules", "placeholder"])
757
+ ]),
758
+ t("div", rl, [
759
+ i(w, {
760
+ class: "-ml-[12px]",
761
+ variant: "tertiary",
762
+ size: "md",
763
+ label: a(e)("order.customiseMessages"),
764
+ "append-icon": g.displayStand ? "expand_less" : "expand_more",
765
+ "aria-expanded": g.displayStand,
766
+ onClick: s[10] || (s[10] = (l) => g.displayStand = !g.displayStand)
767
+ }, null, 8, ["label", "append-icon", "aria-expanded"]),
768
+ t("span", dl, u(a(ye)(o.value.dineIn.displayStand.submitOrderInstruction) ? a(e)("order.messagesCustom") : a(e)("order.messagesDefault")), 1)
769
+ ]),
770
+ A(t("div", il, [
771
+ t("span", ul, u(a(e)("order.submitOrderInstruction")), 1),
772
+ i(O, {
773
+ modelValue: o.value.dineIn.displayStand.submitOrderInstruction.payAtCounter,
774
+ "onUpdate:modelValue": s[11] || (s[11] = (l) => o.value.dineIn.displayStand.submitOrderInstruction.payAtCounter = l),
775
+ label: a(e)("order.payAtCounter"),
776
+ placeholder: "Collect your transaction slip below and present it to the cashier"
777
+ }, null, 8, ["modelValue", "label"]),
778
+ i(O, {
779
+ modelValue: o.value.dineIn.displayStand.submitOrderInstruction.paid,
780
+ "onUpdate:modelValue": s[12] || (s[12] = (l) => o.value.dineIn.displayStand.submitOrderInstruction.paid = l),
781
+ label: a(e)("order.paid"),
782
+ placeholder: "Please collect your receipt and we'll bring your food to your table once it's ready."
783
+ }, null, 8, ["modelValue", "label"])
784
+ ], 512), [
785
+ [U, g.displayStand]
786
+ ])
787
+ ], 512), [
788
+ [U, o.value.dineIn.displayStand.enabled]
789
+ ])
790
+ ])
791
+ ], 512), [
792
+ [U, o.value.dineIn.enabled]
793
+ ])
794
+ ]),
795
+ t("div", cl, [
796
+ t("span", pl, u(a(e)("order.takeawayTitle")), 1),
797
+ i(f, {
798
+ modelValue: o.value.takeaway.enabled,
799
+ "onUpdate:modelValue": s[13] || (s[13] = (l) => o.value.takeaway.enabled = l),
800
+ label: a(e)("order.takeawaySwitch"),
801
+ "label-placement": "right"
802
+ }, null, 8, ["modelValue", "label"]),
803
+ A(t("div", ml, [
804
+ t("div", yl, [
805
+ i(w, {
806
+ class: "-ml-[12px]",
807
+ variant: "tertiary",
808
+ size: "md",
809
+ label: a(e)("order.customiseMessages"),
810
+ "append-icon": g.takeaway ? "expand_less" : "expand_more",
811
+ "aria-expanded": g.takeaway,
812
+ onClick: s[14] || (s[14] = (l) => g.takeaway = !g.takeaway)
813
+ }, null, 8, ["label", "append-icon", "aria-expanded"]),
814
+ t("span", fl, u(a(ye)(o.value.takeaway.submitOrderInstruction) ? a(e)("order.messagesCustom") : a(e)("order.messagesDefault")), 1)
815
+ ]),
816
+ A(t("div", vl, [
817
+ t("span", bl, u(a(e)("order.submitOrderInstruction")), 1),
818
+ i(O, {
819
+ modelValue: o.value.takeaway.submitOrderInstruction.payAtCounter,
820
+ "onUpdate:modelValue": s[15] || (s[15] = (l) => o.value.takeaway.submitOrderInstruction.payAtCounter = l),
821
+ label: a(e)("order.payAtCounter"),
822
+ placeholder: "Collect your transaction slip below and present it to the cashier"
823
+ }, null, 8, ["modelValue", "label"]),
824
+ i(O, {
825
+ modelValue: o.value.takeaway.submitOrderInstruction.paid,
826
+ "onUpdate:modelValue": s[16] || (s[16] = (l) => o.value.takeaway.submitOrderInstruction.paid = l),
827
+ label: a(e)("order.paid"),
828
+ placeholder: "Please wait as we prepare your food. We'll call your number when it's ready."
829
+ }, null, 8, ["modelValue", "label"])
830
+ ], 512), [
831
+ [U, g.takeaway]
832
+ ])
833
+ ], 512), [
834
+ [U, o.value.takeaway.enabled]
835
+ ])
836
+ ]),
837
+ t("div", gl, [
838
+ t("span", xl, u(a(e)("order.kioskOrderNumber")), 1),
839
+ i(O, {
840
+ modelValue: o.value.dineIn.sequenceNumber.prefix,
841
+ "onUpdate:modelValue": s[17] || (s[17] = (l) => o.value.dineIn.sequenceNumber.prefix = l),
842
+ class: "max-w-[360px]",
843
+ label: a(e)("order.kioskOrderNumberPrefix"),
844
+ placeholder: "#K",
845
+ "helper-text": a(e)("order.kioskOrderNumberHint")
846
+ }, null, 8, ["modelValue", "label", "helper-text"]),
847
+ i(f, {
848
+ modelValue: o.value.shareNumber,
849
+ "onUpdate:modelValue": s[18] || (s[18] = (l) => o.value.shareNumber = l),
850
+ label: a(e)("order.kioskShareNumber"),
851
+ sublabel: a(e)("order.kioskShareNumberSublabel"),
852
+ "label-placement": "right"
853
+ }, null, 8, ["modelValue", "label", "sublabel"])
854
+ ]),
855
+ t("div", _l, [
856
+ t("span", hl, u(a(e)("order.displayPaxDialogTitle")), 1),
857
+ i(f, {
858
+ modelValue: he.value,
859
+ "onUpdate:modelValue": s[19] || (s[19] = (l) => he.value = l),
860
+ label: a(e)("order.displayPaxDialogDescription"),
861
+ sublabel: a(e)("order.paxDialogTabletNote"),
862
+ "label-placement": "right"
863
+ }, null, 8, ["modelValue", "label", "sublabel"])
864
+ ]),
865
+ t("div", Sl, [
866
+ t("span", kl, u(a(e)("order.menuItem")), 1),
867
+ i(f, {
868
+ modelValue: o.value.menuItem.showAllOnly,
869
+ "onUpdate:modelValue": s[20] || (s[20] = (l) => o.value.menuItem.showAllOnly = l),
870
+ label: a(e)("order.showNotAvailableMenuItem"),
871
+ "label-placement": "right"
872
+ }, null, 8, ["modelValue", "label"])
873
+ ]),
874
+ t("div", Il, [
875
+ t("span", wl, u(a(e)("order.minWeighGrams")), 1),
876
+ t("div", null, [
877
+ i(ee, {
878
+ modelValue: xe.value,
879
+ "onUpdate:modelValue": s[21] || (s[21] = (l) => xe.value = l),
880
+ class: "max-w-[240px]",
881
+ label: a(e)("order.minWeighGramsLabel"),
882
+ min: 1,
883
+ max: a(Ge),
884
+ placeholder: a(e)("order.minWeighGramsPlaceholder")
885
+ }, null, 8, ["modelValue", "label", "max", "placeholder"]),
886
+ t("span", Cl, u(a(e)("order.minWeighGramsHint")), 1)
887
+ ])
888
+ ])
889
+ ], 512), [
890
+ [U, y.value === "ordering"]
891
+ ]),
892
+ A(t("section", Pl, [
893
+ t("div", Vl, [
894
+ t("h2", Tl, u(a(e)("order.settingsSectionLook")), 1),
895
+ t("p", Al, u(a(e)("order.settingsSectionLookHint")), 1)
896
+ ]),
897
+ t("div", Ul, [
898
+ t("span", Rl, u(a(e)("order.kioskLanguage")), 1),
899
+ t("span", El, u(a(e)("order.kioskLanguageHint")), 1),
900
+ i(f, {
901
+ "model-value": H.value,
902
+ label: a(e)("order.kioskLanguageRestrict"),
903
+ sublabel: a(e)("order.kioskLanguageRestrictSublabel"),
904
+ "label-placement": "right",
905
+ "onUpdate:modelValue": m
906
+ }, null, 8, ["model-value", "label", "sublabel"]),
907
+ A(t("div", Fl, [
908
+ (k(!0), V(B, null, j(a(K), (l) => (k(), de(ea, {
909
+ key: l.code,
910
+ "model-value": x.value.includes(l.code),
911
+ value: l.code,
912
+ label: l.label,
913
+ "onUpdate:modelValue": ($) => q(l.code, $)
914
+ }, null, 8, ["model-value", "value", "label", "onUpdate:modelValue"]))), 128))
915
+ ], 512), [
916
+ [U, H.value]
917
+ ]),
918
+ H.value && x.value.length === 0 ? (k(), V("span", Nl, u(a(e)("order.kioskLanguageAtLeastOne")), 1)) : D("", !0)
919
+ ]),
920
+ t("div", Ol, [
921
+ t("span", Ll, u(a(e)("order.coverImage")), 1),
922
+ t("span", $l, u(a(e)("order.coverImageFallbackHint")), 1),
923
+ t("div", Ml, [
924
+ (k(), V(B, null, j(be, (l) => t("div", {
925
+ key: `cover-preview-${l.value}`,
926
+ class: "flex flex-col gap-8"
927
+ }, [
928
+ t("span", Dl, u(a(e)(l.labelKey)) + " · " + u(a(e)("order.coverImageCount", {
929
+ count: N(l.value).length,
930
+ max: a(le)
931
+ })), 1),
932
+ t("div", Wl, [
933
+ (k(!0), V(B, null, j(N(l.value).slice(0, 4), ($, F) => (k(), V("img", {
934
+ key: `cover-preview-${l.value}-${F}`,
935
+ src: $,
936
+ alt: `${a(e)(l.labelKey)} ${F + 1}`,
937
+ class: ae([l.thumbClass, "object-cover rounded-md border border-fm-color-neutral-gray-200"])
938
+ }, null, 10, Gl))), 128)),
939
+ N(l.value).length === 0 ? (k(), V("div", {
940
+ key: 0,
941
+ role: "img",
942
+ "aria-label": a(e)("order.coverNoImage"),
943
+ class: ae([l.thumbClass, "rounded-md border border-dashed border-fm-color-neutral-gray-400"])
944
+ }, null, 10, Yl)) : D("", !0)
945
+ ])
946
+ ])), 64)),
947
+ i(w, {
948
+ variant: "secondary",
949
+ size: "md",
950
+ "prepend-icon": "edit",
951
+ label: a(e)("order.changeCovers"),
952
+ onClick: s[22] || (s[22] = (l) => T.value = !0)
953
+ }, null, 8, ["label"])
954
+ ])
955
+ ])
956
+ ], 512), [
957
+ [U, y.value === "look"]
958
+ ]),
959
+ A(t("section", zl, [
960
+ t("div", Bl, [
961
+ t("h2", jl, u(a(e)("order.settingsSectionPayment")), 1),
962
+ t("p", Kl, u(a(e)("order.settingsSectionPaymentHint")), 1)
963
+ ]),
964
+ i(xa, {
965
+ "payment-types": o.value.paymentSetting.paymentTypes ?? [],
966
+ "allow-credit": !0,
967
+ "allow-e-payment": Je.value,
968
+ "offline-payment-types": o.value.paymentSetting.offlinePaymentTypes ?? [],
969
+ ePaymentTypes: o.value.paymentSetting.ePaymentTypes ?? {},
970
+ "onUpdate:paymentTypes": Be,
971
+ "onUpdate:offlinePaymentTypes": s[23] || (s[23] = (l) => o.value.paymentSetting.offlinePaymentTypes = l),
972
+ "onUpdate:ePaymentTypes": je
973
+ }, null, 8, ["payment-types", "allow-e-payment", "offline-payment-types", "ePaymentTypes"]),
974
+ D("", !0)
975
+ ], 512), [
976
+ [U, y.value === "payment"]
977
+ ]),
978
+ v.value ? A((k(), V("section", Hl, [
979
+ t("div", ql, [
980
+ t("h2", Ql, u(a(e)("order.settingsSectionUpdates")), 1),
981
+ t("p", Xl, u(a(e)("order.settingsSectionUpdatesHint")), 1)
982
+ ]),
983
+ t("div", Jl, [
984
+ i(O, {
985
+ modelValue: o.value.otaChannel,
986
+ "onUpdate:modelValue": s[25] || (s[25] = (l) => o.value.otaChannel = l),
987
+ label: a(e)("order.otaChannel")
988
+ }, null, 8, ["modelValue", "label"]),
989
+ t("span", Zl, u(a(e)("order.otaChannelHint")), 1)
990
+ ])
991
+ ], 512)), [
992
+ [U, y.value === "updates"]
993
+ ]) : D("", !0)
994
+ ]),
995
+ i(la, {
996
+ modelValue: T.value,
997
+ "onUpdate:modelValue": s[28] || (s[28] = (l) => T.value = l),
998
+ "max-width": 800
999
+ }, {
1000
+ "dialog-header": L(() => [
1001
+ t("div", et, u(a(e)("order.coverImage")), 1)
1002
+ ]),
1003
+ "dialog-footer": L(() => [
1004
+ t("div", pt, [
1005
+ t("span", mt, u(a(e)("order.coverDialogNote")), 1),
1006
+ i(w, {
1007
+ variant: "primary",
1008
+ label: a(e)("order.done"),
1009
+ onClick: s[27] || (s[27] = (l) => T.value = !1)
1010
+ }, null, 8, ["label"])
1011
+ ])
1012
+ ]),
1013
+ default: L(() => [
1014
+ t("div", at, [
1015
+ t("span", lt, u(a(e)("order.coverCarouselHint", { max: a(le) })), 1),
1016
+ (k(), V(B, null, j(be, (l) => t("div", {
1017
+ key: l.value,
1018
+ class: "border p-16 fm-corner-radius-lg flex flex-col gap-8"
1019
+ }, [
1020
+ t("span", tt, u(a(e)(l.labelKey)), 1),
1021
+ t("span", nt, u(a(e)(l.hintKey)), 1),
1022
+ t("div", ot, [
1023
+ (k(!0), V(B, null, j(N(l.value), ($, F) => (k(), V("div", {
1024
+ key: `${l.value}-${F}-${$}`,
1025
+ class: "flex flex-col gap-2"
1026
+ }, [
1027
+ t("div", st, [
1028
+ t("img", {
1029
+ src: $,
1030
+ alt: `${a(e)(l.labelKey)} ${F + 1}`,
1031
+ class: ae([
1032
+ l.previewClass,
1033
+ "object-cover rounded-md border border-fm-color-neutral-gray-200"
1034
+ ])
1035
+ }, null, 10, rt),
1036
+ t("span", dt, u(F + 1), 1)
1037
+ ]),
1038
+ t("div", it, [
1039
+ i(w, {
1040
+ variant: "tertiary",
1041
+ size: "md",
1042
+ "prepend-icon": "arrow_back",
1043
+ disabled: F === 0,
1044
+ "aria-label": a(e)("order.coverCarouselMoveEarlier"),
1045
+ onClick: (we) => ge(l.value, F, F - 1)
1046
+ }, null, 8, ["disabled", "aria-label", "onClick"]),
1047
+ i(w, {
1048
+ variant: "tertiary",
1049
+ size: "md",
1050
+ "prepend-icon": "arrow_forward",
1051
+ disabled: F === N(l.value).length - 1,
1052
+ "aria-label": a(e)("order.coverCarouselMoveLater"),
1053
+ onClick: (we) => ge(l.value, F, F + 1)
1054
+ }, null, 8, ["disabled", "aria-label", "onClick"]),
1055
+ i(w, {
1056
+ variant: "tertiary",
1057
+ size: "md",
1058
+ "prepend-icon": "delete",
1059
+ "aria-label": a(e)("common.delete"),
1060
+ onClick: (we) => qe(l.value, F)
1061
+ }, null, 8, ["aria-label", "onClick"])
1062
+ ])
1063
+ ]))), 128)),
1064
+ N(l.value).length < a(le) ? (k(), de(aa, {
1065
+ key: 0,
1066
+ accept: "image/*",
1067
+ "max-file-size": vt,
1068
+ "content-class": l.dropClass,
1069
+ onFileUpload: ($) => Qe(l.value, $),
1070
+ onFileRejected: ($) => Xe(l.value, $)
1071
+ }, null, 8, ["content-class", "onFileUpload", "onFileRejected"])) : D("", !0)
1072
+ ])
1073
+ ])), 64)),
1074
+ He.value ? (k(), V("div", ut, [
1075
+ i(ee, {
1076
+ modelValue: _e.value,
1077
+ "onUpdate:modelValue": s[26] || (s[26] = (l) => _e.value = l),
1078
+ class: "max-w-[240px]",
1079
+ label: a(e)("order.coverCarouselInterval"),
1080
+ min: a(Le),
1081
+ max: a($e),
1082
+ placeholder: String(a(Ue))
1083
+ }, null, 8, ["modelValue", "label", "min", "max", "placeholder"]),
1084
+ t("span", ct, u(a(e)("order.coverCarouselIntervalHint", { seconds: a(Ue) })), 1)
1085
+ ])) : D("", !0)
1086
+ ])
1087
+ ]),
1088
+ _: 1
1089
+ }, 8, ["modelValue"]),
1090
+ t("div", {
1091
+ ref_key: "saveBar",
1092
+ ref: oe,
1093
+ class: "fixed bottom-0 z-[1] px-24 py-12 bg-fm-color-neutral-white border-t border-fm-color-neutral-gray-200 flex flex-row items-center justify-between gap-12 xs:flex-col xs:items-stretch",
1094
+ style: Pe(ke.value),
1095
+ "data-testid": "kiosk-settings-save-bar"
1096
+ }, [
1097
+ t("span", {
1098
+ class: ae(["fm-typo-en-body-md-600", J.value ? "text-fm-color-typo-primary" : "text-fm-color-typo-secondary"])
1099
+ }, u(J.value ? a(e)("order.unsavedChanges") : a(e)("order.allChangesSaved")), 3),
1100
+ t("div", yt, [
1101
+ i(w, {
1102
+ class: "xs:flex-1",
1103
+ variant: "tertiary",
1104
+ label: a(e)("order.discardChanges"),
1105
+ disabled: !J.value || Z.value,
1106
+ onClick: Se
1107
+ }, null, 8, ["label", "disabled"]),
1108
+ i(w, {
1109
+ class: "xs:flex-1",
1110
+ variant: "primary",
1111
+ label: a(e)("order.updateSetting"),
1112
+ disabled: !J.value || Z.value,
1113
+ loading: Z.value,
1114
+ onClick: Ze
1115
+ }, null, 8, ["label", "disabled", "loading"])
1116
+ ])
1117
+ ], 4)
1118
+ ], 4)) : (k(), V("div", ft, u(a(e)("order.pleaseSelectRestaurant")), 1));
1119
+ };
1120
+ }
1121
+ });
1122
+ export {
1123
+ It as default
1124
+ };