@burdenoff/microfe-healthybowl 2026.609.8 → 2026.610.1

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.
@@ -9,69 +9,44 @@ import { Breadcrumbs as s } from "../../components/Breadcrumbs.js";
9
9
  import { Modal as c } from "../../components/Modal.js";
10
10
  import "../../components/index.js";
11
11
  import { useHealthyBowlData as l } from "../../hooks/useHealthyBowlData.js";
12
- import { useHealthyBowlStore as ee } from "../../store/healthybowlStore.js";
13
- import { useToast as u } from "../../hooks/useToast.js";
14
- import { useState as d } from "react";
15
- import { ArrowLeft as f, CreditCard as te, Info as p, Minus as m, Package as h, Plus as g, ShieldCheck as _, ShoppingCart as v, Tag as y, Trash2 as b, Truck as ne } from "lucide-react";
16
- import { useNavigate as re } from "react-router-dom";
17
- import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
12
+ import { useHealthyBowlStore as u } from "../../store/healthybowlStore.js";
13
+ import { useToast as d } from "../../hooks/useToast.js";
14
+ import { useState as f } from "react";
15
+ import { ArrowLeft as p, CreditCard as m, Info as h, Minus as g, Package as _, Plus as ee, ShieldCheck as v, ShoppingCart as y, Tag as b, Trash2 as x, Truck as S } from "lucide-react";
16
+ import { useNavigate as C } from "react-router-dom";
17
+ import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
18
18
  //#region src/healthybowl/pages/marketplace/CartPage.tsx
19
- var w = () => {
20
- let { marketplaceProducts: w, createOrder: T } = l(), { currentUser: E } = e(), D = re(), { buildPath: ie } = t(), { cart: O, updateCartQuantity: k, removeFromCart: A, clearCart: j } = ee(), { toasts: M, toast: N, dismiss: P } = u(), [F, I] = d(""), [L, R] = d(!1), [z, B] = d(0), [V, H] = d(!1), [U, W] = d(!1), G = O.reduce((e, t) => e + t.price * t.quantity, 0), K = G * .08, q = O.length === 0 || G >= 100 ? 0 : 15, J = L ? z : 0, Y = G + K + q - J, X = O.reduce((e, t) => e + t.quantity, 0), Z = new Set(O.map((e) => e.seller)).size, Q = () => {
21
- if (!F.trim()) {
22
- N({
23
- title: "Enter a promo code",
24
- variant: "warning"
25
- });
26
- return;
27
- }
28
- if (F.toUpperCase() === "ORGANIC10") {
29
- let e = G * .1;
30
- B(e), R(!0), N({
31
- title: "Promo code applied!",
32
- description: `You saved ${n(e)} (10% off)`,
33
- variant: "success"
34
- });
35
- } else N({
36
- title: "Invalid promo code",
37
- description: "Try \"ORGANIC10\" for 10% off",
38
- variant: "error"
39
- });
40
- }, ae = () => {
41
- I(""), R(!1), B(0), N({
42
- title: "Promo code removed",
43
- variant: "info"
44
- });
45
- }, oe = (e, t) => {
46
- A(e), N({
19
+ var D = () => {
20
+ let { marketplaceProducts: D, createOrder: O } = l(), { currentUser: k } = e(), A = C(), { buildPath: j } = t(), { cart: M, updateCartQuantity: N, removeFromCart: P, clearCart: F } = u(), { toasts: I, toast: L, dismiss: R } = d(), [z, B] = f(!1), [V, H] = f(!1), U = M.reduce((e, t) => e + t.price * t.quantity, 0), W = U * .08, G = M.length === 0 || U >= 100 ? 0 : 15, K = U + W + G, q = M.reduce((e, t) => e + t.quantity, 0), J = new Set(M.map((e) => e.seller)).size, Y = (e, t) => {
21
+ P(e), L({
47
22
  title: "Item removed",
48
23
  description: `${t} removed from cart`,
49
24
  variant: "info"
50
25
  });
51
- }, se = () => {
52
- j(), R(!1), B(0), N({
26
+ }, X = () => {
27
+ F(), L({
53
28
  title: "Cart cleared",
54
29
  description: "All items have been removed",
55
30
  variant: "info"
56
31
  });
57
- }, ce = () => {
58
- H(!0);
59
- }, le = async () => {
60
- if (O.length === 0) return;
61
- let e = E?.id;
32
+ }, Z = () => {
33
+ B(!0);
34
+ }, Q = async () => {
35
+ if (M.length === 0) return;
36
+ let e = k?.id;
62
37
  if (!e) {
63
- N({
38
+ L({
64
39
  title: "Sign in required",
65
40
  description: "We could not identify your account, so the order was not placed.",
66
41
  variant: "error"
67
42
  });
68
43
  return;
69
44
  }
70
- W(!0);
45
+ H(!0);
71
46
  try {
72
- await T({
47
+ await O({
73
48
  buyerId: e,
74
- items: O.map((e) => ({
49
+ items: M.map((e) => ({
75
50
  productId: e.productId,
76
51
  productName: e.name,
77
52
  quantity: e.quantity,
@@ -79,60 +54,58 @@ var w = () => {
79
54
  unit: e.unit,
80
55
  seller: e.seller
81
56
  })),
82
- subtotal: G,
83
- tax: K,
84
- shipping: q,
85
- total: Y,
86
- discount: L ? z : void 0,
87
- promoCode: L ? F : void 0
88
- }), j(), R(!1), B(0), H(!1), D(ie("marketplace/orders"), { state: { orderPlaced: !0 } });
57
+ subtotal: U,
58
+ tax: W,
59
+ shipping: G,
60
+ total: K
61
+ }), F(), B(!1), A(j("marketplace/orders"), { state: { orderPlaced: !0 } });
89
62
  } catch (e) {
90
- N({
63
+ L({
91
64
  title: "Could not place order",
92
65
  description: e instanceof Error ? e.message : "Failed to place order",
93
66
  variant: "error"
94
67
  });
95
68
  } finally {
96
- W(!1);
69
+ H(!1);
97
70
  }
98
- }, ue = new Set(O.map((e) => e.productId)), $ = w.filter((e) => !ue.has(e.id)).slice(0, 3);
99
- return O.length === 0 ? /* @__PURE__ */ C(r, {
71
+ }, te = new Set(M.map((e) => e.productId)), $ = D.filter((e) => !te.has(e.id)).slice(0, 3);
72
+ return M.length === 0 ? /* @__PURE__ */ E(r, {
100
73
  title: "Shopping Cart",
101
74
  children: [
102
- /* @__PURE__ */ S(s, { items: [{
75
+ /* @__PURE__ */ T(s, { items: [{
103
76
  label: "Marketplace",
104
77
  href: "/marketplace"
105
78
  }, { label: "Cart" }] }),
106
- /* @__PURE__ */ S(a, {
107
- icon: /* @__PURE__ */ S(v, { className: "h-12 w-12 text-muted-foreground" }),
79
+ /* @__PURE__ */ T(a, {
80
+ icon: /* @__PURE__ */ T(y, { className: "h-12 w-12 text-muted-foreground" }),
108
81
  title: "Your Cart is Empty",
109
82
  description: "Looks like you haven't added any products yet. Browse the marketplace to find great organic products.",
110
- action: /* @__PURE__ */ C("button", {
111
- onClick: () => D("/marketplace"),
83
+ action: /* @__PURE__ */ E("button", {
84
+ onClick: () => A("/marketplace"),
112
85
  className: "flex items-center gap-1.5 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90",
113
- children: [/* @__PURE__ */ S(f, { className: "h-4 w-4" }), " Browse Marketplace"]
86
+ children: [/* @__PURE__ */ T(p, { className: "h-4 w-4" }), " Browse Marketplace"]
114
87
  })
115
88
  }),
116
- $.length > 0 && /* @__PURE__ */ C("div", {
89
+ $.length > 0 && /* @__PURE__ */ E("div", {
117
90
  className: "mt-6",
118
- children: [/* @__PURE__ */ S("h3", {
91
+ children: [/* @__PURE__ */ T("h3", {
119
92
  className: "text-sm font-semibold text-foreground",
120
93
  children: "You might be interested in"
121
- }), /* @__PURE__ */ S("div", {
94
+ }), /* @__PURE__ */ T("div", {
122
95
  className: "mt-3 grid gap-3 sm:grid-cols-3",
123
- children: $.map((e) => /* @__PURE__ */ C("button", {
124
- onClick: () => D(`/marketplace/${e.id}`),
96
+ children: $.map((e) => /* @__PURE__ */ E("button", {
97
+ onClick: () => A(`/marketplace/${e.id}`),
125
98
  className: "flex items-center gap-3 rounded-lg border border-border bg-card p-3 text-left transition-colors hover:bg-muted/50",
126
- children: [/* @__PURE__ */ S(h, { className: "h-8 w-8 shrink-0 text-muted-foreground" }), /* @__PURE__ */ C("div", { children: [
127
- /* @__PURE__ */ S("p", {
99
+ children: [/* @__PURE__ */ T(_, { className: "h-8 w-8 shrink-0 text-muted-foreground" }), /* @__PURE__ */ E("div", { children: [
100
+ /* @__PURE__ */ T("p", {
128
101
  className: "text-sm font-medium text-foreground",
129
102
  children: e.name
130
103
  }),
131
- /* @__PURE__ */ S("p", {
104
+ /* @__PURE__ */ T("p", {
132
105
  className: "text-xs text-muted-foreground",
133
106
  children: e.seller
134
107
  }),
135
- /* @__PURE__ */ S("p", {
108
+ /* @__PURE__ */ T("p", {
136
109
  className: "mt-0.5 text-sm font-semibold text-foreground",
137
110
  children: n(e.price)
138
111
  })
@@ -140,268 +113,230 @@ var w = () => {
140
113
  }, e.id))
141
114
  })]
142
115
  }),
143
- /* @__PURE__ */ S(o, {
144
- toasts: M,
145
- onDismiss: P
116
+ /* @__PURE__ */ T(o, {
117
+ toasts: I,
118
+ onDismiss: R
146
119
  })
147
120
  ]
148
- }) : /* @__PURE__ */ C(r, {
121
+ }) : /* @__PURE__ */ E(r, {
149
122
  title: "Shopping Cart",
150
- description: `${X} item(s) in your cart`,
151
- actions: /* @__PURE__ */ C("button", {
152
- onClick: se,
123
+ description: `${q} item(s) in your cart`,
124
+ actions: /* @__PURE__ */ E("button", {
125
+ onClick: X,
153
126
  className: "flex items-center gap-1 rounded-md border border-border px-3 py-1.5 text-xs text-muted-foreground hover:border-destructive hover:text-destructive",
154
- children: [/* @__PURE__ */ S(b, { className: "h-3 w-3" }), " Clear Cart"]
127
+ children: [/* @__PURE__ */ T(x, { className: "h-3 w-3" }), " Clear Cart"]
155
128
  }),
156
129
  children: [
157
- /* @__PURE__ */ S(s, { items: [{
130
+ /* @__PURE__ */ T(s, { items: [{
158
131
  label: "Marketplace",
159
132
  href: "/marketplace"
160
133
  }, { label: "Cart" }] }),
161
- /* @__PURE__ */ C("div", {
134
+ /* @__PURE__ */ E("div", {
162
135
  className: "flex items-start gap-2 rounded-lg border border-border bg-muted/40 p-3 text-xs text-muted-foreground",
163
- children: [/* @__PURE__ */ S(p, { className: "mt-0.5 h-4 w-4 shrink-0 text-muted-foreground" }), /* @__PURE__ */ S("p", { children: "This cart is kept only for the current browser session — it isn't saved yet and resets on refresh. Placing an order records it under your account; payment is collected separately and isn't taken here." })]
136
+ children: [/* @__PURE__ */ T(h, { className: "mt-0.5 h-4 w-4 shrink-0 text-muted-foreground" }), /* @__PURE__ */ T("p", { children: "This cart is kept only for the current browser session — it isn't saved yet and resets on refresh. Placing an order records it under your account; payment is collected separately and isn't taken here." })]
164
137
  }),
165
- /* @__PURE__ */ C("div", {
138
+ /* @__PURE__ */ E("div", {
166
139
  className: "grid grid-cols-2 gap-4 lg:grid-cols-4",
167
140
  children: [
168
- /* @__PURE__ */ S(i, {
141
+ /* @__PURE__ */ T(i, {
169
142
  label: "Items in Cart",
170
- value: X,
171
- icon: /* @__PURE__ */ S(v, { className: "h-5 w-5" })
143
+ value: q,
144
+ icon: /* @__PURE__ */ T(y, { className: "h-5 w-5" })
172
145
  }),
173
- /* @__PURE__ */ S(i, {
146
+ /* @__PURE__ */ T(i, {
174
147
  label: "Unique Products",
175
- value: O.length,
176
- icon: /* @__PURE__ */ S(h, { className: "h-5 w-5" })
148
+ value: M.length,
149
+ icon: /* @__PURE__ */ T(_, { className: "h-5 w-5" })
177
150
  }),
178
- /* @__PURE__ */ S(i, {
151
+ /* @__PURE__ */ T(i, {
179
152
  label: "Sellers",
180
- value: Z,
181
- icon: /* @__PURE__ */ S(y, { className: "h-5 w-5" })
153
+ value: J,
154
+ icon: /* @__PURE__ */ T(b, { className: "h-5 w-5" })
182
155
  }),
183
- /* @__PURE__ */ S(i, {
156
+ /* @__PURE__ */ T(i, {
184
157
  label: "Subtotal",
185
- value: n(G),
186
- icon: /* @__PURE__ */ S(te, { className: "h-5 w-5" })
158
+ value: n(U),
159
+ icon: /* @__PURE__ */ T(m, { className: "h-5 w-5" })
187
160
  })
188
161
  ]
189
162
  }),
190
- /* @__PURE__ */ C("div", {
163
+ /* @__PURE__ */ E("div", {
191
164
  className: "grid gap-6 lg:grid-cols-3",
192
- children: [/* @__PURE__ */ S("div", {
165
+ children: [/* @__PURE__ */ T("div", {
193
166
  className: "space-y-3 lg:col-span-2",
194
- children: O.map((e) => /* @__PURE__ */ C("div", {
167
+ children: M.map((e) => /* @__PURE__ */ E("div", {
195
168
  className: "flex items-center gap-4 rounded-lg border border-border bg-card p-4 shadow-sm",
196
169
  children: [
197
- /* @__PURE__ */ S("div", {
170
+ /* @__PURE__ */ T("div", {
198
171
  className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-md bg-muted",
199
- children: /* @__PURE__ */ S(h, { className: "h-5 w-5 text-muted-foreground" })
172
+ children: /* @__PURE__ */ T(_, { className: "h-5 w-5 text-muted-foreground" })
200
173
  }),
201
- /* @__PURE__ */ C("div", {
174
+ /* @__PURE__ */ E("div", {
202
175
  className: "min-w-0 flex-1",
203
176
  children: [
204
- /* @__PURE__ */ S("button", {
205
- onClick: () => D(`/marketplace/${e.productId}`),
177
+ /* @__PURE__ */ T("button", {
178
+ onClick: () => A(`/marketplace/${e.productId}`),
206
179
  className: "text-sm font-semibold text-foreground hover:underline",
207
180
  children: e.name
208
181
  }),
209
- /* @__PURE__ */ S("p", {
182
+ /* @__PURE__ */ T("p", {
210
183
  className: "text-xs text-muted-foreground",
211
184
  children: e.seller
212
185
  }),
213
- /* @__PURE__ */ C("p", {
186
+ /* @__PURE__ */ E("p", {
214
187
  className: "mt-0.5 text-sm text-foreground",
215
- children: [n(e.price), /* @__PURE__ */ C("span", {
188
+ children: [n(e.price), /* @__PURE__ */ E("span", {
216
189
  className: "text-xs text-muted-foreground",
217
190
  children: [" / ", e.unit]
218
191
  })]
219
192
  })
220
193
  ]
221
194
  }),
222
- /* @__PURE__ */ C("div", {
195
+ /* @__PURE__ */ E("div", {
223
196
  className: "flex items-center gap-1.5",
224
197
  children: [
225
- /* @__PURE__ */ S("button", {
226
- onClick: () => k(e.productId, e.quantity - 1),
198
+ /* @__PURE__ */ T("button", {
199
+ onClick: () => N(e.productId, e.quantity - 1),
227
200
  className: "rounded-md border border-border p-1.5 text-muted-foreground hover:bg-muted/50 hover:text-foreground",
228
- children: /* @__PURE__ */ S(m, { className: "h-3 w-3" })
201
+ children: /* @__PURE__ */ T(g, { className: "h-3 w-3" })
229
202
  }),
230
- /* @__PURE__ */ S("span", {
203
+ /* @__PURE__ */ T("span", {
231
204
  className: "min-w-[2.5rem] text-center text-sm font-semibold text-foreground",
232
205
  children: e.quantity
233
206
  }),
234
- /* @__PURE__ */ S("button", {
235
- onClick: () => k(e.productId, e.quantity + 1),
207
+ /* @__PURE__ */ T("button", {
208
+ onClick: () => N(e.productId, e.quantity + 1),
236
209
  className: "rounded-md border border-border p-1.5 text-muted-foreground hover:bg-muted/50 hover:text-foreground",
237
- children: /* @__PURE__ */ S(g, { className: "h-3 w-3" })
210
+ children: /* @__PURE__ */ T(ee, { className: "h-3 w-3" })
238
211
  })
239
212
  ]
240
213
  }),
241
- /* @__PURE__ */ S("p", {
214
+ /* @__PURE__ */ T("p", {
242
215
  className: "w-24 text-right text-sm font-bold text-foreground",
243
216
  children: n(e.price * e.quantity)
244
217
  }),
245
- /* @__PURE__ */ S("button", {
246
- onClick: () => oe(e.productId, e.name),
218
+ /* @__PURE__ */ T("button", {
219
+ onClick: () => Y(e.productId, e.name),
247
220
  className: "rounded-md p-1.5 text-muted-foreground transition-colors hover:bg-destructive/10 hover:text-destructive",
248
- children: /* @__PURE__ */ S(b, { className: "h-4 w-4" })
221
+ children: /* @__PURE__ */ T(x, { className: "h-4 w-4" })
249
222
  })
250
223
  ]
251
224
  }, e.id))
252
- }), /* @__PURE__ */ C("div", {
225
+ }), /* @__PURE__ */ E("div", {
253
226
  className: "space-y-4",
254
- children: [/* @__PURE__ */ C("div", {
227
+ children: [/* @__PURE__ */ E("div", {
255
228
  className: "rounded-lg border border-border bg-card p-5",
256
229
  children: [
257
- /* @__PURE__ */ S("h3", {
230
+ /* @__PURE__ */ T("h3", {
258
231
  className: "text-sm font-semibold text-foreground",
259
232
  children: "Order Summary"
260
233
  }),
261
- /* @__PURE__ */ C("div", {
234
+ /* @__PURE__ */ E("div", {
262
235
  className: "mt-4 space-y-2.5 text-sm",
263
236
  children: [
264
- /* @__PURE__ */ C("div", {
237
+ /* @__PURE__ */ E("div", {
265
238
  className: "flex justify-between text-muted-foreground",
266
- children: [/* @__PURE__ */ C("span", { children: [
239
+ children: [/* @__PURE__ */ E("span", { children: [
267
240
  "Subtotal (",
268
- X,
241
+ q,
269
242
  " items)"
270
- ] }), /* @__PURE__ */ S("span", {
243
+ ] }), /* @__PURE__ */ T("span", {
271
244
  className: "text-foreground",
272
- children: n(G)
245
+ children: n(U)
273
246
  })]
274
247
  }),
275
- /* @__PURE__ */ C("div", {
248
+ /* @__PURE__ */ E("div", {
276
249
  className: "flex justify-between text-muted-foreground",
277
- children: [/* @__PURE__ */ S("span", { children: "Tax (8%)" }), /* @__PURE__ */ S("span", {
250
+ children: [/* @__PURE__ */ T("span", { children: "Tax (8%)" }), /* @__PURE__ */ T("span", {
278
251
  className: "text-foreground",
279
- children: n(K)
252
+ children: n(W)
280
253
  })]
281
254
  }),
282
- /* @__PURE__ */ C("div", {
255
+ /* @__PURE__ */ E("div", {
283
256
  className: "flex justify-between text-muted-foreground",
284
- children: [/* @__PURE__ */ C("span", {
257
+ children: [/* @__PURE__ */ E("span", {
285
258
  className: "flex items-center gap-1",
286
- children: [/* @__PURE__ */ S(ne, { className: "h-3 w-3" }), " Shipping"]
287
- }), /* @__PURE__ */ S("span", {
259
+ children: [/* @__PURE__ */ T(S, { className: "h-3 w-3" }), " Shipping"]
260
+ }), /* @__PURE__ */ T("span", {
288
261
  className: "text-foreground",
289
- children: q === 0 ? /* @__PURE__ */ S("span", {
262
+ children: G === 0 ? /* @__PURE__ */ T("span", {
290
263
  className: "font-medium text-success",
291
264
  children: "Free"
292
- }) : n(q)
265
+ }) : n(G)
293
266
  })]
294
267
  }),
295
- q > 0 && /* @__PURE__ */ S("p", {
268
+ G > 0 && /* @__PURE__ */ T("p", {
296
269
  className: "text-xs text-muted-foreground",
297
270
  children: "Free shipping on orders over $100"
298
271
  }),
299
- L && /* @__PURE__ */ C("div", {
300
- className: "flex justify-between text-success",
301
- children: [/* @__PURE__ */ C("span", {
302
- className: "flex items-center gap-1",
303
- children: [/* @__PURE__ */ S(y, { className: "h-3 w-3" }), " Promo Discount"]
304
- }), /* @__PURE__ */ C("span", { children: ["-", n(J)] })]
305
- }),
306
- /* @__PURE__ */ S("div", {
272
+ /* @__PURE__ */ T("div", {
307
273
  className: "border-t border-border pt-2.5",
308
- children: /* @__PURE__ */ C("div", {
274
+ children: /* @__PURE__ */ E("div", {
309
275
  className: "flex justify-between text-base font-bold text-foreground",
310
- children: [/* @__PURE__ */ S("span", { children: "Total" }), /* @__PURE__ */ S("span", { children: n(Y) })]
276
+ children: [/* @__PURE__ */ T("span", { children: "Total" }), /* @__PURE__ */ T("span", { children: n(K) })]
311
277
  })
312
278
  })
313
279
  ]
314
280
  }),
315
- /* @__PURE__ */ C("div", {
316
- className: "mt-4 border-t border-border pt-4",
317
- children: [/* @__PURE__ */ S("label", {
318
- className: "text-xs font-medium text-muted-foreground",
319
- children: "Promo Code"
320
- }), L ? /* @__PURE__ */ C("div", {
321
- className: "mt-1.5 flex items-center justify-between rounded-md border border-success bg-success-subtle px-3 py-2",
322
- children: [/* @__PURE__ */ C("span", {
323
- className: "text-sm font-medium text-success",
324
- children: [F.toUpperCase(), " applied"]
325
- }), /* @__PURE__ */ S("button", {
326
- onClick: ae,
327
- className: "text-xs text-success hover:text-success/80",
328
- children: "Remove"
329
- })]
330
- }) : /* @__PURE__ */ C("div", {
331
- className: "mt-1.5 flex gap-2",
332
- children: [/* @__PURE__ */ S("input", {
333
- type: "text",
334
- placeholder: "Enter code",
335
- value: F,
336
- onChange: (e) => I(e.target.value),
337
- onKeyDown: (e) => e.key === "Enter" && Q(),
338
- className: "flex-1 rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring"
339
- }), /* @__PURE__ */ S("button", {
340
- onClick: Q,
341
- className: "rounded-md border border-border px-3 py-2 text-sm font-medium text-foreground hover:bg-muted/50",
342
- children: "Apply"
343
- })]
344
- })]
345
- }),
346
- /* @__PURE__ */ S("button", {
347
- onClick: ce,
281
+ /* @__PURE__ */ T("button", {
282
+ onClick: Z,
348
283
  className: "mt-4 w-full rounded-md bg-primary py-2.5 text-sm font-medium text-primary-foreground transition-opacity hover:bg-primary/90",
349
284
  children: "Checkout"
350
285
  }),
351
- /* @__PURE__ */ S("p", {
286
+ /* @__PURE__ */ T("p", {
352
287
  className: "mt-1.5 text-center text-xs text-muted-foreground",
353
288
  children: "Placing an order records it; payment is collected separately."
354
289
  }),
355
- /* @__PURE__ */ C("button", {
356
- onClick: () => D("/marketplace"),
290
+ /* @__PURE__ */ E("button", {
291
+ onClick: () => A("/marketplace"),
357
292
  className: "mt-2 flex w-full items-center justify-center gap-1.5 rounded-md border border-border py-2 text-sm text-muted-foreground hover:text-foreground",
358
- children: [/* @__PURE__ */ S(f, { className: "h-3 w-3" }), " Continue Shopping"]
293
+ children: [/* @__PURE__ */ T(p, { className: "h-3 w-3" }), " Continue Shopping"]
359
294
  })
360
295
  ]
361
- }), /* @__PURE__ */ S("div", {
296
+ }), /* @__PURE__ */ T("div", {
362
297
  className: "rounded-lg border border-border bg-card p-4",
363
- children: /* @__PURE__ */ C("div", {
298
+ children: /* @__PURE__ */ E("div", {
364
299
  className: "space-y-2.5 text-xs text-muted-foreground",
365
300
  children: [
366
- /* @__PURE__ */ C("div", {
301
+ /* @__PURE__ */ E("div", {
367
302
  className: "flex items-center gap-2",
368
- children: [/* @__PURE__ */ S(p, { className: "h-4 w-4 shrink-0 text-muted-foreground" }), /* @__PURE__ */ S("span", { children: "Cart isn't saved yet — it resets on refresh." })]
303
+ children: [/* @__PURE__ */ T(h, { className: "h-4 w-4 shrink-0 text-muted-foreground" }), /* @__PURE__ */ T("span", { children: "Cart isn't saved yet — it resets on refresh." })]
369
304
  }),
370
- /* @__PURE__ */ C("div", {
305
+ /* @__PURE__ */ E("div", {
371
306
  className: "flex items-center gap-2",
372
- children: [/* @__PURE__ */ S(_, { className: "h-4 w-4 shrink-0 text-muted-foreground" }), /* @__PURE__ */ S("span", { children: "Placing an order records it under your account; no payment is taken here." })]
307
+ children: [/* @__PURE__ */ T(v, { className: "h-4 w-4 shrink-0 text-muted-foreground" }), /* @__PURE__ */ T("span", { children: "Placing an order records it under your account; no payment is taken here." })]
373
308
  }),
374
- /* @__PURE__ */ C("div", {
309
+ /* @__PURE__ */ E("div", {
375
310
  className: "flex items-center gap-2",
376
- children: [/* @__PURE__ */ S(h, { className: "h-4 w-4 shrink-0 text-muted-foreground" }), /* @__PURE__ */ S("span", { children: "Coordinate payment and delivery with sellers using their listing details." })]
311
+ children: [/* @__PURE__ */ T(_, { className: "h-4 w-4 shrink-0 text-muted-foreground" }), /* @__PURE__ */ T("span", { children: "Coordinate payment and delivery with sellers using their listing details." })]
377
312
  })
378
313
  ]
379
314
  })
380
315
  })]
381
316
  })]
382
317
  }),
383
- $.length > 0 && /* @__PURE__ */ C("div", {
318
+ $.length > 0 && /* @__PURE__ */ E("div", {
384
319
  className: "mt-2",
385
- children: [/* @__PURE__ */ S("h3", {
320
+ children: [/* @__PURE__ */ T("h3", {
386
321
  className: "text-sm font-semibold text-foreground",
387
322
  children: "You might also like"
388
- }), /* @__PURE__ */ S("div", {
323
+ }), /* @__PURE__ */ T("div", {
389
324
  className: "mt-3 grid gap-3 sm:grid-cols-3",
390
- children: $.map((e) => /* @__PURE__ */ C("button", {
391
- onClick: () => D(`/marketplace/${e.id}`),
325
+ children: $.map((e) => /* @__PURE__ */ E("button", {
326
+ onClick: () => A(`/marketplace/${e.id}`),
392
327
  className: "flex items-center gap-3 rounded-lg border border-border bg-card p-3 text-left transition-colors hover:bg-muted/50",
393
- children: [/* @__PURE__ */ S(h, { className: "h-8 w-8 shrink-0 text-muted-foreground" }), /* @__PURE__ */ C("div", { children: [
394
- /* @__PURE__ */ S("p", {
328
+ children: [/* @__PURE__ */ T(_, { className: "h-8 w-8 shrink-0 text-muted-foreground" }), /* @__PURE__ */ E("div", { children: [
329
+ /* @__PURE__ */ T("p", {
395
330
  className: "text-sm font-medium text-foreground",
396
331
  children: e.name
397
332
  }),
398
- /* @__PURE__ */ S("p", {
333
+ /* @__PURE__ */ T("p", {
399
334
  className: "text-xs text-muted-foreground",
400
335
  children: e.seller
401
336
  }),
402
- /* @__PURE__ */ C("p", {
337
+ /* @__PURE__ */ E("p", {
403
338
  className: "mt-0.5 text-sm font-semibold text-foreground",
404
- children: [n(e.price), /* @__PURE__ */ C("span", {
339
+ children: [n(e.price), /* @__PURE__ */ E("span", {
405
340
  className: "text-xs font-normal text-muted-foreground",
406
341
  children: [" / ", e.unit]
407
342
  })]
@@ -410,105 +345,101 @@ var w = () => {
410
345
  }, e.id))
411
346
  })]
412
347
  }),
413
- /* @__PURE__ */ S(c, {
414
- open: V,
415
- onClose: () => H(!1),
348
+ /* @__PURE__ */ T(c, {
349
+ open: z,
350
+ onClose: () => B(!1),
416
351
  title: "Place your order",
417
352
  description: "Your order will be recorded; payment is collected separately",
418
353
  size: "md",
419
- footer: /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S("button", {
420
- onClick: () => H(!1),
354
+ footer: /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("button", {
355
+ onClick: () => B(!1),
421
356
  className: "rounded-md border border-border px-4 py-2 text-sm text-muted-foreground hover:text-foreground",
422
357
  children: "Cancel"
423
- }), /* @__PURE__ */ S("button", {
424
- onClick: le,
425
- disabled: U || O.length === 0,
358
+ }), /* @__PURE__ */ T("button", {
359
+ onClick: Q,
360
+ disabled: V || M.length === 0,
426
361
  className: "rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 disabled:opacity-60",
427
- children: U ? "Placing..." : "Place Order"
362
+ children: V ? "Placing..." : "Place Order"
428
363
  })] }),
429
- children: /* @__PURE__ */ C("div", {
364
+ children: /* @__PURE__ */ E("div", {
430
365
  className: "space-y-4",
431
- children: [/* @__PURE__ */ C("div", {
366
+ children: [/* @__PURE__ */ E("div", {
432
367
  className: "flex items-start gap-3 rounded-lg border border-border bg-muted/40 p-3",
433
- children: [/* @__PURE__ */ S(p, { className: "mt-0.5 h-5 w-5 shrink-0 text-muted-foreground" }), /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
368
+ children: [/* @__PURE__ */ T(h, { className: "mt-0.5 h-5 w-5 shrink-0 text-muted-foreground" }), /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
434
369
  className: "text-sm font-medium text-foreground",
435
370
  children: "No payment is taken here."
436
- }), /* @__PURE__ */ S("p", {
371
+ }), /* @__PURE__ */ T("p", {
437
372
  className: "mt-0.5 text-xs text-muted-foreground",
438
373
  children: "Placing this order records it under your account with a status of \"placed\". Payment is collected separately — coordinate it and delivery directly with each seller using their listing details. Your cart is kept only for this browser session and is cleared once the order is placed."
439
374
  })] })]
440
- }), /* @__PURE__ */ C("div", {
375
+ }), /* @__PURE__ */ E("div", {
441
376
  className: "rounded-lg border border-border p-3 space-y-2 text-sm",
442
377
  children: [
443
- /* @__PURE__ */ S("p", {
378
+ /* @__PURE__ */ T("p", {
444
379
  className: "text-xs font-medium text-muted-foreground uppercase tracking-wide",
445
380
  children: "Order summary"
446
381
  }),
447
- /* @__PURE__ */ C("div", {
382
+ /* @__PURE__ */ E("div", {
448
383
  className: "flex justify-between",
449
- children: [/* @__PURE__ */ S("span", {
384
+ children: [/* @__PURE__ */ T("span", {
450
385
  className: "text-muted-foreground",
451
386
  children: "Items"
452
- }), /* @__PURE__ */ C("span", {
387
+ }), /* @__PURE__ */ E("span", {
453
388
  className: "text-foreground",
454
389
  children: [
455
- X,
390
+ q,
456
391
  " from ",
457
- Z,
392
+ J,
458
393
  " seller(s)"
459
394
  ]
460
395
  })]
461
396
  }),
462
- /* @__PURE__ */ C("div", {
397
+ /* @__PURE__ */ E("div", {
463
398
  className: "flex justify-between",
464
- children: [/* @__PURE__ */ S("span", {
399
+ children: [/* @__PURE__ */ T("span", {
465
400
  className: "text-muted-foreground",
466
401
  children: "Subtotal"
467
- }), /* @__PURE__ */ S("span", {
402
+ }), /* @__PURE__ */ T("span", {
468
403
  className: "text-foreground",
469
- children: n(G)
404
+ children: n(U)
470
405
  })]
471
406
  }),
472
- /* @__PURE__ */ C("div", {
407
+ /* @__PURE__ */ E("div", {
473
408
  className: "flex justify-between",
474
- children: [/* @__PURE__ */ S("span", {
409
+ children: [/* @__PURE__ */ T("span", {
475
410
  className: "text-muted-foreground",
476
411
  children: "Tax"
477
- }), /* @__PURE__ */ S("span", {
412
+ }), /* @__PURE__ */ T("span", {
478
413
  className: "text-foreground",
479
- children: n(K)
414
+ children: n(W)
480
415
  })]
481
416
  }),
482
- /* @__PURE__ */ C("div", {
417
+ /* @__PURE__ */ E("div", {
483
418
  className: "flex justify-between",
484
- children: [/* @__PURE__ */ S("span", {
419
+ children: [/* @__PURE__ */ T("span", {
485
420
  className: "text-muted-foreground",
486
421
  children: "Shipping"
487
- }), /* @__PURE__ */ S("span", {
422
+ }), /* @__PURE__ */ T("span", {
488
423
  className: "text-foreground",
489
- children: q === 0 ? "Free" : n(q)
424
+ children: G === 0 ? "Free" : n(G)
490
425
  })]
491
426
  }),
492
- L && /* @__PURE__ */ C("div", {
493
- className: "flex justify-between text-success",
494
- children: [/* @__PURE__ */ S("span", { children: "Discount" }), /* @__PURE__ */ C("span", { children: ["-", n(J)] })]
495
- }),
496
- /* @__PURE__ */ C("div", {
427
+ /* @__PURE__ */ E("div", {
497
428
  className: "flex justify-between border-t border-border pt-2 font-bold text-foreground",
498
- children: [/* @__PURE__ */ S("span", { children: "Estimated Total" }), /* @__PURE__ */ S("span", { children: n(Y) })]
429
+ children: [/* @__PURE__ */ T("span", { children: "Estimated Total" }), /* @__PURE__ */ T("span", { children: n(K) })]
499
430
  })
500
431
  ]
501
432
  })]
502
433
  })
503
434
  }),
504
- /* @__PURE__ */ S(o, {
505
- toasts: M,
506
- onDismiss: P
435
+ /* @__PURE__ */ T(o, {
436
+ toasts: I,
437
+ onDismiss: R
507
438
  })
508
439
  ]
509
440
  });
510
441
  };
511
442
  //#endregion
512
- export { w as CartPage };
443
+ export { D as CartPage };
513
444
 
514
445
  //# sourceMappingURL=CartPage.js.map