@burdenoff/microfe-subscriberbot 2026.624.1 → 2026.626.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. package/dist/subscriberbot/components/EmptyState.js +17 -10
  2. package/dist/subscriberbot/components/EmptyState.js.map +1 -1
  3. package/dist/subscriberbot/components/InvestmentCard.js +23 -22
  4. package/dist/subscriberbot/components/InvestmentCard.js.map +1 -1
  5. package/dist/subscriberbot/components/MetricsCard.js +15 -12
  6. package/dist/subscriberbot/components/MetricsCard.js.map +1 -1
  7. package/dist/subscriberbot/components/PageLayout.js +27 -15
  8. package/dist/subscriberbot/components/PageLayout.js.map +1 -1
  9. package/dist/subscriberbot/components/RatingDisplay.js +3 -3
  10. package/dist/subscriberbot/components/RatingDisplay.js.map +1 -1
  11. package/dist/subscriberbot/components/StatusBadge.js +25 -13
  12. package/dist/subscriberbot/components/StatusBadge.js.map +1 -1
  13. package/dist/subscriberbot/context/SubscriberBotContext.js.map +1 -1
  14. package/dist/subscriberbot/pages/HomePage.js +72 -63
  15. package/dist/subscriberbot/pages/HomePage.js.map +1 -1
  16. package/dist/subscriberbot/pages/admin/AdminAnalyticsPage.js +106 -100
  17. package/dist/subscriberbot/pages/admin/AdminAnalyticsPage.js.map +1 -1
  18. package/dist/subscriberbot/pages/admin/AdminDashboard.js +125 -85
  19. package/dist/subscriberbot/pages/admin/AdminDashboard.js.map +1 -1
  20. package/dist/subscriberbot/pages/admin/AdminFinancialPage.js +51 -45
  21. package/dist/subscriberbot/pages/admin/AdminFinancialPage.js.map +1 -1
  22. package/dist/subscriberbot/pages/admin/AdminOrdersPage.js +246 -241
  23. package/dist/subscriberbot/pages/admin/AdminOrdersPage.js.map +1 -1
  24. package/dist/subscriberbot/pages/admin/AdminProfilePage.js +131 -129
  25. package/dist/subscriberbot/pages/admin/AdminProfilePage.js.map +1 -1
  26. package/dist/subscriberbot/pages/admin/AdminSettingsPage.js +247 -242
  27. package/dist/subscriberbot/pages/admin/AdminSettingsPage.js.map +1 -1
  28. package/dist/subscriberbot/pages/admin/CartManagementPage.js +307 -302
  29. package/dist/subscriberbot/pages/admin/CartManagementPage.js.map +1 -1
  30. package/dist/subscriberbot/pages/admin/UserManagementPage.js +308 -303
  31. package/dist/subscriberbot/pages/admin/UserManagementPage.js.map +1 -1
  32. package/dist/subscriberbot/pages/cart-owner/AnalyticsDashboard.js +89 -84
  33. package/dist/subscriberbot/pages/cart-owner/AnalyticsDashboard.js.map +1 -1
  34. package/dist/subscriberbot/pages/cart-owner/BusinessSettingsPage.js +269 -264
  35. package/dist/subscriberbot/pages/cart-owner/BusinessSettingsPage.js.map +1 -1
  36. package/dist/subscriberbot/pages/cart-owner/CartOwnerDashboard.js +269 -227
  37. package/dist/subscriberbot/pages/cart-owner/CartOwnerDashboard.js.map +1 -1
  38. package/dist/subscriberbot/pages/cart-owner/CartOwnerProfilePage.js +191 -186
  39. package/dist/subscriberbot/pages/cart-owner/CartOwnerProfilePage.js.map +1 -1
  40. package/dist/subscriberbot/pages/cart-owner/CartServiceConfigPage.js +168 -166
  41. package/dist/subscriberbot/pages/cart-owner/CartServiceConfigPage.js.map +1 -1
  42. package/dist/subscriberbot/pages/cart-owner/InventoryManagementPage.js +344 -347
  43. package/dist/subscriberbot/pages/cart-owner/InventoryManagementPage.js.map +1 -1
  44. package/dist/subscriberbot/pages/cart-owner/OrderManagementPage.js +270 -272
  45. package/dist/subscriberbot/pages/cart-owner/OrderManagementPage.js.map +1 -1
  46. package/dist/subscriberbot/pages/cart-owner/StaffManagementPage.js +294 -289
  47. package/dist/subscriberbot/pages/cart-owner/StaffManagementPage.js.map +1 -1
  48. package/dist/subscriberbot/pages/common/HelpSupportPage.js +156 -158
  49. package/dist/subscriberbot/pages/common/HelpSupportPage.js.map +1 -1
  50. package/dist/subscriberbot/pages/common/NotificationCenterPage.js +94 -87
  51. package/dist/subscriberbot/pages/common/NotificationCenterPage.js.map +1 -1
  52. package/dist/subscriberbot/pages/common/SettingsPage.js +749 -740
  53. package/dist/subscriberbot/pages/common/SettingsPage.js.map +1 -1
  54. package/dist/subscriberbot/pages/customer/BookingDetailsPage.js +357 -324
  55. package/dist/subscriberbot/pages/customer/BookingDetailsPage.js.map +1 -1
  56. package/dist/subscriberbot/pages/customer/CartDetailPage.js +281 -247
  57. package/dist/subscriberbot/pages/customer/CartDetailPage.js.map +1 -1
  58. package/dist/subscriberbot/pages/customer/CartDiscoveryPage.js +106 -98
  59. package/dist/subscriberbot/pages/customer/CartDiscoveryPage.js.map +1 -1
  60. package/dist/subscriberbot/pages/customer/CheckoutPage.js +235 -238
  61. package/dist/subscriberbot/pages/customer/CheckoutPage.js.map +1 -1
  62. package/dist/subscriberbot/pages/customer/CustomerDashboard.js +426 -390
  63. package/dist/subscriberbot/pages/customer/CustomerDashboard.js.map +1 -1
  64. package/dist/subscriberbot/pages/customer/CustomerProfilePage.js +488 -479
  65. package/dist/subscriberbot/pages/customer/CustomerProfilePage.js.map +1 -1
  66. package/dist/subscriberbot/pages/customer/DirectServiceBookingPage.js +522 -512
  67. package/dist/subscriberbot/pages/customer/DirectServiceBookingPage.js.map +1 -1
  68. package/dist/subscriberbot/pages/customer/FavoritesPage.js +73 -66
  69. package/dist/subscriberbot/pages/customer/FavoritesPage.js.map +1 -1
  70. package/dist/subscriberbot/pages/customer/OrderHistoryPage.js +75 -67
  71. package/dist/subscriberbot/pages/customer/OrderHistoryPage.js.map +1 -1
  72. package/dist/subscriberbot/pages/customer/OrderTrackingPage.js +82 -76
  73. package/dist/subscriberbot/pages/customer/OrderTrackingPage.js.map +1 -1
  74. package/dist/subscriberbot/pages/customer/PaymentMethodsPage.js +100 -93
  75. package/dist/subscriberbot/pages/customer/PaymentMethodsPage.js.map +1 -1
  76. package/dist/subscriberbot/pages/customer/ReviewsPage.js +97 -90
  77. package/dist/subscriberbot/pages/customer/ReviewsPage.js.map +1 -1
  78. package/dist/subscriberbot/pages/customer/SavedAddressesPage.js +86 -79
  79. package/dist/subscriberbot/pages/customer/SavedAddressesPage.js.map +1 -1
  80. package/dist/subscriberbot/pages/investor/InvestmentDetailsPage.js +330 -293
  81. package/dist/subscriberbot/pages/investor/InvestmentDetailsPage.js.map +1 -1
  82. package/dist/subscriberbot/pages/investor/InvestmentOpportunitiesPage.js +269 -261
  83. package/dist/subscriberbot/pages/investor/InvestmentOpportunitiesPage.js.map +1 -1
  84. package/dist/subscriberbot/pages/investor/InvestorAnalyticsPage.js +97 -91
  85. package/dist/subscriberbot/pages/investor/InvestorAnalyticsPage.js.map +1 -1
  86. package/dist/subscriberbot/pages/investor/InvestorDashboard.js +354 -322
  87. package/dist/subscriberbot/pages/investor/InvestorDashboard.js.map +1 -1
  88. package/dist/subscriberbot/pages/investor/InvestorInvestmentsPage.js +118 -111
  89. package/dist/subscriberbot/pages/investor/InvestorInvestmentsPage.js.map +1 -1
  90. package/dist/subscriberbot/pages/investor/InvestorPortfolioPage.js +75 -69
  91. package/dist/subscriberbot/pages/investor/InvestorPortfolioPage.js.map +1 -1
  92. package/dist/subscriberbot/pages/investor/InvestorProfilePage.js +435 -430
  93. package/dist/subscriberbot/pages/investor/InvestorProfilePage.js.map +1 -1
  94. package/dist/subscriberbot/pages/worker/TaskDetailsPage.js +328 -289
  95. package/dist/subscriberbot/pages/worker/TaskDetailsPage.js.map +1 -1
  96. package/dist/subscriberbot/pages/worker/WorkerDashboard.js +135 -103
  97. package/dist/subscriberbot/pages/worker/WorkerDashboard.js.map +1 -1
  98. package/dist/subscriberbot/pages/worker/WorkerOrdersPage.js +120 -114
  99. package/dist/subscriberbot/pages/worker/WorkerOrdersPage.js.map +1 -1
  100. package/dist/subscriberbot/pages/worker/WorkerProfilePage.js +125 -120
  101. package/dist/subscriberbot/pages/worker/WorkerProfilePage.js.map +1 -1
  102. package/dist/subscriberbot/pages/worker/WorkerSchedulePage.js +354 -344
  103. package/dist/subscriberbot/pages/worker/WorkerSchedulePage.js.map +1 -1
  104. package/package.json +3 -3
@@ -6,22 +6,23 @@ import { formatCurrency as i, formatDate as a } from "../../utils/formatters.js"
6
6
  import { useState as o } from "react";
7
7
  import { AlertTriangle as s, Award as c, BarChart3 as l, Bell as u, Camera as d, CheckCircle2 as f, ChevronRight as p, Edit3 as m, Heart as h, IndianRupee as g, MapPin as _, Save as v, Settings as y, Shield as b, ShoppingBag as x, User as S, UserCircle as C, X as w } from "lucide-react";
8
8
  import { jsx as T, jsxs as E } from "react/jsx-runtime";
9
+ import { EmphasisPanel as D, PagePurpose as O } from "@burdenoff/fe-libs/ui";
9
10
  //#region src/subscriberbot/pages/customer/CustomerProfilePage.tsx
10
- var D = [
11
+ var k = [
11
12
  "vegetarian",
12
13
  "vegan",
13
14
  "jain",
14
15
  "keto",
15
16
  "gluten-free",
16
17
  "low-carb"
17
- ], O = [
18
+ ], A = [
18
19
  "nuts",
19
20
  "dairy",
20
21
  "eggs",
21
22
  "soy",
22
23
  "shellfish",
23
24
  "gluten"
24
- ], k = [{
25
+ ], j = [{
25
26
  id: "addr-1",
26
27
  label: "Home",
27
28
  street: "123, MG Road",
@@ -40,22 +41,22 @@ var D = [
40
41
  pincode: "560066",
41
42
  isDefault: !1
42
43
  }];
43
- function A() {
44
- let { navigateTo: A, currentUser: j } = e(), { data: M = [], isLoading: N } = r({ customerId: j?.id }), [P, F] = o("profile"), [I, L] = o(!1), R = {
45
- firstName: j?.firstName || j?.name?.split(" ")[0] || "Customer",
46
- lastName: j?.lastName || j?.name?.split(" ").slice(1).join(" ") || "",
47
- email: j?.email || "",
44
+ function M() {
45
+ let { navigateTo: M, currentUser: N } = e(), { data: P = [], isLoading: F } = r({ customerId: N?.id }), [I, L] = o("profile"), [R, z] = o(!1), B = {
46
+ firstName: N?.firstName || N?.name?.split(" ")[0] || "Customer",
47
+ lastName: N?.lastName || N?.name?.split(" ").slice(1).join(" ") || "",
48
+ email: N?.email || "",
48
49
  phone: "+91 98765 43210",
49
- profilePicture: j?.avatar,
50
+ profilePicture: N?.avatar,
50
51
  isEmailVerified: !0,
51
52
  isPhoneVerified: !0,
52
53
  createdAt: (/* @__PURE__ */ new Date()).toISOString(),
53
54
  updatedAt: (/* @__PURE__ */ new Date()).toISOString()
54
- }, [z, B] = o({
55
- firstName: R.firstName,
56
- lastName: R.lastName,
57
- email: R.email,
58
- phone: R.phone,
55
+ }, [V, H] = o({
56
+ firstName: B.firstName,
57
+ lastName: B.lastName,
58
+ email: B.email,
59
+ phone: B.phone,
59
60
  emergencyContact: {
60
61
  name: "Priya Sharma",
61
62
  phone: "+91 98765 43211",
@@ -69,51 +70,51 @@ function A() {
69
70
  newsletter: !1,
70
71
  sms: !0
71
72
  }
72
- }), [V, H] = o({ ...z }), U = {
73
- totalOrders: M.length,
74
- totalSpent: M.reduce((e, t) => e + t.total, 0),
75
- loyaltyPoints: Math.floor(M.reduce((e, t) => e + t.total, 0) / 10),
76
- avgOrderValue: M.length > 0 ? Math.floor(M.reduce((e, t) => e + t.total, 0) / M.length) : 0,
73
+ }), [U, W] = o({ ...V }), G = {
74
+ totalOrders: P.length,
75
+ totalSpent: P.reduce((e, t) => e + t.total, 0),
76
+ loyaltyPoints: Math.floor(P.reduce((e, t) => e + t.total, 0) / 10),
77
+ avgOrderValue: P.length > 0 ? Math.floor(P.reduce((e, t) => e + t.total, 0) / P.length) : 0,
77
78
  favoriteCategory: "South Indian",
78
- memberSince: R.createdAt
79
- }, W = N, G = () => {
80
- H({ ...z }), L(!0);
81
- }, K = () => {
82
- H({ ...z }), L(!1);
83
- }, q = () => {
84
- B({ ...V }), L(!1), alert("Profile updated successfully");
79
+ memberSince: B.createdAt
80
+ }, K = F, q = () => {
81
+ W({ ...V }), z(!0);
85
82
  }, J = () => {
86
- B({ ...V }), alert("Preferences saved successfully");
87
- }, Y = (e, t) => {
88
- H((n) => ({
83
+ W({ ...V }), z(!1);
84
+ }, Y = () => {
85
+ H({ ...U }), z(!1), alert("Profile updated successfully");
86
+ }, X = () => {
87
+ H({ ...U }), alert("Preferences saved successfully");
88
+ }, Z = (e, t) => {
89
+ W((n) => ({
89
90
  ...n,
90
91
  [e]: t
91
92
  }));
92
- }, X = (e, t) => {
93
- H((n) => ({
93
+ }, Q = (e, t) => {
94
+ W((n) => ({
94
95
  ...n,
95
96
  emergencyContact: {
96
97
  ...n.emergencyContact,
97
98
  [e]: t
98
99
  }
99
100
  }));
100
- }, Z = (e, t) => {
101
- H((n) => ({
101
+ }, ee = (e, t) => {
102
+ W((n) => ({
102
103
  ...n,
103
104
  notifications: {
104
105
  ...n.notifications,
105
106
  [e]: t
106
107
  }
107
108
  }));
108
- }, Q = (e, t, n) => {
109
- H((r) => {
109
+ }, $ = (e, t, n) => {
110
+ W((r) => {
110
111
  let i = r[e], a = n ? [...i, t] : i.filter((e) => e !== t);
111
112
  return {
112
113
  ...r,
113
114
  [e]: a
114
115
  };
115
116
  });
116
- }, $ = [
117
+ }, te = [
117
118
  {
118
119
  key: "profile",
119
120
  label: "Profile Info",
@@ -130,7 +131,7 @@ function A() {
130
131
  icon: l
131
132
  }
132
133
  ];
133
- return W ? /* @__PURE__ */ T(n, {
134
+ return K ? /* @__PURE__ */ T(n, {
134
135
  title: "My Profile",
135
136
  children: /* @__PURE__ */ E("div", {
136
137
  className: "flex flex-col items-center justify-center py-16 text-center",
@@ -142,480 +143,488 @@ function A() {
142
143
  }) : /* @__PURE__ */ E(n, {
143
144
  title: "My Profile",
144
145
  description: "Manage your personal information and preferences",
145
- children: [/* @__PURE__ */ E("div", {
146
- className: "flex flex-col items-center sm:flex-row sm:items-start gap-6 rounded-lg border border-border-subtle bg-bg-surface p-6",
147
- children: [
148
- /* @__PURE__ */ E("div", {
149
- className: "relative",
150
- children: [/* @__PURE__ */ T("div", {
151
- className: "h-24 w-24 rounded-full bg-bg-sunken overflow-hidden",
152
- children: R.profilePicture ? /* @__PURE__ */ T("img", {
153
- src: R.profilePicture,
154
- alt: `${R.firstName} ${R.lastName}`,
155
- className: "h-full w-full object-cover"
156
- }) : /* @__PURE__ */ T("div", {
157
- className: "flex h-full w-full items-center justify-center text-text-secondary",
158
- children: /* @__PURE__ */ T(S, { className: "h-10 w-10" })
159
- })
160
- }), /* @__PURE__ */ T("button", {
161
- type: "button",
162
- className: "absolute bottom-0 right-0 flex h-8 w-8 items-center justify-center rounded-full bg-foreground text-background shadow-sm hover:opacity-90 transition-opacity",
163
- children: /* @__PURE__ */ T(d, { className: "h-4 w-4" })
164
- })]
165
- }),
166
- /* @__PURE__ */ E("div", {
167
- className: "flex-1 text-center sm:text-left",
168
- children: [
169
- /* @__PURE__ */ E("h2", {
170
- className: "text-xl font-semibold text-text-primary",
171
- children: [
172
- z.firstName,
173
- " ",
174
- z.lastName
175
- ]
176
- }),
177
- /* @__PURE__ */ T("p", {
178
- className: "mt-1 text-sm text-text-secondary",
179
- children: z.email
180
- }),
181
- /* @__PURE__ */ T("p", {
182
- className: "mt-0.5 text-sm text-text-secondary",
183
- children: z.phone
184
- }),
185
- /* @__PURE__ */ E("div", {
186
- className: "flex flex-wrap items-center justify-center sm:justify-start gap-2 mt-2",
187
- children: [/* @__PURE__ */ E("span", {
188
- className: t("inline-flex items-center gap-1 rounded-full px-2.5 py-0.5 text-xs font-medium", R.isEmailVerified ? "bg-green-500/20 text-green-600 dark:text-green-400" : "bg-status-error-bg/20 text-status-error-text"),
189
- children: [/* @__PURE__ */ T(f, { className: "h-3 w-3" }), R.isEmailVerified ? "Email Verified" : "Email Not Verified"]
190
- }), /* @__PURE__ */ E("span", {
191
- className: t("inline-flex items-center gap-1 rounded-full px-2.5 py-0.5 text-xs font-medium", R.isPhoneVerified ? "bg-green-500/20 text-green-600 dark:text-green-400" : "bg-status-error-bg/20 text-status-error-text"),
192
- children: [/* @__PURE__ */ T(f, { className: "h-3 w-3" }), R.isPhoneVerified ? "Phone Verified" : "Phone Not Verified"]
193
- })]
194
- })
195
- ]
196
- }),
197
- /* @__PURE__ */ E("div", {
198
- className: "text-center sm:text-right",
199
- children: [/* @__PURE__ */ T("p", {
200
- className: "text-2xl font-bold text-text-primary",
201
- children: U.loyaltyPoints
202
- }), /* @__PURE__ */ T("p", {
203
- className: "text-xs text-text-secondary",
204
- children: "Loyalty Points"
205
- })]
206
- })
207
- ]
208
- }), /* @__PURE__ */ E("div", {
209
- className: "mt-6 rounded-lg border border-border-subtle bg-bg-surface",
210
- children: [/* @__PURE__ */ T("div", {
211
- className: "border-b border-border-subtle",
212
- children: /* @__PURE__ */ T("nav", {
213
- className: "flex -mb-px overflow-x-auto",
214
- children: $.map((e) => {
215
- let n = e.icon;
216
- return /* @__PURE__ */ E("button", {
217
- type: "button",
218
- className: t("flex items-center gap-2 py-3.5 px-5 text-sm font-medium whitespace-nowrap transition-colors", P === e.key ? "border-b-2 border-foreground text-text-primary" : "text-text-secondary hover:text-text-primary"),
219
- onClick: () => F(e.key),
220
- children: [/* @__PURE__ */ T(n, { className: "h-4 w-4" }), e.label]
221
- }, e.key);
222
- })
223
- })
224
- }), /* @__PURE__ */ E("div", {
225
- className: "p-5 md:p-6",
146
+ children: [
147
+ /* @__PURE__ */ T(O, {
148
+ icon: /* @__PURE__ */ T(S, { className: "h-4 w-4" }),
149
+ className: "mb-6",
150
+ children: "Your account details and preferences in one place. Keep your name, contact info and delivery preferences current so orders reach you smoothly, and track the loyalty points you've earned. Use the tabs to manage your profile, addresses, payment methods and notification settings."
151
+ }),
152
+ /* @__PURE__ */ E(D, {
153
+ className: "flex flex-col items-center sm:flex-row sm:items-start gap-6",
226
154
  children: [
227
- P === "profile" && /* @__PURE__ */ E("div", {
228
- className: "space-y-6",
155
+ /* @__PURE__ */ E("div", {
156
+ className: "relative",
157
+ children: [/* @__PURE__ */ T("div", {
158
+ className: "h-24 w-24 rounded-full bg-bg-sunken overflow-hidden",
159
+ children: B.profilePicture ? /* @__PURE__ */ T("img", {
160
+ src: B.profilePicture,
161
+ alt: `${B.firstName} ${B.lastName}`,
162
+ className: "h-full w-full object-cover"
163
+ }) : /* @__PURE__ */ T("div", {
164
+ className: "flex h-full w-full items-center justify-center text-text-secondary",
165
+ children: /* @__PURE__ */ T(S, { className: "h-10 w-10" })
166
+ })
167
+ }), /* @__PURE__ */ T("button", {
168
+ type: "button",
169
+ className: "absolute bottom-0 right-0 flex h-8 w-8 items-center justify-center rounded-full bg-foreground text-background shadow-sm hover:opacity-90 transition-opacity",
170
+ children: /* @__PURE__ */ T(d, { className: "h-4 w-4" })
171
+ })]
172
+ }),
173
+ /* @__PURE__ */ E("div", {
174
+ className: "flex-1 text-center sm:text-left",
229
175
  children: [
230
- /* @__PURE__ */ E("div", {
231
- className: "flex justify-between items-center",
232
- children: [/* @__PURE__ */ T("h3", {
233
- className: "text-lg font-semibold text-text-primary",
234
- children: "Personal Information"
235
- }), I ? /* @__PURE__ */ E("div", {
236
- className: "flex gap-2",
237
- children: [/* @__PURE__ */ E("button", {
238
- type: "button",
239
- onClick: q,
240
- className: "flex items-center gap-1.5 rounded-lg bg-foreground px-3 py-1.5 text-xs font-medium text-background hover:opacity-90 transition-opacity",
241
- children: [/* @__PURE__ */ T(v, { className: "h-3 w-3" }), "Save"]
242
- }), /* @__PURE__ */ E("button", {
243
- type: "button",
244
- onClick: K,
245
- className: "flex items-center gap-1.5 rounded-lg border border-border-subtle px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-accent transition-colors",
246
- children: [/* @__PURE__ */ T(w, { className: "h-3 w-3" }), "Cancel"]
247
- })]
248
- }) : /* @__PURE__ */ E("button", {
249
- type: "button",
250
- onClick: G,
251
- className: "flex items-center gap-1.5 rounded-lg border border-border-subtle px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-accent transition-colors",
252
- children: [/* @__PURE__ */ T(m, { className: "h-3 w-3" }), "Edit Profile"]
253
- })]
254
- }),
255
- /* @__PURE__ */ E("div", {
256
- className: "grid grid-cols-1 md:grid-cols-2 gap-5",
176
+ /* @__PURE__ */ E("h2", {
177
+ className: "text-xl font-semibold text-text-primary",
257
178
  children: [
258
- /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("label", {
259
- className: "block text-sm font-medium text-text-primary mb-1.5",
260
- children: "First Name"
261
- }), /* @__PURE__ */ T("input", {
262
- type: "text",
263
- value: I ? V.firstName : z.firstName,
264
- onChange: (e) => Y("firstName", e.target.value),
265
- disabled: !I,
266
- className: t("w-full rounded-lg border border-border-subtle px-3 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", !I && "bg-bg-sunken cursor-not-allowed", I && "bg-bg-surface")
267
- })] }),
268
- /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("label", {
269
- className: "block text-sm font-medium text-text-primary mb-1.5",
270
- children: "Last Name"
271
- }), /* @__PURE__ */ T("input", {
272
- type: "text",
273
- value: I ? V.lastName : z.lastName,
274
- onChange: (e) => Y("lastName", e.target.value),
275
- disabled: !I,
276
- className: t("w-full rounded-lg border border-border-subtle px-3 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", !I && "bg-bg-sunken cursor-not-allowed", I && "bg-bg-surface")
277
- })] }),
278
- /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("label", {
279
- className: "block text-sm font-medium text-text-primary mb-1.5",
280
- children: "Email"
281
- }), /* @__PURE__ */ T("input", {
282
- type: "email",
283
- value: I ? V.email : z.email,
284
- onChange: (e) => Y("email", e.target.value),
285
- disabled: !I,
286
- className: t("w-full rounded-lg border border-border-subtle px-3 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", !I && "bg-bg-sunken cursor-not-allowed", I && "bg-bg-surface")
287
- })] }),
288
- /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("label", {
289
- className: "block text-sm font-medium text-text-primary mb-1.5",
290
- children: "Phone"
291
- }), /* @__PURE__ */ T("input", {
292
- type: "tel",
293
- value: I ? V.phone : z.phone,
294
- onChange: (e) => Y("phone", e.target.value),
295
- disabled: !I,
296
- className: t("w-full rounded-lg border border-border-subtle px-3 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", !I && "bg-bg-sunken cursor-not-allowed", I && "bg-bg-surface")
297
- })] })
179
+ V.firstName,
180
+ " ",
181
+ V.lastName
298
182
  ]
299
183
  }),
300
- /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("h4", {
301
- className: "text-base font-semibold text-text-primary mb-3",
302
- children: "Primary Address"
303
- }), /* @__PURE__ */ E("div", {
304
- className: "rounded-lg bg-bg-sunken/50 p-4",
305
- children: [
306
- /* @__PURE__ */ T("p", {
307
- className: "text-sm font-medium text-text-primary",
308
- children: k[0].street
309
- }),
310
- /* @__PURE__ */ T("p", {
311
- className: "text-sm text-text-secondary",
312
- children: k[0].area
313
- }),
314
- /* @__PURE__ */ E("p", {
315
- className: "text-sm text-text-secondary",
316
- children: [
317
- k[0].city,
318
- ", ",
319
- k[0].state,
320
- " - ",
321
- k[0].pincode
322
- ]
323
- }),
324
- /* @__PURE__ */ E("button", {
325
- type: "button",
326
- onClick: () => A("/customer/addresses"),
327
- className: "mt-2 flex items-center gap-1 text-xs font-medium text-text-secondary hover:text-text-primary transition-colors",
328
- children: [
329
- /* @__PURE__ */ T(_, { className: "h-3 w-3" }),
330
- "Manage Addresses",
331
- /* @__PURE__ */ T(p, { className: "h-3 w-3" })
332
- ]
333
- })
334
- ]
335
- })] }),
336
- /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ E("h4", {
337
- className: "text-base font-semibold text-text-primary mb-3 flex items-center gap-2",
338
- children: [/* @__PURE__ */ T(s, { className: "h-4 w-4 text-text-secondary" }), "Emergency Contact"]
339
- }), /* @__PURE__ */ E("div", {
340
- className: "grid grid-cols-1 md:grid-cols-3 gap-4",
341
- children: [
342
- /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("label", {
343
- className: "block text-sm font-medium text-text-primary mb-1.5",
344
- children: "Name"
345
- }), /* @__PURE__ */ T("input", {
346
- type: "text",
347
- value: I ? V.emergencyContact.name : z.emergencyContact.name,
348
- onChange: (e) => X("name", e.target.value),
349
- disabled: !I,
350
- className: t("w-full rounded-lg border border-border-subtle px-3 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", !I && "bg-bg-sunken cursor-not-allowed", I && "bg-bg-surface")
351
- })] }),
352
- /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("label", {
353
- className: "block text-sm font-medium text-text-primary mb-1.5",
354
- children: "Phone"
355
- }), /* @__PURE__ */ T("input", {
356
- type: "tel",
357
- value: I ? V.emergencyContact.phone : z.emergencyContact.phone,
358
- onChange: (e) => X("phone", e.target.value),
359
- disabled: !I,
360
- className: t("w-full rounded-lg border border-border-subtle px-3 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", !I && "bg-bg-sunken cursor-not-allowed", I && "bg-bg-surface")
361
- })] }),
362
- /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("label", {
363
- className: "block text-sm font-medium text-text-primary mb-1.5",
364
- children: "Relationship"
365
- }), /* @__PURE__ */ T("input", {
366
- type: "text",
367
- value: I ? V.emergencyContact.relationship : z.emergencyContact.relationship,
368
- onChange: (e) => X("relationship", e.target.value),
369
- disabled: !I,
370
- className: t("w-full rounded-lg border border-border-subtle px-3 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", !I && "bg-bg-sunken cursor-not-allowed", I && "bg-bg-surface")
371
- })] })
372
- ]
373
- })] }),
374
- I && /* @__PURE__ */ E("div", {
375
- className: "flex gap-3 pt-4 border-t border-border-subtle",
376
- children: [/* @__PURE__ */ E("button", {
377
- type: "button",
378
- onClick: q,
379
- className: "flex items-center gap-2 rounded-lg bg-foreground px-4 py-2.5 text-sm font-medium text-background hover:opacity-90 transition-opacity",
380
- children: [/* @__PURE__ */ T(v, { className: "h-4 w-4" }), "Save Changes"]
381
- }), /* @__PURE__ */ T("button", {
382
- type: "button",
383
- onClick: K,
384
- className: "flex items-center gap-2 rounded-lg border border-border-subtle px-4 py-2.5 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
385
- children: "Cancel"
184
+ /* @__PURE__ */ T("p", {
185
+ className: "mt-1 text-sm text-text-secondary",
186
+ children: V.email
187
+ }),
188
+ /* @__PURE__ */ T("p", {
189
+ className: "mt-0.5 text-sm text-text-secondary",
190
+ children: V.phone
191
+ }),
192
+ /* @__PURE__ */ E("div", {
193
+ className: "flex flex-wrap items-center justify-center sm:justify-start gap-2 mt-2",
194
+ children: [/* @__PURE__ */ E("span", {
195
+ className: t("inline-flex items-center gap-1 rounded-full px-2.5 py-0.5 text-xs font-medium", B.isEmailVerified ? "bg-status-success-bg/20 text-status-success-text" : "bg-status-error-bg/20 text-status-error-text"),
196
+ children: [/* @__PURE__ */ T(f, { className: "h-3 w-3" }), B.isEmailVerified ? "Email Verified" : "Email Not Verified"]
197
+ }), /* @__PURE__ */ E("span", {
198
+ className: t("inline-flex items-center gap-1 rounded-full px-2.5 py-0.5 text-xs font-medium", B.isPhoneVerified ? "bg-status-success-bg/20 text-status-success-text" : "bg-status-error-bg/20 text-status-error-text"),
199
+ children: [/* @__PURE__ */ T(f, { className: "h-3 w-3" }), B.isPhoneVerified ? "Phone Verified" : "Phone Not Verified"]
386
200
  })]
387
201
  })
388
202
  ]
389
203
  }),
390
- P === "preferences" && /* @__PURE__ */ E("div", {
391
- className: "space-y-8",
392
- children: [
393
- /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ E("h3", {
394
- className: "text-lg font-semibold text-text-primary mb-4 flex items-center gap-2",
395
- children: [/* @__PURE__ */ T(u, { className: "h-4 w-4 text-text-secondary" }), "Notification Preferences"]
396
- }), /* @__PURE__ */ T("div", {
397
- className: "space-y-3",
398
- children: [
399
- {
400
- key: "orderUpdates",
401
- label: "Order status updates"
402
- },
403
- {
404
- key: "promotions",
405
- label: "Promotional offers and discounts"
406
- },
407
- {
408
- key: "newsletter",
409
- label: "Newsletter and food recommendations"
410
- },
411
- {
412
- key: "sms",
413
- label: "SMS notifications"
414
- }
415
- ].map((e) => /* @__PURE__ */ E("label", {
416
- className: "flex items-center gap-3 cursor-pointer",
417
- children: [/* @__PURE__ */ T("input", {
418
- type: "checkbox",
419
- checked: V.notifications[e.key],
420
- onChange: (t) => Z(e.key, t.target.checked),
421
- className: "h-4 w-4 rounded border-border-subtle text-text-primary focus:ring-[var(--color-focus-ring)]"
422
- }), /* @__PURE__ */ T("span", {
423
- className: "text-sm text-text-primary",
424
- children: e.label
425
- })]
426
- }, e.key))
427
- })] }),
428
- /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ E("h3", {
429
- className: "text-lg font-semibold text-text-primary mb-4 flex items-center gap-2",
430
- children: [/* @__PURE__ */ T(h, { className: "h-4 w-4 text-text-secondary" }), "Dietary Preferences"]
431
- }), /* @__PURE__ */ T("div", {
432
- className: "grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-3",
433
- children: D.map((e) => /* @__PURE__ */ E("label", {
434
- className: "flex items-center gap-2 cursor-pointer",
435
- children: [/* @__PURE__ */ T("input", {
436
- type: "checkbox",
437
- checked: V.dietary.includes(e),
438
- onChange: (t) => Q("dietary", e, t.target.checked),
439
- className: "h-4 w-4 rounded border-border-subtle text-text-primary focus:ring-[var(--color-focus-ring)]"
440
- }), /* @__PURE__ */ T("span", {
441
- className: "text-sm text-text-primary capitalize",
442
- children: e
443
- })]
444
- }, e))
445
- })] }),
446
- /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ E("h3", {
447
- className: "text-lg font-semibold text-text-primary mb-4 flex items-center gap-2",
448
- children: [/* @__PURE__ */ T(s, { className: "h-4 w-4 text-status-error-text" }), "Food Allergies"]
449
- }), /* @__PURE__ */ T("div", {
450
- className: "grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-3",
451
- children: O.map((e) => /* @__PURE__ */ E("label", {
452
- className: "flex items-center gap-2 cursor-pointer",
453
- children: [/* @__PURE__ */ T("input", {
454
- type: "checkbox",
455
- checked: V.allergies.includes(e),
456
- onChange: (t) => Q("allergies", e, t.target.checked),
457
- className: "h-4 w-4 rounded border-border-subtle text-status-error-text focus:ring-destructive"
458
- }), /* @__PURE__ */ T("span", {
459
- className: "text-sm text-text-primary capitalize",
460
- children: e
461
- })]
462
- }, e))
463
- })] }),
464
- /* @__PURE__ */ T("div", {
465
- className: "pt-4 border-t border-border-subtle",
466
- children: /* @__PURE__ */ E("button", {
467
- type: "button",
468
- onClick: J,
469
- className: "flex items-center gap-2 rounded-lg bg-foreground px-4 py-2.5 text-sm font-medium text-background hover:opacity-90 transition-opacity",
470
- children: [/* @__PURE__ */ T(v, { className: "h-4 w-4" }), "Save Preferences"]
471
- })
472
- })
473
- ]
474
- }),
475
- P === "stats" && /* @__PURE__ */ E("div", {
476
- className: "space-y-8",
477
- children: [/* @__PURE__ */ E("div", {
478
- className: "grid grid-cols-1 md:grid-cols-3 gap-4",
204
+ /* @__PURE__ */ E("div", {
205
+ className: "text-center sm:text-right",
206
+ children: [/* @__PURE__ */ T("p", {
207
+ className: "text-2xl font-bold text-text-primary",
208
+ children: G.loyaltyPoints
209
+ }), /* @__PURE__ */ T("p", {
210
+ className: "text-xs text-text-secondary",
211
+ children: "Loyalty Points"
212
+ })]
213
+ })
214
+ ]
215
+ }),
216
+ /* @__PURE__ */ E("div", {
217
+ className: "mt-6 rounded-lg border border-border-seam bg-bg-surface",
218
+ children: [/* @__PURE__ */ T("div", {
219
+ className: "border-b border-border-seam",
220
+ children: /* @__PURE__ */ T("nav", {
221
+ className: "flex -mb-px overflow-x-auto",
222
+ children: te.map((e) => {
223
+ let n = e.icon;
224
+ return /* @__PURE__ */ E("button", {
225
+ type: "button",
226
+ className: t("flex items-center gap-2 py-3.5 px-5 text-sm font-medium whitespace-nowrap transition-colors", I === e.key ? "border-b-2 border-foreground text-text-primary" : "text-text-secondary hover:text-text-primary"),
227
+ onClick: () => L(e.key),
228
+ children: [/* @__PURE__ */ T(n, { className: "h-4 w-4" }), e.label]
229
+ }, e.key);
230
+ })
231
+ })
232
+ }), /* @__PURE__ */ E("div", {
233
+ className: "p-5 md:p-6",
234
+ children: [
235
+ I === "profile" && /* @__PURE__ */ E("div", {
236
+ className: "space-y-6",
479
237
  children: [
480
238
  /* @__PURE__ */ E("div", {
481
- className: "rounded-lg bg-blue-500/10 p-5 border border-blue-500/20",
482
- children: [/* @__PURE__ */ E("div", {
483
- className: "flex items-center gap-2 mb-2",
484
- children: [/* @__PURE__ */ T(x, { className: "h-4 w-4 text-blue-600 dark:text-blue-400" }), /* @__PURE__ */ T("h4", {
485
- className: "text-sm font-medium text-blue-600 dark:text-blue-400",
486
- children: "Total Orders"
239
+ className: "flex justify-between items-center",
240
+ children: [/* @__PURE__ */ T("h3", {
241
+ className: "text-lg font-semibold text-text-primary",
242
+ children: "Personal Information"
243
+ }), R ? /* @__PURE__ */ E("div", {
244
+ className: "flex gap-2",
245
+ children: [/* @__PURE__ */ E("button", {
246
+ type: "button",
247
+ onClick: Y,
248
+ className: "flex items-center gap-1.5 rounded-lg bg-foreground px-3 py-1.5 text-xs font-medium text-background hover:opacity-90 transition-opacity",
249
+ children: [/* @__PURE__ */ T(v, { className: "h-3 w-3" }), "Save"]
250
+ }), /* @__PURE__ */ E("button", {
251
+ type: "button",
252
+ onClick: J,
253
+ className: "flex items-center gap-1.5 rounded-lg border border-border-seam px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-accent transition-colors",
254
+ children: [/* @__PURE__ */ T(w, { className: "h-3 w-3" }), "Cancel"]
487
255
  })]
488
- }), /* @__PURE__ */ T("p", {
489
- className: "text-3xl font-bold text-blue-600 dark:text-blue-400",
490
- children: U.totalOrders
256
+ }) : /* @__PURE__ */ E("button", {
257
+ type: "button",
258
+ onClick: q,
259
+ className: "flex items-center gap-1.5 rounded-lg border border-border-seam px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-accent transition-colors",
260
+ children: [/* @__PURE__ */ T(m, { className: "h-3 w-3" }), "Edit Profile"]
491
261
  })]
492
262
  }),
493
263
  /* @__PURE__ */ E("div", {
494
- className: "rounded-lg bg-green-500/10 p-5 border border-green-500/20",
495
- children: [/* @__PURE__ */ E("div", {
496
- className: "flex items-center gap-2 mb-2",
497
- children: [/* @__PURE__ */ T(g, { className: "h-4 w-4 text-green-600 dark:text-green-400" }), /* @__PURE__ */ T("h4", {
498
- className: "text-sm font-medium text-green-600 dark:text-green-400",
499
- children: "Total Spent"
500
- })]
501
- }), /* @__PURE__ */ T("p", {
502
- className: "text-3xl font-bold text-green-600 dark:text-green-400",
503
- children: i(U.totalSpent, { minimumFractionDigits: 0 })
504
- })]
264
+ className: "grid grid-cols-1 md:grid-cols-2 gap-5",
265
+ children: [
266
+ /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("label", {
267
+ className: "block text-sm font-medium text-text-primary mb-1.5",
268
+ children: "First Name"
269
+ }), /* @__PURE__ */ T("input", {
270
+ type: "text",
271
+ value: R ? U.firstName : V.firstName,
272
+ onChange: (e) => Z("firstName", e.target.value),
273
+ disabled: !R,
274
+ className: t("w-full rounded-lg border border-border-seam px-3 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", !R && "bg-bg-sunken cursor-not-allowed", R && "bg-bg-surface")
275
+ })] }),
276
+ /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("label", {
277
+ className: "block text-sm font-medium text-text-primary mb-1.5",
278
+ children: "Last Name"
279
+ }), /* @__PURE__ */ T("input", {
280
+ type: "text",
281
+ value: R ? U.lastName : V.lastName,
282
+ onChange: (e) => Z("lastName", e.target.value),
283
+ disabled: !R,
284
+ className: t("w-full rounded-lg border border-border-seam px-3 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", !R && "bg-bg-sunken cursor-not-allowed", R && "bg-bg-surface")
285
+ })] }),
286
+ /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("label", {
287
+ className: "block text-sm font-medium text-text-primary mb-1.5",
288
+ children: "Email"
289
+ }), /* @__PURE__ */ T("input", {
290
+ type: "email",
291
+ value: R ? U.email : V.email,
292
+ onChange: (e) => Z("email", e.target.value),
293
+ disabled: !R,
294
+ className: t("w-full rounded-lg border border-border-seam px-3 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", !R && "bg-bg-sunken cursor-not-allowed", R && "bg-bg-surface")
295
+ })] }),
296
+ /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("label", {
297
+ className: "block text-sm font-medium text-text-primary mb-1.5",
298
+ children: "Phone"
299
+ }), /* @__PURE__ */ T("input", {
300
+ type: "tel",
301
+ value: R ? U.phone : V.phone,
302
+ onChange: (e) => Z("phone", e.target.value),
303
+ disabled: !R,
304
+ className: t("w-full rounded-lg border border-border-seam px-3 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", !R && "bg-bg-sunken cursor-not-allowed", R && "bg-bg-surface")
305
+ })] })
306
+ ]
505
307
  }),
506
- /* @__PURE__ */ E("div", {
507
- className: "rounded-lg bg-purple-500/10 p-5 border border-purple-500/20",
508
- children: [/* @__PURE__ */ E("div", {
509
- className: "flex items-center gap-2 mb-2",
510
- children: [/* @__PURE__ */ T(c, { className: "h-4 w-4 text-purple-600 dark:text-purple-400" }), /* @__PURE__ */ T("h4", {
511
- className: "text-sm font-medium text-purple-600 dark:text-purple-400",
512
- children: "Loyalty Points"
513
- })]
514
- }), /* @__PURE__ */ T("p", {
515
- className: "text-3xl font-bold text-purple-600 dark:text-purple-400",
516
- children: U.loyaltyPoints
517
- })]
518
- })
519
- ]
520
- }), /* @__PURE__ */ E("div", {
521
- className: "grid grid-cols-1 md:grid-cols-2 gap-6",
522
- children: [/* @__PURE__ */ E("div", {
523
- className: "rounded-lg border border-border-subtle bg-bg-surface p-5",
524
- children: [/* @__PURE__ */ E("h4", {
525
- className: "text-base font-semibold text-text-primary mb-4 flex items-center gap-2",
526
- children: [/* @__PURE__ */ T(l, { className: "h-4 w-4 text-text-secondary" }), "Order Statistics"]
308
+ /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("h4", {
309
+ className: "text-base font-semibold text-text-primary mb-3",
310
+ children: "Primary Address"
527
311
  }), /* @__PURE__ */ E("div", {
528
- className: "space-y-3",
312
+ className: "rounded-lg bg-bg-sunken/50 p-4",
529
313
  children: [
530
- /* @__PURE__ */ E("div", {
531
- className: "flex justify-between",
532
- children: [/* @__PURE__ */ T("span", {
533
- className: "text-sm text-text-secondary",
534
- children: "Average Order Value"
535
- }), /* @__PURE__ */ T("span", {
536
- className: "text-sm font-medium text-text-primary",
537
- children: i(U.avgOrderValue, { minimumFractionDigits: 0 })
538
- })]
314
+ /* @__PURE__ */ T("p", {
315
+ className: "text-sm font-medium text-text-primary",
316
+ children: j[0].street
539
317
  }),
540
- /* @__PURE__ */ E("div", {
541
- className: "flex justify-between",
542
- children: [/* @__PURE__ */ T("span", {
543
- className: "text-sm text-text-secondary",
544
- children: "Favorite Category"
545
- }), /* @__PURE__ */ T("span", {
546
- className: "text-sm font-medium text-text-primary",
547
- children: U.favoriteCategory
548
- })]
318
+ /* @__PURE__ */ T("p", {
319
+ className: "text-sm text-text-secondary",
320
+ children: j[0].area
549
321
  }),
550
- /* @__PURE__ */ E("div", {
551
- className: "flex justify-between",
552
- children: [/* @__PURE__ */ T("span", {
553
- className: "text-sm text-text-secondary",
554
- children: "Member Since"
555
- }), /* @__PURE__ */ T("span", {
556
- className: "text-sm font-medium text-text-primary",
557
- children: a(U.memberSince, {
558
- hour: void 0,
559
- minute: void 0,
560
- hour12: void 0
561
- })
562
- })]
322
+ /* @__PURE__ */ E("p", {
323
+ className: "text-sm text-text-secondary",
324
+ children: [
325
+ j[0].city,
326
+ ", ",
327
+ j[0].state,
328
+ " - ",
329
+ j[0].pincode
330
+ ]
331
+ }),
332
+ /* @__PURE__ */ E("button", {
333
+ type: "button",
334
+ onClick: () => M("/customer/addresses"),
335
+ className: "mt-2 flex items-center gap-1 text-xs font-medium text-text-secondary hover:text-text-primary transition-colors",
336
+ children: [
337
+ /* @__PURE__ */ T(_, { className: "h-3 w-3" }),
338
+ "Manage Addresses",
339
+ /* @__PURE__ */ T(p, { className: "h-3 w-3" })
340
+ ]
563
341
  })
564
342
  ]
565
- })]
566
- }), /* @__PURE__ */ E("div", {
567
- className: "rounded-lg border border-border-subtle bg-bg-surface p-5",
568
- children: [/* @__PURE__ */ E("h4", {
569
- className: "text-base font-semibold text-text-primary mb-4 flex items-center gap-2",
570
- children: [/* @__PURE__ */ T(b, { className: "h-4 w-4 text-text-secondary" }), "Account Status"]
343
+ })] }),
344
+ /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ E("h4", {
345
+ className: "text-base font-semibold text-text-primary mb-3 flex items-center gap-2",
346
+ children: [/* @__PURE__ */ T(s, { className: "h-4 w-4 text-text-secondary" }), "Emergency Contact"]
571
347
  }), /* @__PURE__ */ E("div", {
348
+ className: "grid grid-cols-1 md:grid-cols-3 gap-4",
349
+ children: [
350
+ /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("label", {
351
+ className: "block text-sm font-medium text-text-primary mb-1.5",
352
+ children: "Name"
353
+ }), /* @__PURE__ */ T("input", {
354
+ type: "text",
355
+ value: R ? U.emergencyContact.name : V.emergencyContact.name,
356
+ onChange: (e) => Q("name", e.target.value),
357
+ disabled: !R,
358
+ className: t("w-full rounded-lg border border-border-seam px-3 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", !R && "bg-bg-sunken cursor-not-allowed", R && "bg-bg-surface")
359
+ })] }),
360
+ /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("label", {
361
+ className: "block text-sm font-medium text-text-primary mb-1.5",
362
+ children: "Phone"
363
+ }), /* @__PURE__ */ T("input", {
364
+ type: "tel",
365
+ value: R ? U.emergencyContact.phone : V.emergencyContact.phone,
366
+ onChange: (e) => Q("phone", e.target.value),
367
+ disabled: !R,
368
+ className: t("w-full rounded-lg border border-border-seam px-3 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", !R && "bg-bg-sunken cursor-not-allowed", R && "bg-bg-surface")
369
+ })] }),
370
+ /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("label", {
371
+ className: "block text-sm font-medium text-text-primary mb-1.5",
372
+ children: "Relationship"
373
+ }), /* @__PURE__ */ T("input", {
374
+ type: "text",
375
+ value: R ? U.emergencyContact.relationship : V.emergencyContact.relationship,
376
+ onChange: (e) => Q("relationship", e.target.value),
377
+ disabled: !R,
378
+ className: t("w-full rounded-lg border border-border-seam px-3 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", !R && "bg-bg-sunken cursor-not-allowed", R && "bg-bg-surface")
379
+ })] })
380
+ ]
381
+ })] }),
382
+ R && /* @__PURE__ */ E("div", {
383
+ className: "flex gap-3 pt-4 border-t border-border-seam",
384
+ children: [/* @__PURE__ */ E("button", {
385
+ type: "button",
386
+ onClick: Y,
387
+ className: "flex items-center gap-2 rounded-lg bg-foreground px-4 py-2.5 text-sm font-medium text-background hover:opacity-90 transition-opacity",
388
+ children: [/* @__PURE__ */ T(v, { className: "h-4 w-4" }), "Save Changes"]
389
+ }), /* @__PURE__ */ T("button", {
390
+ type: "button",
391
+ onClick: J,
392
+ className: "flex items-center gap-2 rounded-lg border border-border-seam px-4 py-2.5 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
393
+ children: "Cancel"
394
+ })]
395
+ })
396
+ ]
397
+ }),
398
+ I === "preferences" && /* @__PURE__ */ E("div", {
399
+ className: "space-y-8",
400
+ children: [
401
+ /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ E("h3", {
402
+ className: "text-lg font-semibold text-text-primary mb-4 flex items-center gap-2",
403
+ children: [/* @__PURE__ */ T(u, { className: "h-4 w-4 text-text-secondary" }), "Notification Preferences"]
404
+ }), /* @__PURE__ */ T("div", {
572
405
  className: "space-y-3",
573
406
  children: [
574
- /* @__PURE__ */ E("div", {
575
- className: "flex justify-between items-center",
576
- children: [/* @__PURE__ */ T("span", {
577
- className: "text-sm text-text-secondary",
578
- children: "Email Verification"
579
- }), /* @__PURE__ */ T("span", {
580
- className: t("inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs font-medium", R.isEmailVerified ? "bg-green-500/20 text-green-600 dark:text-green-400" : "bg-status-error-bg/20 text-status-error-text"),
581
- children: R.isEmailVerified ? "Verified" : "Not Verified"
407
+ {
408
+ key: "orderUpdates",
409
+ label: "Order status updates"
410
+ },
411
+ {
412
+ key: "promotions",
413
+ label: "Promotional offers and discounts"
414
+ },
415
+ {
416
+ key: "newsletter",
417
+ label: "Newsletter and food recommendations"
418
+ },
419
+ {
420
+ key: "sms",
421
+ label: "SMS notifications"
422
+ }
423
+ ].map((e) => /* @__PURE__ */ E("label", {
424
+ className: "flex items-center gap-3 cursor-pointer",
425
+ children: [/* @__PURE__ */ T("input", {
426
+ type: "checkbox",
427
+ checked: U.notifications[e.key],
428
+ onChange: (t) => ee(e.key, t.target.checked),
429
+ className: "h-4 w-4 rounded border-border-seam text-text-primary focus:ring-[var(--color-focus-ring)]"
430
+ }), /* @__PURE__ */ T("span", {
431
+ className: "text-sm text-text-primary",
432
+ children: e.label
433
+ })]
434
+ }, e.key))
435
+ })] }),
436
+ /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ E("h3", {
437
+ className: "text-lg font-semibold text-text-primary mb-4 flex items-center gap-2",
438
+ children: [/* @__PURE__ */ T(h, { className: "h-4 w-4 text-text-secondary" }), "Dietary Preferences"]
439
+ }), /* @__PURE__ */ T("div", {
440
+ className: "grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-3",
441
+ children: k.map((e) => /* @__PURE__ */ E("label", {
442
+ className: "flex items-center gap-2 cursor-pointer",
443
+ children: [/* @__PURE__ */ T("input", {
444
+ type: "checkbox",
445
+ checked: U.dietary.includes(e),
446
+ onChange: (t) => $("dietary", e, t.target.checked),
447
+ className: "h-4 w-4 rounded border-border-seam text-text-primary focus:ring-[var(--color-focus-ring)]"
448
+ }), /* @__PURE__ */ T("span", {
449
+ className: "text-sm text-text-primary capitalize",
450
+ children: e
451
+ })]
452
+ }, e))
453
+ })] }),
454
+ /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ E("h3", {
455
+ className: "text-lg font-semibold text-text-primary mb-4 flex items-center gap-2",
456
+ children: [/* @__PURE__ */ T(s, { className: "h-4 w-4 text-status-error-text" }), "Food Allergies"]
457
+ }), /* @__PURE__ */ T("div", {
458
+ className: "grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-3",
459
+ children: A.map((e) => /* @__PURE__ */ E("label", {
460
+ className: "flex items-center gap-2 cursor-pointer",
461
+ children: [/* @__PURE__ */ T("input", {
462
+ type: "checkbox",
463
+ checked: U.allergies.includes(e),
464
+ onChange: (t) => $("allergies", e, t.target.checked),
465
+ className: "h-4 w-4 rounded border-border-seam text-status-error-text focus:ring-destructive"
466
+ }), /* @__PURE__ */ T("span", {
467
+ className: "text-sm text-text-primary capitalize",
468
+ children: e
469
+ })]
470
+ }, e))
471
+ })] }),
472
+ /* @__PURE__ */ T("div", {
473
+ className: "pt-4 border-t border-border-seam",
474
+ children: /* @__PURE__ */ E("button", {
475
+ type: "button",
476
+ onClick: X,
477
+ className: "flex items-center gap-2 rounded-lg bg-foreground px-4 py-2.5 text-sm font-medium text-background hover:opacity-90 transition-opacity",
478
+ children: [/* @__PURE__ */ T(v, { className: "h-4 w-4" }), "Save Preferences"]
479
+ })
480
+ })
481
+ ]
482
+ }),
483
+ I === "stats" && /* @__PURE__ */ E("div", {
484
+ className: "space-y-8",
485
+ children: [/* @__PURE__ */ E("div", {
486
+ className: "grid grid-cols-1 md:grid-cols-3 gap-4",
487
+ children: [
488
+ /* @__PURE__ */ E("div", {
489
+ className: "rounded-lg bg-status-info-bg/10 p-5 border border-status-info-border/20",
490
+ children: [/* @__PURE__ */ E("div", {
491
+ className: "flex items-center gap-2 mb-2",
492
+ children: [/* @__PURE__ */ T(x, { className: "h-4 w-4 text-status-info-text" }), /* @__PURE__ */ T("h4", {
493
+ className: "text-sm font-medium text-status-info-text",
494
+ children: "Total Orders"
582
495
  })]
583
- }),
584
- /* @__PURE__ */ E("div", {
585
- className: "flex justify-between items-center",
586
- children: [/* @__PURE__ */ T("span", {
587
- className: "text-sm text-text-secondary",
588
- children: "Phone Verification"
589
- }), /* @__PURE__ */ T("span", {
590
- className: t("inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs font-medium", R.isPhoneVerified ? "bg-green-500/20 text-green-600 dark:text-green-400" : "bg-status-error-bg/20 text-status-error-text"),
591
- children: R.isPhoneVerified ? "Verified" : "Not Verified"
496
+ }), /* @__PURE__ */ T("p", {
497
+ className: "text-3xl font-bold text-status-info-text",
498
+ children: G.totalOrders
499
+ })]
500
+ }),
501
+ /* @__PURE__ */ E("div", {
502
+ className: "rounded-lg bg-status-success-bg/10 p-5 border border-status-success-border/20",
503
+ children: [/* @__PURE__ */ E("div", {
504
+ className: "flex items-center gap-2 mb-2",
505
+ children: [/* @__PURE__ */ T(g, { className: "h-4 w-4 text-status-success-text" }), /* @__PURE__ */ T("h4", {
506
+ className: "text-sm font-medium text-status-success-text",
507
+ children: "Total Spent"
592
508
  })]
593
- }),
594
- /* @__PURE__ */ E("div", {
595
- className: "flex justify-between",
596
- children: [/* @__PURE__ */ T("span", {
597
- className: "text-sm text-text-secondary",
598
- children: "Last Updated"
599
- }), /* @__PURE__ */ T("span", {
600
- className: "text-sm font-medium text-text-primary",
601
- children: a(R.updatedAt, {
602
- hour: void 0,
603
- minute: void 0,
604
- hour12: void 0
605
- })
509
+ }), /* @__PURE__ */ T("p", {
510
+ className: "text-3xl font-bold text-status-success-text",
511
+ children: i(G.totalSpent, { minimumFractionDigits: 0 })
512
+ })]
513
+ }),
514
+ /* @__PURE__ */ E("div", {
515
+ className: "rounded-lg bg-accent-purple-subtle p-5 border border-accent-purple/20",
516
+ children: [/* @__PURE__ */ E("div", {
517
+ className: "flex items-center gap-2 mb-2",
518
+ children: [/* @__PURE__ */ T(c, { className: "h-4 w-4 text-accent-purple" }), /* @__PURE__ */ T("h4", {
519
+ className: "text-sm font-medium text-accent-purple",
520
+ children: "Loyalty Points"
606
521
  })]
607
- })
608
- ]
522
+ }), /* @__PURE__ */ T("p", {
523
+ className: "text-3xl font-bold text-accent-purple",
524
+ children: G.loyaltyPoints
525
+ })]
526
+ })
527
+ ]
528
+ }), /* @__PURE__ */ E("div", {
529
+ className: "grid grid-cols-1 md:grid-cols-2 gap-6",
530
+ children: [/* @__PURE__ */ E("div", {
531
+ className: "rounded-lg border border-border-seam bg-bg-surface p-5",
532
+ children: [/* @__PURE__ */ E("h4", {
533
+ className: "text-base font-semibold text-text-primary mb-4 flex items-center gap-2",
534
+ children: [/* @__PURE__ */ T(l, { className: "h-4 w-4 text-text-secondary" }), "Order Statistics"]
535
+ }), /* @__PURE__ */ E("div", {
536
+ className: "space-y-3",
537
+ children: [
538
+ /* @__PURE__ */ E("div", {
539
+ className: "flex justify-between",
540
+ children: [/* @__PURE__ */ T("span", {
541
+ className: "text-sm text-text-secondary",
542
+ children: "Average Order Value"
543
+ }), /* @__PURE__ */ T("span", {
544
+ className: "text-sm font-medium text-text-primary",
545
+ children: i(G.avgOrderValue, { minimumFractionDigits: 0 })
546
+ })]
547
+ }),
548
+ /* @__PURE__ */ E("div", {
549
+ className: "flex justify-between",
550
+ children: [/* @__PURE__ */ T("span", {
551
+ className: "text-sm text-text-secondary",
552
+ children: "Favorite Category"
553
+ }), /* @__PURE__ */ T("span", {
554
+ className: "text-sm font-medium text-text-primary",
555
+ children: G.favoriteCategory
556
+ })]
557
+ }),
558
+ /* @__PURE__ */ E("div", {
559
+ className: "flex justify-between",
560
+ children: [/* @__PURE__ */ T("span", {
561
+ className: "text-sm text-text-secondary",
562
+ children: "Member Since"
563
+ }), /* @__PURE__ */ T("span", {
564
+ className: "text-sm font-medium text-text-primary",
565
+ children: a(G.memberSince, {
566
+ hour: void 0,
567
+ minute: void 0,
568
+ hour12: void 0
569
+ })
570
+ })]
571
+ })
572
+ ]
573
+ })]
574
+ }), /* @__PURE__ */ E("div", {
575
+ className: "rounded-lg border border-border-seam bg-bg-surface p-5",
576
+ children: [/* @__PURE__ */ E("h4", {
577
+ className: "text-base font-semibold text-text-primary mb-4 flex items-center gap-2",
578
+ children: [/* @__PURE__ */ T(b, { className: "h-4 w-4 text-text-secondary" }), "Account Status"]
579
+ }), /* @__PURE__ */ E("div", {
580
+ className: "space-y-3",
581
+ children: [
582
+ /* @__PURE__ */ E("div", {
583
+ className: "flex justify-between items-center",
584
+ children: [/* @__PURE__ */ T("span", {
585
+ className: "text-sm text-text-secondary",
586
+ children: "Email Verification"
587
+ }), /* @__PURE__ */ T("span", {
588
+ className: t("inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs font-medium", B.isEmailVerified ? "bg-status-success-bg/20 text-status-success-text" : "bg-status-error-bg/20 text-status-error-text"),
589
+ children: B.isEmailVerified ? "Verified" : "Not Verified"
590
+ })]
591
+ }),
592
+ /* @__PURE__ */ E("div", {
593
+ className: "flex justify-between items-center",
594
+ children: [/* @__PURE__ */ T("span", {
595
+ className: "text-sm text-text-secondary",
596
+ children: "Phone Verification"
597
+ }), /* @__PURE__ */ T("span", {
598
+ className: t("inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs font-medium", B.isPhoneVerified ? "bg-status-success-bg/20 text-status-success-text" : "bg-status-error-bg/20 text-status-error-text"),
599
+ children: B.isPhoneVerified ? "Verified" : "Not Verified"
600
+ })]
601
+ }),
602
+ /* @__PURE__ */ E("div", {
603
+ className: "flex justify-between",
604
+ children: [/* @__PURE__ */ T("span", {
605
+ className: "text-sm text-text-secondary",
606
+ children: "Last Updated"
607
+ }), /* @__PURE__ */ T("span", {
608
+ className: "text-sm font-medium text-text-primary",
609
+ children: a(B.updatedAt, {
610
+ hour: void 0,
611
+ minute: void 0,
612
+ hour12: void 0
613
+ })
614
+ })]
615
+ })
616
+ ]
617
+ })]
609
618
  })]
610
619
  })]
611
- })]
612
- })
613
- ]
614
- })]
615
- })]
620
+ })
621
+ ]
622
+ })]
623
+ })
624
+ ]
616
625
  });
617
626
  }
618
627
  //#endregion
619
- export { A as CustomerProfilePage };
628
+ export { M as CustomerProfilePage };
620
629
 
621
630
  //# sourceMappingURL=CustomerProfilePage.js.map