@burdenoff/microfe-adaptercloud 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 (153) hide show
  1. package/dist/adaptercloud/AdapterCloudRoot.js +65 -121
  2. package/dist/adaptercloud/AdapterCloudRoot.js.map +1 -1
  3. package/dist/adaptercloud/AdapterCloudRoutes.js +70 -182
  4. package/dist/adaptercloud/AdapterCloudRoutes.js.map +1 -1
  5. package/dist/adaptercloud/components/DataState.js +42 -0
  6. package/dist/adaptercloud/components/DataState.js.map +1 -0
  7. package/dist/adaptercloud/components/SeverityBadge.js +12 -0
  8. package/dist/adaptercloud/components/SeverityBadge.js.map +1 -0
  9. package/dist/adaptercloud/components/StatusBadge.js +43 -44
  10. package/dist/adaptercloud/components/StatusBadge.js.map +1 -1
  11. package/dist/adaptercloud/context/AdapterCloudContext.js +22 -30
  12. package/dist/adaptercloud/context/AdapterCloudContext.js.map +1 -1
  13. package/dist/adaptercloud/hooks/useAdapterCloudApi.js +397 -194
  14. package/dist/adaptercloud/hooks/useAdapterCloudApi.js.map +1 -1
  15. package/dist/adaptercloud/index.js +1 -0
  16. package/dist/adaptercloud/pages/OverviewPage.js +334 -0
  17. package/dist/adaptercloud/pages/OverviewPage.js.map +1 -0
  18. package/dist/adaptercloud/pages/adapters/AdapterDetailPage.js +187 -0
  19. package/dist/adaptercloud/pages/adapters/AdapterDetailPage.js.map +1 -0
  20. package/dist/adaptercloud/pages/adapters/AdapterFormPage.js +278 -0
  21. package/dist/adaptercloud/pages/adapters/AdapterFormPage.js.map +1 -0
  22. package/dist/adaptercloud/pages/adapters/AdaptersListPage.js +172 -0
  23. package/dist/adaptercloud/pages/adapters/AdaptersListPage.js.map +1 -0
  24. package/dist/adaptercloud/pages/connections/ConnectionDetailPage.js +247 -0
  25. package/dist/adaptercloud/pages/connections/ConnectionDetailPage.js.map +1 -0
  26. package/dist/adaptercloud/pages/connections/ConnectionFormPage.js +271 -0
  27. package/dist/adaptercloud/pages/connections/ConnectionFormPage.js.map +1 -0
  28. package/dist/adaptercloud/pages/connections/ConnectionsListPage.js +167 -0
  29. package/dist/adaptercloud/pages/connections/ConnectionsListPage.js.map +1 -0
  30. package/dist/adaptercloud/pages/costs/CostsPage.js +169 -0
  31. package/dist/adaptercloud/pages/costs/CostsPage.js.map +1 -0
  32. package/dist/adaptercloud/pages/drift/DriftListPage.js +132 -0
  33. package/dist/adaptercloud/pages/drift/DriftListPage.js.map +1 -0
  34. package/dist/adaptercloud/pages/policies/PoliciesListPage.js +171 -0
  35. package/dist/adaptercloud/pages/policies/PoliciesListPage.js.map +1 -0
  36. package/dist/adaptercloud/pages/policies/PolicyDetailPage.js +185 -0
  37. package/dist/adaptercloud/pages/policies/PolicyDetailPage.js.map +1 -0
  38. package/dist/adaptercloud/pages/policies/PolicyFormPage.js +215 -0
  39. package/dist/adaptercloud/pages/policies/PolicyFormPage.js.map +1 -0
  40. package/dist/adaptercloud/pages/resources/ResourceDetailPage.js +207 -0
  41. package/dist/adaptercloud/pages/resources/ResourceDetailPage.js.map +1 -0
  42. package/dist/adaptercloud/pages/resources/ResourcesListPage.js +182 -0
  43. package/dist/adaptercloud/pages/resources/ResourcesListPage.js.map +1 -0
  44. package/dist/adaptercloud/pages/sync-runs/SyncRunsListPage.js +196 -0
  45. package/dist/adaptercloud/pages/sync-runs/SyncRunsListPage.js.map +1 -0
  46. package/dist/adaptercloud/pages/violations/ViolationsListPage.js +258 -0
  47. package/dist/adaptercloud/pages/violations/ViolationsListPage.js.map +1 -0
  48. package/dist/adaptercloud/store/adaptercloudStore.js +1 -7
  49. package/dist/adaptercloud/store/adaptercloudStore.js.map +1 -1
  50. package/dist/adaptercloud/utils/domain.js +105 -0
  51. package/dist/adaptercloud/utils/domain.js.map +1 -0
  52. package/dist/adaptercloud/utils/formatters.js +1 -12
  53. package/dist/adaptercloud/utils/formatters.js.map +1 -1
  54. package/dist/index.js +5 -4
  55. package/package.json +1 -1
  56. package/dist/adaptercloud/components/InvestmentCard.js +0 -98
  57. package/dist/adaptercloud/components/InvestmentCard.js.map +0 -1
  58. package/dist/adaptercloud/components/RatingDisplay.js +0 -35
  59. package/dist/adaptercloud/components/RatingDisplay.js.map +0 -1
  60. package/dist/adaptercloud/mocks/data.js +0 -1517
  61. package/dist/adaptercloud/mocks/data.js.map +0 -1
  62. package/dist/adaptercloud/mocks/users.js +0 -34
  63. package/dist/adaptercloud/mocks/users.js.map +0 -1
  64. package/dist/adaptercloud/pages/HomePage.js +0 -934
  65. package/dist/adaptercloud/pages/HomePage.js.map +0 -1
  66. package/dist/adaptercloud/pages/admin/AdminAnalyticsPage.js +0 -653
  67. package/dist/adaptercloud/pages/admin/AdminAnalyticsPage.js.map +0 -1
  68. package/dist/adaptercloud/pages/admin/AdminDashboard.js +0 -665
  69. package/dist/adaptercloud/pages/admin/AdminDashboard.js.map +0 -1
  70. package/dist/adaptercloud/pages/admin/AdminFinancialPage.js +0 -426
  71. package/dist/adaptercloud/pages/admin/AdminFinancialPage.js.map +0 -1
  72. package/dist/adaptercloud/pages/admin/AdminOrdersPage.js +0 -665
  73. package/dist/adaptercloud/pages/admin/AdminOrdersPage.js.map +0 -1
  74. package/dist/adaptercloud/pages/admin/AdminProfilePage.js +0 -261
  75. package/dist/adaptercloud/pages/admin/AdminProfilePage.js.map +0 -1
  76. package/dist/adaptercloud/pages/admin/AdminSettingsPage.js +0 -663
  77. package/dist/adaptercloud/pages/admin/AdminSettingsPage.js.map +0 -1
  78. package/dist/adaptercloud/pages/admin/CartManagementPage.js +0 -874
  79. package/dist/adaptercloud/pages/admin/CartManagementPage.js.map +0 -1
  80. package/dist/adaptercloud/pages/admin/UserManagementPage.js +0 -898
  81. package/dist/adaptercloud/pages/admin/UserManagementPage.js.map +0 -1
  82. package/dist/adaptercloud/pages/cart-owner/AnalyticsDashboard.js +0 -840
  83. package/dist/adaptercloud/pages/cart-owner/AnalyticsDashboard.js.map +0 -1
  84. package/dist/adaptercloud/pages/cart-owner/BusinessSettingsPage.js +0 -714
  85. package/dist/adaptercloud/pages/cart-owner/BusinessSettingsPage.js.map +0 -1
  86. package/dist/adaptercloud/pages/cart-owner/CartOwnerDashboard.js +0 -788
  87. package/dist/adaptercloud/pages/cart-owner/CartOwnerDashboard.js.map +0 -1
  88. package/dist/adaptercloud/pages/cart-owner/CartOwnerProfilePage.js +0 -888
  89. package/dist/adaptercloud/pages/cart-owner/CartOwnerProfilePage.js.map +0 -1
  90. package/dist/adaptercloud/pages/cart-owner/CartServiceConfigPage.js +0 -634
  91. package/dist/adaptercloud/pages/cart-owner/CartServiceConfigPage.js.map +0 -1
  92. package/dist/adaptercloud/pages/cart-owner/InventoryManagementPage.js +0 -907
  93. package/dist/adaptercloud/pages/cart-owner/InventoryManagementPage.js.map +0 -1
  94. package/dist/adaptercloud/pages/cart-owner/OrderManagementPage.js +0 -875
  95. package/dist/adaptercloud/pages/cart-owner/OrderManagementPage.js.map +0 -1
  96. package/dist/adaptercloud/pages/cart-owner/StaffManagementPage.js +0 -827
  97. package/dist/adaptercloud/pages/cart-owner/StaffManagementPage.js.map +0 -1
  98. package/dist/adaptercloud/pages/common/HelpSupportPage.js +0 -1329
  99. package/dist/adaptercloud/pages/common/HelpSupportPage.js.map +0 -1
  100. package/dist/adaptercloud/pages/common/NotificationCenterPage.js +0 -671
  101. package/dist/adaptercloud/pages/common/NotificationCenterPage.js.map +0 -1
  102. package/dist/adaptercloud/pages/common/SettingsPage.js +0 -982
  103. package/dist/adaptercloud/pages/common/SettingsPage.js.map +0 -1
  104. package/dist/adaptercloud/pages/customer/BookingDetailsPage.js +0 -596
  105. package/dist/adaptercloud/pages/customer/BookingDetailsPage.js.map +0 -1
  106. package/dist/adaptercloud/pages/customer/CartDetailPage.js +0 -623
  107. package/dist/adaptercloud/pages/customer/CartDetailPage.js.map +0 -1
  108. package/dist/adaptercloud/pages/customer/CartDiscoveryPage.js +0 -552
  109. package/dist/adaptercloud/pages/customer/CartDiscoveryPage.js.map +0 -1
  110. package/dist/adaptercloud/pages/customer/CheckoutPage.js +0 -534
  111. package/dist/adaptercloud/pages/customer/CheckoutPage.js.map +0 -1
  112. package/dist/adaptercloud/pages/customer/CustomerDashboard.js +0 -525
  113. package/dist/adaptercloud/pages/customer/CustomerDashboard.js.map +0 -1
  114. package/dist/adaptercloud/pages/customer/CustomerProfilePage.js +0 -623
  115. package/dist/adaptercloud/pages/customer/CustomerProfilePage.js.map +0 -1
  116. package/dist/adaptercloud/pages/customer/DirectServiceBookingPage.js +0 -629
  117. package/dist/adaptercloud/pages/customer/DirectServiceBookingPage.js.map +0 -1
  118. package/dist/adaptercloud/pages/customer/FavoritesPage.js +0 -480
  119. package/dist/adaptercloud/pages/customer/FavoritesPage.js.map +0 -1
  120. package/dist/adaptercloud/pages/customer/OrderHistoryPage.js +0 -444
  121. package/dist/adaptercloud/pages/customer/OrderHistoryPage.js.map +0 -1
  122. package/dist/adaptercloud/pages/customer/OrderTrackingPage.js +0 -391
  123. package/dist/adaptercloud/pages/customer/OrderTrackingPage.js.map +0 -1
  124. package/dist/adaptercloud/pages/customer/PaymentMethodsPage.js +0 -504
  125. package/dist/adaptercloud/pages/customer/PaymentMethodsPage.js.map +0 -1
  126. package/dist/adaptercloud/pages/customer/ReviewsPage.js +0 -609
  127. package/dist/adaptercloud/pages/customer/ReviewsPage.js.map +0 -1
  128. package/dist/adaptercloud/pages/customer/SavedAddressesPage.js +0 -459
  129. package/dist/adaptercloud/pages/customer/SavedAddressesPage.js.map +0 -1
  130. package/dist/adaptercloud/pages/investor/InvestmentDetailsPage.js +0 -851
  131. package/dist/adaptercloud/pages/investor/InvestmentDetailsPage.js.map +0 -1
  132. package/dist/adaptercloud/pages/investor/InvestmentOpportunitiesPage.js +0 -942
  133. package/dist/adaptercloud/pages/investor/InvestmentOpportunitiesPage.js.map +0 -1
  134. package/dist/adaptercloud/pages/investor/InvestorAnalyticsPage.js +0 -683
  135. package/dist/adaptercloud/pages/investor/InvestorAnalyticsPage.js.map +0 -1
  136. package/dist/adaptercloud/pages/investor/InvestorDashboard.js +0 -452
  137. package/dist/adaptercloud/pages/investor/InvestorDashboard.js.map +0 -1
  138. package/dist/adaptercloud/pages/investor/InvestorInvestmentsPage.js +0 -402
  139. package/dist/adaptercloud/pages/investor/InvestorInvestmentsPage.js.map +0 -1
  140. package/dist/adaptercloud/pages/investor/InvestorPortfolioPage.js +0 -571
  141. package/dist/adaptercloud/pages/investor/InvestorPortfolioPage.js.map +0 -1
  142. package/dist/adaptercloud/pages/investor/InvestorProfilePage.js +0 -1067
  143. package/dist/adaptercloud/pages/investor/InvestorProfilePage.js.map +0 -1
  144. package/dist/adaptercloud/pages/worker/TaskDetailsPage.js +0 -526
  145. package/dist/adaptercloud/pages/worker/TaskDetailsPage.js.map +0 -1
  146. package/dist/adaptercloud/pages/worker/WorkerDashboard.js +0 -659
  147. package/dist/adaptercloud/pages/worker/WorkerDashboard.js.map +0 -1
  148. package/dist/adaptercloud/pages/worker/WorkerOrdersPage.js +0 -678
  149. package/dist/adaptercloud/pages/worker/WorkerOrdersPage.js.map +0 -1
  150. package/dist/adaptercloud/pages/worker/WorkerProfilePage.js +0 -689
  151. package/dist/adaptercloud/pages/worker/WorkerProfilePage.js.map +0 -1
  152. package/dist/adaptercloud/pages/worker/WorkerSchedulePage.js +0 -582
  153. package/dist/adaptercloud/pages/worker/WorkerSchedulePage.js.map +0 -1
@@ -1,623 +0,0 @@
1
- import { useAdapterCloud as e } from "../../context/AdapterCloudContext.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 { useInvestmentOpportunities as ee, useOfferings as i, useProviders as a } from "../../hooks/useAdapterCloudApi.js";
6
- import { formatCurrency as o, formatDistance as s, formatDuration as c } from "../../utils/formatters.js";
7
- import { useMemo as l, useState as u } from "react";
8
- import { ArrowLeft as d, Calendar as f, CheckCircle2 as p, Clock as m, Flame as h, Home as g, Leaf as _, MapPin as v, Minus as y, Plus as b, Search as x, ShoppingCart as S, Star as C, TrendingUp as w, X as T } from "lucide-react";
9
- import { useParams as E } from "react-router-dom";
10
- import { Fragment as D, jsx as O, jsxs as k } from "react/jsx-runtime";
11
- import { EmphasisPanel as A } from "@burdenoff/fe-libs/ui";
12
- //#region src/adaptercloud/pages/customer/CartDetailPage.tsx
13
- function j() {
14
- let { cartId: j } = E(), { navigateTo: M } = e(), { data: N = [], isLoading: te } = a(), { data: P = [], isLoading: ne } = i(j), { data: F = [], isLoading: re } = ee(), I = l(() => N.find((e) => e.id === j), [N, j]), L = l(() => F.find((e) => e.cartId === j), [F, j]), [R, z] = u(""), [B, V] = u(""), [H, U] = u([]), [W, G] = u(!1), [K, q] = u(null), J = l(() => P.map((e) => ({
15
- id: e.id,
16
- name: e.name,
17
- price: e.price,
18
- description: e.description,
19
- image: e.media?.[0] || "https://images.unsplash.com/photo-1567620905732-2d1ec7ab7445?w=400",
20
- category: e.category,
21
- isVeg: !0,
22
- duration: e.durationMinutes,
23
- serviceType: e.serviceType
24
- })), [P]), Y = l(() => [...new Set(J.map((e) => e.category))], [J]), X = l(() => {
25
- let e = J;
26
- if (B && (e = e.filter((e) => e.category === B)), R.trim()) {
27
- let t = R.toLowerCase();
28
- e = e.filter((e) => e.name.toLowerCase().includes(t) || e.description.toLowerCase().includes(t));
29
- }
30
- return e;
31
- }, [
32
- J,
33
- B,
34
- R
35
- ]), Z = l(() => {
36
- let e = {};
37
- return X.forEach((t) => {
38
- e[t.category] || (e[t.category] = []), e[t.category].push(t);
39
- }), e;
40
- }, [X]), ie = (e, t = 1, n) => {
41
- U((r) => r.find((t) => t.productId === e.id) ? r.map((n) => n.productId === e.id ? {
42
- ...n,
43
- quantity: n.quantity + t
44
- } : n) : [...r, {
45
- id: `cart-${Date.now()}`,
46
- productId: e.id,
47
- name: e.name,
48
- price: e.price,
49
- quantity: t,
50
- specialInstructions: n
51
- }]);
52
- }, Q = (e, t) => {
53
- U((n) => n.map((n) => n.productId === e ? {
54
- ...n,
55
- quantity: Math.max(0, n.quantity + t)
56
- } : n).filter((e) => e.quantity > 0));
57
- }, $ = (e) => {
58
- U((t) => t.filter((t) => t.productId !== e));
59
- }, ae = (e) => H.find((t) => t.productId === e)?.quantity ?? 0, oe = H.reduce((e, t) => e + t.price * t.quantity, 0), se = H.reduce((e, t) => e + t.quantity, 0), ce = (e) => {
60
- q({
61
- product: e,
62
- quantity: 1,
63
- specialInstructions: ""
64
- }), G(!0);
65
- };
66
- return I ? /* @__PURE__ */ k(n, {
67
- title: /* @__PURE__ */ k("div", {
68
- className: "flex items-center gap-3",
69
- children: [
70
- /* @__PURE__ */ O("button", {
71
- type: "button",
72
- onClick: () => M("/customer/carts"),
73
- className: "rounded-md p-1 text-text-secondary hover:bg-accent hover:text-text-primary transition-colors",
74
- children: /* @__PURE__ */ O(d, { className: "h-5 w-5" })
75
- }),
76
- /* @__PURE__ */ O("span", {
77
- className: "truncate",
78
- children: I.name
79
- }),
80
- I.isVerified && /* @__PURE__ */ O(p, { className: "h-5 w-5 text-accent-blue shrink-0" })
81
- ]
82
- }),
83
- description: I.category,
84
- purpose: "See everything this cart offers and decide whether to order — its menu and prices, ratings and reviews, hours and location. Add items to your order, book a direct service, or save it to favorites for later.",
85
- children: [
86
- /* @__PURE__ */ k(A, {
87
- className: "relative h-48 overflow-hidden p-0",
88
- children: [/* @__PURE__ */ O("img", {
89
- src: I.image,
90
- alt: I.name,
91
- className: "h-full w-full object-cover"
92
- }), /* @__PURE__ */ O("div", {
93
- className: "absolute bottom-0 inset-x-0 bg-gradient-to-t from-black/60 to-transparent p-4",
94
- children: /* @__PURE__ */ k("div", {
95
- className: "flex items-center gap-3",
96
- children: [/* @__PURE__ */ O("span", {
97
- className: t("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium", I.isOpen ? "bg-status-success-bg-subtle/20 text-status-success-text" : "bg-status-error-bg-subtle/20 text-status-error-text"),
98
- children: I.isOpen ? "Open Now" : "Closed"
99
- }), /* @__PURE__ */ k("div", {
100
- className: "flex items-center gap-1 text-white text-sm",
101
- children: [
102
- /* @__PURE__ */ O(C, { className: "h-3.5 w-3.5 fill-status-warning-text text-status-warning-text" }),
103
- /* @__PURE__ */ O("span", {
104
- className: "font-medium",
105
- children: I.rating
106
- }),
107
- /* @__PURE__ */ k("span", {
108
- className: "text-white/70",
109
- children: [
110
- "(",
111
- I.totalRatings,
112
- ")"
113
- ]
114
- })
115
- ]
116
- })]
117
- })
118
- })]
119
- }),
120
- !I.isOpen && /* @__PURE__ */ O("div", {
121
- className: "mt-4 rounded-lg border border-status-warning-border/30 bg-status-warning-bg-subtle/10 p-3",
122
- children: /* @__PURE__ */ k("p", {
123
- className: "text-sm text-status-warning-text",
124
- children: [/* @__PURE__ */ O("strong", { children: "This cart is currently closed." }), " You can browse the offerings but orders are not being accepted."]
125
- })
126
- }),
127
- /* @__PURE__ */ k("div", {
128
- className: "mt-4 grid grid-cols-1 gap-3 sm:grid-cols-3",
129
- children: [
130
- /* @__PURE__ */ k("div", {
131
- className: "rounded-lg border border-border-subtle bg-bg-surface p-3",
132
- children: [
133
- /* @__PURE__ */ k("div", {
134
- className: "flex items-center gap-2 text-text-secondary text-xs mb-1",
135
- children: [/* @__PURE__ */ O(v, { className: "h-3.5 w-3.5" }), /* @__PURE__ */ O("span", {
136
- className: "font-medium uppercase tracking-wider",
137
- children: "Location"
138
- })]
139
- }),
140
- /* @__PURE__ */ O("p", {
141
- className: "text-sm text-text-primary",
142
- children: I.location.address
143
- }),
144
- /* @__PURE__ */ k("p", {
145
- className: "text-xs text-text-secondary",
146
- children: [s(I.distance), " away"]
147
- })
148
- ]
149
- }),
150
- /* @__PURE__ */ k("div", {
151
- className: "rounded-lg border border-border-subtle bg-bg-surface p-3",
152
- children: [
153
- /* @__PURE__ */ k("div", {
154
- className: "flex items-center gap-2 text-text-secondary text-xs mb-1",
155
- children: [/* @__PURE__ */ O(m, { className: "h-3.5 w-3.5" }), /* @__PURE__ */ O("span", {
156
- className: "font-medium uppercase tracking-wider",
157
- children: "Estimated Time"
158
- })]
159
- }),
160
- /* @__PURE__ */ O("p", {
161
- className: "text-sm text-text-primary",
162
- children: c(I.estimatedTime)
163
- }),
164
- I.averageOrderValue && /* @__PURE__ */ k("p", {
165
- className: "text-xs text-text-secondary",
166
- children: ["Avg ", o(I.averageOrderValue, { minimumFractionDigits: 0 })]
167
- })
168
- ]
169
- }),
170
- /* @__PURE__ */ k("div", {
171
- className: "rounded-lg border border-border-subtle bg-bg-surface p-3",
172
- children: [
173
- /* @__PURE__ */ k("div", {
174
- className: "flex items-center gap-2 text-text-secondary text-xs mb-1",
175
- children: [/* @__PURE__ */ O(C, { className: "h-3.5 w-3.5" }), /* @__PURE__ */ O("span", {
176
- className: "font-medium uppercase tracking-wider",
177
- children: "Rating"
178
- })]
179
- }),
180
- /* @__PURE__ */ k("p", {
181
- className: "text-sm text-text-primary",
182
- children: [I.rating, " / 5.0"]
183
- }),
184
- /* @__PURE__ */ k("p", {
185
- className: "text-xs text-text-secondary",
186
- children: [I.totalRatings, " reviews"]
187
- })
188
- ]
189
- })
190
- ]
191
- }),
192
- I.businessHours && Object.keys(I.businessHours).length > 0 && /* @__PURE__ */ k("section", {
193
- className: "mt-6",
194
- children: [/* @__PURE__ */ O("h2", {
195
- className: "text-base font-semibold text-text-primary mb-2",
196
- children: "Operating Hours"
197
- }), /* @__PURE__ */ O("div", {
198
- className: "rounded-lg border border-border-subtle bg-bg-surface overflow-hidden",
199
- children: Object.entries(I.businessHours).map(([e, t]) => /* @__PURE__ */ k("div", {
200
- className: "flex items-center justify-between px-4 py-2 border-b border-border-subtle last:border-b-0",
201
- children: [/* @__PURE__ */ O("span", {
202
- className: "text-sm font-medium text-text-primary capitalize",
203
- children: e
204
- }), t.isOpen ? /* @__PURE__ */ k("span", {
205
- className: "text-sm text-text-secondary",
206
- children: [
207
- t.open,
208
- " - ",
209
- t.close
210
- ]
211
- }) : /* @__PURE__ */ O("span", {
212
- className: "text-sm text-status-error-text",
213
- children: "Closed"
214
- })]
215
- }, e))
216
- })]
217
- }),
218
- /* @__PURE__ */ k("div", {
219
- className: "mt-6 grid grid-cols-1 gap-6 lg:grid-cols-3",
220
- children: [/* @__PURE__ */ k("div", {
221
- className: "lg:col-span-2",
222
- children: [
223
- /* @__PURE__ */ k("div", {
224
- className: "flex flex-col gap-3 sm:flex-row mb-4",
225
- children: [/* @__PURE__ */ k("div", {
226
- className: "relative flex-1",
227
- children: [/* @__PURE__ */ O(x, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-secondary" }), /* @__PURE__ */ O("input", {
228
- type: "text",
229
- placeholder: "Search offerings...",
230
- value: R,
231
- onChange: (e) => z(e.target.value),
232
- className: "w-full rounded-lg border border-border-subtle bg-bg-surface py-2 pl-10 pr-3 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
233
- })]
234
- }), /* @__PURE__ */ k("select", {
235
- value: B,
236
- onChange: (e) => V(e.target.value),
237
- className: "rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
238
- children: [/* @__PURE__ */ O("option", {
239
- value: "",
240
- children: "All Categories"
241
- }), Y.map((e) => /* @__PURE__ */ O("option", {
242
- value: e,
243
- children: e
244
- }, e))]
245
- })]
246
- }),
247
- /* @__PURE__ */ k("h2", {
248
- className: "text-lg font-semibold text-text-primary mb-3",
249
- children: [
250
- "Menu & Services (",
251
- X.length,
252
- ")"
253
- ]
254
- }),
255
- X.length === 0 ? /* @__PURE__ */ k("div", {
256
- className: "rounded-lg border border-border-subtle bg-bg-surface p-8 text-center",
257
- children: [/* @__PURE__ */ O(x, { className: "mx-auto h-10 w-10 text-text-secondary/50" }), /* @__PURE__ */ O("p", {
258
- className: "mt-3 text-sm text-text-secondary",
259
- children: "No offerings found"
260
- })]
261
- }) : /* @__PURE__ */ O("div", {
262
- className: "space-y-6",
263
- children: Object.entries(Z).map(([e, n]) => /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("h3", {
264
- className: "text-sm font-semibold text-text-primary mb-2 px-1",
265
- children: e
266
- }), /* @__PURE__ */ O("div", {
267
- className: "space-y-2",
268
- children: n.map((e) => {
269
- let n = ae(e.id);
270
- return /* @__PURE__ */ k("div", {
271
- className: "flex gap-4 rounded-lg border border-border-seam bg-bg-surface p-4 bg-gloss-card shadow-pop",
272
- children: [/* @__PURE__ */ O("div", {
273
- className: "h-20 w-20 shrink-0 rounded-md bg-bg-sunken overflow-hidden",
274
- children: /* @__PURE__ */ O("img", {
275
- src: e.image,
276
- alt: e.name,
277
- className: "h-full w-full object-cover"
278
- })
279
- }), /* @__PURE__ */ k("div", {
280
- className: "flex-1 min-w-0",
281
- children: [
282
- /* @__PURE__ */ k("div", {
283
- className: "flex items-start justify-between gap-2",
284
- children: [/* @__PURE__ */ k("div", { children: [/* @__PURE__ */ k("div", {
285
- className: "flex items-center gap-2",
286
- children: [/* @__PURE__ */ O("h4", {
287
- className: "text-sm font-semibold text-text-primary",
288
- children: e.name
289
- }), e.isVeg && /* @__PURE__ */ O(_, { className: "h-3.5 w-3.5 text-status-success-text" })]
290
- }), /* @__PURE__ */ O("p", {
291
- className: "text-xs text-text-secondary mt-0.5",
292
- children: e.category
293
- })] }), /* @__PURE__ */ O("span", {
294
- className: "text-sm font-bold text-text-primary whitespace-nowrap",
295
- children: o(e.price, { minimumFractionDigits: 0 })
296
- })]
297
- }),
298
- /* @__PURE__ */ O("p", {
299
- className: "mt-1 text-xs text-text-secondary line-clamp-2",
300
- children: e.description
301
- }),
302
- /* @__PURE__ */ k("div", {
303
- className: "mt-2 flex flex-wrap items-center gap-2 text-[10px] text-text-secondary",
304
- children: [
305
- e.duration != null && e.duration > 0 && /* @__PURE__ */ k("span", {
306
- className: "flex items-center gap-0.5",
307
- children: [/* @__PURE__ */ O(m, { className: "h-3 w-3" }), c(e.duration)]
308
- }),
309
- e.serviceType && /* @__PURE__ */ O("span", {
310
- className: "rounded bg-bg-sunken px-1.5 py-0.5 capitalize",
311
- children: e.serviceType
312
- }),
313
- e.spiceLevel && /* @__PURE__ */ k("span", {
314
- className: "flex items-center gap-0.5 rounded bg-bg-sunken px-1.5 py-0.5 capitalize",
315
- children: [/* @__PURE__ */ O(h, { className: "h-3 w-3" }), e.spiceLevel]
316
- })
317
- ]
318
- }),
319
- /* @__PURE__ */ O("div", {
320
- className: "mt-2 flex justify-end",
321
- children: n > 0 ? /* @__PURE__ */ k("div", {
322
- className: "flex items-center gap-2",
323
- children: [
324
- /* @__PURE__ */ O("button", {
325
- type: "button",
326
- onClick: () => Q(e.id, -1),
327
- className: "flex h-7 w-7 items-center justify-center rounded-full bg-bg-sunken text-text-primary hover:bg-accent",
328
- children: /* @__PURE__ */ O(y, { className: "h-3.5 w-3.5" })
329
- }),
330
- /* @__PURE__ */ O("span", {
331
- className: "min-w-[2ch] text-center text-sm font-medium text-text-primary",
332
- children: n
333
- }),
334
- /* @__PURE__ */ O("button", {
335
- type: "button",
336
- onClick: () => Q(e.id, 1),
337
- className: "flex h-7 w-7 items-center justify-center rounded-full bg-foreground text-background hover:opacity-90",
338
- children: /* @__PURE__ */ O(b, { className: "h-3.5 w-3.5" })
339
- }),
340
- /* @__PURE__ */ O("button", {
341
- type: "button",
342
- onClick: () => $(e.id),
343
- className: "ml-1 flex h-7 w-7 items-center justify-center rounded-full text-status-error-text hover:bg-status-error-bg/10",
344
- children: /* @__PURE__ */ O(T, { className: "h-3.5 w-3.5" })
345
- })
346
- ]
347
- }) : /* @__PURE__ */ O("button", {
348
- type: "button",
349
- disabled: !I.isOpen,
350
- onClick: () => ce(e),
351
- className: t("rounded-lg px-4 py-1.5 text-xs font-medium transition-opacity", I.isOpen ? "bg-foreground text-background hover:opacity-90" : "bg-bg-sunken text-text-secondary cursor-not-allowed"),
352
- children: "Add"
353
- })
354
- })
355
- ]
356
- })]
357
- }, e.id);
358
- })
359
- })] }, e))
360
- })
361
- ]
362
- }), /* @__PURE__ */ k("div", {
363
- className: "space-y-4",
364
- children: [
365
- /* @__PURE__ */ k("div", {
366
- className: "rounded-lg border border-border-seam bg-bg-surface p-4 lg:sticky lg:top-6 bg-gloss-card shadow-pop",
367
- children: [/* @__PURE__ */ k("h3", {
368
- className: "text-base font-semibold text-text-primary mb-3 flex items-center gap-2",
369
- children: [/* @__PURE__ */ O(S, { className: "h-4 w-4" }), "Your Order"]
370
- }), H.length === 0 ? /* @__PURE__ */ k("div", {
371
- className: "py-6 text-center",
372
- children: [/* @__PURE__ */ O(S, { className: "mx-auto h-8 w-8 text-text-secondary/40" }), /* @__PURE__ */ O("p", {
373
- className: "mt-2 text-sm text-text-secondary",
374
- children: "Your cart is empty"
375
- })]
376
- }) : /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ O("div", {
377
- className: "space-y-2 max-h-64 overflow-y-auto mb-3",
378
- children: H.map((e) => /* @__PURE__ */ k("div", {
379
- className: "flex items-center justify-between gap-2",
380
- children: [/* @__PURE__ */ k("div", {
381
- className: "flex-1 min-w-0",
382
- children: [/* @__PURE__ */ O("p", {
383
- className: "text-sm font-medium text-text-primary truncate",
384
- children: e.name
385
- }), /* @__PURE__ */ k("p", {
386
- className: "text-xs text-text-secondary",
387
- children: [
388
- o(e.price, { minimumFractionDigits: 0 }),
389
- " x",
390
- " ",
391
- e.quantity
392
- ]
393
- })]
394
- }), /* @__PURE__ */ k("div", {
395
- className: "flex items-center gap-1",
396
- children: [
397
- /* @__PURE__ */ O("button", {
398
- type: "button",
399
- onClick: () => Q(e.productId, -1),
400
- className: "flex h-6 w-6 items-center justify-center rounded bg-bg-sunken text-text-primary text-xs",
401
- children: "-"
402
- }),
403
- /* @__PURE__ */ O("span", {
404
- className: "min-w-[2ch] text-center text-xs font-medium",
405
- children: e.quantity
406
- }),
407
- /* @__PURE__ */ O("button", {
408
- type: "button",
409
- onClick: () => Q(e.productId, 1),
410
- className: "flex h-6 w-6 items-center justify-center rounded bg-bg-sunken text-text-primary text-xs",
411
- children: "+"
412
- }),
413
- /* @__PURE__ */ O("button", {
414
- type: "button",
415
- onClick: () => $(e.productId),
416
- className: "ml-1 text-status-error-text hover:text-status-error-text/80",
417
- children: /* @__PURE__ */ O(T, { className: "h-3.5 w-3.5" })
418
- })
419
- ]
420
- })]
421
- }, e.id))
422
- }), /* @__PURE__ */ k("div", {
423
- className: "border-t border-border-subtle pt-3",
424
- children: [/* @__PURE__ */ k("div", {
425
- className: "flex justify-between items-center mb-3",
426
- children: [/* @__PURE__ */ k("span", {
427
- className: "text-sm font-semibold text-text-primary",
428
- children: ["Total: ", o(oe, { minimumFractionDigits: 0 })]
429
- }), /* @__PURE__ */ k("span", {
430
- className: "text-xs text-text-secondary",
431
- children: [se, " items"]
432
- })]
433
- }), /* @__PURE__ */ O("button", {
434
- type: "button",
435
- onClick: () => M("/customer/checkout"),
436
- className: "w-full rounded-lg bg-foreground py-2.5 text-sm font-medium text-background hover:opacity-90 transition-opacity",
437
- children: "Proceed to Checkout"
438
- })]
439
- })] })]
440
- }),
441
- I.serviceTypes?.includes("direct_service") && /* @__PURE__ */ k("div", {
442
- className: "rounded-lg border border-accent-purple-subtle/30 bg-accent-purple-subtle/10 p-4",
443
- children: [
444
- /* @__PURE__ */ k("h3", {
445
- className: "text-sm font-semibold text-text-primary flex items-center gap-2 mb-2",
446
- children: [/* @__PURE__ */ O(g, { className: "h-4 w-4 text-accent-purple" }), "Direct Service"]
447
- }),
448
- /* @__PURE__ */ O("p", {
449
- className: "text-xs text-text-secondary mb-3",
450
- children: "Cart comes to your location!"
451
- }),
452
- /* @__PURE__ */ O("button", {
453
- type: "button",
454
- onClick: () => M(`/customer/carts/${I.id}`),
455
- className: "w-full rounded-lg bg-accent-purple-subtle py-2 text-xs font-medium text-white hover:bg-accent-purple-subtle transition-colors",
456
- children: "Book Direct Service"
457
- })
458
- ]
459
- }),
460
- I.serviceTypes?.includes("appointment") && /* @__PURE__ */ k("div", {
461
- className: "rounded-lg border border-accent-blue-subtle/30 bg-accent-blue-subtle/10 p-4",
462
- children: [/* @__PURE__ */ k("h3", {
463
- className: "text-sm font-semibold text-text-primary flex items-center gap-2 mb-2",
464
- children: [/* @__PURE__ */ O(f, { className: "h-4 w-4 text-accent-blue" }), "Appointments Available"]
465
- }), /* @__PURE__ */ O("p", {
466
- className: "text-xs text-text-secondary",
467
- children: "This service provider accepts appointments. Contact them to schedule."
468
- })]
469
- }),
470
- L && /* @__PURE__ */ k("div", {
471
- className: "rounded-lg border border-status-success-border/30 bg-status-success-bg-subtle/10 p-4",
472
- children: [
473
- /* @__PURE__ */ k("h3", {
474
- className: "text-sm font-semibold text-text-primary flex items-center gap-2 mb-2",
475
- children: [/* @__PURE__ */ O(w, { className: "h-4 w-4 text-status-success-text" }), "Investment Opportunity"]
476
- }),
477
- /* @__PURE__ */ O("p", {
478
- className: "text-xs text-text-secondary mb-2",
479
- children: L.description
480
- }),
481
- /* @__PURE__ */ k("div", {
482
- className: "space-y-1 text-xs text-text-secondary mb-3",
483
- children: [
484
- /* @__PURE__ */ k("p", { children: ["Target: ", o(L.targetAmount, { minimumFractionDigits: 0 })] }),
485
- /* @__PURE__ */ k("p", { children: ["Raised: ", o(L.raisedAmount, { minimumFractionDigits: 0 })] }),
486
- /* @__PURE__ */ k("p", { children: [
487
- "Expected Returns: ",
488
- L.expectedReturns,
489
- "%"
490
- ] }),
491
- /* @__PURE__ */ k("p", { children: [
492
- "Min Investment:",
493
- " ",
494
- o(L.minimumInvestment, { minimumFractionDigits: 0 })
495
- ] })
496
- ]
497
- }),
498
- /* @__PURE__ */ O("button", {
499
- type: "button",
500
- onClick: () => alert("Navigate to investor section to fund this business."),
501
- className: "w-full rounded-lg bg-status-success-bg-subtle py-2 text-xs font-medium text-white hover:bg-status-success-bg-subtle transition-colors",
502
- children: "Fund This Business"
503
- })
504
- ]
505
- })
506
- ]
507
- })]
508
- }),
509
- W && K && /* @__PURE__ */ O("div", {
510
- className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",
511
- children: /* @__PURE__ */ O("div", {
512
- className: "w-full max-w-md max-h-[90vh] overflow-y-auto rounded-lg border border-border-subtle bg-bg-surface",
513
- children: /* @__PURE__ */ k("div", {
514
- className: "p-5",
515
- children: [
516
- /* @__PURE__ */ k("div", {
517
- className: "flex items-center justify-between mb-4",
518
- children: [/* @__PURE__ */ O("h3", {
519
- className: "text-lg font-semibold text-text-primary",
520
- children: K.product.name
521
- }), /* @__PURE__ */ O("button", {
522
- type: "button",
523
- onClick: () => {
524
- G(!1), q(null);
525
- },
526
- className: "rounded-md p-1 text-text-secondary hover:text-text-primary",
527
- children: /* @__PURE__ */ O(T, { className: "h-5 w-5" })
528
- })]
529
- }),
530
- /* @__PURE__ */ O("p", {
531
- className: "text-sm text-text-secondary mb-4",
532
- children: K.product.description
533
- }),
534
- /* @__PURE__ */ O("p", {
535
- className: "text-lg font-bold text-text-primary mb-4",
536
- children: o(K.product.price, { minimumFractionDigits: 0 })
537
- }),
538
- /* @__PURE__ */ k("div", {
539
- className: "mb-4",
540
- children: [/* @__PURE__ */ O("label", {
541
- className: "block text-sm font-medium text-text-primary mb-2",
542
- children: "Quantity"
543
- }), /* @__PURE__ */ k("div", {
544
- className: "flex items-center gap-3",
545
- children: [
546
- /* @__PURE__ */ O("button", {
547
- type: "button",
548
- onClick: () => q((e) => e && {
549
- ...e,
550
- quantity: Math.max(1, e.quantity - 1)
551
- }),
552
- className: "flex h-8 w-8 items-center justify-center rounded-full bg-bg-sunken text-text-primary",
553
- children: /* @__PURE__ */ O(y, { className: "h-4 w-4" })
554
- }),
555
- /* @__PURE__ */ O("span", {
556
- className: "min-w-[2ch] text-center font-medium text-text-primary",
557
- children: K.quantity
558
- }),
559
- /* @__PURE__ */ O("button", {
560
- type: "button",
561
- onClick: () => q((e) => e && {
562
- ...e,
563
- quantity: e.quantity + 1
564
- }),
565
- className: "flex h-8 w-8 items-center justify-center rounded-full bg-bg-sunken text-text-primary",
566
- children: /* @__PURE__ */ O(b, { className: "h-4 w-4" })
567
- })
568
- ]
569
- })]
570
- }),
571
- /* @__PURE__ */ k("div", {
572
- className: "mb-4",
573
- children: [/* @__PURE__ */ O("label", {
574
- className: "block text-sm font-medium text-text-primary mb-2",
575
- children: "Special Instructions"
576
- }), /* @__PURE__ */ O("textarea", {
577
- value: K.specialInstructions,
578
- onChange: (e) => q((t) => t && {
579
- ...t,
580
- specialInstructions: e.target.value
581
- }),
582
- placeholder: "Any special requests...",
583
- className: "w-full rounded-lg border border-border-subtle bg-bg-surface p-3 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
584
- rows: 3
585
- })]
586
- }),
587
- /* @__PURE__ */ k("button", {
588
- type: "button",
589
- onClick: () => {
590
- K && (ie(K.product, K.quantity, K.specialInstructions), G(!1), q(null), alert(`${K.product.name} added to cart`));
591
- },
592
- className: "w-full rounded-lg bg-foreground py-2.5 text-sm font-medium text-background hover:opacity-90 transition-opacity",
593
- children: [
594
- "Add to Cart -",
595
- " ",
596
- o(K.product.price * K.quantity, { minimumFractionDigits: 0 })
597
- ]
598
- })
599
- ]
600
- })
601
- })
602
- })
603
- ]
604
- }) : /* @__PURE__ */ O(n, {
605
- title: "Cart Not Found",
606
- children: /* @__PURE__ */ O(r, {
607
- illustration: "empty-generic",
608
- icon: /* @__PURE__ */ O(S, { className: "h-12 w-12" }),
609
- title: "Cart not found",
610
- description: `No cart found with ID"${j}".`,
611
- action: /* @__PURE__ */ O("button", {
612
- type: "button",
613
- onClick: () => M("/customer/carts"),
614
- className: "rounded-lg bg-foreground px-4 py-2 text-sm font-medium text-background hover:opacity-90 transition-opacity",
615
- children: "Browse Carts"
616
- })
617
- })
618
- });
619
- }
620
- //#endregion
621
- export { j as CartDetailPage };
622
-
623
- //# sourceMappingURL=CartDetailPage.js.map