@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,632 +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 { formatCurrency as i } from "../../utils/formatters.js";
6
- import { getCartById as a } from "../../mocks/data.js";
7
- import { useMemo as o, useState as s } from "react";
8
- import { AlertCircle as c, ArrowLeft as l, ArrowRight as u, Calendar as d, CheckCircle2 as f, Clock as p, CreditCard as m, Home as h, Loader2 as g, MapPin as _, Navigation as v, Phone as y, Smartphone as b, Wallet as x } from "lucide-react";
9
- import { useParams as S } from "react-router-dom";
10
- import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
11
- import { EmphasisPanel as E, PagePurpose as D } from "@burdenoff/fe-libs/ui";
12
- //#region src/coolandlovely/pages/customer/DirectServiceBookingPage.tsx
13
- var O = [
14
- "location",
15
- "details",
16
- "payment",
17
- "confirmation"
18
- ], k = {
19
- location: "Location",
20
- details: "Details",
21
- payment: "Payment",
22
- confirmation: "Confirmation"
23
- };
24
- function A() {
25
- let e = [], t = new Date((/* @__PURE__ */ new Date()).getTime() + 30 * 6e4);
26
- for (let n = 0; n < 8; n++) {
27
- let r = new Date(t.getTime() + n * 30 * 6e4), i = r.toTimeString().slice(0, 5), a = r.toLocaleTimeString([], {
28
- hour: "2-digit",
29
- minute: "2-digit"
30
- });
31
- e.push({
32
- value: i,
33
- label: a
34
- });
35
- }
36
- return e;
37
- }
38
- function j() {
39
- let { cartId: j } = S(), { navigateTo: M } = e(), N = o(() => j ? a(j) : void 0, [j]), [P, F] = s("location"), [I, L] = s(!1), [R, z] = s({
40
- address: "",
41
- landmark: "",
42
- instructions: "",
43
- phoneNumber: ""
44
- }), [B, V] = s({
45
- preferredTime: "",
46
- specialInstructions: "",
47
- isUrgent: !1
48
- }), [H, U] = s("upi"), [W, G] = s(null);
49
- if (!N) return /* @__PURE__ */ w(n, {
50
- title: "Cart Not Found",
51
- children: /* @__PURE__ */ w(r, {
52
- illustration: "empty-search",
53
- title: "Service not available",
54
- description: "Direct service is not available for this cart.",
55
- action: /* @__PURE__ */ w("button", {
56
- type: "button",
57
- onClick: () => M("/customer/carts"),
58
- className: "rounded-lg bg-foreground px-4 py-2 text-sm font-medium text-background hover:opacity-90 transition-opacity",
59
- children: "Browse Carts"
60
- })
61
- })
62
- });
63
- let K = A(), q = O.indexOf(P), J = () => {
64
- if (!navigator.geolocation) {
65
- alert("Geolocation is not supported by this browser.");
66
- return;
67
- }
68
- navigator.geolocation.getCurrentPosition(() => {
69
- z((e) => ({
70
- ...e,
71
- address: e.address || "Current location detected"
72
- })), alert("Location detected successfully!");
73
- }, () => {
74
- alert("Failed to get your location. Please enter address manually.");
75
- });
76
- }, Y = () => R.address.trim() ? R.phoneNumber.trim() ? !0 : (alert("Please enter your phone number."), !1) : (alert("Please enter your address."), !1), X = () => B.preferredTime ? !0 : (alert("Please select a preferred time slot."), !1), Z = () => {
77
- P === "location" && Y() ? F("details") : P === "details" && X() ? F("payment") : P === "payment" && $();
78
- }, Q = () => {
79
- P === "details" ? F("location") : P === "payment" && F("details");
80
- }, $ = () => {
81
- L(!0), setTimeout(() => {
82
- G({
83
- bookingId: `BK-${Date.now()}`,
84
- transactionId: `TXN-${Date.now()}`,
85
- estimatedArrival: new Date(Date.now() + 30 * 6e4).toISOString()
86
- }), F("confirmation"), L(!1);
87
- }, 1500);
88
- };
89
- return /* @__PURE__ */ T(n, {
90
- title: /* @__PURE__ */ T("div", {
91
- className: "flex items-center gap-3",
92
- children: [/* @__PURE__ */ w("button", {
93
- type: "button",
94
- onClick: () => M(`/customer/carts/${N.id}`),
95
- className: "rounded-md p-1 text-text-secondary hover:bg-accent hover:text-text-primary transition-colors",
96
- children: /* @__PURE__ */ w(l, { className: "h-5 w-5" })
97
- }), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("span", { children: "Book Direct Service" }), /* @__PURE__ */ w("p", {
98
- className: "text-xs font-normal text-text-secondary",
99
- children: N.name
100
- })] })]
101
- }),
102
- children: [
103
- /* @__PURE__ */ w(D, {
104
- className: "mb-6",
105
- icon: /* @__PURE__ */ w(h, { className: "h-4 w-4" }),
106
- children: "Book a cart to come to you instead of going to it — ideal for at-home services like repairs, grooming or catering. Tell us where and when, pay a small advance to lock the slot, and settle the balance when the cart arrives at your door."
107
- }),
108
- /* @__PURE__ */ w("div", {
109
- className: "flex items-center justify-between mb-6 px-2",
110
- children: O.map((e, n) => {
111
- let r = n < q, i = e === P;
112
- return /* @__PURE__ */ T("div", {
113
- className: "flex items-center",
114
- children: [/* @__PURE__ */ T("div", {
115
- className: "flex flex-col items-center",
116
- children: [/* @__PURE__ */ w("div", {
117
- className: t("flex h-8 w-8 items-center justify-center rounded-full text-xs font-medium", r ? "bg-status-success-bg-subtle/20 text-status-success-text" : i ? "bg-foreground text-background" : "bg-bg-sunken text-text-secondary"),
118
- children: r ? /* @__PURE__ */ w(f, { className: "h-4 w-4" }) : n + 1
119
- }), /* @__PURE__ */ w("span", {
120
- className: t("mt-1 text-[10px]", i ? "font-medium text-text-primary" : "text-text-secondary"),
121
- children: k[e]
122
- })]
123
- }), n < O.length - 1 && /* @__PURE__ */ w("div", { className: t("mx-2 h-0.5 w-8 sm:w-16", r ? "bg-status-success-bg-subtle/30" : "bg-border") })]
124
- }, e);
125
- })
126
- }),
127
- /* @__PURE__ */ T("div", {
128
- className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
129
- children: [/* @__PURE__ */ T("div", {
130
- className: "lg:col-span-2",
131
- children: [
132
- P === "location" && /* @__PURE__ */ T("div", {
133
- className: "rounded-lg border border-border-seam bg-bg-surface p-5 bg-gloss-card shadow-pop",
134
- children: [
135
- /* @__PURE__ */ T("h2", {
136
- className: "text-base font-semibold text-text-primary mb-1 flex items-center gap-2",
137
- children: [/* @__PURE__ */ w(_, { className: "h-4 w-4" }), "Service Location"]
138
- }),
139
- /* @__PURE__ */ w("p", {
140
- className: "text-xs text-text-secondary mb-5",
141
- children: "Where should the cart come?"
142
- }),
143
- /* @__PURE__ */ T("div", {
144
- className: "space-y-4",
145
- children: [
146
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ T("label", {
147
- className: "block text-sm font-medium text-text-primary mb-1.5",
148
- children: ["Your Address ", /* @__PURE__ */ w("span", {
149
- className: "text-status-error-text",
150
- children: "*"
151
- })]
152
- }), /* @__PURE__ */ T("div", {
153
- className: "flex gap-2",
154
- children: [/* @__PURE__ */ w("input", {
155
- type: "text",
156
- placeholder: "Enter your full address",
157
- value: R.address,
158
- onChange: (e) => z((t) => ({
159
- ...t,
160
- address: e.target.value
161
- })),
162
- className: "flex-1 rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
163
- }), /* @__PURE__ */ T("button", {
164
- type: "button",
165
- onClick: J,
166
- className: "flex items-center gap-1.5 rounded-lg border border-border-subtle px-3 py-2 text-xs font-medium text-text-primary hover:bg-accent transition-colors whitespace-nowrap",
167
- children: [/* @__PURE__ */ w(v, { className: "h-3.5 w-3.5" }), "Use Current Location"]
168
- })]
169
- })] }),
170
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
171
- className: "block text-sm font-medium text-text-primary mb-1.5",
172
- children: "Nearby Landmark"
173
- }), /* @__PURE__ */ w("input", {
174
- type: "text",
175
- placeholder: "e.g., Near Metro Station, Opposite Mall",
176
- value: R.landmark,
177
- onChange: (e) => z((t) => ({
178
- ...t,
179
- landmark: e.target.value
180
- })),
181
- className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
182
- })] }),
183
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
184
- className: "block text-sm font-medium text-text-primary mb-1.5",
185
- children: "Instructions for Cart Owner"
186
- }), /* @__PURE__ */ w("textarea", {
187
- rows: 3,
188
- placeholder: "Any specific instructions to help us find you...",
189
- value: R.instructions,
190
- onChange: (e) => z((t) => ({
191
- ...t,
192
- instructions: e.target.value
193
- })),
194
- className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] resize-none"
195
- })] }),
196
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ T("label", {
197
- className: "block text-sm font-medium text-text-primary mb-1.5",
198
- children: ["Phone Number ", /* @__PURE__ */ w("span", {
199
- className: "text-status-error-text",
200
- children: "*"
201
- })]
202
- }), /* @__PURE__ */ T("div", {
203
- className: "relative",
204
- children: [/* @__PURE__ */ w(y, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-text-secondary" }), /* @__PURE__ */ w("input", {
205
- type: "tel",
206
- placeholder: "Enter your phone number",
207
- value: R.phoneNumber,
208
- onChange: (e) => z((t) => ({
209
- ...t,
210
- phoneNumber: e.target.value
211
- })),
212
- className: "w-full rounded-lg border border-border-subtle bg-bg-surface py-2 pl-9 pr-3 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
213
- })]
214
- })] })
215
- ]
216
- })
217
- ]
218
- }),
219
- P === "details" && /* @__PURE__ */ T("div", {
220
- className: "rounded-lg border border-border-seam bg-bg-surface p-5 bg-gloss-card shadow-pop",
221
- children: [
222
- /* @__PURE__ */ T("h2", {
223
- className: "text-base font-semibold text-text-primary mb-1 flex items-center gap-2",
224
- children: [/* @__PURE__ */ w(d, { className: "h-4 w-4" }), "Booking Details"]
225
- }),
226
- /* @__PURE__ */ w("p", {
227
- className: "text-xs text-text-secondary mb-5",
228
- children: "Choose your preferred timing"
229
- }),
230
- /* @__PURE__ */ T("div", {
231
- className: "space-y-4",
232
- children: [
233
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ T("label", {
234
- className: "block text-sm font-medium text-text-primary mb-1.5",
235
- children: ["Preferred Time Slot ", /* @__PURE__ */ w("span", {
236
- className: "text-status-error-text",
237
- children: "*"
238
- })]
239
- }), /* @__PURE__ */ w("div", {
240
- className: "grid grid-cols-4 gap-2",
241
- children: K.map((e) => /* @__PURE__ */ w("button", {
242
- type: "button",
243
- onClick: () => V((t) => ({
244
- ...t,
245
- preferredTime: e.value
246
- })),
247
- className: t("rounded-lg border py-2 px-2 text-xs font-medium transition-colors", B.preferredTime === e.value ? "border-foreground bg-accent text-text-primary" : "border-border-subtle text-text-secondary hover:bg-accent hover:text-text-primary"),
248
- children: e.label
249
- }, e.value))
250
- })] }),
251
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
252
- className: "block text-sm font-medium text-text-primary mb-1.5",
253
- children: "Special Instructions"
254
- }), /* @__PURE__ */ w("textarea", {
255
- rows: 3,
256
- placeholder: "Any special requests or dietary preferences...",
257
- value: B.specialInstructions,
258
- onChange: (e) => V((t) => ({
259
- ...t,
260
- specialInstructions: e.target.value
261
- })),
262
- className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] resize-none"
263
- })] }),
264
- /* @__PURE__ */ T("label", {
265
- className: "flex items-center gap-2 cursor-pointer",
266
- children: [/* @__PURE__ */ w("input", {
267
- type: "checkbox",
268
- checked: B.isUrgent,
269
- onChange: (e) => V((t) => ({
270
- ...t,
271
- isUrgent: e.target.checked
272
- })),
273
- className: "h-4 w-4 rounded border-border-subtle"
274
- }), /* @__PURE__ */ w("span", {
275
- className: "text-sm text-text-secondary",
276
- children: "This is urgent (additional charges may apply)"
277
- })]
278
- })
279
- ]
280
- })
281
- ]
282
- }),
283
- P === "payment" && /* @__PURE__ */ T("div", {
284
- className: "rounded-lg border border-border-seam bg-bg-surface p-5 bg-gloss-card shadow-pop",
285
- children: [
286
- /* @__PURE__ */ T("h2", {
287
- className: "text-base font-semibold text-text-primary mb-1 flex items-center gap-2",
288
- children: [/* @__PURE__ */ w(m, { className: "h-4 w-4" }), "Advance Payment"]
289
- }),
290
- /* @__PURE__ */ w("p", {
291
- className: "text-xs text-text-secondary mb-5",
292
- children: "Select your payment method"
293
- }),
294
- /* @__PURE__ */ T("div", {
295
- className: "space-y-4",
296
- children: [
297
- /* @__PURE__ */ T("div", {
298
- className: "flex items-start gap-2 rounded-lg border border-accent-blue-subtle/20 bg-accent-blue-subtle/5 p-3",
299
- children: [/* @__PURE__ */ w(c, { className: "h-4 w-4 text-accent-blue shrink-0 mt-0.5" }), /* @__PURE__ */ T("p", {
300
- className: "text-xs text-accent-blue",
301
- children: [
302
- "You need to pay ",
303
- i(100, { minimumFractionDigits: 0 }),
304
- " ",
305
- "in advance to confirm your booking. Pay the remaining when the cart arrives."
306
- ]
307
- })]
308
- }),
309
- /* @__PURE__ */ w("div", {
310
- className: "grid grid-cols-1 sm:grid-cols-3 gap-3",
311
- children: [
312
- {
313
- value: "upi",
314
- label: "UPI",
315
- sub: "Instant payment",
316
- Icon: b
317
- },
318
- {
319
- value: "card",
320
- label: "Card",
321
- sub: "Secure payment",
322
- Icon: m
323
- },
324
- {
325
- value: "wallet",
326
- label: "Wallet",
327
- sub: "Quick payment",
328
- Icon: x
329
- }
330
- ].map(({ value: e, label: n, sub: r, Icon: i }) => /* @__PURE__ */ T("button", {
331
- type: "button",
332
- onClick: () => U(e),
333
- className: t("rounded-lg border p-3 text-center transition-colors", H === e ? "border-foreground bg-accent" : "border-border-subtle hover:bg-accent"),
334
- children: [
335
- /* @__PURE__ */ w(i, { className: "mx-auto h-5 w-5 text-text-secondary mb-1" }),
336
- /* @__PURE__ */ w("p", {
337
- className: "text-sm font-medium text-text-primary",
338
- children: n
339
- }),
340
- /* @__PURE__ */ w("p", {
341
- className: "text-[10px] text-text-secondary",
342
- children: r
343
- })
344
- ]
345
- }, e))
346
- }),
347
- /* @__PURE__ */ T("div", {
348
- className: "rounded-lg bg-bg-sunken p-4",
349
- children: [/* @__PURE__ */ w("h3", {
350
- className: "text-sm font-medium text-text-primary mb-2",
351
- children: "Payment Summary"
352
- }), /* @__PURE__ */ T("div", {
353
- className: "space-y-2 text-sm",
354
- children: [
355
- /* @__PURE__ */ T("div", {
356
- className: "flex justify-between",
357
- children: [/* @__PURE__ */ w("span", {
358
- className: "text-text-secondary",
359
- children: "Advance Payment:"
360
- }), /* @__PURE__ */ w("span", {
361
- className: "text-text-primary",
362
- children: i(100, { minimumFractionDigits: 0 })
363
- })]
364
- }),
365
- /* @__PURE__ */ T("div", {
366
- className: "flex justify-between",
367
- children: [/* @__PURE__ */ w("span", {
368
- className: "text-text-secondary",
369
- children: "Service Fee:"
370
- }), /* @__PURE__ */ w("span", {
371
- className: "text-text-primary",
372
- children: i(50, { minimumFractionDigits: 0 })
373
- })]
374
- }),
375
- /* @__PURE__ */ T("div", {
376
- className: "flex justify-between text-text-secondary",
377
- children: [/* @__PURE__ */ w("span", { children: "Balance Payment (at arrival):" }), /* @__PURE__ */ w("span", { children: i(50, { minimumFractionDigits: 0 }) })]
378
- }),
379
- /* @__PURE__ */ T("div", {
380
- className: "flex justify-between border-t border-border-subtle pt-2 font-semibold",
381
- children: [/* @__PURE__ */ w("span", {
382
- className: "text-text-primary",
383
- children: "Total Amount:"
384
- }), /* @__PURE__ */ w("span", {
385
- className: "text-text-primary",
386
- children: i(150, { minimumFractionDigits: 0 })
387
- })]
388
- })
389
- ]
390
- })]
391
- })
392
- ]
393
- })
394
- ]
395
- }),
396
- P === "confirmation" && W && /* @__PURE__ */ T("div", {
397
- className: "rounded-lg border border-border-seam bg-bg-surface p-5 bg-gloss-card shadow-pop",
398
- children: [
399
- /* @__PURE__ */ T("div", {
400
- className: "text-center mb-6",
401
- children: [
402
- /* @__PURE__ */ w("div", {
403
- className: "mx-auto mb-3 flex h-14 w-14 items-center justify-center rounded-full bg-status-success-bg-subtle/10",
404
- children: /* @__PURE__ */ w(f, { className: "h-7 w-7 text-status-success-text" })
405
- }),
406
- /* @__PURE__ */ w("h2", {
407
- className: "text-lg font-semibold text-text-primary mb-1",
408
- children: "Booking Confirmed!"
409
- }),
410
- /* @__PURE__ */ w("p", {
411
- className: "text-sm text-text-secondary",
412
- children: "Your direct service booking has been confirmed and payment processed."
413
- })
414
- ]
415
- }),
416
- /* @__PURE__ */ T("div", {
417
- className: "rounded-lg bg-bg-sunken p-4 mb-4",
418
- children: [/* @__PURE__ */ w("h3", {
419
- className: "text-sm font-medium text-text-primary mb-3",
420
- children: "Booking Details"
421
- }), /* @__PURE__ */ T("div", {
422
- className: "grid grid-cols-1 sm:grid-cols-2 gap-3 text-sm",
423
- children: [
424
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("span", {
425
- className: "text-xs text-text-secondary",
426
- children: "Booking ID"
427
- }), /* @__PURE__ */ w("p", {
428
- className: "font-mono text-xs text-text-primary",
429
- children: W.bookingId
430
- })] }),
431
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("span", {
432
- className: "text-xs text-text-secondary",
433
- children: "Est. Arrival"
434
- }), /* @__PURE__ */ w("p", {
435
- className: "text-text-primary",
436
- children: new Date(W.estimatedArrival).toLocaleTimeString([], {
437
- hour: "2-digit",
438
- minute: "2-digit"
439
- })
440
- })] }),
441
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("span", {
442
- className: "text-xs text-text-secondary",
443
- children: "Location"
444
- }), /* @__PURE__ */ w("p", {
445
- className: "text-text-primary truncate",
446
- children: R.address
447
- })] }),
448
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("span", {
449
- className: "text-xs text-text-secondary",
450
- children: "Phone"
451
- }), /* @__PURE__ */ w("p", {
452
- className: "text-text-primary",
453
- children: R.phoneNumber
454
- })] })
455
- ]
456
- })]
457
- }),
458
- /* @__PURE__ */ T("div", {
459
- className: "rounded-lg border border-status-success-border/20 bg-status-success-bg-subtle/5 p-4 mb-4",
460
- children: [/* @__PURE__ */ T("h3", {
461
- className: "text-sm font-medium text-status-success-text mb-2 flex items-center gap-2",
462
- children: [/* @__PURE__ */ w(f, { className: "h-4 w-4" }), "Payment Processed"]
463
- }), /* @__PURE__ */ T("div", {
464
- className: "grid grid-cols-2 gap-3 text-sm",
465
- children: [
466
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("span", {
467
- className: "text-xs text-text-secondary",
468
- children: "Transaction ID"
469
- }), /* @__PURE__ */ w("p", {
470
- className: "font-mono text-xs text-text-primary",
471
- children: W.transactionId
472
- })] }),
473
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("span", {
474
- className: "text-xs text-text-secondary",
475
- children: "Advance Paid"
476
- }), /* @__PURE__ */ w("p", {
477
- className: "font-medium text-text-primary",
478
- children: i(100, { minimumFractionDigits: 0 })
479
- })] }),
480
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("span", {
481
- className: "text-xs text-text-secondary",
482
- children: "Method"
483
- }), /* @__PURE__ */ w("p", {
484
- className: "capitalize text-text-primary",
485
- children: H
486
- })] }),
487
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("span", {
488
- className: "text-xs text-text-secondary",
489
- children: "Status"
490
- }), /* @__PURE__ */ w("p", {
491
- className: "font-medium text-status-success-text",
492
- children: "Paid"
493
- })] })
494
- ]
495
- })]
496
- }),
497
- /* @__PURE__ */ T("div", {
498
- className: "rounded-lg border border-accent-blue-subtle/20 bg-accent-blue-subtle/5 p-4 mb-6",
499
- children: [/* @__PURE__ */ w("h3", {
500
- className: "text-sm font-medium text-accent-blue mb-2",
501
- children: "Next Steps"
502
- }), /* @__PURE__ */ T("div", {
503
- className: "space-y-2 text-xs text-accent-blue",
504
- children: [
505
- /* @__PURE__ */ T("div", {
506
- className: "flex items-start gap-2",
507
- children: [/* @__PURE__ */ w(f, { className: "h-3.5 w-3.5 text-status-success-text mt-0.5 shrink-0" }), /* @__PURE__ */ T("span", { children: [
508
- "Payment confirmed -",
509
- " ",
510
- i(100, { minimumFractionDigits: 0 }),
511
- " paid"
512
- ] })]
513
- }),
514
- /* @__PURE__ */ T("div", {
515
- className: "flex items-start gap-2",
516
- children: [/* @__PURE__ */ w(p, { className: "h-3.5 w-3.5 mt-0.5 shrink-0" }), /* @__PURE__ */ T("span", { children: [
517
- "Cart will arrive around",
518
- " ",
519
- new Date(W.estimatedArrival).toLocaleTimeString([], {
520
- hour: "2-digit",
521
- minute: "2-digit"
522
- })
523
- ] })]
524
- }),
525
- /* @__PURE__ */ T("div", {
526
- className: "flex items-start gap-2",
527
- children: [/* @__PURE__ */ w(m, { className: "h-3.5 w-3.5 mt-0.5 shrink-0" }), /* @__PURE__ */ T("span", { children: [
528
- "Pay remaining ",
529
- i(50, { minimumFractionDigits: 0 }),
530
- " ",
531
- "when cart arrives"
532
- ] })]
533
- })
534
- ]
535
- })]
536
- }),
537
- /* @__PURE__ */ T("div", {
538
- className: "flex gap-3",
539
- children: [/* @__PURE__ */ w("button", {
540
- type: "button",
541
- onClick: () => M(`/customer/bookings/${W.bookingId}`),
542
- className: "flex-1 rounded-lg bg-foreground px-4 py-2.5 text-sm font-medium text-background hover:opacity-90 transition-opacity",
543
- children: "View Booking"
544
- }), /* @__PURE__ */ w("button", {
545
- type: "button",
546
- onClick: () => M("/customer/carts"),
547
- className: "flex-1 rounded-lg border border-border-subtle px-4 py-2.5 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
548
- children: "Browse More"
549
- })]
550
- })
551
- ]
552
- }),
553
- P !== "confirmation" && /* @__PURE__ */ T("div", {
554
- className: "flex justify-between mt-5",
555
- children: [/* @__PURE__ */ T("button", {
556
- type: "button",
557
- onClick: Q,
558
- disabled: P === "location",
559
- className: t("flex items-center gap-2 rounded-lg border border-border-subtle px-4 py-2.5 text-sm font-medium text-text-primary transition-colors", P === "location" ? "opacity-40 cursor-not-allowed" : "hover:bg-accent"),
560
- children: [/* @__PURE__ */ w(l, { className: "h-4 w-4" }), "Previous"]
561
- }), /* @__PURE__ */ w("button", {
562
- type: "button",
563
- onClick: Z,
564
- disabled: I,
565
- className: t("flex items-center gap-2 rounded-lg bg-foreground px-4 py-2.5 text-sm font-medium text-background transition-opacity", I ? "opacity-60 cursor-not-allowed" : "hover:opacity-90"),
566
- children: I ? /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(g, { className: "h-4 w-4 animate-spin" }), P === "payment" ? "Processing Payment..." : "Processing..."] }) : /* @__PURE__ */ T(C, { children: [P === "payment" ? "Confirm & Pay" : "Next", /* @__PURE__ */ w(u, { className: "h-4 w-4" })] })
567
- })]
568
- })
569
- ]
570
- }), /* @__PURE__ */ w("div", {
571
- className: "lg:col-span-1",
572
- children: /* @__PURE__ */ T(E, {
573
- className: "sticky top-6 p-5",
574
- children: [
575
- /* @__PURE__ */ w("h3", {
576
- className: "text-base font-semibold text-text-primary mb-4",
577
- children: "Service Summary"
578
- }),
579
- /* @__PURE__ */ T("div", {
580
- className: "flex items-center gap-3 mb-4",
581
- children: [/* @__PURE__ */ w("img", {
582
- src: N.image,
583
- alt: N.name,
584
- className: "h-12 w-12 rounded-lg object-cover"
585
- }), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
586
- className: "text-sm font-medium text-text-primary",
587
- children: N.name
588
- }), /* @__PURE__ */ w("p", {
589
- className: "text-xs text-text-secondary",
590
- children: N.category
591
- })] })]
592
- }),
593
- /* @__PURE__ */ T("div", {
594
- className: "space-y-2 text-sm border-t border-border-subtle pt-3",
595
- children: [/* @__PURE__ */ T("div", {
596
- className: "flex justify-between",
597
- children: [/* @__PURE__ */ w("span", {
598
- className: "text-text-secondary",
599
- children: "Service Fee:"
600
- }), /* @__PURE__ */ w("span", {
601
- className: "text-text-primary",
602
- children: i(50, { minimumFractionDigits: 0 })
603
- })]
604
- }), /* @__PURE__ */ T("div", {
605
- className: "flex justify-between",
606
- children: [/* @__PURE__ */ w("span", {
607
- className: "text-text-secondary",
608
- children: "Advance Payment:"
609
- }), /* @__PURE__ */ w("span", {
610
- className: "font-medium text-text-primary",
611
- children: i(100, { minimumFractionDigits: 0 })
612
- })]
613
- })]
614
- }),
615
- /* @__PURE__ */ T("div", {
616
- className: "flex items-center gap-2 mt-3 pt-3 border-t border-border-subtle text-status-success-text",
617
- children: [/* @__PURE__ */ w(f, { className: "h-3.5 w-3.5" }), /* @__PURE__ */ w("span", {
618
- className: "text-xs",
619
- children: "Pay remaining amount at cart"
620
- })]
621
- })
622
- ]
623
- })
624
- })]
625
- })
626
- ]
627
- });
628
- }
629
- //#endregion
630
- export { j as DirectServiceBookingPage };
631
-
632
- //# sourceMappingURL=DirectServiceBookingPage.js.map