@burdenoff/microfe-kadaikodi 2026.704.3 → 2026.704.5

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 (145) hide show
  1. package/dist/kadaikodi/KadaikodiRoutes.js +34 -26
  2. package/dist/kadaikodi/KadaikodiRoutes.js.map +1 -1
  3. package/dist/kadaikodi/components/viz/AllocationBar.js +68 -0
  4. package/dist/kadaikodi/components/viz/AllocationBar.js.map +1 -0
  5. package/dist/kadaikodi/components/viz/AreaChart.js +102 -0
  6. package/dist/kadaikodi/components/viz/AreaChart.js.map +1 -0
  7. package/dist/kadaikodi/components/viz/AvatarStack.js +36 -0
  8. package/dist/kadaikodi/components/viz/AvatarStack.js.map +1 -0
  9. package/dist/kadaikodi/components/viz/BarChart.js +83 -0
  10. package/dist/kadaikodi/components/viz/BarChart.js.map +1 -0
  11. package/dist/kadaikodi/components/viz/CertificateCard.js +4 -0
  12. package/dist/kadaikodi/components/viz/DonutChart.js +109 -0
  13. package/dist/kadaikodi/components/viz/DonutChart.js.map +1 -0
  14. package/dist/kadaikodi/components/viz/HBarFunnel.js +54 -0
  15. package/dist/kadaikodi/components/viz/HBarFunnel.js.map +1 -0
  16. package/dist/kadaikodi/components/viz/Heatmap.js +3 -0
  17. package/dist/kadaikodi/components/viz/KanbanBoard.js +50 -0
  18. package/dist/kadaikodi/components/viz/KanbanBoard.js.map +1 -0
  19. package/dist/kadaikodi/components/viz/LineChart.js +4 -0
  20. package/dist/kadaikodi/components/viz/OrgTree.js +2 -0
  21. package/dist/kadaikodi/components/viz/PathSteps.js +3 -0
  22. package/dist/kadaikodi/components/viz/ProgressRing.js +68 -0
  23. package/dist/kadaikodi/components/viz/ProgressRing.js.map +1 -0
  24. package/dist/kadaikodi/components/viz/RatingStars.js +51 -0
  25. package/dist/kadaikodi/components/viz/RatingStars.js.map +1 -0
  26. package/dist/kadaikodi/components/viz/SegmentedTabs.js +69 -0
  27. package/dist/kadaikodi/components/viz/SegmentedTabs.js.map +1 -0
  28. package/dist/kadaikodi/components/viz/SkillBar.js +3 -0
  29. package/dist/kadaikodi/components/viz/Sparkline.js +74 -0
  30. package/dist/kadaikodi/components/viz/Sparkline.js.map +1 -0
  31. package/dist/kadaikodi/components/viz/StatCard.js +60 -0
  32. package/dist/kadaikodi/components/viz/StatCard.js.map +1 -0
  33. package/dist/kadaikodi/components/viz/StepProgress.js +64 -0
  34. package/dist/kadaikodi/components/viz/StepProgress.js.map +1 -0
  35. package/dist/kadaikodi/components/viz/Timeline.js +66 -0
  36. package/dist/kadaikodi/components/viz/Timeline.js.map +1 -0
  37. package/dist/kadaikodi/components/viz/index.js +23 -0
  38. package/dist/kadaikodi/components/viz/lib/Avatar.js +30 -0
  39. package/dist/kadaikodi/components/viz/lib/Avatar.js.map +1 -0
  40. package/dist/kadaikodi/components/viz/lib/CartesianFrame.js +119 -0
  41. package/dist/kadaikodi/components/viz/lib/CartesianFrame.js.map +1 -0
  42. package/dist/kadaikodi/components/viz/lib/ResponsiveSvg.js +35 -0
  43. package/dist/kadaikodi/components/viz/lib/ResponsiveSvg.js.map +1 -0
  44. package/dist/kadaikodi/components/viz/lib/format.js +21 -0
  45. package/dist/kadaikodi/components/viz/lib/format.js.map +1 -0
  46. package/dist/kadaikodi/components/viz/lib/geometry.js +61 -0
  47. package/dist/kadaikodi/components/viz/lib/geometry.js.map +1 -0
  48. package/dist/kadaikodi/components/viz/lib/hooks.js +39 -0
  49. package/dist/kadaikodi/components/viz/lib/hooks.js.map +1 -0
  50. package/dist/kadaikodi/components/viz/lib/palette.js +27 -0
  51. package/dist/kadaikodi/components/viz/lib/palette.js.map +1 -0
  52. package/dist/kadaikodi/hooks/useKadaikodiApi.js +84 -6
  53. package/dist/kadaikodi/hooks/useKadaikodiApi.js.map +1 -1
  54. package/dist/kadaikodi/pages/HomePage.js +373 -631
  55. package/dist/kadaikodi/pages/HomePage.js.map +1 -1
  56. package/dist/kadaikodi/pages/admin/AdminAnalyticsPage.js +304 -169
  57. package/dist/kadaikodi/pages/admin/AdminAnalyticsPage.js.map +1 -1
  58. package/dist/kadaikodi/pages/admin/AdminDashboard.js +255 -271
  59. package/dist/kadaikodi/pages/admin/AdminDashboard.js.map +1 -1
  60. package/dist/kadaikodi/pages/admin/AdminFinancialPage.js +185 -125
  61. package/dist/kadaikodi/pages/admin/AdminFinancialPage.js.map +1 -1
  62. package/dist/kadaikodi/pages/admin/AdminOrdersPage.js +141 -102
  63. package/dist/kadaikodi/pages/admin/AdminOrdersPage.js.map +1 -1
  64. package/dist/kadaikodi/pages/admin/AdminProfilePage.js.map +1 -1
  65. package/dist/kadaikodi/pages/admin/AdminSettingsPage.js +332 -276
  66. package/dist/kadaikodi/pages/admin/AdminSettingsPage.js.map +1 -1
  67. package/dist/kadaikodi/pages/admin/CartManagementPage.js +564 -729
  68. package/dist/kadaikodi/pages/admin/CartManagementPage.js.map +1 -1
  69. package/dist/kadaikodi/pages/admin/UserManagementPage.js +310 -366
  70. package/dist/kadaikodi/pages/admin/UserManagementPage.js.map +1 -1
  71. package/dist/kadaikodi/pages/cart-owner/AnalyticsDashboard.js +201 -120
  72. package/dist/kadaikodi/pages/cart-owner/AnalyticsDashboard.js.map +1 -1
  73. package/dist/kadaikodi/pages/cart-owner/BusinessSettingsPage.js +290 -257
  74. package/dist/kadaikodi/pages/cart-owner/BusinessSettingsPage.js.map +1 -1
  75. package/dist/kadaikodi/pages/cart-owner/CartOwnerDashboard.js +173 -194
  76. package/dist/kadaikodi/pages/cart-owner/CartOwnerDashboard.js.map +1 -1
  77. package/dist/kadaikodi/pages/cart-owner/CartOwnerProfilePage.js +270 -228
  78. package/dist/kadaikodi/pages/cart-owner/CartOwnerProfilePage.js.map +1 -1
  79. package/dist/kadaikodi/pages/cart-owner/CartServiceConfigPage.js +194 -173
  80. package/dist/kadaikodi/pages/cart-owner/CartServiceConfigPage.js.map +1 -1
  81. package/dist/kadaikodi/pages/cart-owner/InventoryManagementPage.js +428 -347
  82. package/dist/kadaikodi/pages/cart-owner/InventoryManagementPage.js.map +1 -1
  83. package/dist/kadaikodi/pages/cart-owner/InvestmentListingPage.js +332 -0
  84. package/dist/kadaikodi/pages/cart-owner/InvestmentListingPage.js.map +1 -0
  85. package/dist/kadaikodi/pages/cart-owner/MerchantOnboardingPage.js +373 -0
  86. package/dist/kadaikodi/pages/cart-owner/MerchantOnboardingPage.js.map +1 -0
  87. package/dist/kadaikodi/pages/cart-owner/OrderManagementPage.js +294 -162
  88. package/dist/kadaikodi/pages/cart-owner/OrderManagementPage.js.map +1 -1
  89. package/dist/kadaikodi/pages/cart-owner/StaffManagementPage.js +180 -181
  90. package/dist/kadaikodi/pages/cart-owner/StaffManagementPage.js.map +1 -1
  91. package/dist/kadaikodi/pages/common/HelpSupportPage.js +310 -317
  92. package/dist/kadaikodi/pages/common/HelpSupportPage.js.map +1 -1
  93. package/dist/kadaikodi/pages/common/NotificationCenterPage.js.map +1 -1
  94. package/dist/kadaikodi/pages/common/SettingsPage.js +502 -586
  95. package/dist/kadaikodi/pages/common/SettingsPage.js.map +1 -1
  96. package/dist/kadaikodi/pages/customer/BookingDetailsPage.js +239 -156
  97. package/dist/kadaikodi/pages/customer/BookingDetailsPage.js.map +1 -1
  98. package/dist/kadaikodi/pages/customer/CartDetailPage.js +405 -248
  99. package/dist/kadaikodi/pages/customer/CartDetailPage.js.map +1 -1
  100. package/dist/kadaikodi/pages/customer/CartDiscoveryPage.js +258 -232
  101. package/dist/kadaikodi/pages/customer/CartDiscoveryPage.js.map +1 -1
  102. package/dist/kadaikodi/pages/customer/CheckoutPage.js +254 -205
  103. package/dist/kadaikodi/pages/customer/CheckoutPage.js.map +1 -1
  104. package/dist/kadaikodi/pages/customer/CustomerDashboard.js +5 -5
  105. package/dist/kadaikodi/pages/customer/CustomerDashboard.js.map +1 -1
  106. package/dist/kadaikodi/pages/customer/CustomerProfilePage.js +189 -199
  107. package/dist/kadaikodi/pages/customer/CustomerProfilePage.js.map +1 -1
  108. package/dist/kadaikodi/pages/customer/DirectServiceBookingPage.js +272 -230
  109. package/dist/kadaikodi/pages/customer/DirectServiceBookingPage.js.map +1 -1
  110. package/dist/kadaikodi/pages/customer/FavoritesPage.js +150 -413
  111. package/dist/kadaikodi/pages/customer/FavoritesPage.js.map +1 -1
  112. package/dist/kadaikodi/pages/customer/OrderHistoryPage.js +173 -134
  113. package/dist/kadaikodi/pages/customer/OrderHistoryPage.js.map +1 -1
  114. package/dist/kadaikodi/pages/customer/OrderTrackingPage.js +411 -305
  115. package/dist/kadaikodi/pages/customer/OrderTrackingPage.js.map +1 -1
  116. package/dist/kadaikodi/pages/customer/ReviewsPage.js +310 -406
  117. package/dist/kadaikodi/pages/customer/ReviewsPage.js.map +1 -1
  118. package/dist/kadaikodi/pages/customer/SavedAddressesPage.js.map +1 -1
  119. package/dist/kadaikodi/pages/customer/shared.js +181 -0
  120. package/dist/kadaikodi/pages/customer/shared.js.map +1 -0
  121. package/dist/kadaikodi/pages/investor/InvestmentDetailsPage.js +438 -311
  122. package/dist/kadaikodi/pages/investor/InvestmentDetailsPage.js.map +1 -1
  123. package/dist/kadaikodi/pages/investor/InvestmentOpportunitiesPage.js +320 -293
  124. package/dist/kadaikodi/pages/investor/InvestmentOpportunitiesPage.js.map +1 -1
  125. package/dist/kadaikodi/pages/investor/InvestorAnalyticsPage.js +159 -91
  126. package/dist/kadaikodi/pages/investor/InvestorAnalyticsPage.js.map +1 -1
  127. package/dist/kadaikodi/pages/investor/InvestorDashboard.js +137 -107
  128. package/dist/kadaikodi/pages/investor/InvestorDashboard.js.map +1 -1
  129. package/dist/kadaikodi/pages/investor/InvestorInvestmentsPage.js +157 -135
  130. package/dist/kadaikodi/pages/investor/InvestorInvestmentsPage.js.map +1 -1
  131. package/dist/kadaikodi/pages/investor/InvestorPortfolioPage.js +280 -206
  132. package/dist/kadaikodi/pages/investor/InvestorPortfolioPage.js.map +1 -1
  133. package/dist/kadaikodi/pages/investor/InvestorProfilePage.js +441 -514
  134. package/dist/kadaikodi/pages/investor/InvestorProfilePage.js.map +1 -1
  135. package/dist/kadaikodi/pages/worker/TaskDetailsPage.js +428 -431
  136. package/dist/kadaikodi/pages/worker/TaskDetailsPage.js.map +1 -1
  137. package/dist/kadaikodi/pages/worker/WorkerDashboard.js +328 -445
  138. package/dist/kadaikodi/pages/worker/WorkerDashboard.js.map +1 -1
  139. package/dist/kadaikodi/pages/worker/WorkerOrdersPage.js +141 -164
  140. package/dist/kadaikodi/pages/worker/WorkerOrdersPage.js.map +1 -1
  141. package/dist/kadaikodi/pages/worker/WorkerProfilePage.js +360 -288
  142. package/dist/kadaikodi/pages/worker/WorkerProfilePage.js.map +1 -1
  143. package/dist/kadaikodi/pages/worker/WorkerSchedulePage.js +303 -281
  144. package/dist/kadaikodi/pages/worker/WorkerSchedulePage.js.map +1 -1
  145. package/package.json +1 -1
@@ -2,16 +2,20 @@ import { useKadaikodi as e } from "../../context/KadaikodiContext.js";
2
2
  import { cn as t } from "../../utils/cn.js";
3
3
  import { PageLayout as n } from "../../components/PageLayout.js";
4
4
  import { EmptyState as r } from "../../components/EmptyState.js";
5
- import { useInvestmentOpportunities as i, useOfferings as a, useProviders as o } from "../../hooks/useKadaikodiApi.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 g, Home as _, Leaf as v, MapPin as y, Minus as b, Plus as x, Search as S, ShoppingCart as C, Star as w, TrendingUp as ee, X as T } from "lucide-react";
9
- import { useParams as E } from "react-router-dom";
10
- import { Fragment as te, jsx as D, jsxs as O } from "react/jsx-runtime";
11
- import { GlassCard as k, NextSteps as A, PagePurpose as j } from "@burdenoff/fe-libs/ui";
5
+ import { useInvestmentOpportunities as ee, useOfferings as te, useProviders as i, useReviews as ne } from "../../hooks/useKadaikodiApi.js";
6
+ import { formatCurrency as a, formatDistance as re, formatDuration as o, formatRelativeTime as s } from "../../utils/formatters.js";
7
+ import { RatingStars as c } from "../../components/viz/RatingStars.js";
8
+ import { SegmentedTabs as l } from "../../components/viz/SegmentedTabs.js";
9
+ import "../../components/viz/index.js";
10
+ import { ProviderImage as u, useFavorites as ie } from "./shared.js";
11
+ import { useMemo as d, useState as f } from "react";
12
+ import { ArrowLeft as ae, Calendar as oe, CheckCircle2 as se, Clock as p, Flame as ce, Heart as m, Home as h, Leaf as g, MapPin as _, MessageSquare as v, Minus as y, Plus as b, Search as x, ShoppingCart as S, Star as C, TrendingUp as le, X as w } from "lucide-react";
13
+ import { useParams as ue } from "react-router-dom";
14
+ import { Fragment as T, jsx as E, jsxs as D } from "react/jsx-runtime";
15
+ import { GlassCard as de, NextSteps as fe, PagePurpose as pe } from "@burdenoff/fe-libs/ui";
12
16
  //#region src/kadaikodi/pages/customer/CartDetailPage.tsx
13
- function M() {
14
- let { cartId: M } = E(), { navigateTo: N } = e(), { data: P = [], isLoading: ne } = o(), { data: F = [], isLoading: re } = a(M), { data: I = [], isLoading: ie } = i(), L = u(() => P.find((e) => e.id === M), [P, M]), R = u(() => I.find((e) => e.cartId === M), [I, M]), [z, B] = d(""), [V, H] = d(""), [U, W] = d([]), [G, K] = d(!1), [q, J] = d(null), Y = u(() => F.map((e) => ({
17
+ function O() {
18
+ let { cartId: O } = ue(), { navigateTo: k } = e(), { data: A = [], isLoading: me } = i(), { data: j = [], isLoading: he } = te(O), { data: M = [], isLoading: ge } = ee(), { data: N = [] } = ne(O ?? ""), P = ie(), F = d(() => A.find((e) => e.id === O), [A, O]), I = d(() => M.find((e) => e.cartId === O), [M, O]), [L, R] = f("menu"), [z, _e] = f(""), [B, ve] = f(""), [V, H] = f([]), [ye, U] = f(!1), [W, G] = f(null), K = d(() => j.map((e) => ({
15
19
  id: e.id,
16
20
  name: e.name,
17
21
  price: e.price,
@@ -21,24 +25,24 @@ function M() {
21
25
  isVeg: !0,
22
26
  duration: e.durationMinutes ?? void 0,
23
27
  serviceType: e.serviceType ?? void 0
24
- })), [F]), X = u(() => [...new Set(Y.map((e) => e.category))], [Y]), Z = u(() => {
25
- let e = Y;
26
- if (V && (e = e.filter((e) => e.category === V)), z.trim()) {
28
+ })), [j]), be = d(() => [...new Set(K.map((e) => e.category))], [K]), q = d(() => {
29
+ let e = K;
30
+ if (B && (e = e.filter((e) => e.category === B)), z.trim()) {
27
31
  let t = z.toLowerCase();
28
32
  e = e.filter((e) => e.name.toLowerCase().includes(t) || e.description.toLowerCase().includes(t));
29
33
  }
30
34
  return e;
31
35
  }, [
32
- Y,
33
- V,
36
+ K,
37
+ B,
34
38
  z
35
- ]), ae = u(() => {
39
+ ]), xe = d(() => {
36
40
  let e = {};
37
- return Z.forEach((t) => {
41
+ return q.forEach((t) => {
38
42
  e[t.category] || (e[t.category] = []), e[t.category].push(t);
39
43
  }), 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 ? {
44
+ }, [q]), J = (e, t = 1, n) => {
45
+ H((r) => r.find((t) => t.productId === e.id) ? r.map((n) => n.productId === e.id ? {
42
46
  ...n,
43
47
  quantity: n.quantity + t
44
48
  } : n) : [...r, {
@@ -49,44 +53,44 @@ function M() {
49
53
  quantity: t,
50
54
  specialInstructions: n
51
55
  }]);
52
- }, Q = (e, t) => {
53
- W((n) => n.map((n) => n.productId === e ? {
56
+ }, Y = (e, t) => {
57
+ H((n) => n.map((n) => n.productId === e ? {
54
58
  ...n,
55
59
  quantity: Math.max(0, n.quantity + t)
56
60
  } : 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
+ }, X = (e) => {
62
+ H((t) => t.filter((t) => t.productId !== e));
63
+ }, Se = (e) => V.find((t) => t.productId === e)?.quantity ?? 0, Z = V.reduce((e, t) => e + t.price * t.quantity, 0), Q = V.reduce((e, t) => e + t.quantity, 0), $ = (e) => {
64
+ G({
61
65
  product: e,
62
66
  quantity: 1,
63
67
  specialInstructions: ""
64
- }), K(!0);
68
+ }), U(!0);
65
69
  };
66
- return L ? /* @__PURE__ */ O(n, {
67
- title: /* @__PURE__ */ O("div", {
70
+ return F ? /* @__PURE__ */ D(n, {
71
+ title: /* @__PURE__ */ D("div", {
68
72
  className: "flex items-center gap-3",
69
73
  children: [
70
- /* @__PURE__ */ D("button", {
74
+ /* @__PURE__ */ E("button", {
71
75
  type: "button",
72
- onClick: () => N("/customer/carts"),
76
+ onClick: () => k("/customer/discover"),
73
77
  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" })
78
+ children: /* @__PURE__ */ E(ae, { className: "h-5 w-5" })
75
79
  }),
76
- /* @__PURE__ */ D("span", {
80
+ /* @__PURE__ */ E("span", {
77
81
  className: "truncate",
78
- children: L.name
82
+ children: F.name
79
83
  }),
80
- L.isVerified && /* @__PURE__ */ D(m, { className: "h-5 w-5 text-text-primary shrink-0" })
84
+ F.isVerified && /* @__PURE__ */ E(se, { className: "h-5 w-5 text-text-primary shrink-0" })
81
85
  ]
82
86
  }),
83
- description: L.category,
87
+ description: F.category,
84
88
  children: [
85
- /* @__PURE__ */ D(j, {
89
+ /* @__PURE__ */ E(pe, {
86
90
  className: "mb-4",
87
91
  children: "Everything about this cart in one place — browse its menu, check ratings, location and opening hours, then add items to your order. When you're ready, head to checkout to confirm and pay."
88
92
  }),
89
- /* @__PURE__ */ D(A, {
93
+ /* @__PURE__ */ E(fe, {
90
94
  storageKey: "kadaikodi-cart-detail",
91
95
  className: "mb-4",
92
96
  steps: [
@@ -99,284 +103,416 @@ function M() {
99
103
  id: "reviews",
100
104
  label: "Read what others say",
101
105
  description: "Check ratings and reviews before you order.",
102
- onClick: () => N("/customer/reviews")
106
+ onClick: () => k("/customer/reviews")
103
107
  },
104
108
  {
105
109
  id: "checkout",
106
110
  label: "Proceed to checkout",
107
111
  description: "Review your order, choose payment and confirm.",
108
- onClick: () => N("/customer/checkout")
112
+ onClick: () => k("/customer/checkout")
109
113
  }
110
114
  ]
111
115
  }),
112
- /* @__PURE__ */ O(k, {
116
+ /* @__PURE__ */ D(de, {
113
117
  treatment: "glass",
114
118
  glow: !0,
115
119
  className: "relative h-48 overflow-hidden p-0",
116
- children: [/* @__PURE__ */ D("img", {
117
- src: L.image,
118
- alt: L.name,
119
- className: "h-full w-full object-cover"
120
- }), /* @__PURE__ */ D("div", {
121
- className: "absolute bottom-0 inset-x-0 bg-gradient-to-t from-black/60 to-transparent p-4",
122
- children: /* @__PURE__ */ O("div", {
123
- className: "flex items-center gap-3",
124
- children: [/* @__PURE__ */ D("span", {
125
- className: t("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium", L.isOpen ? "bg-status-success-bg-subtle text-status-success-text" : "bg-status-error-bg-subtle text-status-error-text"),
126
- children: L.isOpen ? "Open Now" : "Closed"
127
- }), /* @__PURE__ */ O("div", {
128
- className: "flex items-center gap-1 text-white text-sm",
129
- children: [
130
- /* @__PURE__ */ D(w, { className: "h-3.5 w-3.5 fill-status-warning-text text-status-warning-text" }),
131
- /* @__PURE__ */ D("span", {
132
- className: "font-medium",
133
- children: L.rating
134
- }),
135
- /* @__PURE__ */ O("span", {
136
- className: "text-white/70",
137
- children: [
138
- "(",
139
- L.totalRatings,
140
- ")"
141
- ]
142
- })
143
- ]
144
- })]
120
+ children: [
121
+ /* @__PURE__ */ E(u, {
122
+ src: F.image,
123
+ alt: F.name,
124
+ seed: F.name
125
+ }),
126
+ /* @__PURE__ */ E("button", {
127
+ type: "button",
128
+ onClick: () => P.toggle(F.id),
129
+ "aria-pressed": P.has(F.id),
130
+ "aria-label": P.has(F.id) ? "Remove from favorites" : "Save to favorites",
131
+ className: "absolute top-3 right-3 flex h-9 w-9 items-center justify-center rounded-full bg-bg-surface/80 backdrop-blur-sm text-text-secondary hover:text-status-error-text transition-colors",
132
+ children: /* @__PURE__ */ E(m, { className: t("h-4.5 w-4.5", P.has(F.id) && "fill-status-error-text text-status-error-text") })
133
+ }),
134
+ /* @__PURE__ */ E("div", {
135
+ className: "absolute bottom-0 inset-x-0 bg-gradient-to-t from-black/60 to-transparent p-4",
136
+ children: /* @__PURE__ */ D("div", {
137
+ className: "flex items-center gap-3",
138
+ children: [/* @__PURE__ */ E("span", {
139
+ 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 text-status-success-text" : "bg-status-error-bg-subtle text-status-error-text"),
140
+ children: F.isOpen ? "Open Now" : "Closed"
141
+ }), /* @__PURE__ */ D("div", {
142
+ className: "flex items-center gap-1.5 text-white text-sm",
143
+ children: [
144
+ /* @__PURE__ */ E(c, {
145
+ value: F.rating,
146
+ size: 14
147
+ }),
148
+ /* @__PURE__ */ E("span", {
149
+ className: "font-medium",
150
+ children: F.rating
151
+ }),
152
+ /* @__PURE__ */ D("span", {
153
+ className: "text-white/70",
154
+ children: [
155
+ "(",
156
+ F.totalRatings,
157
+ " reviews)"
158
+ ]
159
+ })
160
+ ]
161
+ })]
162
+ })
145
163
  })
146
- })]
164
+ ]
147
165
  }),
148
- !L.isOpen && /* @__PURE__ */ D("div", {
166
+ !F.isOpen && /* @__PURE__ */ E("div", {
149
167
  className: "mt-4 rounded-lg border border-status-warning-text/30 bg-status-warning-bg-subtle p-3",
150
- children: /* @__PURE__ */ O("p", {
168
+ children: /* @__PURE__ */ D("p", {
151
169
  className: "text-sm text-status-warning-text",
152
- children: [/* @__PURE__ */ D("strong", { children: "This cart is currently closed." }), " You can browse the offerings but orders are not being accepted."]
170
+ children: [/* @__PURE__ */ E("strong", { children: "This cart is currently closed." }), " You can browse the offerings but orders are not being accepted."]
171
+ })
172
+ }),
173
+ /* @__PURE__ */ E("div", {
174
+ className: "mt-5",
175
+ children: /* @__PURE__ */ E(l, {
176
+ "aria-label": "Cart sections",
177
+ variant: "underline",
178
+ tabs: [
179
+ {
180
+ id: "menu",
181
+ label: "Menu"
182
+ },
183
+ {
184
+ id: "reviews",
185
+ label: "Reviews",
186
+ count: N.length || void 0
187
+ },
188
+ {
189
+ id: "info",
190
+ label: "Info"
191
+ }
192
+ ],
193
+ value: L,
194
+ onChange: (e) => R(e)
153
195
  })
154
196
  }),
155
- /* @__PURE__ */ O("div", {
197
+ L === "info" && /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ D("div", {
156
198
  className: "mt-4 grid grid-cols-1 gap-3 sm:grid-cols-3",
157
199
  children: [
158
- /* @__PURE__ */ O("div", {
200
+ /* @__PURE__ */ D("div", {
159
201
  className: "rounded-lg border border-border-subtle bg-bg-surface p-3",
160
202
  children: [
161
- /* @__PURE__ */ O("div", {
203
+ /* @__PURE__ */ D("div", {
162
204
  className: "flex items-center gap-2 text-text-secondary text-xs mb-1",
163
- children: [/* @__PURE__ */ D(y, { className: "h-3.5 w-3.5" }), /* @__PURE__ */ D("span", {
205
+ children: [/* @__PURE__ */ E(_, { className: "h-3.5 w-3.5" }), /* @__PURE__ */ E("span", {
164
206
  className: "font-medium uppercase tracking-wider",
165
207
  children: "Location"
166
208
  })]
167
209
  }),
168
- /* @__PURE__ */ D("p", {
210
+ /* @__PURE__ */ E("p", {
169
211
  className: "text-sm text-text-primary",
170
- children: L.location.address
212
+ children: F.location.address
171
213
  }),
172
- L.distance != null && /* @__PURE__ */ O("p", {
214
+ F.distance != null && /* @__PURE__ */ D("p", {
173
215
  className: "text-xs text-text-secondary",
174
- children: [c(L.distance), " away"]
216
+ children: [re(F.distance), " away"]
175
217
  })
176
218
  ]
177
219
  }),
178
- /* @__PURE__ */ O("div", {
220
+ /* @__PURE__ */ D("div", {
179
221
  className: "rounded-lg border border-border-subtle bg-bg-surface p-3",
180
222
  children: [
181
- /* @__PURE__ */ O("div", {
223
+ /* @__PURE__ */ D("div", {
182
224
  className: "flex items-center gap-2 text-text-secondary text-xs mb-1",
183
- children: [/* @__PURE__ */ D(h, { className: "h-3.5 w-3.5" }), /* @__PURE__ */ D("span", {
225
+ children: [/* @__PURE__ */ E(p, { className: "h-3.5 w-3.5" }), /* @__PURE__ */ E("span", {
184
226
  className: "font-medium uppercase tracking-wider",
185
227
  children: "Estimated Time"
186
228
  })]
187
229
  }),
188
- /* @__PURE__ */ D("p", {
230
+ /* @__PURE__ */ E("p", {
189
231
  className: "text-sm text-text-primary",
190
- children: L.estimatedTime == null ? "—" : l(L.estimatedTime)
232
+ children: F.estimatedTime == null ? "—" : o(F.estimatedTime)
191
233
  }),
192
- L.averageOrderValue && /* @__PURE__ */ O("p", {
234
+ F.averageOrderValue && /* @__PURE__ */ D("p", {
193
235
  className: "text-xs text-text-secondary",
194
- children: ["Avg ", s(L.averageOrderValue, { minimumFractionDigits: 0 })]
236
+ children: ["Avg ", a(F.averageOrderValue, { minimumFractionDigits: 0 })]
195
237
  })
196
238
  ]
197
239
  }),
198
- /* @__PURE__ */ O("div", {
240
+ /* @__PURE__ */ D("div", {
199
241
  className: "rounded-lg border border-border-subtle bg-bg-surface p-3",
200
242
  children: [
201
- /* @__PURE__ */ O("div", {
243
+ /* @__PURE__ */ D("div", {
202
244
  className: "flex items-center gap-2 text-text-secondary text-xs mb-1",
203
- children: [/* @__PURE__ */ D(w, { className: "h-3.5 w-3.5" }), /* @__PURE__ */ D("span", {
245
+ children: [/* @__PURE__ */ E(C, { className: "h-3.5 w-3.5" }), /* @__PURE__ */ E("span", {
204
246
  className: "font-medium uppercase tracking-wider",
205
247
  children: "Rating"
206
248
  })]
207
249
  }),
208
- /* @__PURE__ */ O("p", {
250
+ /* @__PURE__ */ D("p", {
209
251
  className: "text-sm text-text-primary",
210
- children: [L.rating, " / 5.0"]
252
+ children: [F.rating, " / 5.0"]
211
253
  }),
212
- /* @__PURE__ */ O("p", {
254
+ /* @__PURE__ */ D("p", {
213
255
  className: "text-xs text-text-secondary",
214
- children: [L.totalRatings, " reviews"]
256
+ children: [F.totalRatings, " reviews"]
215
257
  })
216
258
  ]
217
259
  })
218
260
  ]
219
- }),
220
- L.businessHours && Object.keys(L.businessHours).length > 0 && /* @__PURE__ */ O("section", {
261
+ }), F.businessHours && Object.keys(F.businessHours).length > 0 && /* @__PURE__ */ D("section", {
221
262
  className: "mt-6",
222
- children: [/* @__PURE__ */ D("h2", {
263
+ children: [/* @__PURE__ */ E("h2", {
223
264
  className: "text-base font-semibold text-text-primary mb-2",
224
265
  children: "Operating Hours"
225
- }), /* @__PURE__ */ D("div", {
266
+ }), /* @__PURE__ */ E("div", {
226
267
  className: "rounded-lg border border-border-subtle bg-bg-surface overflow-hidden",
227
- children: Object.entries(L.businessHours).map(([e, t]) => /* @__PURE__ */ O("div", {
268
+ children: Object.entries(F.businessHours).map(([e, t]) => /* @__PURE__ */ D("div", {
228
269
  className: "flex items-center justify-between px-4 py-2 border-b border-border-subtle last:border-b-0",
229
- children: [/* @__PURE__ */ D("span", {
270
+ children: [/* @__PURE__ */ E("span", {
230
271
  className: "text-sm font-medium text-text-primary capitalize",
231
272
  children: e
232
- }), t.isOpen ? /* @__PURE__ */ O("span", {
273
+ }), t.isOpen ? /* @__PURE__ */ D("span", {
233
274
  className: "text-sm text-text-secondary",
234
275
  children: [
235
276
  t.open,
236
277
  " - ",
237
278
  t.close
238
279
  ]
239
- }) : /* @__PURE__ */ D("span", {
280
+ }) : /* @__PURE__ */ E("span", {
240
281
  className: "text-sm text-status-error-text",
241
282
  children: "Closed"
242
283
  })]
243
284
  }, e))
244
285
  })]
286
+ })] }),
287
+ L === "reviews" && /* @__PURE__ */ D("div", {
288
+ className: "mt-4 space-y-4",
289
+ children: [/* @__PURE__ */ D("div", {
290
+ className: "flex flex-wrap items-center gap-4 rounded-xl border border-border-subtle bg-bg-surface p-5",
291
+ children: [/* @__PURE__ */ D("div", {
292
+ className: "text-center",
293
+ children: [
294
+ /* @__PURE__ */ E("p", {
295
+ className: "text-4xl font-bold leading-none text-text-primary",
296
+ children: F.rating.toFixed(1)
297
+ }),
298
+ /* @__PURE__ */ E("div", {
299
+ className: "mt-1.5 flex justify-center",
300
+ children: /* @__PURE__ */ E(c, {
301
+ value: F.rating,
302
+ size: 16
303
+ })
304
+ }),
305
+ /* @__PURE__ */ D("p", {
306
+ className: "mt-1 text-xs text-text-secondary",
307
+ children: [F.totalRatings, " ratings"]
308
+ })
309
+ ]
310
+ }), /* @__PURE__ */ E("div", {
311
+ className: "flex-1 min-w-[180px] space-y-1.5",
312
+ children: [
313
+ 5,
314
+ 4,
315
+ 3,
316
+ 2,
317
+ 1
318
+ ].map((e) => {
319
+ let t = N.filter((t) => Math.round(t.rating) === e).length, n = N.length ? t / N.length * 100 : 0;
320
+ return /* @__PURE__ */ D("div", {
321
+ className: "flex items-center gap-2 text-xs",
322
+ children: [
323
+ /* @__PURE__ */ D("span", {
324
+ className: "flex w-6 items-center gap-0.5 text-text-secondary",
325
+ children: [e, /* @__PURE__ */ E(C, { className: "h-3 w-3 fill-status-warning-text text-status-warning-text" })]
326
+ }),
327
+ /* @__PURE__ */ E("div", {
328
+ className: "h-2 flex-1 overflow-hidden rounded-full bg-bg-sunken",
329
+ children: /* @__PURE__ */ E("div", {
330
+ className: "h-full rounded-full bg-accent-primary transition-all",
331
+ style: { width: `${n}%` }
332
+ })
333
+ }),
334
+ /* @__PURE__ */ E("span", {
335
+ className: "w-6 text-right tabular-nums text-text-muted",
336
+ children: t
337
+ })
338
+ ]
339
+ }, e);
340
+ })
341
+ })]
342
+ }), N.length === 0 ? /* @__PURE__ */ D("div", {
343
+ className: "rounded-xl border border-border-subtle bg-bg-surface p-8 text-center",
344
+ children: [/* @__PURE__ */ E(v, { className: "mx-auto h-10 w-10 text-text-secondary/40" }), /* @__PURE__ */ E("p", {
345
+ className: "mt-3 text-sm text-text-secondary",
346
+ children: "No written reviews yet. Order and be the first to review this cart."
347
+ })]
348
+ }) : /* @__PURE__ */ E("div", {
349
+ className: "space-y-3",
350
+ children: N.map((e) => /* @__PURE__ */ D("div", {
351
+ className: "rounded-xl border border-border-subtle bg-bg-surface p-4",
352
+ children: [
353
+ /* @__PURE__ */ D("div", {
354
+ className: "flex items-center justify-between gap-2",
355
+ children: [/* @__PURE__ */ E(c, {
356
+ value: e.rating,
357
+ size: 14,
358
+ showValue: !0
359
+ }), /* @__PURE__ */ E("span", {
360
+ className: "text-xs text-text-muted",
361
+ children: s(e.createdAt)
362
+ })]
363
+ }),
364
+ e.review && /* @__PURE__ */ E("p", {
365
+ className: "mt-2 text-sm text-text-primary leading-relaxed",
366
+ children: e.review
367
+ }),
368
+ e.response && /* @__PURE__ */ D("div", {
369
+ className: "mt-3 rounded-lg border-l-2 border-accent-primary bg-[var(--color-accent-soft)] p-3",
370
+ children: [/* @__PURE__ */ E("p", {
371
+ className: "mb-1 text-xs font-medium text-text-primary",
372
+ children: "Owner response"
373
+ }), /* @__PURE__ */ E("p", {
374
+ className: "text-xs text-text-primary leading-relaxed",
375
+ children: e.response
376
+ })]
377
+ })
378
+ ]
379
+ }, e.id))
380
+ })]
245
381
  }),
246
- /* @__PURE__ */ O("div", {
382
+ L === "menu" && /* @__PURE__ */ D("div", {
247
383
  className: "mt-6 grid grid-cols-1 gap-6 lg:grid-cols-3",
248
- children: [/* @__PURE__ */ O("div", {
384
+ children: [/* @__PURE__ */ D("div", {
249
385
  className: "lg:col-span-2",
250
386
  children: [
251
- /* @__PURE__ */ O("div", {
387
+ /* @__PURE__ */ D("div", {
252
388
  className: "flex flex-col gap-3 sm:flex-row mb-4",
253
- children: [/* @__PURE__ */ O("div", {
389
+ children: [/* @__PURE__ */ D("div", {
254
390
  className: "relative flex-1",
255
- children: [/* @__PURE__ */ D(S, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-secondary" }), /* @__PURE__ */ D("input", {
391
+ children: [/* @__PURE__ */ E(x, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-secondary" }), /* @__PURE__ */ E("input", {
256
392
  type: "text",
257
393
  placeholder: "Search offerings...",
258
394
  value: z,
259
- onChange: (e) => B(e.target.value),
395
+ onChange: (e) => _e(e.target.value),
260
396
  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)]"
261
397
  })]
262
- }), /* @__PURE__ */ O("select", {
263
- value: V,
264
- onChange: (e) => H(e.target.value),
398
+ }), /* @__PURE__ */ D("select", {
399
+ value: B,
400
+ onChange: (e) => ve(e.target.value),
265
401
  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)]",
266
- children: [/* @__PURE__ */ D("option", {
402
+ children: [/* @__PURE__ */ E("option", {
267
403
  value: "",
268
404
  children: "All Categories"
269
- }), X.map((e) => /* @__PURE__ */ D("option", {
405
+ }), be.map((e) => /* @__PURE__ */ E("option", {
270
406
  value: e,
271
407
  children: e
272
408
  }, e))]
273
409
  })]
274
410
  }),
275
- /* @__PURE__ */ O("h2", {
411
+ /* @__PURE__ */ D("h2", {
276
412
  className: "text-lg font-semibold text-text-primary mb-3",
277
413
  children: [
278
414
  "Menu & Services (",
279
- Z.length,
415
+ q.length,
280
416
  ")"
281
417
  ]
282
418
  }),
283
- Z.length === 0 ? /* @__PURE__ */ O("div", {
419
+ q.length === 0 ? /* @__PURE__ */ D("div", {
284
420
  className: "rounded-lg border border-border-subtle bg-bg-surface p-8 text-center",
285
- children: [/* @__PURE__ */ D(S, { className: "mx-auto h-10 w-10 text-text-secondary/50" }), /* @__PURE__ */ D("p", {
421
+ children: [/* @__PURE__ */ E(x, { className: "mx-auto h-10 w-10 text-text-secondary/50" }), /* @__PURE__ */ E("p", {
286
422
  className: "mt-3 text-sm text-text-secondary",
287
423
  children: "No offerings found"
288
424
  })]
289
- }) : /* @__PURE__ */ D("div", {
425
+ }) : /* @__PURE__ */ E("div", {
290
426
  className: "space-y-6",
291
- children: Object.entries(ae).map(([e, n]) => /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("h3", {
427
+ children: Object.entries(xe).map(([e, n]) => /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("h3", {
292
428
  className: "text-sm font-semibold text-text-primary mb-2 px-1",
293
429
  children: e
294
- }), /* @__PURE__ */ D("div", {
430
+ }), /* @__PURE__ */ E("div", {
295
431
  className: "space-y-2",
296
432
  children: n.map((e) => {
297
- let n = se(e.id);
298
- return /* @__PURE__ */ O("div", {
433
+ let n = Se(e.id);
434
+ return /* @__PURE__ */ D("div", {
299
435
  className: "flex gap-4 rounded-lg border border-border-subtle bg-bg-surface p-4",
300
- children: [/* @__PURE__ */ D("div", {
436
+ children: [/* @__PURE__ */ E("div", {
301
437
  className: "h-20 w-20 shrink-0 rounded-md bg-bg-sunken overflow-hidden",
302
- children: /* @__PURE__ */ D("img", {
438
+ children: /* @__PURE__ */ E(u, {
303
439
  src: e.image,
304
440
  alt: e.name,
305
- className: "h-full w-full object-cover"
441
+ seed: e.name
306
442
  })
307
- }), /* @__PURE__ */ O("div", {
443
+ }), /* @__PURE__ */ D("div", {
308
444
  className: "flex-1 min-w-0",
309
445
  children: [
310
- /* @__PURE__ */ O("div", {
446
+ /* @__PURE__ */ D("div", {
311
447
  className: "flex items-start justify-between gap-2",
312
- children: [/* @__PURE__ */ O("div", { children: [/* @__PURE__ */ O("div", {
448
+ children: [/* @__PURE__ */ D("div", { children: [/* @__PURE__ */ D("div", {
313
449
  className: "flex items-center gap-2",
314
- children: [/* @__PURE__ */ D("h4", {
450
+ children: [/* @__PURE__ */ E("h4", {
315
451
  className: "text-sm font-semibold text-text-primary",
316
452
  children: e.name
317
- }), e.isVeg && /* @__PURE__ */ D(v, { className: "h-3.5 w-3.5 text-status-success-text" })]
318
- }), /* @__PURE__ */ D("p", {
453
+ }), e.isVeg && /* @__PURE__ */ E(g, { className: "h-3.5 w-3.5 text-status-success-text" })]
454
+ }), /* @__PURE__ */ E("p", {
319
455
  className: "text-xs text-text-secondary mt-0.5",
320
456
  children: e.category
321
- })] }), /* @__PURE__ */ D("span", {
457
+ })] }), /* @__PURE__ */ E("span", {
322
458
  className: "text-sm font-bold text-text-primary whitespace-nowrap",
323
- children: s(e.price, { minimumFractionDigits: 0 })
459
+ children: a(e.price, { minimumFractionDigits: 0 })
324
460
  })]
325
461
  }),
326
- /* @__PURE__ */ D("p", {
462
+ /* @__PURE__ */ E("p", {
327
463
  className: "mt-1 text-xs text-text-secondary line-clamp-2",
328
464
  children: e.description
329
465
  }),
330
- /* @__PURE__ */ O("div", {
466
+ /* @__PURE__ */ D("div", {
331
467
  className: "mt-2 flex flex-wrap items-center gap-2 text-[10px] text-text-secondary",
332
468
  children: [
333
- e.duration != null && e.duration > 0 && /* @__PURE__ */ O("span", {
469
+ e.duration != null && e.duration > 0 && /* @__PURE__ */ D("span", {
334
470
  className: "flex items-center gap-0.5",
335
- children: [/* @__PURE__ */ D(h, { className: "h-3 w-3" }), l(e.duration)]
471
+ children: [/* @__PURE__ */ E(p, { className: "h-3 w-3" }), o(e.duration)]
336
472
  }),
337
- e.serviceType && /* @__PURE__ */ D("span", {
473
+ e.serviceType && /* @__PURE__ */ E("span", {
338
474
  className: "rounded bg-bg-sunken px-1.5 py-0.5 capitalize",
339
475
  children: e.serviceType
340
476
  }),
341
- e.spiceLevel && /* @__PURE__ */ O("span", {
477
+ e.spiceLevel && /* @__PURE__ */ D("span", {
342
478
  className: "flex items-center gap-0.5 rounded bg-bg-sunken px-1.5 py-0.5 capitalize",
343
- children: [/* @__PURE__ */ D(g, { className: "h-3 w-3" }), e.spiceLevel]
479
+ children: [/* @__PURE__ */ E(ce, { className: "h-3 w-3" }), e.spiceLevel]
344
480
  })
345
481
  ]
346
482
  }),
347
- /* @__PURE__ */ D("div", {
483
+ /* @__PURE__ */ E("div", {
348
484
  className: "mt-2 flex justify-end",
349
- children: n > 0 ? /* @__PURE__ */ O("div", {
485
+ children: n > 0 ? /* @__PURE__ */ D("div", {
350
486
  className: "flex items-center gap-2",
351
487
  children: [
352
- /* @__PURE__ */ D("button", {
488
+ /* @__PURE__ */ E("button", {
353
489
  type: "button",
354
- onClick: () => Q(e.id, -1),
490
+ onClick: () => Y(e.id, -1),
355
491
  className: "flex h-7 w-7 items-center justify-center rounded-full bg-bg-sunken text-text-primary hover:bg-accent",
356
- children: /* @__PURE__ */ D(b, { className: "h-3.5 w-3.5" })
492
+ children: /* @__PURE__ */ E(y, { className: "h-3.5 w-3.5" })
357
493
  }),
358
- /* @__PURE__ */ D("span", {
494
+ /* @__PURE__ */ E("span", {
359
495
  className: "min-w-[2ch] text-center text-sm font-medium text-text-primary",
360
496
  children: n
361
497
  }),
362
- /* @__PURE__ */ D("button", {
498
+ /* @__PURE__ */ E("button", {
363
499
  type: "button",
364
- onClick: () => Q(e.id, 1),
500
+ onClick: () => Y(e.id, 1),
365
501
  className: "flex h-7 w-7 items-center justify-center rounded-full bg-foreground text-background hover:opacity-90",
366
- children: /* @__PURE__ */ D(x, { className: "h-3.5 w-3.5" })
502
+ children: /* @__PURE__ */ E(b, { className: "h-3.5 w-3.5" })
367
503
  }),
368
- /* @__PURE__ */ D("button", {
504
+ /* @__PURE__ */ E("button", {
369
505
  type: "button",
370
- onClick: () => $(e.id),
506
+ onClick: () => X(e.id),
371
507
  className: "ml-1 flex h-7 w-7 items-center justify-center rounded-full text-status-error-text hover:bg-status-error-bg/10",
372
- children: /* @__PURE__ */ D(T, { className: "h-3.5 w-3.5" })
508
+ children: /* @__PURE__ */ E(w, { className: "h-3.5 w-3.5" })
373
509
  })
374
510
  ]
375
- }) : /* @__PURE__ */ D("button", {
511
+ }) : /* @__PURE__ */ E("button", {
376
512
  type: "button",
377
- disabled: !L.isOpen,
378
- onClick: () => ue(e),
379
- 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"),
513
+ disabled: !F.isOpen,
514
+ onClick: () => $(e),
515
+ 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"),
380
516
  children: "Add"
381
517
  })
382
518
  })
@@ -387,145 +523,145 @@ function M() {
387
523
  })] }, e))
388
524
  })
389
525
  ]
390
- }), /* @__PURE__ */ O("div", {
526
+ }), /* @__PURE__ */ D("div", {
391
527
  className: "space-y-4",
392
528
  children: [
393
- /* @__PURE__ */ O("div", {
529
+ /* @__PURE__ */ D("div", {
394
530
  className: "rounded-lg border border-border-subtle bg-bg-surface p-4 lg:sticky lg:top-6",
395
- children: [/* @__PURE__ */ O("h3", {
531
+ children: [/* @__PURE__ */ D("h3", {
396
532
  className: "text-base font-semibold text-text-primary mb-3 flex items-center gap-2",
397
- children: [/* @__PURE__ */ D(C, { className: "h-4 w-4" }), "Your Order"]
398
- }), U.length === 0 ? /* @__PURE__ */ O("div", {
533
+ children: [/* @__PURE__ */ E(S, { className: "h-4 w-4" }), "Your Order"]
534
+ }), V.length === 0 ? /* @__PURE__ */ D("div", {
399
535
  className: "py-6 text-center",
400
- children: [/* @__PURE__ */ D(C, { className: "mx-auto h-8 w-8 text-text-secondary/40" }), /* @__PURE__ */ D("p", {
536
+ children: [/* @__PURE__ */ E(S, { className: "mx-auto h-8 w-8 text-text-secondary/40" }), /* @__PURE__ */ E("p", {
401
537
  className: "mt-2 text-sm text-text-secondary",
402
538
  children: "Your cart is empty"
403
539
  })]
404
- }) : /* @__PURE__ */ O(te, { children: [/* @__PURE__ */ D("div", {
540
+ }) : /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ E("div", {
405
541
  className: "space-y-2 max-h-64 overflow-y-auto mb-3",
406
- children: U.map((e) => /* @__PURE__ */ O("div", {
542
+ children: V.map((e) => /* @__PURE__ */ D("div", {
407
543
  className: "flex items-center justify-between gap-2",
408
- children: [/* @__PURE__ */ O("div", {
544
+ children: [/* @__PURE__ */ D("div", {
409
545
  className: "flex-1 min-w-0",
410
- children: [/* @__PURE__ */ D("p", {
546
+ children: [/* @__PURE__ */ E("p", {
411
547
  className: "text-sm font-medium text-text-primary truncate",
412
548
  children: e.name
413
- }), /* @__PURE__ */ O("p", {
549
+ }), /* @__PURE__ */ D("p", {
414
550
  className: "text-xs text-text-secondary",
415
551
  children: [
416
- s(e.price, { minimumFractionDigits: 0 }),
552
+ a(e.price, { minimumFractionDigits: 0 }),
417
553
  " x",
418
554
  " ",
419
555
  e.quantity
420
556
  ]
421
557
  })]
422
- }), /* @__PURE__ */ O("div", {
558
+ }), /* @__PURE__ */ D("div", {
423
559
  className: "flex items-center gap-1",
424
560
  children: [
425
- /* @__PURE__ */ D("button", {
561
+ /* @__PURE__ */ E("button", {
426
562
  type: "button",
427
- onClick: () => Q(e.productId, -1),
563
+ onClick: () => Y(e.productId, -1),
428
564
  className: "flex h-6 w-6 items-center justify-center rounded bg-bg-sunken text-text-primary text-xs",
429
565
  children: "-"
430
566
  }),
431
- /* @__PURE__ */ D("span", {
567
+ /* @__PURE__ */ E("span", {
432
568
  className: "min-w-[2ch] text-center text-xs font-medium",
433
569
  children: e.quantity
434
570
  }),
435
- /* @__PURE__ */ D("button", {
571
+ /* @__PURE__ */ E("button", {
436
572
  type: "button",
437
- onClick: () => Q(e.productId, 1),
573
+ onClick: () => Y(e.productId, 1),
438
574
  className: "flex h-6 w-6 items-center justify-center rounded bg-bg-sunken text-text-primary text-xs",
439
575
  children: "+"
440
576
  }),
441
- /* @__PURE__ */ D("button", {
577
+ /* @__PURE__ */ E("button", {
442
578
  type: "button",
443
- onClick: () => $(e.productId),
579
+ onClick: () => X(e.productId),
444
580
  className: "ml-1 text-status-error-text hover:text-status-error-text/80",
445
- children: /* @__PURE__ */ D(T, { className: "h-3.5 w-3.5" })
581
+ children: /* @__PURE__ */ E(w, { className: "h-3.5 w-3.5" })
446
582
  })
447
583
  ]
448
584
  })]
449
585
  }, e.id))
450
- }), /* @__PURE__ */ O("div", {
586
+ }), /* @__PURE__ */ D("div", {
451
587
  className: "border-t border-border-subtle pt-3",
452
- children: [/* @__PURE__ */ O("div", {
588
+ children: [/* @__PURE__ */ D("div", {
453
589
  className: "flex justify-between items-center mb-3",
454
- children: [/* @__PURE__ */ O("span", {
590
+ children: [/* @__PURE__ */ D("span", {
455
591
  className: "text-sm font-semibold text-text-primary",
456
- children: ["Total: ", s(ce, { minimumFractionDigits: 0 })]
457
- }), /* @__PURE__ */ O("span", {
592
+ children: ["Total: ", a(Z, { minimumFractionDigits: 0 })]
593
+ }), /* @__PURE__ */ D("span", {
458
594
  className: "text-xs text-text-secondary",
459
- children: [le, " items"]
595
+ children: [Q, " items"]
460
596
  })]
461
- }), /* @__PURE__ */ D("button", {
597
+ }), /* @__PURE__ */ E("button", {
462
598
  type: "button",
463
- onClick: () => N("/customer/checkout"),
599
+ onClick: () => k("/customer/checkout"),
464
600
  className: "w-full rounded-lg bg-foreground py-2.5 text-sm font-medium text-background hover:opacity-90 transition-opacity",
465
601
  children: "Proceed to Checkout"
466
602
  })]
467
603
  })] })]
468
604
  }),
469
- L.serviceTypes?.includes("direct_service") && /* @__PURE__ */ O("div", {
605
+ F.serviceTypes?.includes("direct_service") && /* @__PURE__ */ D("div", {
470
606
  className: "rounded-lg border border-accent-purple/30 bg-accent-purple-subtle p-4",
471
607
  children: [
472
- /* @__PURE__ */ O("h3", {
608
+ /* @__PURE__ */ D("h3", {
473
609
  className: "text-sm font-semibold text-text-primary flex items-center gap-2 mb-2",
474
- children: [/* @__PURE__ */ D(_, { className: "h-4 w-4 text-text-primary" }), "Direct Service"]
610
+ children: [/* @__PURE__ */ E(h, { className: "h-4 w-4 text-text-primary" }), "Direct Service"]
475
611
  }),
476
- /* @__PURE__ */ D("p", {
612
+ /* @__PURE__ */ E("p", {
477
613
  className: "text-xs text-text-secondary mb-3",
478
614
  children: "Cart comes to your location!"
479
615
  }),
480
- /* @__PURE__ */ D("button", {
616
+ /* @__PURE__ */ E("button", {
481
617
  type: "button",
482
- onClick: () => N(`/customer/carts/${L.id}`),
618
+ onClick: () => k(`/customer/cart/${F.id}/direct-service`),
483
619
  className: "w-full rounded-lg bg-accent-purple py-2 text-xs font-medium text-white hover:bg-accent-purple transition-colors",
484
620
  children: "Book Direct Service"
485
621
  })
486
622
  ]
487
623
  }),
488
- L.serviceTypes?.includes("appointment") && /* @__PURE__ */ O("div", {
624
+ F.serviceTypes?.includes("appointment") && /* @__PURE__ */ D("div", {
489
625
  className: "rounded-lg border border-border-focus/30 bg-[var(--color-accent-soft)] p-4",
490
- children: [/* @__PURE__ */ O("h3", {
626
+ children: [/* @__PURE__ */ D("h3", {
491
627
  className: "text-sm font-semibold text-text-primary flex items-center gap-2 mb-2",
492
- children: [/* @__PURE__ */ D(p, { className: "h-4 w-4 text-text-primary" }), "Appointments Available"]
493
- }), /* @__PURE__ */ D("p", {
628
+ children: [/* @__PURE__ */ E(oe, { className: "h-4 w-4 text-text-primary" }), "Appointments Available"]
629
+ }), /* @__PURE__ */ E("p", {
494
630
  className: "text-xs text-text-secondary",
495
631
  children: "This service provider accepts appointments. Contact them to schedule."
496
632
  })]
497
633
  }),
498
- R && /* @__PURE__ */ O("div", {
634
+ I && /* @__PURE__ */ D("div", {
499
635
  className: "rounded-lg border border-status-success-text/30 bg-status-success-bg-subtle p-4",
500
636
  children: [
501
- /* @__PURE__ */ O("h3", {
637
+ /* @__PURE__ */ D("h3", {
502
638
  className: "text-sm font-semibold text-text-primary flex items-center gap-2 mb-2",
503
- children: [/* @__PURE__ */ D(ee, { className: "h-4 w-4 text-status-success-text" }), "Investment Opportunity"]
639
+ children: [/* @__PURE__ */ E(le, { className: "h-4 w-4 text-status-success-text" }), "Investment Opportunity"]
504
640
  }),
505
- /* @__PURE__ */ D("p", {
641
+ /* @__PURE__ */ E("p", {
506
642
  className: "text-xs text-text-secondary mb-2",
507
- children: R.description
643
+ children: I.description
508
644
  }),
509
- /* @__PURE__ */ O("div", {
645
+ /* @__PURE__ */ D("div", {
510
646
  className: "space-y-1 text-xs text-text-secondary mb-3",
511
647
  children: [
512
- /* @__PURE__ */ O("p", { children: ["Target: ", s(R.targetAmount, { minimumFractionDigits: 0 })] }),
513
- /* @__PURE__ */ O("p", { children: ["Raised: ", s(R.raisedAmount, { minimumFractionDigits: 0 })] }),
514
- /* @__PURE__ */ O("p", { children: [
648
+ /* @__PURE__ */ D("p", { children: ["Target: ", a(I.targetAmount, { minimumFractionDigits: 0 })] }),
649
+ /* @__PURE__ */ D("p", { children: ["Raised: ", a(I.raisedAmount, { minimumFractionDigits: 0 })] }),
650
+ /* @__PURE__ */ D("p", { children: [
515
651
  "Expected Returns: ",
516
- R.expectedReturns,
652
+ I.expectedReturns,
517
653
  "%"
518
654
  ] }),
519
- /* @__PURE__ */ O("p", { children: [
655
+ /* @__PURE__ */ D("p", { children: [
520
656
  "Min Investment:",
521
657
  " ",
522
- s(R.minimumInvestment, { minimumFractionDigits: 0 })
658
+ a(I.minimumInvestment, { minimumFractionDigits: 0 })
523
659
  ] })
524
660
  ]
525
661
  }),
526
- /* @__PURE__ */ D("button", {
662
+ /* @__PURE__ */ E("button", {
527
663
  type: "button",
528
- onClick: () => alert("Navigate to investor section to fund this business."),
664
+ onClick: () => k(`/investor/opportunity/${I.id}`),
529
665
  className: "w-full rounded-lg bg-status-success-text py-2 text-xs font-medium text-white hover:bg-status-success-text transition-colors",
530
666
  children: "Fund This Business"
531
667
  })
@@ -534,76 +670,97 @@ function M() {
534
670
  ]
535
671
  })]
536
672
  }),
537
- G && q && /* @__PURE__ */ D("div", {
673
+ L === "menu" && Q > 0 && /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ E("div", {
674
+ className: "h-20 lg:hidden",
675
+ "aria-hidden": "true"
676
+ }), /* @__PURE__ */ E("div", {
677
+ className: "fixed inset-x-0 bottom-0 z-40 border-t border-border-subtle bg-bg-surface/95 p-3 backdrop-blur-sm shadow-elevation-2 lg:hidden",
678
+ children: /* @__PURE__ */ D("button", {
679
+ type: "button",
680
+ onClick: () => k("/customer/checkout"),
681
+ className: "flex w-full items-center justify-center gap-2 rounded-lg bg-action-primary-bg py-3 text-sm font-semibold text-action-primary-text hover:bg-action-primary-bg-hover transition-colors",
682
+ children: [
683
+ /* @__PURE__ */ E(S, { className: "h-4 w-4" }),
684
+ "View Cart · ",
685
+ Q,
686
+ " ",
687
+ Q === 1 ? "item" : "items",
688
+ " ·",
689
+ " ",
690
+ a(Z, { minimumFractionDigits: 0 })
691
+ ]
692
+ })
693
+ })] }),
694
+ ye && W && /* @__PURE__ */ E("div", {
538
695
  className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",
539
- children: /* @__PURE__ */ D("div", {
696
+ children: /* @__PURE__ */ E("div", {
540
697
  className: "w-full max-w-md max-h-[90vh] overflow-y-auto rounded-lg border border-border-subtle bg-bg-surface",
541
- children: /* @__PURE__ */ O("div", {
698
+ children: /* @__PURE__ */ D("div", {
542
699
  className: "p-5",
543
700
  children: [
544
- /* @__PURE__ */ O("div", {
701
+ /* @__PURE__ */ D("div", {
545
702
  className: "flex items-center justify-between mb-4",
546
- children: [/* @__PURE__ */ D("h3", {
703
+ children: [/* @__PURE__ */ E("h3", {
547
704
  className: "text-lg font-semibold text-text-primary",
548
- children: q.product.name
549
- }), /* @__PURE__ */ D("button", {
705
+ children: W.product.name
706
+ }), /* @__PURE__ */ E("button", {
550
707
  type: "button",
551
708
  onClick: () => {
552
- K(!1), J(null);
709
+ U(!1), G(null);
553
710
  },
554
711
  className: "rounded-md p-1 text-text-secondary hover:text-text-primary",
555
- children: /* @__PURE__ */ D(T, { className: "h-5 w-5" })
712
+ children: /* @__PURE__ */ E(w, { className: "h-5 w-5" })
556
713
  })]
557
714
  }),
558
- /* @__PURE__ */ D("p", {
715
+ /* @__PURE__ */ E("p", {
559
716
  className: "text-sm text-text-secondary mb-4",
560
- children: q.product.description
717
+ children: W.product.description
561
718
  }),
562
- /* @__PURE__ */ D("p", {
719
+ /* @__PURE__ */ E("p", {
563
720
  className: "text-lg font-bold text-text-primary mb-4",
564
- children: s(q.product.price, { minimumFractionDigits: 0 })
721
+ children: a(W.product.price, { minimumFractionDigits: 0 })
565
722
  }),
566
- /* @__PURE__ */ O("div", {
723
+ /* @__PURE__ */ D("div", {
567
724
  className: "mb-4",
568
- children: [/* @__PURE__ */ D("label", {
725
+ children: [/* @__PURE__ */ E("label", {
569
726
  className: "block text-sm font-medium text-text-primary mb-2",
570
727
  children: "Quantity"
571
- }), /* @__PURE__ */ O("div", {
728
+ }), /* @__PURE__ */ D("div", {
572
729
  className: "flex items-center gap-3",
573
730
  children: [
574
- /* @__PURE__ */ D("button", {
731
+ /* @__PURE__ */ E("button", {
575
732
  type: "button",
576
- onClick: () => J((e) => e && {
733
+ onClick: () => G((e) => e && {
577
734
  ...e,
578
735
  quantity: Math.max(1, e.quantity - 1)
579
736
  }),
580
737
  className: "flex h-8 w-8 items-center justify-center rounded-full bg-bg-sunken text-text-primary",
581
- children: /* @__PURE__ */ D(b, { className: "h-4 w-4" })
738
+ children: /* @__PURE__ */ E(y, { className: "h-4 w-4" })
582
739
  }),
583
- /* @__PURE__ */ D("span", {
740
+ /* @__PURE__ */ E("span", {
584
741
  className: "min-w-[2ch] text-center font-medium text-text-primary",
585
- children: q.quantity
742
+ children: W.quantity
586
743
  }),
587
- /* @__PURE__ */ D("button", {
744
+ /* @__PURE__ */ E("button", {
588
745
  type: "button",
589
- onClick: () => J((e) => e && {
746
+ onClick: () => G((e) => e && {
590
747
  ...e,
591
748
  quantity: e.quantity + 1
592
749
  }),
593
750
  className: "flex h-8 w-8 items-center justify-center rounded-full bg-bg-sunken text-text-primary",
594
- children: /* @__PURE__ */ D(x, { className: "h-4 w-4" })
751
+ children: /* @__PURE__ */ E(b, { className: "h-4 w-4" })
595
752
  })
596
753
  ]
597
754
  })]
598
755
  }),
599
- /* @__PURE__ */ O("div", {
756
+ /* @__PURE__ */ D("div", {
600
757
  className: "mb-4",
601
- children: [/* @__PURE__ */ D("label", {
758
+ children: [/* @__PURE__ */ E("label", {
602
759
  className: "block text-sm font-medium text-text-primary mb-2",
603
760
  children: "Special Instructions"
604
- }), /* @__PURE__ */ D("textarea", {
605
- value: q.specialInstructions,
606
- onChange: (e) => J((t) => t && {
761
+ }), /* @__PURE__ */ E("textarea", {
762
+ value: W.specialInstructions,
763
+ onChange: (e) => G((t) => t && {
607
764
  ...t,
608
765
  specialInstructions: e.target.value
609
766
  }),
@@ -612,16 +769,16 @@ function M() {
612
769
  rows: 3
613
770
  })]
614
771
  }),
615
- /* @__PURE__ */ O("button", {
772
+ /* @__PURE__ */ D("button", {
616
773
  type: "button",
617
774
  onClick: () => {
618
- q && (oe(q.product, q.quantity, q.specialInstructions), K(!1), J(null), alert(`${q.product.name} added to cart`));
775
+ W && (J(W.product, W.quantity, W.specialInstructions), U(!1), G(null), alert(`${W.product.name} added to cart`));
619
776
  },
620
777
  className: "w-full rounded-lg bg-foreground py-2.5 text-sm font-medium text-background hover:opacity-90 transition-opacity",
621
778
  children: [
622
779
  "Add to Cart -",
623
780
  " ",
624
- s(q.product.price * q.quantity, { minimumFractionDigits: 0 })
781
+ a(W.product.price * W.quantity, { minimumFractionDigits: 0 })
625
782
  ]
626
783
  })
627
784
  ]
@@ -629,15 +786,15 @@ function M() {
629
786
  })
630
787
  })
631
788
  ]
632
- }) : /* @__PURE__ */ D(n, {
789
+ }) : /* @__PURE__ */ E(n, {
633
790
  title: "Cart Not Found",
634
- children: /* @__PURE__ */ D(r, {
635
- icon: /* @__PURE__ */ D(C, { className: "h-12 w-12" }),
791
+ children: /* @__PURE__ */ E(r, {
792
+ icon: /* @__PURE__ */ E(S, { className: "h-12 w-12" }),
636
793
  title: "Cart not found",
637
- description: `No cart found with ID "${M}".`,
638
- action: /* @__PURE__ */ D("button", {
794
+ description: `No cart found with ID "${O}".`,
795
+ action: /* @__PURE__ */ E("button", {
639
796
  type: "button",
640
- onClick: () => N("/customer/carts"),
797
+ onClick: () => k("/customer/discover"),
641
798
  className: "rounded-lg bg-foreground px-4 py-2 text-sm font-medium text-background hover:opacity-90 transition-opacity",
642
799
  children: "Browse Carts"
643
800
  })
@@ -645,6 +802,6 @@ function M() {
645
802
  });
646
803
  }
647
804
  //#endregion
648
- export { M as CartDetailPage };
805
+ export { O as CartDetailPage };
649
806
 
650
807
  //# sourceMappingURL=CartDetailPage.js.map