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