@burdenoff/microfe-kadaikodi 2026.730.1 → 2026.731.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/kadaikodi/hooks/useKadaikodiApi.d.ts +3 -1
- package/dist/kadaikodi/hooks/useKadaikodiApi.d.ts.map +1 -1
- package/dist/kadaikodi/hooks/useKadaikodiApi.js +9 -4
- package/dist/kadaikodi/hooks/useKadaikodiApi.js.map +1 -1
- package/dist/kadaikodi/pages/customer/CartDetailPage.d.ts.map +1 -1
- package/dist/kadaikodi/pages/customer/CartDetailPage.js +233 -231
- package/dist/kadaikodi/pages/customer/CartDetailPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/OrderTrackingPage.d.ts.map +1 -1
- package/dist/kadaikodi/pages/customer/OrderTrackingPage.js +122 -63
- package/dist/kadaikodi/pages/customer/OrderTrackingPage.js.map +1 -1
- package/dist/kadaikodi/store/index.d.ts +1 -0
- package/dist/kadaikodi/store/index.d.ts.map +1 -1
- package/dist/kadaikodi/store/kadaikodiStore.d.ts +35 -0
- package/dist/kadaikodi/store/kadaikodiStore.d.ts.map +1 -1
- package/dist/kadaikodi/store/kadaikodiStore.js +18 -2
- package/dist/kadaikodi/store/kadaikodiStore.js.map +1 -1
- package/dist/kadaikodi/utils/index.d.ts +1 -0
- package/dist/kadaikodi/utils/index.d.ts.map +1 -1
- package/dist/kadaikodi/utils/orderStatusNotifier.d.ts +43 -0
- package/dist/kadaikodi/utils/orderStatusNotifier.d.ts.map +1 -0
- package/dist/kadaikodi/utils/orderStatusNotifier.js +28 -0
- package/dist/kadaikodi/utils/orderStatusNotifier.js.map +1 -0
- package/dist/node_modules/@capacitor/core/dist/index.js +270 -0
- package/dist/node_modules/@capacitor/core/dist/index.js.map +1 -0
- package/package.json +6 -4
|
@@ -1,21 +1,23 @@
|
|
|
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 { EmptyState as
|
|
5
|
-
import { useInvestmentOpportunities as
|
|
6
|
-
import { formatCurrency as
|
|
4
|
+
import { EmptyState as ee } from "../../components/EmptyState.js";
|
|
5
|
+
import { useInvestmentOpportunities as te, useOfferings as r, useProviders as ne, useReviews as re } from "../../hooks/useKadaikodiApi.js";
|
|
6
|
+
import { formatCurrency as i, formatDistance as ie, formatDuration as a, formatRelativeTime as o } from "../../utils/formatters.js";
|
|
7
|
+
import { useKadaikodiStore as s } from "../../store/kadaikodiStore.js";
|
|
8
|
+
import "../../store/index.js";
|
|
7
9
|
import { RatingStars as c } from "../../components/viz/RatingStars.js";
|
|
8
|
-
import { SegmentedTabs as
|
|
10
|
+
import { SegmentedTabs as ae } from "../../components/viz/SegmentedTabs.js";
|
|
9
11
|
import "../../components/viz/index.js";
|
|
10
|
-
import { ProviderImage as
|
|
11
|
-
import { useMemo as
|
|
12
|
-
import { ArrowLeft as
|
|
13
|
-
import { useParams as
|
|
14
|
-
import { Fragment as
|
|
15
|
-
import { GlassCard as
|
|
12
|
+
import { ProviderImage as l, useFavorites as oe } from "./shared.js";
|
|
13
|
+
import { useMemo as u, useState as d } from "react";
|
|
14
|
+
import { ArrowLeft as se, Calendar as ce, CheckCircle2 as le, Clock as f, Flame as ue, Heart as p, Home as m, Leaf as h, MapPin as g, MessageSquare as _, Minus as v, Plus as y, Search as b, ShoppingCart as x, Star as S, TrendingUp as de, X as C } from "lucide-react";
|
|
15
|
+
import { useParams as fe } from "react-router-dom";
|
|
16
|
+
import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
|
|
17
|
+
import { GlassCard as D, NextSteps as pe, PagePurpose as me } from "@burdenoff/fe-libs/ui";
|
|
16
18
|
//#region src/kadaikodi/pages/customer/CartDetailPage.tsx
|
|
17
19
|
function O() {
|
|
18
|
-
let { cartId: O } =
|
|
20
|
+
let { cartId: O } = fe(), { navigateTo: k } = e(), { data: A = [], isLoading: he } = ne(), { data: j = [], isLoading: ge } = r(O), { data: M = [], isLoading: _e } = te(), { data: N = [] } = re(O ?? ""), P = oe(), F = u(() => A.find((e) => e.id === O), [A, O]), I = u(() => M.find((e) => e.cartId === O), [M, O]), [L, R] = d("menu"), [z, ve] = d(""), [B, ye] = d(""), V = s((e) => e.cartsByProviderId), H = s((e) => e.setCartItems), U = u(() => O ? V[O] ?? [] : [], [V, O]), [be, W] = d(!1), [G, K] = d(null), q = u(() => j.map((e) => ({
|
|
19
21
|
id: e.id,
|
|
20
22
|
name: e.name,
|
|
21
23
|
price: e.price,
|
|
@@ -25,27 +27,27 @@ function O() {
|
|
|
25
27
|
isVeg: !0,
|
|
26
28
|
duration: e.durationMinutes ?? void 0,
|
|
27
29
|
serviceType: e.serviceType ?? void 0
|
|
28
|
-
})), [j]),
|
|
29
|
-
let e =
|
|
30
|
+
})), [j]), xe = u(() => [...new Set(q.map((e) => e.category))], [q]), J = u(() => {
|
|
31
|
+
let e = q;
|
|
30
32
|
if (B && (e = e.filter((e) => e.category === B)), z.trim()) {
|
|
31
33
|
let t = z.toLowerCase();
|
|
32
34
|
e = e.filter((e) => e.name.toLowerCase().includes(t) || e.description.toLowerCase().includes(t));
|
|
33
35
|
}
|
|
34
36
|
return e;
|
|
35
37
|
}, [
|
|
36
|
-
|
|
38
|
+
q,
|
|
37
39
|
B,
|
|
38
40
|
z
|
|
39
|
-
]),
|
|
41
|
+
]), Se = u(() => {
|
|
40
42
|
let e = {};
|
|
41
|
-
return
|
|
43
|
+
return J.forEach((t) => {
|
|
42
44
|
e[t.category] || (e[t.category] = []), e[t.category].push(t);
|
|
43
45
|
}), e;
|
|
44
|
-
}, [
|
|
45
|
-
H(
|
|
46
|
+
}, [J]), Ce = (e, t = 1, n) => {
|
|
47
|
+
O && H(O, U.find((t) => t.productId === e.id) ? U.map((n) => n.productId === e.id ? {
|
|
46
48
|
...n,
|
|
47
49
|
quantity: n.quantity + t
|
|
48
|
-
} : n) : [...
|
|
50
|
+
} : n) : [...U, {
|
|
49
51
|
id: `cart-${Date.now()}`,
|
|
50
52
|
productId: e.id,
|
|
51
53
|
name: e.name,
|
|
@@ -54,43 +56,43 @@ function O() {
|
|
|
54
56
|
specialInstructions: n
|
|
55
57
|
}]);
|
|
56
58
|
}, Y = (e, t) => {
|
|
57
|
-
H(
|
|
59
|
+
O && H(O, U.map((n) => n.productId === e ? {
|
|
58
60
|
...n,
|
|
59
61
|
quantity: Math.max(0, n.quantity + t)
|
|
60
62
|
} : n).filter((e) => e.quantity > 0));
|
|
61
63
|
}, X = (e) => {
|
|
62
|
-
H(
|
|
63
|
-
},
|
|
64
|
-
|
|
64
|
+
O && H(O, U.filter((t) => t.productId !== e));
|
|
65
|
+
}, we = (e) => U.find((t) => t.productId === e)?.quantity ?? 0, Z = U.reduce((e, t) => e + t.price * t.quantity, 0), Q = U.reduce((e, t) => e + t.quantity, 0), $ = (e) => {
|
|
66
|
+
K({
|
|
65
67
|
product: e,
|
|
66
68
|
quantity: 1,
|
|
67
69
|
specialInstructions: ""
|
|
68
|
-
}),
|
|
70
|
+
}), W(!0);
|
|
69
71
|
};
|
|
70
|
-
return F ? /* @__PURE__ */
|
|
71
|
-
title: /* @__PURE__ */
|
|
72
|
+
return F ? /* @__PURE__ */ E(n, {
|
|
73
|
+
title: /* @__PURE__ */ E("div", {
|
|
72
74
|
className: "flex items-center gap-3",
|
|
73
75
|
children: [
|
|
74
|
-
/* @__PURE__ */
|
|
76
|
+
/* @__PURE__ */ T("button", {
|
|
75
77
|
type: "button",
|
|
76
78
|
onClick: () => k("/customer/discover"),
|
|
77
79
|
className: "rounded-md p-1 text-text-secondary hover:bg-accent hover:text-text-primary transition-colors",
|
|
78
|
-
children: /* @__PURE__ */
|
|
80
|
+
children: /* @__PURE__ */ T(se, { className: "h-5 w-5" })
|
|
79
81
|
}),
|
|
80
|
-
/* @__PURE__ */
|
|
82
|
+
/* @__PURE__ */ T("span", {
|
|
81
83
|
className: "truncate",
|
|
82
84
|
children: F.name
|
|
83
85
|
}),
|
|
84
|
-
F.isVerified && /* @__PURE__ */
|
|
86
|
+
F.isVerified && /* @__PURE__ */ T(le, { className: "h-5 w-5 text-text-primary shrink-0" })
|
|
85
87
|
]
|
|
86
88
|
}),
|
|
87
89
|
description: F.category,
|
|
88
90
|
children: [
|
|
89
|
-
/* @__PURE__ */
|
|
91
|
+
/* @__PURE__ */ T(me, {
|
|
90
92
|
className: "mb-4",
|
|
91
93
|
children: "Everything about this cart in one place — browse its menu, check ratings, location and opening hours, then add items to your order. When you're ready, head to checkout to confirm and pay."
|
|
92
94
|
}),
|
|
93
|
-
/* @__PURE__ */
|
|
95
|
+
/* @__PURE__ */ T(pe, {
|
|
94
96
|
storageKey: "kadaikodi-cart-detail",
|
|
95
97
|
className: "mb-4",
|
|
96
98
|
steps: [
|
|
@@ -113,43 +115,43 @@ function O() {
|
|
|
113
115
|
}
|
|
114
116
|
]
|
|
115
117
|
}),
|
|
116
|
-
/* @__PURE__ */ D
|
|
118
|
+
/* @__PURE__ */ E(D, {
|
|
117
119
|
treatment: "glass",
|
|
118
120
|
glow: !0,
|
|
119
121
|
className: "relative h-48 overflow-hidden p-0",
|
|
120
122
|
children: [
|
|
121
|
-
/* @__PURE__ */
|
|
123
|
+
/* @__PURE__ */ T(l, {
|
|
122
124
|
src: F.image,
|
|
123
125
|
alt: F.name,
|
|
124
126
|
seed: F.name
|
|
125
127
|
}),
|
|
126
|
-
/* @__PURE__ */
|
|
128
|
+
/* @__PURE__ */ T("button", {
|
|
127
129
|
type: "button",
|
|
128
130
|
onClick: () => P.toggle(F.id),
|
|
129
131
|
"aria-pressed": P.has(F.id),
|
|
130
132
|
"aria-label": P.has(F.id) ? "Remove from favorites" : "Save to favorites",
|
|
131
133
|
className: "absolute top-3 right-3 flex h-9 w-9 items-center justify-center rounded-full bg-bg-surface/80 backdrop-blur-sm text-text-secondary hover:text-status-error-text transition-colors",
|
|
132
|
-
children: /* @__PURE__ */
|
|
134
|
+
children: /* @__PURE__ */ T(p, { className: t("h-4.5 w-4.5", P.has(F.id) && "fill-status-error-text text-status-error-text") })
|
|
133
135
|
}),
|
|
134
|
-
/* @__PURE__ */
|
|
136
|
+
/* @__PURE__ */ T("div", {
|
|
135
137
|
className: "absolute bottom-0 inset-x-0 bg-gradient-to-t from-black/60 to-transparent p-4",
|
|
136
|
-
children: /* @__PURE__ */
|
|
138
|
+
children: /* @__PURE__ */ E("div", {
|
|
137
139
|
className: "flex items-center gap-3",
|
|
138
|
-
children: [/* @__PURE__ */
|
|
140
|
+
children: [/* @__PURE__ */ T("span", {
|
|
139
141
|
className: t("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium", F.isOpen ? "bg-status-success-bg-subtle text-status-success-text" : "bg-status-error-bg-subtle text-status-error-text"),
|
|
140
142
|
children: F.isOpen ? "Open Now" : "Closed"
|
|
141
|
-
}), /* @__PURE__ */
|
|
143
|
+
}), /* @__PURE__ */ E("div", {
|
|
142
144
|
className: "flex items-center gap-1.5 text-white text-sm",
|
|
143
145
|
children: [
|
|
144
|
-
/* @__PURE__ */
|
|
146
|
+
/* @__PURE__ */ T(c, {
|
|
145
147
|
value: F.rating,
|
|
146
148
|
size: 14
|
|
147
149
|
}),
|
|
148
|
-
/* @__PURE__ */
|
|
150
|
+
/* @__PURE__ */ T("span", {
|
|
149
151
|
className: "font-medium",
|
|
150
152
|
children: F.rating
|
|
151
153
|
}),
|
|
152
|
-
/* @__PURE__ */
|
|
154
|
+
/* @__PURE__ */ E("span", {
|
|
153
155
|
className: "text-white/70",
|
|
154
156
|
children: [
|
|
155
157
|
"(",
|
|
@@ -163,16 +165,16 @@ function O() {
|
|
|
163
165
|
})
|
|
164
166
|
]
|
|
165
167
|
}),
|
|
166
|
-
!F.isOpen && /* @__PURE__ */
|
|
168
|
+
!F.isOpen && /* @__PURE__ */ T("div", {
|
|
167
169
|
className: "mt-4 rounded-lg border border-status-warning-text/30 bg-status-warning-bg-subtle p-3",
|
|
168
|
-
children: /* @__PURE__ */
|
|
170
|
+
children: /* @__PURE__ */ E("p", {
|
|
169
171
|
className: "text-sm text-status-warning-text",
|
|
170
|
-
children: [/* @__PURE__ */
|
|
172
|
+
children: [/* @__PURE__ */ T("strong", { children: "This cart is currently closed." }), " You can browse the offerings but orders are not being accepted."]
|
|
171
173
|
})
|
|
172
174
|
}),
|
|
173
|
-
/* @__PURE__ */
|
|
175
|
+
/* @__PURE__ */ T("div", {
|
|
174
176
|
className: "mt-5",
|
|
175
|
-
children: /* @__PURE__ */
|
|
177
|
+
children: /* @__PURE__ */ T(ae, {
|
|
176
178
|
"aria-label": "Cart sections",
|
|
177
179
|
variant: "underline",
|
|
178
180
|
tabs: [
|
|
@@ -194,120 +196,120 @@ function O() {
|
|
|
194
196
|
onChange: (e) => R(e)
|
|
195
197
|
})
|
|
196
198
|
}),
|
|
197
|
-
L === "info" && /* @__PURE__ */
|
|
199
|
+
L === "info" && /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ E("div", {
|
|
198
200
|
className: "mt-4 grid grid-cols-1 gap-3 sm:grid-cols-3",
|
|
199
201
|
children: [
|
|
200
|
-
/* @__PURE__ */
|
|
202
|
+
/* @__PURE__ */ E("div", {
|
|
201
203
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-3",
|
|
202
204
|
children: [
|
|
203
|
-
/* @__PURE__ */
|
|
205
|
+
/* @__PURE__ */ E("div", {
|
|
204
206
|
className: "flex items-center gap-2 text-text-secondary text-xs mb-1",
|
|
205
|
-
children: [/* @__PURE__ */
|
|
207
|
+
children: [/* @__PURE__ */ T(g, { className: "h-3.5 w-3.5" }), /* @__PURE__ */ T("span", {
|
|
206
208
|
className: "font-medium uppercase tracking-wider",
|
|
207
209
|
children: "Location"
|
|
208
210
|
})]
|
|
209
211
|
}),
|
|
210
|
-
/* @__PURE__ */
|
|
212
|
+
/* @__PURE__ */ T("p", {
|
|
211
213
|
className: "text-sm text-text-primary",
|
|
212
214
|
children: F.location.address
|
|
213
215
|
}),
|
|
214
|
-
F.distance != null && /* @__PURE__ */
|
|
216
|
+
F.distance != null && /* @__PURE__ */ E("p", {
|
|
215
217
|
className: "text-xs text-text-secondary",
|
|
216
|
-
children: [
|
|
218
|
+
children: [ie(F.distance), " away"]
|
|
217
219
|
})
|
|
218
220
|
]
|
|
219
221
|
}),
|
|
220
|
-
/* @__PURE__ */
|
|
222
|
+
/* @__PURE__ */ E("div", {
|
|
221
223
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-3",
|
|
222
224
|
children: [
|
|
223
|
-
/* @__PURE__ */
|
|
225
|
+
/* @__PURE__ */ E("div", {
|
|
224
226
|
className: "flex items-center gap-2 text-text-secondary text-xs mb-1",
|
|
225
|
-
children: [/* @__PURE__ */
|
|
227
|
+
children: [/* @__PURE__ */ T(f, { className: "h-3.5 w-3.5" }), /* @__PURE__ */ T("span", {
|
|
226
228
|
className: "font-medium uppercase tracking-wider",
|
|
227
229
|
children: "Estimated Time"
|
|
228
230
|
})]
|
|
229
231
|
}),
|
|
230
|
-
/* @__PURE__ */
|
|
232
|
+
/* @__PURE__ */ T("p", {
|
|
231
233
|
className: "text-sm text-text-primary",
|
|
232
|
-
children: F.estimatedTime == null ? "—" :
|
|
234
|
+
children: F.estimatedTime == null ? "—" : a(F.estimatedTime)
|
|
233
235
|
}),
|
|
234
|
-
F.averageOrderValue && /* @__PURE__ */
|
|
236
|
+
F.averageOrderValue && /* @__PURE__ */ E("p", {
|
|
235
237
|
className: "text-xs text-text-secondary",
|
|
236
|
-
children: ["Avg ",
|
|
238
|
+
children: ["Avg ", i(F.averageOrderValue, { minimumFractionDigits: 0 })]
|
|
237
239
|
})
|
|
238
240
|
]
|
|
239
241
|
}),
|
|
240
|
-
/* @__PURE__ */
|
|
242
|
+
/* @__PURE__ */ E("div", {
|
|
241
243
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-3",
|
|
242
244
|
children: [
|
|
243
|
-
/* @__PURE__ */
|
|
245
|
+
/* @__PURE__ */ E("div", {
|
|
244
246
|
className: "flex items-center gap-2 text-text-secondary text-xs mb-1",
|
|
245
|
-
children: [/* @__PURE__ */
|
|
247
|
+
children: [/* @__PURE__ */ T(S, { className: "h-3.5 w-3.5" }), /* @__PURE__ */ T("span", {
|
|
246
248
|
className: "font-medium uppercase tracking-wider",
|
|
247
249
|
children: "Rating"
|
|
248
250
|
})]
|
|
249
251
|
}),
|
|
250
|
-
/* @__PURE__ */
|
|
252
|
+
/* @__PURE__ */ E("p", {
|
|
251
253
|
className: "text-sm text-text-primary",
|
|
252
254
|
children: [F.rating, " / 5.0"]
|
|
253
255
|
}),
|
|
254
|
-
/* @__PURE__ */
|
|
256
|
+
/* @__PURE__ */ E("p", {
|
|
255
257
|
className: "text-xs text-text-secondary",
|
|
256
258
|
children: [F.totalRatings, " reviews"]
|
|
257
259
|
})
|
|
258
260
|
]
|
|
259
261
|
})
|
|
260
262
|
]
|
|
261
|
-
}), F.businessHours && Object.keys(F.businessHours).length > 0 && /* @__PURE__ */
|
|
263
|
+
}), F.businessHours && Object.keys(F.businessHours).length > 0 && /* @__PURE__ */ E("section", {
|
|
262
264
|
className: "mt-6",
|
|
263
|
-
children: [/* @__PURE__ */
|
|
265
|
+
children: [/* @__PURE__ */ T("h2", {
|
|
264
266
|
className: "text-base font-semibold text-text-primary mb-2",
|
|
265
267
|
children: "Operating Hours"
|
|
266
|
-
}), /* @__PURE__ */
|
|
268
|
+
}), /* @__PURE__ */ T("div", {
|
|
267
269
|
className: "rounded-lg border border-border-subtle bg-bg-surface overflow-hidden",
|
|
268
|
-
children: Object.entries(F.businessHours).map(([e, t]) => /* @__PURE__ */
|
|
270
|
+
children: Object.entries(F.businessHours).map(([e, t]) => /* @__PURE__ */ E("div", {
|
|
269
271
|
className: "flex items-center justify-between px-4 py-2 border-b border-border-subtle last:border-b-0",
|
|
270
|
-
children: [/* @__PURE__ */
|
|
272
|
+
children: [/* @__PURE__ */ T("span", {
|
|
271
273
|
className: "text-sm font-medium text-text-primary capitalize",
|
|
272
274
|
children: e
|
|
273
|
-
}), t.isOpen ? /* @__PURE__ */
|
|
275
|
+
}), t.isOpen ? /* @__PURE__ */ E("span", {
|
|
274
276
|
className: "text-sm text-text-secondary",
|
|
275
277
|
children: [
|
|
276
278
|
t.open,
|
|
277
279
|
" - ",
|
|
278
280
|
t.close
|
|
279
281
|
]
|
|
280
|
-
}) : /* @__PURE__ */
|
|
282
|
+
}) : /* @__PURE__ */ T("span", {
|
|
281
283
|
className: "text-sm text-status-error-text",
|
|
282
284
|
children: "Closed"
|
|
283
285
|
})]
|
|
284
286
|
}, e))
|
|
285
287
|
})]
|
|
286
288
|
})] }),
|
|
287
|
-
L === "reviews" && /* @__PURE__ */
|
|
289
|
+
L === "reviews" && /* @__PURE__ */ E("div", {
|
|
288
290
|
className: "mt-4 space-y-4",
|
|
289
|
-
children: [/* @__PURE__ */
|
|
291
|
+
children: [/* @__PURE__ */ E("div", {
|
|
290
292
|
className: "flex flex-wrap items-center gap-4 rounded-xl border border-border-subtle bg-bg-surface p-5",
|
|
291
|
-
children: [/* @__PURE__ */
|
|
293
|
+
children: [/* @__PURE__ */ E("div", {
|
|
292
294
|
className: "text-center",
|
|
293
295
|
children: [
|
|
294
|
-
/* @__PURE__ */
|
|
296
|
+
/* @__PURE__ */ T("p", {
|
|
295
297
|
className: "text-4xl font-bold leading-none text-text-primary",
|
|
296
298
|
children: F.rating.toFixed(1)
|
|
297
299
|
}),
|
|
298
|
-
/* @__PURE__ */
|
|
300
|
+
/* @__PURE__ */ T("div", {
|
|
299
301
|
className: "mt-1.5 flex justify-center",
|
|
300
|
-
children: /* @__PURE__ */
|
|
302
|
+
children: /* @__PURE__ */ T(c, {
|
|
301
303
|
value: F.rating,
|
|
302
304
|
size: 16
|
|
303
305
|
})
|
|
304
306
|
}),
|
|
305
|
-
/* @__PURE__ */
|
|
307
|
+
/* @__PURE__ */ E("p", {
|
|
306
308
|
className: "mt-1 text-xs text-text-secondary",
|
|
307
309
|
children: [F.totalRatings, " ratings"]
|
|
308
310
|
})
|
|
309
311
|
]
|
|
310
|
-
}), /* @__PURE__ */
|
|
312
|
+
}), /* @__PURE__ */ T("div", {
|
|
311
313
|
className: "flex-1 min-w-[180px] space-y-1.5",
|
|
312
314
|
children: [
|
|
313
315
|
5,
|
|
@@ -317,21 +319,21 @@ function O() {
|
|
|
317
319
|
1
|
|
318
320
|
].map((e) => {
|
|
319
321
|
let t = N.filter((t) => Math.round(t.rating) === e).length, n = N.length ? t / N.length * 100 : 0;
|
|
320
|
-
return /* @__PURE__ */
|
|
322
|
+
return /* @__PURE__ */ E("div", {
|
|
321
323
|
className: "flex items-center gap-2 text-xs",
|
|
322
324
|
children: [
|
|
323
|
-
/* @__PURE__ */
|
|
325
|
+
/* @__PURE__ */ E("span", {
|
|
324
326
|
className: "flex w-6 items-center gap-0.5 text-text-secondary",
|
|
325
|
-
children: [e, /* @__PURE__ */
|
|
327
|
+
children: [e, /* @__PURE__ */ T(S, { className: "h-3 w-3 fill-status-warning-text text-status-warning-text" })]
|
|
326
328
|
}),
|
|
327
|
-
/* @__PURE__ */
|
|
329
|
+
/* @__PURE__ */ T("div", {
|
|
328
330
|
className: "h-2 flex-1 overflow-hidden rounded-full bg-bg-sunken",
|
|
329
|
-
children: /* @__PURE__ */
|
|
331
|
+
children: /* @__PURE__ */ T("div", {
|
|
330
332
|
className: "h-full rounded-full bg-accent-primary transition-all",
|
|
331
333
|
style: { width: `${n}%` }
|
|
332
334
|
})
|
|
333
335
|
}),
|
|
334
|
-
/* @__PURE__ */
|
|
336
|
+
/* @__PURE__ */ T("span", {
|
|
335
337
|
className: "w-6 text-right tabular-nums text-text-muted",
|
|
336
338
|
children: t
|
|
337
339
|
})
|
|
@@ -339,38 +341,38 @@ function O() {
|
|
|
339
341
|
}, e);
|
|
340
342
|
})
|
|
341
343
|
})]
|
|
342
|
-
}), N.length === 0 ? /* @__PURE__ */
|
|
344
|
+
}), N.length === 0 ? /* @__PURE__ */ E("div", {
|
|
343
345
|
className: "rounded-xl border border-border-subtle bg-bg-surface p-8 text-center",
|
|
344
|
-
children: [/* @__PURE__ */
|
|
346
|
+
children: [/* @__PURE__ */ T(_, { className: "mx-auto h-10 w-10 text-text-secondary/40" }), /* @__PURE__ */ T("p", {
|
|
345
347
|
className: "mt-3 text-sm text-text-secondary",
|
|
346
348
|
children: "No written reviews yet. Order and be the first to review this cart."
|
|
347
349
|
})]
|
|
348
|
-
}) : /* @__PURE__ */
|
|
350
|
+
}) : /* @__PURE__ */ T("div", {
|
|
349
351
|
className: "space-y-3",
|
|
350
|
-
children: N.map((e) => /* @__PURE__ */
|
|
352
|
+
children: N.map((e) => /* @__PURE__ */ E("div", {
|
|
351
353
|
className: "rounded-xl border border-border-subtle bg-bg-surface p-4",
|
|
352
354
|
children: [
|
|
353
|
-
/* @__PURE__ */
|
|
355
|
+
/* @__PURE__ */ E("div", {
|
|
354
356
|
className: "flex items-center justify-between gap-2",
|
|
355
|
-
children: [/* @__PURE__ */
|
|
357
|
+
children: [/* @__PURE__ */ T(c, {
|
|
356
358
|
value: e.rating,
|
|
357
359
|
size: 14,
|
|
358
360
|
showValue: !0
|
|
359
|
-
}), /* @__PURE__ */
|
|
361
|
+
}), /* @__PURE__ */ T("span", {
|
|
360
362
|
className: "text-xs text-text-muted",
|
|
361
|
-
children:
|
|
363
|
+
children: o(e.createdAt)
|
|
362
364
|
})]
|
|
363
365
|
}),
|
|
364
|
-
e.review && /* @__PURE__ */
|
|
366
|
+
e.review && /* @__PURE__ */ T("p", {
|
|
365
367
|
className: "mt-2 text-sm text-text-primary leading-relaxed",
|
|
366
368
|
children: e.review
|
|
367
369
|
}),
|
|
368
|
-
e.response && /* @__PURE__ */
|
|
370
|
+
e.response && /* @__PURE__ */ E("div", {
|
|
369
371
|
className: "mt-3 rounded-lg border-l-2 border-accent-primary bg-[var(--color-accent-soft)] p-3",
|
|
370
|
-
children: [/* @__PURE__ */
|
|
372
|
+
children: [/* @__PURE__ */ T("p", {
|
|
371
373
|
className: "mb-1 text-xs font-medium text-text-primary",
|
|
372
374
|
children: "Owner response"
|
|
373
|
-
}), /* @__PURE__ */
|
|
375
|
+
}), /* @__PURE__ */ T("p", {
|
|
374
376
|
className: "text-xs text-text-primary leading-relaxed",
|
|
375
377
|
children: e.response
|
|
376
378
|
})]
|
|
@@ -379,136 +381,136 @@ function O() {
|
|
|
379
381
|
}, e.id))
|
|
380
382
|
})]
|
|
381
383
|
}),
|
|
382
|
-
L === "menu" && /* @__PURE__ */
|
|
384
|
+
L === "menu" && /* @__PURE__ */ E("div", {
|
|
383
385
|
className: "mt-6 grid grid-cols-1 gap-6 lg:grid-cols-3",
|
|
384
|
-
children: [/* @__PURE__ */
|
|
386
|
+
children: [/* @__PURE__ */ E("div", {
|
|
385
387
|
className: "lg:col-span-2",
|
|
386
388
|
children: [
|
|
387
|
-
/* @__PURE__ */
|
|
389
|
+
/* @__PURE__ */ E("div", {
|
|
388
390
|
className: "flex flex-col gap-3 sm:flex-row mb-4",
|
|
389
|
-
children: [/* @__PURE__ */
|
|
391
|
+
children: [/* @__PURE__ */ E("div", {
|
|
390
392
|
className: "relative flex-1",
|
|
391
|
-
children: [/* @__PURE__ */
|
|
393
|
+
children: [/* @__PURE__ */ T(b, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-secondary" }), /* @__PURE__ */ T("input", {
|
|
392
394
|
type: "text",
|
|
393
395
|
placeholder: "Search offerings...",
|
|
394
396
|
value: z,
|
|
395
|
-
onChange: (e) =>
|
|
397
|
+
onChange: (e) => ve(e.target.value),
|
|
396
398
|
className: "w-full rounded-lg border border-border-subtle bg-bg-surface py-2 pl-10 pr-3 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
397
399
|
})]
|
|
398
|
-
}), /* @__PURE__ */
|
|
400
|
+
}), /* @__PURE__ */ E("select", {
|
|
399
401
|
value: B,
|
|
400
|
-
onChange: (e) =>
|
|
402
|
+
onChange: (e) => ye(e.target.value),
|
|
401
403
|
className: "rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
|
|
402
|
-
children: [/* @__PURE__ */
|
|
404
|
+
children: [/* @__PURE__ */ T("option", {
|
|
403
405
|
value: "",
|
|
404
406
|
children: "All Categories"
|
|
405
|
-
}),
|
|
407
|
+
}), xe.map((e) => /* @__PURE__ */ T("option", {
|
|
406
408
|
value: e,
|
|
407
409
|
children: e
|
|
408
410
|
}, e))]
|
|
409
411
|
})]
|
|
410
412
|
}),
|
|
411
|
-
/* @__PURE__ */
|
|
413
|
+
/* @__PURE__ */ E("h2", {
|
|
412
414
|
className: "text-lg font-semibold text-text-primary mb-3",
|
|
413
415
|
children: [
|
|
414
416
|
"Menu & Services (",
|
|
415
|
-
|
|
417
|
+
J.length,
|
|
416
418
|
")"
|
|
417
419
|
]
|
|
418
420
|
}),
|
|
419
|
-
|
|
421
|
+
J.length === 0 ? /* @__PURE__ */ E("div", {
|
|
420
422
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-8 text-center",
|
|
421
|
-
children: [/* @__PURE__ */
|
|
423
|
+
children: [/* @__PURE__ */ T(b, { className: "mx-auto h-10 w-10 text-text-secondary/50" }), /* @__PURE__ */ T("p", {
|
|
422
424
|
className: "mt-3 text-sm text-text-secondary",
|
|
423
425
|
children: "No offerings found"
|
|
424
426
|
})]
|
|
425
|
-
}) : /* @__PURE__ */
|
|
427
|
+
}) : /* @__PURE__ */ T("div", {
|
|
426
428
|
className: "space-y-6",
|
|
427
|
-
children: Object.entries(
|
|
429
|
+
children: Object.entries(Se).map(([e, n]) => /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("h3", {
|
|
428
430
|
className: "text-sm font-semibold text-text-primary mb-2 px-1",
|
|
429
431
|
children: e
|
|
430
|
-
}), /* @__PURE__ */
|
|
432
|
+
}), /* @__PURE__ */ T("div", {
|
|
431
433
|
className: "space-y-2",
|
|
432
434
|
children: n.map((e) => {
|
|
433
|
-
let n =
|
|
434
|
-
return /* @__PURE__ */
|
|
435
|
+
let n = we(e.id);
|
|
436
|
+
return /* @__PURE__ */ E("div", {
|
|
435
437
|
className: "flex gap-4 rounded-lg border border-border-subtle bg-bg-surface p-4",
|
|
436
|
-
children: [/* @__PURE__ */
|
|
438
|
+
children: [/* @__PURE__ */ T("div", {
|
|
437
439
|
className: "h-20 w-20 shrink-0 rounded-md bg-bg-sunken overflow-hidden",
|
|
438
|
-
children: /* @__PURE__ */
|
|
440
|
+
children: /* @__PURE__ */ T(l, {
|
|
439
441
|
src: e.image,
|
|
440
442
|
alt: e.name,
|
|
441
443
|
seed: e.name
|
|
442
444
|
})
|
|
443
|
-
}), /* @__PURE__ */
|
|
445
|
+
}), /* @__PURE__ */ E("div", {
|
|
444
446
|
className: "flex-1 min-w-0",
|
|
445
447
|
children: [
|
|
446
|
-
/* @__PURE__ */
|
|
448
|
+
/* @__PURE__ */ E("div", {
|
|
447
449
|
className: "flex items-start justify-between gap-2",
|
|
448
|
-
children: [/* @__PURE__ */
|
|
450
|
+
children: [/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ E("div", {
|
|
449
451
|
className: "flex items-center gap-2",
|
|
450
|
-
children: [/* @__PURE__ */
|
|
452
|
+
children: [/* @__PURE__ */ T("h4", {
|
|
451
453
|
className: "text-sm font-semibold text-text-primary",
|
|
452
454
|
children: e.name
|
|
453
|
-
}), e.isVeg && /* @__PURE__ */
|
|
454
|
-
}), /* @__PURE__ */
|
|
455
|
+
}), e.isVeg && /* @__PURE__ */ T(h, { className: "h-3.5 w-3.5 text-status-success-text" })]
|
|
456
|
+
}), /* @__PURE__ */ T("p", {
|
|
455
457
|
className: "text-xs text-text-secondary mt-0.5",
|
|
456
458
|
children: e.category
|
|
457
|
-
})] }), /* @__PURE__ */
|
|
459
|
+
})] }), /* @__PURE__ */ T("span", {
|
|
458
460
|
className: "text-sm font-bold text-text-primary whitespace-nowrap",
|
|
459
|
-
children:
|
|
461
|
+
children: i(e.price, { minimumFractionDigits: 0 })
|
|
460
462
|
})]
|
|
461
463
|
}),
|
|
462
|
-
/* @__PURE__ */
|
|
464
|
+
/* @__PURE__ */ T("p", {
|
|
463
465
|
className: "mt-1 text-xs text-text-secondary line-clamp-2",
|
|
464
466
|
children: e.description
|
|
465
467
|
}),
|
|
466
|
-
/* @__PURE__ */
|
|
468
|
+
/* @__PURE__ */ E("div", {
|
|
467
469
|
className: "mt-2 flex flex-wrap items-center gap-2 text-[10px] text-text-secondary",
|
|
468
470
|
children: [
|
|
469
|
-
e.duration != null && e.duration > 0 && /* @__PURE__ */
|
|
471
|
+
e.duration != null && e.duration > 0 && /* @__PURE__ */ E("span", {
|
|
470
472
|
className: "flex items-center gap-0.5",
|
|
471
|
-
children: [/* @__PURE__ */
|
|
473
|
+
children: [/* @__PURE__ */ T(f, { className: "h-3 w-3" }), a(e.duration)]
|
|
472
474
|
}),
|
|
473
|
-
e.serviceType && /* @__PURE__ */
|
|
475
|
+
e.serviceType && /* @__PURE__ */ T("span", {
|
|
474
476
|
className: "rounded bg-bg-sunken px-1.5 py-0.5 capitalize",
|
|
475
477
|
children: e.serviceType
|
|
476
478
|
}),
|
|
477
|
-
e.spiceLevel && /* @__PURE__ */
|
|
479
|
+
e.spiceLevel && /* @__PURE__ */ E("span", {
|
|
478
480
|
className: "flex items-center gap-0.5 rounded bg-bg-sunken px-1.5 py-0.5 capitalize",
|
|
479
|
-
children: [/* @__PURE__ */
|
|
481
|
+
children: [/* @__PURE__ */ T(ue, { className: "h-3 w-3" }), e.spiceLevel]
|
|
480
482
|
})
|
|
481
483
|
]
|
|
482
484
|
}),
|
|
483
|
-
/* @__PURE__ */
|
|
485
|
+
/* @__PURE__ */ T("div", {
|
|
484
486
|
className: "mt-2 flex justify-end",
|
|
485
|
-
children: n > 0 ? /* @__PURE__ */
|
|
487
|
+
children: n > 0 ? /* @__PURE__ */ E("div", {
|
|
486
488
|
className: "flex items-center gap-2",
|
|
487
489
|
children: [
|
|
488
|
-
/* @__PURE__ */
|
|
490
|
+
/* @__PURE__ */ T("button", {
|
|
489
491
|
type: "button",
|
|
490
492
|
onClick: () => Y(e.id, -1),
|
|
491
493
|
className: "flex h-7 w-7 items-center justify-center rounded-full bg-bg-sunken text-text-primary hover:bg-accent",
|
|
492
|
-
children: /* @__PURE__ */
|
|
494
|
+
children: /* @__PURE__ */ T(v, { className: "h-3.5 w-3.5" })
|
|
493
495
|
}),
|
|
494
|
-
/* @__PURE__ */
|
|
496
|
+
/* @__PURE__ */ T("span", {
|
|
495
497
|
className: "min-w-[2ch] text-center text-sm font-medium text-text-primary",
|
|
496
498
|
children: n
|
|
497
499
|
}),
|
|
498
|
-
/* @__PURE__ */
|
|
500
|
+
/* @__PURE__ */ T("button", {
|
|
499
501
|
type: "button",
|
|
500
502
|
onClick: () => Y(e.id, 1),
|
|
501
503
|
className: "flex h-7 w-7 items-center justify-center rounded-full bg-foreground text-background hover:opacity-90",
|
|
502
|
-
children: /* @__PURE__ */
|
|
504
|
+
children: /* @__PURE__ */ T(y, { className: "h-3.5 w-3.5" })
|
|
503
505
|
}),
|
|
504
|
-
/* @__PURE__ */
|
|
506
|
+
/* @__PURE__ */ T("button", {
|
|
505
507
|
type: "button",
|
|
506
508
|
onClick: () => X(e.id),
|
|
507
509
|
className: "ml-1 flex h-7 w-7 items-center justify-center rounded-full text-status-error-text hover:bg-status-error-bg/10",
|
|
508
|
-
children: /* @__PURE__ */
|
|
510
|
+
children: /* @__PURE__ */ T(C, { className: "h-3.5 w-3.5" })
|
|
509
511
|
})
|
|
510
512
|
]
|
|
511
|
-
}) : /* @__PURE__ */
|
|
513
|
+
}) : /* @__PURE__ */ T("button", {
|
|
512
514
|
type: "button",
|
|
513
515
|
disabled: !F.isOpen,
|
|
514
516
|
onClick: () => $(e),
|
|
@@ -523,78 +525,78 @@ function O() {
|
|
|
523
525
|
})] }, e))
|
|
524
526
|
})
|
|
525
527
|
]
|
|
526
|
-
}), /* @__PURE__ */
|
|
528
|
+
}), /* @__PURE__ */ E("div", {
|
|
527
529
|
className: "space-y-4",
|
|
528
530
|
children: [
|
|
529
|
-
/* @__PURE__ */
|
|
531
|
+
/* @__PURE__ */ E("div", {
|
|
530
532
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-4 lg:sticky lg:top-6",
|
|
531
|
-
children: [/* @__PURE__ */
|
|
533
|
+
children: [/* @__PURE__ */ E("h3", {
|
|
532
534
|
className: "text-base font-semibold text-text-primary mb-3 flex items-center gap-2",
|
|
533
|
-
children: [/* @__PURE__ */
|
|
534
|
-
}),
|
|
535
|
+
children: [/* @__PURE__ */ T(x, { className: "h-4 w-4" }), "Your Order"]
|
|
536
|
+
}), U.length === 0 ? /* @__PURE__ */ E("div", {
|
|
535
537
|
className: "py-6 text-center",
|
|
536
|
-
children: [/* @__PURE__ */
|
|
538
|
+
children: [/* @__PURE__ */ T(x, { className: "mx-auto h-8 w-8 text-text-secondary/40" }), /* @__PURE__ */ T("p", {
|
|
537
539
|
className: "mt-2 text-sm text-text-secondary",
|
|
538
540
|
children: "Your cart is empty"
|
|
539
541
|
})]
|
|
540
|
-
}) : /* @__PURE__ */
|
|
542
|
+
}) : /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("div", {
|
|
541
543
|
className: "space-y-2 max-h-64 overflow-y-auto mb-3",
|
|
542
|
-
children:
|
|
544
|
+
children: U.map((e) => /* @__PURE__ */ E("div", {
|
|
543
545
|
className: "flex items-center justify-between gap-2",
|
|
544
|
-
children: [/* @__PURE__ */
|
|
546
|
+
children: [/* @__PURE__ */ E("div", {
|
|
545
547
|
className: "flex-1 min-w-0",
|
|
546
|
-
children: [/* @__PURE__ */
|
|
548
|
+
children: [/* @__PURE__ */ T("p", {
|
|
547
549
|
className: "text-sm font-medium text-text-primary truncate",
|
|
548
550
|
children: e.name
|
|
549
|
-
}), /* @__PURE__ */
|
|
551
|
+
}), /* @__PURE__ */ E("p", {
|
|
550
552
|
className: "text-xs text-text-secondary",
|
|
551
553
|
children: [
|
|
552
|
-
|
|
554
|
+
i(e.price, { minimumFractionDigits: 0 }),
|
|
553
555
|
" x",
|
|
554
556
|
" ",
|
|
555
557
|
e.quantity
|
|
556
558
|
]
|
|
557
559
|
})]
|
|
558
|
-
}), /* @__PURE__ */
|
|
560
|
+
}), /* @__PURE__ */ E("div", {
|
|
559
561
|
className: "flex items-center gap-1",
|
|
560
562
|
children: [
|
|
561
|
-
/* @__PURE__ */
|
|
563
|
+
/* @__PURE__ */ T("button", {
|
|
562
564
|
type: "button",
|
|
563
565
|
onClick: () => Y(e.productId, -1),
|
|
564
566
|
className: "flex h-6 w-6 items-center justify-center rounded bg-bg-sunken text-text-primary text-xs",
|
|
565
567
|
children: "-"
|
|
566
568
|
}),
|
|
567
|
-
/* @__PURE__ */
|
|
569
|
+
/* @__PURE__ */ T("span", {
|
|
568
570
|
className: "min-w-[2ch] text-center text-xs font-medium",
|
|
569
571
|
children: e.quantity
|
|
570
572
|
}),
|
|
571
|
-
/* @__PURE__ */
|
|
573
|
+
/* @__PURE__ */ T("button", {
|
|
572
574
|
type: "button",
|
|
573
575
|
onClick: () => Y(e.productId, 1),
|
|
574
576
|
className: "flex h-6 w-6 items-center justify-center rounded bg-bg-sunken text-text-primary text-xs",
|
|
575
577
|
children: "+"
|
|
576
578
|
}),
|
|
577
|
-
/* @__PURE__ */
|
|
579
|
+
/* @__PURE__ */ T("button", {
|
|
578
580
|
type: "button",
|
|
579
581
|
onClick: () => X(e.productId),
|
|
580
582
|
className: "ml-1 text-status-error-text hover:text-status-error-text/80",
|
|
581
|
-
children: /* @__PURE__ */
|
|
583
|
+
children: /* @__PURE__ */ T(C, { className: "h-3.5 w-3.5" })
|
|
582
584
|
})
|
|
583
585
|
]
|
|
584
586
|
})]
|
|
585
587
|
}, e.id))
|
|
586
|
-
}), /* @__PURE__ */
|
|
588
|
+
}), /* @__PURE__ */ E("div", {
|
|
587
589
|
className: "border-t border-border-subtle pt-3",
|
|
588
|
-
children: [/* @__PURE__ */
|
|
590
|
+
children: [/* @__PURE__ */ E("div", {
|
|
589
591
|
className: "flex justify-between items-center mb-3",
|
|
590
|
-
children: [/* @__PURE__ */
|
|
592
|
+
children: [/* @__PURE__ */ E("span", {
|
|
591
593
|
className: "text-sm font-semibold text-text-primary",
|
|
592
|
-
children: ["Total: ",
|
|
593
|
-
}), /* @__PURE__ */
|
|
594
|
+
children: ["Total: ", i(Z, { minimumFractionDigits: 0 })]
|
|
595
|
+
}), /* @__PURE__ */ E("span", {
|
|
594
596
|
className: "text-xs text-text-secondary",
|
|
595
597
|
children: [Q, " items"]
|
|
596
598
|
})]
|
|
597
|
-
}), /* @__PURE__ */
|
|
599
|
+
}), /* @__PURE__ */ T("button", {
|
|
598
600
|
type: "button",
|
|
599
601
|
onClick: () => k("/customer/checkout"),
|
|
600
602
|
className: "w-full rounded-lg bg-foreground py-2.5 text-sm font-medium text-background hover:opacity-90 transition-opacity",
|
|
@@ -602,18 +604,18 @@ function O() {
|
|
|
602
604
|
})]
|
|
603
605
|
})] })]
|
|
604
606
|
}),
|
|
605
|
-
F.serviceTypes?.includes("direct_service") && /* @__PURE__ */
|
|
607
|
+
F.serviceTypes?.includes("direct_service") && /* @__PURE__ */ E("div", {
|
|
606
608
|
className: "rounded-lg border border-accent-purple/30 bg-accent-purple-subtle p-4",
|
|
607
609
|
children: [
|
|
608
|
-
/* @__PURE__ */
|
|
610
|
+
/* @__PURE__ */ E("h3", {
|
|
609
611
|
className: "text-sm font-semibold text-text-primary flex items-center gap-2 mb-2",
|
|
610
|
-
children: [/* @__PURE__ */
|
|
612
|
+
children: [/* @__PURE__ */ T(m, { className: "h-4 w-4 text-text-primary" }), "Direct Service"]
|
|
611
613
|
}),
|
|
612
|
-
/* @__PURE__ */
|
|
614
|
+
/* @__PURE__ */ T("p", {
|
|
613
615
|
className: "text-xs text-text-secondary mb-3",
|
|
614
616
|
children: "Cart comes to your location!"
|
|
615
617
|
}),
|
|
616
|
-
/* @__PURE__ */
|
|
618
|
+
/* @__PURE__ */ T("button", {
|
|
617
619
|
type: "button",
|
|
618
620
|
onClick: () => k(`/customer/cart/${F.id}/direct-service`),
|
|
619
621
|
className: "w-full rounded-lg bg-accent-purple py-2 text-xs font-medium text-white hover:bg-accent-purple transition-colors",
|
|
@@ -621,45 +623,45 @@ function O() {
|
|
|
621
623
|
})
|
|
622
624
|
]
|
|
623
625
|
}),
|
|
624
|
-
F.serviceTypes?.includes("appointment") && /* @__PURE__ */
|
|
626
|
+
F.serviceTypes?.includes("appointment") && /* @__PURE__ */ E("div", {
|
|
625
627
|
className: "rounded-lg border border-border-focus/30 bg-[var(--color-accent-soft)] p-4",
|
|
626
|
-
children: [/* @__PURE__ */
|
|
628
|
+
children: [/* @__PURE__ */ E("h3", {
|
|
627
629
|
className: "text-sm font-semibold text-text-primary flex items-center gap-2 mb-2",
|
|
628
|
-
children: [/* @__PURE__ */
|
|
629
|
-
}), /* @__PURE__ */
|
|
630
|
+
children: [/* @__PURE__ */ T(ce, { className: "h-4 w-4 text-text-primary" }), "Appointments Available"]
|
|
631
|
+
}), /* @__PURE__ */ T("p", {
|
|
630
632
|
className: "text-xs text-text-secondary",
|
|
631
633
|
children: "This service provider accepts appointments. Contact them to schedule."
|
|
632
634
|
})]
|
|
633
635
|
}),
|
|
634
|
-
I && /* @__PURE__ */
|
|
636
|
+
I && /* @__PURE__ */ E("div", {
|
|
635
637
|
className: "rounded-lg border border-status-success-text/30 bg-status-success-bg-subtle p-4",
|
|
636
638
|
children: [
|
|
637
|
-
/* @__PURE__ */
|
|
639
|
+
/* @__PURE__ */ E("h3", {
|
|
638
640
|
className: "text-sm font-semibold text-text-primary flex items-center gap-2 mb-2",
|
|
639
|
-
children: [/* @__PURE__ */
|
|
641
|
+
children: [/* @__PURE__ */ T(de, { className: "h-4 w-4 text-status-success-text" }), "Investment Opportunity"]
|
|
640
642
|
}),
|
|
641
|
-
/* @__PURE__ */
|
|
643
|
+
/* @__PURE__ */ T("p", {
|
|
642
644
|
className: "text-xs text-text-secondary mb-2",
|
|
643
645
|
children: I.description
|
|
644
646
|
}),
|
|
645
|
-
/* @__PURE__ */
|
|
647
|
+
/* @__PURE__ */ E("div", {
|
|
646
648
|
className: "space-y-1 text-xs text-text-secondary mb-3",
|
|
647
649
|
children: [
|
|
648
|
-
/* @__PURE__ */
|
|
649
|
-
/* @__PURE__ */
|
|
650
|
-
/* @__PURE__ */
|
|
650
|
+
/* @__PURE__ */ E("p", { children: ["Target: ", i(I.targetAmount, { minimumFractionDigits: 0 })] }),
|
|
651
|
+
/* @__PURE__ */ E("p", { children: ["Raised: ", i(I.raisedAmount, { minimumFractionDigits: 0 })] }),
|
|
652
|
+
/* @__PURE__ */ E("p", { children: [
|
|
651
653
|
"Expected Returns: ",
|
|
652
654
|
I.expectedReturns,
|
|
653
655
|
"%"
|
|
654
656
|
] }),
|
|
655
|
-
/* @__PURE__ */
|
|
657
|
+
/* @__PURE__ */ E("p", { children: [
|
|
656
658
|
"Min Investment:",
|
|
657
659
|
" ",
|
|
658
|
-
|
|
660
|
+
i(I.minimumInvestment, { minimumFractionDigits: 0 })
|
|
659
661
|
] })
|
|
660
662
|
]
|
|
661
663
|
}),
|
|
662
|
-
/* @__PURE__ */
|
|
664
|
+
/* @__PURE__ */ T("button", {
|
|
663
665
|
type: "button",
|
|
664
666
|
onClick: () => k(`/investor/opportunity/${I.id}`),
|
|
665
667
|
className: "w-full rounded-lg bg-status-success-text py-2 text-xs font-medium text-white hover:bg-status-success-text transition-colors",
|
|
@@ -670,97 +672,97 @@ function O() {
|
|
|
670
672
|
]
|
|
671
673
|
})]
|
|
672
674
|
}),
|
|
673
|
-
L === "menu" && Q > 0 && /* @__PURE__ */
|
|
675
|
+
L === "menu" && Q > 0 && /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("div", {
|
|
674
676
|
className: "h-20 lg:hidden",
|
|
675
677
|
"aria-hidden": "true"
|
|
676
|
-
}), /* @__PURE__ */
|
|
678
|
+
}), /* @__PURE__ */ T("div", {
|
|
677
679
|
className: "fixed inset-x-0 bottom-0 z-40 border-t border-border-subtle bg-bg-surface/95 p-3 backdrop-blur-sm shadow-elevation-2 lg:hidden",
|
|
678
|
-
children: /* @__PURE__ */
|
|
680
|
+
children: /* @__PURE__ */ E("button", {
|
|
679
681
|
type: "button",
|
|
680
682
|
onClick: () => k("/customer/checkout"),
|
|
681
683
|
className: "flex w-full items-center justify-center gap-2 rounded-lg bg-action-primary-bg py-3 text-sm font-semibold text-action-primary-text hover:bg-action-primary-bg-hover transition-colors",
|
|
682
684
|
children: [
|
|
683
|
-
/* @__PURE__ */
|
|
685
|
+
/* @__PURE__ */ T(x, { className: "h-4 w-4" }),
|
|
684
686
|
"View Cart · ",
|
|
685
687
|
Q,
|
|
686
688
|
" ",
|
|
687
689
|
Q === 1 ? "item" : "items",
|
|
688
690
|
" ·",
|
|
689
691
|
" ",
|
|
690
|
-
|
|
692
|
+
i(Z, { minimumFractionDigits: 0 })
|
|
691
693
|
]
|
|
692
694
|
})
|
|
693
695
|
})] }),
|
|
694
|
-
|
|
696
|
+
be && G && /* @__PURE__ */ T("div", {
|
|
695
697
|
className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",
|
|
696
|
-
children: /* @__PURE__ */
|
|
698
|
+
children: /* @__PURE__ */ T("div", {
|
|
697
699
|
className: "w-full max-w-md max-h-[90vh] overflow-y-auto rounded-lg border border-border-subtle bg-bg-surface",
|
|
698
|
-
children: /* @__PURE__ */
|
|
700
|
+
children: /* @__PURE__ */ E("div", {
|
|
699
701
|
className: "p-5",
|
|
700
702
|
children: [
|
|
701
|
-
/* @__PURE__ */
|
|
703
|
+
/* @__PURE__ */ E("div", {
|
|
702
704
|
className: "flex items-center justify-between mb-4",
|
|
703
|
-
children: [/* @__PURE__ */
|
|
705
|
+
children: [/* @__PURE__ */ T("h3", {
|
|
704
706
|
className: "text-lg font-semibold text-text-primary",
|
|
705
|
-
children:
|
|
706
|
-
}), /* @__PURE__ */
|
|
707
|
+
children: G.product.name
|
|
708
|
+
}), /* @__PURE__ */ T("button", {
|
|
707
709
|
type: "button",
|
|
708
710
|
onClick: () => {
|
|
709
|
-
|
|
711
|
+
W(!1), K(null);
|
|
710
712
|
},
|
|
711
713
|
className: "rounded-md p-1 text-text-secondary hover:text-text-primary",
|
|
712
|
-
children: /* @__PURE__ */
|
|
714
|
+
children: /* @__PURE__ */ T(C, { className: "h-5 w-5" })
|
|
713
715
|
})]
|
|
714
716
|
}),
|
|
715
|
-
/* @__PURE__ */
|
|
717
|
+
/* @__PURE__ */ T("p", {
|
|
716
718
|
className: "text-sm text-text-secondary mb-4",
|
|
717
|
-
children:
|
|
719
|
+
children: G.product.description
|
|
718
720
|
}),
|
|
719
|
-
/* @__PURE__ */
|
|
721
|
+
/* @__PURE__ */ T("p", {
|
|
720
722
|
className: "text-lg font-bold text-text-primary mb-4",
|
|
721
|
-
children:
|
|
723
|
+
children: i(G.product.price, { minimumFractionDigits: 0 })
|
|
722
724
|
}),
|
|
723
|
-
/* @__PURE__ */
|
|
725
|
+
/* @__PURE__ */ E("div", {
|
|
724
726
|
className: "mb-4",
|
|
725
|
-
children: [/* @__PURE__ */
|
|
727
|
+
children: [/* @__PURE__ */ T("label", {
|
|
726
728
|
className: "block text-sm font-medium text-text-primary mb-2",
|
|
727
729
|
children: "Quantity"
|
|
728
|
-
}), /* @__PURE__ */
|
|
730
|
+
}), /* @__PURE__ */ E("div", {
|
|
729
731
|
className: "flex items-center gap-3",
|
|
730
732
|
children: [
|
|
731
|
-
/* @__PURE__ */
|
|
733
|
+
/* @__PURE__ */ T("button", {
|
|
732
734
|
type: "button",
|
|
733
|
-
onClick: () =>
|
|
735
|
+
onClick: () => K((e) => e && {
|
|
734
736
|
...e,
|
|
735
737
|
quantity: Math.max(1, e.quantity - 1)
|
|
736
738
|
}),
|
|
737
739
|
className: "flex h-8 w-8 items-center justify-center rounded-full bg-bg-sunken text-text-primary",
|
|
738
|
-
children: /* @__PURE__ */
|
|
740
|
+
children: /* @__PURE__ */ T(v, { className: "h-4 w-4" })
|
|
739
741
|
}),
|
|
740
|
-
/* @__PURE__ */
|
|
742
|
+
/* @__PURE__ */ T("span", {
|
|
741
743
|
className: "min-w-[2ch] text-center font-medium text-text-primary",
|
|
742
|
-
children:
|
|
744
|
+
children: G.quantity
|
|
743
745
|
}),
|
|
744
|
-
/* @__PURE__ */
|
|
746
|
+
/* @__PURE__ */ T("button", {
|
|
745
747
|
type: "button",
|
|
746
|
-
onClick: () =>
|
|
748
|
+
onClick: () => K((e) => e && {
|
|
747
749
|
...e,
|
|
748
750
|
quantity: e.quantity + 1
|
|
749
751
|
}),
|
|
750
752
|
className: "flex h-8 w-8 items-center justify-center rounded-full bg-bg-sunken text-text-primary",
|
|
751
|
-
children: /* @__PURE__ */
|
|
753
|
+
children: /* @__PURE__ */ T(y, { className: "h-4 w-4" })
|
|
752
754
|
})
|
|
753
755
|
]
|
|
754
756
|
})]
|
|
755
757
|
}),
|
|
756
|
-
/* @__PURE__ */
|
|
758
|
+
/* @__PURE__ */ E("div", {
|
|
757
759
|
className: "mb-4",
|
|
758
|
-
children: [/* @__PURE__ */
|
|
760
|
+
children: [/* @__PURE__ */ T("label", {
|
|
759
761
|
className: "block text-sm font-medium text-text-primary mb-2",
|
|
760
762
|
children: "Special Instructions"
|
|
761
|
-
}), /* @__PURE__ */
|
|
762
|
-
value:
|
|
763
|
-
onChange: (e) =>
|
|
763
|
+
}), /* @__PURE__ */ T("textarea", {
|
|
764
|
+
value: G.specialInstructions,
|
|
765
|
+
onChange: (e) => K((t) => t && {
|
|
764
766
|
...t,
|
|
765
767
|
specialInstructions: e.target.value
|
|
766
768
|
}),
|
|
@@ -769,16 +771,16 @@ function O() {
|
|
|
769
771
|
rows: 3
|
|
770
772
|
})]
|
|
771
773
|
}),
|
|
772
|
-
/* @__PURE__ */
|
|
774
|
+
/* @__PURE__ */ E("button", {
|
|
773
775
|
type: "button",
|
|
774
776
|
onClick: () => {
|
|
775
|
-
|
|
777
|
+
G && (Ce(G.product, G.quantity, G.specialInstructions), W(!1), K(null), alert(`${G.product.name} added to cart`));
|
|
776
778
|
},
|
|
777
779
|
className: "w-full rounded-lg bg-foreground py-2.5 text-sm font-medium text-background hover:opacity-90 transition-opacity",
|
|
778
780
|
children: [
|
|
779
781
|
"Add to Cart -",
|
|
780
782
|
" ",
|
|
781
|
-
|
|
783
|
+
i(G.product.price * G.quantity, { minimumFractionDigits: 0 })
|
|
782
784
|
]
|
|
783
785
|
})
|
|
784
786
|
]
|
|
@@ -786,13 +788,13 @@ function O() {
|
|
|
786
788
|
})
|
|
787
789
|
})
|
|
788
790
|
]
|
|
789
|
-
}) : /* @__PURE__ */
|
|
791
|
+
}) : /* @__PURE__ */ T(n, {
|
|
790
792
|
title: "Cart Not Found",
|
|
791
|
-
children: /* @__PURE__ */
|
|
792
|
-
icon: /* @__PURE__ */
|
|
793
|
+
children: /* @__PURE__ */ T(ee, {
|
|
794
|
+
icon: /* @__PURE__ */ T(x, { className: "h-12 w-12" }),
|
|
793
795
|
title: "Cart not found",
|
|
794
796
|
description: `No cart found with ID "${O}".`,
|
|
795
|
-
action: /* @__PURE__ */
|
|
797
|
+
action: /* @__PURE__ */ T("button", {
|
|
796
798
|
type: "button",
|
|
797
799
|
onClick: () => k("/customer/discover"),
|
|
798
800
|
className: "rounded-lg bg-foreground px-4 py-2 text-sm font-medium text-background hover:opacity-90 transition-opacity",
|