@burdenoff/microfe-kadaikodi 2026.704.2 → 2026.704.4

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 (77) hide show
  1. package/dist/kadaikodi/KadaikodiRoutes.js +30 -26
  2. package/dist/kadaikodi/KadaikodiRoutes.js.map +1 -1
  3. package/dist/kadaikodi/hooks/useKadaikodiApi.js +76 -6
  4. package/dist/kadaikodi/hooks/useKadaikodiApi.js.map +1 -1
  5. package/dist/kadaikodi/pages/admin/AdminAnalyticsPage.js +45 -107
  6. package/dist/kadaikodi/pages/admin/AdminAnalyticsPage.js.map +1 -1
  7. package/dist/kadaikodi/pages/admin/AdminDashboard.js +30 -32
  8. package/dist/kadaikodi/pages/admin/AdminDashboard.js.map +1 -1
  9. package/dist/kadaikodi/pages/admin/AdminFinancialPage.js +137 -120
  10. package/dist/kadaikodi/pages/admin/AdminFinancialPage.js.map +1 -1
  11. package/dist/kadaikodi/pages/admin/AdminOrdersPage.js +2 -2
  12. package/dist/kadaikodi/pages/admin/AdminOrdersPage.js.map +1 -1
  13. package/dist/kadaikodi/pages/admin/AdminProfilePage.js.map +1 -1
  14. package/dist/kadaikodi/pages/admin/AdminSettingsPage.js +332 -276
  15. package/dist/kadaikodi/pages/admin/AdminSettingsPage.js.map +1 -1
  16. package/dist/kadaikodi/pages/admin/CartManagementPage.js +278 -283
  17. package/dist/kadaikodi/pages/admin/CartManagementPage.js.map +1 -1
  18. package/dist/kadaikodi/pages/admin/UserManagementPage.js +310 -366
  19. package/dist/kadaikodi/pages/admin/UserManagementPage.js.map +1 -1
  20. package/dist/kadaikodi/pages/cart-owner/AnalyticsDashboard.js +105 -111
  21. package/dist/kadaikodi/pages/cart-owner/AnalyticsDashboard.js.map +1 -1
  22. package/dist/kadaikodi/pages/cart-owner/BusinessSettingsPage.js +290 -257
  23. package/dist/kadaikodi/pages/cart-owner/BusinessSettingsPage.js.map +1 -1
  24. package/dist/kadaikodi/pages/cart-owner/CartOwnerDashboard.js +84 -70
  25. package/dist/kadaikodi/pages/cart-owner/CartOwnerDashboard.js.map +1 -1
  26. package/dist/kadaikodi/pages/cart-owner/CartOwnerProfilePage.js +270 -228
  27. package/dist/kadaikodi/pages/cart-owner/CartOwnerProfilePage.js.map +1 -1
  28. package/dist/kadaikodi/pages/cart-owner/CartServiceConfigPage.js +194 -173
  29. package/dist/kadaikodi/pages/cart-owner/CartServiceConfigPage.js.map +1 -1
  30. package/dist/kadaikodi/pages/cart-owner/InventoryManagementPage.js +202 -139
  31. package/dist/kadaikodi/pages/cart-owner/InventoryManagementPage.js.map +1 -1
  32. package/dist/kadaikodi/pages/cart-owner/InvestmentListingPage.js +232 -0
  33. package/dist/kadaikodi/pages/cart-owner/InvestmentListingPage.js.map +1 -0
  34. package/dist/kadaikodi/pages/cart-owner/OrderManagementPage.js +84 -79
  35. package/dist/kadaikodi/pages/cart-owner/OrderManagementPage.js.map +1 -1
  36. package/dist/kadaikodi/pages/cart-owner/StaffManagementPage.js.map +1 -1
  37. package/dist/kadaikodi/pages/common/HelpSupportPage.js +310 -317
  38. package/dist/kadaikodi/pages/common/HelpSupportPage.js.map +1 -1
  39. package/dist/kadaikodi/pages/common/NotificationCenterPage.js.map +1 -1
  40. package/dist/kadaikodi/pages/common/SettingsPage.js +502 -586
  41. package/dist/kadaikodi/pages/common/SettingsPage.js.map +1 -1
  42. package/dist/kadaikodi/pages/customer/BookingDetailsPage.js +243 -143
  43. package/dist/kadaikodi/pages/customer/BookingDetailsPage.js.map +1 -1
  44. package/dist/kadaikodi/pages/customer/CartDetailPage.js +4 -4
  45. package/dist/kadaikodi/pages/customer/CartDetailPage.js.map +1 -1
  46. package/dist/kadaikodi/pages/customer/CartDiscoveryPage.js +2 -2
  47. package/dist/kadaikodi/pages/customer/CartDiscoveryPage.js.map +1 -1
  48. package/dist/kadaikodi/pages/customer/CheckoutPage.js +4 -4
  49. package/dist/kadaikodi/pages/customer/CheckoutPage.js.map +1 -1
  50. package/dist/kadaikodi/pages/customer/CustomerDashboard.js +6 -6
  51. package/dist/kadaikodi/pages/customer/CustomerDashboard.js.map +1 -1
  52. package/dist/kadaikodi/pages/customer/CustomerProfilePage.js +189 -199
  53. package/dist/kadaikodi/pages/customer/CustomerProfilePage.js.map +1 -1
  54. package/dist/kadaikodi/pages/customer/DirectServiceBookingPage.js +6 -4
  55. package/dist/kadaikodi/pages/customer/DirectServiceBookingPage.js.map +1 -1
  56. package/dist/kadaikodi/pages/customer/FavoritesPage.js +6 -6
  57. package/dist/kadaikodi/pages/customer/FavoritesPage.js.map +1 -1
  58. package/dist/kadaikodi/pages/customer/OrderHistoryPage.js +4 -4
  59. package/dist/kadaikodi/pages/customer/OrderHistoryPage.js.map +1 -1
  60. package/dist/kadaikodi/pages/customer/OrderTrackingPage.js +409 -304
  61. package/dist/kadaikodi/pages/customer/OrderTrackingPage.js.map +1 -1
  62. package/dist/kadaikodi/pages/customer/ReviewsPage.js +209 -162
  63. package/dist/kadaikodi/pages/customer/ReviewsPage.js.map +1 -1
  64. package/dist/kadaikodi/pages/customer/SavedAddressesPage.js.map +1 -1
  65. package/dist/kadaikodi/pages/investor/InvestmentDetailsPage.js.map +1 -1
  66. package/dist/kadaikodi/pages/investor/InvestmentOpportunitiesPage.js.map +1 -1
  67. package/dist/kadaikodi/pages/investor/InvestorAnalyticsPage.js.map +1 -1
  68. package/dist/kadaikodi/pages/investor/InvestorProfilePage.js +441 -514
  69. package/dist/kadaikodi/pages/investor/InvestorProfilePage.js.map +1 -1
  70. package/dist/kadaikodi/pages/worker/TaskDetailsPage.js +207 -186
  71. package/dist/kadaikodi/pages/worker/TaskDetailsPage.js.map +1 -1
  72. package/dist/kadaikodi/pages/worker/WorkerOrdersPage.js.map +1 -1
  73. package/dist/kadaikodi/pages/worker/WorkerProfilePage.js +340 -272
  74. package/dist/kadaikodi/pages/worker/WorkerProfilePage.js.map +1 -1
  75. package/dist/kadaikodi/pages/worker/WorkerSchedulePage.js +122 -75
  76. package/dist/kadaikodi/pages/worker/WorkerSchedulePage.js.map +1 -1
  77. package/package.json +1 -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 { 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 { useEffect as ie, useMemo as o, useState as s } from "react";
8
+ import { AlertCircle as ae, CheckCircle2 as oe, Download as se, Edit2 as ce, Package as c, Plus as l, Search as le, Trash2 as ue, Upload as de, X as fe } from "lucide-react";
9
+ import { Fragment as pe, jsx as u, jsxs as d } from "react/jsx-runtime";
10
+ import { EmphasisPanel as me, PagePurpose as he } from "@burdenoff/fe-libs/ui";
11
11
  //#region src/kadaikodi/pages/cart-owner/InventoryManagementPage.tsx
12
- var pe = [
12
+ var ge = [
13
13
  "Service",
14
14
  "Repair",
15
15
  "Beauty",
@@ -18,7 +18,7 @@ var pe = [
18
18
  "Health",
19
19
  "Wellness",
20
20
  "Education"
21
- ], f = (e) => pe.some((t) => e.includes(t)), me = (e) => e === "Food & Beverage", p = {
21
+ ], f = (e) => ge.some((t) => e.includes(t)), _e = (e) => e === "Food & Beverage", p = {
22
22
  FOOD_BEVERAGE: "Food & Beverage",
23
23
  PERSONAL_CARE_BEAUTY: "Personal Care & Beauty",
24
24
  CLOTHING_FASHION: "Clothing & Fashion",
@@ -28,7 +28,10 @@ var pe = [
28
28
  EDUCATION_SKILLS: "Education & Skills",
29
29
  RETAIL_MERCHANDISE: "Retail & Merchandise",
30
30
  GROCERY_ESSENTIALS: "Grocery & Essentials"
31
- }, he = (e, t) => ({
31
+ }, ve = Object.fromEntries(Object.entries(p).map(([e, t]) => [t, e])), ye = Object.values(p).sort(), be = (e) => `${e.toLowerCase().trim().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") || "offering"}-${Date.now().toString(36)}`, xe = (e) => {
32
+ let t = String(e ?? "");
33
+ return /[",\n]/.test(t) ? `"${t.replace(/"/g, "\"\"")}"` : t;
34
+ }, Se = (e, t) => ({
32
35
  id: e.id,
33
36
  name: e.name,
34
37
  description: e.description ?? "",
@@ -69,17 +72,17 @@ var pe = [
69
72
  serviceType: "instant",
70
73
  requirements: []
71
74
  }, 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();
75
+ let { navigateTo: ge, currentUser: p } = e(), { data: h = [] } = ne(), g = o(() => h.find((e) => e.ownerId === p?.id) ?? h[0], [h, p?.id]), _ = g?.id, { data: v = [], isLoading: Ce } = te(_), y = re(), we = i(), Te = ee(), [b, x] = s([]);
76
+ ie(() => {
77
+ x(v.map((e) => Se(e, g?.name ?? "")));
78
+ }, [v, g?.name]);
79
+ let [S, C] = s(""), [w, T] = s(""), [E, D] = s(""), [O, k] = s("name"), [Ee, De] = s(!1), [Oe, A] = s(!1), [j, M] = s(null), [N, P] = s(m), [F, I] = s(""), [L, R] = s(""), [z, B] = s(""), [V, H] = s(null), ke = o(() => [...new Set(b.map((e) => e.category))].sort(), [b]), U = o(() => {
80
+ let e = [...b];
81
+ if (S) {
82
+ let t = S.toLowerCase();
80
83
  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
84
  }
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) {
85
+ switch (w && (e = e.filter((e) => e.category === w)), E === "available" ? e = e.filter((e) => e.isAvailable) : E === "unavailable" && (e = e.filter((e) => !e.isAvailable)), O) {
83
86
  case "name":
84
87
  e.sort((e, t) => e.name.localeCompare(t.name));
85
88
  break;
@@ -95,23 +98,23 @@ var pe = [
95
98
  }
96
99
  return e;
97
100
  }, [
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) => {
104
- V({
101
+ b,
102
+ S,
103
+ w,
104
+ E,
105
+ O
106
+ ]), Ae = b.length, je = b.filter((e) => e.isAvailable).length, Me = b.filter((e) => !f(e.category) && e.stock === 0).length, Ne = b.filter((e) => !f(e.category) && e.stock > 0 && e.stock < 10).length, W = (e, t) => {
107
+ H({
105
108
  text: e,
106
109
  type: t
107
- }), setTimeout(() => V(null), 3e3);
110
+ }), setTimeout(() => H(null), 3e3);
108
111
  }, G = () => {
109
- j(null), N({
112
+ M(null), P({
110
113
  ...m,
111
- category: H[0] || ""
112
- }), F(""), L(""), z(""), k(!0);
114
+ category: ""
115
+ }), I(""), R(""), B(""), A(!0);
113
116
  }, K = (e) => {
114
- j(e), N({
117
+ M(e), P({
115
118
  name: e.name,
116
119
  description: e.description,
117
120
  category: e.category,
@@ -130,64 +133,115 @@ var pe = [
130
133
  duration: e.duration,
131
134
  serviceType: e.serviceType,
132
135
  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
+ }), I(e.tags.join(", ")), R(e.allergens.join(", ")), B(e.requirements.join(", ")), A(!0);
137
+ }, Pe = () => {
138
+ if (!N.name || !N.description || !N.category || N.price <= 0) {
136
139
  W("Please fill all required fields (name, description, category, price > 0)", "error");
137
140
  return;
138
141
  }
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 ? {
142
+ let e = F.split(",").map((e) => e.trim()).filter(Boolean), t = L.split(",").map((e) => e.trim()).filter(Boolean), n = z.split(",").map((e) => e.trim()).filter(Boolean), r = f(N.category), i = r ? "Service" : "Product";
143
+ if (j) x((r) => r.map((r) => r.id === j.id ? {
141
144
  ...r,
142
- ...M,
145
+ ...N,
143
146
  tags: e,
144
147
  allergens: t,
145
148
  requirements: n
146
- } : r)), v.mutate({
147
- id: A.id,
149
+ } : r)), y.mutate({
150
+ id: j.id,
148
151
  input: {
149
- name: M.name,
150
- description: M.description,
151
- price: M.price,
152
- originalPrice: M.originalPrice,
153
- stock: M.stock,
152
+ name: N.name,
153
+ description: N.description,
154
+ price: N.price,
155
+ originalPrice: N.originalPrice,
156
+ stock: r ? void 0 : N.stock,
154
157
  tags: e,
155
- serviceType: M.serviceType || void 0,
156
- durationMinutes: r ? M.duration : void 0
158
+ serviceType: N.serviceType || void 0,
159
+ durationMinutes: r ? N.duration : void 0
157
160
  }
158
- }, { onError: () => W("Could not save changes to the server", "error") }), W(`${i} updated successfully`, "success");
161
+ }, { onError: () => W("Could not save changes to the server", "error") }), W(`${i} updated successfully`, "success"), A(!1);
159
162
  else {
160
- let r = {
161
- id: `item-${Date.now()}`,
162
- ...M,
163
+ if (!_) {
164
+ W("Create your cart before adding offerings", "error");
165
+ return;
166
+ }
167
+ let t = ve[N.category];
168
+ if (!t) {
169
+ W("Please choose a valid category", "error");
170
+ return;
171
+ }
172
+ we.mutate({
173
+ providerId: _,
174
+ name: N.name,
175
+ slug: be(N.name),
176
+ description: N.description,
177
+ category: t,
178
+ kind: r ? "SERVICE" : "PRODUCT",
179
+ price: N.price,
180
+ originalPrice: N.originalPrice,
181
+ stock: r ? void 0 : N.stock,
163
182
  tags: e,
164
- allergens: t,
165
- requirements: n,
166
- cartName: g?.name ?? ""
167
- };
168
- b((e) => [r, ...e]), W(`${i} added successfully`, "success");
183
+ serviceType: r && N.serviceType || void 0,
184
+ durationMinutes: r ? N.duration : void 0
185
+ }, {
186
+ onSuccess: () => {
187
+ W(`${i} added successfully`, "success"), A(!1);
188
+ },
189
+ onError: () => W(`Could not create the ${i.toLowerCase()}`, "error")
190
+ });
169
191
  }
170
- k(!1);
171
192
  }, 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"));
193
+ if (!confirm("Are you sure you want to delete this offering?")) return;
194
+ let t = b;
195
+ x((t) => t.filter((t) => t.id !== e)), Te.mutate(e, {
196
+ onSuccess: () => W("Offering deleted successfully", "success"),
197
+ onError: () => {
198
+ x(t), W("Could not delete the offering", "error");
199
+ }
200
+ });
173
201
  }, J = (e, t) => {
174
- b((n) => n.map((n) => n.id === e ? {
202
+ x((n) => n.map((n) => n.id === e ? {
175
203
  ...n,
176
204
  isAvailable: t
177
- } : n)), v.mutate({
205
+ } : n)), y.mutate({
178
206
  id: e,
179
207
  input: { isAvailable: t }
180
208
  }, { onError: () => W("Could not update availability on the server", "error") }), W(`Offering ${t ? "enabled" : "disabled"} successfully`, "success");
181
209
  }, Y = (e) => {
182
- let t = e === "enable", n = y.filter((e) => e.isAvailable !== t).length;
183
- if (n === 0) {
210
+ let t = e === "enable", n = b.filter((e) => e.isAvailable !== t);
211
+ if (n.length === 0) {
184
212
  W(`No offerings to ${e}`, "error");
185
213
  return;
186
214
  }
187
- b((e) => e.map((e) => ({
215
+ x((e) => e.map((e) => ({
188
216
  ...e,
189
217
  isAvailable: t
190
- }))), W(`${n} offerings ${e}d successfully`, "success");
218
+ }))), n.forEach((e) => y.mutate({
219
+ id: e.id,
220
+ input: { isAvailable: t }
221
+ }, { onError: () => W("Some offerings could not be updated on the server", "error") })), W(`${n.length} offerings ${e}d successfully`, "success");
222
+ }, Fe = () => {
223
+ if (b.length === 0) {
224
+ W("There are no offerings to export yet", "error");
225
+ return;
226
+ }
227
+ let e = [[
228
+ "Name",
229
+ "Category",
230
+ "Price",
231
+ "Original Price",
232
+ "Stock",
233
+ "Available",
234
+ "Tags"
235
+ ], ...b.map((e) => [
236
+ e.name,
237
+ e.category,
238
+ e.price,
239
+ e.originalPrice ?? "",
240
+ f(e.category) ? "" : e.stock,
241
+ e.isAvailable ? "Yes" : "No",
242
+ e.tags.join("; ")
243
+ ])].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");
244
+ 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), W(`Exported ${b.length} offerings to CSV`, "success");
191
245
  }, X = (e) => f(e.category) ? {
192
246
  color: "text-status-success-text",
193
247
  label: "Available"
@@ -200,7 +254,7 @@ var pe = [
200
254
  } : {
201
255
  color: "text-status-success-text",
202
256
  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);
257
+ }, Z = N.category ? f(N.category) : !1, Ie = N.category ? _e(N.category) : !1, Q = !Z && Ie, $ = N.name && N.description && N.category && N.price > 0 && (!Z || N.duration && N.duration > 0) && (Z || N.stock >= 0);
204
258
  return /* @__PURE__ */ d(n, {
205
259
  title: "Offerings Management",
206
260
  description: "Manage your products and services",
@@ -211,21 +265,21 @@ var pe = [
211
265
  children: [/* @__PURE__ */ u(l, { className: "h-4 w-4" }), "Add Item"]
212
266
  }),
213
267
  children: [
214
- /* @__PURE__ */ u(fe, {
268
+ /* @__PURE__ */ u(he, {
215
269
  className: "mb-6",
216
270
  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
271
  }),
218
272
  /* @__PURE__ */ d("div", {
219
273
  className: "space-y-4",
220
274
  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
275
+ V && /* @__PURE__ */ d("div", {
276
+ className: t("flex items-center gap-2 rounded-lg border p-3", V.type === "success" ? "border-status-success-text/30 bg-status-success-bg-subtle" : "border-status-error-text/30 bg-status-error-bg-subtle"),
277
+ children: [V.type === "success" ? /* @__PURE__ */ u(oe, { className: "h-4 w-4 text-status-success-text" }) : /* @__PURE__ */ u(ae, { className: "h-4 w-4 text-status-error-text" }), /* @__PURE__ */ u("span", {
278
+ className: t("text-sm font-medium", V.type === "success" ? "text-status-success-text" : "text-status-error-text"),
279
+ children: V.text
226
280
  })]
227
281
  }),
228
- /* @__PURE__ */ d(de, { children: [/* @__PURE__ */ u("h2", {
282
+ /* @__PURE__ */ d(me, { children: [/* @__PURE__ */ u("h2", {
229
283
  className: "mb-4 text-base font-semibold text-text-primary",
230
284
  children: "Stock at a Glance"
231
285
  }), /* @__PURE__ */ d("div", {
@@ -238,7 +292,7 @@ var pe = [
238
292
  children: "Total Items"
239
293
  }), /* @__PURE__ */ u("p", {
240
294
  className: "text-2xl font-bold text-text-primary",
241
- children: xe
295
+ children: Ae
242
296
  })]
243
297
  }),
244
298
  /* @__PURE__ */ d("div", {
@@ -248,7 +302,7 @@ var pe = [
248
302
  children: "Available"
249
303
  }), /* @__PURE__ */ u("p", {
250
304
  className: "text-2xl font-bold text-status-success-text",
251
- children: Se
305
+ children: je
252
306
  })]
253
307
  }),
254
308
  /* @__PURE__ */ d("div", {
@@ -258,7 +312,7 @@ var pe = [
258
312
  children: "Out of Stock"
259
313
  }), /* @__PURE__ */ u("p", {
260
314
  className: "text-2xl font-bold text-status-error-text",
261
- children: Ce
315
+ children: Me
262
316
  })]
263
317
  }),
264
318
  /* @__PURE__ */ d("div", {
@@ -268,7 +322,7 @@ var pe = [
268
322
  children: "Low Stock"
269
323
  }), /* @__PURE__ */ u("p", {
270
324
  className: "text-2xl font-bold text-status-warning-text",
271
- children: we
325
+ children: Ne
272
326
  })]
273
327
  })
274
328
  ]
@@ -299,40 +353,49 @@ var pe = [
299
353
  children: "Disable All"
300
354
  })
301
355
  ]
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"]
356
+ }), /* @__PURE__ */ d("div", {
357
+ className: "flex flex-wrap gap-2",
358
+ children: [/* @__PURE__ */ d("button", {
359
+ type: "button",
360
+ onClick: Fe,
361
+ 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",
362
+ children: [/* @__PURE__ */ u(se, { className: "h-4 w-4" }), "Export CSV"]
363
+ }), /* @__PURE__ */ d("button", {
364
+ type: "button",
365
+ disabled: !0,
366
+ title: "Bulk import is coming soon",
367
+ 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",
368
+ children: [/* @__PURE__ */ u(de, { className: "h-4 w-4" }), "Import (coming soon)"]
369
+ })]
307
370
  })]
308
371
  }), /* @__PURE__ */ d("div", {
309
372
  className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3",
310
373
  children: [
311
374
  /* @__PURE__ */ d("div", {
312
375
  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", {
376
+ children: [/* @__PURE__ */ u(le, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-secondary" }), /* @__PURE__ */ u("input", {
314
377
  type: "text",
315
378
  placeholder: "Search offerings...",
316
- value: x,
317
- onChange: (e) => S(e.target.value),
379
+ value: S,
380
+ onChange: (e) => C(e.target.value),
318
381
  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
382
  })]
320
383
  }),
321
384
  /* @__PURE__ */ d("select", {
322
- value: C,
323
- onChange: (e) => w(e.target.value),
385
+ value: w,
386
+ onChange: (e) => T(e.target.value),
324
387
  className: "rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary",
325
388
  children: [/* @__PURE__ */ u("option", {
326
389
  value: "",
327
390
  children: "All Categories"
328
- }), H.map((e) => /* @__PURE__ */ u("option", {
391
+ }), ke.map((e) => /* @__PURE__ */ u("option", {
329
392
  value: e,
330
393
  children: e
331
394
  }, e))]
332
395
  }),
333
396
  /* @__PURE__ */ d("select", {
334
- value: T,
335
- onChange: (e) => E(e.target.value),
397
+ value: E,
398
+ onChange: (e) => D(e.target.value),
336
399
  className: "rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary",
337
400
  children: [
338
401
  /* @__PURE__ */ u("option", {
@@ -350,8 +413,8 @@ var pe = [
350
413
  ]
351
414
  }),
352
415
  /* @__PURE__ */ d("select", {
353
- value: D,
354
- onChange: (e) => O(e.target.value),
416
+ value: O,
417
+ onChange: (e) => k(e.target.value),
355
418
  className: "rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary",
356
419
  children: [
357
420
  /* @__PURE__ */ u("option", {
@@ -375,13 +438,13 @@ var pe = [
375
438
  ]
376
439
  })]
377
440
  }),
378
- _e ? /* @__PURE__ */ u("div", {
441
+ Ce ? /* @__PURE__ */ u("div", {
379
442
  className: "flex items-center justify-center py-16",
380
443
  children: /* @__PURE__ */ u("div", { className: "h-10 w-10 animate-spin rounded-full border-b-2 border-foreground" })
381
444
  }) : U.length === 0 ? /* @__PURE__ */ u(r, {
382
- illustration: x || C || T ? "empty-search" : "empty-files",
445
+ illustration: S || w || E ? "empty-search" : "empty-files",
383
446
  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.",
447
+ description: S || w || E ? "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
448
  action: /* @__PURE__ */ d("div", {
386
449
  className: "flex flex-wrap justify-center gap-3",
387
450
  children: [/* @__PURE__ */ d("button", {
@@ -389,16 +452,16 @@ var pe = [
389
452
  onClick: G,
390
453
  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
454
  children: [/* @__PURE__ */ u(l, { className: "h-4 w-4" }), "Add Your First Item"]
392
- }), (x || C || T) && /* @__PURE__ */ u("button", {
455
+ }), (S || w || E) && /* @__PURE__ */ u("button", {
393
456
  type: "button",
394
457
  onClick: () => {
395
- S(""), w(""), E(""), O("name");
458
+ C(""), T(""), D(""), k("name");
396
459
  },
397
460
  className: "rounded-md border border-border-subtle px-4 py-2 text-sm text-text-primary hover:bg-bg-sunken",
398
461
  children: "Clear Filters"
399
462
  })]
400
463
  })
401
- }) : /* @__PURE__ */ d(ue, { children: [/* @__PURE__ */ u("div", {
464
+ }) : /* @__PURE__ */ d(pe, { children: [/* @__PURE__ */ u("div", {
402
465
  className: "hidden lg:block rounded-lg border border-border-subtle bg-bg-surface shadow-sm overflow-hidden",
403
466
  children: /* @__PURE__ */ u("div", {
404
467
  className: "overflow-x-auto",
@@ -495,13 +558,13 @@ var pe = [
495
558
  onClick: () => K(e),
496
559
  className: "rounded p-1.5 text-text-secondary hover:bg-bg-sunken hover:text-text-primary transition-colors",
497
560
  title: "Edit",
498
- children: /* @__PURE__ */ u(ae, { className: "h-4 w-4" })
561
+ children: /* @__PURE__ */ u(ce, { className: "h-4 w-4" })
499
562
  }), /* @__PURE__ */ u("button", {
500
563
  type: "button",
501
564
  onClick: () => q(e.id),
502
565
  className: "rounded p-1.5 text-text-secondary hover:bg-status-error-bg-subtle hover:text-status-error-text transition-colors",
503
566
  title: "Delete",
504
- children: /* @__PURE__ */ u(se, { className: "h-4 w-4" })
567
+ children: /* @__PURE__ */ u(ue, { className: "h-4 w-4" })
505
568
  })]
506
569
  })
507
570
  })
@@ -586,7 +649,7 @@ var pe = [
586
649
  })] })
587
650
  ]
588
651
  }),
589
- be && /* @__PURE__ */ u("div", {
652
+ Oe && /* @__PURE__ */ u("div", {
590
653
  className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",
591
654
  children: /* @__PURE__ */ u("div", {
592
655
  className: "w-full max-w-2xl max-h-[90vh] overflow-y-auto rounded-lg border border-border-subtle bg-bg-surface shadow-xl",
@@ -597,20 +660,20 @@ var pe = [
597
660
  className: "flex items-center justify-between mb-4",
598
661
  children: [/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("h3", {
599
662
  className: "text-lg font-semibold text-text-primary",
600
- children: A ? "Edit Item" : "Add New Item"
601
- }), M.category && /* @__PURE__ */ d("p", {
663
+ children: j ? "Edit Item" : "Add New Item"
664
+ }), N.category && /* @__PURE__ */ d("p", {
602
665
  className: "text-sm text-text-secondary mt-0.5",
603
666
  children: [
604
667
  "Type: ",
605
668
  Z ? "Service" : "Product",
606
669
  " | Category: ",
607
- M.category
670
+ N.category
608
671
  ]
609
672
  })] }), /* @__PURE__ */ u("button", {
610
673
  type: "button",
611
- onClick: () => k(!1),
674
+ onClick: () => A(!1),
612
675
  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" })
676
+ children: /* @__PURE__ */ u(fe, { className: "h-5 w-5" })
614
677
  })]
615
678
  }),
616
679
  /* @__PURE__ */ d("div", {
@@ -623,8 +686,8 @@ var pe = [
623
686
  children: "Item Name *"
624
687
  }), /* @__PURE__ */ u("input", {
625
688
  type: "text",
626
- value: M.name,
627
- onChange: (e) => N((t) => ({
689
+ value: N.name,
690
+ onChange: (e) => P((t) => ({
628
691
  ...t,
629
692
  name: e.target.value
630
693
  })),
@@ -634,8 +697,8 @@ var pe = [
634
697
  className: "block text-sm font-medium text-text-primary mb-1",
635
698
  children: "Category *"
636
699
  }), /* @__PURE__ */ d("select", {
637
- value: M.category,
638
- onChange: (e) => N((t) => ({
700
+ value: N.category,
701
+ onChange: (e) => P((t) => ({
639
702
  ...t,
640
703
  category: e.target.value
641
704
  })),
@@ -643,7 +706,7 @@ var pe = [
643
706
  children: [/* @__PURE__ */ u("option", {
644
707
  value: "",
645
708
  children: "Select category"
646
- }), H.map((e) => /* @__PURE__ */ u("option", {
709
+ }), ye.map((e) => /* @__PURE__ */ u("option", {
647
710
  value: e,
648
711
  children: e
649
712
  }, e))]
@@ -653,8 +716,8 @@ var pe = [
653
716
  className: "block text-sm font-medium text-text-primary mb-1",
654
717
  children: "Description *"
655
718
  }), /* @__PURE__ */ u("textarea", {
656
- value: M.description,
657
- onChange: (e) => N((t) => ({
719
+ value: N.description,
720
+ onChange: (e) => P((t) => ({
658
721
  ...t,
659
722
  description: e.target.value
660
723
  })),
@@ -669,8 +732,8 @@ var pe = [
669
732
  children: "Price *"
670
733
  }), /* @__PURE__ */ u("input", {
671
734
  type: "number",
672
- value: M.price,
673
- onChange: (e) => N((t) => ({
735
+ value: N.price,
736
+ onChange: (e) => P((t) => ({
674
737
  ...t,
675
738
  price: parseInt(e.target.value) || 0
676
739
  })),
@@ -680,8 +743,8 @@ var pe = [
680
743
  children: "Original Price"
681
744
  }), /* @__PURE__ */ u("input", {
682
745
  type: "number",
683
- value: M.originalPrice ?? "",
684
- onChange: (e) => N((t) => ({
746
+ value: N.originalPrice ?? "",
747
+ onChange: (e) => P((t) => ({
685
748
  ...t,
686
749
  originalPrice: e.target.value ? parseInt(e.target.value) : void 0
687
750
  })),
@@ -697,8 +760,8 @@ var pe = [
697
760
  children: "Stock Quantity *"
698
761
  }), /* @__PURE__ */ u("input", {
699
762
  type: "number",
700
- value: M.stock,
701
- onChange: (e) => N((t) => ({
763
+ value: N.stock,
764
+ onChange: (e) => P((t) => ({
702
765
  ...t,
703
766
  stock: parseInt(e.target.value) || 0
704
767
  })),
@@ -709,8 +772,8 @@ var pe = [
709
772
  children: "Preparation Time (min)"
710
773
  }), /* @__PURE__ */ u("input", {
711
774
  type: "number",
712
- value: M.preparationTime,
713
- onChange: (e) => N((t) => ({
775
+ value: N.preparationTime,
776
+ onChange: (e) => P((t) => ({
714
777
  ...t,
715
778
  preparationTime: parseInt(e.target.value) || 0
716
779
  })),
@@ -721,8 +784,8 @@ var pe = [
721
784
  children: "Calories"
722
785
  }), /* @__PURE__ */ u("input", {
723
786
  type: "number",
724
- value: M.calories,
725
- onChange: (e) => N((t) => ({
787
+ value: N.calories,
788
+ onChange: (e) => P((t) => ({
726
789
  ...t,
727
790
  calories: parseInt(e.target.value) || 0
728
791
  })),
@@ -737,8 +800,8 @@ var pe = [
737
800
  children: "Service Duration (min) *"
738
801
  }), /* @__PURE__ */ u("input", {
739
802
  type: "number",
740
- value: M.duration,
741
- onChange: (e) => N((t) => ({
803
+ value: N.duration,
804
+ onChange: (e) => P((t) => ({
742
805
  ...t,
743
806
  duration: parseInt(e.target.value) || 30
744
807
  })),
@@ -748,8 +811,8 @@ var pe = [
748
811
  children: "Setup Time (min)"
749
812
  }), /* @__PURE__ */ u("input", {
750
813
  type: "number",
751
- value: M.preparationTime,
752
- onChange: (e) => N((t) => ({
814
+ value: N.preparationTime,
815
+ onChange: (e) => P((t) => ({
753
816
  ...t,
754
817
  preparationTime: parseInt(e.target.value) || 0
755
818
  })),
@@ -762,8 +825,8 @@ var pe = [
762
825
  className: "block text-sm font-medium text-text-primary mb-1",
763
826
  children: "Spice Level"
764
827
  }), /* @__PURE__ */ d("select", {
765
- value: M.spiceLevel,
766
- onChange: (e) => N((t) => ({
828
+ value: N.spiceLevel,
829
+ onChange: (e) => P((t) => ({
767
830
  ...t,
768
831
  spiceLevel: e.target.value
769
832
  })),
@@ -803,8 +866,8 @@ var pe = [
803
866
  className: "flex items-center gap-2 text-sm text-text-primary",
804
867
  children: [/* @__PURE__ */ u("input", {
805
868
  type: "checkbox",
806
- checked: M[e],
807
- onChange: (t) => N((n) => ({
869
+ checked: N[e],
870
+ onChange: (t) => P((n) => ({
808
871
  ...n,
809
872
  [e]: t.target.checked
810
873
  })),
@@ -817,8 +880,8 @@ var pe = [
817
880
  className: "block text-sm font-medium text-text-primary mb-1",
818
881
  children: "Service Type *"
819
882
  }), /* @__PURE__ */ d("select", {
820
- value: M.serviceType,
821
- onChange: (e) => N((t) => ({
883
+ value: N.serviceType,
884
+ onChange: (e) => P((t) => ({
822
885
  ...t,
823
886
  serviceType: e.target.value
824
887
  })),
@@ -849,15 +912,15 @@ var pe = [
849
912
  }),
850
913
  /* @__PURE__ */ u("input", {
851
914
  type: "text",
852
- value: P,
853
- onChange: (e) => F(e.target.value),
915
+ value: F,
916
+ onChange: (e) => I(e.target.value),
854
917
  placeholder: Z ? "professional, certified, quick" : "popular, spicy, traditional",
855
918
  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
919
  }),
857
920
  /* @__PURE__ */ d("p", {
858
921
  className: "text-xs text-text-secondary mt-1",
859
922
  children: [
860
- P.split(",").map((e) => e.trim()).filter(Boolean).length,
923
+ F.split(",").map((e) => e.trim()).filter(Boolean).length,
861
924
  " ",
862
925
  "tags"
863
926
  ]
@@ -868,8 +931,8 @@ var pe = [
868
931
  children: "Allergens (comma separated)"
869
932
  }), /* @__PURE__ */ u("input", {
870
933
  type: "text",
871
- value: I,
872
- onChange: (e) => L(e.target.value),
934
+ value: L,
935
+ onChange: (e) => R(e.target.value),
873
936
  placeholder: "nuts, dairy, gluten, soy",
874
937
  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
938
  })] }),
@@ -878,8 +941,8 @@ var pe = [
878
941
  children: "Service Requirements (comma separated)"
879
942
  }), /* @__PURE__ */ u("input", {
880
943
  type: "text",
881
- value: R,
882
- onChange: (e) => z(e.target.value),
944
+ value: z,
945
+ onChange: (e) => B(e.target.value),
883
946
  placeholder: "advance booking, payment required, tools provided",
884
947
  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
948
  })] })
@@ -889,15 +952,15 @@ var pe = [
889
952
  className: "flex gap-3 mt-6",
890
953
  children: [/* @__PURE__ */ u("button", {
891
954
  type: "button",
892
- onClick: () => k(!1),
955
+ onClick: () => A(!1),
893
956
  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
957
  children: "Cancel"
895
958
  }), /* @__PURE__ */ u("button", {
896
959
  type: "button",
897
- onClick: Te,
960
+ onClick: Pe,
898
961
  disabled: !$,
899
962
  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"
963
+ children: j ? "Update Item" : "Add Item"
901
964
  })]
902
965
  })
903
966
  ]