@burdenoff/microfe-atheletebridge 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 (162) hide show
  1. package/dist/atheletebridge/AthleteBridgeRoot.js +49 -129
  2. package/dist/atheletebridge/AthleteBridgeRoot.js.map +1 -1
  3. package/dist/atheletebridge/AthleteBridgeRoutes.js +65 -184
  4. package/dist/atheletebridge/AthleteBridgeRoutes.js.map +1 -1
  5. package/dist/atheletebridge/components/CursorPager.js +34 -0
  6. package/dist/atheletebridge/components/CursorPager.js.map +1 -0
  7. package/dist/atheletebridge/components/FilterSelect.js +22 -0
  8. package/dist/atheletebridge/components/FilterSelect.js.map +1 -0
  9. package/dist/atheletebridge/components/FixtureCard.js +76 -0
  10. package/dist/atheletebridge/components/FixtureCard.js.map +1 -0
  11. package/dist/atheletebridge/components/LoadingState.js +36 -0
  12. package/dist/atheletebridge/components/LoadingState.js.map +1 -0
  13. package/dist/atheletebridge/components/ProgramCard.js +69 -0
  14. package/dist/atheletebridge/components/ProgramCard.js.map +1 -0
  15. package/dist/atheletebridge/components/SessionCard.js +76 -0
  16. package/dist/atheletebridge/components/SessionCard.js.map +1 -0
  17. package/dist/atheletebridge/components/StatusBadge.js +44 -35
  18. package/dist/atheletebridge/components/StatusBadge.js.map +1 -1
  19. package/dist/atheletebridge/components/TeamCard.js +81 -0
  20. package/dist/atheletebridge/components/TeamCard.js.map +1 -0
  21. package/dist/atheletebridge/components/domain.js +47 -0
  22. package/dist/atheletebridge/components/domain.js.map +1 -0
  23. package/dist/atheletebridge/components/form.js +29 -0
  24. package/dist/atheletebridge/components/form.js.map +1 -0
  25. package/dist/atheletebridge/context/AthleteBridgeContext.js +6 -6
  26. package/dist/atheletebridge/context/AthleteBridgeContext.js.map +1 -1
  27. package/dist/atheletebridge/hooks/useAthleteBridgeApi.js +342 -165
  28. package/dist/atheletebridge/hooks/useAthleteBridgeApi.js.map +1 -1
  29. package/dist/atheletebridge/index.js +1 -1
  30. package/dist/atheletebridge/pages/DashboardPage.js +169 -0
  31. package/dist/atheletebridge/pages/DashboardPage.js.map +1 -0
  32. package/dist/atheletebridge/pages/StandingsPage.js +166 -0
  33. package/dist/atheletebridge/pages/StandingsPage.js.map +1 -0
  34. package/dist/atheletebridge/pages/fixtures/FixtureDetailPage.js +201 -0
  35. package/dist/atheletebridge/pages/fixtures/FixtureDetailPage.js.map +1 -0
  36. package/dist/atheletebridge/pages/fixtures/FixtureFormPage.js +205 -0
  37. package/dist/atheletebridge/pages/fixtures/FixtureFormPage.js.map +1 -0
  38. package/dist/atheletebridge/pages/fixtures/FixturesListPage.js +92 -0
  39. package/dist/atheletebridge/pages/fixtures/FixturesListPage.js.map +1 -0
  40. package/dist/atheletebridge/pages/programs/ProgramDetailPage.js +374 -0
  41. package/dist/atheletebridge/pages/programs/ProgramDetailPage.js.map +1 -0
  42. package/dist/atheletebridge/pages/programs/ProgramFormPage.js +207 -0
  43. package/dist/atheletebridge/pages/programs/ProgramFormPage.js.map +1 -0
  44. package/dist/atheletebridge/pages/programs/ProgramsListPage.js +113 -0
  45. package/dist/atheletebridge/pages/programs/ProgramsListPage.js.map +1 -0
  46. package/dist/atheletebridge/pages/sessions/SessionDetailPage.js +224 -0
  47. package/dist/atheletebridge/pages/sessions/SessionDetailPage.js.map +1 -0
  48. package/dist/atheletebridge/pages/sessions/SessionFormPage.js +206 -0
  49. package/dist/atheletebridge/pages/sessions/SessionFormPage.js.map +1 -0
  50. package/dist/atheletebridge/pages/sessions/SessionsListPage.js +92 -0
  51. package/dist/atheletebridge/pages/sessions/SessionsListPage.js.map +1 -0
  52. package/dist/atheletebridge/pages/teams/TeamDetailPage.js +350 -0
  53. package/dist/atheletebridge/pages/teams/TeamDetailPage.js.map +1 -0
  54. package/dist/atheletebridge/pages/teams/TeamFormPage.js +222 -0
  55. package/dist/atheletebridge/pages/teams/TeamFormPage.js.map +1 -0
  56. package/dist/atheletebridge/pages/teams/TeamsListPage.js +101 -0
  57. package/dist/atheletebridge/pages/teams/TeamsListPage.js.map +1 -0
  58. package/dist/atheletebridge/store/atheletebridgeStore.js +2 -13
  59. package/dist/atheletebridge/store/atheletebridgeStore.js.map +1 -1
  60. package/dist/atheletebridge/utils/datetime.js +10 -0
  61. package/dist/atheletebridge/utils/datetime.js.map +1 -0
  62. package/dist/atheletebridge/utils/formatters.js +1 -4
  63. package/dist/atheletebridge/utils/formatters.js.map +1 -1
  64. package/package.json +1 -1
  65. package/dist/atheletebridge/components/InvestmentCard.js +0 -96
  66. package/dist/atheletebridge/components/InvestmentCard.js.map +0 -1
  67. package/dist/atheletebridge/components/RatingDisplay.js +0 -35
  68. package/dist/atheletebridge/components/RatingDisplay.js.map +0 -1
  69. package/dist/atheletebridge/mocks/data.js +0 -1517
  70. package/dist/atheletebridge/mocks/data.js.map +0 -1
  71. package/dist/atheletebridge/mocks/users.js +0 -34
  72. package/dist/atheletebridge/mocks/users.js.map +0 -1
  73. package/dist/atheletebridge/pages/HomePage.js +0 -936
  74. package/dist/atheletebridge/pages/HomePage.js.map +0 -1
  75. package/dist/atheletebridge/pages/admin/AdminAnalyticsPage.js +0 -653
  76. package/dist/atheletebridge/pages/admin/AdminAnalyticsPage.js.map +0 -1
  77. package/dist/atheletebridge/pages/admin/AdminDashboard.js +0 -671
  78. package/dist/atheletebridge/pages/admin/AdminDashboard.js.map +0 -1
  79. package/dist/atheletebridge/pages/admin/AdminFinancialPage.js +0 -429
  80. package/dist/atheletebridge/pages/admin/AdminFinancialPage.js.map +0 -1
  81. package/dist/atheletebridge/pages/admin/AdminOrdersPage.js +0 -667
  82. package/dist/atheletebridge/pages/admin/AdminOrdersPage.js.map +0 -1
  83. package/dist/atheletebridge/pages/admin/AdminProfilePage.js +0 -261
  84. package/dist/atheletebridge/pages/admin/AdminProfilePage.js.map +0 -1
  85. package/dist/atheletebridge/pages/admin/AdminSettingsPage.js +0 -653
  86. package/dist/atheletebridge/pages/admin/AdminSettingsPage.js.map +0 -1
  87. package/dist/atheletebridge/pages/admin/CartManagementPage.js +0 -876
  88. package/dist/atheletebridge/pages/admin/CartManagementPage.js.map +0 -1
  89. package/dist/atheletebridge/pages/admin/UserManagementPage.js +0 -900
  90. package/dist/atheletebridge/pages/admin/UserManagementPage.js.map +0 -1
  91. package/dist/atheletebridge/pages/cart-owner/AnalyticsDashboard.js +0 -839
  92. package/dist/atheletebridge/pages/cart-owner/AnalyticsDashboard.js.map +0 -1
  93. package/dist/atheletebridge/pages/cart-owner/BusinessSettingsPage.js +0 -704
  94. package/dist/atheletebridge/pages/cart-owner/BusinessSettingsPage.js.map +0 -1
  95. package/dist/atheletebridge/pages/cart-owner/CartOwnerDashboard.js +0 -792
  96. package/dist/atheletebridge/pages/cart-owner/CartOwnerDashboard.js.map +0 -1
  97. package/dist/atheletebridge/pages/cart-owner/CartOwnerProfilePage.js +0 -891
  98. package/dist/atheletebridge/pages/cart-owner/CartOwnerProfilePage.js.map +0 -1
  99. package/dist/atheletebridge/pages/cart-owner/CartServiceConfigPage.js +0 -633
  100. package/dist/atheletebridge/pages/cart-owner/CartServiceConfigPage.js.map +0 -1
  101. package/dist/atheletebridge/pages/cart-owner/InventoryManagementPage.js +0 -913
  102. package/dist/atheletebridge/pages/cart-owner/InventoryManagementPage.js.map +0 -1
  103. package/dist/atheletebridge/pages/cart-owner/OrderManagementPage.js +0 -881
  104. package/dist/atheletebridge/pages/cart-owner/OrderManagementPage.js.map +0 -1
  105. package/dist/atheletebridge/pages/cart-owner/StaffManagementPage.js +0 -841
  106. package/dist/atheletebridge/pages/cart-owner/StaffManagementPage.js.map +0 -1
  107. package/dist/atheletebridge/pages/common/HelpSupportPage.js +0 -1319
  108. package/dist/atheletebridge/pages/common/HelpSupportPage.js.map +0 -1
  109. package/dist/atheletebridge/pages/common/NotificationCenterPage.js +0 -674
  110. package/dist/atheletebridge/pages/common/NotificationCenterPage.js.map +0 -1
  111. package/dist/atheletebridge/pages/common/SettingsPage.js +0 -972
  112. package/dist/atheletebridge/pages/common/SettingsPage.js.map +0 -1
  113. package/dist/atheletebridge/pages/customer/BookingDetailsPage.js +0 -602
  114. package/dist/atheletebridge/pages/customer/BookingDetailsPage.js.map +0 -1
  115. package/dist/atheletebridge/pages/customer/CartDetailPage.js +0 -656
  116. package/dist/atheletebridge/pages/customer/CartDetailPage.js.map +0 -1
  117. package/dist/atheletebridge/pages/customer/CartDiscoveryPage.js +0 -558
  118. package/dist/atheletebridge/pages/customer/CartDiscoveryPage.js.map +0 -1
  119. package/dist/atheletebridge/pages/customer/CheckoutPage.js +0 -536
  120. package/dist/atheletebridge/pages/customer/CheckoutPage.js.map +0 -1
  121. package/dist/atheletebridge/pages/customer/CustomerDashboard.js +0 -539
  122. package/dist/atheletebridge/pages/customer/CustomerDashboard.js.map +0 -1
  123. package/dist/atheletebridge/pages/customer/CustomerProfilePage.js +0 -657
  124. package/dist/atheletebridge/pages/customer/CustomerProfilePage.js.map +0 -1
  125. package/dist/atheletebridge/pages/customer/DirectServiceBookingPage.js +0 -635
  126. package/dist/atheletebridge/pages/customer/DirectServiceBookingPage.js.map +0 -1
  127. package/dist/atheletebridge/pages/customer/FavoritesPage.js +0 -486
  128. package/dist/atheletebridge/pages/customer/FavoritesPage.js.map +0 -1
  129. package/dist/atheletebridge/pages/customer/OrderHistoryPage.js +0 -447
  130. package/dist/atheletebridge/pages/customer/OrderHistoryPage.js.map +0 -1
  131. package/dist/atheletebridge/pages/customer/OrderTrackingPage.js +0 -393
  132. package/dist/atheletebridge/pages/customer/OrderTrackingPage.js.map +0 -1
  133. package/dist/atheletebridge/pages/customer/PaymentMethodsPage.js +0 -494
  134. package/dist/atheletebridge/pages/customer/PaymentMethodsPage.js.map +0 -1
  135. package/dist/atheletebridge/pages/customer/ReviewsPage.js +0 -615
  136. package/dist/atheletebridge/pages/customer/ReviewsPage.js.map +0 -1
  137. package/dist/atheletebridge/pages/customer/SavedAddressesPage.js +0 -451
  138. package/dist/atheletebridge/pages/customer/SavedAddressesPage.js.map +0 -1
  139. package/dist/atheletebridge/pages/investor/InvestmentDetailsPage.js +0 -881
  140. package/dist/atheletebridge/pages/investor/InvestmentDetailsPage.js.map +0 -1
  141. package/dist/atheletebridge/pages/investor/InvestmentOpportunitiesPage.js +0 -945
  142. package/dist/atheletebridge/pages/investor/InvestmentOpportunitiesPage.js.map +0 -1
  143. package/dist/atheletebridge/pages/investor/InvestorAnalyticsPage.js +0 -686
  144. package/dist/atheletebridge/pages/investor/InvestorAnalyticsPage.js.map +0 -1
  145. package/dist/atheletebridge/pages/investor/InvestorDashboard.js +0 -453
  146. package/dist/atheletebridge/pages/investor/InvestorDashboard.js.map +0 -1
  147. package/dist/atheletebridge/pages/investor/InvestorInvestmentsPage.js +0 -405
  148. package/dist/atheletebridge/pages/investor/InvestorInvestmentsPage.js.map +0 -1
  149. package/dist/atheletebridge/pages/investor/InvestorPortfolioPage.js +0 -577
  150. package/dist/atheletebridge/pages/investor/InvestorPortfolioPage.js.map +0 -1
  151. package/dist/atheletebridge/pages/investor/InvestorProfilePage.js +0 -1069
  152. package/dist/atheletebridge/pages/investor/InvestorProfilePage.js.map +0 -1
  153. package/dist/atheletebridge/pages/worker/TaskDetailsPage.js +0 -530
  154. package/dist/atheletebridge/pages/worker/TaskDetailsPage.js.map +0 -1
  155. package/dist/atheletebridge/pages/worker/WorkerDashboard.js +0 -669
  156. package/dist/atheletebridge/pages/worker/WorkerDashboard.js.map +0 -1
  157. package/dist/atheletebridge/pages/worker/WorkerOrdersPage.js +0 -681
  158. package/dist/atheletebridge/pages/worker/WorkerOrdersPage.js.map +0 -1
  159. package/dist/atheletebridge/pages/worker/WorkerProfilePage.js +0 -691
  160. package/dist/atheletebridge/pages/worker/WorkerProfilePage.js.map +0 -1
  161. package/dist/atheletebridge/pages/worker/WorkerSchedulePage.js +0 -588
  162. package/dist/atheletebridge/pages/worker/WorkerSchedulePage.js.map +0 -1
@@ -1,913 +0,0 @@
1
- import { useAthleteBridge as e } from "../../context/AthleteBridgeContext.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 { formatCurrency as i } from "../../utils/formatters.js";
6
- import { mockProducts as ee } from "../../mocks/data.js";
7
- import { useMemo as a, useState as o } from "react";
8
- import { AlertCircle as te, CheckCircle2 as s, Edit2 as ne, Package as c, Plus as l, Search as u, Trash2 as d, Upload as re, X as ie } from "lucide-react";
9
- import { Fragment as ae, jsx as f, jsxs as p } from "react/jsx-runtime";
10
- import { EmphasisPanel as oe, PagePurpose as m } from "@burdenoff/fe-libs/ui";
11
- //#region src/atheletebridge/pages/cart-owner/InventoryManagementPage.tsx
12
- var h = [
13
- "Service",
14
- "Repair",
15
- "Beauty",
16
- "Care",
17
- "Cleaning",
18
- "Health",
19
- "Wellness",
20
- "Education"
21
- ], g = (e) => h.some((t) => e.includes(t)), _ = (e) => e === "Food & Beverage", v = [
22
- 10,
23
- 25,
24
- 0,
25
- 50,
26
- 8,
27
- 15,
28
- 3,
29
- 100,
30
- 42,
31
- 0,
32
- 20,
33
- 6,
34
- 35,
35
- 18,
36
- 12,
37
- 30,
38
- 5,
39
- 22,
40
- 0,
41
- 45
42
- ], se = () => ee.slice(0, 20).map((e, t) => ({
43
- id: e.id,
44
- name: e.name,
45
- description: e.description ?? `${e.name} - quality offering from ${e.cartName}`,
46
- price: e.price,
47
- originalPrice: t % 4 == 0 ? Math.round(e.price * 1.2) : void 0,
48
- category: e.category,
49
- stock: v[t] ?? 10,
50
- isAvailable: t !== 2 && t !== 9 && t !== 18,
51
- cartName: e.cartName,
52
- preparationTime: 15,
53
- calories: _(e.category) ? Math.floor(Math.random() * 400) + 100 : 0,
54
- isVegetarian: t % 3 == 0,
55
- isVegan: t % 5 == 0,
56
- isGlutenFree: t % 7 == 0,
57
- spiceLevel: [
58
- "mild",
59
- "medium",
60
- "spicy",
61
- "none"
62
- ][t % 4],
63
- tags: [
64
- "popular",
65
- "trending",
66
- "new"
67
- ].slice(0, t % 3 + 1),
68
- allergens: _(e.category) ? ["nuts", "dairy"].slice(0, t % 2 + 1) : [],
69
- duration: g(e.category) ? 30 + t * 5 : 0,
70
- serviceType: g(e.category) ? [
71
- "instant",
72
- "appointment",
73
- "recurring",
74
- "consultation"
75
- ][t % 4] : "",
76
- requirements: g(e.category) ? ["advance booking"] : []
77
- })), y = {
78
- name: "",
79
- description: "",
80
- category: "",
81
- price: 0,
82
- originalPrice: void 0,
83
- isAvailable: !0,
84
- stock: 0,
85
- preparationTime: 15,
86
- calories: 0,
87
- isVegetarian: !1,
88
- isVegan: !1,
89
- isGlutenFree: !1,
90
- spiceLevel: "mild",
91
- tags: [],
92
- allergens: [],
93
- duration: 30,
94
- serviceType: "instant",
95
- requirements: []
96
- }, b = () => {
97
- let { navigateTo: ee } = e(), [h, v] = o(se), [b, x] = o(""), [S, C] = o(""), [w, T] = o(""), [E, D] = o("name"), [ce, le] = o(!1), [O, k] = o(!1), [A, j] = o(null), [M, N] = o(y), [P, F] = o(""), [I, L] = o(""), [R, z] = o(""), [B, V] = o(null), H = a(() => [...new Set(h.map((e) => e.category))].sort(), [h]), U = a(() => {
98
- let e = [...h];
99
- if (b) {
100
- let t = b.toLowerCase();
101
- e = e.filter((e) => e.name.toLowerCase().includes(t) || e.description.toLowerCase().includes(t) || e.category.toLowerCase().includes(t) || e.tags.some((e) => e.toLowerCase().includes(t)));
102
- }
103
- switch (S && (e = e.filter((e) => e.category === S)), w === "available" ? e = e.filter((e) => e.isAvailable) : w === "unavailable" && (e = e.filter((e) => !e.isAvailable)), E) {
104
- case "name":
105
- e.sort((e, t) => e.name.localeCompare(t.name));
106
- break;
107
- case "price_low":
108
- e.sort((e, t) => e.price - t.price);
109
- break;
110
- case "price_high":
111
- e.sort((e, t) => t.price - e.price);
112
- break;
113
- case "stock":
114
- e.sort((e, t) => e.stock - t.stock);
115
- break;
116
- }
117
- return e;
118
- }, [
119
- h,
120
- b,
121
- S,
122
- w,
123
- E
124
- ]), ue = h.length, de = h.filter((e) => e.isAvailable).length, fe = h.filter((e) => !g(e.category) && e.stock === 0).length, pe = h.filter((e) => !g(e.category) && e.stock > 0 && e.stock < 10).length, W = (e, t) => {
125
- V({
126
- text: e,
127
- type: t
128
- }), setTimeout(() => V(null), 3e3);
129
- }, G = () => {
130
- j(null), N({
131
- ...y,
132
- category: H[0] || ""
133
- }), F(""), L(""), z(""), k(!0);
134
- }, K = (e) => {
135
- j(e), N({
136
- name: e.name,
137
- description: e.description,
138
- category: e.category,
139
- price: e.price,
140
- originalPrice: e.originalPrice,
141
- isAvailable: e.isAvailable,
142
- stock: e.stock,
143
- preparationTime: e.preparationTime,
144
- calories: e.calories,
145
- isVegetarian: e.isVegetarian,
146
- isVegan: e.isVegan,
147
- isGlutenFree: e.isGlutenFree,
148
- spiceLevel: e.spiceLevel,
149
- tags: e.tags,
150
- allergens: e.allergens,
151
- duration: e.duration,
152
- serviceType: e.serviceType,
153
- requirements: e.requirements
154
- }), F(e.tags.join(", ")), L(e.allergens.join(", ")), z(e.requirements.join(", ")), k(!0);
155
- }, me = () => {
156
- if (!M.name || !M.description || !M.category || M.price <= 0) {
157
- W("Please fill all required fields (name, description, category, price > 0)", "error");
158
- return;
159
- }
160
- let e = P.split(",").map((e) => e.trim()).filter(Boolean), t = I.split(",").map((e) => e.trim()).filter(Boolean), n = R.split(",").map((e) => e.trim()).filter(Boolean), r = g(M.category) ? "Service" : "Product";
161
- if (A) v((r) => r.map((r) => r.id === A.id ? {
162
- ...r,
163
- ...M,
164
- tags: e,
165
- allergens: t,
166
- requirements: n
167
- } : r)), W(`${r} updated successfully`, "success");
168
- else {
169
- let i = {
170
- id: `item-${Date.now()}`,
171
- ...M,
172
- tags: e,
173
- allergens: t,
174
- requirements: n,
175
- cartName: "Dosa Express"
176
- };
177
- v((e) => [i, ...e]), W(`${r} added successfully`, "success");
178
- }
179
- k(!1);
180
- }, q = (e) => {
181
- confirm("Are you sure you want to delete this offering?") && (v((t) => t.filter((t) => t.id !== e)), W("Offering deleted successfully", "success"));
182
- }, J = (e, t) => {
183
- v((n) => n.map((n) => n.id === e ? {
184
- ...n,
185
- isAvailable: t
186
- } : n)), W(`Offering ${t ? "enabled" : "disabled"} successfully`, "success");
187
- }, Y = (e) => {
188
- let t = e === "enable", n = h.filter((e) => e.isAvailable !== t).length;
189
- if (n === 0) {
190
- W(`No offerings to ${e}`, "error");
191
- return;
192
- }
193
- v((e) => e.map((e) => ({
194
- ...e,
195
- isAvailable: t
196
- }))), W(`${n} offerings ${e}d successfully`, "success");
197
- }, X = (e) => g(e.category) ? {
198
- color: "text-green-600 dark:text-green-400",
199
- label: "Available"
200
- } : e.stock === 0 ? {
201
- color: "text-red-600 dark:text-red-400",
202
- label: "Out of Stock"
203
- } : e.stock < 10 ? {
204
- color: "text-yellow-600 dark:text-yellow-400",
205
- label: `Low Stock (${e.stock})`
206
- } : {
207
- color: "text-green-600 dark:text-green-400",
208
- label: `In Stock (${e.stock})`
209
- }, Z = M.category ? g(M.category) : !1, he = M.category ? _(M.category) : !1, Q = !Z && he, $ = M.name && M.description && M.category && M.price > 0 && (!Z || M.duration && M.duration > 0) && (Z || M.stock >= 0);
210
- return /* @__PURE__ */ p(n, {
211
- title: "Offerings Management",
212
- description: "Manage your products and services",
213
- actions: /* @__PURE__ */ p("button", {
214
- type: "button",
215
- onClick: G,
216
- className: "inline-flex items-center gap-2 rounded-md bg-accent px-4 py-2 text-sm font-medium text-text-primary hover:bg-accent/80 transition-colors",
217
- children: [/* @__PURE__ */ f(l, { className: "h-4 w-4" }), "Add Item"]
218
- }),
219
- children: [/* @__PURE__ */ p("div", {
220
- className: "space-y-4",
221
- children: [
222
- B && /* @__PURE__ */ p("div", {
223
- className: t("flex items-center gap-2 rounded-lg border p-3", B.type === "success" ? "border-green-500/30 bg-green-500/10" : "border-red-500/30 bg-red-500/10"),
224
- children: [B.type === "success" ? /* @__PURE__ */ f(s, { className: "h-4 w-4 text-green-600 dark:text-green-400" }) : /* @__PURE__ */ f(te, { className: "h-4 w-4 text-red-600 dark:text-red-400" }), /* @__PURE__ */ f("span", {
225
- className: t("text-sm font-medium", B.type === "success" ? "text-green-600 dark:text-green-400" : "text-red-600 dark:text-red-400"),
226
- children: B.text
227
- })]
228
- }),
229
- /* @__PURE__ */ f(m, { children: "Your catalogue of products and services. Add and edit items, set prices, and keep stock levels accurate so customers only see what's actually available. Watch for low-stock and out-of-stock items so you never disappoint an order." }),
230
- /* @__PURE__ */ f(oe, {
231
- className: "p-5",
232
- children: /* @__PURE__ */ p("div", {
233
- className: "grid grid-cols-2 lg:grid-cols-4 gap-3",
234
- children: [
235
- /* @__PURE__ */ p("div", {
236
- className: "rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm",
237
- children: [/* @__PURE__ */ f("p", {
238
- className: "text-xs text-text-secondary",
239
- children: "Total Items"
240
- }), /* @__PURE__ */ f("p", {
241
- className: "text-2xl font-bold text-text-primary",
242
- children: ue
243
- })]
244
- }),
245
- /* @__PURE__ */ p("div", {
246
- className: "rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm",
247
- children: [/* @__PURE__ */ f("p", {
248
- className: "text-xs text-text-secondary",
249
- children: "Available"
250
- }), /* @__PURE__ */ f("p", {
251
- className: "text-2xl font-bold text-green-600 dark:text-green-400",
252
- children: de
253
- })]
254
- }),
255
- /* @__PURE__ */ p("div", {
256
- className: "rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm",
257
- children: [/* @__PURE__ */ f("p", {
258
- className: "text-xs text-text-secondary",
259
- children: "Out of Stock"
260
- }), /* @__PURE__ */ f("p", {
261
- className: "text-2xl font-bold text-red-600 dark:text-red-400",
262
- children: fe
263
- })]
264
- }),
265
- /* @__PURE__ */ p("div", {
266
- className: "rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm",
267
- children: [/* @__PURE__ */ f("p", {
268
- className: "text-xs text-text-secondary",
269
- children: "Low Stock"
270
- }), /* @__PURE__ */ f("p", {
271
- className: "text-2xl font-bold text-yellow-600 dark:text-yellow-400",
272
- children: pe
273
- })]
274
- })
275
- ]
276
- })
277
- }),
278
- /* @__PURE__ */ p("div", {
279
- className: "rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm space-y-4",
280
- children: [/* @__PURE__ */ p("div", {
281
- className: "flex flex-col lg:flex-row lg:items-center lg:justify-between gap-3",
282
- children: [/* @__PURE__ */ p("div", {
283
- className: "flex flex-wrap gap-2",
284
- children: [
285
- /* @__PURE__ */ p("button", {
286
- type: "button",
287
- onClick: G,
288
- className: "inline-flex items-center gap-1.5 rounded-md bg-accent px-3 py-2 text-sm font-medium text-text-primary hover:bg-accent/80 transition-colors",
289
- children: [/* @__PURE__ */ f(l, { className: "h-4 w-4" }), "Add Item"]
290
- }),
291
- /* @__PURE__ */ f("button", {
292
- type: "button",
293
- onClick: () => Y("enable"),
294
- className: "rounded-md border border-border-subtle px-3 py-2 text-sm text-text-primary hover:bg-bg-sunken transition-colors",
295
- children: "Enable All"
296
- }),
297
- /* @__PURE__ */ f("button", {
298
- type: "button",
299
- onClick: () => Y("disable"),
300
- className: "rounded-md border border-border-subtle px-3 py-2 text-sm text-text-primary hover:bg-bg-sunken transition-colors",
301
- children: "Disable All"
302
- })
303
- ]
304
- }), /* @__PURE__ */ p("button", {
305
- type: "button",
306
- onClick: () => alert("Import/Export feature coming soon!"),
307
- className: "inline-flex items-center gap-1.5 rounded-md border border-border-subtle px-3 py-2 text-sm text-text-primary hover:bg-bg-sunken transition-colors",
308
- children: [/* @__PURE__ */ f(re, { className: "h-4 w-4" }), "Import/Export"]
309
- })]
310
- }), /* @__PURE__ */ p("div", {
311
- className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3",
312
- children: [
313
- /* @__PURE__ */ p("div", {
314
- className: "relative sm:col-span-2 lg:col-span-1",
315
- children: [/* @__PURE__ */ f(u, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-secondary" }), /* @__PURE__ */ f("input", {
316
- type: "text",
317
- placeholder: "Search offerings...",
318
- value: b,
319
- onChange: (e) => x(e.target.value),
320
- className: "w-full rounded-md border border-border-subtle bg-bg-surface pl-10 pr-4 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
321
- })]
322
- }),
323
- /* @__PURE__ */ p("select", {
324
- value: S,
325
- onChange: (e) => C(e.target.value),
326
- className: "rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary",
327
- children: [/* @__PURE__ */ f("option", {
328
- value: "",
329
- children: "All Categories"
330
- }), H.map((e) => /* @__PURE__ */ f("option", {
331
- value: e,
332
- children: e
333
- }, e))]
334
- }),
335
- /* @__PURE__ */ p("select", {
336
- value: w,
337
- onChange: (e) => T(e.target.value),
338
- className: "rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary",
339
- children: [
340
- /* @__PURE__ */ f("option", {
341
- value: "",
342
- children: "All Status"
343
- }),
344
- /* @__PURE__ */ f("option", {
345
- value: "available",
346
- children: "Available"
347
- }),
348
- /* @__PURE__ */ f("option", {
349
- value: "unavailable",
350
- children: "Unavailable"
351
- })
352
- ]
353
- }),
354
- /* @__PURE__ */ p("select", {
355
- value: E,
356
- onChange: (e) => D(e.target.value),
357
- className: "rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary",
358
- children: [
359
- /* @__PURE__ */ f("option", {
360
- value: "name",
361
- children: "Name A-Z"
362
- }),
363
- /* @__PURE__ */ f("option", {
364
- value: "price_low",
365
- children: "Price: Low to High"
366
- }),
367
- /* @__PURE__ */ f("option", {
368
- value: "price_high",
369
- children: "Price: High to Low"
370
- }),
371
- /* @__PURE__ */ f("option", {
372
- value: "stock",
373
- children: "Stock: Low to High"
374
- })
375
- ]
376
- })
377
- ]
378
- })]
379
- }),
380
- U.length === 0 ? /* @__PURE__ */ f("div", {
381
- className: "rounded-lg border border-border-subtle bg-bg-surface shadow-sm",
382
- children: /* @__PURE__ */ f(r, {
383
- illustration: b || S || w ? "empty-search" : "empty-files",
384
- title: "No items found",
385
- description: b || S || w ? "No items match your current filters. Try adjusting your search criteria." : "You haven't added any items yet. Start building your offerings!",
386
- action: /* @__PURE__ */ p("div", {
387
- className: "flex flex-wrap justify-center gap-3",
388
- children: [/* @__PURE__ */ p("button", {
389
- type: "button",
390
- onClick: G,
391
- className: "inline-flex items-center gap-2 rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors",
392
- children: [/* @__PURE__ */ f(l, { className: "h-4 w-4" }), "Add Your First Item"]
393
- }), (b || S || w) && /* @__PURE__ */ f("button", {
394
- type: "button",
395
- onClick: () => {
396
- x(""), C(""), T(""), D("name");
397
- },
398
- className: "rounded-lg border border-border-subtle px-4 py-2 text-sm text-text-primary hover:bg-bg-sunken transition-colors",
399
- children: "Clear Filters"
400
- })]
401
- })
402
- })
403
- }) : /* @__PURE__ */ p(ae, { children: [/* @__PURE__ */ f("div", {
404
- className: "hidden lg:block rounded-lg border border-border-subtle bg-bg-surface shadow-sm overflow-hidden",
405
- children: /* @__PURE__ */ f("div", {
406
- className: "overflow-x-auto",
407
- children: /* @__PURE__ */ p("table", {
408
- className: "w-full text-sm",
409
- children: [/* @__PURE__ */ f("thead", { children: /* @__PURE__ */ p("tr", {
410
- className: "border-b border-border-subtle bg-bg-sunken/50",
411
- children: [
412
- /* @__PURE__ */ f("th", {
413
- className: "px-5 py-3 text-left font-medium text-text-secondary",
414
- children: "Item"
415
- }),
416
- /* @__PURE__ */ f("th", {
417
- className: "px-5 py-3 text-left font-medium text-text-secondary",
418
- children: "Category"
419
- }),
420
- /* @__PURE__ */ f("th", {
421
- className: "px-5 py-3 text-right font-medium text-text-secondary",
422
- children: "Price"
423
- }),
424
- /* @__PURE__ */ f("th", {
425
- className: "px-5 py-3 text-left font-medium text-text-secondary",
426
- children: "Stock/Status"
427
- }),
428
- /* @__PURE__ */ f("th", {
429
- className: "px-5 py-3 text-center font-medium text-text-secondary",
430
- children: "Available"
431
- }),
432
- /* @__PURE__ */ f("th", {
433
- className: "px-5 py-3 text-right font-medium text-text-secondary",
434
- children: "Actions"
435
- })
436
- ]
437
- }) }), /* @__PURE__ */ f("tbody", { children: U.map((e) => {
438
- let n = X(e);
439
- return /* @__PURE__ */ p("tr", {
440
- className: "border-b border-border-subtle last:border-0 hover:bg-bg-sunken/30 transition-colors",
441
- children: [
442
- /* @__PURE__ */ f("td", {
443
- className: "px-5 py-3",
444
- children: /* @__PURE__ */ p("div", {
445
- className: "flex items-center gap-3",
446
- children: [/* @__PURE__ */ f("div", {
447
- className: "flex h-10 w-10 items-center justify-center rounded-md bg-bg-sunken",
448
- children: /* @__PURE__ */ f(c, { className: "h-4 w-4 text-text-secondary" })
449
- }), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("p", {
450
- className: "font-medium text-text-primary",
451
- children: e.name
452
- }), /* @__PURE__ */ p("p", {
453
- className: "text-xs text-text-secondary line-clamp-1",
454
- children: [e.description.slice(0, 50), "..."]
455
- })] })]
456
- })
457
- }),
458
- /* @__PURE__ */ f("td", {
459
- className: "px-5 py-3",
460
- children: /* @__PURE__ */ f("span", {
461
- className: "inline-flex rounded-full bg-bg-sunken px-2.5 py-0.5 text-xs font-medium text-text-secondary",
462
- children: e.category
463
- })
464
- }),
465
- /* @__PURE__ */ p("td", {
466
- className: "px-5 py-3 text-right",
467
- children: [/* @__PURE__ */ f("p", {
468
- className: "font-medium text-text-primary",
469
- children: i(e.price, { minimumFractionDigits: 0 })
470
- }), e.originalPrice && /* @__PURE__ */ f("p", {
471
- className: "text-xs text-text-secondary line-through",
472
- children: i(e.originalPrice, { minimumFractionDigits: 0 })
473
- })]
474
- }),
475
- /* @__PURE__ */ f("td", {
476
- className: "px-5 py-3",
477
- children: /* @__PURE__ */ f("span", {
478
- className: t("text-sm font-medium", n.color),
479
- children: n.label
480
- })
481
- }),
482
- /* @__PURE__ */ f("td", {
483
- className: "px-5 py-3 text-center",
484
- children: /* @__PURE__ */ f("button", {
485
- type: "button",
486
- onClick: () => J(e.id, !e.isAvailable),
487
- className: t("h-6 w-11 rounded-full transition-colors relative inline-block", e.isAvailable ? "bg-blue-500" : "bg-muted-foreground/30"),
488
- children: /* @__PURE__ */ f("div", { className: t("absolute top-0.5 h-5 w-5 rounded-full bg-white transition-transform", e.isAvailable ? "translate-x-5" : "translate-x-0.5") })
489
- })
490
- }),
491
- /* @__PURE__ */ f("td", {
492
- className: "px-5 py-3",
493
- children: /* @__PURE__ */ p("div", {
494
- className: "flex items-center justify-end gap-1",
495
- children: [/* @__PURE__ */ f("button", {
496
- type: "button",
497
- onClick: () => K(e),
498
- className: "rounded p-1.5 text-text-secondary hover:bg-bg-sunken hover:text-text-primary transition-colors",
499
- title: "Edit",
500
- children: /* @__PURE__ */ f(ne, { className: "h-4 w-4" })
501
- }), /* @__PURE__ */ f("button", {
502
- type: "button",
503
- onClick: () => q(e.id),
504
- className: "rounded p-1.5 text-text-secondary hover:bg-red-500/10 hover:text-red-600 transition-colors",
505
- title: "Delete",
506
- children: /* @__PURE__ */ f(d, { className: "h-4 w-4" })
507
- })]
508
- })
509
- })
510
- ]
511
- }, e.id);
512
- }) })]
513
- })
514
- })
515
- }), /* @__PURE__ */ f("div", {
516
- className: "lg:hidden space-y-3",
517
- children: U.map((e) => {
518
- let n = X(e);
519
- return /* @__PURE__ */ f("div", {
520
- className: "rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm",
521
- children: /* @__PURE__ */ p("div", {
522
- className: "flex items-start gap-3",
523
- children: [/* @__PURE__ */ f("div", {
524
- className: "flex h-14 w-14 items-center justify-center rounded-md bg-bg-sunken shrink-0",
525
- children: /* @__PURE__ */ f(c, { className: "h-6 w-6 text-text-secondary" })
526
- }), /* @__PURE__ */ p("div", {
527
- className: "flex-1 min-w-0",
528
- children: [
529
- /* @__PURE__ */ p("div", {
530
- className: "flex items-start justify-between mb-1",
531
- children: [/* @__PURE__ */ p("div", {
532
- className: "flex-1",
533
- children: [/* @__PURE__ */ f("h3", {
534
- className: "text-sm font-medium text-text-primary line-clamp-1",
535
- children: e.name
536
- }), /* @__PURE__ */ f("p", {
537
- className: "text-xs text-text-secondary mt-0.5 line-clamp-2",
538
- children: e.description
539
- })]
540
- }), /* @__PURE__ */ f("button", {
541
- type: "button",
542
- onClick: () => J(e.id, !e.isAvailable),
543
- className: t("h-5 w-9 rounded-full transition-colors relative ml-2 shrink-0", e.isAvailable ? "bg-blue-500" : "bg-muted-foreground/30"),
544
- children: /* @__PURE__ */ f("div", { className: t("absolute top-0.5 h-4 w-4 rounded-full bg-white transition-transform", e.isAvailable ? "translate-x-4" : "translate-x-0.5") })
545
- })]
546
- }),
547
- /* @__PURE__ */ p("div", {
548
- className: "flex flex-wrap items-center gap-2 mt-2 text-xs",
549
- children: [/* @__PURE__ */ f("span", {
550
- className: "px-2 py-0.5 rounded-full bg-bg-sunken text-text-secondary",
551
- children: e.category
552
- }), /* @__PURE__ */ f("span", {
553
- className: t("font-medium", n.color),
554
- children: n.label
555
- })]
556
- }),
557
- /* @__PURE__ */ p("div", {
558
- className: "flex items-center justify-between mt-3",
559
- children: [/* @__PURE__ */ p("div", {
560
- className: "flex items-center gap-2",
561
- children: [/* @__PURE__ */ f("span", {
562
- className: "font-semibold text-text-primary",
563
- children: i(e.price, { minimumFractionDigits: 0 })
564
- }), e.originalPrice && /* @__PURE__ */ f("span", {
565
- className: "text-xs text-text-secondary line-through",
566
- children: i(e.originalPrice, { minimumFractionDigits: 0 })
567
- })]
568
- }), /* @__PURE__ */ p("div", {
569
- className: "flex gap-1",
570
- children: [/* @__PURE__ */ f("button", {
571
- type: "button",
572
- onClick: () => K(e),
573
- className: "rounded px-2 py-1 text-xs border border-border-subtle text-text-primary hover:bg-bg-sunken",
574
- children: "Edit"
575
- }), /* @__PURE__ */ f("button", {
576
- type: "button",
577
- onClick: () => q(e.id),
578
- className: "rounded px-2 py-1 text-xs border border-border-subtle text-red-600 dark:text-red-400 hover:bg-red-500/10",
579
- children: "Delete"
580
- })]
581
- })]
582
- })
583
- ]
584
- })]
585
- })
586
- }, e.id);
587
- })
588
- })] })
589
- ]
590
- }), O && /* @__PURE__ */ f("div", {
591
- className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",
592
- children: /* @__PURE__ */ f("div", {
593
- className: "w-full max-w-2xl max-h-[90vh] overflow-y-auto rounded-lg border border-border-subtle bg-bg-surface shadow-xl",
594
- children: /* @__PURE__ */ p("div", {
595
- className: "p-6",
596
- children: [
597
- /* @__PURE__ */ p("div", {
598
- className: "flex items-center justify-between mb-4",
599
- children: [/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("h3", {
600
- className: "text-lg font-semibold text-text-primary",
601
- children: A ? "Edit Item" : "Add New Item"
602
- }), M.category && /* @__PURE__ */ p("p", {
603
- className: "text-sm text-text-secondary mt-0.5",
604
- children: [
605
- "Type: ",
606
- Z ? "Service" : "Product",
607
- " | Category: ",
608
- M.category
609
- ]
610
- })] }), /* @__PURE__ */ f("button", {
611
- type: "button",
612
- onClick: () => k(!1),
613
- className: "rounded p-1.5 text-text-secondary hover:text-text-primary hover:bg-bg-sunken transition-colors",
614
- children: /* @__PURE__ */ f(ie, { className: "h-5 w-5" })
615
- })]
616
- }),
617
- /* @__PURE__ */ p("div", {
618
- className: "space-y-4",
619
- children: [
620
- /* @__PURE__ */ p("div", {
621
- className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
622
- children: [/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
623
- className: "block text-sm font-medium text-text-primary mb-1",
624
- children: "Item Name *"
625
- }), /* @__PURE__ */ f("input", {
626
- type: "text",
627
- value: M.name,
628
- onChange: (e) => N((t) => ({
629
- ...t,
630
- name: e.target.value
631
- })),
632
- 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",
633
- placeholder: "Enter item name"
634
- })] }), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
635
- className: "block text-sm font-medium text-text-primary mb-1",
636
- children: "Category *"
637
- }), /* @__PURE__ */ p("select", {
638
- value: M.category,
639
- onChange: (e) => N((t) => ({
640
- ...t,
641
- category: e.target.value
642
- })),
643
- className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary",
644
- children: [/* @__PURE__ */ f("option", {
645
- value: "",
646
- children: "Select category"
647
- }), H.map((e) => /* @__PURE__ */ f("option", {
648
- value: e,
649
- children: e
650
- }, e))]
651
- })] })]
652
- }),
653
- /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
654
- className: "block text-sm font-medium text-text-primary mb-1",
655
- children: "Description *"
656
- }), /* @__PURE__ */ f("textarea", {
657
- value: M.description,
658
- onChange: (e) => N((t) => ({
659
- ...t,
660
- description: e.target.value
661
- })),
662
- rows: 3,
663
- 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 resize-none",
664
- placeholder: "Describe the offering..."
665
- })] }),
666
- /* @__PURE__ */ p("div", {
667
- className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
668
- children: [/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
669
- className: "block text-sm font-medium text-text-primary mb-1",
670
- children: "Price *"
671
- }), /* @__PURE__ */ f("input", {
672
- type: "number",
673
- value: M.price,
674
- onChange: (e) => N((t) => ({
675
- ...t,
676
- price: parseInt(e.target.value) || 0
677
- })),
678
- className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary"
679
- })] }), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
680
- className: "block text-sm font-medium text-text-primary mb-1",
681
- children: "Original Price"
682
- }), /* @__PURE__ */ f("input", {
683
- type: "number",
684
- value: M.originalPrice ?? "",
685
- onChange: (e) => N((t) => ({
686
- ...t,
687
- originalPrice: e.target.value ? parseInt(e.target.value) : void 0
688
- })),
689
- className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary",
690
- placeholder: "Optional"
691
- })] })]
692
- }),
693
- !Z && /* @__PURE__ */ p("div", {
694
- className: "grid grid-cols-1 sm:grid-cols-3 gap-4",
695
- children: [
696
- /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
697
- className: "block text-sm font-medium text-text-primary mb-1",
698
- children: "Stock Quantity *"
699
- }), /* @__PURE__ */ f("input", {
700
- type: "number",
701
- value: M.stock,
702
- onChange: (e) => N((t) => ({
703
- ...t,
704
- stock: parseInt(e.target.value) || 0
705
- })),
706
- className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary"
707
- })] }),
708
- /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
709
- className: "block text-sm font-medium text-text-primary mb-1",
710
- children: "Preparation Time (min)"
711
- }), /* @__PURE__ */ f("input", {
712
- type: "number",
713
- value: M.preparationTime,
714
- onChange: (e) => N((t) => ({
715
- ...t,
716
- preparationTime: parseInt(e.target.value) || 0
717
- })),
718
- className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary"
719
- })] }),
720
- Q && /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
721
- className: "block text-sm font-medium text-text-primary mb-1",
722
- children: "Calories"
723
- }), /* @__PURE__ */ f("input", {
724
- type: "number",
725
- value: M.calories,
726
- onChange: (e) => N((t) => ({
727
- ...t,
728
- calories: parseInt(e.target.value) || 0
729
- })),
730
- className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary"
731
- })] })
732
- ]
733
- }),
734
- Z && /* @__PURE__ */ p("div", {
735
- className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
736
- children: [/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
737
- className: "block text-sm font-medium text-text-primary mb-1",
738
- children: "Service Duration (min) *"
739
- }), /* @__PURE__ */ f("input", {
740
- type: "number",
741
- value: M.duration,
742
- onChange: (e) => N((t) => ({
743
- ...t,
744
- duration: parseInt(e.target.value) || 30
745
- })),
746
- className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary"
747
- })] }), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
748
- className: "block text-sm font-medium text-text-primary mb-1",
749
- children: "Setup Time (min)"
750
- }), /* @__PURE__ */ f("input", {
751
- type: "number",
752
- value: M.preparationTime,
753
- onChange: (e) => N((t) => ({
754
- ...t,
755
- preparationTime: parseInt(e.target.value) || 0
756
- })),
757
- className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary"
758
- })] })]
759
- }),
760
- Q && /* @__PURE__ */ p("div", {
761
- className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
762
- children: [/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
763
- className: "block text-sm font-medium text-text-primary mb-1",
764
- children: "Spice Level"
765
- }), /* @__PURE__ */ p("select", {
766
- value: M.spiceLevel,
767
- onChange: (e) => N((t) => ({
768
- ...t,
769
- spiceLevel: e.target.value
770
- })),
771
- className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary",
772
- children: [
773
- /* @__PURE__ */ f("option", {
774
- value: "none",
775
- children: "None"
776
- }),
777
- /* @__PURE__ */ f("option", {
778
- value: "mild",
779
- children: "Mild"
780
- }),
781
- /* @__PURE__ */ f("option", {
782
- value: "medium",
783
- children: "Medium"
784
- }),
785
- /* @__PURE__ */ f("option", {
786
- value: "spicy",
787
- children: "Spicy"
788
- }),
789
- /* @__PURE__ */ f("option", {
790
- value: "very-spicy",
791
- children: "Very Spicy"
792
- })
793
- ]
794
- })] }), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
795
- className: "block text-sm font-medium text-text-primary mb-2",
796
- children: "Dietary Options"
797
- }), /* @__PURE__ */ f("div", {
798
- className: "space-y-2",
799
- children: [
800
- "isVegetarian",
801
- "isVegan",
802
- "isGlutenFree"
803
- ].map((e) => /* @__PURE__ */ p("label", {
804
- className: "flex items-center gap-2 text-sm text-text-primary",
805
- children: [/* @__PURE__ */ f("input", {
806
- type: "checkbox",
807
- checked: M[e],
808
- onChange: (t) => N((n) => ({
809
- ...n,
810
- [e]: t.target.checked
811
- })),
812
- className: "rounded border-border-subtle"
813
- }), e === "isVegetarian" ? "Vegetarian" : e === "isVegan" ? "Vegan" : "Gluten Free"]
814
- }, e))
815
- })] })]
816
- }),
817
- Z && /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
818
- className: "block text-sm font-medium text-text-primary mb-1",
819
- children: "Service Type *"
820
- }), /* @__PURE__ */ p("select", {
821
- value: M.serviceType,
822
- onChange: (e) => N((t) => ({
823
- ...t,
824
- serviceType: e.target.value
825
- })),
826
- className: "w-full sm:w-64 rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary",
827
- children: [
828
- /* @__PURE__ */ f("option", {
829
- value: "instant",
830
- children: "Instant Service"
831
- }),
832
- /* @__PURE__ */ f("option", {
833
- value: "appointment",
834
- children: "Appointment Based"
835
- }),
836
- /* @__PURE__ */ f("option", {
837
- value: "recurring",
838
- children: "Recurring Service"
839
- }),
840
- /* @__PURE__ */ f("option", {
841
- value: "consultation",
842
- children: "Consultation"
843
- })
844
- ]
845
- })] }),
846
- /* @__PURE__ */ p("div", { children: [
847
- /* @__PURE__ */ f("label", {
848
- className: "block text-sm font-medium text-text-primary mb-1",
849
- children: "Tags (comma separated)"
850
- }),
851
- /* @__PURE__ */ f("input", {
852
- type: "text",
853
- value: P,
854
- onChange: (e) => F(e.target.value),
855
- placeholder: Z ? "professional, certified, quick" : "popular, spicy, traditional",
856
- 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"
857
- }),
858
- /* @__PURE__ */ p("p", {
859
- className: "text-xs text-text-secondary mt-1",
860
- children: [
861
- P.split(",").map((e) => e.trim()).filter(Boolean).length,
862
- " ",
863
- "tags"
864
- ]
865
- })
866
- ] }),
867
- Q && /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
868
- className: "block text-sm font-medium text-text-primary mb-1",
869
- children: "Allergens (comma separated)"
870
- }), /* @__PURE__ */ f("input", {
871
- type: "text",
872
- value: I,
873
- onChange: (e) => L(e.target.value),
874
- placeholder: "nuts, dairy, gluten, soy",
875
- 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"
876
- })] }),
877
- Z && /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
878
- className: "block text-sm font-medium text-text-primary mb-1",
879
- children: "Service Requirements (comma separated)"
880
- }), /* @__PURE__ */ f("input", {
881
- type: "text",
882
- value: R,
883
- onChange: (e) => z(e.target.value),
884
- placeholder: "advance booking, payment required, tools provided",
885
- 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"
886
- })] })
887
- ]
888
- }),
889
- /* @__PURE__ */ p("div", {
890
- className: "flex gap-3 mt-6",
891
- children: [/* @__PURE__ */ f("button", {
892
- type: "button",
893
- onClick: () => k(!1),
894
- className: "flex-1 rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken transition-colors",
895
- children: "Cancel"
896
- }), /* @__PURE__ */ f("button", {
897
- type: "button",
898
- onClick: me,
899
- disabled: !$,
900
- className: t("flex-1 rounded-md px-4 py-2 text-sm font-medium transition-colors", $ ? "bg-accent text-text-primary hover:bg-accent/80" : "bg-bg-sunken text-text-secondary cursor-not-allowed"),
901
- children: A ? "Update Item" : "Add Item"
902
- })]
903
- })
904
- ]
905
- })
906
- })
907
- })]
908
- });
909
- };
910
- //#endregion
911
- export { b as InventoryManagementPage };
912
-
913
- //# sourceMappingURL=InventoryManagementPage.js.map