@burdenoff/microfe-atheletebridge 2026.625.1 → 2026.626.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.
Files changed (91) hide show
  1. package/dist/atheletebridge/pages/HomePage.js +272 -268
  2. package/dist/atheletebridge/pages/HomePage.js.map +1 -1
  3. package/dist/atheletebridge/pages/admin/AdminAnalyticsPage.js +90 -82
  4. package/dist/atheletebridge/pages/admin/AdminAnalyticsPage.js.map +1 -1
  5. package/dist/atheletebridge/pages/admin/AdminDashboard.js +76 -44
  6. package/dist/atheletebridge/pages/admin/AdminDashboard.js.map +1 -1
  7. package/dist/atheletebridge/pages/admin/AdminFinancialPage.js +63 -55
  8. package/dist/atheletebridge/pages/admin/AdminFinancialPage.js.map +1 -1
  9. package/dist/atheletebridge/pages/admin/AdminOrdersPage.js +244 -237
  10. package/dist/atheletebridge/pages/admin/AdminOrdersPage.js.map +1 -1
  11. package/dist/atheletebridge/pages/admin/AdminProfilePage.js +59 -57
  12. package/dist/atheletebridge/pages/admin/AdminProfilePage.js.map +1 -1
  13. package/dist/atheletebridge/pages/admin/AdminSettingsPage.js +110 -106
  14. package/dist/atheletebridge/pages/admin/AdminSettingsPage.js.map +1 -1
  15. package/dist/atheletebridge/pages/admin/CartManagementPage.js +166 -159
  16. package/dist/atheletebridge/pages/admin/CartManagementPage.js.map +1 -1
  17. package/dist/atheletebridge/pages/admin/UserManagementPage.js +310 -303
  18. package/dist/atheletebridge/pages/admin/UserManagementPage.js.map +1 -1
  19. package/dist/atheletebridge/pages/cart-owner/AnalyticsDashboard.js +86 -81
  20. package/dist/atheletebridge/pages/cart-owner/AnalyticsDashboard.js.map +1 -1
  21. package/dist/atheletebridge/pages/cart-owner/BusinessSettingsPage.js +170 -166
  22. package/dist/atheletebridge/pages/cart-owner/BusinessSettingsPage.js.map +1 -1
  23. package/dist/atheletebridge/pages/cart-owner/CartOwnerDashboard.js +141 -109
  24. package/dist/atheletebridge/pages/cart-owner/CartOwnerDashboard.js.map +1 -1
  25. package/dist/atheletebridge/pages/cart-owner/CartOwnerProfilePage.js +139 -134
  26. package/dist/atheletebridge/pages/cart-owner/CartOwnerProfilePage.js.map +1 -1
  27. package/dist/atheletebridge/pages/cart-owner/CartServiceConfigPage.js +109 -107
  28. package/dist/atheletebridge/pages/cart-owner/CartServiceConfigPage.js.map +1 -1
  29. package/dist/atheletebridge/pages/cart-owner/InventoryManagementPage.js +318 -318
  30. package/dist/atheletebridge/pages/cart-owner/InventoryManagementPage.js.map +1 -1
  31. package/dist/atheletebridge/pages/cart-owner/OrderManagementPage.js +262 -262
  32. package/dist/atheletebridge/pages/cart-owner/OrderManagementPage.js.map +1 -1
  33. package/dist/atheletebridge/pages/cart-owner/StaffManagementPage.js +170 -162
  34. package/dist/atheletebridge/pages/cart-owner/StaffManagementPage.js.map +1 -1
  35. package/dist/atheletebridge/pages/common/HelpSupportPage.js +292 -298
  36. package/dist/atheletebridge/pages/common/HelpSupportPage.js.map +1 -1
  37. package/dist/atheletebridge/pages/common/NotificationCenterPage.js +99 -91
  38. package/dist/atheletebridge/pages/common/NotificationCenterPage.js.map +1 -1
  39. package/dist/atheletebridge/pages/common/SettingsPage.js +742 -734
  40. package/dist/atheletebridge/pages/common/SettingsPage.js.map +1 -1
  41. package/dist/atheletebridge/pages/customer/BookingDetailsPage.js +364 -356
  42. package/dist/atheletebridge/pages/customer/BookingDetailsPage.js.map +1 -1
  43. package/dist/atheletebridge/pages/customer/CartDetailPage.js +276 -241
  44. package/dist/atheletebridge/pages/customer/CartDetailPage.js.map +1 -1
  45. package/dist/atheletebridge/pages/customer/CartDiscoveryPage.js +260 -250
  46. package/dist/atheletebridge/pages/customer/CartDiscoveryPage.js.map +1 -1
  47. package/dist/atheletebridge/pages/customer/CheckoutPage.js +93 -89
  48. package/dist/atheletebridge/pages/customer/CheckoutPage.js.map +1 -1
  49. package/dist/atheletebridge/pages/customer/CustomerDashboard.js +430 -387
  50. package/dist/atheletebridge/pages/customer/CustomerDashboard.js.map +1 -1
  51. package/dist/atheletebridge/pages/customer/CustomerProfilePage.js +526 -490
  52. package/dist/atheletebridge/pages/customer/CustomerProfilePage.js.map +1 -1
  53. package/dist/atheletebridge/pages/customer/DirectServiceBookingPage.js +523 -512
  54. package/dist/atheletebridge/pages/customer/DirectServiceBookingPage.js.map +1 -1
  55. package/dist/atheletebridge/pages/customer/FavoritesPage.js +83 -75
  56. package/dist/atheletebridge/pages/customer/FavoritesPage.js.map +1 -1
  57. package/dist/atheletebridge/pages/customer/OrderHistoryPage.js +116 -108
  58. package/dist/atheletebridge/pages/customer/OrderHistoryPage.js.map +1 -1
  59. package/dist/atheletebridge/pages/customer/OrderTrackingPage.js +65 -61
  60. package/dist/atheletebridge/pages/customer/OrderTrackingPage.js.map +1 -1
  61. package/dist/atheletebridge/pages/customer/PaymentMethodsPage.js +80 -75
  62. package/dist/atheletebridge/pages/customer/PaymentMethodsPage.js.map +1 -1
  63. package/dist/atheletebridge/pages/customer/ReviewsPage.js +80 -72
  64. package/dist/atheletebridge/pages/customer/ReviewsPage.js.map +1 -1
  65. package/dist/atheletebridge/pages/customer/SavedAddressesPage.js +62 -55
  66. package/dist/atheletebridge/pages/customer/SavedAddressesPage.js.map +1 -1
  67. package/dist/atheletebridge/pages/investor/InvestmentDetailsPage.js +93 -61
  68. package/dist/atheletebridge/pages/investor/InvestmentDetailsPage.js.map +1 -1
  69. package/dist/atheletebridge/pages/investor/InvestmentOpportunitiesPage.js +89 -84
  70. package/dist/atheletebridge/pages/investor/InvestmentOpportunitiesPage.js.map +1 -1
  71. package/dist/atheletebridge/pages/investor/InvestorAnalyticsPage.js +60 -55
  72. package/dist/atheletebridge/pages/investor/InvestorAnalyticsPage.js.map +1 -1
  73. package/dist/atheletebridge/pages/investor/InvestorDashboard.js +345 -311
  74. package/dist/atheletebridge/pages/investor/InvestorDashboard.js.map +1 -1
  75. package/dist/atheletebridge/pages/investor/InvestorInvestmentsPage.js +37 -32
  76. package/dist/atheletebridge/pages/investor/InvestorInvestmentsPage.js.map +1 -1
  77. package/dist/atheletebridge/pages/investor/InvestorPortfolioPage.js +75 -67
  78. package/dist/atheletebridge/pages/investor/InvestorPortfolioPage.js.map +1 -1
  79. package/dist/atheletebridge/pages/investor/InvestorProfilePage.js +385 -381
  80. package/dist/atheletebridge/pages/investor/InvestorProfilePage.js.map +1 -1
  81. package/dist/atheletebridge/pages/worker/TaskDetailsPage.js +352 -319
  82. package/dist/atheletebridge/pages/worker/TaskDetailsPage.js.map +1 -1
  83. package/dist/atheletebridge/pages/worker/WorkerDashboard.js +353 -318
  84. package/dist/atheletebridge/pages/worker/WorkerDashboard.js.map +1 -1
  85. package/dist/atheletebridge/pages/worker/WorkerOrdersPage.js +133 -128
  86. package/dist/atheletebridge/pages/worker/WorkerOrdersPage.js.map +1 -1
  87. package/dist/atheletebridge/pages/worker/WorkerProfilePage.js +81 -77
  88. package/dist/atheletebridge/pages/worker/WorkerProfilePage.js.map +1 -1
  89. package/dist/atheletebridge/pages/worker/WorkerSchedulePage.js +352 -344
  90. package/dist/atheletebridge/pages/worker/WorkerSchedulePage.js.map +1 -1
  91. package/package.json +3 -3
@@ -6,8 +6,9 @@ import { formatCurrency as a } from "../../utils/formatters.js";
6
6
  import { useMemo as o, useState as s } from "react";
7
7
  import { AlertCircle as c, ArrowLeft as l, Banknote as u, CheckCircle2 as d, CreditCard as f, Heart as p, Loader2 as m, MapPin as h, ShoppingBag as g, Smartphone as _, Wallet as v } from "lucide-react";
8
8
  import { jsx as y, jsxs as b } from "react/jsx-runtime";
9
+ import { EmphasisPanel as x, PagePurpose as S } from "@burdenoff/fe-libs/ui";
9
10
  //#region src/atheletebridge/pages/customer/CheckoutPage.tsx
10
- var x = [
11
+ var C = [
11
12
  {
12
13
  id: "cash",
13
14
  label: "Cash on Delivery",
@@ -32,66 +33,66 @@ var x = [
32
33
  icon: v,
33
34
  description: "AthleteBridge Wallet Balance"
34
35
  }
35
- ], S = [
36
+ ], w = [
36
37
  0,
37
38
  10,
38
39
  20,
39
40
  30
40
41
  ];
41
- function C() {
42
- let { navigateTo: u, currentUser: _ } = e(), { data: v = [], isLoading: C } = r({ customerId: _?.id }), w = i(), T = o(() => v.find((e) => e.status === "pending") || v[0], [v]), [E, D] = s({
42
+ function T() {
43
+ let { navigateTo: u, currentUser: _ } = e(), { data: v = [], isLoading: T } = r({ customerId: _?.id }), E = i(), D = o(() => v.find((e) => e.status === "pending") || v[0], [v]), [O, k] = s({
43
44
  addressLine1: "",
44
45
  addressLine2: "",
45
46
  city: "Bangalore",
46
47
  state: "Karnataka",
47
48
  pincode: ""
48
- }), [O, k] = s("cash"), [A, j] = s({
49
+ }), [A, j] = s("cash"), [M, N] = s({
49
50
  cardNumber: "",
50
51
  expiryDate: "",
51
52
  cvv: "",
52
53
  upiId: ""
53
- }), [M, N] = s(0), [P, F] = s(""), [I, L] = s(""), [R, z] = s(!1), B = o(() => {
54
- if (!T) return {
54
+ }), [P, F] = s(0), [I, L] = s(""), [R, z] = s(""), [B, V] = s(!1), H = o(() => {
55
+ if (!D) return {
55
56
  subtotal: 0,
56
57
  deliveryFee: 0,
57
58
  tax: 0,
58
59
  total: 0
59
60
  };
60
- let e = T.subtotal, t = T.deliveryFee, n = T.taxes, r = T.discount ?? 0;
61
+ let e = D.subtotal, t = D.deliveryFee, n = D.taxes, r = D.discount ?? 0;
61
62
  return {
62
63
  subtotal: e,
63
64
  deliveryFee: t,
64
65
  tax: n,
65
66
  discount: r,
66
- total: e + t + n + M - r
67
+ total: e + t + n + P - r
67
68
  };
68
- }, [T, M]), V = o(() => T ? T.items.reduce((e, t) => e + t.quantity, 0) : 0, [T]), H = (e, t) => {
69
- D((n) => ({
69
+ }, [D, P]), U = o(() => D ? D.items.reduce((e, t) => e + t.quantity, 0) : 0, [D]), W = (e, t) => {
70
+ k((n) => ({
70
71
  ...n,
71
72
  [e]: t
72
73
  }));
73
- }, U = (e, t) => {
74
- j((n) => ({
74
+ }, G = (e, t) => {
75
+ N((n) => ({
75
76
  ...n,
76
77
  [e]: t
77
78
  }));
78
- }, W = () => {
79
- if (!E.addressLine1.trim()) return alert("Please enter delivery address"), !1;
80
- if (!E.pincode.trim() || E.pincode.length !== 6) return alert("Please enter a valid 6-digit pincode"), !1;
81
- if (O === "card") {
82
- if (!A.cardNumber || A.cardNumber.length < 16) return alert("Please enter a valid 16-digit card number"), !1;
83
- if (!A.expiryDate) return alert("Please enter card expiry date"), !1;
84
- if (!A.cvv || A.cvv.length < 3) return alert("Please enter a valid 3-digit CVV"), !1;
79
+ }, K = () => {
80
+ if (!O.addressLine1.trim()) return alert("Please enter delivery address"), !1;
81
+ if (!O.pincode.trim() || O.pincode.length !== 6) return alert("Please enter a valid 6-digit pincode"), !1;
82
+ if (A === "card") {
83
+ if (!M.cardNumber || M.cardNumber.length < 16) return alert("Please enter a valid 16-digit card number"), !1;
84
+ if (!M.expiryDate) return alert("Please enter card expiry date"), !1;
85
+ if (!M.cvv || M.cvv.length < 3) return alert("Please enter a valid 3-digit CVV"), !1;
85
86
  }
86
- return O === "upi" && !A.upiId.trim() ? (alert("Please enter UPI ID"), !1) : !0;
87
+ return A === "upi" && !M.upiId.trim() ? (alert("Please enter UPI ID"), !1) : !0;
87
88
  };
88
- return C ? /* @__PURE__ */ y(n, {
89
+ return T ? /* @__PURE__ */ y(n, {
89
90
  title: "Checkout",
90
91
  children: /* @__PURE__ */ y("div", {
91
92
  className: "flex h-[60vh] items-center justify-center",
92
93
  children: /* @__PURE__ */ y(m, { className: "h-8 w-8 animate-spin text-primary" })
93
94
  })
94
- }) : T ? /* @__PURE__ */ y(n, {
95
+ }) : D ? /* @__PURE__ */ b(n, {
95
96
  title: /* @__PURE__ */ b("div", {
96
97
  className: "flex items-center gap-3",
97
98
  children: [/* @__PURE__ */ y("button", {
@@ -102,7 +103,10 @@ function C() {
102
103
  }), /* @__PURE__ */ y("span", { children: "Checkout" })]
103
104
  }),
104
105
  description: "Review your order and complete payment",
105
- children: /* @__PURE__ */ b("div", {
106
+ children: [/* @__PURE__ */ y(S, {
107
+ className: "mb-6",
108
+ children: "The final step before your order is on its way. Confirm where it should be delivered, pick how you'll pay, add a tip or any special instructions, then review the full price breakdown and place your order."
109
+ }), /* @__PURE__ */ b("div", {
106
110
  className: "grid grid-cols-1 gap-6 lg:grid-cols-3",
107
111
  children: [/* @__PURE__ */ b("div", {
108
112
  className: "lg:col-span-2 space-y-6",
@@ -124,8 +128,8 @@ function C() {
124
128
  }), /* @__PURE__ */ y("input", {
125
129
  type: "text",
126
130
  placeholder: "Building, Street, Area",
127
- value: E.addressLine1,
128
- onChange: (e) => H("addressLine1", e.target.value),
131
+ value: O.addressLine1,
132
+ onChange: (e) => W("addressLine1", e.target.value),
129
133
  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)]"
130
134
  })] }),
131
135
  /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
@@ -134,8 +138,8 @@ function C() {
134
138
  }), /* @__PURE__ */ y("input", {
135
139
  type: "text",
136
140
  placeholder: "Apartment, Suite, Floor (Optional)",
137
- value: E.addressLine2,
138
- onChange: (e) => H("addressLine2", e.target.value),
141
+ value: O.addressLine2,
142
+ onChange: (e) => W("addressLine2", e.target.value),
139
143
  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)]"
140
144
  })] }),
141
145
  /* @__PURE__ */ b("div", {
@@ -148,8 +152,8 @@ function C() {
148
152
  })]
149
153
  }), /* @__PURE__ */ y("input", {
150
154
  type: "text",
151
- value: E.city,
152
- onChange: (e) => H("city", e.target.value),
155
+ value: O.city,
156
+ onChange: (e) => W("city", e.target.value),
153
157
  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)]"
154
158
  })] }), /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ b("label", {
155
159
  className: "block text-sm font-medium text-text-primary mb-1.5",
@@ -159,8 +163,8 @@ function C() {
159
163
  })]
160
164
  }), /* @__PURE__ */ y("input", {
161
165
  type: "text",
162
- value: E.state,
163
- onChange: (e) => H("state", e.target.value),
166
+ value: O.state,
167
+ onChange: (e) => W("state", e.target.value),
164
168
  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)]"
165
169
  })] })]
166
170
  }),
@@ -174,8 +178,8 @@ function C() {
174
178
  type: "text",
175
179
  placeholder: "560001",
176
180
  maxLength: 6,
177
- value: E.pincode,
178
- onChange: (e) => H("pincode", e.target.value.replace(/\D/g, "")),
181
+ value: O.pincode,
182
+ onChange: (e) => W("pincode", e.target.value.replace(/\D/g, "")),
179
183
  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)]"
180
184
  })] })
181
185
  ]
@@ -190,12 +194,12 @@ function C() {
190
194
  }),
191
195
  /* @__PURE__ */ y("div", {
192
196
  className: "space-y-2",
193
- children: x.map((e) => {
197
+ children: C.map((e) => {
194
198
  let n = e.icon;
195
199
  return /* @__PURE__ */ b("button", {
196
200
  type: "button",
197
- onClick: () => k(e.id),
198
- className: t("flex w-full items-center gap-4 rounded-lg border p-3 transition-colors text-left", O === e.id ? "border-foreground bg-accent" : "border-border-subtle bg-bg-surface hover:bg-accent"),
201
+ onClick: () => j(e.id),
202
+ className: t("flex w-full items-center gap-4 rounded-lg border p-3 transition-colors text-left", A === e.id ? "border-foreground bg-accent" : "border-border-subtle bg-bg-surface hover:bg-accent"),
199
203
  children: [
200
204
  /* @__PURE__ */ y("div", {
201
205
  className: "flex h-9 w-9 shrink-0 items-center justify-center rounded-md bg-bg-sunken",
@@ -211,12 +215,12 @@ function C() {
211
215
  children: e.description
212
216
  })]
213
217
  }),
214
- O === e.id && /* @__PURE__ */ y(d, { className: "h-5 w-5 text-text-primary shrink-0" })
218
+ A === e.id && /* @__PURE__ */ y(d, { className: "h-5 w-5 text-text-primary shrink-0" })
215
219
  ]
216
220
  }, e.id);
217
221
  })
218
222
  }),
219
- O === "card" && /* @__PURE__ */ b("div", {
223
+ A === "card" && /* @__PURE__ */ b("div", {
220
224
  className: "mt-4 space-y-4 border-t border-border-subtle pt-4",
221
225
  children: [/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ b("label", {
222
226
  className: "block text-sm font-medium text-text-primary mb-1.5",
@@ -228,8 +232,8 @@ function C() {
228
232
  type: "text",
229
233
  placeholder: "1234 5678 9012 3456",
230
234
  maxLength: 16,
231
- value: A.cardNumber,
232
- onChange: (e) => U("cardNumber", e.target.value.replace(/\D/g, "")),
235
+ value: M.cardNumber,
236
+ onChange: (e) => G("cardNumber", e.target.value.replace(/\D/g, "")),
233
237
  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)]"
234
238
  })] }), /* @__PURE__ */ b("div", {
235
239
  className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
@@ -243,10 +247,10 @@ function C() {
243
247
  type: "text",
244
248
  placeholder: "MM/YY",
245
249
  maxLength: 5,
246
- value: A.expiryDate,
250
+ value: M.expiryDate,
247
251
  onChange: (e) => {
248
252
  let t = e.target.value.replace(/\D/g, "");
249
- t.length >= 2 && (t = t.slice(0, 2) + "/" + t.slice(2, 4)), U("expiryDate", t);
253
+ t.length >= 2 && (t = t.slice(0, 2) + "/" + t.slice(2, 4)), G("expiryDate", t);
250
254
  },
251
255
  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)]"
252
256
  })] }), /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ b("label", {
@@ -259,13 +263,13 @@ function C() {
259
263
  type: "text",
260
264
  placeholder: "123",
261
265
  maxLength: 3,
262
- value: A.cvv,
263
- onChange: (e) => U("cvv", e.target.value.replace(/\D/g, "")),
266
+ value: M.cvv,
267
+ onChange: (e) => G("cvv", e.target.value.replace(/\D/g, "")),
264
268
  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)]"
265
269
  })] })]
266
270
  })]
267
271
  }),
268
- O === "upi" && /* @__PURE__ */ b("div", {
272
+ A === "upi" && /* @__PURE__ */ b("div", {
269
273
  className: "mt-4 border-t border-border-subtle pt-4",
270
274
  children: [/* @__PURE__ */ b("label", {
271
275
  className: "block text-sm font-medium text-text-primary mb-1.5",
@@ -276,12 +280,12 @@ function C() {
276
280
  }), /* @__PURE__ */ y("input", {
277
281
  type: "text",
278
282
  placeholder: "user@paytm",
279
- value: A.upiId,
280
- onChange: (e) => U("upiId", e.target.value),
283
+ value: M.upiId,
284
+ onChange: (e) => G("upiId", e.target.value),
281
285
  className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
282
286
  })]
283
287
  }),
284
- O === "wallet" && /* @__PURE__ */ b("div", {
288
+ A === "wallet" && /* @__PURE__ */ b("div", {
285
289
  className: "mt-4 flex items-start gap-3 rounded-lg bg-blue-500/10 p-4 border border-blue-500/20",
286
290
  children: [/* @__PURE__ */ y(c, { className: "h-4 w-4 text-blue-600 dark:text-blue-400 mt-0.5 shrink-0" }), /* @__PURE__ */ y("p", {
287
291
  className: "text-sm text-blue-600 dark:text-blue-400",
@@ -304,22 +308,22 @@ function C() {
304
308
  }),
305
309
  /* @__PURE__ */ y("div", {
306
310
  className: "flex flex-wrap gap-2 mb-3",
307
- children: S.map((e) => /* @__PURE__ */ y("button", {
311
+ children: w.map((e) => /* @__PURE__ */ y("button", {
308
312
  type: "button",
309
313
  onClick: () => {
310
- N(e), F("");
314
+ F(e), L("");
311
315
  },
312
- className: t("flex-1 min-w-[64px] rounded-lg px-3 py-2.5 text-sm font-medium transition-colors", M === e && P === "" ? "bg-foreground text-background" : "bg-bg-sunken text-text-secondary hover:bg-accent hover:text-text-primary"),
316
+ className: t("flex-1 min-w-[64px] rounded-lg px-3 py-2.5 text-sm font-medium transition-colors", P === e && I === "" ? "bg-foreground text-background" : "bg-bg-sunken text-text-secondary hover:bg-accent hover:text-text-primary"),
313
317
  children: e === 0 ? "No Tip" : `₹${e}`
314
318
  }, e))
315
319
  }),
316
320
  /* @__PURE__ */ y("input", {
317
321
  type: "number",
318
322
  placeholder: "Custom tip amount",
319
- value: P,
323
+ value: I,
320
324
  onChange: (e) => {
321
325
  let t = e.target.value;
322
- F(t), N(parseInt(t) || 0);
326
+ L(t), F(parseInt(t) || 0);
323
327
  },
324
328
  className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
325
329
  })
@@ -329,8 +333,8 @@ function C() {
329
333
  }), /* @__PURE__ */ y("textarea", {
330
334
  rows: 3,
331
335
  placeholder: "Any special requests for your order...",
332
- value: I,
333
- onChange: (e) => L(e.target.value),
336
+ value: R,
337
+ onChange: (e) => z(e.target.value),
334
338
  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"
335
339
  })] })]
336
340
  })]
@@ -338,8 +342,8 @@ function C() {
338
342
  ]
339
343
  }), /* @__PURE__ */ y("div", {
340
344
  className: "lg:col-span-1",
341
- children: /* @__PURE__ */ b("div", {
342
- className: "sticky top-6 rounded-lg border border-border-subtle bg-bg-surface p-5",
345
+ children: /* @__PURE__ */ b(x, {
346
+ className: "sticky top-6 p-5",
343
347
  children: [
344
348
  /* @__PURE__ */ y("h2", {
345
349
  className: "text-base font-semibold text-text-primary mb-4",
@@ -350,25 +354,25 @@ function C() {
350
354
  children: [/* @__PURE__ */ y("div", {
351
355
  className: "h-12 w-12 rounded-md bg-bg-sunken overflow-hidden",
352
356
  children: /* @__PURE__ */ y("img", {
353
- src: T.cartImage,
354
- alt: T.cartName,
357
+ src: D.cartImage,
358
+ alt: D.cartName,
355
359
  className: "h-full w-full object-cover"
356
360
  })
357
361
  }), /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
358
362
  className: "text-sm font-medium text-text-primary",
359
- children: T.cartName
363
+ children: D.cartName
360
364
  }), /* @__PURE__ */ b("p", {
361
365
  className: "text-xs text-text-secondary",
362
366
  children: [
363
- T.items.length,
367
+ D.items.length,
364
368
  " item",
365
- T.items.length === 1 ? "" : "s"
369
+ D.items.length === 1 ? "" : "s"
366
370
  ]
367
371
  })] })]
368
372
  }),
369
373
  /* @__PURE__ */ y("div", {
370
374
  className: "space-y-2 mb-4",
371
- children: T.items.map((e) => /* @__PURE__ */ b("div", {
375
+ children: D.items.map((e) => /* @__PURE__ */ b("div", {
372
376
  className: "flex justify-between items-start",
373
377
  children: [/* @__PURE__ */ b("div", {
374
378
  className: "flex-1 min-w-0",
@@ -405,12 +409,12 @@ function C() {
405
409
  className: "text-text-secondary",
406
410
  children: [
407
411
  "Subtotal (",
408
- V,
412
+ U,
409
413
  " items)"
410
414
  ]
411
415
  }), /* @__PURE__ */ y("span", {
412
416
  className: "text-text-primary",
413
- children: a(B.subtotal, { minimumFractionDigits: 0 })
417
+ children: a(H.subtotal, { minimumFractionDigits: 0 })
414
418
  })]
415
419
  }),
416
420
  /* @__PURE__ */ b("div", {
@@ -420,7 +424,7 @@ function C() {
420
424
  children: "Delivery Fee"
421
425
  }), /* @__PURE__ */ y("span", {
422
426
  className: "text-text-primary",
423
- children: B.deliveryFee === 0 ? "FREE" : a(B.deliveryFee, { minimumFractionDigits: 0 })
427
+ children: H.deliveryFee === 0 ? "FREE" : a(H.deliveryFee, { minimumFractionDigits: 0 })
424
428
  })]
425
429
  }),
426
430
  /* @__PURE__ */ b("div", {
@@ -430,27 +434,27 @@ function C() {
430
434
  children: "Tax"
431
435
  }), /* @__PURE__ */ y("span", {
432
436
  className: "text-text-primary",
433
- children: a(B.tax, { minimumFractionDigits: 0 })
437
+ children: a(H.tax, { minimumFractionDigits: 0 })
434
438
  })]
435
439
  }),
436
- M > 0 && /* @__PURE__ */ b("div", {
440
+ P > 0 && /* @__PURE__ */ b("div", {
437
441
  className: "flex justify-between",
438
442
  children: [/* @__PURE__ */ y("span", {
439
443
  className: "text-text-secondary",
440
444
  children: "Tip"
441
445
  }), /* @__PURE__ */ y("span", {
442
446
  className: "text-text-primary",
443
- children: a(M, { minimumFractionDigits: 0 })
447
+ children: a(P, { minimumFractionDigits: 0 })
444
448
  })]
445
449
  }),
446
- B.discount && B.discount > 0 && /* @__PURE__ */ b("div", {
450
+ H.discount && H.discount > 0 && /* @__PURE__ */ b("div", {
447
451
  className: "flex justify-between",
448
452
  children: [/* @__PURE__ */ y("span", {
449
453
  className: "text-green-600 dark:text-green-400",
450
454
  children: "Discount"
451
455
  }), /* @__PURE__ */ b("span", {
452
456
  className: "text-green-600 dark:text-green-400",
453
- children: ["-", a(B.discount, { minimumFractionDigits: 0 })]
457
+ children: ["-", a(H.discount, { minimumFractionDigits: 0 })]
454
458
  })]
455
459
  })
456
460
  ]
@@ -462,37 +466,37 @@ function C() {
462
466
  children: "Total"
463
467
  }), /* @__PURE__ */ y("span", {
464
468
  className: "text-base font-bold text-text-primary",
465
- children: a(B.total, { minimumFractionDigits: 0 })
469
+ children: a(H.total, { minimumFractionDigits: 0 })
466
470
  })]
467
471
  }),
468
472
  /* @__PURE__ */ b("button", {
469
473
  type: "button",
470
474
  onClick: async () => {
471
- if (!(!W() || !T)) try {
472
- let e = await w.mutateAsync({
473
- providerId: T.cartId,
475
+ if (!(!K() || !D)) try {
476
+ let e = await E.mutateAsync({
477
+ providerId: D.cartId,
474
478
  customerId: _?.id,
475
- items: T.items.map((e) => ({
479
+ items: D.items.map((e) => ({
476
480
  offeringId: e.id,
477
481
  quantity: e.quantity,
478
482
  customizations: e.customizations
479
483
  })),
480
- deliveryAddress: `${E.addressLine1}, ${E.addressLine2}, ${E.city}, ${E.state} - ${E.pincode}`,
481
- paymentMethod: O.toUpperCase(),
482
- notes: I,
483
- deliveryFee: B.deliveryFee,
484
- tax: B.tax,
485
- tip: M,
486
- total: B.total
484
+ deliveryAddress: `${O.addressLine1}, ${O.addressLine2}, ${O.city}, ${O.state} - ${O.pincode}`,
485
+ paymentMethod: A.toUpperCase(),
486
+ notes: R,
487
+ deliveryFee: H.deliveryFee,
488
+ tax: H.tax,
489
+ tip: P,
490
+ total: H.total
487
491
  });
488
492
  alert("Order placed successfully!"), u(`/customer/order/${e.id}`);
489
493
  } catch {
490
494
  alert("Failed to place order. Please try again.");
491
495
  }
492
496
  },
493
- disabled: w.isPending,
494
- className: t("mt-6 flex w-full items-center justify-center gap-2 rounded-lg py-3 text-sm font-medium transition-opacity", "bg-foreground text-background", w.isPending ? "opacity-60 cursor-not-allowed" : "hover:opacity-90"),
495
- children: [w.isPending ? /* @__PURE__ */ y(m, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ y(g, { className: "h-4 w-4" }), w.isPending ? "Placing Order..." : `Place Order - ${a(B.total, { minimumFractionDigits: 0 })}`]
497
+ disabled: E.isPending,
498
+ className: t("mt-6 flex w-full items-center justify-center gap-2 rounded-lg py-3 text-sm font-medium transition-opacity", "bg-foreground text-background", E.isPending ? "opacity-60 cursor-not-allowed" : "hover:opacity-90"),
499
+ children: [E.isPending ? /* @__PURE__ */ y(m, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ y(g, { className: "h-4 w-4" }), E.isPending ? "Placing Order..." : `Place Order - ${a(H.total, { minimumFractionDigits: 0 })}`]
496
500
  }),
497
501
  /* @__PURE__ */ y("p", {
498
502
  className: "mt-3 text-center text-xs text-text-secondary",
@@ -501,7 +505,7 @@ function C() {
501
505
  ]
502
506
  })
503
507
  })]
504
- })
508
+ })]
505
509
  }) : /* @__PURE__ */ y(n, {
506
510
  title: "Checkout",
507
511
  children: /* @__PURE__ */ b("div", {
@@ -527,6 +531,6 @@ function C() {
527
531
  });
528
532
  }
529
533
  //#endregion
530
- export { C as CheckoutPage };
534
+ export { T as CheckoutPage };
531
535
 
532
536
  //# sourceMappingURL=CheckoutPage.js.map