@burdenoff/microfe-coolandlovely 2026.625.2 → 2026.628.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 (165) hide show
  1. package/dist/coolandlovely/CoolAndLovelyRoot.js +66 -122
  2. package/dist/coolandlovely/CoolAndLovelyRoot.js.map +1 -1
  3. package/dist/coolandlovely/CoolAndLovelyRoutes.js +87 -175
  4. package/dist/coolandlovely/CoolAndLovelyRoutes.js.map +1 -1
  5. package/dist/coolandlovely/components/Field.js +81 -0
  6. package/dist/coolandlovely/components/Field.js.map +1 -0
  7. package/dist/coolandlovely/components/StateViews.js +34 -0
  8. package/dist/coolandlovely/components/StateViews.js.map +1 -0
  9. package/dist/coolandlovely/components/StatusBadge.js +25 -22
  10. package/dist/coolandlovely/components/StatusBadge.js.map +1 -1
  11. package/dist/coolandlovely/components/TagList.js +21 -0
  12. package/dist/coolandlovely/components/TagList.js.map +1 -0
  13. package/dist/coolandlovely/components/Thumbnail.js +29 -0
  14. package/dist/coolandlovely/components/Thumbnail.js.map +1 -0
  15. package/dist/coolandlovely/context/CoolAndLovelyContext.js +10 -10
  16. package/dist/coolandlovely/context/CoolAndLovelyContext.js.map +1 -1
  17. package/dist/coolandlovely/hooks/index.js +1 -0
  18. package/dist/coolandlovely/hooks/useCoolAndLovelyApi.js +462 -169
  19. package/dist/coolandlovely/hooks/useCoolAndLovelyApi.js.map +1 -1
  20. package/dist/coolandlovely/pages/HomePage.js +251 -845
  21. package/dist/coolandlovely/pages/HomePage.js.map +1 -1
  22. package/dist/coolandlovely/pages/brands/BrandDetailPage.js +319 -0
  23. package/dist/coolandlovely/pages/brands/BrandDetailPage.js.map +1 -0
  24. package/dist/coolandlovely/pages/brands/BrandFormPage.js +190 -0
  25. package/dist/coolandlovely/pages/brands/BrandFormPage.js.map +1 -0
  26. package/dist/coolandlovely/pages/brands/BrandsListPage.js +158 -0
  27. package/dist/coolandlovely/pages/brands/BrandsListPage.js.map +1 -0
  28. package/dist/coolandlovely/pages/collaborations/CollaborationDetailPage.js +253 -0
  29. package/dist/coolandlovely/pages/collaborations/CollaborationDetailPage.js.map +1 -0
  30. package/dist/coolandlovely/pages/collaborations/CollaborationFormPage.js +206 -0
  31. package/dist/coolandlovely/pages/collaborations/CollaborationFormPage.js.map +1 -0
  32. package/dist/coolandlovely/pages/collaborations/CollaborationsListPage.js +129 -0
  33. package/dist/coolandlovely/pages/collaborations/CollaborationsListPage.js.map +1 -0
  34. package/dist/coolandlovely/pages/collections/CollectionDetailPage.js +217 -0
  35. package/dist/coolandlovely/pages/collections/CollectionDetailPage.js.map +1 -0
  36. package/dist/coolandlovely/pages/collections/CollectionFormPage.js +217 -0
  37. package/dist/coolandlovely/pages/collections/CollectionFormPage.js.map +1 -0
  38. package/dist/coolandlovely/pages/collections/CollectionsListPage.js +122 -0
  39. package/dist/coolandlovely/pages/collections/CollectionsListPage.js.map +1 -0
  40. package/dist/coolandlovely/pages/items/StyleItemDetailPage.js +230 -0
  41. package/dist/coolandlovely/pages/items/StyleItemDetailPage.js.map +1 -0
  42. package/dist/coolandlovely/pages/items/StyleItemFormPage.js +276 -0
  43. package/dist/coolandlovely/pages/items/StyleItemFormPage.js.map +1 -0
  44. package/dist/coolandlovely/pages/items/StyleItemsListPage.js +170 -0
  45. package/dist/coolandlovely/pages/items/StyleItemsListPage.js.map +1 -0
  46. package/dist/coolandlovely/pages/lookbooks/LookbookDetailPage.js +124 -0
  47. package/dist/coolandlovely/pages/lookbooks/LookbookDetailPage.js.map +1 -0
  48. package/dist/coolandlovely/pages/lookbooks/LookbooksListPage.js +156 -0
  49. package/dist/coolandlovely/pages/lookbooks/LookbooksListPage.js.map +1 -0
  50. package/dist/coolandlovely/pages/looks/LookDetailPage.js +238 -0
  51. package/dist/coolandlovely/pages/looks/LookDetailPage.js.map +1 -0
  52. package/dist/coolandlovely/pages/looks/LookFormPage.js +209 -0
  53. package/dist/coolandlovely/pages/looks/LookFormPage.js.map +1 -0
  54. package/dist/coolandlovely/pages/looks/LooksListPage.js +181 -0
  55. package/dist/coolandlovely/pages/looks/LooksListPage.js.map +1 -0
  56. package/dist/coolandlovely/pages/profile/StyleProfilePage.js +224 -0
  57. package/dist/coolandlovely/pages/profile/StyleProfilePage.js.map +1 -0
  58. package/dist/coolandlovely/pages/wardrobe/WardrobeFormPage.js +173 -0
  59. package/dist/coolandlovely/pages/wardrobe/WardrobeFormPage.js.map +1 -0
  60. package/dist/coolandlovely/pages/wardrobe/WardrobeListPage.js +172 -0
  61. package/dist/coolandlovely/pages/wardrobe/WardrobeListPage.js.map +1 -0
  62. package/dist/coolandlovely/store/coolandlovelyStore.js +2 -6
  63. package/dist/coolandlovely/store/coolandlovelyStore.js.map +1 -1
  64. package/dist/coolandlovely/utils/formatters.js +31 -23
  65. package/dist/coolandlovely/utils/formatters.js.map +1 -1
  66. package/dist/coolandlovely/utils/icons.js +34 -0
  67. package/dist/coolandlovely/utils/icons.js.map +1 -0
  68. package/dist/index.js +4 -4
  69. package/package.json +1 -1
  70. package/dist/coolandlovely/components/InvestmentCard.js +0 -98
  71. package/dist/coolandlovely/components/InvestmentCard.js.map +0 -1
  72. package/dist/coolandlovely/components/RatingDisplay.js +0 -35
  73. package/dist/coolandlovely/components/RatingDisplay.js.map +0 -1
  74. package/dist/coolandlovely/mocks/data.js +0 -1517
  75. package/dist/coolandlovely/mocks/data.js.map +0 -1
  76. package/dist/coolandlovely/mocks/users.js +0 -34
  77. package/dist/coolandlovely/mocks/users.js.map +0 -1
  78. package/dist/coolandlovely/pages/admin/AdminAnalyticsPage.js +0 -651
  79. package/dist/coolandlovely/pages/admin/AdminAnalyticsPage.js.map +0 -1
  80. package/dist/coolandlovely/pages/admin/AdminDashboard.js +0 -673
  81. package/dist/coolandlovely/pages/admin/AdminDashboard.js.map +0 -1
  82. package/dist/coolandlovely/pages/admin/AdminFinancialPage.js +0 -427
  83. package/dist/coolandlovely/pages/admin/AdminFinancialPage.js.map +0 -1
  84. package/dist/coolandlovely/pages/admin/AdminOrdersPage.js +0 -665
  85. package/dist/coolandlovely/pages/admin/AdminOrdersPage.js.map +0 -1
  86. package/dist/coolandlovely/pages/admin/AdminProfilePage.js +0 -264
  87. package/dist/coolandlovely/pages/admin/AdminProfilePage.js.map +0 -1
  88. package/dist/coolandlovely/pages/admin/AdminSettingsPage.js +0 -654
  89. package/dist/coolandlovely/pages/admin/AdminSettingsPage.js.map +0 -1
  90. package/dist/coolandlovely/pages/admin/CartManagementPage.js +0 -874
  91. package/dist/coolandlovely/pages/admin/CartManagementPage.js.map +0 -1
  92. package/dist/coolandlovely/pages/admin/UserManagementPage.js +0 -898
  93. package/dist/coolandlovely/pages/admin/UserManagementPage.js.map +0 -1
  94. package/dist/coolandlovely/pages/cart-owner/AnalyticsDashboard.js +0 -842
  95. package/dist/coolandlovely/pages/cart-owner/AnalyticsDashboard.js.map +0 -1
  96. package/dist/coolandlovely/pages/cart-owner/BusinessSettingsPage.js +0 -705
  97. package/dist/coolandlovely/pages/cart-owner/BusinessSettingsPage.js.map +0 -1
  98. package/dist/coolandlovely/pages/cart-owner/CartOwnerDashboard.js +0 -802
  99. package/dist/coolandlovely/pages/cart-owner/CartOwnerDashboard.js.map +0 -1
  100. package/dist/coolandlovely/pages/cart-owner/CartOwnerProfilePage.js +0 -891
  101. package/dist/coolandlovely/pages/cart-owner/CartOwnerProfilePage.js.map +0 -1
  102. package/dist/coolandlovely/pages/cart-owner/CartServiceConfigPage.js +0 -639
  103. package/dist/coolandlovely/pages/cart-owner/CartServiceConfigPage.js.map +0 -1
  104. package/dist/coolandlovely/pages/cart-owner/InventoryManagementPage.js +0 -914
  105. package/dist/coolandlovely/pages/cart-owner/InventoryManagementPage.js.map +0 -1
  106. package/dist/coolandlovely/pages/cart-owner/OrderManagementPage.js +0 -882
  107. package/dist/coolandlovely/pages/cart-owner/OrderManagementPage.js.map +0 -1
  108. package/dist/coolandlovely/pages/cart-owner/StaffManagementPage.js +0 -831
  109. package/dist/coolandlovely/pages/cart-owner/StaffManagementPage.js.map +0 -1
  110. package/dist/coolandlovely/pages/common/HelpSupportPage.js +0 -1325
  111. package/dist/coolandlovely/pages/common/HelpSupportPage.js.map +0 -1
  112. package/dist/coolandlovely/pages/common/NotificationCenterPage.js +0 -671
  113. package/dist/coolandlovely/pages/common/NotificationCenterPage.js.map +0 -1
  114. package/dist/coolandlovely/pages/common/SettingsPage.js +0 -973
  115. package/dist/coolandlovely/pages/common/SettingsPage.js.map +0 -1
  116. package/dist/coolandlovely/pages/customer/BookingDetailsPage.js +0 -630
  117. package/dist/coolandlovely/pages/customer/BookingDetailsPage.js.map +0 -1
  118. package/dist/coolandlovely/pages/customer/CartDetailPage.js +0 -623
  119. package/dist/coolandlovely/pages/customer/CartDetailPage.js.map +0 -1
  120. package/dist/coolandlovely/pages/customer/CartDiscoveryPage.js +0 -558
  121. package/dist/coolandlovely/pages/customer/CartDiscoveryPage.js.map +0 -1
  122. package/dist/coolandlovely/pages/customer/CheckoutPage.js +0 -529
  123. package/dist/coolandlovely/pages/customer/CheckoutPage.js.map +0 -1
  124. package/dist/coolandlovely/pages/customer/CustomerDashboard.js +0 -538
  125. package/dist/coolandlovely/pages/customer/CustomerDashboard.js.map +0 -1
  126. package/dist/coolandlovely/pages/customer/CustomerProfilePage.js +0 -658
  127. package/dist/coolandlovely/pages/customer/CustomerProfilePage.js.map +0 -1
  128. package/dist/coolandlovely/pages/customer/DirectServiceBookingPage.js +0 -632
  129. package/dist/coolandlovely/pages/customer/DirectServiceBookingPage.js.map +0 -1
  130. package/dist/coolandlovely/pages/customer/FavoritesPage.js +0 -487
  131. package/dist/coolandlovely/pages/customer/FavoritesPage.js.map +0 -1
  132. package/dist/coolandlovely/pages/customer/OrderHistoryPage.js +0 -447
  133. package/dist/coolandlovely/pages/customer/OrderHistoryPage.js.map +0 -1
  134. package/dist/coolandlovely/pages/customer/OrderTrackingPage.js +0 -425
  135. package/dist/coolandlovely/pages/customer/OrderTrackingPage.js.map +0 -1
  136. package/dist/coolandlovely/pages/customer/PaymentMethodsPage.js +0 -494
  137. package/dist/coolandlovely/pages/customer/PaymentMethodsPage.js.map +0 -1
  138. package/dist/coolandlovely/pages/customer/ReviewsPage.js +0 -616
  139. package/dist/coolandlovely/pages/customer/ReviewsPage.js.map +0 -1
  140. package/dist/coolandlovely/pages/customer/SavedAddressesPage.js +0 -449
  141. package/dist/coolandlovely/pages/customer/SavedAddressesPage.js.map +0 -1
  142. package/dist/coolandlovely/pages/investor/InvestmentDetailsPage.js +0 -887
  143. package/dist/coolandlovely/pages/investor/InvestmentDetailsPage.js.map +0 -1
  144. package/dist/coolandlovely/pages/investor/InvestmentOpportunitiesPage.js +0 -945
  145. package/dist/coolandlovely/pages/investor/InvestmentOpportunitiesPage.js.map +0 -1
  146. package/dist/coolandlovely/pages/investor/InvestorAnalyticsPage.js +0 -687
  147. package/dist/coolandlovely/pages/investor/InvestorAnalyticsPage.js.map +0 -1
  148. package/dist/coolandlovely/pages/investor/InvestorDashboard.js +0 -455
  149. package/dist/coolandlovely/pages/investor/InvestorDashboard.js.map +0 -1
  150. package/dist/coolandlovely/pages/investor/InvestorInvestmentsPage.js +0 -405
  151. package/dist/coolandlovely/pages/investor/InvestorInvestmentsPage.js.map +0 -1
  152. package/dist/coolandlovely/pages/investor/InvestorPortfolioPage.js +0 -602
  153. package/dist/coolandlovely/pages/investor/InvestorPortfolioPage.js.map +0 -1
  154. package/dist/coolandlovely/pages/investor/InvestorProfilePage.js +0 -1070
  155. package/dist/coolandlovely/pages/investor/InvestorProfilePage.js.map +0 -1
  156. package/dist/coolandlovely/pages/worker/TaskDetailsPage.js +0 -533
  157. package/dist/coolandlovely/pages/worker/TaskDetailsPage.js.map +0 -1
  158. package/dist/coolandlovely/pages/worker/WorkerDashboard.js +0 -671
  159. package/dist/coolandlovely/pages/worker/WorkerDashboard.js.map +0 -1
  160. package/dist/coolandlovely/pages/worker/WorkerOrdersPage.js +0 -680
  161. package/dist/coolandlovely/pages/worker/WorkerOrdersPage.js.map +0 -1
  162. package/dist/coolandlovely/pages/worker/WorkerProfilePage.js +0 -692
  163. package/dist/coolandlovely/pages/worker/WorkerProfilePage.js.map +0 -1
  164. package/dist/coolandlovely/pages/worker/WorkerSchedulePage.js +0 -583
  165. package/dist/coolandlovely/pages/worker/WorkerSchedulePage.js.map +0 -1
@@ -1,658 +0,0 @@
1
- import { useCoolAndLovely as e } from "../../context/CoolAndLovelyContext.js";
2
- import { cn as t } from "../../utils/cn.js";
3
- import { PageLayout as n } from "../../components/PageLayout.js";
4
- import { useOrders as r } from "../../hooks/useCoolAndLovelyApi.js";
5
- import { formatCurrency as i, formatDate as a } from "../../utils/formatters.js";
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 ee } 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";
10
- //#region src/coolandlovely/pages/customer/CustomerProfilePage.tsx
11
- var k = [
12
- "vegetarian",
13
- "vegan",
14
- "jain",
15
- "keto",
16
- "gluten-free",
17
- "low-carb"
18
- ], A = [
19
- "nuts",
20
- "dairy",
21
- "eggs",
22
- "soy",
23
- "shellfish",
24
- "gluten"
25
- ], j = [{
26
- id: "addr-1",
27
- label: "Home",
28
- street: "123, MG Road",
29
- area: "Near Central Mall",
30
- city: "Bangalore",
31
- state: "Karnataka",
32
- pincode: "560001",
33
- isDefault: !0
34
- }, {
35
- id: "addr-2",
36
- label: "Office",
37
- street: "456 Tech Park Road",
38
- area: "Whitefield",
39
- city: "Bangalore",
40
- state: "Karnataka",
41
- pincode: "560066",
42
- isDefault: !1
43
- }];
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 || "",
49
- phone: "+91 98765 43210",
50
- profilePicture: N?.avatar,
51
- isEmailVerified: !0,
52
- isPhoneVerified: !0,
53
- createdAt: (/* @__PURE__ */ new Date()).toISOString(),
54
- updatedAt: (/* @__PURE__ */ new Date()).toISOString()
55
- }, [V, H] = o({
56
- firstName: B.firstName,
57
- lastName: B.lastName,
58
- email: B.email,
59
- phone: B.phone,
60
- emergencyContact: {
61
- name: "Priya Sharma",
62
- phone: "+91 98765 43211",
63
- relationship: "Spouse"
64
- },
65
- dietary: ["vegetarian"],
66
- allergies: ["nuts", "dairy"],
67
- notifications: {
68
- orderUpdates: !0,
69
- promotions: !0,
70
- newsletter: !1,
71
- sms: !0
72
- }
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,
78
- favoriteCategory: "South Indian",
79
- memberSince: B.createdAt
80
- }, K = F, q = () => {
81
- W({ ...V }), z(!0);
82
- }, J = () => {
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) => ({
90
- ...n,
91
- [e]: t
92
- }));
93
- }, Q = (e, t) => {
94
- W((n) => ({
95
- ...n,
96
- emergencyContact: {
97
- ...n.emergencyContact,
98
- [e]: t
99
- }
100
- }));
101
- }, te = (e, t) => {
102
- W((n) => ({
103
- ...n,
104
- notifications: {
105
- ...n.notifications,
106
- [e]: t
107
- }
108
- }));
109
- }, $ = (e, t, n) => {
110
- W((r) => {
111
- let i = r[e], a = n ? [...i, t] : i.filter((e) => e !== t);
112
- return {
113
- ...r,
114
- [e]: a
115
- };
116
- });
117
- }, ne = [
118
- {
119
- key: "profile",
120
- label: "Profile Info",
121
- icon: C
122
- },
123
- {
124
- key: "preferences",
125
- label: "Preferences",
126
- icon: y
127
- },
128
- {
129
- key: "stats",
130
- label: "My Stats",
131
- icon: l
132
- }
133
- ];
134
- return K ? /* @__PURE__ */ w(n, {
135
- title: "My Profile",
136
- children: /* @__PURE__ */ T("div", {
137
- className: "flex flex-col items-center justify-center py-16 text-center",
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", {
139
- className: "text-sm text-text-secondary",
140
- children: "Loading profile..."
141
- })]
142
- })
143
- }) : /* @__PURE__ */ T(n, {
144
- title: "My Profile",
145
- description: "Manage your personal information and preferences",
146
- children: [
147
- /* @__PURE__ */ w(O, {
148
- className: "mb-6",
149
- icon: /* @__PURE__ */ w(C, { className: "h-4 w-4" }),
150
- children: "Your account hub. Keep your name, contact details and food preferences up to date so orders and recommendations fit you, verify your email and phone for account security, and track your loyalty points and lifetime stats."
151
- }),
152
- /* @__PURE__ */ w(D, {
153
- className: "mb-6",
154
- storageKey: "coolandlovely-customer-profile",
155
- steps: [
156
- {
157
- id: "complete-profile",
158
- label: "Complete your profile",
159
- description: "Add your details so orders and delivery go smoothly.",
160
- icon: /* @__PURE__ */ w(m, { className: "h-4 w-4" }),
161
- onClick: () => L("profile")
162
- },
163
- {
164
- id: "verify",
165
- label: "Verify email & phone",
166
- description: "Secure your account and unlock faster checkout.",
167
- icon: /* @__PURE__ */ w(b, { className: "h-4 w-4" }),
168
- onClick: () => L("profile"),
169
- done: B.isEmailVerified && B.isPhoneVerified
170
- },
171
- {
172
- id: "preferences",
173
- label: "Set your preferences",
174
- description: "Tell us your dietary needs and notification choices.",
175
- icon: /* @__PURE__ */ w(h, { className: "h-4 w-4" }),
176
- onClick: () => L("preferences")
177
- }
178
- ]
179
- }),
180
- /* @__PURE__ */ T(E, {
181
- className: "flex flex-col items-center sm:flex-row sm:items-start gap-6 p-6",
182
- children: [
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(S, { className: "h-10 w-10" })
194
- })
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(d, { className: "h-4 w-4" })
199
- })]
200
- }),
201
- /* @__PURE__ */ T("div", {
202
- className: "flex-1 text-center sm:text-left",
203
- children: [
204
- /* @__PURE__ */ T("h2", {
205
- className: "text-xl font-semibold text-text-primary",
206
- children: [
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
- }),
220
- /* @__PURE__ */ T("div", {
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/20 text-status-success-text" : "bg-status-error-bg/20 text-status-error-text"),
224
- children: [/* @__PURE__ */ w(f, { 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/20 text-status-success-text" : "bg-status-error-bg/20 text-status-error-text"),
227
- children: [/* @__PURE__ */ w(f, { className: "h-3 w-3" }), B.isPhoneVerified ? "Phone Verified" : "Phone Not Verified"]
228
- })]
229
- })
230
- ]
231
- }),
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-subtle bg-bg-surface",
246
- children: [/* @__PURE__ */ w("div", {
247
- className: "border-b border-border-subtle",
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",
265
- children: [
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(v, { 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-subtle px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-accent transition-colors",
282
- children: [/* @__PURE__ */ w(ee, { className: "h-3 w-3" }), "Cancel"]
283
- })]
284
- }) : /* @__PURE__ */ T("button", {
285
- type: "button",
286
- onClick: q,
287
- 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",
288
- children: [/* @__PURE__ */ w(m, { className: "h-3 w-3" }), "Edit Profile"]
289
- })]
290
- }),
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-subtle 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-subtle 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-subtle 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-subtle 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
- ]
335
- }),
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",
341
- children: [
342
- /* @__PURE__ */ w("p", {
343
- className: "text-sm font-medium text-text-primary",
344
- children: j[0].street
345
- }),
346
- /* @__PURE__ */ w("p", {
347
- className: "text-sm text-text-secondary",
348
- children: j[0].area
349
- }),
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(_, { className: "h-3 w-3" }),
366
- "Manage Addresses",
367
- /* @__PURE__ */ w(p, { className: "h-3 w-3" })
368
- ]
369
- })
370
- ]
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-subtle 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-subtle 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-subtle 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-subtle",
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(v, { 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-subtle 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(u, { className: "h-4 w-4 text-text-secondary" }), "Notification Preferences"]
432
- }), /* @__PURE__ */ w("div", {
433
- className: "space-y-3",
434
- children: [
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-subtle 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(h, { 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-subtle 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-subtle 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-subtle",
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(v, { 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-accent-blue-subtle/10 p-5 border border-accent-blue-subtle/20",
518
- children: [/* @__PURE__ */ T("div", {
519
- className: "flex items-center gap-2 mb-2",
520
- children: [/* @__PURE__ */ w(x, { className: "h-4 w-4 text-accent-blue" }), /* @__PURE__ */ w("h4", {
521
- className: "text-sm font-medium text-accent-blue",
522
- children: "Total Orders"
523
- })]
524
- }), /* @__PURE__ */ w("p", {
525
- className: "text-3xl font-bold text-accent-blue",
526
- children: G.totalOrders
527
- })]
528
- }),
529
- /* @__PURE__ */ T("div", {
530
- className: "rounded-lg bg-status-success-bg-subtle/10 p-5 border border-status-success-border/20",
531
- children: [/* @__PURE__ */ T("div", {
532
- className: "flex items-center gap-2 mb-2",
533
- children: [/* @__PURE__ */ w(g, { 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"
536
- })]
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-accent-purple-subtle/10 p-5 border border-accent-purple-subtle/20",
544
- children: [/* @__PURE__ */ T("div", {
545
- className: "flex items-center gap-2 mb-2",
546
- children: [/* @__PURE__ */ w(c, { className: "h-4 w-4 text-accent-purple" }), /* @__PURE__ */ w("h4", {
547
- className: "text-sm font-medium text-accent-purple",
548
- children: "Loyalty Points"
549
- })]
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 bg-gloss-card shadow-pop",
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(l, { 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 bg-gloss-card shadow-pop",
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(b, { 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/20 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/20 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
- })]
646
- })]
647
- })]
648
- })
649
- ]
650
- })]
651
- })
652
- ]
653
- });
654
- }
655
- //#endregion
656
- export { M as CustomerProfilePage };
657
-
658
- //# sourceMappingURL=CustomerProfilePage.js.map