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