@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,914 +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 { 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/coolandlovely/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-status-success-text",
199
- label: "Available"
200
- } : e.stock === 0 ? {
201
- color: "text-status-error-text",
202
- label: "Out of Stock"
203
- } : e.stock < 10 ? {
204
- color: "text-status-warning-text",
205
- label: `Low Stock (${e.stock})`
206
- } : {
207
- color: "text-status-success-text",
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: [
220
- /* @__PURE__ */ f(m, {
221
- className: "mb-6",
222
- icon: /* @__PURE__ */ f(c, { className: "h-4 w-4" }),
223
- children: "Your catalogue of products and services. Add and edit items, set prices and availability, and spot what's low or out of stock at a glance — keeping what customers see accurate so you never take an order you can't fulfil."
224
- }),
225
- /* @__PURE__ */ p("div", {
226
- className: "space-y-4",
227
- children: [
228
- B && /* @__PURE__ */ p("div", {
229
- className: t("flex items-center gap-2 rounded-lg border p-3", B.type === "success" ? "border-status-success-border/30 bg-status-success-bg-subtle/10" : "border-status-error-border/30 bg-status-error-bg-subtle/10"),
230
- children: [B.type === "success" ? /* @__PURE__ */ f(s, { className: "h-4 w-4 text-status-success-text" }) : /* @__PURE__ */ f(te, { className: "h-4 w-4 text-status-error-text" }), /* @__PURE__ */ f("span", {
231
- className: t("text-sm font-medium", B.type === "success" ? "text-status-success-text" : "text-status-error-text"),
232
- children: B.text
233
- })]
234
- }),
235
- /* @__PURE__ */ p(oe, {
236
- className: "grid grid-cols-2 lg:grid-cols-4 gap-3 p-4",
237
- children: [
238
- /* @__PURE__ */ p("div", {
239
- className: "rounded-lg border border-border-seam bg-bg-surface p-4 bg-gloss-card shadow-pop",
240
- children: [/* @__PURE__ */ f("p", {
241
- className: "text-xs text-text-secondary",
242
- children: "Total Items"
243
- }), /* @__PURE__ */ f("p", {
244
- className: "text-2xl font-bold text-text-primary",
245
- children: ue
246
- })]
247
- }),
248
- /* @__PURE__ */ p("div", {
249
- className: "rounded-lg border border-border-seam bg-bg-surface p-4 bg-gloss-card shadow-pop",
250
- children: [/* @__PURE__ */ f("p", {
251
- className: "text-xs text-text-secondary",
252
- children: "Available"
253
- }), /* @__PURE__ */ f("p", {
254
- className: "text-2xl font-bold text-status-success-text",
255
- children: de
256
- })]
257
- }),
258
- /* @__PURE__ */ p("div", {
259
- className: "rounded-lg border border-border-seam bg-bg-surface p-4 bg-gloss-card shadow-pop",
260
- children: [/* @__PURE__ */ f("p", {
261
- className: "text-xs text-text-secondary",
262
- children: "Out of Stock"
263
- }), /* @__PURE__ */ f("p", {
264
- className: "text-2xl font-bold text-status-error-text",
265
- children: fe
266
- })]
267
- }),
268
- /* @__PURE__ */ p("div", {
269
- className: "rounded-lg border border-border-seam bg-bg-surface p-4 bg-gloss-card shadow-pop",
270
- children: [/* @__PURE__ */ f("p", {
271
- className: "text-xs text-text-secondary",
272
- children: "Low Stock"
273
- }), /* @__PURE__ */ f("p", {
274
- className: "text-2xl font-bold text-status-warning-text",
275
- children: pe
276
- })]
277
- })
278
- ]
279
- }),
280
- /* @__PURE__ */ p("div", {
281
- className: "rounded-lg border border-border-seam bg-bg-surface p-4 space-y-4 bg-gloss-card shadow-pop",
282
- children: [/* @__PURE__ */ p("div", {
283
- className: "flex flex-col lg:flex-row lg:items-center lg:justify-between gap-3",
284
- children: [/* @__PURE__ */ p("div", {
285
- className: "flex flex-wrap gap-2",
286
- children: [
287
- /* @__PURE__ */ p("button", {
288
- type: "button",
289
- onClick: G,
290
- 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",
291
- children: [/* @__PURE__ */ f(l, { className: "h-4 w-4" }), "Add Item"]
292
- }),
293
- /* @__PURE__ */ f("button", {
294
- type: "button",
295
- onClick: () => Y("enable"),
296
- className: "rounded-md border border-border-subtle px-3 py-2 text-sm text-text-primary hover:bg-bg-sunken transition-colors",
297
- children: "Enable All"
298
- }),
299
- /* @__PURE__ */ f("button", {
300
- type: "button",
301
- onClick: () => Y("disable"),
302
- className: "rounded-md border border-border-subtle px-3 py-2 text-sm text-text-primary hover:bg-bg-sunken transition-colors",
303
- children: "Disable All"
304
- })
305
- ]
306
- }), /* @__PURE__ */ p("button", {
307
- type: "button",
308
- onClick: () => alert("Import/Export feature coming soon!"),
309
- 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",
310
- children: [/* @__PURE__ */ f(re, { className: "h-4 w-4" }), "Import/Export"]
311
- })]
312
- }), /* @__PURE__ */ p("div", {
313
- className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3",
314
- children: [
315
- /* @__PURE__ */ p("div", {
316
- className: "relative sm:col-span-2 lg:col-span-1",
317
- 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", {
318
- type: "text",
319
- placeholder: "Search offerings...",
320
- value: b,
321
- onChange: (e) => x(e.target.value),
322
- 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)]"
323
- })]
324
- }),
325
- /* @__PURE__ */ p("select", {
326
- value: S,
327
- onChange: (e) => C(e.target.value),
328
- className: "rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary",
329
- children: [/* @__PURE__ */ f("option", {
330
- value: "",
331
- children: "All Categories"
332
- }), H.map((e) => /* @__PURE__ */ f("option", {
333
- value: e,
334
- children: e
335
- }, e))]
336
- }),
337
- /* @__PURE__ */ p("select", {
338
- value: w,
339
- onChange: (e) => T(e.target.value),
340
- className: "rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary",
341
- children: [
342
- /* @__PURE__ */ f("option", {
343
- value: "",
344
- children: "All Status"
345
- }),
346
- /* @__PURE__ */ f("option", {
347
- value: "available",
348
- children: "Available"
349
- }),
350
- /* @__PURE__ */ f("option", {
351
- value: "unavailable",
352
- children: "Unavailable"
353
- })
354
- ]
355
- }),
356
- /* @__PURE__ */ p("select", {
357
- value: E,
358
- onChange: (e) => D(e.target.value),
359
- className: "rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary",
360
- children: [
361
- /* @__PURE__ */ f("option", {
362
- value: "name",
363
- children: "Name A-Z"
364
- }),
365
- /* @__PURE__ */ f("option", {
366
- value: "price_low",
367
- children: "Price: Low to High"
368
- }),
369
- /* @__PURE__ */ f("option", {
370
- value: "price_high",
371
- children: "Price: High to Low"
372
- }),
373
- /* @__PURE__ */ f("option", {
374
- value: "stock",
375
- children: "Stock: Low to High"
376
- })
377
- ]
378
- })
379
- ]
380
- })]
381
- }),
382
- U.length === 0 ? /* @__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-md bg-accent px-4 py-2 text-sm font-medium text-text-primary hover:bg-accent/80",
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-md border border-border-subtle px-4 py-2 text-sm text-text-primary hover:bg-bg-sunken",
399
- children: "Clear Filters"
400
- })]
401
- })
402
- }) : /* @__PURE__ */ p(ae, { children: [/* @__PURE__ */ f("div", {
403
- className: "hidden lg:block rounded-lg border border-border-subtle bg-bg-surface shadow-sm overflow-hidden",
404
- children: /* @__PURE__ */ f("div", {
405
- className: "overflow-x-auto",
406
- children: /* @__PURE__ */ p("table", {
407
- className: "w-full text-sm",
408
- children: [/* @__PURE__ */ f("thead", { children: /* @__PURE__ */ p("tr", {
409
- className: "border-b border-border-subtle bg-bg-sunken/50",
410
- children: [
411
- /* @__PURE__ */ f("th", {
412
- className: "px-5 py-3 text-left font-medium text-text-secondary",
413
- children: "Item"
414
- }),
415
- /* @__PURE__ */ f("th", {
416
- className: "px-5 py-3 text-left font-medium text-text-secondary",
417
- children: "Category"
418
- }),
419
- /* @__PURE__ */ f("th", {
420
- className: "px-5 py-3 text-right font-medium text-text-secondary",
421
- children: "Price"
422
- }),
423
- /* @__PURE__ */ f("th", {
424
- className: "px-5 py-3 text-left font-medium text-text-secondary",
425
- children: "Stock/Status"
426
- }),
427
- /* @__PURE__ */ f("th", {
428
- className: "px-5 py-3 text-center font-medium text-text-secondary",
429
- children: "Available"
430
- }),
431
- /* @__PURE__ */ f("th", {
432
- className: "px-5 py-3 text-right font-medium text-text-secondary",
433
- children: "Actions"
434
- })
435
- ]
436
- }) }), /* @__PURE__ */ f("tbody", { children: U.map((e) => {
437
- let n = X(e);
438
- return /* @__PURE__ */ p("tr", {
439
- className: "border-b border-border-subtle last:border-0 hover:bg-bg-sunken/30 transition-colors",
440
- children: [
441
- /* @__PURE__ */ f("td", {
442
- className: "px-5 py-3",
443
- children: /* @__PURE__ */ p("div", {
444
- className: "flex items-center gap-3",
445
- children: [/* @__PURE__ */ f("div", {
446
- className: "flex h-10 w-10 items-center justify-center rounded-md bg-bg-sunken",
447
- children: /* @__PURE__ */ f(c, { className: "h-4 w-4 text-text-secondary" })
448
- }), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("p", {
449
- className: "font-medium text-text-primary",
450
- children: e.name
451
- }), /* @__PURE__ */ p("p", {
452
- className: "text-xs text-text-secondary line-clamp-1",
453
- children: [e.description.slice(0, 50), "..."]
454
- })] })]
455
- })
456
- }),
457
- /* @__PURE__ */ f("td", {
458
- className: "px-5 py-3",
459
- children: /* @__PURE__ */ f("span", {
460
- className: "inline-flex rounded-full bg-bg-sunken px-2.5 py-0.5 text-xs font-medium text-text-secondary",
461
- children: e.category
462
- })
463
- }),
464
- /* @__PURE__ */ p("td", {
465
- className: "px-5 py-3 text-right",
466
- children: [/* @__PURE__ */ f("p", {
467
- className: "font-medium text-text-primary",
468
- children: i(e.price, { minimumFractionDigits: 0 })
469
- }), e.originalPrice && /* @__PURE__ */ f("p", {
470
- className: "text-xs text-text-secondary line-through",
471
- children: i(e.originalPrice, { minimumFractionDigits: 0 })
472
- })]
473
- }),
474
- /* @__PURE__ */ f("td", {
475
- className: "px-5 py-3",
476
- children: /* @__PURE__ */ f("span", {
477
- className: t("text-sm font-medium", n.color),
478
- children: n.label
479
- })
480
- }),
481
- /* @__PURE__ */ f("td", {
482
- className: "px-5 py-3 text-center",
483
- children: /* @__PURE__ */ f("button", {
484
- type: "button",
485
- onClick: () => J(e.id, !e.isAvailable),
486
- className: t("h-6 w-11 rounded-full transition-colors relative inline-block", e.isAvailable ? "bg-accent-blue-subtle" : "bg-muted-foreground/30"),
487
- 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") })
488
- })
489
- }),
490
- /* @__PURE__ */ f("td", {
491
- className: "px-5 py-3",
492
- children: /* @__PURE__ */ p("div", {
493
- className: "flex items-center justify-end gap-1",
494
- children: [/* @__PURE__ */ f("button", {
495
- type: "button",
496
- onClick: () => K(e),
497
- className: "rounded p-1.5 text-text-secondary hover:bg-bg-sunken hover:text-text-primary transition-colors",
498
- title: "Edit",
499
- children: /* @__PURE__ */ f(ne, { className: "h-4 w-4" })
500
- }), /* @__PURE__ */ f("button", {
501
- type: "button",
502
- onClick: () => q(e.id),
503
- className: "rounded p-1.5 text-text-secondary hover:bg-status-error-bg-subtle/10 hover:text-status-error-text transition-colors",
504
- title: "Delete",
505
- children: /* @__PURE__ */ f(d, { className: "h-4 w-4" })
506
- })]
507
- })
508
- })
509
- ]
510
- }, e.id);
511
- }) })]
512
- })
513
- })
514
- }), /* @__PURE__ */ f("div", {
515
- className: "lg:hidden space-y-3",
516
- children: U.map((e) => {
517
- let n = X(e);
518
- return /* @__PURE__ */ f("div", {
519
- className: "rounded-lg border border-border-seam bg-bg-surface p-4 bg-gloss-card shadow-pop",
520
- children: /* @__PURE__ */ p("div", {
521
- className: "flex items-start gap-3",
522
- children: [/* @__PURE__ */ f("div", {
523
- className: "flex h-14 w-14 items-center justify-center rounded-md bg-bg-sunken shrink-0",
524
- children: /* @__PURE__ */ f(c, { className: "h-6 w-6 text-text-secondary" })
525
- }), /* @__PURE__ */ p("div", {
526
- className: "flex-1 min-w-0",
527
- children: [
528
- /* @__PURE__ */ p("div", {
529
- className: "flex items-start justify-between mb-1",
530
- children: [/* @__PURE__ */ p("div", {
531
- className: "flex-1",
532
- children: [/* @__PURE__ */ f("h3", {
533
- className: "text-sm font-medium text-text-primary line-clamp-1",
534
- children: e.name
535
- }), /* @__PURE__ */ f("p", {
536
- className: "text-xs text-text-secondary mt-0.5 line-clamp-2",
537
- children: e.description
538
- })]
539
- }), /* @__PURE__ */ f("button", {
540
- type: "button",
541
- onClick: () => J(e.id, !e.isAvailable),
542
- className: t("h-5 w-9 rounded-full transition-colors relative ml-2 shrink-0", e.isAvailable ? "bg-accent-blue-subtle" : "bg-muted-foreground/30"),
543
- 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") })
544
- })]
545
- }),
546
- /* @__PURE__ */ p("div", {
547
- className: "flex flex-wrap items-center gap-2 mt-2 text-xs",
548
- children: [/* @__PURE__ */ f("span", {
549
- className: "px-2 py-0.5 rounded-full bg-bg-sunken text-text-secondary",
550
- children: e.category
551
- }), /* @__PURE__ */ f("span", {
552
- className: t("font-medium", n.color),
553
- children: n.label
554
- })]
555
- }),
556
- /* @__PURE__ */ p("div", {
557
- className: "flex items-center justify-between mt-3",
558
- children: [/* @__PURE__ */ p("div", {
559
- className: "flex items-center gap-2",
560
- children: [/* @__PURE__ */ f("span", {
561
- className: "font-semibold text-text-primary",
562
- children: i(e.price, { minimumFractionDigits: 0 })
563
- }), e.originalPrice && /* @__PURE__ */ f("span", {
564
- className: "text-xs text-text-secondary line-through",
565
- children: i(e.originalPrice, { minimumFractionDigits: 0 })
566
- })]
567
- }), /* @__PURE__ */ p("div", {
568
- className: "flex gap-1",
569
- children: [/* @__PURE__ */ f("button", {
570
- type: "button",
571
- onClick: () => K(e),
572
- className: "rounded px-2 py-1 text-xs border border-border-subtle text-text-primary hover:bg-bg-sunken",
573
- children: "Edit"
574
- }), /* @__PURE__ */ f("button", {
575
- type: "button",
576
- onClick: () => q(e.id),
577
- className: "rounded px-2 py-1 text-xs border border-border-subtle text-status-error-text hover:bg-status-error-bg-subtle/10",
578
- children: "Delete"
579
- })]
580
- })]
581
- })
582
- ]
583
- })]
584
- })
585
- }, e.id);
586
- })
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
- };
911
- //#endregion
912
- export { b as InventoryManagementPage };
913
-
914
- //# sourceMappingURL=InventoryManagementPage.js.map