@burdenoff/microfe-coolandlovely 2026.625.2 → 2026.628.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 (165) hide show
  1. package/dist/coolandlovely/CoolAndLovelyRoot.js +66 -122
  2. package/dist/coolandlovely/CoolAndLovelyRoot.js.map +1 -1
  3. package/dist/coolandlovely/CoolAndLovelyRoutes.js +87 -175
  4. package/dist/coolandlovely/CoolAndLovelyRoutes.js.map +1 -1
  5. package/dist/coolandlovely/components/Field.js +81 -0
  6. package/dist/coolandlovely/components/Field.js.map +1 -0
  7. package/dist/coolandlovely/components/StateViews.js +34 -0
  8. package/dist/coolandlovely/components/StateViews.js.map +1 -0
  9. package/dist/coolandlovely/components/StatusBadge.js +25 -22
  10. package/dist/coolandlovely/components/StatusBadge.js.map +1 -1
  11. package/dist/coolandlovely/components/TagList.js +21 -0
  12. package/dist/coolandlovely/components/TagList.js.map +1 -0
  13. package/dist/coolandlovely/components/Thumbnail.js +29 -0
  14. package/dist/coolandlovely/components/Thumbnail.js.map +1 -0
  15. package/dist/coolandlovely/context/CoolAndLovelyContext.js +10 -10
  16. package/dist/coolandlovely/context/CoolAndLovelyContext.js.map +1 -1
  17. package/dist/coolandlovely/hooks/index.js +1 -0
  18. package/dist/coolandlovely/hooks/useCoolAndLovelyApi.js +462 -169
  19. package/dist/coolandlovely/hooks/useCoolAndLovelyApi.js.map +1 -1
  20. package/dist/coolandlovely/pages/HomePage.js +251 -845
  21. package/dist/coolandlovely/pages/HomePage.js.map +1 -1
  22. package/dist/coolandlovely/pages/brands/BrandDetailPage.js +319 -0
  23. package/dist/coolandlovely/pages/brands/BrandDetailPage.js.map +1 -0
  24. package/dist/coolandlovely/pages/brands/BrandFormPage.js +190 -0
  25. package/dist/coolandlovely/pages/brands/BrandFormPage.js.map +1 -0
  26. package/dist/coolandlovely/pages/brands/BrandsListPage.js +158 -0
  27. package/dist/coolandlovely/pages/brands/BrandsListPage.js.map +1 -0
  28. package/dist/coolandlovely/pages/collaborations/CollaborationDetailPage.js +253 -0
  29. package/dist/coolandlovely/pages/collaborations/CollaborationDetailPage.js.map +1 -0
  30. package/dist/coolandlovely/pages/collaborations/CollaborationFormPage.js +206 -0
  31. package/dist/coolandlovely/pages/collaborations/CollaborationFormPage.js.map +1 -0
  32. package/dist/coolandlovely/pages/collaborations/CollaborationsListPage.js +129 -0
  33. package/dist/coolandlovely/pages/collaborations/CollaborationsListPage.js.map +1 -0
  34. package/dist/coolandlovely/pages/collections/CollectionDetailPage.js +217 -0
  35. package/dist/coolandlovely/pages/collections/CollectionDetailPage.js.map +1 -0
  36. package/dist/coolandlovely/pages/collections/CollectionFormPage.js +217 -0
  37. package/dist/coolandlovely/pages/collections/CollectionFormPage.js.map +1 -0
  38. package/dist/coolandlovely/pages/collections/CollectionsListPage.js +122 -0
  39. package/dist/coolandlovely/pages/collections/CollectionsListPage.js.map +1 -0
  40. package/dist/coolandlovely/pages/items/StyleItemDetailPage.js +230 -0
  41. package/dist/coolandlovely/pages/items/StyleItemDetailPage.js.map +1 -0
  42. package/dist/coolandlovely/pages/items/StyleItemFormPage.js +276 -0
  43. package/dist/coolandlovely/pages/items/StyleItemFormPage.js.map +1 -0
  44. package/dist/coolandlovely/pages/items/StyleItemsListPage.js +170 -0
  45. package/dist/coolandlovely/pages/items/StyleItemsListPage.js.map +1 -0
  46. package/dist/coolandlovely/pages/lookbooks/LookbookDetailPage.js +124 -0
  47. package/dist/coolandlovely/pages/lookbooks/LookbookDetailPage.js.map +1 -0
  48. package/dist/coolandlovely/pages/lookbooks/LookbooksListPage.js +156 -0
  49. package/dist/coolandlovely/pages/lookbooks/LookbooksListPage.js.map +1 -0
  50. package/dist/coolandlovely/pages/looks/LookDetailPage.js +238 -0
  51. package/dist/coolandlovely/pages/looks/LookDetailPage.js.map +1 -0
  52. package/dist/coolandlovely/pages/looks/LookFormPage.js +209 -0
  53. package/dist/coolandlovely/pages/looks/LookFormPage.js.map +1 -0
  54. package/dist/coolandlovely/pages/looks/LooksListPage.js +181 -0
  55. package/dist/coolandlovely/pages/looks/LooksListPage.js.map +1 -0
  56. package/dist/coolandlovely/pages/profile/StyleProfilePage.js +224 -0
  57. package/dist/coolandlovely/pages/profile/StyleProfilePage.js.map +1 -0
  58. package/dist/coolandlovely/pages/wardrobe/WardrobeFormPage.js +173 -0
  59. package/dist/coolandlovely/pages/wardrobe/WardrobeFormPage.js.map +1 -0
  60. package/dist/coolandlovely/pages/wardrobe/WardrobeListPage.js +172 -0
  61. package/dist/coolandlovely/pages/wardrobe/WardrobeListPage.js.map +1 -0
  62. package/dist/coolandlovely/store/coolandlovelyStore.js +2 -6
  63. package/dist/coolandlovely/store/coolandlovelyStore.js.map +1 -1
  64. package/dist/coolandlovely/utils/formatters.js +31 -23
  65. package/dist/coolandlovely/utils/formatters.js.map +1 -1
  66. package/dist/coolandlovely/utils/icons.js +34 -0
  67. package/dist/coolandlovely/utils/icons.js.map +1 -0
  68. package/dist/index.js +4 -4
  69. package/package.json +1 -1
  70. package/dist/coolandlovely/components/InvestmentCard.js +0 -98
  71. package/dist/coolandlovely/components/InvestmentCard.js.map +0 -1
  72. package/dist/coolandlovely/components/RatingDisplay.js +0 -35
  73. package/dist/coolandlovely/components/RatingDisplay.js.map +0 -1
  74. package/dist/coolandlovely/mocks/data.js +0 -1517
  75. package/dist/coolandlovely/mocks/data.js.map +0 -1
  76. package/dist/coolandlovely/mocks/users.js +0 -34
  77. package/dist/coolandlovely/mocks/users.js.map +0 -1
  78. package/dist/coolandlovely/pages/admin/AdminAnalyticsPage.js +0 -651
  79. package/dist/coolandlovely/pages/admin/AdminAnalyticsPage.js.map +0 -1
  80. package/dist/coolandlovely/pages/admin/AdminDashboard.js +0 -673
  81. package/dist/coolandlovely/pages/admin/AdminDashboard.js.map +0 -1
  82. package/dist/coolandlovely/pages/admin/AdminFinancialPage.js +0 -427
  83. package/dist/coolandlovely/pages/admin/AdminFinancialPage.js.map +0 -1
  84. package/dist/coolandlovely/pages/admin/AdminOrdersPage.js +0 -665
  85. package/dist/coolandlovely/pages/admin/AdminOrdersPage.js.map +0 -1
  86. package/dist/coolandlovely/pages/admin/AdminProfilePage.js +0 -264
  87. package/dist/coolandlovely/pages/admin/AdminProfilePage.js.map +0 -1
  88. package/dist/coolandlovely/pages/admin/AdminSettingsPage.js +0 -654
  89. package/dist/coolandlovely/pages/admin/AdminSettingsPage.js.map +0 -1
  90. package/dist/coolandlovely/pages/admin/CartManagementPage.js +0 -874
  91. package/dist/coolandlovely/pages/admin/CartManagementPage.js.map +0 -1
  92. package/dist/coolandlovely/pages/admin/UserManagementPage.js +0 -898
  93. package/dist/coolandlovely/pages/admin/UserManagementPage.js.map +0 -1
  94. package/dist/coolandlovely/pages/cart-owner/AnalyticsDashboard.js +0 -842
  95. package/dist/coolandlovely/pages/cart-owner/AnalyticsDashboard.js.map +0 -1
  96. package/dist/coolandlovely/pages/cart-owner/BusinessSettingsPage.js +0 -705
  97. package/dist/coolandlovely/pages/cart-owner/BusinessSettingsPage.js.map +0 -1
  98. package/dist/coolandlovely/pages/cart-owner/CartOwnerDashboard.js +0 -802
  99. package/dist/coolandlovely/pages/cart-owner/CartOwnerDashboard.js.map +0 -1
  100. package/dist/coolandlovely/pages/cart-owner/CartOwnerProfilePage.js +0 -891
  101. package/dist/coolandlovely/pages/cart-owner/CartOwnerProfilePage.js.map +0 -1
  102. package/dist/coolandlovely/pages/cart-owner/CartServiceConfigPage.js +0 -639
  103. package/dist/coolandlovely/pages/cart-owner/CartServiceConfigPage.js.map +0 -1
  104. package/dist/coolandlovely/pages/cart-owner/InventoryManagementPage.js +0 -914
  105. package/dist/coolandlovely/pages/cart-owner/InventoryManagementPage.js.map +0 -1
  106. package/dist/coolandlovely/pages/cart-owner/OrderManagementPage.js +0 -882
  107. package/dist/coolandlovely/pages/cart-owner/OrderManagementPage.js.map +0 -1
  108. package/dist/coolandlovely/pages/cart-owner/StaffManagementPage.js +0 -831
  109. package/dist/coolandlovely/pages/cart-owner/StaffManagementPage.js.map +0 -1
  110. package/dist/coolandlovely/pages/common/HelpSupportPage.js +0 -1325
  111. package/dist/coolandlovely/pages/common/HelpSupportPage.js.map +0 -1
  112. package/dist/coolandlovely/pages/common/NotificationCenterPage.js +0 -671
  113. package/dist/coolandlovely/pages/common/NotificationCenterPage.js.map +0 -1
  114. package/dist/coolandlovely/pages/common/SettingsPage.js +0 -973
  115. package/dist/coolandlovely/pages/common/SettingsPage.js.map +0 -1
  116. package/dist/coolandlovely/pages/customer/BookingDetailsPage.js +0 -630
  117. package/dist/coolandlovely/pages/customer/BookingDetailsPage.js.map +0 -1
  118. package/dist/coolandlovely/pages/customer/CartDetailPage.js +0 -623
  119. package/dist/coolandlovely/pages/customer/CartDetailPage.js.map +0 -1
  120. package/dist/coolandlovely/pages/customer/CartDiscoveryPage.js +0 -558
  121. package/dist/coolandlovely/pages/customer/CartDiscoveryPage.js.map +0 -1
  122. package/dist/coolandlovely/pages/customer/CheckoutPage.js +0 -529
  123. package/dist/coolandlovely/pages/customer/CheckoutPage.js.map +0 -1
  124. package/dist/coolandlovely/pages/customer/CustomerDashboard.js +0 -538
  125. package/dist/coolandlovely/pages/customer/CustomerDashboard.js.map +0 -1
  126. package/dist/coolandlovely/pages/customer/CustomerProfilePage.js +0 -658
  127. package/dist/coolandlovely/pages/customer/CustomerProfilePage.js.map +0 -1
  128. package/dist/coolandlovely/pages/customer/DirectServiceBookingPage.js +0 -632
  129. package/dist/coolandlovely/pages/customer/DirectServiceBookingPage.js.map +0 -1
  130. package/dist/coolandlovely/pages/customer/FavoritesPage.js +0 -487
  131. package/dist/coolandlovely/pages/customer/FavoritesPage.js.map +0 -1
  132. package/dist/coolandlovely/pages/customer/OrderHistoryPage.js +0 -447
  133. package/dist/coolandlovely/pages/customer/OrderHistoryPage.js.map +0 -1
  134. package/dist/coolandlovely/pages/customer/OrderTrackingPage.js +0 -425
  135. package/dist/coolandlovely/pages/customer/OrderTrackingPage.js.map +0 -1
  136. package/dist/coolandlovely/pages/customer/PaymentMethodsPage.js +0 -494
  137. package/dist/coolandlovely/pages/customer/PaymentMethodsPage.js.map +0 -1
  138. package/dist/coolandlovely/pages/customer/ReviewsPage.js +0 -616
  139. package/dist/coolandlovely/pages/customer/ReviewsPage.js.map +0 -1
  140. package/dist/coolandlovely/pages/customer/SavedAddressesPage.js +0 -449
  141. package/dist/coolandlovely/pages/customer/SavedAddressesPage.js.map +0 -1
  142. package/dist/coolandlovely/pages/investor/InvestmentDetailsPage.js +0 -887
  143. package/dist/coolandlovely/pages/investor/InvestmentDetailsPage.js.map +0 -1
  144. package/dist/coolandlovely/pages/investor/InvestmentOpportunitiesPage.js +0 -945
  145. package/dist/coolandlovely/pages/investor/InvestmentOpportunitiesPage.js.map +0 -1
  146. package/dist/coolandlovely/pages/investor/InvestorAnalyticsPage.js +0 -687
  147. package/dist/coolandlovely/pages/investor/InvestorAnalyticsPage.js.map +0 -1
  148. package/dist/coolandlovely/pages/investor/InvestorDashboard.js +0 -455
  149. package/dist/coolandlovely/pages/investor/InvestorDashboard.js.map +0 -1
  150. package/dist/coolandlovely/pages/investor/InvestorInvestmentsPage.js +0 -405
  151. package/dist/coolandlovely/pages/investor/InvestorInvestmentsPage.js.map +0 -1
  152. package/dist/coolandlovely/pages/investor/InvestorPortfolioPage.js +0 -602
  153. package/dist/coolandlovely/pages/investor/InvestorPortfolioPage.js.map +0 -1
  154. package/dist/coolandlovely/pages/investor/InvestorProfilePage.js +0 -1070
  155. package/dist/coolandlovely/pages/investor/InvestorProfilePage.js.map +0 -1
  156. package/dist/coolandlovely/pages/worker/TaskDetailsPage.js +0 -533
  157. package/dist/coolandlovely/pages/worker/TaskDetailsPage.js.map +0 -1
  158. package/dist/coolandlovely/pages/worker/WorkerDashboard.js +0 -671
  159. package/dist/coolandlovely/pages/worker/WorkerDashboard.js.map +0 -1
  160. package/dist/coolandlovely/pages/worker/WorkerOrdersPage.js +0 -680
  161. package/dist/coolandlovely/pages/worker/WorkerOrdersPage.js.map +0 -1
  162. package/dist/coolandlovely/pages/worker/WorkerProfilePage.js +0 -692
  163. package/dist/coolandlovely/pages/worker/WorkerProfilePage.js.map +0 -1
  164. package/dist/coolandlovely/pages/worker/WorkerSchedulePage.js +0 -583
  165. package/dist/coolandlovely/pages/worker/WorkerSchedulePage.js.map +0 -1
@@ -1,529 +0,0 @@
1
- import { useCoolAndLovely as e } from "../../context/CoolAndLovelyContext.js";
2
- import { cn as t } from "../../utils/cn.js";
3
- import { PageLayout as n } from "../../components/PageLayout.js";
4
- import { EmptyState as r } from "../../components/EmptyState.js";
5
- import { useOrders as i, usePlaceOrder as a } from "../../hooks/useCoolAndLovelyApi.js";
6
- import { formatCurrency as o } from "../../utils/formatters.js";
7
- import { useMemo as s, useState as c } from "react";
8
- import { AlertCircle as l, ArrowLeft as u, Banknote as d, CheckCircle2 as f, CreditCard as p, Heart as m, Loader2 as h, MapPin as g, ShoppingBag as _, Smartphone as v, Wallet as y } from "lucide-react";
9
- import { jsx as b, jsxs as x } from "react/jsx-runtime";
10
- import { EmphasisPanel as S, PagePurpose as C } from "@burdenoff/fe-libs/ui";
11
- //#region src/coolandlovely/pages/customer/CheckoutPage.tsx
12
- var w = [
13
- {
14
- id: "cash",
15
- label: "Cash on Delivery",
16
- icon: d,
17
- description: "Pay when you receive"
18
- },
19
- {
20
- id: "card",
21
- label: "Credit / Debit Card",
22
- icon: p,
23
- description: "Visa, Mastercard, RuPay"
24
- },
25
- {
26
- id: "upi",
27
- label: "UPI",
28
- icon: v,
29
- description: "Google Pay, PhonePe, Paytm"
30
- },
31
- {
32
- id: "wallet",
33
- label: "Digital Wallet",
34
- icon: y,
35
- description: "CoolAndLovely Wallet Balance"
36
- }
37
- ], T = [
38
- 0,
39
- 10,
40
- 20,
41
- 30
42
- ];
43
- function E() {
44
- let { navigateTo: d, currentUser: v } = e(), { data: y = [], isLoading: E } = i({ customerId: v?.id }), D = a(), O = s(() => y.find((e) => e.status === "pending") || y[0], [y]), [k, A] = c({
45
- addressLine1: "",
46
- addressLine2: "",
47
- city: "Bangalore",
48
- state: "Karnataka",
49
- pincode: ""
50
- }), [j, M] = c("cash"), [N, P] = c({
51
- cardNumber: "",
52
- expiryDate: "",
53
- cvv: "",
54
- upiId: ""
55
- }), [F, I] = c(0), [L, R] = c(""), [z, B] = c(""), [V, H] = c(!1), U = s(() => {
56
- if (!O) return {
57
- subtotal: 0,
58
- deliveryFee: 0,
59
- tax: 0,
60
- total: 0
61
- };
62
- let e = O.subtotal, t = O.deliveryFee, n = O.taxes, r = O.discount ?? 0;
63
- return {
64
- subtotal: e,
65
- deliveryFee: t,
66
- tax: n,
67
- discount: r,
68
- total: e + t + n + F - r
69
- };
70
- }, [O, F]), W = s(() => O ? O.items.reduce((e, t) => e + t.quantity, 0) : 0, [O]), G = (e, t) => {
71
- A((n) => ({
72
- ...n,
73
- [e]: t
74
- }));
75
- }, K = (e, t) => {
76
- P((n) => ({
77
- ...n,
78
- [e]: t
79
- }));
80
- }, q = () => {
81
- if (!k.addressLine1.trim()) return alert("Please enter delivery address"), !1;
82
- if (!k.pincode.trim() || k.pincode.length !== 6) return alert("Please enter a valid 6-digit pincode"), !1;
83
- if (j === "card") {
84
- if (!N.cardNumber || N.cardNumber.length < 16) return alert("Please enter a valid 16-digit card number"), !1;
85
- if (!N.expiryDate) return alert("Please enter card expiry date"), !1;
86
- if (!N.cvv || N.cvv.length < 3) return alert("Please enter a valid 3-digit CVV"), !1;
87
- }
88
- return j === "upi" && !N.upiId.trim() ? (alert("Please enter UPI ID"), !1) : !0;
89
- };
90
- return E ? /* @__PURE__ */ b(n, {
91
- title: "Checkout",
92
- children: /* @__PURE__ */ b("div", {
93
- className: "flex h-[60vh] items-center justify-center",
94
- children: /* @__PURE__ */ b(h, { className: "h-8 w-8 animate-spin text-primary" })
95
- })
96
- }) : O ? /* @__PURE__ */ x(n, {
97
- title: /* @__PURE__ */ x("div", {
98
- className: "flex items-center gap-3",
99
- children: [/* @__PURE__ */ b("button", {
100
- type: "button",
101
- onClick: () => d("/customer/carts"),
102
- className: "rounded-md p-1 text-text-secondary hover:bg-accent hover:text-text-primary transition-colors",
103
- children: /* @__PURE__ */ b(u, { className: "h-5 w-5" })
104
- }), /* @__PURE__ */ b("span", { children: "Checkout" })]
105
- }),
106
- description: "Review your order and complete payment",
107
- children: [/* @__PURE__ */ b(C, {
108
- className: "mb-6",
109
- icon: /* @__PURE__ */ b(_, { className: "h-4 w-4" }),
110
- children: "The final step before your order is placed. Confirm where it should go, choose how you want to pay, add a tip or special instructions, and review the full price breakdown on the right before you place the order."
111
- }), /* @__PURE__ */ x("div", {
112
- className: "grid grid-cols-1 gap-6 lg:grid-cols-3",
113
- children: [/* @__PURE__ */ x("div", {
114
- className: "lg:col-span-2 space-y-6",
115
- children: [
116
- /* @__PURE__ */ x("section", {
117
- className: "rounded-lg border border-border-seam bg-bg-surface p-5 bg-gloss-card shadow-pop",
118
- children: [/* @__PURE__ */ x("h2", {
119
- className: "text-base font-semibold text-text-primary mb-4 flex items-center gap-2",
120
- children: [/* @__PURE__ */ b(g, { className: "h-4 w-4 text-text-secondary" }), "Delivery Address"]
121
- }), /* @__PURE__ */ x("div", {
122
- className: "space-y-4",
123
- children: [
124
- /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ x("label", {
125
- className: "block text-sm font-medium text-text-primary mb-1.5",
126
- children: ["Address Line 1 ", /* @__PURE__ */ b("span", {
127
- className: "text-status-error-text",
128
- children: "*"
129
- })]
130
- }), /* @__PURE__ */ b("input", {
131
- type: "text",
132
- placeholder: "Building, Street, Area",
133
- value: k.addressLine1,
134
- onChange: (e) => G("addressLine1", e.target.value),
135
- 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)]"
136
- })] }),
137
- /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
138
- className: "block text-sm font-medium text-text-primary mb-1.5",
139
- children: "Address Line 2"
140
- }), /* @__PURE__ */ b("input", {
141
- type: "text",
142
- placeholder: "Apartment, Suite, Floor (Optional)",
143
- value: k.addressLine2,
144
- onChange: (e) => G("addressLine2", e.target.value),
145
- 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)]"
146
- })] }),
147
- /* @__PURE__ */ x("div", {
148
- className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
149
- children: [/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ x("label", {
150
- className: "block text-sm font-medium text-text-primary mb-1.5",
151
- children: ["City ", /* @__PURE__ */ b("span", {
152
- className: "text-status-error-text",
153
- children: "*"
154
- })]
155
- }), /* @__PURE__ */ b("input", {
156
- type: "text",
157
- value: k.city,
158
- onChange: (e) => G("city", e.target.value),
159
- 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)]"
160
- })] }), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ x("label", {
161
- className: "block text-sm font-medium text-text-primary mb-1.5",
162
- children: ["State ", /* @__PURE__ */ b("span", {
163
- className: "text-status-error-text",
164
- children: "*"
165
- })]
166
- }), /* @__PURE__ */ b("input", {
167
- type: "text",
168
- value: k.state,
169
- onChange: (e) => G("state", e.target.value),
170
- 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)]"
171
- })] })]
172
- }),
173
- /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ x("label", {
174
- className: "block text-sm font-medium text-text-primary mb-1.5",
175
- children: ["Pincode ", /* @__PURE__ */ b("span", {
176
- className: "text-status-error-text",
177
- children: "*"
178
- })]
179
- }), /* @__PURE__ */ b("input", {
180
- type: "text",
181
- placeholder: "560001",
182
- maxLength: 6,
183
- value: k.pincode,
184
- onChange: (e) => G("pincode", e.target.value.replace(/\D/g, "")),
185
- className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
186
- })] })
187
- ]
188
- })]
189
- }),
190
- /* @__PURE__ */ x("section", {
191
- className: "rounded-lg border border-border-seam bg-bg-surface p-5 bg-gloss-card shadow-pop",
192
- children: [
193
- /* @__PURE__ */ x("h2", {
194
- className: "text-base font-semibold text-text-primary mb-4 flex items-center gap-2",
195
- children: [/* @__PURE__ */ b(p, { className: "h-4 w-4 text-text-secondary" }), "Payment Method"]
196
- }),
197
- /* @__PURE__ */ b("div", {
198
- className: "space-y-2",
199
- children: w.map((e) => {
200
- let n = e.icon;
201
- return /* @__PURE__ */ x("button", {
202
- type: "button",
203
- onClick: () => M(e.id),
204
- className: t("flex w-full items-center gap-4 rounded-lg border p-3 transition-colors text-left", j === e.id ? "border-foreground bg-accent" : "border-border-subtle bg-bg-surface hover:bg-accent"),
205
- children: [
206
- /* @__PURE__ */ b("div", {
207
- className: "flex h-9 w-9 shrink-0 items-center justify-center rounded-md bg-bg-sunken",
208
- children: /* @__PURE__ */ b(n, { className: "h-4 w-4 text-text-secondary" })
209
- }),
210
- /* @__PURE__ */ x("div", {
211
- className: "flex-1 min-w-0",
212
- children: [/* @__PURE__ */ b("p", {
213
- className: "text-sm font-medium text-text-primary",
214
- children: e.label
215
- }), /* @__PURE__ */ b("p", {
216
- className: "text-xs text-text-secondary",
217
- children: e.description
218
- })]
219
- }),
220
- j === e.id && /* @__PURE__ */ b(f, { className: "h-5 w-5 text-text-primary shrink-0" })
221
- ]
222
- }, e.id);
223
- })
224
- }),
225
- j === "card" && /* @__PURE__ */ x("div", {
226
- className: "mt-4 space-y-4 border-t border-border-subtle pt-4",
227
- children: [/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ x("label", {
228
- className: "block text-sm font-medium text-text-primary mb-1.5",
229
- children: ["Card Number ", /* @__PURE__ */ b("span", {
230
- className: "text-status-error-text",
231
- children: "*"
232
- })]
233
- }), /* @__PURE__ */ b("input", {
234
- type: "text",
235
- placeholder: "1234 5678 9012 3456",
236
- maxLength: 16,
237
- value: N.cardNumber,
238
- onChange: (e) => K("cardNumber", e.target.value.replace(/\D/g, "")),
239
- 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)]"
240
- })] }), /* @__PURE__ */ x("div", {
241
- className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
242
- children: [/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ x("label", {
243
- className: "block text-sm font-medium text-text-primary mb-1.5",
244
- children: ["Expiry Date ", /* @__PURE__ */ b("span", {
245
- className: "text-status-error-text",
246
- children: "*"
247
- })]
248
- }), /* @__PURE__ */ b("input", {
249
- type: "text",
250
- placeholder: "MM/YY",
251
- maxLength: 5,
252
- value: N.expiryDate,
253
- onChange: (e) => {
254
- let t = e.target.value.replace(/\D/g, "");
255
- t.length >= 2 && (t = t.slice(0, 2) + "/" + t.slice(2, 4)), K("expiryDate", t);
256
- },
257
- 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)]"
258
- })] }), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ x("label", {
259
- className: "block text-sm font-medium text-text-primary mb-1.5",
260
- children: ["CVV ", /* @__PURE__ */ b("span", {
261
- className: "text-status-error-text",
262
- children: "*"
263
- })]
264
- }), /* @__PURE__ */ b("input", {
265
- type: "text",
266
- placeholder: "123",
267
- maxLength: 3,
268
- value: N.cvv,
269
- onChange: (e) => K("cvv", e.target.value.replace(/\D/g, "")),
270
- 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)]"
271
- })] })]
272
- })]
273
- }),
274
- j === "upi" && /* @__PURE__ */ x("div", {
275
- className: "mt-4 border-t border-border-subtle pt-4",
276
- children: [/* @__PURE__ */ x("label", {
277
- className: "block text-sm font-medium text-text-primary mb-1.5",
278
- children: ["UPI ID ", /* @__PURE__ */ b("span", {
279
- className: "text-status-error-text",
280
- children: "*"
281
- })]
282
- }), /* @__PURE__ */ b("input", {
283
- type: "text",
284
- placeholder: "user@paytm",
285
- value: N.upiId,
286
- onChange: (e) => K("upiId", e.target.value),
287
- 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)]"
288
- })]
289
- }),
290
- j === "wallet" && /* @__PURE__ */ x("div", {
291
- className: "mt-4 flex items-start gap-3 rounded-lg bg-accent-blue-subtle/10 p-4 border border-accent-blue-subtle/20",
292
- children: [/* @__PURE__ */ b(l, { className: "h-4 w-4 text-accent-blue mt-0.5 shrink-0" }), /* @__PURE__ */ b("p", {
293
- className: "text-sm text-accent-blue",
294
- children: "Digital wallet integration coming soon. Please choose another payment method."
295
- })]
296
- })
297
- ]
298
- }),
299
- /* @__PURE__ */ x("section", {
300
- className: "rounded-lg border border-border-seam bg-bg-surface p-5 bg-gloss-card shadow-pop",
301
- children: [/* @__PURE__ */ x("h2", {
302
- className: "text-base font-semibold text-text-primary mb-4 flex items-center gap-2",
303
- children: [/* @__PURE__ */ b(m, { className: "h-4 w-4 text-text-secondary" }), "Additional Options"]
304
- }), /* @__PURE__ */ x("div", {
305
- className: "space-y-5",
306
- children: [/* @__PURE__ */ x("div", { children: [
307
- /* @__PURE__ */ b("label", {
308
- className: "block text-sm font-medium text-text-primary mb-2",
309
- children: "Tip for delivery partner"
310
- }),
311
- /* @__PURE__ */ b("div", {
312
- className: "flex flex-wrap gap-2 mb-3",
313
- children: T.map((e) => /* @__PURE__ */ b("button", {
314
- type: "button",
315
- onClick: () => {
316
- I(e), R("");
317
- },
318
- className: t("flex-1 min-w-[64px] rounded-lg px-3 py-2.5 text-sm font-medium transition-colors", F === e && L === "" ? "bg-foreground text-background" : "bg-bg-sunken text-text-secondary hover:bg-accent hover:text-text-primary"),
319
- children: e === 0 ? "No Tip" : `₹${e}`
320
- }, e))
321
- }),
322
- /* @__PURE__ */ b("input", {
323
- type: "number",
324
- placeholder: "Custom tip amount",
325
- value: L,
326
- onChange: (e) => {
327
- let t = e.target.value;
328
- R(t), I(parseInt(t) || 0);
329
- },
330
- 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)]"
331
- })
332
- ] }), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
333
- className: "block text-sm font-medium text-text-primary mb-2",
334
- children: "Special Instructions"
335
- }), /* @__PURE__ */ b("textarea", {
336
- rows: 3,
337
- placeholder: "Any special requests for your order...",
338
- value: z,
339
- onChange: (e) => B(e.target.value),
340
- 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"
341
- })] })]
342
- })]
343
- })
344
- ]
345
- }), /* @__PURE__ */ b("div", {
346
- className: "lg:col-span-1",
347
- children: /* @__PURE__ */ x(S, {
348
- className: "sticky top-6 p-5",
349
- children: [
350
- /* @__PURE__ */ b("h2", {
351
- className: "text-base font-semibold text-text-primary mb-4",
352
- children: "Order Summary"
353
- }),
354
- /* @__PURE__ */ x("div", {
355
- className: "flex items-center gap-3 mb-4 pb-4 border-b border-border-subtle",
356
- children: [/* @__PURE__ */ b("div", {
357
- className: "h-12 w-12 rounded-md bg-bg-sunken overflow-hidden",
358
- children: /* @__PURE__ */ b("img", {
359
- src: O.cartImage,
360
- alt: O.cartName,
361
- className: "h-full w-full object-cover"
362
- })
363
- }), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
364
- className: "text-sm font-medium text-text-primary",
365
- children: O.cartName
366
- }), /* @__PURE__ */ x("p", {
367
- className: "text-xs text-text-secondary",
368
- children: [
369
- O.items.length,
370
- " item",
371
- O.items.length === 1 ? "" : "s"
372
- ]
373
- })] })]
374
- }),
375
- /* @__PURE__ */ b("div", {
376
- className: "space-y-2 mb-4",
377
- children: O.items.map((e) => /* @__PURE__ */ x("div", {
378
- className: "flex justify-between items-start",
379
- children: [/* @__PURE__ */ x("div", {
380
- className: "flex-1 min-w-0",
381
- children: [
382
- /* @__PURE__ */ b("p", {
383
- className: "text-sm text-text-primary",
384
- children: e.name
385
- }),
386
- e.customizations && e.customizations.length > 0 && /* @__PURE__ */ b("p", {
387
- className: "text-xs text-text-secondary mt-0.5",
388
- children: e.customizations.join(", ")
389
- }),
390
- /* @__PURE__ */ x("p", {
391
- className: "text-xs text-text-secondary",
392
- children: [
393
- o(e.price, { minimumFractionDigits: 0 }),
394
- " x ",
395
- e.quantity
396
- ]
397
- })
398
- ]
399
- }), /* @__PURE__ */ b("span", {
400
- className: "text-sm font-medium text-text-primary",
401
- children: o(e.price * e.quantity, { minimumFractionDigits: 0 })
402
- })]
403
- }, e.id))
404
- }),
405
- /* @__PURE__ */ x("div", {
406
- className: "border-t border-border-subtle pt-4 space-y-2.5 text-sm",
407
- children: [
408
- /* @__PURE__ */ x("div", {
409
- className: "flex justify-between",
410
- children: [/* @__PURE__ */ x("span", {
411
- className: "text-text-secondary",
412
- children: [
413
- "Subtotal (",
414
- W,
415
- " items)"
416
- ]
417
- }), /* @__PURE__ */ b("span", {
418
- className: "text-text-primary",
419
- children: o(U.subtotal, { minimumFractionDigits: 0 })
420
- })]
421
- }),
422
- /* @__PURE__ */ x("div", {
423
- className: "flex justify-between",
424
- children: [/* @__PURE__ */ b("span", {
425
- className: "text-text-secondary",
426
- children: "Delivery Fee"
427
- }), /* @__PURE__ */ b("span", {
428
- className: "text-text-primary",
429
- children: U.deliveryFee === 0 ? "FREE" : o(U.deliveryFee, { minimumFractionDigits: 0 })
430
- })]
431
- }),
432
- /* @__PURE__ */ x("div", {
433
- className: "flex justify-between",
434
- children: [/* @__PURE__ */ b("span", {
435
- className: "text-text-secondary",
436
- children: "Tax"
437
- }), /* @__PURE__ */ b("span", {
438
- className: "text-text-primary",
439
- children: o(U.tax, { minimumFractionDigits: 0 })
440
- })]
441
- }),
442
- F > 0 && /* @__PURE__ */ x("div", {
443
- className: "flex justify-between",
444
- children: [/* @__PURE__ */ b("span", {
445
- className: "text-text-secondary",
446
- children: "Tip"
447
- }), /* @__PURE__ */ b("span", {
448
- className: "text-text-primary",
449
- children: o(F, { minimumFractionDigits: 0 })
450
- })]
451
- }),
452
- U.discount && U.discount > 0 && /* @__PURE__ */ x("div", {
453
- className: "flex justify-between",
454
- children: [/* @__PURE__ */ b("span", {
455
- className: "text-status-success-text",
456
- children: "Discount"
457
- }), /* @__PURE__ */ x("span", {
458
- className: "text-status-success-text",
459
- children: ["-", o(U.discount, { minimumFractionDigits: 0 })]
460
- })]
461
- })
462
- ]
463
- }),
464
- /* @__PURE__ */ x("div", {
465
- className: "mt-4 flex justify-between border-t border-border-subtle pt-4",
466
- children: [/* @__PURE__ */ b("span", {
467
- className: "text-base font-semibold text-text-primary",
468
- children: "Total"
469
- }), /* @__PURE__ */ b("span", {
470
- className: "text-base font-bold text-text-primary",
471
- children: o(U.total, { minimumFractionDigits: 0 })
472
- })]
473
- }),
474
- /* @__PURE__ */ x("button", {
475
- type: "button",
476
- onClick: async () => {
477
- if (!(!q() || !O)) try {
478
- let e = await D.mutateAsync({
479
- providerId: O.cartId,
480
- customerId: v?.id,
481
- items: O.items.map((e) => ({
482
- offeringId: e.id,
483
- quantity: e.quantity,
484
- customizations: e.customizations
485
- })),
486
- deliveryAddress: `${k.addressLine1}, ${k.addressLine2}, ${k.city}, ${k.state} - ${k.pincode}`,
487
- paymentMethod: j.toUpperCase(),
488
- notes: z,
489
- deliveryFee: U.deliveryFee,
490
- tax: U.tax,
491
- tip: F,
492
- total: U.total
493
- });
494
- alert("Order placed successfully!"), d(`/customer/order/${e.id}`);
495
- } catch {
496
- alert("Failed to place order. Please try again.");
497
- }
498
- },
499
- disabled: D.isPending,
500
- 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", D.isPending ? "opacity-60 cursor-not-allowed" : "hover:opacity-90"),
501
- children: [D.isPending ? /* @__PURE__ */ b(h, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ b(_, { className: "h-4 w-4" }), D.isPending ? "Placing Order..." : `Place Order - ${o(U.total, { minimumFractionDigits: 0 })}`]
502
- }),
503
- /* @__PURE__ */ b("p", {
504
- className: "mt-3 text-center text-xs text-text-secondary",
505
- children: "By placing this order, you agree to our Terms of Service and Privacy Policy"
506
- })
507
- ]
508
- })
509
- })]
510
- })]
511
- }) : /* @__PURE__ */ b(n, {
512
- title: "Checkout",
513
- children: /* @__PURE__ */ b(r, {
514
- illustration: "empty-generic",
515
- title: "Your cart is empty",
516
- description: "Add some items to proceed with checkout.",
517
- action: /* @__PURE__ */ b("button", {
518
- type: "button",
519
- onClick: () => d("/customer/carts"),
520
- className: "rounded-lg bg-foreground px-6 py-3 text-sm font-medium text-background hover:opacity-90 transition-opacity",
521
- children: "Browse Carts"
522
- })
523
- })
524
- });
525
- }
526
- //#endregion
527
- export { E as CheckoutPage };
528
-
529
- //# sourceMappingURL=CheckoutPage.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CheckoutPage.js","names":[],"sources":["../../../../src/coolandlovely/pages/customer/CheckoutPage.tsx"],"sourcesContent":["/**\n * Checkout Page\n * @module coolandlovely/pages/customer\n *\n * Full checkout flow with delivery address form, payment method selection,\n * tip selection, special instructions, price breakdown, and Place Order CTA.\n */\n\nimport { useState, useEffect, useMemo } from'react';\nimport {\n ArrowLeft,\n MapPin,\n CreditCard,\n Wallet,\n Banknote,\n Smartphone,\n CheckCircle2,\n ShoppingBag,\n Heart,\n AlertCircle,\n Loader2,\n} from'lucide-react';\nimport { EmphasisPanel, PagePurpose } from'@burdenoff/fe-libs/ui';\nimport { PageLayout } from'../../components/PageLayout';\nimport { EmptyState } from'../../components/EmptyState';\nimport { useCoolAndLovely } from'../../context/CoolAndLovelyContext';\nimport { useOrders, usePlaceOrder } from'../../hooks/useCoolAndLovelyApi';\nimport { cn } from'../../utils/cn';\nimport { formatCurrency } from'../../utils/formatters';\n\ntype PaymentMethod = 'cash' | 'card' | 'upi' | 'wallet';\n\ninterface DeliveryAddress {\n addressLine1: string;\n addressLine2: string;\n city: string;\n state: string;\n pincode: string;\n}\n\ninterface PaymentDetails {\n cardNumber: string;\n expiryDate: string;\n cvv: string;\n upiId: string;\n}\n\nconst paymentMethods: Array<{\n id: PaymentMethod;\n label: string;\n icon: typeof CreditCard;\n description: string;\n}> = [\n { id: 'cash', label: 'Cash on Delivery', icon: Banknote, description: 'Pay when you receive' },\n {\n id: 'card',\n label: 'Credit / Debit Card',\n icon: CreditCard,\n description: 'Visa, Mastercard, RuPay',\n },\n { id: 'upi', label: 'UPI', icon: Smartphone, description: 'Google Pay, PhonePe, Paytm' },\n { id: 'wallet', label: 'Digital Wallet', icon: Wallet, description: 'CoolAndLovely Wallet Balance' },\n];\n\nconst quickTips = [0, 10, 20, 30];\n\nexport function CheckoutPage() {\n const { navigateTo, currentUser } = useCoolAndLovely();\n const { data: allOrders = [], isLoading } = useOrders({ customerId: currentUser?.id });\n const placeOrderMutation = usePlaceOrder();\n\n // Use the first pending order as the\"current order\" being placed, or most recent\n const order = useMemo(() => {\n return allOrders.find((o) => o.status === 'pending') || allOrders[0];\n }, [allOrders]);\n\n const [deliveryAddress, setDeliveryAddress] = useState<DeliveryAddress>({\n addressLine1: '',\n addressLine2: '',\n city: 'Bangalore',\n state: 'Karnataka',\n pincode: '',\n });\n\n const [selectedPayment, setSelectedPayment] = useState<PaymentMethod>('cash');\n const [paymentDetails, setPaymentDetails] = useState<PaymentDetails>({\n cardNumber: '',\n expiryDate: '',\n cvv: '',\n upiId: '',\n });\n\n const [tip, setTip] = useState(0);\n const [customTipInput, setCustomTipInput] = useState('');\n const [specialInstructions, setSpecialInstructions] = useState('');\n const [isPlacing, setIsPlacing] = useState(false);\n\n // Calculate order summary dynamically\n const orderSummary = useMemo(() => {\n if (!order) return { subtotal: 0, deliveryFee: 0, tax: 0, total: 0 };\n const subtotal = order.subtotal;\n const deliveryFee = order.deliveryFee;\n const tax = order.taxes;\n const discount = order.discount ?? 0;\n const total = subtotal + deliveryFee + tax + tip - discount;\n return { subtotal, deliveryFee, tax, discount, total };\n }, [order, tip]);\n\n const totalItems = useMemo(() => {\n if (!order) return 0;\n return order.items.reduce((sum, item) => sum + item.quantity, 0);\n }, [order]);\n\n const handleAddressChange = (field: keyof DeliveryAddress, value: string) => {\n setDeliveryAddress((prev) => ({ ...prev, [field]: value }));\n };\n\n const handlePaymentDetailsChange = (field: keyof PaymentDetails, value: string) => {\n setPaymentDetails((prev) => ({ ...prev, [field]: value }));\n };\n\n const validateForm = (): boolean => {\n if (!deliveryAddress.addressLine1.trim()) {\n alert('Please enter delivery address');\n return false;\n }\n if (!deliveryAddress.pincode.trim() || deliveryAddress.pincode.length !== 6) {\n alert('Please enter a valid 6-digit pincode');\n return false;\n }\n if (selectedPayment === 'card') {\n if (!paymentDetails.cardNumber || paymentDetails.cardNumber.length < 16) {\n alert('Please enter a valid 16-digit card number');\n return false;\n }\n if (!paymentDetails.expiryDate) {\n alert('Please enter card expiry date');\n return false;\n }\n if (!paymentDetails.cvv || paymentDetails.cvv.length < 3) {\n alert('Please enter a valid 3-digit CVV');\n return false;\n }\n }\n if (selectedPayment === 'upi' && !paymentDetails.upiId.trim()) {\n alert('Please enter UPI ID');\n return false;\n }\n return true;\n };\n\n const handlePlaceOrder = async () => {\n if (!validateForm() || !order) return;\n\n try {\n const result = await placeOrderMutation.mutateAsync({\n providerId: order.cartId,\n customerId: currentUser?.id,\n items: order.items.map((i) => ({\n offeringId: i.id,\n quantity: i.quantity,\n customizations: i.customizations,\n })),\n deliveryAddress: `${deliveryAddress.addressLine1}, ${deliveryAddress.addressLine2}, ${deliveryAddress.city}, ${deliveryAddress.state} - ${deliveryAddress.pincode}`,\n paymentMethod: selectedPayment.toUpperCase(),\n notes: specialInstructions,\n deliveryFee: orderSummary.deliveryFee,\n tax: orderSummary.tax,\n tip: tip,\n total: orderSummary.total,\n });\n\n alert('Order placed successfully!');\n navigateTo(`/customer/order/${result.id}`);\n } catch (err) {\n alert('Failed to place order. Please try again.');\n }\n };\n\n if (isLoading) {\n return (\n <PageLayout title=\"Checkout\">\n <div className=\"flex h-[60vh] items-center justify-center\">\n <Loader2 className=\"h-8 w-8 animate-spin text-primary\" />\n </div>\n </PageLayout>\n );\n }\n\n if (!order) {\n return (\n <PageLayout title=\"Checkout\">\n <EmptyState\n illustration=\"empty-generic\"\n title=\"Your cart is empty\"\n description=\"Add some items to proceed with checkout.\"\n action={\n <button\n type=\"button\"\n onClick={() => navigateTo('/customer/carts')}\n className=\"rounded-lg bg-foreground px-6 py-3 text-sm font-medium text-background hover:opacity-90 transition-opacity\"\n >\n Browse Carts\n </button>\n }\n />\n </PageLayout>\n );\n }\n\n return (\n <PageLayout\n title={\n <div className=\"flex items-center gap-3\">\n <button\n type=\"button\"\n onClick={() => navigateTo('/customer/carts')}\n className=\"rounded-md p-1 text-text-secondary hover:bg-accent hover:text-text-primary transition-colors\"\n >\n <ArrowLeft className=\"h-5 w-5\" />\n </button>\n <span>Checkout</span>\n </div>\n }\n description=\"Review your order and complete payment\"\n >\n <PagePurpose className=\"mb-6\" icon={<ShoppingBag className=\"h-4 w-4\" />}>\n The final step before your order is placed. Confirm where it should go,\n choose how you want to pay, add a tip or special instructions, and review\n the full price breakdown on the right before you place the order.\n </PagePurpose>\n\n <div className=\"grid grid-cols-1 gap-6 lg:grid-cols-3\">\n {/* Left: Checkout Form */}\n <div className=\"lg:col-span-2 space-y-6\">\n {/* Delivery Address */}\n <section className=\"rounded-lg border border-border-seam bg-bg-surface p-5 bg-gloss-card shadow-pop\">\n <h2 className=\"text-base font-semibold text-text-primary mb-4 flex items-center gap-2\">\n <MapPin className=\"h-4 w-4 text-text-secondary\" />\n Delivery Address\n </h2>\n <div className=\"space-y-4\">\n <div>\n <label className=\"block text-sm font-medium text-text-primary mb-1.5\">\n Address Line 1 <span className=\"text-status-error-text\">*</span>\n </label>\n <input\n type=\"text\"\n placeholder=\"Building, Street, Area\"\n value={deliveryAddress.addressLine1}\n onChange={(e) => handleAddressChange('addressLine1', e.target.value)}\n 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)]\"\n />\n </div>\n <div>\n <label className=\"block text-sm font-medium text-text-primary mb-1.5\">\n Address Line 2\n </label>\n <input\n type=\"text\"\n placeholder=\"Apartment, Suite, Floor (Optional)\"\n value={deliveryAddress.addressLine2}\n onChange={(e) => handleAddressChange('addressLine2', e.target.value)}\n 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)]\"\n />\n </div>\n <div className=\"grid grid-cols-1 sm:grid-cols-2 gap-4\">\n <div>\n <label className=\"block text-sm font-medium text-text-primary mb-1.5\">\n City <span className=\"text-status-error-text\">*</span>\n </label>\n <input\n type=\"text\"\n value={deliveryAddress.city}\n onChange={(e) => handleAddressChange('city', e.target.value)}\n 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)]\"\n />\n </div>\n <div>\n <label className=\"block text-sm font-medium text-text-primary mb-1.5\">\n State <span className=\"text-status-error-text\">*</span>\n </label>\n <input\n type=\"text\"\n value={deliveryAddress.state}\n onChange={(e) => handleAddressChange('state', e.target.value)}\n 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)]\"\n />\n </div>\n </div>\n <div>\n <label className=\"block text-sm font-medium text-text-primary mb-1.5\">\n Pincode <span className=\"text-status-error-text\">*</span>\n </label>\n <input\n type=\"text\"\n placeholder=\"560001\"\n maxLength={6}\n value={deliveryAddress.pincode}\n onChange={(e) =>\n handleAddressChange('pincode', e.target.value.replace(/\\D/g, ''))\n }\n 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)]\"\n />\n </div>\n </div>\n </section>\n\n {/* Payment Method */}\n <section className=\"rounded-lg border border-border-seam bg-bg-surface p-5 bg-gloss-card shadow-pop\">\n <h2 className=\"text-base font-semibold text-text-primary mb-4 flex items-center gap-2\">\n <CreditCard className=\"h-4 w-4 text-text-secondary\" />\n Payment Method\n </h2>\n <div className=\"space-y-2\">\n {paymentMethods.map((method) => {\n const Icon = method.icon;\n return (\n <button\n key={method.id}\n type=\"button\"\n onClick={() => setSelectedPayment(method.id)}\n className={cn(\n 'flex w-full items-center gap-4 rounded-lg border p-3 transition-colors text-left',\n selectedPayment === method.id\n ? 'border-foreground bg-accent'\n : 'border-border-subtle bg-bg-surface hover:bg-accent'\n )}\n >\n <div className=\"flex h-9 w-9 shrink-0 items-center justify-center rounded-md bg-bg-sunken\">\n <Icon className=\"h-4 w-4 text-text-secondary\" />\n </div>\n <div className=\"flex-1 min-w-0\">\n <p className=\"text-sm font-medium text-text-primary\">{method.label}</p>\n <p className=\"text-xs text-text-secondary\">{method.description}</p>\n </div>\n {selectedPayment === method.id && (\n <CheckCircle2 className=\"h-5 w-5 text-text-primary shrink-0\" />\n )}\n </button>\n );\n })}\n </div>\n\n {/* Card Payment Details */}\n {selectedPayment === 'card' && (\n <div className=\"mt-4 space-y-4 border-t border-border-subtle pt-4\">\n <div>\n <label className=\"block text-sm font-medium text-text-primary mb-1.5\">\n Card Number <span className=\"text-status-error-text\">*</span>\n </label>\n <input\n type=\"text\"\n placeholder=\"1234 5678 9012 3456\"\n maxLength={16}\n value={paymentDetails.cardNumber}\n onChange={(e) =>\n handlePaymentDetailsChange('cardNumber', e.target.value.replace(/\\D/g, ''))\n }\n 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)]\"\n />\n </div>\n <div className=\"grid grid-cols-1 sm:grid-cols-2 gap-4\">\n <div>\n <label className=\"block text-sm font-medium text-text-primary mb-1.5\">\n Expiry Date <span className=\"text-status-error-text\">*</span>\n </label>\n <input\n type=\"text\"\n placeholder=\"MM/YY\"\n maxLength={5}\n value={paymentDetails.expiryDate}\n onChange={(e) => {\n let value = e.target.value.replace(/\\D/g, '');\n if (value.length >= 2) {\n value = value.slice(0, 2) + '/' + value.slice(2, 4);\n }\n handlePaymentDetailsChange('expiryDate', value);\n }}\n 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)]\"\n />\n </div>\n <div>\n <label className=\"block text-sm font-medium text-text-primary mb-1.5\">\n CVV <span className=\"text-status-error-text\">*</span>\n </label>\n <input\n type=\"text\"\n placeholder=\"123\"\n maxLength={3}\n value={paymentDetails.cvv}\n onChange={(e) =>\n handlePaymentDetailsChange('cvv', e.target.value.replace(/\\D/g, ''))\n }\n 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)]\"\n />\n </div>\n </div>\n </div>\n )}\n\n {/* UPI ID */}\n {selectedPayment === 'upi' && (\n <div className=\"mt-4 border-t border-border-subtle pt-4\">\n <label className=\"block text-sm font-medium text-text-primary mb-1.5\">\n UPI ID <span className=\"text-status-error-text\">*</span>\n </label>\n <input\n type=\"text\"\n placeholder=\"user@paytm\"\n value={paymentDetails.upiId}\n onChange={(e) => handlePaymentDetailsChange('upiId', e.target.value)}\n 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)]\"\n />\n </div>\n )}\n\n {/* Wallet notice */}\n {selectedPayment === 'wallet' && (\n <div className=\"mt-4 flex items-start gap-3 rounded-lg bg-accent-blue-subtle/10 p-4 border border-accent-blue-subtle/20\">\n <AlertCircle className=\"h-4 w-4 text-accent-blue mt-0.5 shrink-0\" />\n <p className=\"text-sm text-accent-blue\">\n Digital wallet integration coming soon. Please choose another payment method.\n </p>\n </div>\n )}\n </section>\n\n {/* Tip and Special Instructions */}\n <section className=\"rounded-lg border border-border-seam bg-bg-surface p-5 bg-gloss-card shadow-pop\">\n <h2 className=\"text-base font-semibold text-text-primary mb-4 flex items-center gap-2\">\n <Heart className=\"h-4 w-4 text-text-secondary\" />\n Additional Options\n </h2>\n <div className=\"space-y-5\">\n {/* Tip Selection */}\n <div>\n <label className=\"block text-sm font-medium text-text-primary mb-2\">\n Tip for delivery partner\n </label>\n <div className=\"flex flex-wrap gap-2 mb-3\">\n {quickTips.map((amount) => (\n <button\n key={amount}\n type=\"button\"\n onClick={() => {\n setTip(amount);\n setCustomTipInput('');\n }}\n className={cn(\n 'flex-1 min-w-[64px] rounded-lg px-3 py-2.5 text-sm font-medium transition-colors',\n tip === amount && customTipInput === ''\n ? 'bg-foreground text-background'\n : 'bg-bg-sunken text-text-secondary hover:bg-accent hover:text-text-primary'\n )}\n >\n {amount === 0 ? 'No Tip' : `₹${amount}`}\n </button>\n ))}\n </div>\n <input\n type=\"number\"\n placeholder=\"Custom tip amount\"\n value={customTipInput}\n onChange={(e) => {\n const val = e.target.value;\n setCustomTipInput(val);\n setTip(parseInt(val) || 0);\n }}\n 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)]\"\n />\n </div>\n\n {/* Special Instructions */}\n <div>\n <label className=\"block text-sm font-medium text-text-primary mb-2\">\n Special Instructions\n </label>\n <textarea\n rows={3}\n placeholder=\"Any special requests for your order...\"\n value={specialInstructions}\n onChange={(e) => setSpecialInstructions(e.target.value)}\n 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\"\n />\n </div>\n </div>\n </section>\n </div>\n\n {/* Right: Order Summary & Place Order — primary emphasis zone */}\n <div className=\"lg:col-span-1\">\n <EmphasisPanel className=\"sticky top-6 p-5\">\n <h2 className=\"text-base font-semibold text-text-primary mb-4\">Order Summary</h2>\n\n {/* Cart Info */}\n <div className=\"flex items-center gap-3 mb-4 pb-4 border-b border-border-subtle\">\n <div className=\"h-12 w-12 rounded-md bg-bg-sunken overflow-hidden\">\n <img\n src={order.cartImage}\n alt={order.cartName}\n className=\"h-full w-full object-cover\"\n />\n </div>\n <div>\n <p className=\"text-sm font-medium text-text-primary\">{order.cartName}</p>\n <p className=\"text-xs text-text-secondary\">\n {order.items.length} item{order.items.length !== 1 ? 's' : ''}\n </p>\n </div>\n </div>\n\n {/* Cart Items */}\n <div className=\"space-y-2 mb-4\">\n {order.items.map((item) => (\n <div key={item.id} className=\"flex justify-between items-start\">\n <div className=\"flex-1 min-w-0\">\n <p className=\"text-sm text-text-primary\">{item.name}</p>\n {item.customizations && item.customizations.length > 0 && (\n <p className=\"text-xs text-text-secondary mt-0.5\">\n {item.customizations.join(', ')}\n </p>\n )}\n <p className=\"text-xs text-text-secondary\">\n {formatCurrency(item.price, { minimumFractionDigits: 0 })} x {item.quantity}\n </p>\n </div>\n <span className=\"text-sm font-medium text-text-primary\">\n {formatCurrency(item.price * item.quantity, { minimumFractionDigits: 0 })}\n </span>\n </div>\n ))}\n </div>\n\n {/* Price Breakdown */}\n <div className=\"border-t border-border-subtle pt-4 space-y-2.5 text-sm\">\n <div className=\"flex justify-between\">\n <span className=\"text-text-secondary\">Subtotal ({totalItems} items)</span>\n <span className=\"text-text-primary\">\n {formatCurrency(orderSummary.subtotal, { minimumFractionDigits: 0 })}\n </span>\n </div>\n <div className=\"flex justify-between\">\n <span className=\"text-text-secondary\">Delivery Fee</span>\n <span className=\"text-text-primary\">\n {orderSummary.deliveryFee === 0\n ? 'FREE'\n : formatCurrency(orderSummary.deliveryFee, { minimumFractionDigits: 0 })}\n </span>\n </div>\n <div className=\"flex justify-between\">\n <span className=\"text-text-secondary\">Tax</span>\n <span className=\"text-text-primary\">\n {formatCurrency(orderSummary.tax, { minimumFractionDigits: 0 })}\n </span>\n </div>\n {tip > 0 && (\n <div className=\"flex justify-between\">\n <span className=\"text-text-secondary\">Tip</span>\n <span className=\"text-text-primary\">\n {formatCurrency(tip, { minimumFractionDigits: 0 })}\n </span>\n </div>\n )}\n {orderSummary.discount && orderSummary.discount > 0 && (\n <div className=\"flex justify-between\">\n <span className=\"text-status-success-text\">Discount</span>\n <span className=\"text-status-success-text\">\n -{formatCurrency(orderSummary.discount, { minimumFractionDigits: 0 })}\n </span>\n </div>\n )}\n </div>\n\n <div className=\"mt-4 flex justify-between border-t border-border-subtle pt-4\">\n <span className=\"text-base font-semibold text-text-primary\">Total</span>\n <span className=\"text-base font-bold text-text-primary\">\n {formatCurrency(orderSummary.total, { minimumFractionDigits: 0 })}\n </span>\n </div>\n\n <button\n type=\"button\"\n onClick={handlePlaceOrder}\n disabled={placeOrderMutation.isPending}\n className={cn(\n 'mt-6 flex w-full items-center justify-center gap-2 rounded-lg py-3 text-sm font-medium transition-opacity',\n 'bg-foreground text-background',\n placeOrderMutation.isPending ? 'opacity-60 cursor-not-allowed' : 'hover:opacity-90'\n )}\n >\n {placeOrderMutation.isPending ? (\n <Loader2 className=\"h-4 w-4 animate-spin\" />\n ) : (\n <ShoppingBag className=\"h-4 w-4\" />\n )}\n {placeOrderMutation.isPending\n ? 'Placing Order...'\n : `Place Order - ${formatCurrency(orderSummary.total, { minimumFractionDigits: 0 })}`}\n </button>\n\n <p className=\"mt-3 text-center text-xs text-text-secondary\">\n By placing this order, you agree to our Terms of Service and Privacy Policy\n </p>\n </EmphasisPanel>\n </div>\n </div>\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;;AA+CA,IAAM,IAKD;CACH;EAAE,IAAI;EAAQ,OAAO;EAAoB,MAAM;EAAU,aAAa;EAAwB;CAC9F;EACE,IAAI;EACJ,OAAO;EACP,MAAM;EACN,aAAa;EACd;CACD;EAAE,IAAI;EAAO,OAAO;EAAO,MAAM;EAAY,aAAa;EAA8B;CACxF;EAAE,IAAI;EAAU,OAAO;EAAkB,MAAM;EAAQ,aAAa;EAAgC;CACrG,EAEK,IAAY;CAAC;CAAG;CAAI;CAAI;CAAG;AAEjC,SAAgB,IAAe;CAC7B,IAAM,EAAE,eAAY,mBAAgB,GAAkB,EAChD,EAAE,MAAM,IAAY,EAAE,EAAE,iBAAc,EAAU,EAAE,YAAY,GAAa,IAAI,CAAC,EAChF,IAAqB,GAAe,EAGpC,IAAQ,QACL,EAAU,MAAM,MAAM,EAAE,WAAW,UAAU,IAAI,EAAU,IACjE,CAAC,EAAU,CAAC,EAET,CAAC,GAAiB,KAAsB,EAA0B;EACtE,cAAc;EACd,cAAc;EACd,MAAM;EACN,OAAO;EACP,SAAS;EACV,CAAC,EAEI,CAAC,GAAiB,KAAsB,EAAwB,OAAO,EACvE,CAAC,GAAgB,KAAqB,EAAyB;EACnE,YAAY;EACZ,YAAY;EACZ,KAAK;EACL,OAAO;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