@burdenoff/microfe-kadaikodi 2026.704.3 → 2026.704.5

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