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