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