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