@burdenoff/microfe-adaptercloud 2026.614.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 (132) hide show
  1. package/README.md +12 -0
  2. package/dist/adaptercloud/AdapterCloudRoot.js +177 -0
  3. package/dist/adaptercloud/AdapterCloudRoot.js.map +1 -0
  4. package/dist/adaptercloud/AdapterCloudRoutes.js +215 -0
  5. package/dist/adaptercloud/AdapterCloudRoutes.js.map +1 -0
  6. package/dist/adaptercloud/components/EmptyState.js +28 -0
  7. package/dist/adaptercloud/components/EmptyState.js.map +1 -0
  8. package/dist/adaptercloud/components/InvestmentCard.js +96 -0
  9. package/dist/adaptercloud/components/InvestmentCard.js.map +1 -0
  10. package/dist/adaptercloud/components/MetricsCard.js +46 -0
  11. package/dist/adaptercloud/components/MetricsCard.js.map +1 -0
  12. package/dist/adaptercloud/components/PageLayout.js +26 -0
  13. package/dist/adaptercloud/components/PageLayout.js.map +1 -0
  14. package/dist/adaptercloud/components/RatingDisplay.js +35 -0
  15. package/dist/adaptercloud/components/RatingDisplay.js.map +1 -0
  16. package/dist/adaptercloud/components/StatusBadge.js +45 -0
  17. package/dist/adaptercloud/components/StatusBadge.js.map +1 -0
  18. package/dist/adaptercloud/context/AdapterCloudContext.js +93 -0
  19. package/dist/adaptercloud/context/AdapterCloudContext.js.map +1 -0
  20. package/dist/adaptercloud/context/index.js +1 -0
  21. package/dist/adaptercloud/hooks/useAdapterCloudApi.js +223 -0
  22. package/dist/adaptercloud/hooks/useAdapterCloudApi.js.map +1 -0
  23. package/dist/adaptercloud/index.js +7 -0
  24. package/dist/adaptercloud/mocks/data.js +1517 -0
  25. package/dist/adaptercloud/mocks/data.js.map +1 -0
  26. package/dist/adaptercloud/mocks/users.js +34 -0
  27. package/dist/adaptercloud/mocks/users.js.map +1 -0
  28. package/dist/adaptercloud/pages/HomePage.js +921 -0
  29. package/dist/adaptercloud/pages/HomePage.js.map +1 -0
  30. package/dist/adaptercloud/pages/admin/AdminAnalyticsPage.js +645 -0
  31. package/dist/adaptercloud/pages/admin/AdminAnalyticsPage.js.map +1 -0
  32. package/dist/adaptercloud/pages/admin/AdminDashboard.js +639 -0
  33. package/dist/adaptercloud/pages/admin/AdminDashboard.js.map +1 -0
  34. package/dist/adaptercloud/pages/admin/AdminFinancialPage.js +421 -0
  35. package/dist/adaptercloud/pages/admin/AdminFinancialPage.js.map +1 -0
  36. package/dist/adaptercloud/pages/admin/AdminOrdersPage.js +660 -0
  37. package/dist/adaptercloud/pages/admin/AdminOrdersPage.js.map +1 -0
  38. package/dist/adaptercloud/pages/admin/AdminProfilePage.js +259 -0
  39. package/dist/adaptercloud/pages/admin/AdminProfilePage.js.map +1 -0
  40. package/dist/adaptercloud/pages/admin/AdminSettingsPage.js +649 -0
  41. package/dist/adaptercloud/pages/admin/AdminSettingsPage.js.map +1 -0
  42. package/dist/adaptercloud/pages/admin/CartManagementPage.js +869 -0
  43. package/dist/adaptercloud/pages/admin/CartManagementPage.js.map +1 -0
  44. package/dist/adaptercloud/pages/admin/UserManagementPage.js +893 -0
  45. package/dist/adaptercloud/pages/admin/UserManagementPage.js.map +1 -0
  46. package/dist/adaptercloud/pages/cart-owner/AnalyticsDashboard.js +834 -0
  47. package/dist/adaptercloud/pages/cart-owner/AnalyticsDashboard.js.map +1 -0
  48. package/dist/adaptercloud/pages/cart-owner/BusinessSettingsPage.js +700 -0
  49. package/dist/adaptercloud/pages/cart-owner/BusinessSettingsPage.js.map +1 -0
  50. package/dist/adaptercloud/pages/cart-owner/CartOwnerDashboard.js +760 -0
  51. package/dist/adaptercloud/pages/cart-owner/CartOwnerDashboard.js.map +1 -0
  52. package/dist/adaptercloud/pages/cart-owner/CartOwnerProfilePage.js +886 -0
  53. package/dist/adaptercloud/pages/cart-owner/CartOwnerProfilePage.js.map +1 -0
  54. package/dist/adaptercloud/pages/cart-owner/CartServiceConfigPage.js +631 -0
  55. package/dist/adaptercloud/pages/cart-owner/CartServiceConfigPage.js.map +1 -0
  56. package/dist/adaptercloud/pages/cart-owner/InventoryManagementPage.js +913 -0
  57. package/dist/adaptercloud/pages/cart-owner/InventoryManagementPage.js.map +1 -0
  58. package/dist/adaptercloud/pages/cart-owner/OrderManagementPage.js +881 -0
  59. package/dist/adaptercloud/pages/cart-owner/OrderManagementPage.js.map +1 -0
  60. package/dist/adaptercloud/pages/cart-owner/StaffManagementPage.js +833 -0
  61. package/dist/adaptercloud/pages/cart-owner/StaffManagementPage.js.map +1 -0
  62. package/dist/adaptercloud/pages/common/HelpSupportPage.js +1325 -0
  63. package/dist/adaptercloud/pages/common/HelpSupportPage.js.map +1 -0
  64. package/dist/adaptercloud/pages/common/NotificationCenterPage.js +665 -0
  65. package/dist/adaptercloud/pages/common/NotificationCenterPage.js.map +1 -0
  66. package/dist/adaptercloud/pages/common/SettingsPage.js +964 -0
  67. package/dist/adaptercloud/pages/common/SettingsPage.js.map +1 -0
  68. package/dist/adaptercloud/pages/customer/BookingDetailsPage.js +593 -0
  69. package/dist/adaptercloud/pages/customer/BookingDetailsPage.js.map +1 -0
  70. package/dist/adaptercloud/pages/customer/CartDetailPage.js +620 -0
  71. package/dist/adaptercloud/pages/customer/CartDetailPage.js.map +1 -0
  72. package/dist/adaptercloud/pages/customer/CartDiscoveryPage.js +547 -0
  73. package/dist/adaptercloud/pages/customer/CartDiscoveryPage.js.map +1 -0
  74. package/dist/adaptercloud/pages/customer/CheckoutPage.js +532 -0
  75. package/dist/adaptercloud/pages/customer/CheckoutPage.js.map +1 -0
  76. package/dist/adaptercloud/pages/customer/CustomerDashboard.js +496 -0
  77. package/dist/adaptercloud/pages/customer/CustomerDashboard.js.map +1 -0
  78. package/dist/adaptercloud/pages/customer/CustomerProfilePage.js +621 -0
  79. package/dist/adaptercloud/pages/customer/CustomerProfilePage.js.map +1 -0
  80. package/dist/adaptercloud/pages/customer/DirectServiceBookingPage.js +623 -0
  81. package/dist/adaptercloud/pages/customer/DirectServiceBookingPage.js.map +1 -0
  82. package/dist/adaptercloud/pages/customer/FavoritesPage.js +477 -0
  83. package/dist/adaptercloud/pages/customer/FavoritesPage.js.map +1 -0
  84. package/dist/adaptercloud/pages/customer/OrderHistoryPage.js +438 -0
  85. package/dist/adaptercloud/pages/customer/OrderHistoryPage.js.map +1 -0
  86. package/dist/adaptercloud/pages/customer/OrderTrackingPage.js +388 -0
  87. package/dist/adaptercloud/pages/customer/OrderTrackingPage.js.map +1 -0
  88. package/dist/adaptercloud/pages/customer/PaymentMethodsPage.js +488 -0
  89. package/dist/adaptercloud/pages/customer/PaymentMethodsPage.js.map +1 -0
  90. package/dist/adaptercloud/pages/customer/ReviewsPage.js +606 -0
  91. package/dist/adaptercloud/pages/customer/ReviewsPage.js.map +1 -0
  92. package/dist/adaptercloud/pages/customer/SavedAddressesPage.js +443 -0
  93. package/dist/adaptercloud/pages/customer/SavedAddressesPage.js.map +1 -0
  94. package/dist/adaptercloud/pages/investor/InvestmentDetailsPage.js +849 -0
  95. package/dist/adaptercloud/pages/investor/InvestmentDetailsPage.js.map +1 -0
  96. package/dist/adaptercloud/pages/investor/InvestmentOpportunitiesPage.js +939 -0
  97. package/dist/adaptercloud/pages/investor/InvestmentOpportunitiesPage.js.map +1 -0
  98. package/dist/adaptercloud/pages/investor/InvestorAnalyticsPage.js +681 -0
  99. package/dist/adaptercloud/pages/investor/InvestorAnalyticsPage.js.map +1 -0
  100. package/dist/adaptercloud/pages/investor/InvestorDashboard.js +419 -0
  101. package/dist/adaptercloud/pages/investor/InvestorDashboard.js.map +1 -0
  102. package/dist/adaptercloud/pages/investor/InvestorInvestmentsPage.js +399 -0
  103. package/dist/adaptercloud/pages/investor/InvestorInvestmentsPage.js.map +1 -0
  104. package/dist/adaptercloud/pages/investor/InvestorPortfolioPage.js +569 -0
  105. package/dist/adaptercloud/pages/investor/InvestorPortfolioPage.js.map +1 -0
  106. package/dist/adaptercloud/pages/investor/InvestorProfilePage.js +1065 -0
  107. package/dist/adaptercloud/pages/investor/InvestorProfilePage.js.map +1 -0
  108. package/dist/adaptercloud/pages/worker/TaskDetailsPage.js +496 -0
  109. package/dist/adaptercloud/pages/worker/TaskDetailsPage.js.map +1 -0
  110. package/dist/adaptercloud/pages/worker/WorkerDashboard.js +634 -0
  111. package/dist/adaptercloud/pages/worker/WorkerDashboard.js.map +1 -0
  112. package/dist/adaptercloud/pages/worker/WorkerOrdersPage.js +675 -0
  113. package/dist/adaptercloud/pages/worker/WorkerOrdersPage.js.map +1 -0
  114. package/dist/adaptercloud/pages/worker/WorkerProfilePage.js +687 -0
  115. package/dist/adaptercloud/pages/worker/WorkerProfilePage.js.map +1 -0
  116. package/dist/adaptercloud/pages/worker/WorkerSchedulePage.js +578 -0
  117. package/dist/adaptercloud/pages/worker/WorkerSchedulePage.js.map +1 -0
  118. package/dist/adaptercloud/store/adaptercloudStore.js +38 -0
  119. package/dist/adaptercloud/store/adaptercloudStore.js.map +1 -0
  120. package/dist/adaptercloud/store/index.js +1 -0
  121. package/dist/adaptercloud/utils/cn.js +10 -0
  122. package/dist/adaptercloud/utils/cn.js.map +1 -0
  123. package/dist/adaptercloud/utils/formatters.js +51 -0
  124. package/dist/adaptercloud/utils/formatters.js.map +1 -0
  125. package/dist/adaptercloud/utils/navigation.js +9 -0
  126. package/dist/adaptercloud/utils/navigation.js.map +1 -0
  127. package/dist/index.js +7 -0
  128. package/dist/node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.js +18 -0
  129. package/dist/node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.js.map +1 -0
  130. package/dist/node_modules/.bun/tailwind-merge@3.5.0/node_modules/tailwind-merge/dist/bundle-mjs.js +1674 -0
  131. package/dist/node_modules/.bun/tailwind-merge@3.5.0/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -0
  132. package/package.json +106 -0
@@ -0,0 +1,869 @@
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 { formatCurrency as r } from "../../utils/formatters.js";
5
+ import { useCallback as i, useEffect as a, useState as o } from "react";
6
+ import { CheckCircle2 as s, ClipboardCheck as c, Eye as l, Loader2 as u, Pause as d, Search as f, Star as p, Store as m, X as h, XCircle as g } from "lucide-react";
7
+ import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
8
+ //#region src/adaptercloud/pages/admin/CartManagementPage.tsx
9
+ var b = [
10
+ {
11
+ id: "cart-001",
12
+ name: "South Indian Express",
13
+ description: "Authentic South Indian breakfast and snacks",
14
+ category: "Food & Beverage",
15
+ image: "https://images.unsplash.com/photo-1567620905732-2d1ec7ab7445?w=200",
16
+ ownerName: "Rajesh Kumar",
17
+ ownerEmail: "rajesh@gmail.com",
18
+ ownerPhone: "+91 98765 43210",
19
+ address: "MG Road, Bangalore",
20
+ city: "Bangalore",
21
+ isActive: !0,
22
+ isVerified: !0,
23
+ rating: 4.8,
24
+ reviewCount: 342,
25
+ monthlyRevenue: 185e3,
26
+ monthlyOrders: 1250,
27
+ complianceScore: 95,
28
+ documentsSubmitted: 8,
29
+ documentsRequired: 8,
30
+ inspectionStatus: "completed",
31
+ inspectionDate: "2023-07-01T10:00:00Z",
32
+ applicationDate: "2023-06-15T09:30:00Z",
33
+ licenseNumber: "BBMP/2023/001234"
34
+ },
35
+ {
36
+ id: "cart-002",
37
+ name: "Fresh Juice Corner",
38
+ description: "Fresh fruit juices and smoothies",
39
+ category: "Beverages",
40
+ image: "https://images.unsplash.com/photo-1600271886742-f049cd451bba?w=200",
41
+ ownerName: "Priya Sharma",
42
+ ownerEmail: "priya@gmail.com",
43
+ ownerPhone: "+91 98765 43211",
44
+ address: "Koramangala, Bangalore",
45
+ city: "Bangalore",
46
+ isActive: !1,
47
+ isVerified: !1,
48
+ rating: 0,
49
+ reviewCount: 0,
50
+ monthlyRevenue: 0,
51
+ monthlyOrders: 0,
52
+ complianceScore: 78,
53
+ documentsSubmitted: 6,
54
+ documentsRequired: 8,
55
+ inspectionStatus: "pending",
56
+ applicationDate: "2024-06-20T11:15:00Z"
57
+ },
58
+ {
59
+ id: "cart-003",
60
+ name: "Street Chaat Masters",
61
+ description: "Authentic Indian street food and chaat",
62
+ category: "Street Food",
63
+ image: "https://images.unsplash.com/photo-1601050690597-df0568f70950?w=200",
64
+ ownerName: "Amit Patel",
65
+ ownerEmail: "amit@gmail.com",
66
+ ownerPhone: "+91 98765 43212",
67
+ address: "Brigade Road, Bangalore",
68
+ city: "Bangalore",
69
+ isActive: !1,
70
+ isVerified: !1,
71
+ rating: 4.2,
72
+ reviewCount: 89,
73
+ monthlyRevenue: 45e3,
74
+ monthlyOrders: 450,
75
+ complianceScore: 65,
76
+ documentsSubmitted: 5,
77
+ documentsRequired: 8,
78
+ inspectionStatus: "failed",
79
+ inspectionDate: "2024-06-15T11:00:00Z",
80
+ applicationDate: "2024-05-10T14:20:00Z",
81
+ rejectionReason: "Hygiene standards not met, missing food safety certification"
82
+ }
83
+ ];
84
+ function x() {
85
+ let { navigateTo: x } = e(), [S, C] = o([]), [w, T] = o(!0), [E, D] = o(null), [O, k] = o(!1), [A, j] = o("view"), [M, N] = o(""), [P, F] = o({
86
+ searchQuery: "",
87
+ status: "",
88
+ verificationStatus: "",
89
+ category: "",
90
+ location: "",
91
+ sortBy: "recent"
92
+ }), [I] = o({
93
+ totalCarts: 156,
94
+ activeCarts: 134,
95
+ pendingApproval: 18,
96
+ rejectedCarts: 4,
97
+ totalRevenue: 125e5,
98
+ averageRating: 4.6,
99
+ complianceRate: 89,
100
+ newApplications: 8
101
+ }), L = i(() => {
102
+ T(!0), setTimeout(() => {
103
+ let e = [...b];
104
+ if (P.searchQuery) {
105
+ let t = P.searchQuery.toLowerCase();
106
+ e = e.filter((e) => e.name.toLowerCase().includes(t) || e.ownerName.toLowerCase().includes(t) || e.description.toLowerCase().includes(t) || e.address.toLowerCase().includes(t));
107
+ }
108
+ switch (P.status && (P.status === "active" && (e = e.filter((e) => e.isActive)), P.status === "inactive" && (e = e.filter((e) => !e.isActive))), P.verificationStatus && (P.verificationStatus === "verified" && (e = e.filter((e) => e.isVerified)), P.verificationStatus === "pending" && (e = e.filter((e) => !e.isVerified && e.inspectionStatus !== "failed")), P.verificationStatus === "rejected" && (e = e.filter((e) => e.inspectionStatus === "failed"))), P.category && (e = e.filter((e) => e.category === P.category)), P.location && (e = e.filter((e) => e.city.toLowerCase().includes(P.location.toLowerCase()))), P.sortBy) {
109
+ case "name":
110
+ e.sort((e, t) => e.name.localeCompare(t.name));
111
+ break;
112
+ case "rating":
113
+ e.sort((e, t) => t.rating - e.rating);
114
+ break;
115
+ case "revenue":
116
+ e.sort((e, t) => t.monthlyRevenue - e.monthlyRevenue);
117
+ break;
118
+ case "compliance":
119
+ e.sort((e, t) => t.complianceScore - e.complianceScore);
120
+ break;
121
+ default: e.sort((e, t) => new Date(t.applicationDate).getTime() - new Date(e.applicationDate).getTime());
122
+ }
123
+ C(e), T(!1);
124
+ }, 800);
125
+ }, [P]);
126
+ a(() => {
127
+ L();
128
+ }, [L]);
129
+ let R = (e, t) => {
130
+ F((n) => ({
131
+ ...n,
132
+ [e]: t
133
+ }));
134
+ }, z = (e, t) => {
135
+ D(e), j(t), N(""), k(!0);
136
+ }, B = () => {
137
+ if (!E) return;
138
+ let e = "";
139
+ switch (A) {
140
+ case "approve":
141
+ e = `Cart "${E.name}" approved successfully`;
142
+ break;
143
+ case "reject":
144
+ if (!M.trim()) {
145
+ alert("Please provide a rejection reason");
146
+ return;
147
+ }
148
+ e = `Cart "${E.name}" rejected`;
149
+ break;
150
+ case "suspend":
151
+ e = `Cart "${E.name}" suspended`;
152
+ break;
153
+ case "inspect":
154
+ e = `Inspection scheduled for "${E.name}"`;
155
+ break;
156
+ }
157
+ alert(e), k(!1), N(""), L();
158
+ }, V = (e) => new Date(e).toLocaleDateString("en-IN", {
159
+ year: "numeric",
160
+ month: "short",
161
+ day: "numeric"
162
+ }), H = (e) => e.isVerified ? /* @__PURE__ */ v("span", {
163
+ className: "inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium bg-green-500/20 text-green-600 dark:text-green-400",
164
+ children: "Verified"
165
+ }) : e.inspectionStatus === "pending" ? /* @__PURE__ */ v("span", {
166
+ className: "inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium bg-yellow-500/20 text-yellow-600 dark:text-yellow-400",
167
+ children: "Pending Review"
168
+ }) : e.inspectionStatus === "scheduled" ? /* @__PURE__ */ v("span", {
169
+ className: "inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium bg-blue-500/20 text-blue-600 dark:text-blue-400",
170
+ children: "Inspection Scheduled"
171
+ }) : e.inspectionStatus === "failed" ? /* @__PURE__ */ v("span", {
172
+ className: "inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium bg-red-500/20 text-red-600 dark:text-red-400",
173
+ children: "Rejected"
174
+ }) : /* @__PURE__ */ v("span", {
175
+ className: "inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium bg-secondary text-secondary-foreground",
176
+ children: "Under Review"
177
+ }), U = (e) => e ? /* @__PURE__ */ v("span", {
178
+ className: "inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium bg-green-500/20 text-green-600 dark:text-green-400",
179
+ children: "Active"
180
+ }) : /* @__PURE__ */ v("span", {
181
+ className: "inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium bg-secondary text-secondary-foreground",
182
+ children: "Inactive"
183
+ }), W = (e) => /* @__PURE__ */ v("div", {
184
+ className: "w-full bg-muted rounded-full h-2",
185
+ children: /* @__PURE__ */ v("div", {
186
+ className: t("h-2 rounded-full", e >= 80 ? "bg-green-500" : e >= 60 ? "bg-yellow-500" : "bg-red-500"),
187
+ style: { width: `${e}%` }
188
+ })
189
+ });
190
+ return w ? /* @__PURE__ */ v(n, {
191
+ title: "Cart Management",
192
+ description: "Loading carts...",
193
+ children: /* @__PURE__ */ y("div", {
194
+ className: "flex flex-col items-center justify-center py-20",
195
+ children: [/* @__PURE__ */ v(u, { className: "h-10 w-10 animate-spin text-muted-foreground mb-4" }), /* @__PURE__ */ v("p", {
196
+ className: "text-muted-foreground",
197
+ children: "Loading carts..."
198
+ })]
199
+ })
200
+ }) : /* @__PURE__ */ y(n, {
201
+ title: "Cart Management",
202
+ description: `${I.totalCarts} service providers on the platform`,
203
+ actions: /* @__PURE__ */ y("span", {
204
+ className: "text-sm text-muted-foreground",
205
+ children: [I.pendingApproval, " pending approval"]
206
+ }),
207
+ children: [
208
+ /* @__PURE__ */ v("div", {
209
+ className: "grid grid-cols-2 sm:grid-cols-4 lg:grid-cols-8 gap-3 mb-6",
210
+ children: [
211
+ {
212
+ label: "Total Carts",
213
+ value: I.totalCarts,
214
+ cls: ""
215
+ },
216
+ {
217
+ label: "Active",
218
+ value: I.activeCarts,
219
+ cls: "bg-green-500/10 border-green-500/30"
220
+ },
221
+ {
222
+ label: "Pending",
223
+ value: I.pendingApproval,
224
+ cls: "bg-yellow-500/10 border-yellow-500/30"
225
+ },
226
+ {
227
+ label: "Rejected",
228
+ value: I.rejectedCarts,
229
+ cls: "bg-red-500/10 border-red-500/30"
230
+ },
231
+ {
232
+ label: "Total Revenue",
233
+ value: r(I.totalRevenue, { minimumFractionDigits: 0 }),
234
+ cls: "col-span-2 min-w-fit"
235
+ },
236
+ {
237
+ label: "Avg Rating",
238
+ value: `${I.averageRating}`,
239
+ cls: ""
240
+ },
241
+ {
242
+ label: "New Apps",
243
+ value: I.newApplications,
244
+ cls: "bg-blue-500/10 border-blue-500/30"
245
+ }
246
+ ].map((e) => /* @__PURE__ */ y("div", {
247
+ className: t("rounded-lg border border-border bg-card p-3", e.cls),
248
+ children: [/* @__PURE__ */ v("p", {
249
+ className: "text-xs text-muted-foreground",
250
+ children: e.label
251
+ }), /* @__PURE__ */ v("p", {
252
+ className: "text-lg font-bold text-foreground",
253
+ children: e.value
254
+ })]
255
+ }, e.label))
256
+ }),
257
+ /* @__PURE__ */ v("div", {
258
+ className: "rounded-lg border border-border bg-card p-4 mb-6",
259
+ children: /* @__PURE__ */ y("div", {
260
+ className: "grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-3",
261
+ children: [
262
+ /* @__PURE__ */ y("div", {
263
+ className: "relative",
264
+ children: [/* @__PURE__ */ v(f, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }), /* @__PURE__ */ v("input", {
265
+ type: "text",
266
+ placeholder: "Search carts...",
267
+ value: P.searchQuery,
268
+ onChange: (e) => R("searchQuery", e.target.value),
269
+ className: "w-full rounded-lg border border-border bg-card py-2 pl-10 pr-4 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring"
270
+ })]
271
+ }),
272
+ /* @__PURE__ */ y("select", {
273
+ value: P.status,
274
+ onChange: (e) => R("status", e.target.value),
275
+ className: "rounded-lg border border-border bg-card py-2 px-3 text-sm text-foreground focus:outline-none focus:ring-2 focus:ring-ring",
276
+ children: [
277
+ /* @__PURE__ */ v("option", {
278
+ value: "",
279
+ children: "All Status"
280
+ }),
281
+ /* @__PURE__ */ v("option", {
282
+ value: "active",
283
+ children: "Active"
284
+ }),
285
+ /* @__PURE__ */ v("option", {
286
+ value: "inactive",
287
+ children: "Inactive"
288
+ })
289
+ ]
290
+ }),
291
+ /* @__PURE__ */ y("select", {
292
+ value: P.verificationStatus,
293
+ onChange: (e) => R("verificationStatus", e.target.value),
294
+ className: "rounded-lg border border-border bg-card py-2 px-3 text-sm text-foreground focus:outline-none focus:ring-2 focus:ring-ring",
295
+ children: [
296
+ /* @__PURE__ */ v("option", {
297
+ value: "",
298
+ children: "All Verification"
299
+ }),
300
+ /* @__PURE__ */ v("option", {
301
+ value: "verified",
302
+ children: "Verified"
303
+ }),
304
+ /* @__PURE__ */ v("option", {
305
+ value: "pending",
306
+ children: "Pending"
307
+ }),
308
+ /* @__PURE__ */ v("option", {
309
+ value: "rejected",
310
+ children: "Rejected"
311
+ })
312
+ ]
313
+ }),
314
+ /* @__PURE__ */ y("select", {
315
+ value: P.category,
316
+ onChange: (e) => R("category", e.target.value),
317
+ className: "rounded-lg border border-border bg-card py-2 px-3 text-sm text-foreground focus:outline-none focus:ring-2 focus:ring-ring",
318
+ children: [
319
+ /* @__PURE__ */ v("option", {
320
+ value: "",
321
+ children: "All Categories"
322
+ }),
323
+ /* @__PURE__ */ v("option", {
324
+ value: "Food & Beverage",
325
+ children: "Food & Beverage"
326
+ }),
327
+ /* @__PURE__ */ v("option", {
328
+ value: "Beverages",
329
+ children: "Beverages"
330
+ }),
331
+ /* @__PURE__ */ v("option", {
332
+ value: "Street Food",
333
+ children: "Street Food"
334
+ }),
335
+ /* @__PURE__ */ v("option", {
336
+ value: "Fast Food",
337
+ children: "Fast Food"
338
+ })
339
+ ]
340
+ }),
341
+ /* @__PURE__ */ v("input", {
342
+ type: "text",
343
+ placeholder: "Location...",
344
+ value: P.location,
345
+ onChange: (e) => R("location", e.target.value),
346
+ className: "rounded-lg border border-border bg-card py-2 px-3 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring"
347
+ }),
348
+ /* @__PURE__ */ y("select", {
349
+ value: P.sortBy,
350
+ onChange: (e) => R("sortBy", e.target.value),
351
+ className: "rounded-lg border border-border bg-card py-2 px-3 text-sm text-foreground focus:outline-none focus:ring-2 focus:ring-ring",
352
+ children: [
353
+ /* @__PURE__ */ v("option", {
354
+ value: "recent",
355
+ children: "Most Recent"
356
+ }),
357
+ /* @__PURE__ */ v("option", {
358
+ value: "name",
359
+ children: "Name A-Z"
360
+ }),
361
+ /* @__PURE__ */ v("option", {
362
+ value: "rating",
363
+ children: "Highest Rated"
364
+ }),
365
+ /* @__PURE__ */ v("option", {
366
+ value: "revenue",
367
+ children: "Highest Revenue"
368
+ }),
369
+ /* @__PURE__ */ v("option", {
370
+ value: "compliance",
371
+ children: "Best Compliance"
372
+ })
373
+ ]
374
+ })
375
+ ]
376
+ })
377
+ }),
378
+ /* @__PURE__ */ y("div", {
379
+ className: "rounded-lg border border-border bg-card overflow-hidden",
380
+ children: [
381
+ /* @__PURE__ */ v("div", {
382
+ className: "block md:hidden space-y-4 p-4",
383
+ children: S.map((e) => /* @__PURE__ */ y("div", {
384
+ className: "rounded-lg border border-border bg-muted/30 p-4",
385
+ children: [
386
+ /* @__PURE__ */ y("div", {
387
+ className: "flex items-center mb-3",
388
+ children: [/* @__PURE__ */ v("img", {
389
+ src: e.image,
390
+ alt: e.name,
391
+ className: "w-16 h-16 rounded-lg object-cover mr-3"
392
+ }), /* @__PURE__ */ y("div", {
393
+ className: "flex-1 min-w-0",
394
+ children: [
395
+ /* @__PURE__ */ v("h3", {
396
+ className: "font-medium text-foreground text-lg truncate",
397
+ children: e.name
398
+ }),
399
+ /* @__PURE__ */ v("p", {
400
+ className: "text-sm text-muted-foreground truncate",
401
+ children: e.category
402
+ }),
403
+ /* @__PURE__ */ v("p", {
404
+ className: "text-sm text-muted-foreground truncate",
405
+ children: e.address
406
+ })
407
+ ]
408
+ })]
409
+ }),
410
+ /* @__PURE__ */ y("div", {
411
+ className: "grid grid-cols-2 gap-4 mb-3 text-sm",
412
+ children: [/* @__PURE__ */ y("div", { children: [
413
+ /* @__PURE__ */ v("p", {
414
+ className: "text-muted-foreground font-medium",
415
+ children: "Owner"
416
+ }),
417
+ /* @__PURE__ */ v("p", {
418
+ className: "text-foreground",
419
+ children: e.ownerName
420
+ }),
421
+ /* @__PURE__ */ v("p", {
422
+ className: "text-muted-foreground text-xs",
423
+ children: e.ownerPhone
424
+ })
425
+ ] }), /* @__PURE__ */ y("div", { children: [
426
+ /* @__PURE__ */ v("p", {
427
+ className: "text-muted-foreground font-medium",
428
+ children: "Performance"
429
+ }),
430
+ /* @__PURE__ */ y("p", {
431
+ className: "text-foreground",
432
+ children: [r(e.monthlyRevenue, { minimumFractionDigits: 0 }), "/mo"]
433
+ }),
434
+ /* @__PURE__ */ y("p", {
435
+ className: "text-muted-foreground text-xs",
436
+ children: [e.monthlyOrders, " orders"]
437
+ })
438
+ ] })]
439
+ }),
440
+ /* @__PURE__ */ y("div", {
441
+ className: "flex flex-wrap gap-2 mb-3",
442
+ children: [
443
+ U(e.isActive),
444
+ H(e),
445
+ e.rating > 0 && /* @__PURE__ */ y("span", {
446
+ className: "inline-flex items-center gap-1 rounded-full px-2.5 py-0.5 text-xs font-medium bg-yellow-500/20 text-yellow-600 dark:text-yellow-400",
447
+ children: [
448
+ /* @__PURE__ */ v(p, { className: "h-3 w-3 fill-current" }),
449
+ e.rating,
450
+ " (",
451
+ e.reviewCount,
452
+ ")"
453
+ ]
454
+ })
455
+ ]
456
+ }),
457
+ /* @__PURE__ */ y("div", {
458
+ className: "mb-3",
459
+ children: [
460
+ /* @__PURE__ */ y("div", {
461
+ className: "flex items-center justify-between text-sm mb-1",
462
+ children: [/* @__PURE__ */ v("span", {
463
+ className: "text-muted-foreground",
464
+ children: "Compliance"
465
+ }), /* @__PURE__ */ y("span", {
466
+ className: "font-medium text-foreground",
467
+ children: [e.complianceScore, "%"]
468
+ })]
469
+ }),
470
+ W(e.complianceScore),
471
+ /* @__PURE__ */ y("p", {
472
+ className: "text-xs text-muted-foreground mt-1",
473
+ children: [
474
+ "Docs: ",
475
+ e.documentsSubmitted,
476
+ "/",
477
+ e.documentsRequired,
478
+ " • Applied:",
479
+ " ",
480
+ V(e.applicationDate)
481
+ ]
482
+ })
483
+ ]
484
+ }),
485
+ /* @__PURE__ */ y("div", {
486
+ className: "flex flex-wrap gap-2",
487
+ children: [
488
+ /* @__PURE__ */ v("button", {
489
+ type: "button",
490
+ onClick: () => z(e, "view"),
491
+ className: "flex-1 rounded-lg border border-border px-3 py-1.5 text-sm font-medium text-foreground hover:bg-accent transition-colors",
492
+ children: "View Details"
493
+ }),
494
+ !e.isVerified && e.inspectionStatus !== "failed" && /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v("button", {
495
+ type: "button",
496
+ onClick: () => z(e, "approve"),
497
+ className: "rounded-lg bg-primary px-3 py-1.5 text-sm font-medium text-primary-foreground hover:bg-primary/90 transition-colors",
498
+ children: "Approve"
499
+ }), /* @__PURE__ */ v("button", {
500
+ type: "button",
501
+ onClick: () => z(e, "reject"),
502
+ className: "rounded-lg border border-border px-3 py-1.5 text-sm font-medium text-red-600 hover:bg-red-500/10 transition-colors",
503
+ children: "Reject"
504
+ })] }),
505
+ e.inspectionStatus === "pending" && /* @__PURE__ */ v("button", {
506
+ type: "button",
507
+ onClick: () => z(e, "inspect"),
508
+ className: "rounded-lg border border-border px-3 py-1.5 text-sm font-medium text-foreground hover:bg-accent transition-colors",
509
+ children: "Inspect"
510
+ }),
511
+ e.isActive && /* @__PURE__ */ v("button", {
512
+ type: "button",
513
+ onClick: () => z(e, "suspend"),
514
+ className: "rounded-lg border border-border px-3 py-1.5 text-sm font-medium text-red-600 hover:bg-red-500/10 transition-colors",
515
+ children: "Suspend"
516
+ })
517
+ ]
518
+ })
519
+ ]
520
+ }, e.id))
521
+ }),
522
+ /* @__PURE__ */ v("div", {
523
+ className: "hidden md:block overflow-x-auto",
524
+ children: /* @__PURE__ */ y("table", {
525
+ className: "w-full",
526
+ children: [/* @__PURE__ */ v("thead", { children: /* @__PURE__ */ y("tr", {
527
+ className: "border-b border-border bg-muted/50",
528
+ children: [
529
+ /* @__PURE__ */ v("th", {
530
+ className: "px-4 py-3 text-left text-xs font-medium text-muted-foreground uppercase tracking-wider",
531
+ children: "Cart"
532
+ }),
533
+ /* @__PURE__ */ v("th", {
534
+ className: "px-4 py-3 text-left text-xs font-medium text-muted-foreground uppercase tracking-wider",
535
+ children: "Owner"
536
+ }),
537
+ /* @__PURE__ */ v("th", {
538
+ className: "px-4 py-3 text-left text-xs font-medium text-muted-foreground uppercase tracking-wider",
539
+ children: "Status"
540
+ }),
541
+ /* @__PURE__ */ v("th", {
542
+ className: "px-4 py-3 text-left text-xs font-medium text-muted-foreground uppercase tracking-wider",
543
+ children: "Performance"
544
+ }),
545
+ /* @__PURE__ */ v("th", {
546
+ className: "px-4 py-3 text-left text-xs font-medium text-muted-foreground uppercase tracking-wider",
547
+ children: "Compliance"
548
+ }),
549
+ /* @__PURE__ */ v("th", {
550
+ className: "px-4 py-3 text-left text-xs font-medium text-muted-foreground uppercase tracking-wider",
551
+ children: "Actions"
552
+ })
553
+ ]
554
+ }) }), /* @__PURE__ */ v("tbody", {
555
+ className: "divide-y divide-border",
556
+ children: S.map((e) => /* @__PURE__ */ y("tr", {
557
+ className: "hover:bg-accent/50 transition-colors",
558
+ children: [
559
+ /* @__PURE__ */ v("td", {
560
+ className: "px-4 py-3",
561
+ children: /* @__PURE__ */ y("div", {
562
+ className: "flex items-center gap-3",
563
+ children: [/* @__PURE__ */ v("img", {
564
+ src: e.image,
565
+ alt: e.name,
566
+ className: "w-12 h-12 rounded-lg object-cover"
567
+ }), /* @__PURE__ */ y("div", {
568
+ className: "min-w-0",
569
+ children: [
570
+ /* @__PURE__ */ v("p", {
571
+ className: "text-sm font-medium text-foreground truncate",
572
+ children: e.name
573
+ }),
574
+ /* @__PURE__ */ v("p", {
575
+ className: "text-xs text-muted-foreground truncate",
576
+ children: e.category
577
+ }),
578
+ /* @__PURE__ */ v("p", {
579
+ className: "text-xs text-muted-foreground truncate",
580
+ children: e.address
581
+ })
582
+ ]
583
+ })]
584
+ })
585
+ }),
586
+ /* @__PURE__ */ y("td", {
587
+ className: "px-4 py-3 text-sm",
588
+ children: [
589
+ /* @__PURE__ */ v("p", {
590
+ className: "font-medium text-foreground",
591
+ children: e.ownerName
592
+ }),
593
+ /* @__PURE__ */ v("p", {
594
+ className: "text-xs text-muted-foreground",
595
+ children: e.ownerEmail
596
+ }),
597
+ /* @__PURE__ */ v("p", {
598
+ className: "text-xs text-muted-foreground",
599
+ children: e.ownerPhone
600
+ })
601
+ ]
602
+ }),
603
+ /* @__PURE__ */ v("td", {
604
+ className: "px-4 py-3",
605
+ children: /* @__PURE__ */ y("div", {
606
+ className: "space-y-1",
607
+ children: [
608
+ U(e.isActive),
609
+ /* @__PURE__ */ v("br", {}),
610
+ H(e),
611
+ e.rating > 0 && /* @__PURE__ */ y("div", {
612
+ className: "text-sm flex items-center gap-1 mt-1",
613
+ children: [
614
+ /* @__PURE__ */ v(p, { className: "h-3 w-3 fill-yellow-400 text-yellow-400" }),
615
+ e.rating,
616
+ " ",
617
+ /* @__PURE__ */ y("span", {
618
+ className: "text-muted-foreground",
619
+ children: [
620
+ "(",
621
+ e.reviewCount,
622
+ ")"
623
+ ]
624
+ })
625
+ ]
626
+ })
627
+ ]
628
+ })
629
+ }),
630
+ /* @__PURE__ */ y("td", {
631
+ className: "px-4 py-3 text-sm",
632
+ children: [/* @__PURE__ */ y("p", {
633
+ className: "text-foreground",
634
+ children: [r(e.monthlyRevenue, { minimumFractionDigits: 0 }), "/mo"]
635
+ }), /* @__PURE__ */ y("p", {
636
+ className: "text-muted-foreground",
637
+ children: [e.monthlyOrders, " orders/mo"]
638
+ })]
639
+ }),
640
+ /* @__PURE__ */ y("td", {
641
+ className: "px-4 py-3 text-sm",
642
+ children: [
643
+ /* @__PURE__ */ y("div", {
644
+ className: "flex items-center gap-2 mb-1",
645
+ children: [/* @__PURE__ */ v("div", {
646
+ className: "w-16",
647
+ children: W(e.complianceScore)
648
+ }), /* @__PURE__ */ y("span", {
649
+ className: "font-medium text-foreground",
650
+ children: [e.complianceScore, "%"]
651
+ })]
652
+ }),
653
+ /* @__PURE__ */ y("p", {
654
+ className: "text-xs text-muted-foreground",
655
+ children: [
656
+ "Docs: ",
657
+ e.documentsSubmitted,
658
+ "/",
659
+ e.documentsRequired
660
+ ]
661
+ }),
662
+ /* @__PURE__ */ y("p", {
663
+ className: "text-xs text-muted-foreground",
664
+ children: ["Applied: ", V(e.applicationDate)]
665
+ })
666
+ ]
667
+ }),
668
+ /* @__PURE__ */ v("td", {
669
+ className: "px-4 py-3",
670
+ children: /* @__PURE__ */ y("div", {
671
+ className: "flex flex-col gap-1",
672
+ children: [
673
+ /* @__PURE__ */ y("button", {
674
+ type: "button",
675
+ onClick: () => z(e, "view"),
676
+ className: "rounded p-1.5 text-muted-foreground hover:text-foreground hover:bg-accent transition-colors inline-flex items-center gap-1 text-xs",
677
+ children: [/* @__PURE__ */ v(l, { className: "h-4 w-4" }), " View"]
678
+ }),
679
+ !e.isVerified && e.inspectionStatus !== "failed" && /* @__PURE__ */ y("div", {
680
+ className: "flex gap-1",
681
+ children: [/* @__PURE__ */ v("button", {
682
+ type: "button",
683
+ onClick: () => z(e, "approve"),
684
+ className: "rounded p-1.5 text-muted-foreground hover:text-green-600 hover:bg-green-500/10 transition-colors",
685
+ children: /* @__PURE__ */ v(s, { className: "h-4 w-4" })
686
+ }), /* @__PURE__ */ v("button", {
687
+ type: "button",
688
+ onClick: () => z(e, "reject"),
689
+ className: "rounded p-1.5 text-muted-foreground hover:text-red-600 hover:bg-red-500/10 transition-colors",
690
+ children: /* @__PURE__ */ v(g, { className: "h-4 w-4" })
691
+ })]
692
+ }),
693
+ e.inspectionStatus === "pending" && /* @__PURE__ */ y("button", {
694
+ type: "button",
695
+ onClick: () => z(e, "inspect"),
696
+ className: "rounded p-1.5 text-muted-foreground hover:text-blue-600 hover:bg-blue-500/10 transition-colors inline-flex items-center gap-1 text-xs",
697
+ children: [/* @__PURE__ */ v(c, { className: "h-4 w-4" }), " Inspect"]
698
+ }),
699
+ e.isActive && /* @__PURE__ */ v("button", {
700
+ type: "button",
701
+ onClick: () => z(e, "suspend"),
702
+ className: "rounded p-1.5 text-muted-foreground hover:text-red-600 hover:bg-red-500/10 transition-colors",
703
+ children: /* @__PURE__ */ v(d, { className: "h-4 w-4" })
704
+ })
705
+ ]
706
+ })
707
+ })
708
+ ]
709
+ }, e.id))
710
+ })]
711
+ })
712
+ }),
713
+ S.length === 0 && /* @__PURE__ */ y("div", {
714
+ className: "flex flex-col items-center justify-center py-12 px-4",
715
+ children: [/* @__PURE__ */ v(m, { className: "h-10 w-10 text-muted-foreground/50 mb-3" }), /* @__PURE__ */ v("p", {
716
+ className: "text-sm text-muted-foreground",
717
+ children: "No carts found matching your criteria"
718
+ })]
719
+ })
720
+ ]
721
+ }),
722
+ O && E && /* @__PURE__ */ v("div", {
723
+ className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",
724
+ children: /* @__PURE__ */ y("div", {
725
+ className: "w-full max-w-2xl rounded-lg border border-border bg-card shadow-lg max-h-[90vh] overflow-y-auto",
726
+ children: [/* @__PURE__ */ y("div", {
727
+ className: "flex items-center justify-between p-4 border-b border-border",
728
+ children: [/* @__PURE__ */ v("h3", {
729
+ className: "text-lg font-semibold text-foreground",
730
+ children: A === "view" ? "Cart Details" : A === "approve" ? "Approve Cart" : A === "reject" ? "Reject Cart" : A === "suspend" ? "Suspend Cart" : "Schedule Inspection"
731
+ }), /* @__PURE__ */ v("button", {
732
+ type: "button",
733
+ onClick: () => k(!1),
734
+ className: "rounded p-1.5 text-muted-foreground hover:text-foreground hover:bg-accent transition-colors",
735
+ children: /* @__PURE__ */ v(h, { className: "h-5 w-5" })
736
+ })]
737
+ }), /* @__PURE__ */ y("div", {
738
+ className: "p-4 space-y-4",
739
+ children: [
740
+ /* @__PURE__ */ y("div", {
741
+ className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
742
+ children: [
743
+ /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
744
+ className: "text-sm text-muted-foreground",
745
+ children: "Cart Name"
746
+ }), /* @__PURE__ */ v("p", {
747
+ className: "font-medium text-foreground",
748
+ children: E.name
749
+ })] }),
750
+ /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
751
+ className: "text-sm text-muted-foreground",
752
+ children: "Category"
753
+ }), /* @__PURE__ */ v("p", {
754
+ className: "font-medium text-foreground",
755
+ children: E.category
756
+ })] }),
757
+ /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
758
+ className: "text-sm text-muted-foreground",
759
+ children: "Owner"
760
+ }), /* @__PURE__ */ v("p", {
761
+ className: "font-medium text-foreground",
762
+ children: E.ownerName
763
+ })] }),
764
+ /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
765
+ className: "text-sm text-muted-foreground",
766
+ children: "Contact"
767
+ }), /* @__PURE__ */ v("p", {
768
+ className: "font-medium text-foreground",
769
+ children: E.ownerPhone
770
+ })] })
771
+ ]
772
+ }),
773
+ /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
774
+ className: "text-sm text-muted-foreground",
775
+ children: "Description"
776
+ }), /* @__PURE__ */ v("p", {
777
+ className: "font-medium text-foreground",
778
+ children: E.description
779
+ })] }),
780
+ /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
781
+ className: "text-sm text-muted-foreground",
782
+ children: "Location"
783
+ }), /* @__PURE__ */ v("p", {
784
+ className: "font-medium text-foreground",
785
+ children: E.address
786
+ })] }),
787
+ /* @__PURE__ */ y("div", {
788
+ className: "grid grid-cols-1 sm:grid-cols-3 gap-4",
789
+ children: [
790
+ /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
791
+ className: "text-sm text-muted-foreground",
792
+ children: "Compliance Score"
793
+ }), /* @__PURE__ */ y("p", {
794
+ className: "font-medium text-foreground",
795
+ children: [E.complianceScore, "%"]
796
+ })] }),
797
+ /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
798
+ className: "text-sm text-muted-foreground",
799
+ children: "Documents"
800
+ }), /* @__PURE__ */ y("p", {
801
+ className: "font-medium text-foreground",
802
+ children: [
803
+ E.documentsSubmitted,
804
+ "/",
805
+ E.documentsRequired
806
+ ]
807
+ })] }),
808
+ /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
809
+ className: "text-sm text-muted-foreground",
810
+ children: "Monthly Revenue"
811
+ }), /* @__PURE__ */ v("p", {
812
+ className: "font-medium text-foreground",
813
+ children: r(E.monthlyRevenue, { minimumFractionDigits: 0 })
814
+ })] })
815
+ ]
816
+ }),
817
+ E.rejectionReason && /* @__PURE__ */ y("div", {
818
+ className: "rounded-lg border border-red-500/30 bg-red-500/10 p-4",
819
+ children: [/* @__PURE__ */ v("p", {
820
+ className: "text-sm font-medium text-red-600 dark:text-red-400",
821
+ children: "Previous Rejection Reason:"
822
+ }), /* @__PURE__ */ v("p", {
823
+ className: "text-sm text-red-600/80 dark:text-red-400/80",
824
+ children: E.rejectionReason
825
+ })]
826
+ }),
827
+ A === "reject" && /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
828
+ className: "block text-sm font-medium text-foreground mb-2",
829
+ children: "Rejection Reason *"
830
+ }), /* @__PURE__ */ v("textarea", {
831
+ className: "w-full rounded-lg border border-border bg-card p-3 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring min-h-[100px]",
832
+ rows: 4,
833
+ value: M,
834
+ onChange: (e) => N(e.target.value),
835
+ placeholder: "Please provide a detailed reason for rejection..."
836
+ })] }),
837
+ A === "approve" && /* @__PURE__ */ v("div", {
838
+ className: "rounded-lg border border-green-500/30 bg-green-500/10 p-4",
839
+ children: /* @__PURE__ */ v("p", {
840
+ className: "text-sm text-green-600 dark:text-green-400",
841
+ children: "This will approve the cart for operation on the platform. The cart owner will be notified and the cart will become active."
842
+ })
843
+ }),
844
+ /* @__PURE__ */ y("div", {
845
+ className: "flex gap-3 pt-2",
846
+ children: [/* @__PURE__ */ v("button", {
847
+ type: "button",
848
+ onClick: () => k(!1),
849
+ className: "flex-1 rounded-lg border border-border py-2 text-sm font-medium text-foreground hover:bg-accent transition-colors",
850
+ children: "Cancel"
851
+ }), A !== "view" && /* @__PURE__ */ v("button", {
852
+ type: "button",
853
+ onClick: B,
854
+ disabled: A === "reject" && !M.trim(),
855
+ className: "flex-1 rounded-lg bg-primary py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
856
+ children: A === "approve" ? "Approve Cart" : A === "reject" ? "Reject Cart" : A === "suspend" ? "Suspend Cart" : "Schedule Inspection"
857
+ })]
858
+ })
859
+ ]
860
+ })]
861
+ })
862
+ })
863
+ ]
864
+ });
865
+ }
866
+ //#endregion
867
+ export { x as CartManagementPage };
868
+
869
+ //# sourceMappingURL=CartManagementPage.js.map