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