@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,881 @@
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 { mockOrders as i } from "../../mocks/data.js";
6
+ import { useMemo as a, useState as o } from "react";
7
+ import { AlertCircle as s, CheckCircle2 as c, ChefHat as l, MapPin as u, PackageCheck as d, Phone as f, RefreshCw as p, Search as m, ShoppingBag as h, Truck as g, X as _, XCircle as v } from "lucide-react";
8
+ import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
9
+ //#region src/adaptercloud/pages/cart-owner/OrderManagementPage.tsx
10
+ var S = [
11
+ ...i,
12
+ {
13
+ id: "ORD-010",
14
+ cartId: "FOOD-001",
15
+ cartName: "Dosa Express",
16
+ cartImage: "",
17
+ items: [{
18
+ id: "food-1",
19
+ name: "Masala Dosa",
20
+ quantity: 3,
21
+ price: 120
22
+ }, {
23
+ id: "food-2",
24
+ name: "Filter Coffee",
25
+ quantity: 3,
26
+ price: 60
27
+ }],
28
+ subtotal: 540,
29
+ taxes: 54,
30
+ deliveryFee: 30,
31
+ total: 624,
32
+ status: "pending",
33
+ orderDate: "2024-01-16T17:30:00Z",
34
+ estimatedDeliveryTime: "2024-01-16T18:00:00Z",
35
+ deliveryAddress: {
36
+ street: "42 Lake Road",
37
+ area: "Ulsoor",
38
+ city: "Bangalore",
39
+ pincode: "560008"
40
+ },
41
+ paymentMethod: "UPI",
42
+ paymentStatus: "completed",
43
+ timeline: [{
44
+ status: "pending",
45
+ timestamp: "2024-01-16T17:30:00Z",
46
+ description: "Order placed"
47
+ }],
48
+ assignedWorker: {
49
+ id: "worker-1",
50
+ name: "Ravi Kumar",
51
+ phone: "+91-9876543210",
52
+ rating: 4.8
53
+ },
54
+ customerName: "Priya Sharma",
55
+ customerPhone: "+91-9876543220",
56
+ fulfillmentType: "delivery",
57
+ specialInstructions: "Extra sambar please"
58
+ },
59
+ {
60
+ id: "ORD-011",
61
+ cartId: "FOOD-002",
62
+ cartName: "Chaat Corner",
63
+ cartImage: "",
64
+ items: [{
65
+ id: "food-3",
66
+ name: "Pani Puri",
67
+ quantity: 2,
68
+ price: 80
69
+ }, {
70
+ id: "food-4",
71
+ name: "Bhel Puri",
72
+ quantity: 1,
73
+ price: 70
74
+ }],
75
+ subtotal: 230,
76
+ taxes: 23,
77
+ deliveryFee: 0,
78
+ total: 253,
79
+ status: "confirmed",
80
+ orderDate: "2024-01-16T16:00:00Z",
81
+ deliveryAddress: {
82
+ street: "88 MG Road",
83
+ area: "MG Road",
84
+ city: "Bangalore",
85
+ pincode: "560001"
86
+ },
87
+ paymentMethod: "Cash",
88
+ paymentStatus: "pending",
89
+ timeline: [{
90
+ status: "pending",
91
+ timestamp: "2024-01-16T15:50:00Z",
92
+ description: "Order placed"
93
+ }, {
94
+ status: "confirmed",
95
+ timestamp: "2024-01-16T16:00:00Z",
96
+ description: "Order confirmed"
97
+ }],
98
+ customerName: "Amit Patel",
99
+ customerPhone: "+91-9876543221",
100
+ fulfillmentType: "pickup"
101
+ },
102
+ {
103
+ id: "ORD-012",
104
+ cartId: "FOOD-001",
105
+ cartName: "Dosa Express",
106
+ cartImage: "",
107
+ items: [{
108
+ id: "food-5",
109
+ name: "Rava Dosa",
110
+ quantity: 2,
111
+ price: 100
112
+ }],
113
+ subtotal: 200,
114
+ taxes: 20,
115
+ deliveryFee: 30,
116
+ total: 250,
117
+ status: "preparing",
118
+ orderDate: "2024-01-16T15:00:00Z",
119
+ deliveryAddress: {
120
+ street: "15 Church Street",
121
+ area: "Church Street",
122
+ city: "Bangalore",
123
+ pincode: "560001"
124
+ },
125
+ paymentMethod: "UPI",
126
+ paymentStatus: "completed",
127
+ timeline: [
128
+ {
129
+ status: "pending",
130
+ timestamp: "2024-01-16T14:50:00Z",
131
+ description: "Order placed"
132
+ },
133
+ {
134
+ status: "confirmed",
135
+ timestamp: "2024-01-16T14:55:00Z",
136
+ description: "Order confirmed"
137
+ },
138
+ {
139
+ status: "preparing",
140
+ timestamp: "2024-01-16T15:00:00Z",
141
+ description: "Preparation started"
142
+ }
143
+ ],
144
+ customerName: "Deepak Reddy",
145
+ customerPhone: "+91-9876543222",
146
+ fulfillmentType: "delivery",
147
+ specialInstructions: "No onions"
148
+ },
149
+ {
150
+ id: "ORD-013",
151
+ cartId: "SVC-001",
152
+ cartName: "Quick Fix Repairs",
153
+ cartImage: "",
154
+ items: [{
155
+ id: "svc-1",
156
+ name: "Mobile Screen Repair",
157
+ quantity: 1,
158
+ price: 2500
159
+ }],
160
+ subtotal: 2500,
161
+ taxes: 250,
162
+ deliveryFee: 0,
163
+ total: 2750,
164
+ status: "ready",
165
+ orderDate: "2024-01-16T12:00:00Z",
166
+ deliveryAddress: {
167
+ street: "22 HSR Layout",
168
+ area: "HSR Layout",
169
+ city: "Bangalore",
170
+ pincode: "560102"
171
+ },
172
+ paymentMethod: "Card",
173
+ paymentStatus: "completed",
174
+ timeline: [
175
+ {
176
+ status: "pending",
177
+ timestamp: "2024-01-16T11:00:00Z",
178
+ description: "Order placed"
179
+ },
180
+ {
181
+ status: "confirmed",
182
+ timestamp: "2024-01-16T11:10:00Z",
183
+ description: "Order confirmed"
184
+ },
185
+ {
186
+ status: "preparing",
187
+ timestamp: "2024-01-16T11:30:00Z",
188
+ description: "Service started"
189
+ },
190
+ {
191
+ status: "ready",
192
+ timestamp: "2024-01-16T12:00:00Z",
193
+ description: "Service completed"
194
+ }
195
+ ],
196
+ customerName: "Kiran Nair",
197
+ customerPhone: "+91-9876543223",
198
+ fulfillmentType: "pickup"
199
+ },
200
+ {
201
+ id: "ORD-014",
202
+ cartId: "FOOD-001",
203
+ cartName: "Dosa Express",
204
+ cartImage: "",
205
+ items: [{
206
+ id: "food-1",
207
+ name: "Masala Dosa",
208
+ quantity: 1,
209
+ price: 120
210
+ }, {
211
+ id: "food-2",
212
+ name: "Filter Coffee",
213
+ quantity: 2,
214
+ price: 60
215
+ }],
216
+ subtotal: 240,
217
+ taxes: 24,
218
+ deliveryFee: 30,
219
+ total: 294,
220
+ status: "cancelled",
221
+ orderDate: "2024-01-15T18:00:00Z",
222
+ deliveryAddress: {
223
+ street: "5 BTM Layout",
224
+ area: "BTM Layout",
225
+ city: "Bangalore",
226
+ pincode: "560076"
227
+ },
228
+ paymentMethod: "UPI",
229
+ paymentStatus: "refunded",
230
+ timeline: [{
231
+ status: "pending",
232
+ timestamp: "2024-01-15T17:50:00Z",
233
+ description: "Order placed"
234
+ }, {
235
+ status: "cancelled",
236
+ timestamp: "2024-01-15T18:00:00Z",
237
+ description: "Order cancelled by customer"
238
+ }],
239
+ customerName: "Sneha Gupta",
240
+ customerPhone: "+91-9876543224",
241
+ fulfillmentType: "delivery"
242
+ }
243
+ ], C = {
244
+ pending: {
245
+ color: "bg-yellow-500/20 text-yellow-600 dark:text-yellow-400",
246
+ label: "New Order"
247
+ },
248
+ confirmed: {
249
+ color: "bg-blue-500/20 text-blue-600 dark:text-blue-400",
250
+ label: "Confirmed"
251
+ },
252
+ preparing: {
253
+ color: "bg-orange-500/20 text-orange-600 dark:text-orange-400",
254
+ label: "Preparing"
255
+ },
256
+ ready: {
257
+ color: "bg-green-500/20 text-green-600 dark:text-green-400",
258
+ label: "Ready"
259
+ },
260
+ out_for_delivery: {
261
+ color: "bg-cyan-500/20 text-cyan-600 dark:text-cyan-400",
262
+ label: "Out for Delivery"
263
+ },
264
+ delivered: {
265
+ color: "bg-green-500/20 text-green-600 dark:text-green-400",
266
+ label: "Completed"
267
+ },
268
+ cancelled: {
269
+ color: "bg-red-500/20 text-red-600 dark:text-red-400",
270
+ label: "Cancelled"
271
+ }
272
+ }, w = {
273
+ delivery: {
274
+ icon: g,
275
+ label: "Delivery",
276
+ color: "bg-purple-500/20 text-purple-600 dark:text-purple-400"
277
+ },
278
+ pickup: {
279
+ icon: h,
280
+ label: "Pickup",
281
+ color: "bg-blue-500/20 text-blue-600 dark:text-blue-400"
282
+ },
283
+ cart_dispatch: {
284
+ icon: u,
285
+ label: "Cart Dispatch",
286
+ color: "bg-muted text-muted-foreground"
287
+ }
288
+ }, T = (e) => {
289
+ let t = new Date(e), n = Math.floor(((/* @__PURE__ */ new Date()).getTime() - t.getTime()) / (1e3 * 60));
290
+ return n < 1 ? "Just now" : n < 60 ? `${n} min ago` : n < 1440 ? `${Math.floor(n / 60)} hours ago` : t.toLocaleDateString("en-IN", {
291
+ day: "2-digit",
292
+ month: "short"
293
+ });
294
+ }, E = (e) => new Date(e).toLocaleTimeString("en-IN", {
295
+ hour: "numeric",
296
+ minute: "2-digit",
297
+ hour12: !0
298
+ }), D = (e) => {
299
+ let t = ((/* @__PURE__ */ new Date()).getTime() - new Date(e.orderDate).getTime()) / (1e3 * 60);
300
+ return e.status === "pending" && t > 10 ? "border-red-500/50 bg-red-500/5" : e.status === "preparing" && t > 30 ? "border-yellow-500/50 bg-yellow-500/5" : "border-border";
301
+ }, O = () => {
302
+ let { navigateTo: i } = e(), [h, g] = o(S), [O, k] = o({
303
+ status: "",
304
+ dateRange: "all",
305
+ searchQuery: "",
306
+ sortBy: "recent",
307
+ fulfillmentType: ""
308
+ }), [A, j] = o(null), [M, N] = o(!1), [P, F] = o(null), I = (e, t) => {
309
+ F({
310
+ text: e,
311
+ type: t
312
+ }), setTimeout(() => F(null), 3e3);
313
+ }, L = a(() => {
314
+ let e = h.length, t = h.filter((e) => e.status === "pending").length, n = h.filter((e) => [
315
+ "confirmed",
316
+ "preparing",
317
+ "ready",
318
+ "out_for_delivery"
319
+ ].includes(e.status)).length, r = h.filter((e) => e.status === "delivered").length, i = h.filter((e) => e.status === "delivered").reduce((e, t) => e + t.total, 0);
320
+ return {
321
+ total: e,
322
+ pending: t,
323
+ active: n,
324
+ completed: r,
325
+ totalRevenue: i,
326
+ avgOrder: r > 0 ? Math.round(i / r) : 0
327
+ };
328
+ }, [h]), R = a(() => {
329
+ let e = [...h];
330
+ if (O.status && (e = e.filter((e) => e.status === O.status)), O.fulfillmentType && (e = e.filter((e) => e.fulfillmentType === O.fulfillmentType)), O.searchQuery) {
331
+ let t = O.searchQuery.toLowerCase();
332
+ e = e.filter((e) => e.id.toLowerCase().includes(t) || (e.customerName || "").toLowerCase().includes(t) || e.items.some((e) => e.name.toLowerCase().includes(t)));
333
+ }
334
+ if (O.dateRange !== "all") {
335
+ let t = /* @__PURE__ */ new Date(), n = /* @__PURE__ */ new Date();
336
+ O.dateRange === "today" ? n.setHours(0, 0, 0, 0) : O.dateRange === "7days" ? n.setDate(t.getDate() - 7) : O.dateRange === "30days" && n.setDate(t.getDate() - 30), e = e.filter((e) => new Date(e.orderDate) >= n);
337
+ }
338
+ switch (O.sortBy) {
339
+ case "recent":
340
+ e.sort((e, t) => new Date(t.orderDate).getTime() - new Date(e.orderDate).getTime());
341
+ break;
342
+ case "oldest":
343
+ e.sort((e, t) => new Date(e.orderDate).getTime() - new Date(t.orderDate).getTime());
344
+ break;
345
+ case "amount_high":
346
+ e.sort((e, t) => t.total - e.total);
347
+ break;
348
+ case "amount_low":
349
+ e.sort((e, t) => e.total - t.total);
350
+ break;
351
+ }
352
+ return e;
353
+ }, [h, O]), z = (e, t) => {
354
+ let n = {
355
+ accept: "confirmed",
356
+ reject: "cancelled",
357
+ ready: "ready",
358
+ complete: "delivered"
359
+ };
360
+ g((r) => r.map((r) => r.id === e ? {
361
+ ...r,
362
+ status: n[t]
363
+ } : r)), I({
364
+ accept: "Order accepted",
365
+ reject: "Order rejected",
366
+ ready: "Order marked as ready",
367
+ complete: "Order completed"
368
+ }[t], "success"), M && A?.id === e && N(!1);
369
+ };
370
+ return /* @__PURE__ */ x(n, {
371
+ title: "Order Management",
372
+ description: "Manage incoming and active orders",
373
+ actions: /* @__PURE__ */ x("button", {
374
+ type: "button",
375
+ onClick: () => I("Orders refreshed", "success"),
376
+ className: "inline-flex items-center gap-2 rounded-md border border-border px-4 py-2 text-sm font-medium text-foreground hover:bg-muted transition-colors",
377
+ children: [/* @__PURE__ */ b(p, { className: "h-4 w-4" }), "Refresh"]
378
+ }),
379
+ children: [/* @__PURE__ */ x("div", {
380
+ className: "space-y-4",
381
+ children: [
382
+ P && /* @__PURE__ */ x("div", {
383
+ className: t("flex items-center gap-2 rounded-lg border p-3", P.type === "success" ? "border-green-500/30 bg-green-500/10" : "border-red-500/30 bg-red-500/10"),
384
+ children: [P.type === "success" ? /* @__PURE__ */ b(c, { className: "h-4 w-4 text-green-600 dark:text-green-400" }) : /* @__PURE__ */ b(s, { className: "h-4 w-4 text-red-600 dark:text-red-400" }), /* @__PURE__ */ b("span", {
385
+ className: t("text-sm font-medium", P.type === "success" ? "text-green-600 dark:text-green-400" : "text-red-600 dark:text-red-400"),
386
+ children: P.text
387
+ })]
388
+ }),
389
+ /* @__PURE__ */ x("div", {
390
+ className: "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-3",
391
+ children: [
392
+ /* @__PURE__ */ x("div", {
393
+ className: "rounded-lg border border-border bg-card p-4 shadow-sm",
394
+ children: [/* @__PURE__ */ b("p", {
395
+ className: "text-xs text-muted-foreground",
396
+ children: "Total Orders"
397
+ }), /* @__PURE__ */ b("p", {
398
+ className: "text-2xl font-bold text-foreground",
399
+ children: L.total
400
+ })]
401
+ }),
402
+ /* @__PURE__ */ x("div", {
403
+ className: "rounded-lg border border-yellow-500/30 bg-yellow-500/5 p-4 shadow-sm",
404
+ children: [/* @__PURE__ */ b("p", {
405
+ className: "text-xs text-yellow-600 dark:text-yellow-400",
406
+ children: "Pending"
407
+ }), /* @__PURE__ */ b("p", {
408
+ className: "text-2xl font-bold text-yellow-600 dark:text-yellow-400",
409
+ children: L.pending
410
+ })]
411
+ }),
412
+ /* @__PURE__ */ x("div", {
413
+ className: "rounded-lg border border-blue-500/30 bg-blue-500/5 p-4 shadow-sm",
414
+ children: [/* @__PURE__ */ b("p", {
415
+ className: "text-xs text-blue-600 dark:text-blue-400",
416
+ children: "Active"
417
+ }), /* @__PURE__ */ b("p", {
418
+ className: "text-2xl font-bold text-blue-600 dark:text-blue-400",
419
+ children: L.active
420
+ })]
421
+ }),
422
+ /* @__PURE__ */ x("div", {
423
+ className: "rounded-lg border border-green-500/30 bg-green-500/5 p-4 shadow-sm",
424
+ children: [/* @__PURE__ */ b("p", {
425
+ className: "text-xs text-green-600 dark:text-green-400",
426
+ children: "Completed"
427
+ }), /* @__PURE__ */ b("p", {
428
+ className: "text-2xl font-bold text-green-600 dark:text-green-400",
429
+ children: L.completed
430
+ })]
431
+ }),
432
+ /* @__PURE__ */ x("div", {
433
+ className: "rounded-lg border border-border bg-card p-4 shadow-sm",
434
+ children: [/* @__PURE__ */ b("p", {
435
+ className: "text-xs text-muted-foreground",
436
+ children: "Total Revenue"
437
+ }), /* @__PURE__ */ b("p", {
438
+ className: "text-2xl font-bold text-foreground",
439
+ children: r(L.totalRevenue, { minimumFractionDigits: 0 })
440
+ })]
441
+ }),
442
+ /* @__PURE__ */ x("div", {
443
+ className: "rounded-lg border border-border bg-card p-4 shadow-sm",
444
+ children: [/* @__PURE__ */ b("p", {
445
+ className: "text-xs text-muted-foreground",
446
+ children: "Avg Order"
447
+ }), /* @__PURE__ */ b("p", {
448
+ className: "text-2xl font-bold text-foreground",
449
+ children: r(L.avgOrder, { minimumFractionDigits: 0 })
450
+ })]
451
+ })
452
+ ]
453
+ }),
454
+ /* @__PURE__ */ b("div", {
455
+ className: "rounded-lg border border-border bg-card p-4 shadow-sm",
456
+ children: /* @__PURE__ */ x("div", {
457
+ className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-5 gap-3",
458
+ children: [
459
+ /* @__PURE__ */ x("div", {
460
+ className: "relative sm:col-span-2 lg:col-span-1",
461
+ children: [/* @__PURE__ */ b(m, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }), /* @__PURE__ */ b("input", {
462
+ type: "text",
463
+ placeholder: "Search orders...",
464
+ value: O.searchQuery,
465
+ onChange: (e) => k((t) => ({
466
+ ...t,
467
+ searchQuery: e.target.value
468
+ })),
469
+ className: "w-full rounded-md border border-border bg-card pl-10 pr-4 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring"
470
+ })]
471
+ }),
472
+ /* @__PURE__ */ x("select", {
473
+ value: O.status,
474
+ onChange: (e) => k((t) => ({
475
+ ...t,
476
+ status: e.target.value
477
+ })),
478
+ className: "rounded-md border border-border bg-card px-3 py-2 text-sm text-foreground",
479
+ children: [
480
+ /* @__PURE__ */ b("option", {
481
+ value: "",
482
+ children: "All Orders"
483
+ }),
484
+ /* @__PURE__ */ b("option", {
485
+ value: "pending",
486
+ children: "New Orders"
487
+ }),
488
+ /* @__PURE__ */ b("option", {
489
+ value: "confirmed",
490
+ children: "Confirmed"
491
+ }),
492
+ /* @__PURE__ */ b("option", {
493
+ value: "preparing",
494
+ children: "Preparing"
495
+ }),
496
+ /* @__PURE__ */ b("option", {
497
+ value: "ready",
498
+ children: "Ready"
499
+ }),
500
+ /* @__PURE__ */ b("option", {
501
+ value: "delivered",
502
+ children: "Completed"
503
+ }),
504
+ /* @__PURE__ */ b("option", {
505
+ value: "cancelled",
506
+ children: "Cancelled"
507
+ })
508
+ ]
509
+ }),
510
+ /* @__PURE__ */ x("select", {
511
+ value: O.fulfillmentType,
512
+ onChange: (e) => k((t) => ({
513
+ ...t,
514
+ fulfillmentType: e.target.value
515
+ })),
516
+ className: "rounded-md border border-border bg-card px-3 py-2 text-sm text-foreground",
517
+ children: [
518
+ /* @__PURE__ */ b("option", {
519
+ value: "",
520
+ children: "All Types"
521
+ }),
522
+ /* @__PURE__ */ b("option", {
523
+ value: "pickup",
524
+ children: "Pickup"
525
+ }),
526
+ /* @__PURE__ */ b("option", {
527
+ value: "delivery",
528
+ children: "Delivery"
529
+ }),
530
+ /* @__PURE__ */ b("option", {
531
+ value: "cart_dispatch",
532
+ children: "Cart Dispatch"
533
+ })
534
+ ]
535
+ }),
536
+ /* @__PURE__ */ x("select", {
537
+ value: O.dateRange,
538
+ onChange: (e) => k((t) => ({
539
+ ...t,
540
+ dateRange: e.target.value
541
+ })),
542
+ className: "rounded-md border border-border bg-card px-3 py-2 text-sm text-foreground",
543
+ children: [
544
+ /* @__PURE__ */ b("option", {
545
+ value: "today",
546
+ children: "Today"
547
+ }),
548
+ /* @__PURE__ */ b("option", {
549
+ value: "7days",
550
+ children: "Last 7 Days"
551
+ }),
552
+ /* @__PURE__ */ b("option", {
553
+ value: "30days",
554
+ children: "Last 30 Days"
555
+ }),
556
+ /* @__PURE__ */ b("option", {
557
+ value: "all",
558
+ children: "All Time"
559
+ })
560
+ ]
561
+ }),
562
+ /* @__PURE__ */ x("select", {
563
+ value: O.sortBy,
564
+ onChange: (e) => k((t) => ({
565
+ ...t,
566
+ sortBy: e.target.value
567
+ })),
568
+ className: "rounded-md border border-border bg-card px-3 py-2 text-sm text-foreground",
569
+ children: [
570
+ /* @__PURE__ */ b("option", {
571
+ value: "recent",
572
+ children: "Most Recent"
573
+ }),
574
+ /* @__PURE__ */ b("option", {
575
+ value: "oldest",
576
+ children: "Oldest First"
577
+ }),
578
+ /* @__PURE__ */ b("option", {
579
+ value: "amount_high",
580
+ children: "Amount: High to Low"
581
+ }),
582
+ /* @__PURE__ */ b("option", {
583
+ value: "amount_low",
584
+ children: "Amount: Low to High"
585
+ })
586
+ ]
587
+ })
588
+ ]
589
+ })
590
+ }),
591
+ R.length === 0 ? /* @__PURE__ */ x("div", {
592
+ className: "flex flex-col items-center justify-center py-16 rounded-lg border border-border bg-card shadow-sm text-center",
593
+ children: [
594
+ /* @__PURE__ */ b(d, { className: "h-12 w-12 text-muted-foreground opacity-40 mb-3" }),
595
+ /* @__PURE__ */ b("h3", {
596
+ className: "text-lg font-semibold text-foreground mb-1",
597
+ children: "No orders found"
598
+ }),
599
+ /* @__PURE__ */ b("p", {
600
+ className: "text-sm text-muted-foreground",
601
+ children: O.searchQuery || O.status ? "Try adjusting your filters" : "No orders to display"
602
+ })
603
+ ]
604
+ }) : /* @__PURE__ */ b("div", {
605
+ className: "space-y-4",
606
+ children: R.map((e) => {
607
+ let n = C[e.status] || {
608
+ color: "bg-muted text-muted-foreground",
609
+ label: e.status
610
+ }, i = w[e.fulfillmentType || "delivery"] || w.delivery, a = i.icon;
611
+ return /* @__PURE__ */ b("div", {
612
+ className: t("rounded-lg border bg-card shadow-sm transition-shadow hover:shadow-md", D(e)),
613
+ children: /* @__PURE__ */ x("div", {
614
+ className: "p-4 sm:p-5",
615
+ children: [
616
+ /* @__PURE__ */ x("div", {
617
+ className: "flex flex-col lg:flex-row lg:items-center lg:justify-between gap-3 mb-3",
618
+ children: [/* @__PURE__ */ x("div", {
619
+ className: "min-w-0 flex-1",
620
+ children: [/* @__PURE__ */ x("div", {
621
+ className: "flex flex-wrap items-center gap-2 mb-1",
622
+ children: [
623
+ /* @__PURE__ */ x("h3", {
624
+ className: "text-sm sm:text-base font-semibold text-foreground",
625
+ children: ["Order #", e.id]
626
+ }),
627
+ /* @__PURE__ */ b("span", {
628
+ className: t("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium", n.color),
629
+ children: n.label
630
+ }),
631
+ /* @__PURE__ */ x("span", {
632
+ className: t("inline-flex items-center gap-1 rounded-full px-2.5 py-0.5 text-xs font-medium", i.color),
633
+ children: [/* @__PURE__ */ b(a, { className: "h-3 w-3" }), i.label]
634
+ })
635
+ ]
636
+ }), /* @__PURE__ */ x("p", {
637
+ className: "text-xs text-muted-foreground",
638
+ children: [
639
+ e.customerName || "Customer",
640
+ " | ",
641
+ T(e.orderDate)
642
+ ]
643
+ })]
644
+ }), /* @__PURE__ */ x("div", {
645
+ className: "flex items-center gap-3",
646
+ children: [/* @__PURE__ */ b("p", {
647
+ className: "text-lg font-bold text-foreground",
648
+ children: r(e.total, { minimumFractionDigits: 0 })
649
+ }), /* @__PURE__ */ b("button", {
650
+ type: "button",
651
+ onClick: () => {
652
+ j(e), N(!0);
653
+ },
654
+ className: "rounded-md border border-border px-3 py-1.5 text-xs font-medium text-foreground hover:bg-muted transition-colors",
655
+ children: "View Details"
656
+ })]
657
+ })]
658
+ }),
659
+ /* @__PURE__ */ b("div", {
660
+ className: "border-t border-border pt-3 mb-3",
661
+ children: /* @__PURE__ */ b("div", {
662
+ className: "flex flex-wrap gap-2",
663
+ children: e.items.map((e, t) => /* @__PURE__ */ x("span", {
664
+ className: "inline-flex items-center rounded bg-muted px-2 py-1 text-xs text-foreground",
665
+ children: [
666
+ e.quantity,
667
+ "x ",
668
+ e.name
669
+ ]
670
+ }, t))
671
+ })
672
+ }),
673
+ /* @__PURE__ */ x("div", {
674
+ className: "flex flex-wrap gap-2",
675
+ children: [
676
+ e.status === "pending" && /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ x("button", {
677
+ type: "button",
678
+ onClick: () => z(e.id, "accept"),
679
+ className: "inline-flex items-center gap-1.5 rounded-md bg-green-500/10 px-3 py-2 text-xs font-medium text-green-600 dark:text-green-400 hover:bg-green-500/20 transition-colors",
680
+ children: [/* @__PURE__ */ b(c, { className: "h-3.5 w-3.5" }), "Accept Order"]
681
+ }), /* @__PURE__ */ x("button", {
682
+ type: "button",
683
+ onClick: () => z(e.id, "reject"),
684
+ className: "inline-flex items-center gap-1.5 rounded-md bg-red-500/10 px-3 py-2 text-xs font-medium text-red-600 dark:text-red-400 hover:bg-red-500/20 transition-colors",
685
+ children: [/* @__PURE__ */ b(v, { className: "h-3.5 w-3.5" }), "Reject"]
686
+ })] }),
687
+ e.status === "confirmed" && /* @__PURE__ */ x("button", {
688
+ type: "button",
689
+ onClick: () => z(e.id, "ready"),
690
+ className: "inline-flex items-center gap-1.5 rounded-md bg-orange-500/10 px-3 py-2 text-xs font-medium text-orange-600 dark:text-orange-400 hover:bg-orange-500/20 transition-colors",
691
+ children: [/* @__PURE__ */ b(l, { className: "h-3.5 w-3.5" }), "Start Preparing"]
692
+ }),
693
+ e.status === "preparing" && /* @__PURE__ */ x("button", {
694
+ type: "button",
695
+ onClick: () => z(e.id, "ready"),
696
+ className: "inline-flex items-center gap-1.5 rounded-md bg-green-500/10 px-3 py-2 text-xs font-medium text-green-600 dark:text-green-400 hover:bg-green-500/20 transition-colors",
697
+ children: [/* @__PURE__ */ b(d, { className: "h-3.5 w-3.5" }), "Mark as Ready"]
698
+ }),
699
+ e.status === "ready" && e.fulfillmentType === "pickup" && /* @__PURE__ */ x("button", {
700
+ type: "button",
701
+ onClick: () => z(e.id, "complete"),
702
+ className: "inline-flex items-center gap-1.5 rounded-md bg-green-500/10 px-3 py-2 text-xs font-medium text-green-600 dark:text-green-400 hover:bg-green-500/20 transition-colors",
703
+ children: [/* @__PURE__ */ b(c, { className: "h-3.5 w-3.5" }), "Complete Order"]
704
+ }),
705
+ [
706
+ "confirmed",
707
+ "preparing",
708
+ "ready"
709
+ ].includes(e.status) && /* @__PURE__ */ x("button", {
710
+ type: "button",
711
+ onClick: () => alert("Contact feature coming soon!"),
712
+ className: "inline-flex items-center gap-1.5 rounded-md border border-border px-3 py-2 text-xs font-medium text-foreground hover:bg-muted transition-colors",
713
+ children: [/* @__PURE__ */ b(f, { className: "h-3.5 w-3.5" }), "Contact Customer"]
714
+ })
715
+ ]
716
+ }),
717
+ e.specialInstructions && /* @__PURE__ */ x("div", {
718
+ className: "mt-3 rounded-md border border-yellow-500/30 bg-yellow-500/10 p-3",
719
+ children: [/* @__PURE__ */ b("p", {
720
+ className: "text-xs font-medium text-yellow-600 dark:text-yellow-400",
721
+ children: "Special Instructions:"
722
+ }), /* @__PURE__ */ b("p", {
723
+ className: "text-xs text-yellow-600 dark:text-yellow-400 mt-0.5",
724
+ children: e.specialInstructions
725
+ })]
726
+ })
727
+ ]
728
+ })
729
+ }, e.id);
730
+ })
731
+ })
732
+ ]
733
+ }), M && A && /* @__PURE__ */ b("div", {
734
+ className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",
735
+ children: /* @__PURE__ */ b("div", {
736
+ className: "w-full max-w-2xl max-h-[90vh] overflow-y-auto rounded-lg border border-border bg-card shadow-xl",
737
+ children: /* @__PURE__ */ x("div", {
738
+ className: "p-6",
739
+ children: [/* @__PURE__ */ x("div", {
740
+ className: "flex items-center justify-between mb-4",
741
+ children: [/* @__PURE__ */ b("h3", {
742
+ className: "text-lg font-semibold text-foreground",
743
+ children: "Order Details"
744
+ }), /* @__PURE__ */ b("button", {
745
+ type: "button",
746
+ onClick: () => N(!1),
747
+ className: "rounded p-1.5 text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",
748
+ children: /* @__PURE__ */ b(_, { className: "h-5 w-5" })
749
+ })]
750
+ }), /* @__PURE__ */ x("div", {
751
+ className: "space-y-4",
752
+ children: [
753
+ /* @__PURE__ */ x("div", {
754
+ className: "grid grid-cols-2 gap-4",
755
+ children: [
756
+ /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
757
+ className: "text-xs text-muted-foreground",
758
+ children: "Order ID"
759
+ }), /* @__PURE__ */ x("p", {
760
+ className: "text-sm font-medium text-foreground",
761
+ children: ["#", A.id]
762
+ })] }),
763
+ /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
764
+ className: "text-xs text-muted-foreground",
765
+ children: "Status"
766
+ }), /* @__PURE__ */ b("span", {
767
+ className: t("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium mt-0.5", (C[A.status] || C.pending).color),
768
+ children: (C[A.status] || C.pending).label
769
+ })] }),
770
+ /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
771
+ className: "text-xs text-muted-foreground",
772
+ children: "Customer"
773
+ }), /* @__PURE__ */ b("p", {
774
+ className: "text-sm font-medium text-foreground",
775
+ children: A.customerName || "N/A"
776
+ })] }),
777
+ /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
778
+ className: "text-xs text-muted-foreground",
779
+ children: "Order Time"
780
+ }), /* @__PURE__ */ b("p", {
781
+ className: "text-sm font-medium text-foreground",
782
+ children: E(A.orderDate)
783
+ })] })
784
+ ]
785
+ }),
786
+ /* @__PURE__ */ x("div", {
787
+ className: "border-t border-border pt-4",
788
+ children: [/* @__PURE__ */ b("h4", {
789
+ className: "text-sm font-medium text-foreground mb-3",
790
+ children: "Order Items"
791
+ }), /* @__PURE__ */ b("div", {
792
+ className: "space-y-2",
793
+ children: A.items.map((e, t) => /* @__PURE__ */ x("div", {
794
+ className: "flex justify-between items-start",
795
+ children: [/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
796
+ className: "text-sm font-medium text-foreground",
797
+ children: e.name
798
+ }), /* @__PURE__ */ x("p", {
799
+ className: "text-xs text-muted-foreground",
800
+ children: [
801
+ r(e.price, { minimumFractionDigits: 0 }),
802
+ " x",
803
+ " ",
804
+ e.quantity
805
+ ]
806
+ })] }), /* @__PURE__ */ b("p", {
807
+ className: "text-sm font-medium text-foreground",
808
+ children: r(e.price * e.quantity, { minimumFractionDigits: 0 })
809
+ })]
810
+ }, t))
811
+ })]
812
+ }),
813
+ /* @__PURE__ */ x("div", {
814
+ className: "border-t border-border pt-4 space-y-2",
815
+ children: [
816
+ /* @__PURE__ */ x("div", {
817
+ className: "flex justify-between text-sm text-muted-foreground",
818
+ children: [/* @__PURE__ */ b("span", { children: "Subtotal" }), /* @__PURE__ */ b("span", { children: r(A.subtotal, { minimumFractionDigits: 0 }) })]
819
+ }),
820
+ /* @__PURE__ */ x("div", {
821
+ className: "flex justify-between text-sm text-muted-foreground",
822
+ children: [/* @__PURE__ */ b("span", { children: "Delivery Fee" }), /* @__PURE__ */ b("span", { children: r(A.deliveryFee, { minimumFractionDigits: 0 }) })]
823
+ }),
824
+ /* @__PURE__ */ x("div", {
825
+ className: "flex justify-between text-sm text-muted-foreground",
826
+ children: [/* @__PURE__ */ b("span", { children: "Tax" }), /* @__PURE__ */ b("span", { children: r(A.taxes, { minimumFractionDigits: 0 }) })]
827
+ }),
828
+ /* @__PURE__ */ x("div", {
829
+ className: "flex justify-between font-semibold text-foreground pt-2 border-t border-border",
830
+ children: [/* @__PURE__ */ b("span", { children: "Total" }), /* @__PURE__ */ b("span", { children: r(A.total, { minimumFractionDigits: 0 }) })]
831
+ })
832
+ ]
833
+ }),
834
+ A.fulfillmentType === "delivery" && A.deliveryAddress && /* @__PURE__ */ x("div", {
835
+ className: "border-t border-border pt-4",
836
+ children: [/* @__PURE__ */ x("h4", {
837
+ className: "text-sm font-medium text-foreground mb-2 flex items-center gap-1.5",
838
+ children: [/* @__PURE__ */ b(u, { className: "h-4 w-4 text-muted-foreground" }), "Delivery Address"]
839
+ }), /* @__PURE__ */ x("p", {
840
+ className: "text-sm text-muted-foreground",
841
+ children: [
842
+ A.deliveryAddress.street,
843
+ ", ",
844
+ A.deliveryAddress.area,
845
+ /* @__PURE__ */ b("br", {}),
846
+ A.deliveryAddress.city,
847
+ " - ",
848
+ A.deliveryAddress.pincode
849
+ ]
850
+ })]
851
+ }),
852
+ /* @__PURE__ */ x("div", {
853
+ className: "flex gap-3 mt-6",
854
+ children: [/* @__PURE__ */ b("button", {
855
+ type: "button",
856
+ onClick: () => N(!1),
857
+ className: "flex-1 rounded-md border border-border px-4 py-2 text-sm font-medium text-foreground hover:bg-muted transition-colors",
858
+ children: "Close"
859
+ }), A.status === "pending" && /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b("button", {
860
+ type: "button",
861
+ onClick: () => z(A.id, "accept"),
862
+ className: "flex-1 rounded-md bg-green-500/10 px-4 py-2 text-sm font-medium text-green-600 dark:text-green-400 hover:bg-green-500/20 transition-colors",
863
+ children: "Accept Order"
864
+ }), /* @__PURE__ */ b("button", {
865
+ type: "button",
866
+ onClick: () => z(A.id, "reject"),
867
+ className: "flex-1 rounded-md bg-red-500/10 px-4 py-2 text-sm font-medium text-red-600 dark:text-red-400 hover:bg-red-500/20 transition-colors",
868
+ children: "Reject Order"
869
+ })] })]
870
+ })
871
+ ]
872
+ })]
873
+ })
874
+ })
875
+ })]
876
+ });
877
+ };
878
+ //#endregion
879
+ export { O as OrderManagementPage };
880
+
881
+ //# sourceMappingURL=OrderManagementPage.js.map