@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,639 +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 { EmptyState as r } from "../../components/EmptyState.js";
5
- import { useState as i } from "react";
6
- import { AlertCircle as a, Calendar as o, CheckCircle2 as s, Clock as c, Home as l, Package as u, Plus as d, Save as f, Settings as p, ShoppingBag as m, Trash2 as h, Truck as g } from "lucide-react";
7
- import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
8
- import { EmphasisPanel as b, PagePurpose as x } from "@burdenoff/fe-libs/ui";
9
- //#region src/coolandlovely/pages/cart-owner/CartServiceConfigPage.tsx
10
- var S = [
11
- {
12
- value: "products_only",
13
- label: "Products Only",
14
- description: "You'll manage physical products with inventory, stock levels, and shipping."
15
- },
16
- {
17
- value: "services_only",
18
- label: "Services Only",
19
- description: "You'll manage services with appointments, bookings, and time slots."
20
- },
21
- {
22
- value: "both",
23
- label: "Products & Services",
24
- description: "You'll manage both products and services with full flexibility."
25
- }
26
- ], C = [
27
- "monday",
28
- "tuesday",
29
- "wednesday",
30
- "thursday",
31
- "friday",
32
- "saturday",
33
- "sunday"
34
- ], w = {
35
- monday: "Mon",
36
- tuesday: "Tue",
37
- wednesday: "Wed",
38
- thursday: "Thu",
39
- friday: "Fri",
40
- saturday: "Sat",
41
- sunday: "Sun"
42
- }, T = {
43
- monday: {
44
- isOpen: !0,
45
- open: "09:00",
46
- close: "21:00"
47
- },
48
- tuesday: {
49
- isOpen: !0,
50
- open: "09:00",
51
- close: "21:00"
52
- },
53
- wednesday: {
54
- isOpen: !0,
55
- open: "09:00",
56
- close: "21:00"
57
- },
58
- thursday: {
59
- isOpen: !0,
60
- open: "09:00",
61
- close: "21:00"
62
- },
63
- friday: {
64
- isOpen: !0,
65
- open: "09:00",
66
- close: "22:00"
67
- },
68
- saturday: {
69
- isOpen: !0,
70
- open: "10:00",
71
- close: "22:00"
72
- },
73
- sunday: {
74
- isOpen: !1,
75
- open: "10:00",
76
- close: "18:00"
77
- }
78
- }, E = {
79
- pickup: {
80
- enabled: !0,
81
- preparationTime: 15
82
- },
83
- delivery: {
84
- enabled: !0,
85
- deliveryRadius: 5,
86
- deliveryFee: 30,
87
- minimumOrderValue: 100
88
- },
89
- scheduledStop: {
90
- enabled: !1,
91
- stops: []
92
- },
93
- directService: {
94
- enabled: !1,
95
- config: {
96
- serviceFee: 50,
97
- minimumAdvancePayment: 200,
98
- serviceRadius: 10,
99
- estimatedArrivalTime: 45,
100
- minimumOrderValue: 300
101
- }
102
- }
103
- }, D = () => {
104
- let { navigateTo: D } = e(), [O, k] = i(!0), [A, j] = i("both"), [M, N] = i(T), [P, F] = i(E), [I, L] = i(!1), [R, z] = i(!1), [B, V] = i([]), H = (e, t, n) => {
105
- N((r) => ({
106
- ...r,
107
- [e]: {
108
- ...r[e],
109
- [t]: n
110
- }
111
- }));
112
- }, U = (e, t, n) => {
113
- F((r) => ({
114
- ...r,
115
- [e]: {
116
- ...r[e],
117
- [t]: n
118
- }
119
- }));
120
- }, W = (e, t) => {
121
- F((n) => ({
122
- ...n,
123
- directService: {
124
- ...n.directService,
125
- config: {
126
- ...n.directService.config,
127
- [e]: t
128
- }
129
- }
130
- }));
131
- }, G = () => {
132
- let e = {
133
- id: `stop-${Date.now()}`,
134
- name: "",
135
- address: "",
136
- arrivalTime: "09:00",
137
- departureTime: "11:00",
138
- daysOfWeek: [
139
- "monday",
140
- "tuesday",
141
- "wednesday",
142
- "thursday",
143
- "friday"
144
- ],
145
- isActive: !0
146
- };
147
- F((t) => ({
148
- ...t,
149
- scheduledStop: {
150
- ...t.scheduledStop,
151
- stops: [...t.scheduledStop.stops, e]
152
- }
153
- }));
154
- }, K = (e) => {
155
- F((t) => ({
156
- ...t,
157
- scheduledStop: {
158
- ...t.scheduledStop,
159
- stops: t.scheduledStop.stops.filter((t) => t.id !== e)
160
- }
161
- }));
162
- }, q = (e, t, n) => {
163
- F((r) => ({
164
- ...r,
165
- scheduledStop: {
166
- ...r.scheduledStop,
167
- stops: r.scheduledStop.stops.map((r) => r.id === e ? {
168
- ...r,
169
- [t]: n
170
- } : r)
171
- }
172
- }));
173
- }, J = (e, t) => {
174
- F((n) => ({
175
- ...n,
176
- scheduledStop: {
177
- ...n.scheduledStop,
178
- stops: n.scheduledStop.stops.map((n) => {
179
- if (n.id === e) {
180
- let e = n.daysOfWeek.includes(t) ? n.daysOfWeek.filter((e) => e !== t) : [...n.daysOfWeek, t];
181
- return {
182
- ...n,
183
- daysOfWeek: e
184
- };
185
- }
186
- return n;
187
- })
188
- }
189
- }));
190
- }, Y = () => {
191
- let e = [];
192
- if (P.delivery.enabled && (P.delivery.deliveryRadius <= 0 && e.push("Delivery radius must be greater than 0"), P.delivery.deliveryFee < 0 && e.push("Delivery fee cannot be negative"), P.delivery.minimumOrderValue < 0 && e.push("Minimum order value cannot be negative")), P.pickup.enabled && P.pickup.preparationTime <= 0 && e.push("Preparation time must be greater than 0"), P.scheduledStop.enabled) {
193
- P.scheduledStop.stops.length === 0 && e.push("At least one scheduled stop is required when scheduled stop service is enabled");
194
- for (let t of P.scheduledStop.stops) t.name.trim() || e.push("All scheduled stops must have a name"), t.address.trim() || e.push("All scheduled stops must have an address"), t.daysOfWeek.length === 0 && e.push("All scheduled stops must have at least one day selected"), t.arrivalTime >= t.departureTime && e.push("Departure time must be after arrival time for all stops");
195
- }
196
- return P.directService.enabled && (P.directService.config.serviceFee < 0 && e.push("Service fee cannot be negative"), P.directService.config.minimumAdvancePayment < 0 && e.push("Minimum advance payment cannot be negative"), P.directService.config.serviceRadius <= 0 && e.push("Service radius must be greater than 0"), P.directService.config.estimatedArrivalTime <= 0 && e.push("Estimated arrival time must be greater than 0")), Object.values(M).some((e) => e.isOpen) || e.push("At least one day must be open"), e;
197
- }, X = () => {
198
- V([]);
199
- let e = Y();
200
- if (e.length > 0) {
201
- V(e);
202
- return;
203
- }
204
- L(!0), setTimeout(() => {
205
- L(!1), z(!0), setTimeout(() => z(!1), 3e3);
206
- }, 1e3);
207
- }, Z = S.find((e) => e.value === A);
208
- return /* @__PURE__ */ y(n, {
209
- title: "Service Provider Configuration",
210
- description: "Manage your service status, operating hours, and service types",
211
- actions: /* @__PURE__ */ v("button", {
212
- type: "button",
213
- onClick: X,
214
- disabled: I,
215
- className: t("inline-flex items-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-colors", I ? "bg-bg-sunken text-text-secondary cursor-not-allowed" : "bg-accent text-text-primary hover:bg-accent/80"),
216
- children: I ? /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v("div", { className: "h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" }), "Saving..."] }) : /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(f, { className: "h-4 w-4" }), "Save Configuration"] })
217
- }),
218
- children: [/* @__PURE__ */ v(x, {
219
- className: "mb-6",
220
- icon: /* @__PURE__ */ v(p, { className: "h-4 w-4" }),
221
- children: "Control how customers can reach and order from your cart. Toggle your service on or off, set operating hours, choose which service types you offer (pickup, delivery, appointments, scheduled stops), and save — this is what shapes the buying options shoppers see."
222
- }), /* @__PURE__ */ y("div", {
223
- className: "space-y-6 max-w-4xl",
224
- children: [
225
- R && /* @__PURE__ */ y("div", {
226
- className: "flex items-center gap-2 rounded-lg border border-status-success-border/30 bg-status-success-bg-subtle/10 p-4",
227
- children: [/* @__PURE__ */ v(s, { className: "h-5 w-5 text-status-success-text shrink-0" }), /* @__PURE__ */ v("span", {
228
- className: "text-sm font-medium text-status-success-text",
229
- children: "Configuration saved successfully!"
230
- })]
231
- }),
232
- B.length > 0 && /* @__PURE__ */ v("div", {
233
- className: "rounded-lg border border-status-error-border/30 bg-status-error-bg-subtle/10 p-4 space-y-1",
234
- children: B.map((e, t) => /* @__PURE__ */ y("div", {
235
- className: "flex items-start gap-2",
236
- children: [/* @__PURE__ */ v(a, { className: "h-4 w-4 text-status-error-text shrink-0 mt-0.5" }), /* @__PURE__ */ v("span", {
237
- className: "text-sm text-status-error-text",
238
- children: e
239
- })]
240
- }, t))
241
- }),
242
- /* @__PURE__ */ v(b, {
243
- className: "p-6",
244
- children: /* @__PURE__ */ y("div", {
245
- className: "flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",
246
- children: [/* @__PURE__ */ y("div", {
247
- className: "flex-1",
248
- children: [/* @__PURE__ */ y("h2", {
249
- className: "text-lg font-semibold text-text-primary flex items-center gap-2",
250
- children: [/* @__PURE__ */ v(p, { className: "h-5 w-5 text-text-secondary" }), "Service Status"]
251
- }), /* @__PURE__ */ v("p", {
252
- className: "text-sm text-text-secondary mt-1",
253
- children: "Control whether your service is currently accepting orders"
254
- })]
255
- }), /* @__PURE__ */ y("div", {
256
- className: "flex items-center gap-3",
257
- children: [/* @__PURE__ */ v("span", {
258
- className: t("inline-flex items-center rounded-full px-3 py-1 text-xs font-medium", O ? "bg-status-success-bg-subtle/20 text-status-success-text" : "bg-status-error-bg-subtle/20 text-status-error-text"),
259
- children: O ? "Open" : "Closed"
260
- }), /* @__PURE__ */ v("button", {
261
- type: "button",
262
- onClick: () => k(!O),
263
- className: t("rounded-md px-4 py-2 text-sm font-medium transition-colors", O ? "bg-status-error-bg-subtle/10 text-status-error-text hover:bg-status-error-bg-subtle/20" : "bg-status-success-bg-subtle/10 text-status-success-text hover:bg-status-success-bg-subtle/20"),
264
- children: O ? "Close Service" : "Open Service"
265
- })]
266
- })]
267
- })
268
- }),
269
- /* @__PURE__ */ y("section", {
270
- className: "rounded-lg border border-border-seam bg-bg-surface p-6 bg-gloss-card shadow-pop",
271
- children: [/* @__PURE__ */ y("h2", {
272
- className: "text-lg font-semibold text-text-primary flex items-center gap-2 mb-4",
273
- children: [/* @__PURE__ */ v(u, { className: "h-5 w-5 text-text-secondary" }), "Offering Type"]
274
- }), /* @__PURE__ */ y("div", {
275
- className: "space-y-3",
276
- children: [
277
- /* @__PURE__ */ v("label", {
278
- htmlFor: "offering-type",
279
- className: "block text-sm font-medium text-text-primary",
280
- children: "What do you provide?"
281
- }),
282
- /* @__PURE__ */ v("select", {
283
- id: "offering-type",
284
- value: A,
285
- onChange: (e) => j(e.target.value),
286
- className: "w-full sm:w-64 rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
287
- children: S.map((e) => /* @__PURE__ */ v("option", {
288
- value: e.value,
289
- children: e.label
290
- }, e.value))
291
- }),
292
- /* @__PURE__ */ v("p", {
293
- className: "text-sm text-text-secondary",
294
- children: Z.description
295
- })
296
- ]
297
- })]
298
- }),
299
- /* @__PURE__ */ y("section", {
300
- className: "rounded-lg border border-border-seam bg-bg-surface p-6 bg-gloss-card shadow-pop",
301
- children: [/* @__PURE__ */ y("h2", {
302
- className: "text-lg font-semibold text-text-primary flex items-center gap-2 mb-4",
303
- children: [/* @__PURE__ */ v(c, { className: "h-5 w-5 text-text-secondary" }), "Operating Hours"]
304
- }), /* @__PURE__ */ v("div", {
305
- className: "grid grid-cols-1 md:grid-cols-2 gap-3",
306
- children: C.map((e) => {
307
- let n = M[e];
308
- return /* @__PURE__ */ y("div", {
309
- className: t("flex flex-col sm:flex-row sm:items-center gap-3 p-4 rounded-lg", n.isOpen ? "bg-bg-sunken/50" : "bg-bg-sunken/30 opacity-60"),
310
- children: [/* @__PURE__ */ v("span", {
311
- className: "min-w-[50px] text-sm font-medium text-text-primary",
312
- children: w[e]
313
- }), /* @__PURE__ */ y("div", {
314
- className: "flex items-center gap-3 flex-1",
315
- children: [
316
- /* @__PURE__ */ v("button", {
317
- type: "button",
318
- onClick: () => H(e, "isOpen", !n.isOpen),
319
- className: t("h-5 w-5 rounded border transition-colors shrink-0", n.isOpen ? "bg-accent-blue-subtle border-accent-blue-subtle" : "border-border-subtle bg-bg-surface"),
320
- children: n.isOpen && /* @__PURE__ */ v(s, { className: "h-5 w-5 text-white" })
321
- }),
322
- /* @__PURE__ */ v("span", {
323
- className: "text-xs text-text-secondary min-w-[35px]",
324
- children: "Open"
325
- }),
326
- n.isOpen && /* @__PURE__ */ y("div", {
327
- className: "flex items-center gap-2",
328
- children: [
329
- /* @__PURE__ */ v("input", {
330
- type: "time",
331
- value: n.open,
332
- onChange: (t) => H(e, "open", t.target.value),
333
- className: "text-sm rounded border border-border-subtle bg-bg-surface px-2 py-1.5 text-text-primary w-[110px]"
334
- }),
335
- /* @__PURE__ */ v("span", {
336
- className: "text-xs text-text-secondary",
337
- children: "to"
338
- }),
339
- /* @__PURE__ */ v("input", {
340
- type: "time",
341
- value: n.close,
342
- onChange: (t) => H(e, "close", t.target.value),
343
- className: "text-sm rounded border border-border-subtle bg-bg-surface px-2 py-1.5 text-text-primary w-[110px]"
344
- })
345
- ]
346
- })
347
- ]
348
- })]
349
- }, e);
350
- })
351
- })]
352
- }),
353
- /* @__PURE__ */ y("section", {
354
- className: "rounded-lg border border-border-seam bg-bg-surface p-6 bg-gloss-card shadow-pop",
355
- children: [/* @__PURE__ */ y("h2", {
356
- className: "text-lg font-semibold text-text-primary flex items-center gap-2 mb-6",
357
- children: [/* @__PURE__ */ v(g, { className: "h-5 w-5 text-text-secondary" }), "Service Types"]
358
- }), /* @__PURE__ */ y("div", {
359
- className: "space-y-6",
360
- children: [
361
- /* @__PURE__ */ y("div", {
362
- className: "border border-border-subtle rounded-lg p-4",
363
- children: [/* @__PURE__ */ y("div", {
364
- className: "flex items-center justify-between mb-4",
365
- children: [/* @__PURE__ */ y("div", {
366
- className: "flex items-center gap-2",
367
- children: [/* @__PURE__ */ v(m, { className: "h-5 w-5 text-accent-blue" }), /* @__PURE__ */ v("span", {
368
- className: "font-medium text-text-primary",
369
- children: "Pickup Service"
370
- })]
371
- }), /* @__PURE__ */ v("button", {
372
- type: "button",
373
- onClick: () => U("pickup", "enabled", !P.pickup.enabled),
374
- className: t("h-6 w-11 rounded-full transition-colors relative", P.pickup.enabled ? "bg-accent-blue-subtle" : "bg-muted-foreground/30"),
375
- children: /* @__PURE__ */ v("div", { className: t("absolute top-0.5 h-5 w-5 rounded-full bg-white transition-transform", P.pickup.enabled ? "translate-x-5" : "translate-x-0.5") })
376
- })]
377
- }), P.pickup.enabled && /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
378
- className: "block text-sm font-medium text-text-primary mb-1",
379
- children: "Preparation Time (minutes)"
380
- }), /* @__PURE__ */ v("input", {
381
- type: "number",
382
- value: P.pickup.preparationTime,
383
- onChange: (e) => U("pickup", "preparationTime", parseInt(e.target.value) || 0),
384
- className: "w-full sm:w-32 rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary"
385
- })] })]
386
- }),
387
- /* @__PURE__ */ y("div", {
388
- className: "border border-border-subtle rounded-lg p-4",
389
- children: [/* @__PURE__ */ y("div", {
390
- className: "flex items-center justify-between mb-4",
391
- children: [/* @__PURE__ */ y("div", {
392
- className: "flex items-center gap-2",
393
- children: [/* @__PURE__ */ v(g, { className: "h-5 w-5 text-status-success-text" }), /* @__PURE__ */ v("span", {
394
- className: "font-medium text-text-primary",
395
- children: "Delivery Service"
396
- })]
397
- }), /* @__PURE__ */ v("button", {
398
- type: "button",
399
- onClick: () => U("delivery", "enabled", !P.delivery.enabled),
400
- className: t("h-6 w-11 rounded-full transition-colors relative", P.delivery.enabled ? "bg-accent-blue-subtle" : "bg-muted-foreground/30"),
401
- children: /* @__PURE__ */ v("div", { className: t("absolute top-0.5 h-5 w-5 rounded-full bg-white transition-transform", P.delivery.enabled ? "translate-x-5" : "translate-x-0.5") })
402
- })]
403
- }), P.delivery.enabled && /* @__PURE__ */ y("div", {
404
- className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",
405
- children: [
406
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
407
- className: "block text-sm font-medium text-text-primary mb-1",
408
- children: "Delivery Radius (km)"
409
- }), /* @__PURE__ */ v("input", {
410
- type: "number",
411
- value: P.delivery.deliveryRadius,
412
- onChange: (e) => U("delivery", "deliveryRadius", parseInt(e.target.value) || 0),
413
- className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary"
414
- })] }),
415
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
416
- className: "block text-sm font-medium text-text-primary mb-1",
417
- children: "Delivery Fee (₹)"
418
- }), /* @__PURE__ */ v("input", {
419
- type: "number",
420
- value: P.delivery.deliveryFee,
421
- onChange: (e) => U("delivery", "deliveryFee", parseInt(e.target.value) || 0),
422
- className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary"
423
- })] }),
424
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
425
- className: "block text-sm font-medium text-text-primary mb-1",
426
- children: "Minimum Order (₹)"
427
- }), /* @__PURE__ */ v("input", {
428
- type: "number",
429
- value: P.delivery.minimumOrderValue,
430
- onChange: (e) => U("delivery", "minimumOrderValue", parseInt(e.target.value) || 0),
431
- className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary"
432
- })] })
433
- ]
434
- })]
435
- }),
436
- /* @__PURE__ */ y("div", {
437
- className: "border border-border-subtle rounded-lg p-4",
438
- children: [/* @__PURE__ */ y("div", {
439
- className: "flex items-center justify-between mb-4",
440
- children: [/* @__PURE__ */ y("div", {
441
- className: "flex items-center gap-2",
442
- children: [/* @__PURE__ */ v(o, { className: "h-5 w-5 text-accent-orange" }), /* @__PURE__ */ v("span", {
443
- className: "font-medium text-text-primary",
444
- children: "Scheduled Stop Service"
445
- })]
446
- }), /* @__PURE__ */ v("button", {
447
- type: "button",
448
- onClick: () => U("scheduledStop", "enabled", !P.scheduledStop.enabled),
449
- className: t("h-6 w-11 rounded-full transition-colors relative", P.scheduledStop.enabled ? "bg-accent-blue-subtle" : "bg-muted-foreground/30"),
450
- children: /* @__PURE__ */ v("div", { className: t("absolute top-0.5 h-5 w-5 rounded-full bg-white transition-transform", P.scheduledStop.enabled ? "translate-x-5" : "translate-x-0.5") })
451
- })]
452
- }), P.scheduledStop.enabled && /* @__PURE__ */ y("div", {
453
- className: "space-y-4",
454
- children: [
455
- /* @__PURE__ */ y("div", {
456
- className: "flex items-center justify-between",
457
- children: [/* @__PURE__ */ v("span", {
458
- className: "text-sm text-text-secondary",
459
- children: "Configure locations and times where your cart will be available"
460
- }), /* @__PURE__ */ y("button", {
461
- type: "button",
462
- onClick: G,
463
- className: "inline-flex items-center gap-1.5 rounded-md border border-border-subtle px-3 py-1.5 text-sm text-text-primary hover:bg-bg-sunken transition-colors",
464
- children: [/* @__PURE__ */ v(d, { className: "h-4 w-4" }), "Add Stop"]
465
- })]
466
- }),
467
- P.scheduledStop.stops.map((e) => /* @__PURE__ */ y("div", {
468
- className: "border border-border-subtle rounded-lg p-4 bg-bg-sunken/50",
469
- children: [
470
- /* @__PURE__ */ y("div", {
471
- className: "flex items-center justify-between mb-3",
472
- children: [/* @__PURE__ */ v("h4", {
473
- className: "font-medium text-text-primary text-sm",
474
- children: "Stop Configuration"
475
- }), /* @__PURE__ */ y("button", {
476
- type: "button",
477
- onClick: () => K(e.id),
478
- className: "inline-flex items-center gap-1 rounded-md bg-status-error-bg-subtle/10 px-2 py-1 text-xs text-status-error-text hover:bg-status-error-bg-subtle/20 transition-colors",
479
- children: [/* @__PURE__ */ v(h, { className: "h-3.5 w-3.5" }), "Remove"]
480
- })]
481
- }),
482
- /* @__PURE__ */ y("div", {
483
- className: "grid grid-cols-1 sm:grid-cols-2 gap-4 mb-4",
484
- children: [/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
485
- className: "block text-xs font-medium text-text-primary mb-1",
486
- children: "Stop Name"
487
- }), /* @__PURE__ */ v("input", {
488
- type: "text",
489
- value: e.name,
490
- onChange: (t) => q(e.id, "name", t.target.value),
491
- placeholder: "e.g., Tech Park Morning",
492
- className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary"
493
- })] }), /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
494
- className: "block text-xs font-medium text-text-primary mb-1",
495
- children: "Address"
496
- }), /* @__PURE__ */ v("input", {
497
- type: "text",
498
- value: e.address,
499
- onChange: (t) => q(e.id, "address", t.target.value),
500
- placeholder: "Full address",
501
- className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary"
502
- })] })]
503
- }),
504
- /* @__PURE__ */ y("div", {
505
- className: "grid grid-cols-1 sm:grid-cols-2 gap-4 mb-4",
506
- children: [/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
507
- className: "block text-xs font-medium text-text-primary mb-1",
508
- children: "Arrival Time"
509
- }), /* @__PURE__ */ v("input", {
510
- type: "time",
511
- value: e.arrivalTime,
512
- onChange: (t) => q(e.id, "arrivalTime", t.target.value),
513
- className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary"
514
- })] }), /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
515
- className: "block text-xs font-medium text-text-primary mb-1",
516
- children: "Departure Time"
517
- }), /* @__PURE__ */ v("input", {
518
- type: "time",
519
- value: e.departureTime,
520
- onChange: (t) => q(e.id, "departureTime", t.target.value),
521
- className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary"
522
- })] })]
523
- }),
524
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
525
- className: "block text-xs font-medium text-text-primary mb-2",
526
- children: "Days of Week"
527
- }), /* @__PURE__ */ v("div", {
528
- className: "flex flex-wrap gap-1.5",
529
- children: C.map((n) => /* @__PURE__ */ v("button", {
530
- type: "button",
531
- onClick: () => J(e.id, n),
532
- className: t("px-3 py-1 rounded-full text-xs font-medium transition-colors", e.daysOfWeek.includes(n) ? "bg-accent-blue-subtle text-white" : "bg-bg-sunken text-text-secondary hover:bg-muted-foreground/20"),
533
- children: w[n]
534
- }, n))
535
- })] })
536
- ]
537
- }, e.id)),
538
- P.scheduledStop.stops.length === 0 && /* @__PURE__ */ v(r, {
539
- className: "py-2",
540
- illustration: "empty-generic",
541
- title: "No scheduled stops configured",
542
- description: "Click \"Add Stop\" to create one."
543
- })
544
- ]
545
- })]
546
- }),
547
- /* @__PURE__ */ y("div", {
548
- className: "border border-border-subtle rounded-lg p-4",
549
- children: [/* @__PURE__ */ y("div", {
550
- className: "flex items-center justify-between mb-4",
551
- children: [/* @__PURE__ */ y("div", {
552
- className: "flex items-center gap-2",
553
- children: [/* @__PURE__ */ v(l, { className: "h-5 w-5 text-accent-purple" }), /* @__PURE__ */ v("span", {
554
- className: "font-medium text-text-primary",
555
- children: "Direct Service"
556
- })]
557
- }), /* @__PURE__ */ v("button", {
558
- type: "button",
559
- onClick: () => U("directService", "enabled", !P.directService.enabled),
560
- className: t("h-6 w-11 rounded-full transition-colors relative", P.directService.enabled ? "bg-accent-blue-subtle" : "bg-muted-foreground/30"),
561
- children: /* @__PURE__ */ v("div", { className: t("absolute top-0.5 h-5 w-5 rounded-full bg-white transition-transform", P.directService.enabled ? "translate-x-5" : "translate-x-0.5") })
562
- })]
563
- }), P.directService.enabled && /* @__PURE__ */ y("div", {
564
- className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",
565
- children: [
566
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
567
- className: "block text-sm font-medium text-text-primary mb-1",
568
- children: "Service Fee (₹)"
569
- }), /* @__PURE__ */ v("input", {
570
- type: "number",
571
- value: P.directService.config.serviceFee,
572
- onChange: (e) => W("serviceFee", parseInt(e.target.value) || 0),
573
- className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary"
574
- })] }),
575
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
576
- className: "block text-sm font-medium text-text-primary mb-1",
577
- children: "Minimum Advance Payment (₹)"
578
- }), /* @__PURE__ */ v("input", {
579
- type: "number",
580
- value: P.directService.config.minimumAdvancePayment,
581
- onChange: (e) => W("minimumAdvancePayment", parseInt(e.target.value) || 0),
582
- className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary"
583
- })] }),
584
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
585
- className: "block text-sm font-medium text-text-primary mb-1",
586
- children: "Service Radius (km)"
587
- }), /* @__PURE__ */ v("input", {
588
- type: "number",
589
- value: P.directService.config.serviceRadius,
590
- onChange: (e) => W("serviceRadius", parseInt(e.target.value) || 0),
591
- className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary"
592
- })] }),
593
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
594
- className: "block text-sm font-medium text-text-primary mb-1",
595
- children: "Estimated Arrival Time (min)"
596
- }), /* @__PURE__ */ v("input", {
597
- type: "number",
598
- value: P.directService.config.estimatedArrivalTime,
599
- onChange: (e) => W("estimatedArrivalTime", parseInt(e.target.value) || 0),
600
- className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary"
601
- })] }),
602
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
603
- className: "block text-sm font-medium text-text-primary mb-1",
604
- children: "Minimum Order Value (₹)"
605
- }), /* @__PURE__ */ v("input", {
606
- type: "number",
607
- value: P.directService.config.minimumOrderValue,
608
- onChange: (e) => W("minimumOrderValue", parseInt(e.target.value) || 0),
609
- className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary"
610
- })] })
611
- ]
612
- })]
613
- })
614
- ]
615
- })]
616
- }),
617
- /* @__PURE__ */ y("div", {
618
- className: "flex items-center justify-between pt-2",
619
- children: [/* @__PURE__ */ v("button", {
620
- type: "button",
621
- onClick: () => D("/cart-owner/dashboard"),
622
- className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken transition-colors",
623
- children: "Cancel"
624
- }), /* @__PURE__ */ v("button", {
625
- type: "button",
626
- onClick: X,
627
- disabled: I,
628
- className: t("inline-flex items-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-colors", I ? "bg-bg-sunken text-text-secondary cursor-not-allowed" : "bg-accent text-text-primary hover:bg-accent/80"),
629
- children: I ? /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v("div", { className: "h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" }), "Saving..."] }) : /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(f, { className: "h-4 w-4" }), "Save Configuration"] })
630
- })]
631
- })
632
- ]
633
- })]
634
- });
635
- };
636
- //#endregion
637
- export { D as CartServiceConfigPage };
638
-
639
- //# sourceMappingURL=CartServiceConfigPage.js.map