@burdenoff/microfe-kadaikodi 2026.626.2 → 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 (96) hide show
  1. package/dist/kadaikodi/hooks/useKadaikodiApi.js +260 -105
  2. package/dist/kadaikodi/hooks/useKadaikodiApi.js.map +1 -1
  3. package/dist/kadaikodi/pages/HomePage.js +4 -4
  4. package/dist/kadaikodi/pages/HomePage.js.map +1 -1
  5. package/dist/kadaikodi/pages/admin/AdminAnalyticsPage.js +341 -461
  6. package/dist/kadaikodi/pages/admin/AdminAnalyticsPage.js.map +1 -1
  7. package/dist/kadaikodi/pages/admin/AdminDashboard.js +115 -399
  8. package/dist/kadaikodi/pages/admin/AdminDashboard.js.map +1 -1
  9. package/dist/kadaikodi/pages/admin/AdminFinancialPage.js +140 -283
  10. package/dist/kadaikodi/pages/admin/AdminFinancialPage.js.map +1 -1
  11. package/dist/kadaikodi/pages/admin/AdminOrdersPage.js +282 -453
  12. package/dist/kadaikodi/pages/admin/AdminOrdersPage.js.map +1 -1
  13. package/dist/kadaikodi/pages/admin/AdminProfilePage.js +115 -242
  14. package/dist/kadaikodi/pages/admin/AdminProfilePage.js.map +1 -1
  15. package/dist/kadaikodi/pages/admin/AdminSettingsPage.js +2 -2
  16. package/dist/kadaikodi/pages/admin/AdminSettingsPage.js.map +1 -1
  17. package/dist/kadaikodi/pages/admin/CartManagementPage.js +279 -333
  18. package/dist/kadaikodi/pages/admin/CartManagementPage.js.map +1 -1
  19. package/dist/kadaikodi/pages/admin/UserManagementPage.js +299 -372
  20. package/dist/kadaikodi/pages/admin/UserManagementPage.js.map +1 -1
  21. package/dist/kadaikodi/pages/cart-owner/AnalyticsDashboard.js +503 -627
  22. package/dist/kadaikodi/pages/cart-owner/AnalyticsDashboard.js.map +1 -1
  23. package/dist/kadaikodi/pages/cart-owner/BusinessSettingsPage.js +339 -282
  24. package/dist/kadaikodi/pages/cart-owner/BusinessSettingsPage.js.map +1 -1
  25. package/dist/kadaikodi/pages/cart-owner/CartOwnerDashboard.js +329 -432
  26. package/dist/kadaikodi/pages/cart-owner/CartOwnerDashboard.js.map +1 -1
  27. package/dist/kadaikodi/pages/cart-owner/CartOwnerProfilePage.js +374 -384
  28. package/dist/kadaikodi/pages/cart-owner/CartOwnerProfilePage.js.map +1 -1
  29. package/dist/kadaikodi/pages/cart-owner/CartServiceConfigPage.js +249 -208
  30. package/dist/kadaikodi/pages/cart-owner/CartServiceConfigPage.js.map +1 -1
  31. package/dist/kadaikodi/pages/cart-owner/InventoryManagementPage.js +276 -279
  32. package/dist/kadaikodi/pages/cart-owner/InventoryManagementPage.js.map +1 -1
  33. package/dist/kadaikodi/pages/cart-owner/OrderManagementPage.js +229 -447
  34. package/dist/kadaikodi/pages/cart-owner/OrderManagementPage.js.map +1 -1
  35. package/dist/kadaikodi/pages/cart-owner/StaffManagementPage.js +171 -627
  36. package/dist/kadaikodi/pages/cart-owner/StaffManagementPage.js.map +1 -1
  37. package/dist/kadaikodi/pages/common/HelpSupportPage.js +331 -415
  38. package/dist/kadaikodi/pages/common/HelpSupportPage.js.map +1 -1
  39. package/dist/kadaikodi/pages/common/NotificationCenterPage.js +18 -670
  40. package/dist/kadaikodi/pages/common/NotificationCenterPage.js.map +1 -1
  41. package/dist/kadaikodi/pages/common/SettingsPage.js +34 -46
  42. package/dist/kadaikodi/pages/common/SettingsPage.js.map +1 -1
  43. package/dist/kadaikodi/pages/customer/BookingDetailsPage.js +193 -447
  44. package/dist/kadaikodi/pages/customer/BookingDetailsPage.js.map +1 -1
  45. package/dist/kadaikodi/pages/customer/CartDetailPage.js +6 -6
  46. package/dist/kadaikodi/pages/customer/CartDetailPage.js.map +1 -1
  47. package/dist/kadaikodi/pages/customer/CartDiscoveryPage.js +2 -2
  48. package/dist/kadaikodi/pages/customer/CartDiscoveryPage.js.map +1 -1
  49. package/dist/kadaikodi/pages/customer/CheckoutPage.js +4 -2
  50. package/dist/kadaikodi/pages/customer/CheckoutPage.js.map +1 -1
  51. package/dist/kadaikodi/pages/customer/CustomerDashboard.js +191 -369
  52. package/dist/kadaikodi/pages/customer/CustomerDashboard.js.map +1 -1
  53. package/dist/kadaikodi/pages/customer/CustomerProfilePage.js +233 -389
  54. package/dist/kadaikodi/pages/customer/CustomerProfilePage.js.map +1 -1
  55. package/dist/kadaikodi/pages/customer/DirectServiceBookingPage.js +255 -215
  56. package/dist/kadaikodi/pages/customer/DirectServiceBookingPage.js.map +1 -1
  57. package/dist/kadaikodi/pages/customer/FavoritesPage.js +141 -178
  58. package/dist/kadaikodi/pages/customer/FavoritesPage.js.map +1 -1
  59. package/dist/kadaikodi/pages/customer/OrderHistoryPage.js.map +1 -1
  60. package/dist/kadaikodi/pages/customer/OrderTrackingPage.js +155 -161
  61. package/dist/kadaikodi/pages/customer/OrderTrackingPage.js.map +1 -1
  62. package/dist/kadaikodi/pages/customer/PaymentMethodsPage.js +76 -118
  63. package/dist/kadaikodi/pages/customer/PaymentMethodsPage.js.map +1 -1
  64. package/dist/kadaikodi/pages/customer/ReviewsPage.js +14 -140
  65. package/dist/kadaikodi/pages/customer/ReviewsPage.js.map +1 -1
  66. package/dist/kadaikodi/pages/customer/SavedAddressesPage.js +135 -213
  67. package/dist/kadaikodi/pages/customer/SavedAddressesPage.js.map +1 -1
  68. package/dist/kadaikodi/pages/investor/InvestmentDetailsPage.js +272 -774
  69. package/dist/kadaikodi/pages/investor/InvestmentDetailsPage.js.map +1 -1
  70. package/dist/kadaikodi/pages/investor/InvestmentOpportunitiesPage.js +258 -523
  71. package/dist/kadaikodi/pages/investor/InvestmentOpportunitiesPage.js.map +1 -1
  72. package/dist/kadaikodi/pages/investor/InvestorAnalyticsPage.js +112 -600
  73. package/dist/kadaikodi/pages/investor/InvestorAnalyticsPage.js.map +1 -1
  74. package/dist/kadaikodi/pages/investor/InvestorDashboard.js +128 -295
  75. package/dist/kadaikodi/pages/investor/InvestorDashboard.js.map +1 -1
  76. package/dist/kadaikodi/pages/investor/InvestorInvestmentsPage.js +205 -291
  77. package/dist/kadaikodi/pages/investor/InvestorInvestmentsPage.js.map +1 -1
  78. package/dist/kadaikodi/pages/investor/InvestorPortfolioPage.js +159 -500
  79. package/dist/kadaikodi/pages/investor/InvestorPortfolioPage.js.map +1 -1
  80. package/dist/kadaikodi/pages/investor/InvestorProfilePage.js +426 -514
  81. package/dist/kadaikodi/pages/investor/InvestorProfilePage.js.map +1 -1
  82. package/dist/kadaikodi/pages/worker/TaskDetailsPage.js +231 -225
  83. package/dist/kadaikodi/pages/worker/TaskDetailsPage.js.map +1 -1
  84. package/dist/kadaikodi/pages/worker/WorkerDashboard.js +197 -301
  85. package/dist/kadaikodi/pages/worker/WorkerDashboard.js.map +1 -1
  86. package/dist/kadaikodi/pages/worker/WorkerOrdersPage.js +247 -399
  87. package/dist/kadaikodi/pages/worker/WorkerOrdersPage.js.map +1 -1
  88. package/dist/kadaikodi/pages/worker/WorkerProfilePage.js +294 -327
  89. package/dist/kadaikodi/pages/worker/WorkerProfilePage.js.map +1 -1
  90. package/dist/kadaikodi/pages/worker/WorkerSchedulePage.js +179 -397
  91. package/dist/kadaikodi/pages/worker/WorkerSchedulePage.js.map +1 -1
  92. package/package.json +1 -1
  93. package/dist/kadaikodi/mocks/data.js +0 -1517
  94. package/dist/kadaikodi/mocks/data.js.map +0 -1
  95. package/dist/kadaikodi/mocks/users.js +0 -34
  96. package/dist/kadaikodi/mocks/users.js.map +0 -1
@@ -2,176 +2,103 @@ import { useKadaikodi as e } from "../../context/KadaikodiContext.js";
2
2
  import { cn as t } from "../../utils/cn.js";
3
3
  import { PageLayout as n } from "../../components/PageLayout.js";
4
4
  import { EmptyState as r } from "../../components/EmptyState.js";
5
- import { useCallback as i, useEffect as a, useMemo as o, useState as s } from "react";
6
- import { ChevronLeft as c, ChevronRight as l, Edit3 as u, Loader2 as d, Search as f, Shield as p, Smartphone as m, Trash2 as h, UserCheck as g, UserX as _, Users as v, X as y } from "lucide-react";
7
- import { Fragment as b, jsx as x, jsxs as S } from "react/jsx-runtime";
8
- import { EmphasisPanel as C, PagePurpose as w } from "@burdenoff/fe-libs/ui";
5
+ import { useProviders as i } from "../../hooks/useKadaikodiApi.js";
6
+ import { useMemo as a, useState as o } from "react";
7
+ import { ChevronLeft as s, ChevronRight as c, Edit3 as l, Loader2 as u, Search as d, Shield as f, Smartphone as p, Trash2 as m, UserCheck as h, UserX as g, Users as _, X as v } from "lucide-react";
8
+ import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
9
+ import { EmphasisPanel as S, PagePurpose as C } from "@burdenoff/fe-libs/ui";
9
10
  //#region src/kadaikodi/pages/admin/UserManagementPage.tsx
10
- var T = [
11
- {
12
- id: "user-001",
13
- email: "rahul.sharma@gmail.com",
14
- phone: "+91 98765 43210",
15
- firstName: "Rahul",
16
- lastName: "Sharma",
17
- role: "customer",
18
- isEmailVerified: !0,
19
- isPhoneVerified: !0,
20
- profilePicture: "https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?w=100",
21
- status: "active",
22
- lastLoginTime: "2024-06-23T16:45:00Z",
23
- totalOrders: 45,
24
- totalSpent: 12350,
25
- registrationDate: "2024-01-15T08:30:00Z",
26
- deviceInfo: "iPhone 14 Pro"
27
- },
28
- {
29
- id: "user-002",
30
- email: "priya.patel@gmail.com",
31
- phone: "+91 98765 43211",
32
- firstName: "Priya",
33
- lastName: "Patel",
34
- role: "cart_owner",
35
- isEmailVerified: !0,
36
- isPhoneVerified: !0,
37
- profilePicture: "https://images.unsplash.com/photo-1494790108377-be9c29b29330?w=100",
38
- status: "active",
39
- lastLoginTime: "2024-06-24T09:15:00Z",
40
- totalEarnings: 285e3,
41
- kycStatus: "verified",
42
- registrationDate: "2023-08-20T10:15:00Z",
43
- deviceInfo: "Android Samsung"
44
- },
45
- {
46
- id: "user-003",
47
- email: "amit.kumar@gmail.com",
48
- phone: "+91 98765 43212",
49
- firstName: "Amit",
50
- lastName: "Kumar",
51
- role: "worker",
52
- isEmailVerified: !0,
53
- isPhoneVerified: !1,
54
- profilePicture: "https://images.unsplash.com/photo-1500648767791-00dcc994a43e?w=100",
55
- status: "suspended",
56
- lastLoginTime: "2024-06-15T14:30:00Z",
57
- totalEarnings: 45e3,
58
- kycStatus: "pending",
59
- registrationDate: "2024-02-10T12:45:00Z",
60
- deviceInfo: "Web Browser"
61
- },
62
- {
63
- id: "user-004",
64
- email: "sneha.investor@gmail.com",
65
- phone: "+91 98765 43213",
66
- firstName: "Sneha",
67
- lastName: "Reddy",
68
- role: "investor",
69
- isEmailVerified: !0,
70
- isPhoneVerified: !0,
71
- profilePicture: "https://images.unsplash.com/photo-1438761681033-6461ffad8d80?w=100",
72
- status: "active",
73
- lastLoginTime: "2024-06-24T10:30:00Z",
74
- kycStatus: "verified",
75
- riskScore: 2.1,
76
- registrationDate: "2023-12-01T15:20:00Z",
77
- deviceInfo: "MacBook Pro"
78
- },
79
- {
80
- id: "user-005",
81
- email: "new.user@gmail.com",
82
- phone: "+91 98765 43214",
83
- firstName: "New",
84
- lastName: "User",
85
- role: "customer",
86
- isEmailVerified: !1,
87
- isPhoneVerified: !1,
88
- profilePicture: "",
89
- status: "pending",
90
- registrationDate: "2024-06-24T09:00:00Z",
91
- deviceInfo: "iPhone 15"
92
- }
93
- ];
94
- function E() {
95
- let { navigateTo: E } = e(), [D, O] = s([]), [k, A] = s(!0), [j, M] = s(null), [N, P] = s(!1), [F, I] = s("edit"), [L, R] = s({
11
+ var w = (e) => ({
12
+ id: e.ownerId ?? e.id,
13
+ email: "",
14
+ phone: "",
15
+ firstName: e.name,
16
+ lastName: "",
17
+ role: "cart_owner",
18
+ isEmailVerified: !!e.isVerified,
19
+ isPhoneVerified: !1,
20
+ profilePicture: "",
21
+ status: e.isOpen ? "active" : "inactive",
22
+ registrationDate: e.createdAt ?? (/* @__PURE__ */ new Date(0)).toISOString()
23
+ });
24
+ function T() {
25
+ let { navigateTo: T } = e(), { data: E = [], isLoading: D } = i(), [O, k] = o(null), [A, j] = o(!1), [M, N] = o("edit"), [P, F] = o({
96
26
  firstName: "",
97
27
  lastName: "",
98
28
  email: "",
99
29
  phone: "",
100
30
  role: ""
101
- }), [z, B] = s(1), [V, H] = s({
31
+ }), [I, L] = o(1), [R, z] = o({
102
32
  role: "",
103
33
  status: "",
104
34
  searchQuery: "",
105
35
  sortBy: "recent",
106
36
  registrationDate: ""
107
- }), [U] = s({
108
- totalUsers: 2456,
109
- activeUsers: 2134,
110
- newUsers: 89,
111
- verifiedUsers: 2021,
112
- customers: 1845,
113
- cartOwners: 342,
114
- workers: 156,
115
- investors: 113
116
- }), W = i(() => {
117
- A(!0), setTimeout(() => {
118
- let e = [...T];
119
- if (V.searchQuery) {
120
- let t = V.searchQuery.toLowerCase();
121
- e = e.filter((e) => e.firstName.toLowerCase().includes(t) || e.lastName.toLowerCase().includes(t) || e.email.toLowerCase().includes(t) || e.phone.includes(t));
122
- }
123
- if (V.role && (e = e.filter((e) => e.role === V.role)), V.status && (e = e.filter((e) => e.status === V.status)), V.registrationDate) {
124
- let t = parseInt(V.registrationDate), n = /* @__PURE__ */ new Date(Date.now() - t * 864e5);
125
- e = e.filter((e) => new Date(e.registrationDate) >= n);
126
- }
127
- switch (V.sortBy) {
128
- case "name":
129
- e.sort((e, t) => e.firstName.localeCompare(t.firstName));
130
- break;
131
- case "activity":
132
- e.sort((e, t) => {
133
- let n = e.lastLoginTime ? new Date(e.lastLoginTime).getTime() : 0;
134
- return (t.lastLoginTime ? new Date(t.lastLoginTime).getTime() : 0) - n;
135
- });
136
- break;
137
- default: e.sort((e, t) => new Date(t.registrationDate).getTime() - new Date(e.registrationDate).getTime());
138
- }
139
- O(e), A(!1);
140
- }, 800);
141
- }, [V]);
142
- a(() => {
143
- W();
144
- }, [W]);
145
- let G = (e, t) => {
146
- H((n) => ({
37
+ }), B = a(() => E.map(w), [E]), V = a(() => {
38
+ let e = [...B];
39
+ if (R.searchQuery) {
40
+ let t = R.searchQuery.toLowerCase();
41
+ e = e.filter((e) => e.firstName.toLowerCase().includes(t) || e.lastName.toLowerCase().includes(t) || e.email.toLowerCase().includes(t) || e.phone.includes(t));
42
+ }
43
+ if (R.role && (e = e.filter((e) => e.role === R.role)), R.status && (e = e.filter((e) => e.status === R.status)), R.registrationDate) {
44
+ let t = parseInt(R.registrationDate), n = /* @__PURE__ */ new Date(Date.now() - t * 864e5);
45
+ e = e.filter((e) => new Date(e.registrationDate) >= n);
46
+ }
47
+ switch (R.sortBy) {
48
+ case "name":
49
+ e.sort((e, t) => e.firstName.localeCompare(t.firstName));
50
+ break;
51
+ case "activity":
52
+ e.sort((e, t) => {
53
+ let n = e.lastLoginTime ? new Date(e.lastLoginTime).getTime() : 0;
54
+ return (t.lastLoginTime ? new Date(t.lastLoginTime).getTime() : 0) - n;
55
+ });
56
+ break;
57
+ default: e.sort((e, t) => new Date(t.registrationDate).getTime() - new Date(e.registrationDate).getTime());
58
+ }
59
+ return e;
60
+ }, [B, R]), H = a(() => {
61
+ let e = Date.now() - 30 * 864e5;
62
+ return {
63
+ totalUsers: B.length,
64
+ activeUsers: B.filter((e) => e.status === "active").length,
65
+ newUsers: B.filter((t) => new Date(t.registrationDate).getTime() >= e).length,
66
+ verifiedUsers: B.filter((e) => e.isEmailVerified).length,
67
+ customers: B.filter((e) => e.role === "customer").length,
68
+ cartOwners: B.filter((e) => e.role === "cart_owner").length,
69
+ workers: B.filter((e) => e.role === "worker").length,
70
+ investors: B.filter((e) => e.role === "investor").length
71
+ };
72
+ }, [B]), U = (e, t) => {
73
+ z((n) => ({
147
74
  ...n,
148
75
  [e]: t
149
- })), B(1);
150
- }, K = (e, t) => {
76
+ })), L(1);
77
+ }, W = (e, t) => {
151
78
  if (t === "suspend" || t === "activate" || t === "verify") {
152
79
  let n = t === "suspend" ? `User ${e.firstName} ${e.lastName} suspended` : t === "activate" ? `User ${e.firstName} ${e.lastName} activated` : `User ${e.firstName} ${e.lastName} verified`;
153
- alert(n), W();
80
+ alert(n);
154
81
  return;
155
82
  }
156
- M(e), I(t), R({
83
+ k(e), N(t), F({
157
84
  firstName: e.firstName,
158
85
  lastName: e.lastName,
159
86
  email: e.email,
160
87
  phone: e.phone,
161
88
  role: e.role
162
- }), P(!0);
163
- }, q = () => {
164
- j && (alert(`User ${j.firstName} ${j.lastName} deleted`), P(!1), W());
165
- }, J = () => {
166
- alert("User updated successfully"), P(!1), W();
167
- }, Y = (e) => new Date(e).toLocaleDateString("en-IN", {
89
+ }), j(!0);
90
+ }, G = () => {
91
+ O && (alert(`User ${O.firstName} ${O.lastName} deleted`), j(!1));
92
+ }, K = () => {
93
+ alert("User updated successfully"), j(!1);
94
+ }, q = (e) => new Date(e).toLocaleDateString("en-IN", {
168
95
  year: "numeric",
169
96
  month: "short",
170
97
  day: "numeric"
171
- }), X = (e) => `₹${e.toLocaleString("en-IN")}`, Z = o(() => {
172
- let e = (z - 1) * 10;
173
- return D.slice(e, e + 10);
174
- }, [D, z]), Q = (e) => /* @__PURE__ */ x("span", {
98
+ }), J = (e) => `₹${e.toLocaleString("en-IN")}`, Y = a(() => {
99
+ let e = (I - 1) * 10;
100
+ return V.slice(e, e + 10);
101
+ }, [V, I]), X = (e) => /* @__PURE__ */ b("span", {
175
102
  className: t("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium", {
176
103
  customer: "bg-[var(--color-accent-soft)] text-text-primary",
177
104
  cart_owner: "bg-status-success-bg-subtle text-status-success-text",
@@ -186,203 +113,203 @@ function E() {
186
113
  investor: "Investor",
187
114
  admin: "Admin"
188
115
  }[e] ?? e
189
- }), $ = (e) => /* @__PURE__ */ x("span", {
116
+ }), Z = (e) => /* @__PURE__ */ b("span", {
190
117
  className: t("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium capitalize", {
191
118
  active: "bg-status-success-bg-subtle text-status-success-text",
192
- inactive: "bg-secondary text-secondary-foreground",
119
+ inactive: "bg-bg-sunken text-text-secondary",
193
120
  suspended: "bg-status-error-bg-subtle text-status-error-text",
194
121
  pending: "bg-status-warning-bg-subtle text-status-warning-text"
195
122
  }[e]),
196
123
  children: e
197
124
  });
198
- return k ? /* @__PURE__ */ x(n, {
125
+ return D ? /* @__PURE__ */ b(n, {
199
126
  title: "User Management",
200
127
  description: "Loading users...",
201
- children: /* @__PURE__ */ S("div", {
128
+ children: /* @__PURE__ */ x("div", {
202
129
  className: "flex flex-col items-center justify-center py-20",
203
- children: [/* @__PURE__ */ x(d, { className: "h-10 w-10 animate-spin text-text-secondary mb-4" }), /* @__PURE__ */ x("p", {
130
+ children: [/* @__PURE__ */ b(u, { className: "h-10 w-10 animate-spin text-text-secondary mb-4" }), /* @__PURE__ */ b("p", {
204
131
  className: "text-text-secondary",
205
132
  children: "Loading users..."
206
133
  })]
207
134
  })
208
- }) : /* @__PURE__ */ S(n, {
135
+ }) : /* @__PURE__ */ x(n, {
209
136
  title: "User Management",
210
- description: `${U.totalUsers.toLocaleString("en-IN")} registered users on the platform`,
137
+ description: `${H.totalUsers.toLocaleString("en-IN")} registered users on the platform`,
211
138
  children: [
212
- /* @__PURE__ */ x(w, {
139
+ /* @__PURE__ */ b(C, {
213
140
  className: "mb-6",
214
141
  children: "The directory of everyone on Kadaikodi — customers, cart owners, workers and investors. Use this page to find an account, verify or activate users, edit roles, and step in when someone needs help or needs to be removed. Filter by role or status to manage one group at a time."
215
142
  }),
216
- /* @__PURE__ */ S(C, {
143
+ /* @__PURE__ */ x(S, {
217
144
  className: "mb-6",
218
- children: [/* @__PURE__ */ x("h2", {
145
+ children: [/* @__PURE__ */ b("h2", {
219
146
  className: "mb-4 text-lg font-semibold text-text-primary",
220
147
  children: "User Base Overview"
221
- }), /* @__PURE__ */ x("div", {
148
+ }), /* @__PURE__ */ b("div", {
222
149
  className: "grid grid-cols-2 sm:grid-cols-4 lg:grid-cols-8 gap-3",
223
150
  children: [
224
151
  {
225
152
  label: "Total Users",
226
- value: U.totalUsers.toLocaleString("en-IN"),
153
+ value: H.totalUsers.toLocaleString("en-IN"),
227
154
  cls: ""
228
155
  },
229
156
  {
230
157
  label: "Active",
231
- value: U.activeUsers.toLocaleString("en-IN"),
158
+ value: H.activeUsers.toLocaleString("en-IN"),
232
159
  cls: "bg-status-success-bg-subtle border-status-success-text/30"
233
160
  },
234
161
  {
235
162
  label: "New (30d)",
236
- value: U.newUsers.toString(),
163
+ value: H.newUsers.toString(),
237
164
  cls: "bg-[var(--color-accent-soft)] border-border-focus/30"
238
165
  },
239
166
  {
240
167
  label: "Verified",
241
- value: U.verifiedUsers.toLocaleString("en-IN"),
168
+ value: H.verifiedUsers.toLocaleString("en-IN"),
242
169
  cls: "bg-accent-purple-subtle border-accent-purple/30"
243
170
  },
244
171
  {
245
172
  label: "Customers",
246
- value: U.customers.toLocaleString("en-IN"),
173
+ value: H.customers.toLocaleString("en-IN"),
247
174
  cls: ""
248
175
  },
249
176
  {
250
177
  label: "Cart Owners",
251
- value: U.cartOwners.toString(),
178
+ value: H.cartOwners.toString(),
252
179
  cls: ""
253
180
  },
254
181
  {
255
182
  label: "Workers",
256
- value: U.workers.toString(),
183
+ value: H.workers.toString(),
257
184
  cls: ""
258
185
  },
259
186
  {
260
187
  label: "Investors",
261
- value: U.investors.toString(),
188
+ value: H.investors.toString(),
262
189
  cls: ""
263
190
  }
264
- ].map((e) => /* @__PURE__ */ S("div", {
191
+ ].map((e) => /* @__PURE__ */ x("div", {
265
192
  className: t("rounded-lg border border-border-subtle bg-bg-surface p-3", e.cls),
266
- children: [/* @__PURE__ */ x("p", {
193
+ children: [/* @__PURE__ */ b("p", {
267
194
  className: "text-xs text-text-secondary",
268
195
  children: e.label
269
- }), /* @__PURE__ */ x("p", {
196
+ }), /* @__PURE__ */ b("p", {
270
197
  className: "text-lg font-bold text-text-primary",
271
198
  children: e.value
272
199
  })]
273
200
  }, e.label))
274
201
  })]
275
202
  }),
276
- /* @__PURE__ */ x("div", {
203
+ /* @__PURE__ */ b("div", {
277
204
  className: "rounded-lg border border-border-subtle bg-bg-surface p-4 mb-6",
278
- children: /* @__PURE__ */ S("div", {
205
+ children: /* @__PURE__ */ x("div", {
279
206
  className: "grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-5 gap-3",
280
207
  children: [
281
- /* @__PURE__ */ S("div", {
208
+ /* @__PURE__ */ x("div", {
282
209
  className: "relative",
283
- children: [/* @__PURE__ */ x(f, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-secondary" }), /* @__PURE__ */ x("input", {
210
+ children: [/* @__PURE__ */ b(d, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-secondary" }), /* @__PURE__ */ b("input", {
284
211
  type: "text",
285
212
  placeholder: "Search users...",
286
- value: V.searchQuery,
287
- onChange: (e) => G("searchQuery", e.target.value),
213
+ value: R.searchQuery,
214
+ onChange: (e) => U("searchQuery", e.target.value),
288
215
  className: "w-full rounded-lg border border-border-subtle bg-bg-surface py-2 pl-10 pr-4 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
289
216
  })]
290
217
  }),
291
- /* @__PURE__ */ S("select", {
292
- value: V.role,
293
- onChange: (e) => G("role", e.target.value),
218
+ /* @__PURE__ */ x("select", {
219
+ value: R.role,
220
+ onChange: (e) => U("role", e.target.value),
294
221
  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)]",
295
222
  children: [
296
- /* @__PURE__ */ x("option", {
223
+ /* @__PURE__ */ b("option", {
297
224
  value: "",
298
225
  children: "All Roles"
299
226
  }),
300
- /* @__PURE__ */ x("option", {
227
+ /* @__PURE__ */ b("option", {
301
228
  value: "customer",
302
229
  children: "Customers"
303
230
  }),
304
- /* @__PURE__ */ x("option", {
231
+ /* @__PURE__ */ b("option", {
305
232
  value: "cart_owner",
306
233
  children: "Cart Owners"
307
234
  }),
308
- /* @__PURE__ */ x("option", {
235
+ /* @__PURE__ */ b("option", {
309
236
  value: "worker",
310
237
  children: "Workers"
311
238
  }),
312
- /* @__PURE__ */ x("option", {
239
+ /* @__PURE__ */ b("option", {
313
240
  value: "investor",
314
241
  children: "Investors"
315
242
  })
316
243
  ]
317
244
  }),
318
- /* @__PURE__ */ S("select", {
319
- value: V.status,
320
- onChange: (e) => G("status", e.target.value),
245
+ /* @__PURE__ */ x("select", {
246
+ value: R.status,
247
+ onChange: (e) => U("status", e.target.value),
321
248
  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)]",
322
249
  children: [
323
- /* @__PURE__ */ x("option", {
250
+ /* @__PURE__ */ b("option", {
324
251
  value: "",
325
252
  children: "All Status"
326
253
  }),
327
- /* @__PURE__ */ x("option", {
254
+ /* @__PURE__ */ b("option", {
328
255
  value: "active",
329
256
  children: "Active"
330
257
  }),
331
- /* @__PURE__ */ x("option", {
258
+ /* @__PURE__ */ b("option", {
332
259
  value: "inactive",
333
260
  children: "Inactive"
334
261
  }),
335
- /* @__PURE__ */ x("option", {
262
+ /* @__PURE__ */ b("option", {
336
263
  value: "suspended",
337
264
  children: "Suspended"
338
265
  }),
339
- /* @__PURE__ */ x("option", {
266
+ /* @__PURE__ */ b("option", {
340
267
  value: "pending",
341
268
  children: "Pending"
342
269
  })
343
270
  ]
344
271
  }),
345
- /* @__PURE__ */ S("select", {
346
- value: V.registrationDate,
347
- onChange: (e) => G("registrationDate", e.target.value),
272
+ /* @__PURE__ */ x("select", {
273
+ value: R.registrationDate,
274
+ onChange: (e) => U("registrationDate", e.target.value),
348
275
  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)]",
349
276
  children: [
350
- /* @__PURE__ */ x("option", {
277
+ /* @__PURE__ */ b("option", {
351
278
  value: "",
352
279
  children: "All Time"
353
280
  }),
354
- /* @__PURE__ */ x("option", {
281
+ /* @__PURE__ */ b("option", {
355
282
  value: "1",
356
283
  children: "Last 24 hours"
357
284
  }),
358
- /* @__PURE__ */ x("option", {
285
+ /* @__PURE__ */ b("option", {
359
286
  value: "7",
360
287
  children: "Last 7 days"
361
288
  }),
362
- /* @__PURE__ */ x("option", {
289
+ /* @__PURE__ */ b("option", {
363
290
  value: "30",
364
291
  children: "Last 30 days"
365
292
  }),
366
- /* @__PURE__ */ x("option", {
293
+ /* @__PURE__ */ b("option", {
367
294
  value: "90",
368
295
  children: "Last 90 days"
369
296
  })
370
297
  ]
371
298
  }),
372
- /* @__PURE__ */ S("select", {
373
- value: V.sortBy,
374
- onChange: (e) => G("sortBy", e.target.value),
299
+ /* @__PURE__ */ x("select", {
300
+ value: R.sortBy,
301
+ onChange: (e) => U("sortBy", e.target.value),
375
302
  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)]",
376
303
  children: [
377
- /* @__PURE__ */ x("option", {
304
+ /* @__PURE__ */ b("option", {
378
305
  value: "recent",
379
306
  children: "Most Recent"
380
307
  }),
381
- /* @__PURE__ */ x("option", {
308
+ /* @__PURE__ */ b("option", {
382
309
  value: "name",
383
310
  children: "Name A-Z"
384
311
  }),
385
- /* @__PURE__ */ x("option", {
312
+ /* @__PURE__ */ b("option", {
386
313
  value: "activity",
387
314
  children: "Last Activity"
388
315
  })
@@ -391,27 +318,27 @@ function E() {
391
318
  ]
392
319
  })
393
320
  }),
394
- /* @__PURE__ */ S("div", {
321
+ /* @__PURE__ */ x("div", {
395
322
  className: "rounded-lg border border-border-subtle bg-bg-surface overflow-hidden",
396
323
  children: [
397
- /* @__PURE__ */ x("div", {
324
+ /* @__PURE__ */ b("div", {
398
325
  className: "block md:hidden space-y-4 p-4",
399
- children: Z.map((e) => /* @__PURE__ */ S("div", {
326
+ children: Y.map((e) => /* @__PURE__ */ x("div", {
400
327
  className: "rounded-lg border border-border-subtle bg-bg-sunken/30 p-4",
401
328
  children: [
402
- /* @__PURE__ */ S("div", {
329
+ /* @__PURE__ */ x("div", {
403
330
  className: "flex items-center mb-3",
404
- children: [e.profilePicture ? /* @__PURE__ */ x("img", {
331
+ children: [e.profilePicture ? /* @__PURE__ */ b("img", {
405
332
  src: e.profilePicture,
406
333
  alt: `${e.firstName} ${e.lastName}`,
407
334
  className: "w-12 h-12 rounded-full object-cover mr-3"
408
- }) : /* @__PURE__ */ x("div", {
335
+ }) : /* @__PURE__ */ b("div", {
409
336
  className: "w-12 h-12 rounded-full bg-bg-sunken flex items-center justify-center mr-3",
410
- children: /* @__PURE__ */ x(v, { className: "h-6 w-6 text-text-secondary" })
411
- }), /* @__PURE__ */ S("div", {
337
+ children: /* @__PURE__ */ b(_, { className: "h-6 w-6 text-text-secondary" })
338
+ }), /* @__PURE__ */ x("div", {
412
339
  className: "flex-1 min-w-0",
413
340
  children: [
414
- /* @__PURE__ */ S("h3", {
341
+ /* @__PURE__ */ x("h3", {
415
342
  className: "font-medium text-text-primary",
416
343
  children: [
417
344
  e.firstName,
@@ -419,86 +346,86 @@ function E() {
419
346
  e.lastName
420
347
  ]
421
348
  }),
422
- /* @__PURE__ */ x("p", {
349
+ /* @__PURE__ */ b("p", {
423
350
  className: "text-sm text-text-secondary truncate",
424
351
  children: e.email
425
352
  }),
426
- /* @__PURE__ */ x("p", {
353
+ /* @__PURE__ */ b("p", {
427
354
  className: "text-sm text-text-secondary",
428
355
  children: e.phone
429
356
  })
430
357
  ]
431
358
  })]
432
359
  }),
433
- /* @__PURE__ */ S("div", {
360
+ /* @__PURE__ */ x("div", {
434
361
  className: "flex flex-wrap gap-2 mb-3",
435
- children: [Q(e.role), $(e.status)]
362
+ children: [X(e.role), Z(e.status)]
436
363
  }),
437
- /* @__PURE__ */ S("div", {
364
+ /* @__PURE__ */ x("div", {
438
365
  className: "grid grid-cols-2 gap-4 text-sm mb-3",
439
- children: [/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
366
+ children: [/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
440
367
  className: "text-text-secondary",
441
368
  children: "Registered"
442
- }), /* @__PURE__ */ x("p", {
369
+ }), /* @__PURE__ */ b("p", {
443
370
  className: "text-text-primary",
444
- children: Y(e.registrationDate)
445
- })] }), /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
371
+ children: q(e.registrationDate)
372
+ })] }), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
446
373
  className: "text-text-secondary",
447
374
  children: "Last Login"
448
- }), /* @__PURE__ */ x("p", {
375
+ }), /* @__PURE__ */ b("p", {
449
376
  className: "text-text-primary",
450
- children: e.lastLoginTime ? Y(e.lastLoginTime) : "Never"
377
+ children: e.lastLoginTime ? q(e.lastLoginTime) : "Never"
451
378
  })] })]
452
379
  }),
453
- /* @__PURE__ */ S("div", {
380
+ /* @__PURE__ */ x("div", {
454
381
  className: "flex flex-wrap gap-3 mb-3",
455
382
  children: [
456
- /* @__PURE__ */ S("div", {
383
+ /* @__PURE__ */ x("div", {
457
384
  className: "flex items-center",
458
- children: [/* @__PURE__ */ x("span", { className: t("w-2 h-2 rounded-full mr-2", e.isEmailVerified ? "bg-status-success-text" : "bg-status-error-text") }), /* @__PURE__ */ x("span", {
385
+ children: [/* @__PURE__ */ b("span", { className: t("w-2 h-2 rounded-full mr-2", e.isEmailVerified ? "bg-status-success-text" : "bg-status-error-text") }), /* @__PURE__ */ b("span", {
459
386
  className: "text-sm text-text-secondary",
460
387
  children: "Email"
461
388
  })]
462
389
  }),
463
- /* @__PURE__ */ S("div", {
390
+ /* @__PURE__ */ x("div", {
464
391
  className: "flex items-center",
465
- children: [/* @__PURE__ */ x("span", { className: t("w-2 h-2 rounded-full mr-2", e.isPhoneVerified ? "bg-status-success-text" : "bg-status-error-text") }), /* @__PURE__ */ x("span", {
392
+ children: [/* @__PURE__ */ b("span", { className: t("w-2 h-2 rounded-full mr-2", e.isPhoneVerified ? "bg-status-success-text" : "bg-status-error-text") }), /* @__PURE__ */ b("span", {
466
393
  className: "text-sm text-text-secondary",
467
394
  children: "Phone"
468
395
  })]
469
396
  }),
470
- e.kycStatus && /* @__PURE__ */ S("div", {
397
+ e.kycStatus && /* @__PURE__ */ x("div", {
471
398
  className: "flex items-center",
472
- children: [/* @__PURE__ */ x("span", { className: t("w-2 h-2 rounded-full mr-2", e.kycStatus === "verified" ? "bg-status-success-text" : e.kycStatus === "pending" ? "bg-status-warning-text" : "bg-status-error-text") }), /* @__PURE__ */ x("span", {
399
+ children: [/* @__PURE__ */ b("span", { className: t("w-2 h-2 rounded-full mr-2", e.kycStatus === "verified" ? "bg-status-success-text" : e.kycStatus === "pending" ? "bg-status-warning-text" : "bg-status-error-text") }), /* @__PURE__ */ b("span", {
473
400
  className: "text-sm text-text-secondary",
474
401
  children: "KYC"
475
402
  })]
476
403
  })
477
404
  ]
478
405
  }),
479
- /* @__PURE__ */ S("div", {
406
+ /* @__PURE__ */ x("div", {
480
407
  className: "flex flex-wrap gap-2",
481
408
  children: [
482
- /* @__PURE__ */ x("button", {
409
+ /* @__PURE__ */ b("button", {
483
410
  type: "button",
484
- onClick: () => K(e, "edit"),
411
+ onClick: () => W(e, "edit"),
485
412
  className: "rounded-lg border border-border-subtle px-3 py-1.5 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
486
413
  children: "Edit"
487
414
  }),
488
- e.status === "active" ? /* @__PURE__ */ x("button", {
415
+ e.status === "active" ? /* @__PURE__ */ b("button", {
489
416
  type: "button",
490
- onClick: () => K(e, "suspend"),
417
+ onClick: () => W(e, "suspend"),
491
418
  className: "rounded-lg border border-border-subtle px-3 py-1.5 text-sm font-medium text-status-error-text hover:bg-status-error-bg-subtle transition-colors",
492
419
  children: "Suspend"
493
- }) : /* @__PURE__ */ x("button", {
420
+ }) : /* @__PURE__ */ b("button", {
494
421
  type: "button",
495
- onClick: () => K(e, "activate"),
422
+ onClick: () => W(e, "activate"),
496
423
  className: "rounded-lg border border-border-subtle px-3 py-1.5 text-sm font-medium text-status-success-text hover:bg-status-success-bg-subtle transition-colors",
497
424
  children: "Activate"
498
425
  }),
499
- e.kycStatus === "pending" && /* @__PURE__ */ x("button", {
426
+ e.kycStatus === "pending" && /* @__PURE__ */ b("button", {
500
427
  type: "button",
501
- onClick: () => K(e, "verify"),
428
+ onClick: () => W(e, "verify"),
502
429
  className: "rounded-lg bg-action-primary-bg px-3 py-1.5 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors",
503
430
  children: "Verify"
504
431
  })
@@ -507,56 +434,56 @@ function E() {
507
434
  ]
508
435
  }, e.id))
509
436
  }),
510
- /* @__PURE__ */ x("div", {
437
+ /* @__PURE__ */ b("div", {
511
438
  className: "hidden md:block overflow-x-auto",
512
- children: /* @__PURE__ */ S("table", {
439
+ children: /* @__PURE__ */ x("table", {
513
440
  className: "w-full",
514
- children: [/* @__PURE__ */ x("thead", { children: /* @__PURE__ */ S("tr", {
441
+ children: [/* @__PURE__ */ b("thead", { children: /* @__PURE__ */ x("tr", {
515
442
  className: "border-b border-border-subtle bg-bg-sunken/50",
516
443
  children: [
517
- /* @__PURE__ */ x("th", {
444
+ /* @__PURE__ */ b("th", {
518
445
  className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
519
446
  children: "User"
520
447
  }),
521
- /* @__PURE__ */ x("th", {
448
+ /* @__PURE__ */ b("th", {
522
449
  className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
523
450
  children: "Role & Status"
524
451
  }),
525
- /* @__PURE__ */ x("th", {
452
+ /* @__PURE__ */ b("th", {
526
453
  className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
527
454
  children: "Activity"
528
455
  }),
529
- /* @__PURE__ */ x("th", {
456
+ /* @__PURE__ */ b("th", {
530
457
  className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
531
458
  children: "Performance"
532
459
  }),
533
- /* @__PURE__ */ x("th", {
460
+ /* @__PURE__ */ b("th", {
534
461
  className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
535
462
  children: "Verification"
536
463
  }),
537
- /* @__PURE__ */ x("th", {
464
+ /* @__PURE__ */ b("th", {
538
465
  className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
539
466
  children: "Actions"
540
467
  })
541
468
  ]
542
- }) }), /* @__PURE__ */ x("tbody", {
469
+ }) }), /* @__PURE__ */ b("tbody", {
543
470
  className: "divide-y divide-border",
544
- children: Z.map((e) => /* @__PURE__ */ S("tr", {
471
+ children: Y.map((e) => /* @__PURE__ */ x("tr", {
545
472
  className: "hover:bg-accent/50 transition-colors",
546
473
  children: [
547
- /* @__PURE__ */ x("td", {
474
+ /* @__PURE__ */ b("td", {
548
475
  className: "px-4 py-3",
549
- children: /* @__PURE__ */ S("div", {
476
+ children: /* @__PURE__ */ x("div", {
550
477
  className: "flex items-center gap-3",
551
- children: [e.profilePicture ? /* @__PURE__ */ x("img", {
478
+ children: [e.profilePicture ? /* @__PURE__ */ b("img", {
552
479
  src: e.profilePicture,
553
480
  alt: `${e.firstName}`,
554
481
  className: "w-10 h-10 rounded-full object-cover"
555
- }) : /* @__PURE__ */ x("div", {
482
+ }) : /* @__PURE__ */ b("div", {
556
483
  className: "w-10 h-10 rounded-full bg-bg-sunken flex items-center justify-center",
557
- children: /* @__PURE__ */ x(v, { className: "h-5 w-5 text-text-secondary" })
558
- }), /* @__PURE__ */ S("div", { children: [
559
- /* @__PURE__ */ S("p", {
484
+ children: /* @__PURE__ */ b(_, { className: "h-5 w-5 text-text-secondary" })
485
+ }), /* @__PURE__ */ x("div", { children: [
486
+ /* @__PURE__ */ x("p", {
560
487
  className: "text-sm font-medium text-text-primary",
561
488
  children: [
562
489
  e.firstName,
@@ -564,60 +491,60 @@ function E() {
564
491
  e.lastName
565
492
  ]
566
493
  }),
567
- /* @__PURE__ */ x("p", {
494
+ /* @__PURE__ */ b("p", {
568
495
  className: "text-xs text-text-secondary",
569
496
  children: e.email
570
497
  }),
571
- /* @__PURE__ */ x("p", {
498
+ /* @__PURE__ */ b("p", {
572
499
  className: "text-xs text-text-secondary",
573
500
  children: e.phone
574
501
  })
575
502
  ] })]
576
503
  })
577
504
  }),
578
- /* @__PURE__ */ x("td", {
505
+ /* @__PURE__ */ b("td", {
579
506
  className: "px-4 py-3",
580
- children: /* @__PURE__ */ S("div", {
507
+ children: /* @__PURE__ */ x("div", {
581
508
  className: "space-y-1",
582
509
  children: [
583
- Q(e.role),
584
- /* @__PURE__ */ x("br", {}),
585
- $(e.status)
510
+ X(e.role),
511
+ /* @__PURE__ */ b("br", {}),
512
+ Z(e.status)
586
513
  ]
587
514
  })
588
515
  }),
589
- /* @__PURE__ */ S("td", {
516
+ /* @__PURE__ */ x("td", {
590
517
  className: "px-4 py-3 text-sm",
591
518
  children: [
592
- /* @__PURE__ */ S("p", {
519
+ /* @__PURE__ */ x("p", {
593
520
  className: "text-text-primary",
594
- children: ["Registered: ", Y(e.registrationDate)]
521
+ children: ["Registered: ", q(e.registrationDate)]
595
522
  }),
596
- e.lastLoginTime && /* @__PURE__ */ S("p", {
523
+ e.lastLoginTime && /* @__PURE__ */ x("p", {
597
524
  className: "text-text-secondary",
598
- children: ["Last login: ", Y(e.lastLoginTime)]
525
+ children: ["Last login: ", q(e.lastLoginTime)]
599
526
  }),
600
- e.deviceInfo && /* @__PURE__ */ S("p", {
527
+ e.deviceInfo && /* @__PURE__ */ x("p", {
601
528
  className: "text-text-secondary flex items-center gap-1",
602
- children: [/* @__PURE__ */ x(m, { className: "h-3 w-3" }), e.deviceInfo]
529
+ children: [/* @__PURE__ */ b(p, { className: "h-3 w-3" }), e.deviceInfo]
603
530
  })
604
531
  ]
605
532
  }),
606
- /* @__PURE__ */ S("td", {
533
+ /* @__PURE__ */ x("td", {
607
534
  className: "px-4 py-3 text-sm",
608
535
  children: [
609
- e.role === "customer" && e.totalOrders != null && /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ S("p", {
536
+ e.role === "customer" && e.totalOrders != null && /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ x("p", {
610
537
  className: "text-text-primary",
611
538
  children: [e.totalOrders, " orders"]
612
- }), /* @__PURE__ */ S("p", {
539
+ }), /* @__PURE__ */ x("p", {
613
540
  className: "text-text-secondary",
614
- children: [X(e.totalSpent ?? 0), " spent"]
541
+ children: [J(e.totalSpent ?? 0), " spent"]
615
542
  })] }),
616
- (e.role === "cart_owner" || e.role === "worker") && e.totalEarnings != null && /* @__PURE__ */ S("p", {
543
+ (e.role === "cart_owner" || e.role === "worker") && e.totalEarnings != null && /* @__PURE__ */ x("p", {
617
544
  className: "text-text-primary",
618
- children: [X(e.totalEarnings), " earned"]
545
+ children: [J(e.totalEarnings), " earned"]
619
546
  }),
620
- e.role === "investor" && e.riskScore != null && /* @__PURE__ */ S("p", {
547
+ e.role === "investor" && e.riskScore != null && /* @__PURE__ */ x("p", {
621
548
  className: "text-text-primary",
622
549
  children: [
623
550
  "Risk: ",
@@ -627,28 +554,28 @@ function E() {
627
554
  })
628
555
  ]
629
556
  }),
630
- /* @__PURE__ */ x("td", {
557
+ /* @__PURE__ */ b("td", {
631
558
  className: "px-4 py-3",
632
- children: /* @__PURE__ */ S("div", {
559
+ children: /* @__PURE__ */ x("div", {
633
560
  className: "space-y-1",
634
561
  children: [
635
- /* @__PURE__ */ S("div", {
562
+ /* @__PURE__ */ x("div", {
636
563
  className: "flex items-center gap-2",
637
- children: [/* @__PURE__ */ x("span", { className: t("w-2 h-2 rounded-full", e.isEmailVerified ? "bg-status-success-text" : "bg-status-error-text") }), /* @__PURE__ */ x("span", {
564
+ children: [/* @__PURE__ */ b("span", { className: t("w-2 h-2 rounded-full", e.isEmailVerified ? "bg-status-success-text" : "bg-status-error-text") }), /* @__PURE__ */ b("span", {
638
565
  className: "text-sm text-text-secondary",
639
566
  children: "Email"
640
567
  })]
641
568
  }),
642
- /* @__PURE__ */ S("div", {
569
+ /* @__PURE__ */ x("div", {
643
570
  className: "flex items-center gap-2",
644
- children: [/* @__PURE__ */ x("span", { className: t("w-2 h-2 rounded-full", e.isPhoneVerified ? "bg-status-success-text" : "bg-status-error-text") }), /* @__PURE__ */ x("span", {
571
+ children: [/* @__PURE__ */ b("span", { className: t("w-2 h-2 rounded-full", e.isPhoneVerified ? "bg-status-success-text" : "bg-status-error-text") }), /* @__PURE__ */ b("span", {
645
572
  className: "text-sm text-text-secondary",
646
573
  children: "Phone"
647
574
  })]
648
575
  }),
649
- e.kycStatus && /* @__PURE__ */ S("div", {
576
+ e.kycStatus && /* @__PURE__ */ x("div", {
650
577
  className: "flex items-center gap-2",
651
- children: [/* @__PURE__ */ x("span", { className: t("w-2 h-2 rounded-full", e.kycStatus === "verified" ? "bg-status-success-text" : e.kycStatus === "pending" ? "bg-status-warning-text" : "bg-status-error-text") }), /* @__PURE__ */ x("span", {
578
+ children: [/* @__PURE__ */ b("span", { className: t("w-2 h-2 rounded-full", e.kycStatus === "verified" ? "bg-status-success-text" : e.kycStatus === "pending" ? "bg-status-warning-text" : "bg-status-error-text") }), /* @__PURE__ */ b("span", {
652
579
  className: "text-sm text-text-secondary",
653
580
  children: "KYC"
654
581
  })]
@@ -656,37 +583,37 @@ function E() {
656
583
  ]
657
584
  })
658
585
  }),
659
- /* @__PURE__ */ x("td", {
586
+ /* @__PURE__ */ b("td", {
660
587
  className: "px-4 py-3",
661
- children: /* @__PURE__ */ S("div", {
588
+ children: /* @__PURE__ */ x("div", {
662
589
  className: "flex gap-1",
663
590
  children: [
664
- /* @__PURE__ */ x("button", {
591
+ /* @__PURE__ */ b("button", {
665
592
  type: "button",
666
- onClick: () => K(e, "edit"),
593
+ onClick: () => W(e, "edit"),
667
594
  title: "Edit",
668
595
  className: "rounded p-1.5 text-text-secondary hover:text-text-primary hover:bg-accent transition-colors",
669
- children: /* @__PURE__ */ x(u, { className: "h-4 w-4" })
596
+ children: /* @__PURE__ */ b(l, { className: "h-4 w-4" })
670
597
  }),
671
- e.status === "active" ? /* @__PURE__ */ x("button", {
598
+ e.status === "active" ? /* @__PURE__ */ b("button", {
672
599
  type: "button",
673
- onClick: () => K(e, "suspend"),
600
+ onClick: () => W(e, "suspend"),
674
601
  title: "Suspend",
675
602
  className: "rounded p-1.5 text-text-secondary hover:text-status-error-text hover:bg-status-error-bg-subtle transition-colors",
676
- children: /* @__PURE__ */ x(_, { className: "h-4 w-4" })
677
- }) : /* @__PURE__ */ x("button", {
603
+ children: /* @__PURE__ */ b(g, { className: "h-4 w-4" })
604
+ }) : /* @__PURE__ */ b("button", {
678
605
  type: "button",
679
- onClick: () => K(e, "activate"),
606
+ onClick: () => W(e, "activate"),
680
607
  title: "Activate",
681
608
  className: "rounded p-1.5 text-text-secondary hover:text-status-success-text hover:bg-status-success-bg-subtle transition-colors",
682
- children: /* @__PURE__ */ x(g, { className: "h-4 w-4" })
609
+ children: /* @__PURE__ */ b(h, { className: "h-4 w-4" })
683
610
  }),
684
- e.kycStatus === "pending" && /* @__PURE__ */ x("button", {
611
+ e.kycStatus === "pending" && /* @__PURE__ */ b("button", {
685
612
  type: "button",
686
- onClick: () => K(e, "verify"),
613
+ onClick: () => W(e, "verify"),
687
614
  title: "Verify",
688
615
  className: "rounded p-1.5 text-text-secondary hover:text-text-primary hover:bg-[var(--color-accent-soft)] transition-colors",
689
- children: /* @__PURE__ */ x(p, { className: "h-4 w-4" })
616
+ children: /* @__PURE__ */ b(f, { className: "h-4 w-4" })
690
617
  })
691
618
  ]
692
619
  })
@@ -696,13 +623,13 @@ function E() {
696
623
  })]
697
624
  })
698
625
  }),
699
- D.length === 0 && /* @__PURE__ */ x(r, {
626
+ V.length === 0 && /* @__PURE__ */ b(r, {
700
627
  illustration: "empty-people",
701
628
  title: "No users found",
702
629
  description: "No accounts match your current filters. Try clearing them or searching for a different name or email.",
703
- action: /* @__PURE__ */ x("button", {
630
+ action: /* @__PURE__ */ b("button", {
704
631
  type: "button",
705
- onClick: () => H({
632
+ onClick: () => z({
706
633
  role: "",
707
634
  status: "",
708
635
  searchQuery: "",
@@ -715,191 +642,191 @@ function E() {
715
642
  })
716
643
  ]
717
644
  }),
718
- /* @__PURE__ */ S("div", {
645
+ /* @__PURE__ */ x("div", {
719
646
  className: "mt-6 flex flex-col sm:flex-row sm:items-center justify-between gap-4",
720
- children: [/* @__PURE__ */ S("p", {
647
+ children: [/* @__PURE__ */ x("p", {
721
648
  className: "text-sm text-text-secondary text-center sm:text-left",
722
649
  children: [
723
650
  "Showing",
724
651
  " ",
725
- /* @__PURE__ */ x("span", {
652
+ /* @__PURE__ */ b("span", {
726
653
  className: "font-medium",
727
- children: Math.min((z - 1) * 10 + 1, D.length)
654
+ children: Math.min((I - 1) * 10 + 1, V.length)
728
655
  }),
729
656
  " ",
730
657
  "to",
731
658
  " ",
732
- /* @__PURE__ */ x("span", {
659
+ /* @__PURE__ */ b("span", {
733
660
  className: "font-medium",
734
- children: Math.min(z * 10, D.length)
661
+ children: Math.min(I * 10, V.length)
735
662
  }),
736
663
  " ",
737
664
  "of ",
738
- /* @__PURE__ */ x("span", {
665
+ /* @__PURE__ */ b("span", {
739
666
  className: "font-medium",
740
- children: D.length
667
+ children: V.length
741
668
  }),
742
669
  " results"
743
670
  ]
744
- }), /* @__PURE__ */ S("div", {
671
+ }), /* @__PURE__ */ x("div", {
745
672
  className: "flex justify-center sm:justify-end gap-2",
746
- children: [/* @__PURE__ */ S("button", {
673
+ children: [/* @__PURE__ */ x("button", {
747
674
  type: "button",
748
- disabled: z === 1,
749
- onClick: () => B((e) => Math.max(1, e - 1)),
675
+ disabled: I === 1,
676
+ onClick: () => L((e) => Math.max(1, e - 1)),
750
677
  className: "flex items-center gap-1.5 rounded-lg border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
751
- children: [/* @__PURE__ */ x(c, { className: "h-4 w-4" }), "Previous"]
752
- }), /* @__PURE__ */ S("button", {
678
+ children: [/* @__PURE__ */ b(s, { className: "h-4 w-4" }), "Previous"]
679
+ }), /* @__PURE__ */ x("button", {
753
680
  type: "button",
754
- disabled: z * 10 >= D.length,
755
- onClick: () => B((e) => e + 1),
681
+ disabled: I * 10 >= V.length,
682
+ onClick: () => L((e) => e + 1),
756
683
  className: "flex items-center gap-1.5 rounded-lg border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
757
- children: ["Next", /* @__PURE__ */ x(l, { className: "h-4 w-4" })]
684
+ children: ["Next", /* @__PURE__ */ b(c, { className: "h-4 w-4" })]
758
685
  })]
759
686
  })]
760
687
  }),
761
- N && j && /* @__PURE__ */ x("div", {
688
+ A && O && /* @__PURE__ */ b("div", {
762
689
  className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",
763
- children: /* @__PURE__ */ S("div", {
690
+ children: /* @__PURE__ */ x("div", {
764
691
  className: "w-full max-w-md rounded-lg border border-border-subtle bg-bg-surface shadow-lg max-h-[90vh] overflow-y-auto",
765
- children: [/* @__PURE__ */ S("div", {
692
+ children: [/* @__PURE__ */ x("div", {
766
693
  className: "flex items-center justify-between p-4 border-b border-border-subtle",
767
- children: [/* @__PURE__ */ x("h3", {
694
+ children: [/* @__PURE__ */ b("h3", {
768
695
  className: "text-lg font-semibold text-text-primary",
769
- children: F === "edit" ? "Edit User" : "Delete User"
770
- }), /* @__PURE__ */ x("button", {
696
+ children: M === "edit" ? "Edit User" : "Delete User"
697
+ }), /* @__PURE__ */ b("button", {
771
698
  type: "button",
772
- onClick: () => P(!1),
699
+ onClick: () => j(!1),
773
700
  className: "rounded p-1.5 text-text-secondary hover:text-text-primary hover:bg-accent transition-colors",
774
- children: /* @__PURE__ */ x(y, { className: "h-5 w-5" })
701
+ children: /* @__PURE__ */ b(v, { className: "h-5 w-5" })
775
702
  })]
776
- }), /* @__PURE__ */ x("div", {
703
+ }), /* @__PURE__ */ b("div", {
777
704
  className: "p-4",
778
- children: F === "delete" ? /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ S("p", {
705
+ children: M === "delete" ? /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ x("p", {
779
706
  className: "text-text-secondary mb-4",
780
707
  children: [
781
708
  "Are you sure you want to delete user \"",
782
- j.firstName,
709
+ O.firstName,
783
710
  " ",
784
- j.lastName,
711
+ O.lastName,
785
712
  "\"? This action cannot be undone."
786
713
  ]
787
- }), /* @__PURE__ */ S("div", {
714
+ }), /* @__PURE__ */ x("div", {
788
715
  className: "flex gap-3",
789
- children: [/* @__PURE__ */ x("button", {
716
+ children: [/* @__PURE__ */ b("button", {
790
717
  type: "button",
791
- onClick: () => P(!1),
718
+ onClick: () => j(!1),
792
719
  className: "flex-1 rounded-lg border border-border-subtle py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
793
720
  children: "Cancel"
794
- }), /* @__PURE__ */ x("button", {
721
+ }), /* @__PURE__ */ b("button", {
795
722
  type: "button",
796
- onClick: q,
723
+ onClick: G,
797
724
  className: "flex-1 rounded-lg bg-status-error-text hover:bg-status-error-text py-2 text-sm font-medium text-white transition-colors",
798
725
  children: "Delete User"
799
726
  })]
800
- })] }) : /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ S("div", {
727
+ })] }) : /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ x("div", {
801
728
  className: "space-y-4",
802
729
  children: [
803
- /* @__PURE__ */ S("div", {
730
+ /* @__PURE__ */ x("div", {
804
731
  className: "grid grid-cols-2 gap-4",
805
- children: [/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
732
+ children: [/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
806
733
  className: "block text-sm font-medium text-text-secondary mb-1",
807
734
  children: "First Name"
808
- }), /* @__PURE__ */ x("input", {
735
+ }), /* @__PURE__ */ b("input", {
809
736
  type: "text",
810
- value: L.firstName,
811
- onChange: (e) => R((t) => ({
737
+ value: P.firstName,
738
+ onChange: (e) => F((t) => ({
812
739
  ...t,
813
740
  firstName: e.target.value
814
741
  })),
815
742
  className: "w-full 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)]"
816
- })] }), /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
743
+ })] }), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
817
744
  className: "block text-sm font-medium text-text-secondary mb-1",
818
745
  children: "Last Name"
819
- }), /* @__PURE__ */ x("input", {
746
+ }), /* @__PURE__ */ b("input", {
820
747
  type: "text",
821
- value: L.lastName,
822
- onChange: (e) => R((t) => ({
748
+ value: P.lastName,
749
+ onChange: (e) => F((t) => ({
823
750
  ...t,
824
751
  lastName: e.target.value
825
752
  })),
826
753
  className: "w-full 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)]"
827
754
  })] })]
828
755
  }),
829
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
756
+ /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
830
757
  className: "block text-sm font-medium text-text-secondary mb-1",
831
758
  children: "Email"
832
- }), /* @__PURE__ */ x("input", {
759
+ }), /* @__PURE__ */ b("input", {
833
760
  type: "email",
834
- value: L.email,
835
- onChange: (e) => R((t) => ({
761
+ value: P.email,
762
+ onChange: (e) => F((t) => ({
836
763
  ...t,
837
764
  email: e.target.value
838
765
  })),
839
766
  className: "w-full 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)]"
840
767
  })] }),
841
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
768
+ /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
842
769
  className: "block text-sm font-medium text-text-secondary mb-1",
843
770
  children: "Phone"
844
- }), /* @__PURE__ */ x("input", {
771
+ }), /* @__PURE__ */ b("input", {
845
772
  type: "tel",
846
- value: L.phone,
847
- onChange: (e) => R((t) => ({
773
+ value: P.phone,
774
+ onChange: (e) => F((t) => ({
848
775
  ...t,
849
776
  phone: e.target.value
850
777
  })),
851
778
  className: "w-full 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)]"
852
779
  })] }),
853
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
780
+ /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
854
781
  className: "block text-sm font-medium text-text-secondary mb-1",
855
782
  children: "Role"
856
- }), /* @__PURE__ */ S("select", {
857
- value: L.role,
858
- onChange: (e) => R((t) => ({
783
+ }), /* @__PURE__ */ x("select", {
784
+ value: P.role,
785
+ onChange: (e) => F((t) => ({
859
786
  ...t,
860
787
  role: e.target.value
861
788
  })),
862
789
  className: "w-full 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)]",
863
790
  children: [
864
- /* @__PURE__ */ x("option", {
791
+ /* @__PURE__ */ b("option", {
865
792
  value: "customer",
866
793
  children: "Customer"
867
794
  }),
868
- /* @__PURE__ */ x("option", {
795
+ /* @__PURE__ */ b("option", {
869
796
  value: "cart_owner",
870
797
  children: "Cart Owner"
871
798
  }),
872
- /* @__PURE__ */ x("option", {
799
+ /* @__PURE__ */ b("option", {
873
800
  value: "worker",
874
801
  children: "Worker"
875
802
  }),
876
- /* @__PURE__ */ x("option", {
803
+ /* @__PURE__ */ b("option", {
877
804
  value: "investor",
878
805
  children: "Investor"
879
806
  })
880
807
  ]
881
808
  })] })
882
809
  ]
883
- }), /* @__PURE__ */ S("div", {
810
+ }), /* @__PURE__ */ x("div", {
884
811
  className: "flex gap-3 mt-6",
885
812
  children: [
886
- /* @__PURE__ */ x("button", {
813
+ /* @__PURE__ */ b("button", {
887
814
  type: "button",
888
- onClick: () => P(!1),
815
+ onClick: () => j(!1),
889
816
  className: "flex-1 rounded-lg border border-border-subtle py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
890
817
  children: "Cancel"
891
818
  }),
892
- /* @__PURE__ */ x("button", {
819
+ /* @__PURE__ */ b("button", {
893
820
  type: "button",
894
- onClick: J,
821
+ onClick: K,
895
822
  className: "flex-1 rounded-lg bg-action-primary-bg py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors",
896
823
  children: "Save Changes"
897
824
  }),
898
- /* @__PURE__ */ x("button", {
825
+ /* @__PURE__ */ b("button", {
899
826
  type: "button",
900
- onClick: () => I("delete"),
827
+ onClick: () => N("delete"),
901
828
  className: "rounded-lg border border-border-subtle py-2 px-3 text-sm font-medium text-status-error-text hover:bg-status-error-bg-subtle transition-colors",
902
- children: /* @__PURE__ */ x(h, { className: "h-4 w-4" })
829
+ children: /* @__PURE__ */ b(m, { className: "h-4 w-4" })
903
830
  })
904
831
  ]
905
832
  })] })
@@ -910,6 +837,6 @@ function E() {
910
837
  });
911
838
  }
912
839
  //#endregion
913
- export { E as UserManagementPage };
840
+ export { T as UserManagementPage };
914
841
 
915
842
  //# sourceMappingURL=UserManagementPage.js.map