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