@burdenoff/microfe-adaptercloud 2026.625.2 → 2026.628.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (153) hide show
  1. package/dist/adaptercloud/AdapterCloudRoot.js +65 -121
  2. package/dist/adaptercloud/AdapterCloudRoot.js.map +1 -1
  3. package/dist/adaptercloud/AdapterCloudRoutes.js +70 -182
  4. package/dist/adaptercloud/AdapterCloudRoutes.js.map +1 -1
  5. package/dist/adaptercloud/components/DataState.js +42 -0
  6. package/dist/adaptercloud/components/DataState.js.map +1 -0
  7. package/dist/adaptercloud/components/SeverityBadge.js +12 -0
  8. package/dist/adaptercloud/components/SeverityBadge.js.map +1 -0
  9. package/dist/adaptercloud/components/StatusBadge.js +43 -44
  10. package/dist/adaptercloud/components/StatusBadge.js.map +1 -1
  11. package/dist/adaptercloud/context/AdapterCloudContext.js +22 -30
  12. package/dist/adaptercloud/context/AdapterCloudContext.js.map +1 -1
  13. package/dist/adaptercloud/hooks/useAdapterCloudApi.js +397 -194
  14. package/dist/adaptercloud/hooks/useAdapterCloudApi.js.map +1 -1
  15. package/dist/adaptercloud/index.js +1 -0
  16. package/dist/adaptercloud/pages/OverviewPage.js +334 -0
  17. package/dist/adaptercloud/pages/OverviewPage.js.map +1 -0
  18. package/dist/adaptercloud/pages/adapters/AdapterDetailPage.js +187 -0
  19. package/dist/adaptercloud/pages/adapters/AdapterDetailPage.js.map +1 -0
  20. package/dist/adaptercloud/pages/adapters/AdapterFormPage.js +278 -0
  21. package/dist/adaptercloud/pages/adapters/AdapterFormPage.js.map +1 -0
  22. package/dist/adaptercloud/pages/adapters/AdaptersListPage.js +172 -0
  23. package/dist/adaptercloud/pages/adapters/AdaptersListPage.js.map +1 -0
  24. package/dist/adaptercloud/pages/connections/ConnectionDetailPage.js +247 -0
  25. package/dist/adaptercloud/pages/connections/ConnectionDetailPage.js.map +1 -0
  26. package/dist/adaptercloud/pages/connections/ConnectionFormPage.js +271 -0
  27. package/dist/adaptercloud/pages/connections/ConnectionFormPage.js.map +1 -0
  28. package/dist/adaptercloud/pages/connections/ConnectionsListPage.js +167 -0
  29. package/dist/adaptercloud/pages/connections/ConnectionsListPage.js.map +1 -0
  30. package/dist/adaptercloud/pages/costs/CostsPage.js +169 -0
  31. package/dist/adaptercloud/pages/costs/CostsPage.js.map +1 -0
  32. package/dist/adaptercloud/pages/drift/DriftListPage.js +132 -0
  33. package/dist/adaptercloud/pages/drift/DriftListPage.js.map +1 -0
  34. package/dist/adaptercloud/pages/policies/PoliciesListPage.js +171 -0
  35. package/dist/adaptercloud/pages/policies/PoliciesListPage.js.map +1 -0
  36. package/dist/adaptercloud/pages/policies/PolicyDetailPage.js +185 -0
  37. package/dist/adaptercloud/pages/policies/PolicyDetailPage.js.map +1 -0
  38. package/dist/adaptercloud/pages/policies/PolicyFormPage.js +215 -0
  39. package/dist/adaptercloud/pages/policies/PolicyFormPage.js.map +1 -0
  40. package/dist/adaptercloud/pages/resources/ResourceDetailPage.js +207 -0
  41. package/dist/adaptercloud/pages/resources/ResourceDetailPage.js.map +1 -0
  42. package/dist/adaptercloud/pages/resources/ResourcesListPage.js +182 -0
  43. package/dist/adaptercloud/pages/resources/ResourcesListPage.js.map +1 -0
  44. package/dist/adaptercloud/pages/sync-runs/SyncRunsListPage.js +196 -0
  45. package/dist/adaptercloud/pages/sync-runs/SyncRunsListPage.js.map +1 -0
  46. package/dist/adaptercloud/pages/violations/ViolationsListPage.js +258 -0
  47. package/dist/adaptercloud/pages/violations/ViolationsListPage.js.map +1 -0
  48. package/dist/adaptercloud/store/adaptercloudStore.js +1 -7
  49. package/dist/adaptercloud/store/adaptercloudStore.js.map +1 -1
  50. package/dist/adaptercloud/utils/domain.js +105 -0
  51. package/dist/adaptercloud/utils/domain.js.map +1 -0
  52. package/dist/adaptercloud/utils/formatters.js +1 -12
  53. package/dist/adaptercloud/utils/formatters.js.map +1 -1
  54. package/dist/index.js +5 -4
  55. package/package.json +1 -1
  56. package/dist/adaptercloud/components/InvestmentCard.js +0 -98
  57. package/dist/adaptercloud/components/InvestmentCard.js.map +0 -1
  58. package/dist/adaptercloud/components/RatingDisplay.js +0 -35
  59. package/dist/adaptercloud/components/RatingDisplay.js.map +0 -1
  60. package/dist/adaptercloud/mocks/data.js +0 -1517
  61. package/dist/adaptercloud/mocks/data.js.map +0 -1
  62. package/dist/adaptercloud/mocks/users.js +0 -34
  63. package/dist/adaptercloud/mocks/users.js.map +0 -1
  64. package/dist/adaptercloud/pages/HomePage.js +0 -934
  65. package/dist/adaptercloud/pages/HomePage.js.map +0 -1
  66. package/dist/adaptercloud/pages/admin/AdminAnalyticsPage.js +0 -653
  67. package/dist/adaptercloud/pages/admin/AdminAnalyticsPage.js.map +0 -1
  68. package/dist/adaptercloud/pages/admin/AdminDashboard.js +0 -665
  69. package/dist/adaptercloud/pages/admin/AdminDashboard.js.map +0 -1
  70. package/dist/adaptercloud/pages/admin/AdminFinancialPage.js +0 -426
  71. package/dist/adaptercloud/pages/admin/AdminFinancialPage.js.map +0 -1
  72. package/dist/adaptercloud/pages/admin/AdminOrdersPage.js +0 -665
  73. package/dist/adaptercloud/pages/admin/AdminOrdersPage.js.map +0 -1
  74. package/dist/adaptercloud/pages/admin/AdminProfilePage.js +0 -261
  75. package/dist/adaptercloud/pages/admin/AdminProfilePage.js.map +0 -1
  76. package/dist/adaptercloud/pages/admin/AdminSettingsPage.js +0 -663
  77. package/dist/adaptercloud/pages/admin/AdminSettingsPage.js.map +0 -1
  78. package/dist/adaptercloud/pages/admin/CartManagementPage.js +0 -874
  79. package/dist/adaptercloud/pages/admin/CartManagementPage.js.map +0 -1
  80. package/dist/adaptercloud/pages/admin/UserManagementPage.js +0 -898
  81. package/dist/adaptercloud/pages/admin/UserManagementPage.js.map +0 -1
  82. package/dist/adaptercloud/pages/cart-owner/AnalyticsDashboard.js +0 -840
  83. package/dist/adaptercloud/pages/cart-owner/AnalyticsDashboard.js.map +0 -1
  84. package/dist/adaptercloud/pages/cart-owner/BusinessSettingsPage.js +0 -714
  85. package/dist/adaptercloud/pages/cart-owner/BusinessSettingsPage.js.map +0 -1
  86. package/dist/adaptercloud/pages/cart-owner/CartOwnerDashboard.js +0 -788
  87. package/dist/adaptercloud/pages/cart-owner/CartOwnerDashboard.js.map +0 -1
  88. package/dist/adaptercloud/pages/cart-owner/CartOwnerProfilePage.js +0 -888
  89. package/dist/adaptercloud/pages/cart-owner/CartOwnerProfilePage.js.map +0 -1
  90. package/dist/adaptercloud/pages/cart-owner/CartServiceConfigPage.js +0 -634
  91. package/dist/adaptercloud/pages/cart-owner/CartServiceConfigPage.js.map +0 -1
  92. package/dist/adaptercloud/pages/cart-owner/InventoryManagementPage.js +0 -907
  93. package/dist/adaptercloud/pages/cart-owner/InventoryManagementPage.js.map +0 -1
  94. package/dist/adaptercloud/pages/cart-owner/OrderManagementPage.js +0 -875
  95. package/dist/adaptercloud/pages/cart-owner/OrderManagementPage.js.map +0 -1
  96. package/dist/adaptercloud/pages/cart-owner/StaffManagementPage.js +0 -827
  97. package/dist/adaptercloud/pages/cart-owner/StaffManagementPage.js.map +0 -1
  98. package/dist/adaptercloud/pages/common/HelpSupportPage.js +0 -1329
  99. package/dist/adaptercloud/pages/common/HelpSupportPage.js.map +0 -1
  100. package/dist/adaptercloud/pages/common/NotificationCenterPage.js +0 -671
  101. package/dist/adaptercloud/pages/common/NotificationCenterPage.js.map +0 -1
  102. package/dist/adaptercloud/pages/common/SettingsPage.js +0 -982
  103. package/dist/adaptercloud/pages/common/SettingsPage.js.map +0 -1
  104. package/dist/adaptercloud/pages/customer/BookingDetailsPage.js +0 -596
  105. package/dist/adaptercloud/pages/customer/BookingDetailsPage.js.map +0 -1
  106. package/dist/adaptercloud/pages/customer/CartDetailPage.js +0 -623
  107. package/dist/adaptercloud/pages/customer/CartDetailPage.js.map +0 -1
  108. package/dist/adaptercloud/pages/customer/CartDiscoveryPage.js +0 -552
  109. package/dist/adaptercloud/pages/customer/CartDiscoveryPage.js.map +0 -1
  110. package/dist/adaptercloud/pages/customer/CheckoutPage.js +0 -534
  111. package/dist/adaptercloud/pages/customer/CheckoutPage.js.map +0 -1
  112. package/dist/adaptercloud/pages/customer/CustomerDashboard.js +0 -525
  113. package/dist/adaptercloud/pages/customer/CustomerDashboard.js.map +0 -1
  114. package/dist/adaptercloud/pages/customer/CustomerProfilePage.js +0 -623
  115. package/dist/adaptercloud/pages/customer/CustomerProfilePage.js.map +0 -1
  116. package/dist/adaptercloud/pages/customer/DirectServiceBookingPage.js +0 -629
  117. package/dist/adaptercloud/pages/customer/DirectServiceBookingPage.js.map +0 -1
  118. package/dist/adaptercloud/pages/customer/FavoritesPage.js +0 -480
  119. package/dist/adaptercloud/pages/customer/FavoritesPage.js.map +0 -1
  120. package/dist/adaptercloud/pages/customer/OrderHistoryPage.js +0 -444
  121. package/dist/adaptercloud/pages/customer/OrderHistoryPage.js.map +0 -1
  122. package/dist/adaptercloud/pages/customer/OrderTrackingPage.js +0 -391
  123. package/dist/adaptercloud/pages/customer/OrderTrackingPage.js.map +0 -1
  124. package/dist/adaptercloud/pages/customer/PaymentMethodsPage.js +0 -504
  125. package/dist/adaptercloud/pages/customer/PaymentMethodsPage.js.map +0 -1
  126. package/dist/adaptercloud/pages/customer/ReviewsPage.js +0 -609
  127. package/dist/adaptercloud/pages/customer/ReviewsPage.js.map +0 -1
  128. package/dist/adaptercloud/pages/customer/SavedAddressesPage.js +0 -459
  129. package/dist/adaptercloud/pages/customer/SavedAddressesPage.js.map +0 -1
  130. package/dist/adaptercloud/pages/investor/InvestmentDetailsPage.js +0 -851
  131. package/dist/adaptercloud/pages/investor/InvestmentDetailsPage.js.map +0 -1
  132. package/dist/adaptercloud/pages/investor/InvestmentOpportunitiesPage.js +0 -942
  133. package/dist/adaptercloud/pages/investor/InvestmentOpportunitiesPage.js.map +0 -1
  134. package/dist/adaptercloud/pages/investor/InvestorAnalyticsPage.js +0 -683
  135. package/dist/adaptercloud/pages/investor/InvestorAnalyticsPage.js.map +0 -1
  136. package/dist/adaptercloud/pages/investor/InvestorDashboard.js +0 -452
  137. package/dist/adaptercloud/pages/investor/InvestorDashboard.js.map +0 -1
  138. package/dist/adaptercloud/pages/investor/InvestorInvestmentsPage.js +0 -402
  139. package/dist/adaptercloud/pages/investor/InvestorInvestmentsPage.js.map +0 -1
  140. package/dist/adaptercloud/pages/investor/InvestorPortfolioPage.js +0 -571
  141. package/dist/adaptercloud/pages/investor/InvestorPortfolioPage.js.map +0 -1
  142. package/dist/adaptercloud/pages/investor/InvestorProfilePage.js +0 -1067
  143. package/dist/adaptercloud/pages/investor/InvestorProfilePage.js.map +0 -1
  144. package/dist/adaptercloud/pages/worker/TaskDetailsPage.js +0 -526
  145. package/dist/adaptercloud/pages/worker/TaskDetailsPage.js.map +0 -1
  146. package/dist/adaptercloud/pages/worker/WorkerDashboard.js +0 -659
  147. package/dist/adaptercloud/pages/worker/WorkerDashboard.js.map +0 -1
  148. package/dist/adaptercloud/pages/worker/WorkerOrdersPage.js +0 -678
  149. package/dist/adaptercloud/pages/worker/WorkerOrdersPage.js.map +0 -1
  150. package/dist/adaptercloud/pages/worker/WorkerProfilePage.js +0 -689
  151. package/dist/adaptercloud/pages/worker/WorkerProfilePage.js.map +0 -1
  152. package/dist/adaptercloud/pages/worker/WorkerSchedulePage.js +0 -582
  153. package/dist/adaptercloud/pages/worker/WorkerSchedulePage.js.map +0 -1
@@ -1,934 +0,0 @@
1
- import { useAdapterCloud as e } from "../context/AdapterCloudContext.js";
2
- import { cn as t } from "../utils/cn.js";
3
- import { PageLayout as n } from "../components/PageLayout.js";
4
- import { MetricsCard as r } from "../components/MetricsCard.js";
5
- import { StatusBadge as i } from "../components/StatusBadge.js";
6
- import { EmptyState as a } from "../components/EmptyState.js";
7
- import { useAdapterCloudApi as o } from "../hooks/useAdapterCloudApi.js";
8
- import { formatCurrency as s, formatDistance as c, formatRelativeTime as l } from "../utils/formatters.js";
9
- import { useCallback as u, useMemo as d, useState as f } from "react";
10
- import { useI18n as p } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
11
- import { Activity as m, AlertCircle as h, ArrowRight as g, BadgeCheck as _, BarChart3 as v, CheckCircle2 as y, ChefHat as b, ClipboardList as x, Clock as S, FileText as C, GraduationCap as w, HandCoins as T, Heart as E, Home as D, IndianRupee as O, LayoutDashboard as k, Loader2 as A, MapPin as j, Package as M, Scissors as N, Search as P, Settings as F, Shirt as I, ShoppingBag as L, ShoppingCart as R, Sparkles as z, Star as B, Store as V, TrendingUp as H, Truck as U, Users as W, Wallet as G, Wrench as K } from "lucide-react";
12
- import { Fragment as q, jsx as J, jsxs as Y } from "react/jsx-runtime";
13
- import { GlassCard as X, GradientText as Z } from "@burdenoff/fe-libs/ui";
14
- //#region src/adaptercloud/pages/HomePage.tsx
15
- var Q = {
16
- customer: [
17
- {
18
- label: "Discover Services",
19
- description: "Browse carts near you",
20
- icon: /* @__PURE__ */ J(P, { className: "h-5 w-5" }),
21
- path: "/customer/carts",
22
- color: "bg-accent-blue-subtle/10 text-accent-blue"
23
- },
24
- {
25
- label: "My Orders",
26
- description: "Track your orders",
27
- icon: /* @__PURE__ */ J(L, { className: "h-5 w-5" }),
28
- path: "/customer/orders",
29
- color: "bg-status-success-bg-subtle/10 text-status-success-text"
30
- },
31
- {
32
- label: "Favorites",
33
- description: "Your saved carts",
34
- icon: /* @__PURE__ */ J(E, { className: "h-5 w-5" }),
35
- path: "/customer/favorites",
36
- color: "bg-accent-pink-subtle/10 text-accent-pink"
37
- },
38
- {
39
- label: "Settings",
40
- description: "Manage preferences",
41
- icon: /* @__PURE__ */ J(F, { className: "h-5 w-5" }),
42
- path: "/settings",
43
- color: "bg-bg-sunken text-text-secondary"
44
- }
45
- ],
46
- cart_owner: [
47
- {
48
- label: "My Cart",
49
- description: "Manage your cart",
50
- icon: /* @__PURE__ */ J(V, { className: "h-5 w-5" }),
51
- path: "/owner/dashboard",
52
- color: "bg-accent-purple-subtle/10 text-accent-purple"
53
- },
54
- {
55
- label: "Orders",
56
- description: "Incoming orders",
57
- icon: /* @__PURE__ */ J(L, { className: "h-5 w-5" }),
58
- path: "/owner/orders",
59
- color: "bg-accent-blue-subtle/10 text-accent-blue"
60
- },
61
- {
62
- label: "Analytics",
63
- description: "Revenue & insights",
64
- icon: /* @__PURE__ */ J(v, { className: "h-5 w-5" }),
65
- path: "/owner/analytics",
66
- color: "bg-status-success-bg-subtle/10 text-status-success-text"
67
- },
68
- {
69
- label: "Staff",
70
- description: "Manage workers",
71
- icon: /* @__PURE__ */ J(W, { className: "h-5 w-5" }),
72
- path: "/owner/staff",
73
- color: "bg-accent-orange-subtle/10 text-accent-orange"
74
- }
75
- ],
76
- worker: [
77
- {
78
- label: "My Tasks",
79
- description: "View assigned tasks",
80
- icon: /* @__PURE__ */ J(x, { className: "h-5 w-5" }),
81
- path: "/worker/dashboard",
82
- color: "bg-accent-orange-subtle/10 text-accent-orange"
83
- },
84
- {
85
- label: "Schedule",
86
- description: "View shifts",
87
- icon: /* @__PURE__ */ J(S, { className: "h-5 w-5" }),
88
- path: "/worker/schedule",
89
- color: "bg-accent-blue-subtle/10 text-accent-blue"
90
- },
91
- {
92
- label: "Earnings",
93
- description: "Track pay",
94
- icon: /* @__PURE__ */ J(G, { className: "h-5 w-5" }),
95
- path: "/worker/earnings",
96
- color: "bg-status-success-bg-subtle/10 text-status-success-text"
97
- },
98
- {
99
- label: "Performance",
100
- description: "Ratings & stats",
101
- icon: /* @__PURE__ */ J(B, { className: "h-5 w-5" }),
102
- path: "/worker/performance",
103
- color: "bg-status-warning-bg-subtle/10 text-status-warning-text"
104
- }
105
- ],
106
- investor: [
107
- {
108
- label: "Portfolio",
109
- description: "Your investments",
110
- icon: /* @__PURE__ */ J(H, { className: "h-5 w-5" }),
111
- path: "/investor/dashboard",
112
- color: "bg-status-success-bg-subtle/10 text-status-success-text"
113
- },
114
- {
115
- label: "Opportunities",
116
- description: "New investments",
117
- icon: /* @__PURE__ */ J(T, { className: "h-5 w-5" }),
118
- path: "/investor/opportunities",
119
- color: "bg-accent-blue-subtle/10 text-accent-blue"
120
- },
121
- {
122
- label: "Returns",
123
- description: "Earnings history",
124
- icon: /* @__PURE__ */ J(O, { className: "h-5 w-5" }),
125
- path: "/investor/returns",
126
- color: "bg-status-success-bg-subtle/10 text-status-success-text"
127
- },
128
- {
129
- label: "Reports",
130
- description: "Performance reports",
131
- icon: /* @__PURE__ */ J(C, { className: "h-5 w-5" }),
132
- path: "/investor/reports",
133
- color: "bg-accent-purple-subtle/10 text-accent-purple"
134
- }
135
- ],
136
- admin: [
137
- {
138
- label: "Dashboard",
139
- description: "Platform overview",
140
- icon: /* @__PURE__ */ J(k, { className: "h-5 w-5" }),
141
- path: "/admin/dashboard",
142
- color: "bg-status-error-bg-subtle/10 text-status-error-text"
143
- },
144
- {
145
- label: "Users",
146
- description: "Manage accounts",
147
- icon: /* @__PURE__ */ J(W, { className: "h-5 w-5" }),
148
- path: "/admin/users",
149
- color: "bg-accent-blue-subtle/10 text-accent-blue"
150
- },
151
- {
152
- label: "Carts",
153
- description: "Approve & manage",
154
- icon: /* @__PURE__ */ J(V, { className: "h-5 w-5" }),
155
- path: "/admin/carts",
156
- color: "bg-accent-purple-subtle/10 text-accent-purple"
157
- },
158
- {
159
- label: "Analytics",
160
- description: "Revenue reports",
161
- icon: /* @__PURE__ */ J(v, { className: "h-5 w-5" }),
162
- path: "/admin/analytics",
163
- color: "bg-status-success-bg-subtle/10 text-status-success-text"
164
- }
165
- ]
166
- };
167
- function $(e, t, n) {
168
- switch (e) {
169
- case "customer": return [
170
- {
171
- icon: /* @__PURE__ */ J(L, { className: "h-5 w-5" }),
172
- value: t.length.toString(),
173
- label: "Total Orders",
174
- trend: "up",
175
- trendValue: "+2 this week"
176
- },
177
- {
178
- icon: /* @__PURE__ */ J(V, { className: "h-5 w-5" }),
179
- value: (n?.activeProviders ?? 0).toString(),
180
- label: "Nearby Providers",
181
- trend: "up",
182
- trendValue: "+3"
183
- },
184
- {
185
- icon: /* @__PURE__ */ J(B, { className: "h-5 w-5" }),
186
- value: (n?.avgRating ?? 0).toFixed(1),
187
- label: "Avg. Rating",
188
- trend: "up",
189
- trendValue: "+0.1"
190
- },
191
- {
192
- icon: /* @__PURE__ */ J(O, { className: "h-5 w-5" }),
193
- value: s(t.reduce((e, t) => e + t.total, 0), { minimumFractionDigits: 0 }),
194
- label: "Total Spent",
195
- trend: "neutral",
196
- trendValue: ""
197
- }
198
- ];
199
- case "cart_owner": return [
200
- {
201
- icon: /* @__PURE__ */ J(L, { className: "h-5 w-5" }),
202
- value: "48",
203
- label: "Orders Today",
204
- trend: "up",
205
- trendValue: "+12%"
206
- },
207
- {
208
- icon: /* @__PURE__ */ J(O, { className: "h-5 w-5" }),
209
- value: s(12850, { minimumFractionDigits: 0 }),
210
- label: "Today's Revenue",
211
- trend: "up",
212
- trendValue: "+8%"
213
- },
214
- {
215
- icon: /* @__PURE__ */ J(B, { className: "h-5 w-5" }),
216
- value: "4.6",
217
- label: "Cart Rating",
218
- trend: "up",
219
- trendValue: "+0.2"
220
- },
221
- {
222
- icon: /* @__PURE__ */ J(W, { className: "h-5 w-5" }),
223
- value: "5",
224
- label: "Active Staff",
225
- trend: "neutral",
226
- trendValue: ""
227
- }
228
- ];
229
- case "worker": return [
230
- {
231
- icon: /* @__PURE__ */ J(x, { className: "h-5 w-5" }),
232
- value: "5",
233
- label: "Tasks Today",
234
- trend: "up",
235
- trendValue: "+2"
236
- },
237
- {
238
- icon: /* @__PURE__ */ J(O, { className: "h-5 w-5" }),
239
- value: s(425, { minimumFractionDigits: 0 }),
240
- label: "Today's Earnings",
241
- trend: "up",
242
- trendValue: "+15%"
243
- },
244
- {
245
- icon: /* @__PURE__ */ J(B, { className: "h-5 w-5" }),
246
- value: "4.7",
247
- label: "Rating",
248
- trend: "up",
249
- trendValue: "+0.1"
250
- },
251
- {
252
- icon: /* @__PURE__ */ J(y, { className: "h-5 w-5" }),
253
- value: "96.8%",
254
- label: "Completion Rate",
255
- trend: "up",
256
- trendValue: "+0.5%"
257
- }
258
- ];
259
- case "investor": return [
260
- {
261
- icon: /* @__PURE__ */ J(H, { className: "h-5 w-5" }),
262
- value: "3",
263
- label: "Active Investments",
264
- trend: "up",
265
- trendValue: "+1"
266
- },
267
- {
268
- icon: /* @__PURE__ */ J(O, { className: "h-5 w-5" }),
269
- value: s(45e4, { minimumFractionDigits: 0 }),
270
- label: "Total Invested",
271
- trend: "up",
272
- trendValue: ""
273
- },
274
- {
275
- icon: /* @__PURE__ */ J(T, { className: "h-5 w-5" }),
276
- value: "16.5%",
277
- label: "Avg. Returns",
278
- trend: "up",
279
- trendValue: "+2.1%"
280
- },
281
- {
282
- icon: /* @__PURE__ */ J(v, { className: "h-5 w-5" }),
283
- value: s(74250, { minimumFractionDigits: 0 }),
284
- label: "Total Returns",
285
- trend: "up",
286
- trendValue: "+8.5%"
287
- }
288
- ];
289
- default: return [
290
- {
291
- icon: /* @__PURE__ */ J(W, { className: "h-5 w-5" }),
292
- value: (n?.activeCustomers ?? 0).toLocaleString("en-IN"),
293
- label: "Active Customers",
294
- trend: "up",
295
- trendValue: "+50"
296
- },
297
- {
298
- icon: /* @__PURE__ */ J(V, { className: "h-5 w-5" }),
299
- value: (n?.activeProviders ?? 0).toString(),
300
- label: "Service Providers",
301
- trend: "up",
302
- trendValue: "+3"
303
- },
304
- {
305
- icon: /* @__PURE__ */ J(L, { className: "h-5 w-5" }),
306
- value: (n?.totalOrders ?? 0).toLocaleString("en-IN"),
307
- label: "Total Orders",
308
- trend: "up",
309
- trendValue: "+12%"
310
- },
311
- {
312
- icon: /* @__PURE__ */ J(O, { className: "h-5 w-5" }),
313
- value: s(n?.totalRevenue ?? 0, { minimumFractionDigits: 0 }),
314
- label: "Total Revenue",
315
- trend: "up",
316
- trendValue: "+8.5%"
317
- }
318
- ];
319
- }
320
- }
321
- var ee = [
322
- {
323
- label: "Food & Beverage",
324
- icon: /* @__PURE__ */ J(b, { className: "h-6 w-6" }),
325
- color: "bg-accent-orange-subtle/10 text-accent-orange"
326
- },
327
- {
328
- label: "Personal Care & Beauty",
329
- icon: /* @__PURE__ */ J(N, { className: "h-6 w-6" }),
330
- color: "bg-accent-pink-subtle/10 text-accent-pink"
331
- },
332
- {
333
- label: "Repair & Maintenance",
334
- icon: /* @__PURE__ */ J(K, { className: "h-6 w-6" }),
335
- color: "bg-accent-blue-subtle/10 text-accent-blue"
336
- },
337
- {
338
- label: "Home Services",
339
- icon: /* @__PURE__ */ J(D, { className: "h-6 w-6" }),
340
- color: "bg-status-success-bg-subtle/10 text-status-success-text"
341
- },
342
- {
343
- label: "Clothing & Fashion",
344
- icon: /* @__PURE__ */ J(I, { className: "h-6 w-6" }),
345
- color: "bg-accent-purple-subtle/10 text-accent-purple"
346
- },
347
- {
348
- label: "Health & Wellness",
349
- icon: /* @__PURE__ */ J(E, { className: "h-6 w-6" }),
350
- color: "bg-status-error-bg-subtle/10 text-status-error-text"
351
- },
352
- {
353
- label: "Education & Skills",
354
- icon: /* @__PURE__ */ J(w, { className: "h-6 w-6" }),
355
- color: "bg-status-warning-bg-subtle/10 text-status-warning-text"
356
- },
357
- {
358
- label: "Retail & Merchandise",
359
- icon: /* @__PURE__ */ J(M, { className: "h-6 w-6" }),
360
- color: "bg-accent-indigo-subtle/10 text-accent-indigo"
361
- },
362
- {
363
- label: "Grocery & Essentials",
364
- icon: /* @__PURE__ */ J(R, { className: "h-6 w-6" }),
365
- color: "bg-status-success-bg-subtle/10 text-status-success-text"
366
- }
367
- ], te = [
368
- {
369
- step: 1,
370
- title: "Browse Services",
371
- description: "Discover local service providers and carts near you.",
372
- icon: /* @__PURE__ */ J(P, { className: "h-6 w-6" })
373
- },
374
- {
375
- step: 2,
376
- title: "Place an Order",
377
- description: "Select items or services and place your order seamlessly.",
378
- icon: /* @__PURE__ */ J(L, { className: "h-6 w-6" })
379
- },
380
- {
381
- step: 3,
382
- title: "Track in Real-time",
383
- description: "Get live updates on your order from confirmation to delivery.",
384
- icon: /* @__PURE__ */ J(U, { className: "h-6 w-6" })
385
- },
386
- {
387
- step: 4,
388
- title: "Rate & Review",
389
- description: "Share your experience and help others find great services.",
390
- icon: /* @__PURE__ */ J(B, { className: "h-6 w-6" })
391
- }
392
- ], ne = [
393
- {
394
- id: "ha-1",
395
- description: "New order placed at Dosa Express",
396
- time: "2 mins ago",
397
- type: "order"
398
- },
399
- {
400
- id: "ha-2",
401
- description: "Quick Cuts Salon received a new review",
402
- time: "15 mins ago",
403
- type: "review"
404
- },
405
- {
406
- id: "ha-3",
407
- description: "Investment opportunity funded: Spotless Cleaning",
408
- time: "1 hour ago",
409
- type: "investment"
410
- },
411
- {
412
- id: "ha-4",
413
- description: "New cart registered: Gadget Zone Brigade",
414
- time: "3 hours ago",
415
- type: "cart"
416
- },
417
- {
418
- id: "ha-5",
419
- description: "Order delivered: Fix-It Mobile Repair",
420
- time: "5 hours ago",
421
- type: "order"
422
- }
423
- ], re = [
424
- {
425
- label: "Service Providers",
426
- value: "21+",
427
- icon: /* @__PURE__ */ J(V, { className: "h-5 w-5" })
428
- },
429
- {
430
- label: "Categories",
431
- value: "9",
432
- icon: /* @__PURE__ */ J(M, { className: "h-5 w-5" })
433
- },
434
- {
435
- label: "Happy Customers",
436
- value: "534+",
437
- icon: /* @__PURE__ */ J(W, { className: "h-5 w-5" })
438
- },
439
- {
440
- label: "Orders Completed",
441
- value: "1,247+",
442
- icon: /* @__PURE__ */ J(y, { className: "h-5 w-5" })
443
- }
444
- ];
445
- function ie() {
446
- let { navigateTo: v, currentUser: y } = e(), { t: b } = p(), [x, C] = f(""), { providers: w, orders: T, dashboardStats: E } = o(), D = u((e, t) => {
447
- let n = b(e);
448
- return n === e ? t : n;
449
- }, [b]), k = y?.firstName ?? y?.name ?? "there", M = y?.role ?? "customer", N = {
450
- customer: D("adaptercloud.home.role.customer", "Customer"),
451
- cart_owner: D("adaptercloud.home.role.cartOwner", "Cart Owner"),
452
- worker: D("adaptercloud.home.role.worker", "Worker"),
453
- investor: D("adaptercloud.home.role.investor", "Investor"),
454
- admin: D("adaptercloud.home.role.admin", "Administrator")
455
- }, F = {
456
- customer: D("adaptercloud.home.greeting.customer", "Discover amazing services near you"),
457
- cart_owner: D("adaptercloud.home.greeting.cartOwner", "Manage your business and grow"),
458
- worker: D("adaptercloud.home.greeting.worker", "Check your tasks and earnings"),
459
- investor: D("adaptercloud.home.greeting.investor", "Track your investments and returns"),
460
- admin: D("adaptercloud.home.greeting.admin", "Monitor and manage the platform")
461
- }, I = Q[M] ?? Q.customer, L = $(M, T.data ?? [], E.data), R = d(() => {
462
- let e = (w.data ?? []).filter((e) => e.isOpen);
463
- if (x) {
464
- let t = x.toLowerCase();
465
- e = e.filter((e) => e.name.toLowerCase().includes(t) || e.category.toLowerCase().includes(t));
466
- }
467
- return e.sort((e, t) => t.rating - e.rating).slice(0, 6);
468
- }, [w.data, x]), V = d(() => [...T.data ?? []].sort((e, t) => new Date(t.orderDate).getTime() - new Date(e.orderDate).getTime()).slice(0, 3), [T.data]), H = {
469
- order: "text-accent-blue",
470
- review: "text-status-warning-text",
471
- investment: "text-status-success-text",
472
- cart: "text-accent-purple"
473
- }, U = (T.data ?? []).length === 0 && !T.isLoading, W = w.isLoading || T.isLoading || E.isLoading, G = w.isError || T.isError || E.isError;
474
- return W ? /* @__PURE__ */ J(n, {
475
- title: D("adaptercloud.common.loading", "Loading..."),
476
- children: /* @__PURE__ */ J("div", {
477
- className: "flex h-[60vh] items-center justify-center",
478
- children: /* @__PURE__ */ J(A, { className: "h-8 w-8 animate-spin text-primary" })
479
- })
480
- }) : G ? /* @__PURE__ */ J(n, {
481
- title: D("adaptercloud.common.error", "Error"),
482
- children: /* @__PURE__ */ Y("div", {
483
- className: "flex h-[60vh] flex-col items-center justify-center gap-4",
484
- children: [
485
- /* @__PURE__ */ J(h, { className: "h-12 w-12 text-status-error-text" }),
486
- /* @__PURE__ */ J("h2", {
487
- className: "text-xl font-semibold",
488
- children: D("adaptercloud.common.errorLoading", "Error loading data")
489
- }),
490
- /* @__PURE__ */ J("p", {
491
- className: "text-text-secondary",
492
- children: D("adaptercloud.common.tryAgain", "Please try again later.")
493
- })
494
- ]
495
- })
496
- }) : /* @__PURE__ */ Y(n, {
497
- hero: !0,
498
- title: /* @__PURE__ */ Y(q, { children: [
499
- D("adaptercloud.home.hello", "Hello"),
500
- ",",
501
- " ",
502
- /* @__PURE__ */ J(Z, { children: k }),
503
- "!"
504
- ] }),
505
- description: F[M],
506
- purpose: D("adaptercloud.home.purpose", "Your starting point on AdapterCloud — the local services marketplace. Discover carts near you, jump back into recent orders, and reach the tools for your role, all from one home screen."),
507
- children: [
508
- U && /* @__PURE__ */ J(X, {
509
- treatment: "plain",
510
- className: "mb-6 p-6",
511
- children: /* @__PURE__ */ Y("div", {
512
- className: "flex items-start gap-4",
513
- children: [/* @__PURE__ */ J("div", {
514
- className: "flex h-12 w-12 shrink-0 items-center justify-center rounded-full bg-action-primary-bg/10",
515
- children: /* @__PURE__ */ J(z, { className: "h-6 w-6 text-primary" })
516
- }), /* @__PURE__ */ Y("div", {
517
- className: "flex-1",
518
- children: [
519
- /* @__PURE__ */ J("h2", {
520
- className: "text-lg font-semibold text-text-primary",
521
- children: D("adaptercloud.home.welcomeTitle", "Welcome to AdapterCloud!")
522
- }),
523
- /* @__PURE__ */ J("p", {
524
- className: "mt-1 text-sm text-text-secondary",
525
- children: D("adaptercloud.home.welcomeDescription", "Your local services marketplace. Start by exploring service providers near you or browse categories to find what you need.")
526
- }),
527
- /* @__PURE__ */ Y("button", {
528
- type: "button",
529
- onClick: () => v("/customer/carts"),
530
- className: "mt-3 inline-flex items-center gap-1.5 rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors",
531
- children: [/* @__PURE__ */ J(P, { className: "h-4 w-4" }), D("adaptercloud.home.exploreServices", "Explore Services")]
532
- })
533
- ]
534
- })]
535
- })
536
- }),
537
- /* @__PURE__ */ J(X, {
538
- treatment: "glass",
539
- className: "mb-6 p-6",
540
- children: /* @__PURE__ */ Y("div", {
541
- className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
542
- children: [/* @__PURE__ */ Y("div", { children: [
543
- /* @__PURE__ */ J("div", {
544
- className: "flex items-center gap-2 mb-1",
545
- children: /* @__PURE__ */ Y("span", {
546
- className: "inline-flex items-center rounded-full bg-action-primary-bg/10 px-2.5 py-0.5 text-xs font-medium text-primary",
547
- children: [/* @__PURE__ */ J(_, { className: "mr-1 h-3 w-3" }), N[M]]
548
- })
549
- }),
550
- /* @__PURE__ */ Y("h2", {
551
- className: "text-xl font-bold text-text-primary",
552
- children: [
553
- D("adaptercloud.home.good", "Good"),
554
- " ",
555
- (/* @__PURE__ */ new Date()).getHours() < 12 ? D("adaptercloud.home.time.morning", "morning") : (/* @__PURE__ */ new Date()).getHours() < 17 ? D("adaptercloud.home.time.afternoon", "afternoon") : D("adaptercloud.home.time.evening", "evening"),
556
- ", ",
557
- k
558
- ]
559
- }),
560
- /* @__PURE__ */ J("p", {
561
- className: "mt-1 text-sm text-text-secondary",
562
- children: F[M]
563
- })
564
- ] }), /* @__PURE__ */ Y("div", {
565
- className: "relative w-full sm:w-72",
566
- children: [/* @__PURE__ */ J(P, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-secondary" }), /* @__PURE__ */ J("input", {
567
- type: "text",
568
- placeholder: D("adaptercloud.home.searchPlaceholder", "Search services, carts..."),
569
- value: x,
570
- onChange: (e) => C(e.target.value),
571
- className: "w-full rounded-lg border border-border-subtle bg-bg-surface py-2.5 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)]"
572
- })]
573
- })]
574
- })
575
- }),
576
- /* @__PURE__ */ Y("section", {
577
- className: "mb-8",
578
- children: [/* @__PURE__ */ J("h2", {
579
- className: "text-lg font-semibold text-text-primary mb-4",
580
- children: D("adaptercloud.home.quickStats", "Quick Stats")
581
- }), /* @__PURE__ */ J("div", {
582
- className: "grid grid-cols-2 gap-4 lg:grid-cols-4",
583
- children: L.map((e, t) => /* @__PURE__ */ J(r, {
584
- featured: t === 0,
585
- icon: e.icon,
586
- value: e.value,
587
- label: e.label,
588
- trend: e.trend,
589
- trendValue: e.trendValue
590
- }, e.label))
591
- })]
592
- }),
593
- /* @__PURE__ */ Y("section", {
594
- className: "mb-8",
595
- children: [/* @__PURE__ */ J("h2", {
596
- className: "text-lg font-semibold text-text-primary mb-4",
597
- children: D("adaptercloud.home.quickActions", "Quick Actions")
598
- }), /* @__PURE__ */ J("div", {
599
- className: "grid grid-cols-2 gap-4 lg:grid-cols-4",
600
- children: I.map((e) => /* @__PURE__ */ Y("button", {
601
- type: "button",
602
- onClick: () => v(e.path),
603
- className: t("flex items-start gap-3 rounded-lg border border-border-seam bg-bg-surface p-4 text-left transition-all bg-gloss-card shadow-pop", "hover:border-accent-foreground/20 hover:shadow-md"),
604
- children: [
605
- /* @__PURE__ */ J("div", {
606
- className: t("flex h-10 w-10 shrink-0 items-center justify-center rounded-lg", e.color),
607
- children: e.icon
608
- }),
609
- /* @__PURE__ */ Y("div", {
610
- className: "min-w-0 flex-1",
611
- children: [/* @__PURE__ */ J("p", {
612
- className: "text-sm font-semibold text-text-primary",
613
- children: e.label
614
- }), /* @__PURE__ */ J("p", {
615
- className: "mt-0.5 text-xs text-text-secondary",
616
- children: e.description
617
- })]
618
- }),
619
- /* @__PURE__ */ J(g, { className: "h-4 w-4 text-text-secondary shrink-0 mt-1" })
620
- ]
621
- }, e.label))
622
- })]
623
- }),
624
- /* @__PURE__ */ Y("section", {
625
- className: "mb-8",
626
- children: [/* @__PURE__ */ Y("div", {
627
- className: "flex items-center justify-between mb-4",
628
- children: [/* @__PURE__ */ J("h2", {
629
- className: "text-lg font-semibold text-text-primary",
630
- children: x ? D("adaptercloud.home.searchResults", "Search Results") : D("adaptercloud.home.featuredCarts", "Featured Carts")
631
- }), /* @__PURE__ */ Y("button", {
632
- type: "button",
633
- onClick: () => v("/customer/carts"),
634
- className: "flex items-center gap-1 text-sm font-medium text-primary hover:underline",
635
- children: [
636
- D("adaptercloud.common.viewAll", "View All"),
637
- " ",
638
- /* @__PURE__ */ J(g, { className: "h-3.5 w-3.5" })
639
- ]
640
- })]
641
- }), R.length === 0 ? /* @__PURE__ */ J(a, {
642
- illustration: "empty-data",
643
- icon: /* @__PURE__ */ J(P, { className: "h-10 w-10" }),
644
- title: D("adaptercloud.home.noCartsFound", "No carts found"),
645
- description: D("adaptercloud.home.noCartsDescription", "Try adjusting your search or browse all categories"),
646
- action: /* @__PURE__ */ J("button", {
647
- type: "button",
648
- onClick: () => C(""),
649
- className: "rounded-lg border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
650
- children: D("adaptercloud.home.clearSearch", "Clear Search")
651
- })
652
- }) : /* @__PURE__ */ J("div", {
653
- className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",
654
- children: R.map((e) => /* @__PURE__ */ Y("div", {
655
- role: "button",
656
- tabIndex: 0,
657
- onClick: () => v(`/customer/cart/${e.id}`),
658
- onKeyDown: (t) => {
659
- (t.key === "Enter" || t.key === " ") && (t.preventDefault(), v(`/customer/cart/${e.id}`));
660
- },
661
- className: "rounded-lg border border-border-subtle bg-bg-surface shadow-sm overflow-hidden transition-all hover:shadow-md hover:border-accent-foreground/20 cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]",
662
- children: [/* @__PURE__ */ Y("div", {
663
- className: "relative h-40 bg-bg-sunken",
664
- children: [
665
- /* @__PURE__ */ J("img", {
666
- src: e.image,
667
- alt: e.name,
668
- className: "h-full w-full object-cover",
669
- loading: "lazy"
670
- }),
671
- /* @__PURE__ */ J("div", {
672
- className: "absolute top-2 right-2",
673
- children: /* @__PURE__ */ J(i, { status: e.isOpen ? "open" : "closed" })
674
- }),
675
- e.isVerified && /* @__PURE__ */ J("div", {
676
- className: "absolute top-2 left-2",
677
- children: /* @__PURE__ */ Y("span", {
678
- className: "inline-flex items-center gap-1 rounded-full bg-accent-blue-subtle/90 px-2 py-0.5 text-xs font-medium text-white backdrop-blur-sm",
679
- children: [
680
- /* @__PURE__ */ J(_, { className: "h-3 w-3" }),
681
- " ",
682
- D("adaptercloud.home.verified", "Verified")
683
- ]
684
- })
685
- }),
686
- /* @__PURE__ */ J("div", {
687
- className: "absolute bottom-2 right-2",
688
- children: /* @__PURE__ */ Y("span", {
689
- className: "inline-flex items-center gap-1 rounded-full bg-black/60 px-2 py-0.5 text-xs text-white backdrop-blur-sm",
690
- children: [
691
- /* @__PURE__ */ J(S, { className: "h-3 w-3" }),
692
- " ",
693
- e.estimatedTime,
694
- " min"
695
- ]
696
- })
697
- })
698
- ]
699
- }), /* @__PURE__ */ Y("div", {
700
- className: "p-4",
701
- children: [
702
- /* @__PURE__ */ Y("div", {
703
- className: "flex items-start justify-between",
704
- children: [/* @__PURE__ */ Y("div", {
705
- className: "min-w-0 flex-1",
706
- children: [/* @__PURE__ */ J("h3", {
707
- className: "text-base font-semibold text-text-primary truncate",
708
- children: e.name
709
- }), /* @__PURE__ */ J("p", {
710
- className: "mt-0.5 text-sm text-text-secondary",
711
- children: e.category
712
- })]
713
- }), /* @__PURE__ */ Y("div", {
714
- className: "flex items-center gap-1 rounded bg-status-success-bg-subtle px-1.5 py-0.5 ml-2 shrink-0",
715
- children: [/* @__PURE__ */ J(B, { className: "h-3 w-3 fill-white text-white" }), /* @__PURE__ */ J("span", {
716
- className: "text-xs font-bold text-white",
717
- children: e.rating
718
- })]
719
- })]
720
- }),
721
- /* @__PURE__ */ Y("div", {
722
- className: "mt-3 flex items-center gap-4 text-xs text-text-secondary",
723
- children: [
724
- /* @__PURE__ */ Y("span", {
725
- className: "flex items-center gap-1",
726
- children: [
727
- /* @__PURE__ */ J(j, { className: "h-3 w-3" }),
728
- " ",
729
- c(e.distance)
730
- ]
731
- }),
732
- /* @__PURE__ */ Y("span", {
733
- className: "flex items-center gap-1",
734
- children: [
735
- /* @__PURE__ */ J(B, { className: "h-3 w-3" }),
736
- " ",
737
- e.totalRatings,
738
- " ",
739
- D("adaptercloud.home.reviews", "reviews")
740
- ]
741
- }),
742
- e.averageOrderValue && /* @__PURE__ */ Y("span", {
743
- className: "flex items-center gap-1",
744
- children: [
745
- /* @__PURE__ */ J(O, { className: "h-3 w-3" }),
746
- " ",
747
- D("adaptercloud.home.average", "Avg."),
748
- " ",
749
- s(e.averageOrderValue, { minimumFractionDigits: 0 })
750
- ]
751
- })
752
- ]
753
- }),
754
- e.serviceTypes && e.serviceTypes.length > 0 && /* @__PURE__ */ J("div", {
755
- className: "mt-3 flex flex-wrap gap-1.5",
756
- children: e.serviceTypes.slice(0, 3).map((e) => /* @__PURE__ */ J("span", {
757
- className: "inline-flex items-center rounded-full bg-bg-sunken px-2 py-0.5 text-xs text-text-secondary",
758
- children: e.replace(/_/g, " ")
759
- }, e))
760
- })
761
- ]
762
- })]
763
- }, e.id))
764
- })]
765
- }),
766
- V.length > 0 && /* @__PURE__ */ Y("section", {
767
- className: "mb-8",
768
- children: [/* @__PURE__ */ Y("div", {
769
- className: "flex items-center justify-between mb-4",
770
- children: [/* @__PURE__ */ J("h2", {
771
- className: "text-lg font-semibold text-text-primary",
772
- children: D("adaptercloud.home.recentOrders", "Recent Orders")
773
- }), /* @__PURE__ */ Y("button", {
774
- type: "button",
775
- onClick: () => v("/customer/orders"),
776
- className: "flex items-center gap-1 text-sm font-medium text-primary hover:underline",
777
- children: [
778
- D("adaptercloud.common.viewAll", "View All"),
779
- " ",
780
- /* @__PURE__ */ J(g, { className: "h-3.5 w-3.5" })
781
- ]
782
- })]
783
- }), /* @__PURE__ */ J("div", {
784
- className: "rounded-lg border border-border-subtle bg-bg-surface divide-y divide-border",
785
- children: V.map((e) => /* @__PURE__ */ Y("div", {
786
- role: "button",
787
- tabIndex: 0,
788
- onClick: () => v(`/customer/order/${e.id}`),
789
- onKeyDown: (t) => {
790
- (t.key === "Enter" || t.key === " ") && (t.preventDefault(), v(`/customer/order/${e.id}`));
791
- },
792
- className: "flex items-center gap-4 px-4 py-3 hover:bg-accent/50 transition-colors cursor-pointer",
793
- children: [
794
- /* @__PURE__ */ J("img", {
795
- src: e.cartImage,
796
- alt: e.cartName,
797
- className: "h-12 w-12 rounded-lg object-cover shrink-0"
798
- }),
799
- /* @__PURE__ */ Y("div", {
800
- className: "flex-1 min-w-0",
801
- children: [/* @__PURE__ */ Y("div", {
802
- className: "flex items-center gap-2",
803
- children: [/* @__PURE__ */ J("p", {
804
- className: "text-sm font-medium text-text-primary truncate",
805
- children: e.cartName
806
- }), /* @__PURE__ */ J(i, { status: e.status })]
807
- }), /* @__PURE__ */ J("p", {
808
- className: "text-xs text-text-secondary mt-0.5",
809
- children: e.items.map((e) => e.name).join(", ")
810
- })]
811
- }),
812
- /* @__PURE__ */ Y("div", {
813
- className: "text-right shrink-0",
814
- children: [/* @__PURE__ */ J("p", {
815
- className: "text-sm font-semibold text-text-primary",
816
- children: s(e.total, { minimumFractionDigits: 0 })
817
- }), /* @__PURE__ */ J("p", {
818
- className: "text-xs text-text-secondary",
819
- children: l(e.orderDate)
820
- })]
821
- })
822
- ]
823
- }, e.id))
824
- })]
825
- }),
826
- /* @__PURE__ */ Y("section", {
827
- className: "mb-8",
828
- children: [/* @__PURE__ */ J("h2", {
829
- className: "text-lg font-semibold text-text-primary mb-4",
830
- children: D("adaptercloud.home.howItWorks", "How It Works")
831
- }), /* @__PURE__ */ J("div", {
832
- className: "grid grid-cols-2 gap-4 lg:grid-cols-4",
833
- children: te.map((e) => /* @__PURE__ */ Y("div", {
834
- className: "relative rounded-lg border border-border-seam bg-bg-surface p-5 text-center bg-gloss-card shadow-pop",
835
- children: [
836
- /* @__PURE__ */ J("div", {
837
- className: "absolute -top-3 left-1/2 -translate-x-1/2",
838
- children: /* @__PURE__ */ J("span", {
839
- className: "inline-flex h-6 w-6 items-center justify-center rounded-full bg-action-primary-bg text-xs font-bold text-action-primary-text",
840
- children: e.step
841
- })
842
- }),
843
- /* @__PURE__ */ J("div", {
844
- className: "mt-2 flex justify-center text-text-secondary mb-3",
845
- children: e.icon
846
- }),
847
- /* @__PURE__ */ J("h3", {
848
- className: "text-sm font-semibold text-text-primary",
849
- children: e.title
850
- }),
851
- /* @__PURE__ */ J("p", {
852
- className: "mt-1 text-xs text-text-secondary",
853
- children: e.description
854
- })
855
- ]
856
- }, e.step))
857
- })]
858
- }),
859
- /* @__PURE__ */ Y("section", {
860
- className: "mb-8",
861
- children: [/* @__PURE__ */ J("h2", {
862
- className: "text-lg font-semibold text-text-primary mb-4",
863
- children: D("adaptercloud.home.browseByCategory", "Browse by Category")
864
- }), /* @__PURE__ */ J("div", {
865
- className: "grid grid-cols-3 gap-3 sm:grid-cols-4 lg:grid-cols-5",
866
- children: ee.map((e) => /* @__PURE__ */ Y("button", {
867
- type: "button",
868
- onClick: () => v(`/customer/carts?category=${encodeURIComponent(e.label)}`),
869
- className: "flex flex-col items-center gap-2 rounded-lg border border-border-seam bg-bg-surface p-4 text-center hover:shadow-sm hover:border-accent-foreground/20 transition-all bg-gloss-card shadow-pop",
870
- children: [/* @__PURE__ */ J("div", {
871
- className: t("flex h-12 w-12 items-center justify-center rounded-full", e.color),
872
- children: e.icon
873
- }), /* @__PURE__ */ J("span", {
874
- className: "text-xs font-medium text-text-primary leading-tight",
875
- children: e.label
876
- })]
877
- }, e.label))
878
- })]
879
- }),
880
- /* @__PURE__ */ Y("section", {
881
- className: "mb-8",
882
- children: [/* @__PURE__ */ J("h2", {
883
- className: "text-lg font-semibold text-text-primary mb-4",
884
- children: D("adaptercloud.home.platformStats", "Platform Stats")
885
- }), /* @__PURE__ */ J("div", {
886
- className: "grid grid-cols-2 gap-4 lg:grid-cols-4",
887
- children: re.map((e) => /* @__PURE__ */ Y("div", {
888
- className: "flex items-center gap-3 rounded-lg border border-border-seam bg-bg-surface p-4 bg-gloss-card shadow-pop",
889
- children: [/* @__PURE__ */ J("div", {
890
- className: "flex h-10 w-10 items-center justify-center rounded-full bg-action-primary-bg/10 text-primary shrink-0",
891
- children: e.icon
892
- }), /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
893
- className: "text-lg font-bold text-text-primary",
894
- children: e.value
895
- }), /* @__PURE__ */ J("p", {
896
- className: "text-xs text-text-secondary",
897
- children: e.label
898
- })] })]
899
- }, e.label))
900
- })]
901
- }),
902
- /* @__PURE__ */ Y("section", { children: [/* @__PURE__ */ J("h2", {
903
- className: "text-lg font-semibold text-text-primary mb-4",
904
- children: D("adaptercloud.home.recentActivity", "Recent Activity")
905
- }), /* @__PURE__ */ J("div", {
906
- className: "rounded-lg border border-border-subtle bg-bg-surface divide-y divide-border",
907
- children: ne.map((e) => /* @__PURE__ */ Y("div", {
908
- className: "flex items-center gap-3 px-4 py-3",
909
- children: [
910
- /* @__PURE__ */ J("div", {
911
- className: "flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-bg-sunken",
912
- children: /* @__PURE__ */ J(m, { className: t("h-4 w-4", H[e.type] ?? "text-text-secondary") })
913
- }),
914
- /* @__PURE__ */ J("div", {
915
- className: "flex-1 min-w-0",
916
- children: /* @__PURE__ */ J("p", {
917
- className: "text-sm text-text-primary truncate",
918
- children: e.description
919
- })
920
- }),
921
- /* @__PURE__ */ J("span", {
922
- className: "text-xs text-text-secondary whitespace-nowrap",
923
- children: e.time
924
- })
925
- ]
926
- }, e.id))
927
- })] })
928
- ]
929
- });
930
- }
931
- //#endregion
932
- export { ie as HomePage };
933
-
934
- //# sourceMappingURL=HomePage.js.map