@burdenoff/microfe-kadaikodi 2026.704.1 → 2026.704.2

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 (76) hide show
  1. package/dist/kadaikodi/hooks/useKadaikodiApi.js +77 -26
  2. package/dist/kadaikodi/hooks/useKadaikodiApi.js.map +1 -1
  3. package/dist/kadaikodi/pages/admin/AdminAnalyticsPage.js +341 -461
  4. package/dist/kadaikodi/pages/admin/AdminAnalyticsPage.js.map +1 -1
  5. package/dist/kadaikodi/pages/admin/AdminDashboard.js +115 -399
  6. package/dist/kadaikodi/pages/admin/AdminDashboard.js.map +1 -1
  7. package/dist/kadaikodi/pages/admin/AdminFinancialPage.js +140 -283
  8. package/dist/kadaikodi/pages/admin/AdminFinancialPage.js.map +1 -1
  9. package/dist/kadaikodi/pages/admin/AdminOrdersPage.js +282 -453
  10. package/dist/kadaikodi/pages/admin/AdminOrdersPage.js.map +1 -1
  11. package/dist/kadaikodi/pages/admin/AdminProfilePage.js +115 -242
  12. package/dist/kadaikodi/pages/admin/AdminProfilePage.js.map +1 -1
  13. package/dist/kadaikodi/pages/admin/AdminSettingsPage.js +2 -2
  14. package/dist/kadaikodi/pages/admin/AdminSettingsPage.js.map +1 -1
  15. package/dist/kadaikodi/pages/admin/CartManagementPage.js.map +1 -1
  16. package/dist/kadaikodi/pages/admin/UserManagementPage.js.map +1 -1
  17. package/dist/kadaikodi/pages/cart-owner/AnalyticsDashboard.js +503 -627
  18. package/dist/kadaikodi/pages/cart-owner/AnalyticsDashboard.js.map +1 -1
  19. package/dist/kadaikodi/pages/cart-owner/BusinessSettingsPage.js +339 -282
  20. package/dist/kadaikodi/pages/cart-owner/BusinessSettingsPage.js.map +1 -1
  21. package/dist/kadaikodi/pages/cart-owner/CartOwnerDashboard.js +323 -422
  22. package/dist/kadaikodi/pages/cart-owner/CartOwnerDashboard.js.map +1 -1
  23. package/dist/kadaikodi/pages/cart-owner/CartOwnerProfilePage.js +374 -383
  24. package/dist/kadaikodi/pages/cart-owner/CartOwnerProfilePage.js.map +1 -1
  25. package/dist/kadaikodi/pages/cart-owner/CartServiceConfigPage.js +249 -208
  26. package/dist/kadaikodi/pages/cart-owner/CartServiceConfigPage.js.map +1 -1
  27. package/dist/kadaikodi/pages/cart-owner/InventoryManagementPage.js +1 -1
  28. package/dist/kadaikodi/pages/cart-owner/InventoryManagementPage.js.map +1 -1
  29. package/dist/kadaikodi/pages/cart-owner/OrderManagementPage.js +1 -1
  30. package/dist/kadaikodi/pages/cart-owner/OrderManagementPage.js.map +1 -1
  31. package/dist/kadaikodi/pages/cart-owner/StaffManagementPage.js +171 -627
  32. package/dist/kadaikodi/pages/cart-owner/StaffManagementPage.js.map +1 -1
  33. package/dist/kadaikodi/pages/common/HelpSupportPage.js +331 -415
  34. package/dist/kadaikodi/pages/common/HelpSupportPage.js.map +1 -1
  35. package/dist/kadaikodi/pages/common/NotificationCenterPage.js +18 -670
  36. package/dist/kadaikodi/pages/common/NotificationCenterPage.js.map +1 -1
  37. package/dist/kadaikodi/pages/common/SettingsPage.js.map +1 -1
  38. package/dist/kadaikodi/pages/customer/CheckoutPage.js +4 -2
  39. package/dist/kadaikodi/pages/customer/CheckoutPage.js.map +1 -1
  40. package/dist/kadaikodi/pages/customer/CustomerDashboard.js +191 -369
  41. package/dist/kadaikodi/pages/customer/CustomerDashboard.js.map +1 -1
  42. package/dist/kadaikodi/pages/customer/CustomerProfilePage.js +233 -389
  43. package/dist/kadaikodi/pages/customer/CustomerProfilePage.js.map +1 -1
  44. package/dist/kadaikodi/pages/customer/DirectServiceBookingPage.js.map +1 -1
  45. package/dist/kadaikodi/pages/customer/OrderHistoryPage.js.map +1 -1
  46. package/dist/kadaikodi/pages/customer/OrderTrackingPage.js.map +1 -1
  47. package/dist/kadaikodi/pages/customer/PaymentMethodsPage.js +76 -118
  48. package/dist/kadaikodi/pages/customer/PaymentMethodsPage.js.map +1 -1
  49. package/dist/kadaikodi/pages/customer/ReviewsPage.js.map +1 -1
  50. package/dist/kadaikodi/pages/customer/SavedAddressesPage.js +135 -213
  51. package/dist/kadaikodi/pages/customer/SavedAddressesPage.js.map +1 -1
  52. package/dist/kadaikodi/pages/investor/InvestmentDetailsPage.js +272 -774
  53. package/dist/kadaikodi/pages/investor/InvestmentDetailsPage.js.map +1 -1
  54. package/dist/kadaikodi/pages/investor/InvestmentOpportunitiesPage.js +232 -343
  55. package/dist/kadaikodi/pages/investor/InvestmentOpportunitiesPage.js.map +1 -1
  56. package/dist/kadaikodi/pages/investor/InvestorAnalyticsPage.js +112 -600
  57. package/dist/kadaikodi/pages/investor/InvestorAnalyticsPage.js.map +1 -1
  58. package/dist/kadaikodi/pages/investor/InvestorDashboard.js +127 -294
  59. package/dist/kadaikodi/pages/investor/InvestorDashboard.js.map +1 -1
  60. package/dist/kadaikodi/pages/investor/InvestorInvestmentsPage.js +204 -290
  61. package/dist/kadaikodi/pages/investor/InvestorInvestmentsPage.js.map +1 -1
  62. package/dist/kadaikodi/pages/investor/InvestorPortfolioPage.js +159 -500
  63. package/dist/kadaikodi/pages/investor/InvestorPortfolioPage.js.map +1 -1
  64. package/dist/kadaikodi/pages/investor/InvestorProfilePage.js +399 -487
  65. package/dist/kadaikodi/pages/investor/InvestorProfilePage.js.map +1 -1
  66. package/dist/kadaikodi/pages/worker/TaskDetailsPage.js +13 -13
  67. package/dist/kadaikodi/pages/worker/TaskDetailsPage.js.map +1 -1
  68. package/dist/kadaikodi/pages/worker/WorkerDashboard.js +192 -296
  69. package/dist/kadaikodi/pages/worker/WorkerDashboard.js.map +1 -1
  70. package/dist/kadaikodi/pages/worker/WorkerOrdersPage.js +245 -397
  71. package/dist/kadaikodi/pages/worker/WorkerOrdersPage.js.map +1 -1
  72. package/dist/kadaikodi/pages/worker/WorkerProfilePage.js +85 -117
  73. package/dist/kadaikodi/pages/worker/WorkerProfilePage.js.map +1 -1
  74. package/dist/kadaikodi/pages/worker/WorkerSchedulePage.js +177 -395
  75. package/dist/kadaikodi/pages/worker/WorkerSchedulePage.js.map +1 -1
  76. package/package.json +1 -1
@@ -2,166 +2,73 @@ import { useKadaikodi as e } from "../../context/KadaikodiContext.js";
2
2
  import { cn as t } from "../../utils/cn.js";
3
3
  import { PageLayout as n } from "../../components/PageLayout.js";
4
4
  import { MetricsCard as r } from "../../components/MetricsCard.js";
5
- import { formatCurrency as i } from "../../utils/formatters.js";
6
- import { useEffect as a, useState as o } from "react";
7
- import { Award as s, BarChart3 as c, IndianRupee as l, Loader2 as u, ShoppingBag as d, Star as f, Timer as p, Users as m, Zap as h } from "lucide-react";
8
- import { jsx as g, jsxs as _ } from "react/jsx-runtime";
9
- import { EmphasisPanel as v, NextSteps as y, PagePurpose as b } from "@burdenoff/fe-libs/ui";
5
+ import { useAdminAnalytics as i, useDashboardStats as a, useOrders as o, useProviders as s } from "../../hooks/useKadaikodiApi.js";
6
+ import { formatCurrency as c } from "../../utils/formatters.js";
7
+ import { useMemo as l, useState as u } from "react";
8
+ import { Award as d, BarChart3 as f, IndianRupee as p, Loader2 as m, ShoppingBag as h, Star as g, Store as _, TrendingUp as v, Users as y, Zap as b } from "lucide-react";
9
+ import { jsx as x, jsxs as S } from "react/jsx-runtime";
10
+ import { EmphasisPanel as C, NextSteps as w, PagePurpose as T } from "@burdenoff/fe-libs/ui";
10
11
  //#region src/kadaikodi/pages/admin/AdminAnalyticsPage.tsx
11
- function x() {
12
- let { currentUser: x, navigateTo: S } = e(), [C, w] = o(null), [T, E] = o(!0), [D, O] = o("month"), [k, A] = o("overview");
13
- a(() => {
14
- E(!0);
15
- let e = setTimeout(() => {
16
- w({
17
- revenue: {
18
- total: 125e5,
19
- growth: 15.2,
20
- thisMonth: 21e5,
21
- lastMonth: 185e4
22
- },
23
- orders: {
24
- total: 45230,
25
- growth: 8.7,
26
- pending: 156,
27
- completed: 44890,
28
- cancelled: 184,
29
- averageOrderValue: 276,
30
- ordersToday: 89
31
- },
32
- users: {
33
- total: 12450,
34
- growth: 12.3,
35
- active: 9870,
36
- newThisMonth: 456,
37
- customers: 9850,
38
- cartOwners: 1240,
39
- workers: 890,
40
- investors: 470
41
- },
42
- carts: {
43
- total: 1240,
44
- active: 1156,
45
- pending: 84,
46
- topPerforming: [
47
- {
48
- id: "c1",
49
- name: "South Indian Express",
50
- revenue: 285e3,
51
- orders: 1250,
52
- rating: 4.8
53
- },
54
- {
55
- id: "c2",
56
- name: "Mumbai Street Chaat",
57
- revenue: 245e3,
58
- orders: 980,
59
- rating: 4.7
60
- },
61
- {
62
- id: "c3",
63
- name: "Delhi Paratha Corner",
64
- revenue: 198e3,
65
- orders: 876,
66
- rating: 4.6
67
- },
68
- {
69
- id: "c4",
70
- name: "Bangalore Dosa House",
71
- revenue: 176e3,
72
- orders: 743,
73
- rating: 4.9
74
- },
75
- {
76
- id: "c5",
77
- name: "Kolkata Fish Fry",
78
- revenue: 154e3,
79
- orders: 632,
80
- rating: 4.5
81
- }
82
- ]
83
- },
84
- performance: {
85
- averageDeliveryTime: 28,
86
- customerSatisfaction: 4.6,
87
- platformFee: 8.5,
88
- operatingCosts: 21e5,
89
- netProfit: 85e4
90
- },
91
- geography: { topCities: [
92
- {
93
- city: "Bangalore",
94
- orders: 15670,
95
- revenue: 425e4
96
- },
97
- {
98
- city: "Mumbai",
99
- orders: 12340,
100
- revenue: 389e4
101
- },
102
- {
103
- city: "Delhi",
104
- orders: 9870,
105
- revenue: 298e4
106
- },
107
- {
108
- city: "Hyderabad",
109
- orders: 7650,
110
- revenue: 214e4
111
- },
112
- {
113
- city: "Chennai",
114
- orders: 6540,
115
- revenue: 189e4
116
- }
117
- ] }
118
- }), E(!1);
119
- }, 800);
120
- return () => clearTimeout(e);
121
- }, [D]);
122
- let j = (e) => e >= 1e7 ? `₹${(e / 1e7).toFixed(1)}Cr` : e >= 1e5 ? `₹${(e / 1e5).toFixed(1)}L` : i(e, { minimumFractionDigits: 0 }), M = (e) => e === 0 ? /* @__PURE__ */ g(s, { className: "h-5 w-5 text-status-warning-text" }) : e === 1 ? /* @__PURE__ */ g(s, { className: "h-5 w-5 text-text-secondary" }) : e === 2 ? /* @__PURE__ */ g(s, { className: "h-5 w-5 text-status-warning-text" }) : /* @__PURE__ */ g(c, { className: "h-5 w-5 text-text-secondary" });
123
- if (T || !C) return /* @__PURE__ */ g(n, {
12
+ function E() {
13
+ let { navigateTo: E } = e(), { data: D, isLoading: O } = a(), { data: k, isLoading: A } = i(), { data: j = [], isLoading: M } = s(), { data: N = [], isLoading: P } = o({}), [F, I] = u("overview"), L = O || A || M || P, R = (e) => e >= 1e7 ? `₹${(e / 1e7).toFixed(1)}Cr` : e >= 1e5 ? `₹${(e / 1e5).toFixed(1)}L` : c(e, { minimumFractionDigits: 0 }), z = l(() => {
14
+ let e = N.length, t = N.filter((e) => e.status === "delivered").length, n = N.filter((e) => e.status === "cancelled").length, r = N.filter((e) => e.status === "pending" || e.status === "confirmed").length, i = /* @__PURE__ */ new Date();
15
+ return i.setHours(0, 0, 0, 0), {
16
+ total: e,
17
+ completed: t,
18
+ cancelled: n,
19
+ pending: r,
20
+ ordersToday: N.filter((e) => new Date(e.orderDate).getTime() >= i.getTime()).length,
21
+ avgOrderValue: D && D.totalOrders > 0 ? D.totalRevenue / D.totalOrders : 0
22
+ };
23
+ }, [N, D]), B = l(() => j.filter((e) => !e.isOpen).length, [j]), V = l(() => {
24
+ let e = k?.revenueByCategory ?? [], t = e.reduce((e, t) => e + t.revenue, 0);
25
+ return e.map((e) => ({
26
+ ...e,
27
+ percentage: t > 0 ? e.revenue / t * 100 : 0
28
+ }));
29
+ }, [k]), H = k?.topProviders ?? [], U = k?.customerGrowth ?? [], W = k?.categoryDistribution ?? [], G = (e, t) => t > 0 ? e / t * 100 : 0, K = (e) => e < 3 ? /* @__PURE__ */ x(d, { className: "h-5 w-5 text-status-warning-text" }) : /* @__PURE__ */ x(f, { className: "h-5 w-5 text-text-secondary" });
30
+ if (L || !D) return /* @__PURE__ */ x(n, {
124
31
  title: "Platform Analytics",
125
32
  description: "Loading analytics...",
126
- children: /* @__PURE__ */ _("div", {
33
+ children: /* @__PURE__ */ S("div", {
127
34
  className: "flex flex-col items-center justify-center py-20",
128
- children: [/* @__PURE__ */ g(u, { className: "h-10 w-10 animate-spin text-text-secondary mb-4" }), /* @__PURE__ */ g("p", {
35
+ children: [/* @__PURE__ */ x(m, { className: "h-10 w-10 animate-spin text-text-secondary mb-4" }), /* @__PURE__ */ x("p", {
129
36
  className: "text-text-secondary",
130
37
  children: "Loading analytics..."
131
38
  })]
132
39
  })
133
40
  });
134
- let N = [
41
+ let q = [
135
42
  {
136
43
  key: "overview",
137
44
  label: "Overview",
138
- icon: c
45
+ icon: f
139
46
  },
140
47
  {
141
48
  key: "revenue",
142
49
  label: "Revenue",
143
- icon: l
50
+ icon: p
144
51
  },
145
52
  {
146
53
  key: "users",
147
54
  label: "Users",
148
- icon: m
55
+ icon: y
149
56
  },
150
57
  {
151
58
  key: "performance",
152
59
  label: "Performance",
153
- icon: h
60
+ icon: b
154
61
  }
155
62
  ];
156
- return /* @__PURE__ */ _(n, {
63
+ return /* @__PURE__ */ S(n, {
157
64
  title: "Platform Analytics",
158
65
  description: "Comprehensive platform metrics and trends",
159
66
  children: [
160
- /* @__PURE__ */ g(b, {
67
+ /* @__PURE__ */ x(T, {
161
68
  className: "mb-6",
162
- children: "Your bird's-eye view of how Kadaikodi is performing. Use this page to spot revenue and order trends, see which carts and cities drive the most business, and understand where users are growing — so you can decide where to invest, which carts to promote, and where service quality needs attention. Switch the period filter and tabs to drill into revenue, users, and operational performance."
69
+ children: "Your bird's-eye view of how Kadaikodi is performing. Spot revenue and order trends, see which carts and categories drive the most business, and understand where customers are growing — so you can decide where to invest and which carts to promote. Switch tabs to drill into revenue, users, and operational performance."
163
70
  }),
164
- /* @__PURE__ */ g(y, {
71
+ /* @__PURE__ */ x(w, {
165
72
  storageKey: "kadaikodi-admin-analytics",
166
73
  className: "mb-6",
167
74
  steps: [
@@ -169,505 +76,478 @@ function x() {
169
76
  id: "review-carts",
170
77
  label: "Review top-performing carts",
171
78
  description: "See which carts drive the most revenue and orders.",
172
- onClick: () => A("overview")
79
+ onClick: () => I("overview")
173
80
  },
174
81
  {
175
82
  id: "check-revenue",
176
- label: "Break down revenue by city",
177
- description: "Find your strongest markets in the Revenue tab.",
178
- onClick: () => A("revenue")
83
+ label: "Break down revenue by category",
84
+ description: "Find your strongest categories in the Revenue tab.",
85
+ onClick: () => I("revenue")
179
86
  },
180
87
  {
181
88
  id: "manage-carts",
182
89
  label: "Approve pending carts",
183
90
  description: "Onboard the carts waiting for review.",
184
- onClick: () => S("/admin/carts")
91
+ onClick: () => E("/admin/carts"),
92
+ done: B === 0
185
93
  }
186
94
  ]
187
95
  }),
188
- /* @__PURE__ */ _("div", {
189
- className: "flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-6",
190
- children: [/* @__PURE__ */ _("select", {
191
- value: D,
192
- onChange: (e) => O(e.target.value),
193
- className: "rounded-lg border border-border-subtle bg-bg-surface py-2 px-3 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] w-fit",
194
- children: [
195
- /* @__PURE__ */ g("option", {
196
- value: "today",
197
- children: "Today"
198
- }),
199
- /* @__PURE__ */ g("option", {
200
- value: "week",
201
- children: "This Week"
202
- }),
203
- /* @__PURE__ */ g("option", {
204
- value: "month",
205
- children: "This Month"
206
- }),
207
- /* @__PURE__ */ g("option", {
208
- value: "quarter",
209
- children: "This Quarter"
210
- }),
211
- /* @__PURE__ */ g("option", {
212
- value: "year",
213
- children: "This Year"
214
- })
215
- ]
216
- }), /* @__PURE__ */ _("span", {
96
+ /* @__PURE__ */ x("div", {
97
+ className: "flex justify-end mb-6",
98
+ children: /* @__PURE__ */ S("span", {
217
99
  className: "text-sm text-text-secondary",
218
100
  children: ["Last updated: ", (/* @__PURE__ */ new Date()).toLocaleString("en-IN")]
219
- })]
101
+ })
220
102
  }),
221
- /* @__PURE__ */ _(v, {
103
+ /* @__PURE__ */ S(C, {
222
104
  className: "mb-8",
223
- children: [/* @__PURE__ */ g("h2", {
105
+ children: [/* @__PURE__ */ x("h2", {
224
106
  className: "mb-4 text-lg font-semibold text-text-primary",
225
107
  children: "Key Metrics"
226
- }), /* @__PURE__ */ _("div", {
108
+ }), /* @__PURE__ */ S("div", {
227
109
  className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",
228
110
  children: [
229
- /* @__PURE__ */ g(r, {
111
+ /* @__PURE__ */ x(r, {
230
112
  featured: !0,
231
- icon: /* @__PURE__ */ g(l, { className: "h-5 w-5" }),
232
- value: j(C.revenue.total),
233
- label: "Total Revenue",
234
- trend: "up",
235
- trendValue: `+${C.revenue.growth}%`
113
+ icon: /* @__PURE__ */ x(p, { className: "h-5 w-5" }),
114
+ value: R(D.totalRevenue),
115
+ label: "Total Revenue"
236
116
  }),
237
- /* @__PURE__ */ g(r, {
238
- icon: /* @__PURE__ */ g(d, { className: "h-5 w-5" }),
239
- value: C.orders.total.toLocaleString("en-IN"),
240
- label: "Total Orders",
241
- trend: "up",
242
- trendValue: `+${C.orders.growth}%`
117
+ /* @__PURE__ */ x(r, {
118
+ icon: /* @__PURE__ */ x(h, { className: "h-5 w-5" }),
119
+ value: D.totalOrders.toLocaleString("en-IN"),
120
+ label: "Total Orders"
243
121
  }),
244
- /* @__PURE__ */ g(r, {
245
- icon: /* @__PURE__ */ g(m, { className: "h-5 w-5" }),
246
- value: C.users.active.toLocaleString("en-IN"),
247
- label: "Active Users",
248
- trend: "up",
249
- trendValue: `+${C.users.growth}%`
122
+ /* @__PURE__ */ x(r, {
123
+ icon: /* @__PURE__ */ x(y, { className: "h-5 w-5" }),
124
+ value: D.activeCustomers.toLocaleString("en-IN"),
125
+ label: "Active Customers"
250
126
  }),
251
- /* @__PURE__ */ g(r, {
252
- icon: /* @__PURE__ */ g(c, { className: "h-5 w-5" }),
253
- value: C.carts.active.toLocaleString("en-IN"),
127
+ /* @__PURE__ */ x(r, {
128
+ icon: /* @__PURE__ */ x(_, { className: "h-5 w-5" }),
129
+ value: D.activeProviders.toLocaleString("en-IN"),
254
130
  label: "Active Carts",
255
- trendValue: `${C.carts.pending} pending`
131
+ trendValue: `${B} pending`
256
132
  })
257
133
  ]
258
134
  })]
259
135
  }),
260
- /* @__PURE__ */ _("div", {
136
+ /* @__PURE__ */ S("div", {
261
137
  className: "rounded-lg border border-border-subtle bg-bg-surface mb-8",
262
- children: [/* @__PURE__ */ g("div", {
138
+ children: [/* @__PURE__ */ x("div", {
263
139
  className: "border-b border-border-subtle",
264
- children: /* @__PURE__ */ g("nav", {
140
+ children: /* @__PURE__ */ x("nav", {
265
141
  className: "flex -mb-px overflow-x-auto",
266
- children: N.map((e) => {
142
+ children: q.map((e) => {
267
143
  let n = e.icon;
268
- return /* @__PURE__ */ _("button", {
144
+ return /* @__PURE__ */ S("button", {
269
145
  type: "button",
270
- onClick: () => A(e.key),
271
- className: t("flex items-center gap-2 py-3 px-4 sm:px-6 text-sm font-medium whitespace-nowrap border-b-2 transition-colors", k === e.key ? "border-primary text-primary" : "border-transparent text-text-secondary hover:text-text-primary"),
272
- children: [/* @__PURE__ */ g(n, { className: "h-4 w-4" }), /* @__PURE__ */ g("span", {
146
+ onClick: () => I(e.key),
147
+ className: t("flex items-center gap-2 py-3 px-4 sm:px-6 text-sm font-medium whitespace-nowrap border-b-2 transition-colors", F === e.key ? "border-primary text-primary" : "border-transparent text-text-secondary hover:text-text-primary"),
148
+ children: [/* @__PURE__ */ x(n, { className: "h-4 w-4" }), /* @__PURE__ */ x("span", {
273
149
  className: "hidden sm:inline",
274
150
  children: e.label
275
151
  })]
276
152
  }, e.key);
277
153
  })
278
154
  })
279
- }), /* @__PURE__ */ _("div", {
155
+ }), /* @__PURE__ */ S("div", {
280
156
  className: "p-4 sm:p-6",
281
157
  children: [
282
- k === "overview" && /* @__PURE__ */ _("div", {
158
+ F === "overview" && /* @__PURE__ */ S("div", {
283
159
  className: "space-y-8",
284
- children: [/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("h3", {
160
+ children: [/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("h3", {
285
161
  className: "text-lg font-semibold text-text-primary mb-4",
286
162
  children: "Order Status Distribution"
287
- }), /* @__PURE__ */ _("div", {
163
+ }), z.total > 0 ? /* @__PURE__ */ S("div", {
288
164
  className: "grid grid-cols-1 sm:grid-cols-3 gap-4",
289
165
  children: [
290
- /* @__PURE__ */ _("div", {
166
+ /* @__PURE__ */ S("div", {
291
167
  className: "rounded-lg border border-status-success-text/30 bg-status-success-bg-subtle p-4",
292
168
  children: [
293
- /* @__PURE__ */ g("p", {
169
+ /* @__PURE__ */ x("p", {
294
170
  className: "text-sm text-status-success-text",
295
171
  children: "Completed Orders"
296
172
  }),
297
- /* @__PURE__ */ g("p", {
173
+ /* @__PURE__ */ x("p", {
298
174
  className: "text-2xl font-bold text-status-success-text",
299
- children: C.orders.completed.toLocaleString("en-IN")
175
+ children: z.completed.toLocaleString("en-IN")
300
176
  }),
301
- /* @__PURE__ */ _("p", {
177
+ /* @__PURE__ */ S("p", {
302
178
  className: "text-sm text-status-success-text/80",
303
- children: [(C.orders.completed / C.orders.total * 100).toFixed(1), "% of total"]
179
+ children: [G(z.completed, z.total).toFixed(1), "% of total"]
304
180
  })
305
181
  ]
306
182
  }),
307
- /* @__PURE__ */ _("div", {
183
+ /* @__PURE__ */ S("div", {
308
184
  className: "rounded-lg border border-status-warning-text/30 bg-status-warning-bg-subtle p-4",
309
185
  children: [
310
- /* @__PURE__ */ g("p", {
186
+ /* @__PURE__ */ x("p", {
311
187
  className: "text-sm text-status-warning-text",
312
188
  children: "Pending Orders"
313
189
  }),
314
- /* @__PURE__ */ g("p", {
190
+ /* @__PURE__ */ x("p", {
315
191
  className: "text-2xl font-bold text-status-warning-text",
316
- children: C.orders.pending.toLocaleString("en-IN")
192
+ children: z.pending.toLocaleString("en-IN")
317
193
  }),
318
- /* @__PURE__ */ _("p", {
194
+ /* @__PURE__ */ S("p", {
319
195
  className: "text-sm text-status-warning-text/80",
320
- children: [(C.orders.pending / C.orders.total * 100).toFixed(1), "% of total"]
196
+ children: [G(z.pending, z.total).toFixed(1), "% of total"]
321
197
  })
322
198
  ]
323
199
  }),
324
- /* @__PURE__ */ _("div", {
200
+ /* @__PURE__ */ S("div", {
325
201
  className: "rounded-lg border border-status-error-text/30 bg-status-error-bg-subtle p-4",
326
202
  children: [
327
- /* @__PURE__ */ g("p", {
203
+ /* @__PURE__ */ x("p", {
328
204
  className: "text-sm text-status-error-text",
329
205
  children: "Cancelled Orders"
330
206
  }),
331
- /* @__PURE__ */ g("p", {
207
+ /* @__PURE__ */ x("p", {
332
208
  className: "text-2xl font-bold text-status-error-text",
333
- children: C.orders.cancelled.toLocaleString("en-IN")
209
+ children: z.cancelled.toLocaleString("en-IN")
334
210
  }),
335
- /* @__PURE__ */ _("p", {
211
+ /* @__PURE__ */ S("p", {
336
212
  className: "text-sm text-status-error-text/80",
337
- children: [(C.orders.cancelled / C.orders.total * 100).toFixed(1), "% of total"]
213
+ children: [G(z.cancelled, z.total).toFixed(1), "% of total"]
338
214
  })
339
215
  ]
340
216
  })
341
217
  ]
342
- })] }), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("h3", {
218
+ }) : /* @__PURE__ */ x("p", {
219
+ className: "text-sm text-text-secondary",
220
+ children: "Order breakdowns will appear here once orders are placed."
221
+ })] }), /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("h3", {
343
222
  className: "text-lg font-semibold text-text-primary mb-4",
344
223
  children: "Top Performing Carts"
345
- }), /* @__PURE__ */ g("div", {
224
+ }), H.length > 0 ? /* @__PURE__ */ x("div", {
346
225
  className: "rounded-lg border border-border-subtle overflow-hidden",
347
- children: /* @__PURE__ */ _("table", {
226
+ children: /* @__PURE__ */ S("table", {
348
227
  className: "w-full",
349
- children: [/* @__PURE__ */ g("thead", { children: /* @__PURE__ */ _("tr", {
228
+ children: [/* @__PURE__ */ x("thead", { children: /* @__PURE__ */ S("tr", {
350
229
  className: "border-b border-border-subtle bg-bg-sunken/50",
351
230
  children: [
352
- /* @__PURE__ */ g("th", {
231
+ /* @__PURE__ */ x("th", {
353
232
  className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase",
354
233
  children: "Cart Name"
355
234
  }),
356
- /* @__PURE__ */ g("th", {
235
+ /* @__PURE__ */ x("th", {
357
236
  className: "px-4 py-3 text-right text-xs font-medium text-text-secondary uppercase",
358
237
  children: "Revenue"
359
238
  }),
360
- /* @__PURE__ */ g("th", {
239
+ /* @__PURE__ */ x("th", {
361
240
  className: "px-4 py-3 text-right text-xs font-medium text-text-secondary uppercase",
362
241
  children: "Orders"
363
242
  }),
364
- /* @__PURE__ */ g("th", {
243
+ /* @__PURE__ */ x("th", {
365
244
  className: "px-4 py-3 text-right text-xs font-medium text-text-secondary uppercase",
366
245
  children: "Rating"
367
246
  })
368
247
  ]
369
- }) }), /* @__PURE__ */ g("tbody", {
248
+ }) }), /* @__PURE__ */ x("tbody", {
370
249
  className: "divide-y divide-border",
371
- children: C.carts.topPerforming.map((e, t) => /* @__PURE__ */ _("tr", {
250
+ children: H.map((e, t) => /* @__PURE__ */ S("tr", {
372
251
  className: "hover:bg-accent/50 transition-colors",
373
252
  children: [
374
- /* @__PURE__ */ g("td", {
253
+ /* @__PURE__ */ x("td", {
375
254
  className: "px-4 py-3",
376
- children: /* @__PURE__ */ _("div", {
255
+ children: /* @__PURE__ */ S("div", {
377
256
  className: "flex items-center gap-2",
378
- children: [M(t), /* @__PURE__ */ g("span", {
257
+ children: [K(t), /* @__PURE__ */ x("span", {
379
258
  className: "text-sm font-medium text-text-primary",
380
259
  children: e.name
381
260
  })]
382
261
  })
383
262
  }),
384
- /* @__PURE__ */ g("td", {
263
+ /* @__PURE__ */ x("td", {
385
264
  className: "px-4 py-3 text-sm text-right font-medium text-text-primary",
386
- children: j(e.revenue)
265
+ children: R(e.revenue)
387
266
  }),
388
- /* @__PURE__ */ g("td", {
267
+ /* @__PURE__ */ x("td", {
389
268
  className: "px-4 py-3 text-sm text-right text-text-primary",
390
269
  children: e.orders.toLocaleString("en-IN")
391
270
  }),
392
- /* @__PURE__ */ g("td", {
271
+ /* @__PURE__ */ x("td", {
393
272
  className: "px-4 py-3 text-sm text-right text-text-primary",
394
- children: /* @__PURE__ */ _("span", {
273
+ children: /* @__PURE__ */ S("span", {
395
274
  className: "flex items-center justify-end gap-1",
396
- children: [/* @__PURE__ */ g(f, { className: "h-3.5 w-3.5 fill-status-warning-text text-status-warning-text" }), e.rating]
275
+ children: [/* @__PURE__ */ x(g, { className: "h-3.5 w-3.5 fill-status-warning-text text-status-warning-text" }), e.rating.toFixed(1)]
397
276
  })
398
277
  })
399
278
  ]
400
279
  }, e.id))
401
280
  })]
402
281
  })
282
+ }) : /* @__PURE__ */ x("p", {
283
+ className: "text-sm text-text-secondary",
284
+ children: "Top-performing carts will be ranked here once orders start flowing."
403
285
  })] })]
404
286
  }),
405
- k === "revenue" && /* @__PURE__ */ _("div", {
287
+ F === "revenue" && /* @__PURE__ */ S("div", {
406
288
  className: "space-y-8",
407
- children: [/* @__PURE__ */ _("div", {
289
+ children: [/* @__PURE__ */ S("div", {
408
290
  className: "grid grid-cols-1 md:grid-cols-3 gap-4",
409
291
  children: [
410
- /* @__PURE__ */ _("div", {
292
+ /* @__PURE__ */ S("div", {
411
293
  className: "rounded-lg border border-border-focus/30 bg-[var(--color-accent-soft)] p-6",
412
- children: [/* @__PURE__ */ g("h4", {
294
+ children: [/* @__PURE__ */ x("h4", {
413
295
  className: "text-sm font-medium text-text-primary mb-2",
414
- children: "This Month"
415
- }), /* @__PURE__ */ g("p", {
296
+ children: "Total Revenue"
297
+ }), /* @__PURE__ */ x("p", {
416
298
  className: "text-2xl font-bold text-text-primary",
417
- children: j(C.revenue.thisMonth)
299
+ children: R(D.totalRevenue)
418
300
  })]
419
301
  }),
420
- /* @__PURE__ */ _("div", {
302
+ /* @__PURE__ */ S("div", {
421
303
  className: "rounded-lg border border-border-subtle bg-bg-sunken/30 p-6",
422
- children: [/* @__PURE__ */ g("h4", {
304
+ children: [/* @__PURE__ */ x("h4", {
423
305
  className: "text-sm font-medium text-text-secondary mb-2",
424
- children: "Last Month"
425
- }), /* @__PURE__ */ g("p", {
306
+ children: "Total Orders"
307
+ }), /* @__PURE__ */ x("p", {
426
308
  className: "text-2xl font-bold text-text-primary",
427
- children: j(C.revenue.lastMonth)
309
+ children: D.totalOrders.toLocaleString("en-IN")
428
310
  })]
429
311
  }),
430
- /* @__PURE__ */ _("div", {
312
+ /* @__PURE__ */ S("div", {
431
313
  className: "rounded-lg border border-status-success-text/30 bg-status-success-bg-subtle p-6",
432
- children: [/* @__PURE__ */ g("h4", {
314
+ children: [/* @__PURE__ */ x("h4", {
433
315
  className: "text-sm font-medium text-status-success-text mb-2",
434
316
  children: "Average Order Value"
435
- }), /* @__PURE__ */ _("p", {
317
+ }), /* @__PURE__ */ x("p", {
436
318
  className: "text-2xl font-bold text-status-success-text",
437
- children: ["₹", C.orders.averageOrderValue]
319
+ children: R(z.avgOrderValue)
438
320
  })]
439
321
  })
440
322
  ]
441
- }), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("h3", {
323
+ }), /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("h3", {
442
324
  className: "text-lg font-semibold text-text-primary mb-4",
443
- children: "Revenue by City"
444
- }), /* @__PURE__ */ g("div", {
325
+ children: "Revenue by Category"
326
+ }), V.length > 0 ? /* @__PURE__ */ x("div", {
445
327
  className: "space-y-3",
446
- children: C.geography.topCities.map((e, t) => /* @__PURE__ */ _("div", {
328
+ children: V.map((e, t) => /* @__PURE__ */ S("div", {
447
329
  className: "flex items-center justify-between p-4 rounded-lg border border-border-subtle bg-bg-sunken/30",
448
- children: [/* @__PURE__ */ _("div", {
330
+ children: [/* @__PURE__ */ S("div", {
449
331
  className: "flex items-center gap-3",
450
- children: [M(t), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
451
- className: "font-medium text-text-primary",
452
- children: e.city
453
- }), /* @__PURE__ */ _("p", {
332
+ children: [K(t), /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
333
+ className: "font-medium text-text-primary capitalize",
334
+ children: e.category
335
+ }), /* @__PURE__ */ S("p", {
454
336
  className: "text-sm text-text-secondary",
455
337
  children: [e.orders.toLocaleString("en-IN"), " orders"]
456
338
  })] })]
457
- }), /* @__PURE__ */ _("div", {
339
+ }), /* @__PURE__ */ S("div", {
458
340
  className: "text-right",
459
- children: [/* @__PURE__ */ g("p", {
341
+ children: [/* @__PURE__ */ x("p", {
460
342
  className: "font-bold text-text-primary",
461
- children: j(e.revenue)
462
- }), /* @__PURE__ */ _("p", {
343
+ children: R(e.revenue)
344
+ }), /* @__PURE__ */ S("p", {
463
345
  className: "text-sm text-text-secondary",
464
- children: [(e.revenue / C.revenue.total * 100).toFixed(1), "%"]
346
+ children: [e.percentage.toFixed(1), "%"]
465
347
  })]
466
348
  })]
467
- }, e.city))
349
+ }, e.category))
350
+ }) : /* @__PURE__ */ x("p", {
351
+ className: "text-sm text-text-secondary",
352
+ children: "Category revenue will appear here once orders are recorded."
468
353
  })] })]
469
354
  }),
470
- k === "users" && /* @__PURE__ */ _("div", {
355
+ F === "users" && /* @__PURE__ */ S("div", {
471
356
  className: "space-y-8",
472
- children: [/* @__PURE__ */ g("div", {
473
- className: "grid grid-cols-1 md:grid-cols-4 gap-4",
474
- children: [
475
- {
476
- label: "Customers",
477
- value: C.users.customers,
478
- color: "blue"
479
- },
480
- {
481
- label: "Cart Owners",
482
- value: C.users.cartOwners,
483
- color: "green"
484
- },
485
- {
486
- label: "Workers",
487
- value: C.users.workers,
488
- color: "yellow"
489
- },
490
- {
491
- label: "Investors",
492
- value: C.users.investors,
493
- color: "purple"
494
- }
495
- ].map((e) => /* @__PURE__ */ _("div", {
496
- className: t("rounded-lg border p-4", `border-${e.color}-500/30 bg-${e.color}-500/10`),
497
- children: [
498
- /* @__PURE__ */ g("h4", {
499
- className: t("text-sm font-medium", `text-${e.color}-600 dark:text-${e.color}-400`),
500
- children: e.label
501
- }),
502
- /* @__PURE__ */ g("p", {
503
- className: t("text-2xl font-bold", `text-${e.color}-700 dark:text-${e.color}-300`),
504
- children: e.value.toLocaleString("en-IN")
505
- }),
506
- /* @__PURE__ */ _("p", {
507
- className: t("text-sm", `text-${e.color}-600/80 dark:text-${e.color}-400/80`),
508
- children: [(e.value / C.users.total * 100).toFixed(1), "%"]
357
+ children: [
358
+ /* @__PURE__ */ S("div", {
359
+ className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
360
+ children: [/* @__PURE__ */ S("div", {
361
+ className: "rounded-lg border border-border-subtle bg-bg-sunken/30 p-6",
362
+ children: [/* @__PURE__ */ S("div", {
363
+ className: "flex items-center gap-2 mb-2",
364
+ children: [/* @__PURE__ */ x(y, { className: "h-5 w-5 text-text-secondary" }), /* @__PURE__ */ x("h4", {
365
+ className: "text-sm font-medium text-text-secondary",
366
+ children: "Active Customers"
367
+ })]
368
+ }), /* @__PURE__ */ x("p", {
369
+ className: "text-3xl font-bold text-text-primary",
370
+ children: D.activeCustomers.toLocaleString("en-IN")
371
+ })]
372
+ }), /* @__PURE__ */ S("div", {
373
+ className: "rounded-lg border border-border-subtle bg-bg-sunken/30 p-6",
374
+ children: [/* @__PURE__ */ S("div", {
375
+ className: "flex items-center gap-2 mb-2",
376
+ children: [/* @__PURE__ */ x(_, { className: "h-5 w-5 text-text-secondary" }), /* @__PURE__ */ x("h4", {
377
+ className: "text-sm font-medium text-text-secondary",
378
+ children: "Active Cart Owners"
379
+ })]
380
+ }), /* @__PURE__ */ x("p", {
381
+ className: "text-3xl font-bold text-text-primary",
382
+ children: D.activeProviders.toLocaleString("en-IN")
383
+ })]
384
+ })]
385
+ }),
386
+ /* @__PURE__ */ S("div", {
387
+ className: "rounded-lg border border-border-subtle bg-bg-sunken/20 p-6",
388
+ children: [/* @__PURE__ */ x("h3", {
389
+ className: "text-lg font-semibold text-text-primary mb-4",
390
+ children: "Customer Growth"
391
+ }), U.length > 0 ? /* @__PURE__ */ x("div", {
392
+ className: "overflow-x-auto",
393
+ children: /* @__PURE__ */ S("table", {
394
+ className: "w-full",
395
+ children: [/* @__PURE__ */ x("thead", { children: /* @__PURE__ */ S("tr", {
396
+ className: "border-b border-border-subtle",
397
+ children: [
398
+ /* @__PURE__ */ x("th", {
399
+ className: "px-4 py-2 text-left text-xs font-medium text-text-secondary uppercase",
400
+ children: "Month"
401
+ }),
402
+ /* @__PURE__ */ x("th", {
403
+ className: "px-4 py-2 text-right text-xs font-medium text-text-secondary uppercase",
404
+ children: "New Customers"
405
+ }),
406
+ /* @__PURE__ */ x("th", {
407
+ className: "px-4 py-2 text-right text-xs font-medium text-text-secondary uppercase",
408
+ children: "Total Customers"
409
+ })
410
+ ]
411
+ }) }), /* @__PURE__ */ x("tbody", {
412
+ className: "divide-y divide-border",
413
+ children: U.map((e) => /* @__PURE__ */ S("tr", { children: [
414
+ /* @__PURE__ */ x("td", {
415
+ className: "px-4 py-2 text-sm font-medium text-text-primary",
416
+ children: e.month
417
+ }),
418
+ /* @__PURE__ */ S("td", {
419
+ className: "px-4 py-2 text-sm text-right text-text-primary",
420
+ children: ["+", e.newCustomers.toLocaleString("en-IN")]
421
+ }),
422
+ /* @__PURE__ */ x("td", {
423
+ className: "px-4 py-2 text-sm text-right text-text-primary",
424
+ children: e.totalCustomers.toLocaleString("en-IN")
425
+ })
426
+ ] }, e.month))
427
+ })]
509
428
  })
510
- ]
511
- }, e.label))
512
- }), /* @__PURE__ */ _("div", {
513
- className: "rounded-lg border border-border-subtle bg-bg-sunken/20 p-6",
514
- children: [/* @__PURE__ */ g("h3", {
429
+ }) : /* @__PURE__ */ x("p", {
430
+ className: "text-sm text-text-secondary",
431
+ children: "Customer growth trends will appear here as your customer base builds up."
432
+ })]
433
+ }),
434
+ W.length > 0 && /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("h3", {
515
435
  className: "text-lg font-semibold text-text-primary mb-4",
516
- children: "User Growth Insights"
517
- }), /* @__PURE__ */ _("div", {
436
+ children: "Cart Category Distribution"
437
+ }), /* @__PURE__ */ x("div", {
438
+ className: "space-y-3",
439
+ children: W.map((e) => /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ S("div", {
440
+ className: "flex items-center justify-between mb-1",
441
+ children: [/* @__PURE__ */ x("span", {
442
+ className: "text-sm font-medium text-text-primary capitalize",
443
+ children: e.category
444
+ }), /* @__PURE__ */ S("span", {
445
+ className: "text-sm text-text-secondary",
446
+ children: [
447
+ e.count.toLocaleString("en-IN"),
448
+ " (",
449
+ e.percentage.toFixed(1),
450
+ "%)"
451
+ ]
452
+ })]
453
+ }), /* @__PURE__ */ x("div", {
454
+ className: "w-full bg-bg-sunken rounded-full h-2",
455
+ children: /* @__PURE__ */ x("div", {
456
+ className: "bg-action-primary-bg h-2 rounded-full transition-all duration-300",
457
+ style: { width: `${e.percentage}%` }
458
+ })
459
+ })] }, e.category))
460
+ })] })
461
+ ]
462
+ }),
463
+ F === "performance" && /* @__PURE__ */ S("div", {
464
+ className: "space-y-8",
465
+ children: [/* @__PURE__ */ S("div", {
466
+ className: "grid grid-cols-1 md:grid-cols-3 gap-6",
467
+ children: [
468
+ /* @__PURE__ */ S("div", {
469
+ className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
470
+ children: [
471
+ /* @__PURE__ */ S("div", {
472
+ className: "flex items-center gap-2 mb-2",
473
+ children: [/* @__PURE__ */ x(g, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ x("h4", {
474
+ className: "text-sm font-medium text-text-secondary",
475
+ children: "Customer Satisfaction"
476
+ })]
477
+ }),
478
+ /* @__PURE__ */ S("p", {
479
+ className: "text-3xl font-bold text-text-primary flex items-center gap-1",
480
+ children: [/* @__PURE__ */ x(g, { className: "h-6 w-6 fill-status-warning-text text-status-warning-text" }), D.avgRating > 0 ? D.avgRating.toFixed(1) : "—"]
481
+ }),
482
+ /* @__PURE__ */ x("p", {
483
+ className: "text-sm text-text-secondary mt-1",
484
+ children: "Average rating across carts"
485
+ })
486
+ ]
487
+ }),
488
+ /* @__PURE__ */ S("div", {
489
+ className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
490
+ children: [
491
+ /* @__PURE__ */ S("div", {
492
+ className: "flex items-center gap-2 mb-2",
493
+ children: [/* @__PURE__ */ x(v, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ x("h4", {
494
+ className: "text-sm font-medium text-text-secondary",
495
+ children: "Completion Rate"
496
+ })]
497
+ }),
498
+ /* @__PURE__ */ x("p", {
499
+ className: "text-3xl font-bold text-text-primary",
500
+ children: z.total > 0 ? `${G(z.completed, z.total).toFixed(1)}%` : "—"
501
+ }),
502
+ /* @__PURE__ */ x("p", {
503
+ className: "text-sm text-text-secondary mt-1",
504
+ children: "Orders delivered"
505
+ })
506
+ ]
507
+ }),
508
+ /* @__PURE__ */ S("div", {
509
+ className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
510
+ children: [
511
+ /* @__PURE__ */ S("div", {
512
+ className: "flex items-center gap-2 mb-2",
513
+ children: [/* @__PURE__ */ x(f, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ x("h4", {
514
+ className: "text-sm font-medium text-text-secondary",
515
+ children: "Cancellation Rate"
516
+ })]
517
+ }),
518
+ /* @__PURE__ */ x("p", {
519
+ className: "text-3xl font-bold text-text-primary",
520
+ children: z.total > 0 ? `${G(z.cancelled, z.total).toFixed(1)}%` : "—"
521
+ }),
522
+ /* @__PURE__ */ x("p", {
523
+ className: "text-sm text-text-secondary mt-1",
524
+ children: "Orders cancelled"
525
+ })
526
+ ]
527
+ })
528
+ ]
529
+ }), /* @__PURE__ */ S("div", {
530
+ className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
531
+ children: [/* @__PURE__ */ x("h3", {
532
+ className: "text-lg font-semibold text-text-primary mb-4",
533
+ children: "Today's Activity"
534
+ }), /* @__PURE__ */ S("div", {
518
535
  className: "grid grid-cols-1 md:grid-cols-2 gap-6",
519
- children: [/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
536
+ children: [/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
520
537
  className: "text-sm text-text-secondary mb-2",
521
- children: "New Users This Month"
522
- }), /* @__PURE__ */ g("p", {
538
+ children: "Orders Today"
539
+ }), /* @__PURE__ */ x("p", {
523
540
  className: "text-3xl font-bold text-text-primary",
524
- children: C.users.newThisMonth
525
- })] }), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
541
+ children: z.ordersToday.toLocaleString("en-IN")
542
+ })] }), /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
526
543
  className: "text-sm text-text-secondary mb-2",
527
- children: "Active Users Rate"
528
- }), /* @__PURE__ */ _("p", {
529
- className: "text-3xl font-bold text-status-success-text",
530
- children: [(C.users.active / C.users.total * 100).toFixed(1), "%"]
544
+ children: "Pending Orders"
545
+ }), /* @__PURE__ */ x("p", {
546
+ className: "text-3xl font-bold text-status-warning-text",
547
+ children: D.pendingOrders.toLocaleString("en-IN")
531
548
  })] })]
532
549
  })]
533
550
  })]
534
- }),
535
- k === "performance" && /* @__PURE__ */ _("div", {
536
- className: "space-y-8",
537
- children: [
538
- /* @__PURE__ */ _("div", {
539
- className: "grid grid-cols-1 md:grid-cols-3 gap-6",
540
- children: [
541
- /* @__PURE__ */ _("div", {
542
- className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
543
- children: [
544
- /* @__PURE__ */ _("div", {
545
- className: "flex items-center gap-2 mb-2",
546
- children: [/* @__PURE__ */ g(p, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ g("h4", {
547
- className: "text-sm font-medium text-text-secondary",
548
- children: "Avg Delivery Time"
549
- })]
550
- }),
551
- /* @__PURE__ */ _("p", {
552
- className: "text-3xl font-bold text-text-primary",
553
- children: [C.performance.averageDeliveryTime, " min"]
554
- }),
555
- /* @__PURE__ */ g("p", {
556
- className: "text-sm text-text-secondary mt-1",
557
- children: "Target: < 30 min"
558
- })
559
- ]
560
- }),
561
- /* @__PURE__ */ _("div", {
562
- className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
563
- children: [
564
- /* @__PURE__ */ _("div", {
565
- className: "flex items-center gap-2 mb-2",
566
- children: [/* @__PURE__ */ g(f, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ g("h4", {
567
- className: "text-sm font-medium text-text-secondary",
568
- children: "Customer Satisfaction"
569
- })]
570
- }),
571
- /* @__PURE__ */ _("p", {
572
- className: "text-3xl font-bold text-text-primary flex items-center gap-1",
573
- children: [/* @__PURE__ */ g(f, { className: "h-6 w-6 fill-status-warning-text text-status-warning-text" }), C.performance.customerSatisfaction]
574
- }),
575
- /* @__PURE__ */ g("p", {
576
- className: "text-sm text-text-secondary mt-1",
577
- children: "Based on ratings"
578
- })
579
- ]
580
- }),
581
- /* @__PURE__ */ _("div", {
582
- className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
583
- children: [
584
- /* @__PURE__ */ _("div", {
585
- className: "flex items-center gap-2 mb-2",
586
- children: [/* @__PURE__ */ g(l, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ g("h4", {
587
- className: "text-sm font-medium text-text-secondary",
588
- children: "Platform Fee"
589
- })]
590
- }),
591
- /* @__PURE__ */ _("p", {
592
- className: "text-3xl font-bold text-text-primary",
593
- children: [C.performance.platformFee, "%"]
594
- }),
595
- /* @__PURE__ */ g("p", {
596
- className: "text-sm text-text-secondary mt-1",
597
- children: "Per transaction"
598
- })
599
- ]
600
- })
601
- ]
602
- }),
603
- /* @__PURE__ */ _("div", {
604
- className: "rounded-lg border border-border-subtle bg-bg-sunken/20 p-6",
605
- children: [
606
- /* @__PURE__ */ g("h3", {
607
- className: "text-lg font-semibold text-text-primary mb-4",
608
- children: "Financial Performance"
609
- }),
610
- /* @__PURE__ */ _("div", {
611
- className: "grid grid-cols-1 md:grid-cols-3 gap-6",
612
- children: [
613
- /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
614
- className: "text-sm text-text-secondary mb-2",
615
- children: "Operating Costs"
616
- }), /* @__PURE__ */ g("p", {
617
- className: "text-2xl font-bold text-status-error-text",
618
- children: j(C.performance.operatingCosts)
619
- })] }),
620
- /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
621
- className: "text-sm text-text-secondary mb-2",
622
- children: "Total Revenue"
623
- }), /* @__PURE__ */ g("p", {
624
- className: "text-2xl font-bold text-text-primary",
625
- children: j(C.revenue.total)
626
- })] }),
627
- /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
628
- className: "text-sm text-text-secondary mb-2",
629
- children: "Net Profit"
630
- }), /* @__PURE__ */ g("p", {
631
- className: "text-2xl font-bold text-status-success-text",
632
- children: j(C.performance.netProfit)
633
- })] })
634
- ]
635
- }),
636
- /* @__PURE__ */ _("div", {
637
- className: "mt-4 rounded-lg border border-border-subtle bg-bg-surface p-4",
638
- children: [/* @__PURE__ */ g("p", {
639
- className: "text-sm text-text-secondary",
640
- children: "Profit Margin"
641
- }), /* @__PURE__ */ _("p", {
642
- className: "text-xl font-bold text-text-primary",
643
- children: [(C.performance.netProfit / C.revenue.total * 100).toFixed(1), "%"]
644
- })]
645
- })
646
- ]
647
- }),
648
- /* @__PURE__ */ _("div", {
649
- className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
650
- children: [/* @__PURE__ */ g("h3", {
651
- className: "text-lg font-semibold text-text-primary mb-4",
652
- children: "Today's Performance"
653
- }), /* @__PURE__ */ _("div", {
654
- className: "grid grid-cols-1 md:grid-cols-2 gap-6",
655
- children: [/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
656
- className: "text-sm text-text-secondary mb-2",
657
- children: "Orders Today"
658
- }), /* @__PURE__ */ g("p", {
659
- className: "text-3xl font-bold text-text-primary",
660
- children: C.orders.ordersToday
661
- })] }), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
662
- className: "text-sm text-text-secondary mb-2",
663
- children: "Estimated Revenue"
664
- }), /* @__PURE__ */ g("p", {
665
- className: "text-3xl font-bold text-status-success-text",
666
- children: j(C.orders.ordersToday * C.orders.averageOrderValue)
667
- })] })]
668
- })]
669
- })
670
- ]
671
551
  })
672
552
  ]
673
553
  })]
@@ -676,6 +556,6 @@ function x() {
676
556
  });
677
557
  }
678
558
  //#endregion
679
- export { x as AdminAnalyticsPage };
559
+ export { E as AdminAnalyticsPage };
680
560
 
681
561
  //# sourceMappingURL=AdminAnalyticsPage.js.map