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