@burdenoff/microfe-kadaikodi 2026.626.2 → 2026.704.2

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