@burdenoff/microfe-kadaikodi 2026.719.2 → 2026.719.3
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.
- package/dist/kadaikodi/hooks/useKadaikodiApi.d.ts +36 -0
- package/dist/kadaikodi/hooks/useKadaikodiApi.d.ts.map +1 -1
- package/dist/kadaikodi/hooks/useKadaikodiApi.js +130 -18
- package/dist/kadaikodi/hooks/useKadaikodiApi.js.map +1 -1
- package/dist/kadaikodi/pages/customer/CheckoutPage.d.ts.map +1 -1
- package/dist/kadaikodi/pages/customer/CheckoutPage.js +235 -219
- package/dist/kadaikodi/pages/customer/CheckoutPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/PaymentMethodsPage.d.ts +4 -0
- package/dist/kadaikodi/pages/customer/PaymentMethodsPage.d.ts.map +1 -1
- package/dist/kadaikodi/pages/customer/PaymentMethodsPage.js +209 -192
- package/dist/kadaikodi/pages/customer/PaymentMethodsPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/SavedAddressesPage.d.ts +3 -1
- package/dist/kadaikodi/pages/customer/SavedAddressesPage.d.ts.map +1 -1
- package/dist/kadaikodi/pages/customer/SavedAddressesPage.js +195 -173
- package/dist/kadaikodi/pages/customer/SavedAddressesPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/shared.d.ts +1 -2
- package/dist/kadaikodi/pages/customer/shared.d.ts.map +1 -1
- package/dist/kadaikodi/pages/customer/shared.js +15 -37
- package/dist/kadaikodi/pages/customer/shared.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,133 +1,149 @@
|
|
|
1
1
|
import { useKadaikodi as e } from "../../context/KadaikodiContext.js";
|
|
2
2
|
import { cn as t } from "../../utils/cn.js";
|
|
3
3
|
import { PageLayout as n } from "../../components/PageLayout.js";
|
|
4
|
-
import {
|
|
5
|
-
import { formatCurrency as
|
|
6
|
-
import { SegmentedTabs as
|
|
4
|
+
import { useMyAddresses as r, useMyPaymentMethods as i, useOrders as a, usePlaceOrder as o } from "../../hooks/useKadaikodiApi.js";
|
|
5
|
+
import { formatCurrency as s } from "../../utils/formatters.js";
|
|
6
|
+
import { SegmentedTabs as c } from "../../components/viz/SegmentedTabs.js";
|
|
7
7
|
import "../../components/viz/index.js";
|
|
8
|
-
import { ProviderImage as
|
|
9
|
-
import { useMemo as
|
|
10
|
-
import { AlertCircle as
|
|
11
|
-
import { jsx as
|
|
12
|
-
import { GlassCard as
|
|
8
|
+
import { ProviderImage as l } from "./shared.js";
|
|
9
|
+
import { useEffect as u, useMemo as d, useState as f } from "react";
|
|
10
|
+
import { AlertCircle as ee, ArrowLeft as te, Banknote as p, CheckCircle2 as m, CreditCard as h, Heart as g, Loader2 as _, MapPin as v, ShoppingBag as y, Smartphone as b, Wallet as x } from "lucide-react";
|
|
11
|
+
import { jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
12
|
+
import { GlassCard as w, PagePurpose as T } from "@burdenoff/fe-libs/ui";
|
|
13
13
|
//#region src/kadaikodi/pages/customer/CheckoutPage.tsx
|
|
14
|
-
var
|
|
14
|
+
var E = [
|
|
15
15
|
{
|
|
16
16
|
id: "cash",
|
|
17
17
|
label: "Cash on Delivery",
|
|
18
|
-
icon:
|
|
18
|
+
icon: p,
|
|
19
19
|
description: "Pay when you receive"
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
22
|
id: "card",
|
|
23
23
|
label: "Credit / Debit Card",
|
|
24
|
-
icon:
|
|
24
|
+
icon: h,
|
|
25
25
|
description: "Visa, Mastercard, RuPay"
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
28
|
id: "upi",
|
|
29
29
|
label: "UPI",
|
|
30
|
-
icon:
|
|
30
|
+
icon: b,
|
|
31
31
|
description: "Google Pay, PhonePe, Paytm"
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
34
|
id: "wallet",
|
|
35
35
|
label: "Digital Wallet",
|
|
36
|
-
icon:
|
|
36
|
+
icon: x,
|
|
37
37
|
description: "Kadaikodi Wallet Balance"
|
|
38
38
|
}
|
|
39
|
-
],
|
|
39
|
+
], D = [
|
|
40
40
|
0,
|
|
41
41
|
10,
|
|
42
42
|
20,
|
|
43
43
|
30
|
|
44
44
|
];
|
|
45
|
-
function
|
|
46
|
-
let { navigateTo:
|
|
45
|
+
function O() {
|
|
46
|
+
let { navigateTo: p, currentUser: b } = e(), { data: x = [], isLoading: O } = a({ customerId: b?.id }), k = o(), { data: A = [] } = r(), { data: j = [] } = i(), M = d(() => x.find((e) => e.status === "pending") || x[0], [x]), [N, P] = f({
|
|
47
47
|
addressLine1: "",
|
|
48
48
|
addressLine2: "",
|
|
49
49
|
city: "",
|
|
50
50
|
state: "",
|
|
51
51
|
pincode: ""
|
|
52
|
-
}), [
|
|
52
|
+
}), [F, I] = f("delivery"), [L, R] = f("cash"), [z, B] = f({
|
|
53
53
|
cardNumber: "",
|
|
54
54
|
expiryDate: "",
|
|
55
55
|
cvv: "",
|
|
56
56
|
upiId: ""
|
|
57
|
-
}), [
|
|
58
|
-
|
|
57
|
+
}), [V, H] = f(0), [U, W] = f(""), [G, K] = f(""), [ne, re] = f(!1), [q, J] = f(!1), [Y, X] = f(!1);
|
|
58
|
+
u(() => {
|
|
59
|
+
if (q || A.length === 0) return;
|
|
60
|
+
let e = A.find((e) => e.isDefault) ?? A[0];
|
|
61
|
+
e && (P({
|
|
62
|
+
addressLine1: e.addressLine1,
|
|
63
|
+
addressLine2: e.addressLine2 ?? "",
|
|
64
|
+
city: e.city,
|
|
65
|
+
state: e.state,
|
|
66
|
+
pincode: e.zipCode
|
|
67
|
+
}), J(!0));
|
|
68
|
+
}, [A, q]), u(() => {
|
|
69
|
+
if (Y || j.length === 0) return;
|
|
70
|
+
let e = j.find((e) => e.isDefault) ?? j[0];
|
|
71
|
+
e && (e.type === "CARD" ? R("card") : e.type === "UPI" && R("upi"), X(!0));
|
|
72
|
+
}, [j, Y]);
|
|
73
|
+
let Z = d(() => {
|
|
74
|
+
if (!M) return {
|
|
59
75
|
subtotal: 0,
|
|
60
76
|
deliveryFee: 0,
|
|
61
77
|
tax: 0,
|
|
62
78
|
total: 0
|
|
63
79
|
};
|
|
64
|
-
let e =
|
|
80
|
+
let e = M.subtotal, t = F === "delivery" ? M.deliveryFee : 0, n = M.taxes, r = M.discount ?? 0;
|
|
65
81
|
return {
|
|
66
82
|
subtotal: e,
|
|
67
83
|
deliveryFee: t,
|
|
68
84
|
tax: n,
|
|
69
85
|
discount: r,
|
|
70
|
-
total: e + t + n +
|
|
86
|
+
total: e + t + n + V - r
|
|
71
87
|
};
|
|
72
88
|
}, [
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
]),
|
|
77
|
-
|
|
89
|
+
M,
|
|
90
|
+
V,
|
|
91
|
+
F
|
|
92
|
+
]), ie = d(() => M ? M.items.reduce((e, t) => e + t.quantity, 0) : 0, [M]), Q = (e, t) => {
|
|
93
|
+
P((n) => ({
|
|
78
94
|
...n,
|
|
79
95
|
[e]: t
|
|
80
96
|
}));
|
|
81
|
-
},
|
|
82
|
-
|
|
97
|
+
}, $ = (e, t) => {
|
|
98
|
+
B((n) => ({
|
|
83
99
|
...n,
|
|
84
100
|
[e]: t
|
|
85
101
|
}));
|
|
86
|
-
},
|
|
87
|
-
if (
|
|
88
|
-
if (!
|
|
89
|
-
if (!
|
|
102
|
+
}, ae = () => {
|
|
103
|
+
if (F === "delivery") {
|
|
104
|
+
if (!N.addressLine1.trim()) return alert("Please enter delivery address"), !1;
|
|
105
|
+
if (!N.pincode.trim() || N.pincode.length !== 6) return alert("Please enter a valid 6-digit pincode"), !1;
|
|
90
106
|
}
|
|
91
|
-
if (
|
|
92
|
-
if (!
|
|
93
|
-
if (!
|
|
94
|
-
if (!
|
|
107
|
+
if (L === "card") {
|
|
108
|
+
if (!z.cardNumber || z.cardNumber.length < 16) return alert("Please enter a valid 16-digit card number"), !1;
|
|
109
|
+
if (!z.expiryDate) return alert("Please enter card expiry date"), !1;
|
|
110
|
+
if (!z.cvv || z.cvv.length < 3) return alert("Please enter a valid 3-digit CVV"), !1;
|
|
95
111
|
}
|
|
96
|
-
return
|
|
112
|
+
return L === "upi" && !z.upiId.trim() ? (alert("Please enter UPI ID"), !1) : L === "wallet" ? (alert("Digital wallet integration is coming soon. Please choose another payment method."), !1) : !0;
|
|
97
113
|
};
|
|
98
|
-
return
|
|
114
|
+
return O ? /* @__PURE__ */ S(n, {
|
|
99
115
|
title: "Checkout",
|
|
100
|
-
children: /* @__PURE__ */
|
|
116
|
+
children: /* @__PURE__ */ S("div", {
|
|
101
117
|
className: "flex h-[60vh] items-center justify-center",
|
|
102
|
-
children: /* @__PURE__ */
|
|
118
|
+
children: /* @__PURE__ */ S(_, { className: "h-8 w-8 animate-spin text-primary" })
|
|
103
119
|
})
|
|
104
|
-
}) :
|
|
105
|
-
title: /* @__PURE__ */
|
|
120
|
+
}) : M ? /* @__PURE__ */ C(n, {
|
|
121
|
+
title: /* @__PURE__ */ C("div", {
|
|
106
122
|
className: "flex items-center gap-3",
|
|
107
|
-
children: [/* @__PURE__ */
|
|
123
|
+
children: [/* @__PURE__ */ S("button", {
|
|
108
124
|
type: "button",
|
|
109
|
-
onClick: () =>
|
|
125
|
+
onClick: () => p("/customer/discover"),
|
|
110
126
|
className: "rounded-md p-1 text-text-secondary hover:bg-accent hover:text-text-primary transition-colors",
|
|
111
|
-
children: /* @__PURE__ */
|
|
112
|
-
}), /* @__PURE__ */
|
|
127
|
+
children: /* @__PURE__ */ S(te, { className: "h-5 w-5" })
|
|
128
|
+
}), /* @__PURE__ */ S("span", { children: "Checkout" })]
|
|
113
129
|
}),
|
|
114
130
|
description: "Review your order and complete payment",
|
|
115
|
-
children: [/* @__PURE__ */
|
|
131
|
+
children: [/* @__PURE__ */ S(T, {
|
|
116
132
|
className: "mb-6",
|
|
117
133
|
children: "The last step before your food is on its way — confirm where it's going, pick how you'd like to pay, add a tip or special instructions, and review the total. Everything checks out? Place your order from the summary on the right."
|
|
118
|
-
}), /* @__PURE__ */
|
|
134
|
+
}), /* @__PURE__ */ C("div", {
|
|
119
135
|
className: "grid grid-cols-1 gap-6 lg:grid-cols-3",
|
|
120
|
-
children: [/* @__PURE__ */
|
|
136
|
+
children: [/* @__PURE__ */ C("div", {
|
|
121
137
|
className: "lg:col-span-2 space-y-6",
|
|
122
138
|
children: [
|
|
123
|
-
/* @__PURE__ */
|
|
139
|
+
/* @__PURE__ */ C("section", {
|
|
124
140
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-5",
|
|
125
141
|
children: [
|
|
126
|
-
/* @__PURE__ */
|
|
142
|
+
/* @__PURE__ */ S("h2", {
|
|
127
143
|
className: "text-base font-semibold text-text-primary mb-4",
|
|
128
144
|
children: "Fulfilment"
|
|
129
145
|
}),
|
|
130
|
-
/* @__PURE__ */
|
|
146
|
+
/* @__PURE__ */ S(c, {
|
|
131
147
|
fill: !0,
|
|
132
148
|
"aria-label": "Fulfilment method",
|
|
133
149
|
tabs: [
|
|
@@ -144,414 +160,414 @@ function D() {
|
|
|
144
160
|
label: "On-location"
|
|
145
161
|
}
|
|
146
162
|
],
|
|
147
|
-
value:
|
|
148
|
-
onChange: (e) =>
|
|
163
|
+
value: F,
|
|
164
|
+
onChange: (e) => I(e)
|
|
149
165
|
}),
|
|
150
|
-
/* @__PURE__ */
|
|
166
|
+
/* @__PURE__ */ S("p", {
|
|
151
167
|
className: "mt-3 text-xs text-text-secondary",
|
|
152
|
-
children:
|
|
168
|
+
children: F === "delivery" ? "A delivery partner brings your order to the address below." : F === "pickup" ? "Collect your order from the cart — no delivery fee." : "The cart serves you at your location — no delivery fee."
|
|
153
169
|
})
|
|
154
170
|
]
|
|
155
171
|
}),
|
|
156
|
-
|
|
172
|
+
F === "delivery" && /* @__PURE__ */ C("section", {
|
|
157
173
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-5",
|
|
158
|
-
children: [/* @__PURE__ */
|
|
174
|
+
children: [/* @__PURE__ */ C("h2", {
|
|
159
175
|
className: "text-base font-semibold text-text-primary mb-4 flex items-center gap-2",
|
|
160
|
-
children: [/* @__PURE__ */
|
|
161
|
-
}), /* @__PURE__ */
|
|
176
|
+
children: [/* @__PURE__ */ S(v, { className: "h-4 w-4 text-text-secondary" }), "Delivery Address"]
|
|
177
|
+
}), /* @__PURE__ */ C("div", {
|
|
162
178
|
className: "space-y-4",
|
|
163
179
|
children: [
|
|
164
|
-
/* @__PURE__ */
|
|
180
|
+
/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ C("label", {
|
|
165
181
|
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
166
|
-
children: ["Address Line 1 ", /* @__PURE__ */
|
|
182
|
+
children: ["Address Line 1 ", /* @__PURE__ */ S("span", {
|
|
167
183
|
className: "text-status-error-text",
|
|
168
184
|
children: "*"
|
|
169
185
|
})]
|
|
170
|
-
}), /* @__PURE__ */
|
|
186
|
+
}), /* @__PURE__ */ S("input", {
|
|
171
187
|
type: "text",
|
|
172
188
|
placeholder: "Building, Street, Area",
|
|
173
|
-
value:
|
|
174
|
-
onChange: (e) =>
|
|
189
|
+
value: N.addressLine1,
|
|
190
|
+
onChange: (e) => Q("addressLine1", e.target.value),
|
|
175
191
|
className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
176
192
|
})] }),
|
|
177
|
-
/* @__PURE__ */
|
|
193
|
+
/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
|
|
178
194
|
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
179
195
|
children: "Address Line 2"
|
|
180
|
-
}), /* @__PURE__ */
|
|
196
|
+
}), /* @__PURE__ */ S("input", {
|
|
181
197
|
type: "text",
|
|
182
198
|
placeholder: "Apartment, Suite, Floor (Optional)",
|
|
183
|
-
value:
|
|
184
|
-
onChange: (e) =>
|
|
199
|
+
value: N.addressLine2,
|
|
200
|
+
onChange: (e) => Q("addressLine2", e.target.value),
|
|
185
201
|
className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
186
202
|
})] }),
|
|
187
|
-
/* @__PURE__ */
|
|
203
|
+
/* @__PURE__ */ C("div", {
|
|
188
204
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
|
|
189
|
-
children: [/* @__PURE__ */
|
|
205
|
+
children: [/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ C("label", {
|
|
190
206
|
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
191
|
-
children: ["City ", /* @__PURE__ */
|
|
207
|
+
children: ["City ", /* @__PURE__ */ S("span", {
|
|
192
208
|
className: "text-status-error-text",
|
|
193
209
|
children: "*"
|
|
194
210
|
})]
|
|
195
|
-
}), /* @__PURE__ */
|
|
211
|
+
}), /* @__PURE__ */ S("input", {
|
|
196
212
|
type: "text",
|
|
197
213
|
placeholder: "City",
|
|
198
|
-
value:
|
|
199
|
-
onChange: (e) =>
|
|
214
|
+
value: N.city,
|
|
215
|
+
onChange: (e) => Q("city", e.target.value),
|
|
200
216
|
className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
201
|
-
})] }), /* @__PURE__ */
|
|
217
|
+
})] }), /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ C("label", {
|
|
202
218
|
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
203
|
-
children: ["State ", /* @__PURE__ */
|
|
219
|
+
children: ["State ", /* @__PURE__ */ S("span", {
|
|
204
220
|
className: "text-status-error-text",
|
|
205
221
|
children: "*"
|
|
206
222
|
})]
|
|
207
|
-
}), /* @__PURE__ */
|
|
223
|
+
}), /* @__PURE__ */ S("input", {
|
|
208
224
|
type: "text",
|
|
209
225
|
placeholder: "State",
|
|
210
|
-
value:
|
|
211
|
-
onChange: (e) =>
|
|
226
|
+
value: N.state,
|
|
227
|
+
onChange: (e) => Q("state", e.target.value),
|
|
212
228
|
className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
213
229
|
})] })]
|
|
214
230
|
}),
|
|
215
|
-
/* @__PURE__ */
|
|
231
|
+
/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ C("label", {
|
|
216
232
|
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
217
|
-
children: ["Pincode ", /* @__PURE__ */
|
|
233
|
+
children: ["Pincode ", /* @__PURE__ */ S("span", {
|
|
218
234
|
className: "text-status-error-text",
|
|
219
235
|
children: "*"
|
|
220
236
|
})]
|
|
221
|
-
}), /* @__PURE__ */
|
|
237
|
+
}), /* @__PURE__ */ S("input", {
|
|
222
238
|
type: "text",
|
|
223
239
|
placeholder: "560001",
|
|
224
240
|
maxLength: 6,
|
|
225
|
-
value:
|
|
226
|
-
onChange: (e) =>
|
|
241
|
+
value: N.pincode,
|
|
242
|
+
onChange: (e) => Q("pincode", e.target.value.replace(/\D/g, "")),
|
|
227
243
|
className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
228
244
|
})] })
|
|
229
245
|
]
|
|
230
246
|
})]
|
|
231
247
|
}),
|
|
232
|
-
/* @__PURE__ */
|
|
248
|
+
/* @__PURE__ */ C("section", {
|
|
233
249
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-5",
|
|
234
250
|
children: [
|
|
235
|
-
/* @__PURE__ */
|
|
251
|
+
/* @__PURE__ */ C("h2", {
|
|
236
252
|
className: "text-base font-semibold text-text-primary mb-4 flex items-center gap-2",
|
|
237
|
-
children: [/* @__PURE__ */
|
|
253
|
+
children: [/* @__PURE__ */ S(h, { className: "h-4 w-4 text-text-secondary" }), "Payment Method"]
|
|
238
254
|
}),
|
|
239
|
-
/* @__PURE__ */
|
|
255
|
+
/* @__PURE__ */ S("div", {
|
|
240
256
|
className: "space-y-2",
|
|
241
|
-
children:
|
|
257
|
+
children: E.map((e) => {
|
|
242
258
|
let n = e.icon;
|
|
243
|
-
return /* @__PURE__ */
|
|
259
|
+
return /* @__PURE__ */ C("button", {
|
|
244
260
|
type: "button",
|
|
245
|
-
onClick: () =>
|
|
246
|
-
className: t("flex w-full items-center gap-4 rounded-lg border p-3 transition-colors text-left",
|
|
261
|
+
onClick: () => R(e.id),
|
|
262
|
+
className: t("flex w-full items-center gap-4 rounded-lg border p-3 transition-colors text-left", L === e.id ? "border-foreground bg-accent" : "border-border-subtle bg-bg-surface hover:bg-accent"),
|
|
247
263
|
children: [
|
|
248
|
-
/* @__PURE__ */
|
|
264
|
+
/* @__PURE__ */ S("div", {
|
|
249
265
|
className: "flex h-9 w-9 shrink-0 items-center justify-center rounded-md bg-bg-sunken",
|
|
250
|
-
children: /* @__PURE__ */
|
|
266
|
+
children: /* @__PURE__ */ S(n, { className: "h-4 w-4 text-text-secondary" })
|
|
251
267
|
}),
|
|
252
|
-
/* @__PURE__ */
|
|
268
|
+
/* @__PURE__ */ C("div", {
|
|
253
269
|
className: "flex-1 min-w-0",
|
|
254
|
-
children: [/* @__PURE__ */
|
|
270
|
+
children: [/* @__PURE__ */ S("p", {
|
|
255
271
|
className: "text-sm font-medium text-text-primary",
|
|
256
272
|
children: e.label
|
|
257
|
-
}), /* @__PURE__ */
|
|
273
|
+
}), /* @__PURE__ */ S("p", {
|
|
258
274
|
className: "text-xs text-text-secondary",
|
|
259
275
|
children: e.description
|
|
260
276
|
})]
|
|
261
277
|
}),
|
|
262
|
-
|
|
278
|
+
L === e.id && /* @__PURE__ */ S(m, { className: "h-5 w-5 text-text-primary shrink-0" })
|
|
263
279
|
]
|
|
264
280
|
}, e.id);
|
|
265
281
|
})
|
|
266
282
|
}),
|
|
267
|
-
|
|
283
|
+
L === "card" && /* @__PURE__ */ C("div", {
|
|
268
284
|
className: "mt-4 space-y-4 border-t border-border-subtle pt-4",
|
|
269
|
-
children: [/* @__PURE__ */
|
|
285
|
+
children: [/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ C("label", {
|
|
270
286
|
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
271
|
-
children: ["Card Number ", /* @__PURE__ */
|
|
287
|
+
children: ["Card Number ", /* @__PURE__ */ S("span", {
|
|
272
288
|
className: "text-status-error-text",
|
|
273
289
|
children: "*"
|
|
274
290
|
})]
|
|
275
|
-
}), /* @__PURE__ */
|
|
291
|
+
}), /* @__PURE__ */ S("input", {
|
|
276
292
|
type: "text",
|
|
277
293
|
placeholder: "1234 5678 9012 3456",
|
|
278
294
|
maxLength: 16,
|
|
279
|
-
value:
|
|
280
|
-
onChange: (e) =>
|
|
295
|
+
value: z.cardNumber,
|
|
296
|
+
onChange: (e) => $("cardNumber", e.target.value.replace(/\D/g, "")),
|
|
281
297
|
className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
282
|
-
})] }), /* @__PURE__ */
|
|
298
|
+
})] }), /* @__PURE__ */ C("div", {
|
|
283
299
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
|
|
284
|
-
children: [/* @__PURE__ */
|
|
300
|
+
children: [/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ C("label", {
|
|
285
301
|
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
286
|
-
children: ["Expiry Date ", /* @__PURE__ */
|
|
302
|
+
children: ["Expiry Date ", /* @__PURE__ */ S("span", {
|
|
287
303
|
className: "text-status-error-text",
|
|
288
304
|
children: "*"
|
|
289
305
|
})]
|
|
290
|
-
}), /* @__PURE__ */
|
|
306
|
+
}), /* @__PURE__ */ S("input", {
|
|
291
307
|
type: "text",
|
|
292
308
|
placeholder: "MM/YY",
|
|
293
309
|
maxLength: 5,
|
|
294
|
-
value:
|
|
310
|
+
value: z.expiryDate,
|
|
295
311
|
onChange: (e) => {
|
|
296
312
|
let t = e.target.value.replace(/\D/g, "");
|
|
297
|
-
t.length >= 2 && (t = t.slice(0, 2) + "/" + t.slice(2, 4)),
|
|
313
|
+
t.length >= 2 && (t = t.slice(0, 2) + "/" + t.slice(2, 4)), $("expiryDate", t);
|
|
298
314
|
},
|
|
299
315
|
className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
300
|
-
})] }), /* @__PURE__ */
|
|
316
|
+
})] }), /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ C("label", {
|
|
301
317
|
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
302
|
-
children: ["CVV ", /* @__PURE__ */
|
|
318
|
+
children: ["CVV ", /* @__PURE__ */ S("span", {
|
|
303
319
|
className: "text-status-error-text",
|
|
304
320
|
children: "*"
|
|
305
321
|
})]
|
|
306
|
-
}), /* @__PURE__ */
|
|
322
|
+
}), /* @__PURE__ */ S("input", {
|
|
307
323
|
type: "text",
|
|
308
324
|
placeholder: "123",
|
|
309
325
|
maxLength: 3,
|
|
310
|
-
value:
|
|
311
|
-
onChange: (e) =>
|
|
326
|
+
value: z.cvv,
|
|
327
|
+
onChange: (e) => $("cvv", e.target.value.replace(/\D/g, "")),
|
|
312
328
|
className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
313
329
|
})] })]
|
|
314
330
|
})]
|
|
315
331
|
}),
|
|
316
|
-
|
|
332
|
+
L === "upi" && /* @__PURE__ */ C("div", {
|
|
317
333
|
className: "mt-4 border-t border-border-subtle pt-4",
|
|
318
|
-
children: [/* @__PURE__ */
|
|
334
|
+
children: [/* @__PURE__ */ C("label", {
|
|
319
335
|
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
320
|
-
children: ["UPI ID ", /* @__PURE__ */
|
|
336
|
+
children: ["UPI ID ", /* @__PURE__ */ S("span", {
|
|
321
337
|
className: "text-status-error-text",
|
|
322
338
|
children: "*"
|
|
323
339
|
})]
|
|
324
|
-
}), /* @__PURE__ */
|
|
340
|
+
}), /* @__PURE__ */ S("input", {
|
|
325
341
|
type: "text",
|
|
326
342
|
placeholder: "user@paytm",
|
|
327
|
-
value:
|
|
328
|
-
onChange: (e) =>
|
|
343
|
+
value: z.upiId,
|
|
344
|
+
onChange: (e) => $("upiId", e.target.value),
|
|
329
345
|
className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
330
346
|
})]
|
|
331
347
|
}),
|
|
332
|
-
|
|
348
|
+
L === "wallet" && /* @__PURE__ */ C("div", {
|
|
333
349
|
className: "mt-4 flex items-start gap-3 rounded-lg bg-[var(--color-accent-soft)] p-4 border border-border-focus/20",
|
|
334
|
-
children: [/* @__PURE__ */
|
|
350
|
+
children: [/* @__PURE__ */ S(ee, { className: "h-4 w-4 text-text-primary mt-0.5 shrink-0" }), /* @__PURE__ */ S("p", {
|
|
335
351
|
className: "text-sm text-text-primary",
|
|
336
352
|
children: "Digital wallet integration coming soon. Please choose another payment method."
|
|
337
353
|
})]
|
|
338
354
|
})
|
|
339
355
|
]
|
|
340
356
|
}),
|
|
341
|
-
/* @__PURE__ */
|
|
357
|
+
/* @__PURE__ */ C("section", {
|
|
342
358
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-5",
|
|
343
|
-
children: [/* @__PURE__ */
|
|
359
|
+
children: [/* @__PURE__ */ C("h2", {
|
|
344
360
|
className: "text-base font-semibold text-text-primary mb-4 flex items-center gap-2",
|
|
345
|
-
children: [/* @__PURE__ */
|
|
346
|
-
}), /* @__PURE__ */
|
|
361
|
+
children: [/* @__PURE__ */ S(g, { className: "h-4 w-4 text-text-secondary" }), "Additional Options"]
|
|
362
|
+
}), /* @__PURE__ */ C("div", {
|
|
347
363
|
className: "space-y-5",
|
|
348
|
-
children: [/* @__PURE__ */
|
|
349
|
-
/* @__PURE__ */
|
|
364
|
+
children: [/* @__PURE__ */ C("div", { children: [
|
|
365
|
+
/* @__PURE__ */ S("label", {
|
|
350
366
|
className: "block text-sm font-medium text-text-primary mb-2",
|
|
351
367
|
children: "Tip for delivery partner"
|
|
352
368
|
}),
|
|
353
|
-
/* @__PURE__ */
|
|
369
|
+
/* @__PURE__ */ S("div", {
|
|
354
370
|
className: "flex flex-wrap gap-2 mb-3",
|
|
355
|
-
children:
|
|
371
|
+
children: D.map((e) => /* @__PURE__ */ S("button", {
|
|
356
372
|
type: "button",
|
|
357
373
|
onClick: () => {
|
|
358
|
-
|
|
374
|
+
H(e), W("");
|
|
359
375
|
},
|
|
360
|
-
className: t("flex-1 min-w-[64px] rounded-lg px-3 py-2.5 text-sm font-medium transition-colors",
|
|
376
|
+
className: t("flex-1 min-w-[64px] rounded-lg px-3 py-2.5 text-sm font-medium transition-colors", V === e && U === "" ? "bg-foreground text-background" : "bg-bg-sunken text-text-secondary hover:bg-accent hover:text-text-primary"),
|
|
361
377
|
children: e === 0 ? "No Tip" : `₹${e}`
|
|
362
378
|
}, e))
|
|
363
379
|
}),
|
|
364
|
-
/* @__PURE__ */
|
|
380
|
+
/* @__PURE__ */ S("input", {
|
|
365
381
|
type: "number",
|
|
366
382
|
placeholder: "Custom tip amount",
|
|
367
|
-
value:
|
|
383
|
+
value: U,
|
|
368
384
|
onChange: (e) => {
|
|
369
385
|
let t = e.target.value;
|
|
370
|
-
|
|
386
|
+
W(t), H(parseInt(t) || 0);
|
|
371
387
|
},
|
|
372
388
|
className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
373
389
|
})
|
|
374
|
-
] }), /* @__PURE__ */
|
|
390
|
+
] }), /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
|
|
375
391
|
className: "block text-sm font-medium text-text-primary mb-2",
|
|
376
392
|
children: "Special Instructions"
|
|
377
|
-
}), /* @__PURE__ */
|
|
393
|
+
}), /* @__PURE__ */ S("textarea", {
|
|
378
394
|
rows: 3,
|
|
379
395
|
placeholder: "Any special requests for your order...",
|
|
380
|
-
value:
|
|
381
|
-
onChange: (e) =>
|
|
396
|
+
value: G,
|
|
397
|
+
onChange: (e) => K(e.target.value),
|
|
382
398
|
className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] resize-none"
|
|
383
399
|
})] })]
|
|
384
400
|
})]
|
|
385
401
|
})
|
|
386
402
|
]
|
|
387
|
-
}), /* @__PURE__ */
|
|
403
|
+
}), /* @__PURE__ */ S("div", {
|
|
388
404
|
className: "lg:col-span-1",
|
|
389
|
-
children: /* @__PURE__ */
|
|
405
|
+
children: /* @__PURE__ */ C(w, {
|
|
390
406
|
treatment: "glass",
|
|
391
407
|
glow: !0,
|
|
392
408
|
className: "sticky top-6 p-5",
|
|
393
409
|
children: [
|
|
394
|
-
/* @__PURE__ */
|
|
410
|
+
/* @__PURE__ */ S("h2", {
|
|
395
411
|
className: "text-base font-semibold text-text-primary mb-4",
|
|
396
412
|
children: "Order Summary"
|
|
397
413
|
}),
|
|
398
|
-
/* @__PURE__ */
|
|
414
|
+
/* @__PURE__ */ C("div", {
|
|
399
415
|
className: "flex items-center gap-3 mb-4 pb-4 border-b border-border-subtle",
|
|
400
|
-
children: [/* @__PURE__ */
|
|
416
|
+
children: [/* @__PURE__ */ S("div", {
|
|
401
417
|
className: "h-12 w-12 rounded-md bg-bg-sunken overflow-hidden",
|
|
402
|
-
children: /* @__PURE__ */
|
|
403
|
-
src:
|
|
404
|
-
alt:
|
|
405
|
-
seed:
|
|
418
|
+
children: /* @__PURE__ */ S(l, {
|
|
419
|
+
src: M.cartImage,
|
|
420
|
+
alt: M.cartName,
|
|
421
|
+
seed: M.cartName
|
|
406
422
|
})
|
|
407
|
-
}), /* @__PURE__ */
|
|
423
|
+
}), /* @__PURE__ */ C("div", {
|
|
408
424
|
className: "min-w-0",
|
|
409
|
-
children: [/* @__PURE__ */
|
|
425
|
+
children: [/* @__PURE__ */ S("p", {
|
|
410
426
|
className: "text-sm font-medium text-text-primary truncate",
|
|
411
|
-
children:
|
|
412
|
-
}), /* @__PURE__ */
|
|
427
|
+
children: M.cartName
|
|
428
|
+
}), /* @__PURE__ */ C("p", {
|
|
413
429
|
className: "text-xs text-text-secondary capitalize",
|
|
414
430
|
children: [
|
|
415
|
-
|
|
431
|
+
M.items.length,
|
|
416
432
|
" item",
|
|
417
|
-
|
|
433
|
+
M.items.length === 1 ? "" : "s",
|
|
418
434
|
" ·",
|
|
419
435
|
" ",
|
|
420
|
-
|
|
436
|
+
F.replace("_", "-")
|
|
421
437
|
]
|
|
422
438
|
})]
|
|
423
439
|
})]
|
|
424
440
|
}),
|
|
425
|
-
/* @__PURE__ */
|
|
441
|
+
/* @__PURE__ */ S("div", {
|
|
426
442
|
className: "space-y-2 mb-4",
|
|
427
|
-
children:
|
|
443
|
+
children: M.items.map((e) => /* @__PURE__ */ C("div", {
|
|
428
444
|
className: "flex justify-between items-start",
|
|
429
|
-
children: [/* @__PURE__ */
|
|
445
|
+
children: [/* @__PURE__ */ C("div", {
|
|
430
446
|
className: "flex-1 min-w-0",
|
|
431
447
|
children: [
|
|
432
|
-
/* @__PURE__ */
|
|
448
|
+
/* @__PURE__ */ S("p", {
|
|
433
449
|
className: "text-sm text-text-primary",
|
|
434
450
|
children: e.name
|
|
435
451
|
}),
|
|
436
|
-
e.customizations && e.customizations.length > 0 && /* @__PURE__ */
|
|
452
|
+
e.customizations && e.customizations.length > 0 && /* @__PURE__ */ S("p", {
|
|
437
453
|
className: "text-xs text-text-secondary mt-0.5",
|
|
438
454
|
children: e.customizations.join(", ")
|
|
439
455
|
}),
|
|
440
|
-
/* @__PURE__ */
|
|
456
|
+
/* @__PURE__ */ C("p", {
|
|
441
457
|
className: "text-xs text-text-secondary",
|
|
442
458
|
children: [
|
|
443
|
-
|
|
459
|
+
s(e.price, { minimumFractionDigits: 0 }),
|
|
444
460
|
" x ",
|
|
445
461
|
e.quantity
|
|
446
462
|
]
|
|
447
463
|
})
|
|
448
464
|
]
|
|
449
|
-
}), /* @__PURE__ */
|
|
465
|
+
}), /* @__PURE__ */ S("span", {
|
|
450
466
|
className: "text-sm font-medium text-text-primary",
|
|
451
|
-
children:
|
|
467
|
+
children: s(e.price * e.quantity, { minimumFractionDigits: 0 })
|
|
452
468
|
})]
|
|
453
469
|
}, e.id))
|
|
454
470
|
}),
|
|
455
|
-
/* @__PURE__ */
|
|
471
|
+
/* @__PURE__ */ C("div", {
|
|
456
472
|
className: "border-t border-border-subtle pt-4 space-y-2.5 text-sm",
|
|
457
473
|
children: [
|
|
458
|
-
/* @__PURE__ */
|
|
474
|
+
/* @__PURE__ */ C("div", {
|
|
459
475
|
className: "flex justify-between",
|
|
460
|
-
children: [/* @__PURE__ */
|
|
476
|
+
children: [/* @__PURE__ */ C("span", {
|
|
461
477
|
className: "text-text-secondary",
|
|
462
478
|
children: [
|
|
463
479
|
"Subtotal (",
|
|
464
|
-
|
|
480
|
+
ie,
|
|
465
481
|
" items)"
|
|
466
482
|
]
|
|
467
|
-
}), /* @__PURE__ */
|
|
483
|
+
}), /* @__PURE__ */ S("span", {
|
|
468
484
|
className: "text-text-primary",
|
|
469
|
-
children:
|
|
485
|
+
children: s(Z.subtotal, { minimumFractionDigits: 0 })
|
|
470
486
|
})]
|
|
471
487
|
}),
|
|
472
|
-
/* @__PURE__ */
|
|
488
|
+
/* @__PURE__ */ C("div", {
|
|
473
489
|
className: "flex justify-between",
|
|
474
|
-
children: [/* @__PURE__ */
|
|
490
|
+
children: [/* @__PURE__ */ S("span", {
|
|
475
491
|
className: "text-text-secondary",
|
|
476
492
|
children: "Delivery Fee"
|
|
477
|
-
}), /* @__PURE__ */
|
|
493
|
+
}), /* @__PURE__ */ S("span", {
|
|
478
494
|
className: "text-text-primary",
|
|
479
|
-
children:
|
|
495
|
+
children: Z.deliveryFee === 0 ? "FREE" : s(Z.deliveryFee, { minimumFractionDigits: 0 })
|
|
480
496
|
})]
|
|
481
497
|
}),
|
|
482
|
-
/* @__PURE__ */
|
|
498
|
+
/* @__PURE__ */ C("div", {
|
|
483
499
|
className: "flex justify-between",
|
|
484
|
-
children: [/* @__PURE__ */
|
|
500
|
+
children: [/* @__PURE__ */ S("span", {
|
|
485
501
|
className: "text-text-secondary",
|
|
486
502
|
children: "Tax"
|
|
487
|
-
}), /* @__PURE__ */
|
|
503
|
+
}), /* @__PURE__ */ S("span", {
|
|
488
504
|
className: "text-text-primary",
|
|
489
|
-
children:
|
|
505
|
+
children: s(Z.tax, { minimumFractionDigits: 0 })
|
|
490
506
|
})]
|
|
491
507
|
}),
|
|
492
|
-
|
|
508
|
+
V > 0 && /* @__PURE__ */ C("div", {
|
|
493
509
|
className: "flex justify-between",
|
|
494
|
-
children: [/* @__PURE__ */
|
|
510
|
+
children: [/* @__PURE__ */ S("span", {
|
|
495
511
|
className: "text-text-secondary",
|
|
496
512
|
children: "Tip"
|
|
497
|
-
}), /* @__PURE__ */
|
|
513
|
+
}), /* @__PURE__ */ S("span", {
|
|
498
514
|
className: "text-text-primary",
|
|
499
|
-
children:
|
|
515
|
+
children: s(V, { minimumFractionDigits: 0 })
|
|
500
516
|
})]
|
|
501
517
|
}),
|
|
502
|
-
|
|
518
|
+
Z.discount && Z.discount > 0 && /* @__PURE__ */ C("div", {
|
|
503
519
|
className: "flex justify-between",
|
|
504
|
-
children: [/* @__PURE__ */
|
|
520
|
+
children: [/* @__PURE__ */ S("span", {
|
|
505
521
|
className: "text-status-success-text",
|
|
506
522
|
children: "Discount"
|
|
507
|
-
}), /* @__PURE__ */
|
|
523
|
+
}), /* @__PURE__ */ C("span", {
|
|
508
524
|
className: "text-status-success-text",
|
|
509
|
-
children: ["-",
|
|
525
|
+
children: ["-", s(Z.discount, { minimumFractionDigits: 0 })]
|
|
510
526
|
})]
|
|
511
527
|
})
|
|
512
528
|
]
|
|
513
529
|
}),
|
|
514
|
-
/* @__PURE__ */
|
|
530
|
+
/* @__PURE__ */ C("div", {
|
|
515
531
|
className: "mt-4 flex justify-between border-t border-border-subtle pt-4",
|
|
516
|
-
children: [/* @__PURE__ */
|
|
532
|
+
children: [/* @__PURE__ */ S("span", {
|
|
517
533
|
className: "text-base font-semibold text-text-primary",
|
|
518
534
|
children: "Total"
|
|
519
|
-
}), /* @__PURE__ */
|
|
535
|
+
}), /* @__PURE__ */ S("span", {
|
|
520
536
|
className: "text-base font-bold text-text-primary",
|
|
521
|
-
children:
|
|
537
|
+
children: s(Z.total, { minimumFractionDigits: 0 })
|
|
522
538
|
})]
|
|
523
539
|
}),
|
|
524
|
-
/* @__PURE__ */
|
|
540
|
+
/* @__PURE__ */ C("button", {
|
|
525
541
|
type: "button",
|
|
526
542
|
onClick: async () => {
|
|
527
|
-
if (!(!
|
|
528
|
-
let e = await
|
|
529
|
-
providerId:
|
|
530
|
-
customerId:
|
|
531
|
-
fulfillmentType:
|
|
532
|
-
items:
|
|
543
|
+
if (!(!ae() || !M)) try {
|
|
544
|
+
let e = await k.mutateAsync({
|
|
545
|
+
providerId: M.cartId,
|
|
546
|
+
customerId: b?.id,
|
|
547
|
+
fulfillmentType: F,
|
|
548
|
+
items: M.items.map((e) => ({
|
|
533
549
|
offeringId: e.id,
|
|
534
550
|
quantity: e.quantity,
|
|
535
551
|
customizations: e.customizations
|
|
536
552
|
})),
|
|
537
|
-
deliveryAddress:
|
|
538
|
-
paymentMethod:
|
|
539
|
-
notes:
|
|
540
|
-
deliveryFee:
|
|
541
|
-
tax:
|
|
542
|
-
tip:
|
|
543
|
-
total:
|
|
553
|
+
deliveryAddress: F === "delivery" ? `${N.addressLine1}, ${N.addressLine2}, ${N.city}, ${N.state} - ${N.pincode}` : void 0,
|
|
554
|
+
paymentMethod: L.toUpperCase(),
|
|
555
|
+
notes: G,
|
|
556
|
+
deliveryFee: Z.deliveryFee,
|
|
557
|
+
tax: Z.tax,
|
|
558
|
+
tip: V,
|
|
559
|
+
total: Z.total
|
|
544
560
|
});
|
|
545
|
-
alert("Order placed successfully!"),
|
|
561
|
+
alert("Order placed successfully!"), p(`/customer/orders/${e.id}/track`);
|
|
546
562
|
} catch {
|
|
547
563
|
alert("Failed to place order. Please try again.");
|
|
548
564
|
}
|
|
549
565
|
},
|
|
550
|
-
disabled:
|
|
551
|
-
className: t("mt-6 flex w-full items-center justify-center gap-2 rounded-lg py-3 text-sm font-medium transition-opacity", "bg-foreground text-background",
|
|
552
|
-
children: [
|
|
566
|
+
disabled: k.isPending,
|
|
567
|
+
className: t("mt-6 flex w-full items-center justify-center gap-2 rounded-lg py-3 text-sm font-medium transition-opacity", "bg-foreground text-background", k.isPending ? "opacity-60 cursor-not-allowed" : "hover:opacity-90"),
|
|
568
|
+
children: [k.isPending ? /* @__PURE__ */ S(_, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ S(y, { className: "h-4 w-4" }), k.isPending ? "Placing Order..." : `Place Order - ${s(Z.total, { minimumFractionDigits: 0 })}`]
|
|
553
569
|
}),
|
|
554
|
-
/* @__PURE__ */
|
|
570
|
+
/* @__PURE__ */ S("p", {
|
|
555
571
|
className: "mt-3 text-center text-xs text-text-secondary",
|
|
556
572
|
children: "By placing this order, you agree to our Terms of Service and Privacy Policy"
|
|
557
573
|
})
|
|
@@ -559,23 +575,23 @@ function D() {
|
|
|
559
575
|
})
|
|
560
576
|
})]
|
|
561
577
|
})]
|
|
562
|
-
}) : /* @__PURE__ */
|
|
578
|
+
}) : /* @__PURE__ */ S(n, {
|
|
563
579
|
title: "Checkout",
|
|
564
|
-
children: /* @__PURE__ */
|
|
580
|
+
children: /* @__PURE__ */ C("div", {
|
|
565
581
|
className: "flex flex-col items-center justify-center py-16 text-center",
|
|
566
582
|
children: [
|
|
567
|
-
/* @__PURE__ */
|
|
568
|
-
/* @__PURE__ */
|
|
583
|
+
/* @__PURE__ */ S(y, { className: "h-16 w-16 text-text-secondary/40 mb-4" }),
|
|
584
|
+
/* @__PURE__ */ S("h3", {
|
|
569
585
|
className: "text-lg font-semibold text-text-primary mb-2",
|
|
570
586
|
children: "Your cart is empty"
|
|
571
587
|
}),
|
|
572
|
-
/* @__PURE__ */
|
|
588
|
+
/* @__PURE__ */ S("p", {
|
|
573
589
|
className: "text-sm text-text-secondary mb-6",
|
|
574
590
|
children: "Add some items to proceed with checkout"
|
|
575
591
|
}),
|
|
576
|
-
/* @__PURE__ */
|
|
592
|
+
/* @__PURE__ */ S("button", {
|
|
577
593
|
type: "button",
|
|
578
|
-
onClick: () =>
|
|
594
|
+
onClick: () => p("/customer/discover"),
|
|
579
595
|
className: "rounded-lg bg-foreground px-6 py-3 text-sm font-medium text-background hover:opacity-90 transition-opacity",
|
|
580
596
|
children: "Browse Carts"
|
|
581
597
|
})
|
|
@@ -584,6 +600,6 @@ function D() {
|
|
|
584
600
|
});
|
|
585
601
|
}
|
|
586
602
|
//#endregion
|
|
587
|
-
export {
|
|
603
|
+
export { O as CheckoutPage };
|
|
588
604
|
|
|
589
605
|
//# sourceMappingURL=CheckoutPage.js.map
|