@burdenoff/microfe-healthybowl 2026.710.21 → 2026.711.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/dist/healthybowl/HealthyBowlRoot.js +93 -85
  2. package/dist/healthybowl/HealthyBowlRoot.js.map +1 -1
  3. package/dist/healthybowl/HealthyBowlRoutes.js +98 -86
  4. package/dist/healthybowl/HealthyBowlRoutes.js.map +1 -1
  5. package/dist/healthybowl/components/PlanExecutionPanel.js +535 -0
  6. package/dist/healthybowl/components/PlanExecutionPanel.js.map +1 -0
  7. package/dist/healthybowl/hooks/useHealthyBowlWithdrawal.js +237 -0
  8. package/dist/healthybowl/hooks/useHealthyBowlWithdrawal.js.map +1 -0
  9. package/dist/healthybowl/hooks/usePlanExecution.js +106 -0
  10. package/dist/healthybowl/hooks/usePlanExecution.js.map +1 -0
  11. package/dist/healthybowl/pages/crops/PlanningDetailsPage.js +246 -241
  12. package/dist/healthybowl/pages/crops/PlanningDetailsPage.js.map +1 -1
  13. package/dist/healthybowl/pages/livestock/AnimalDetailsPage.js +532 -527
  14. package/dist/healthybowl/pages/livestock/AnimalDetailsPage.js.map +1 -1
  15. package/dist/healthybowl/pages/livestock/MedicationLibraryPage.js +387 -0
  16. package/dist/healthybowl/pages/livestock/MedicationLibraryPage.js.map +1 -0
  17. package/dist/healthybowl/pages/livestock/WithdrawalAlertsPage.js +286 -0
  18. package/dist/healthybowl/pages/livestock/WithdrawalAlertsPage.js.map +1 -0
  19. package/dist/healthybowl/pages/livestock/WithdrawalCalendarPage.js +182 -0
  20. package/dist/healthybowl/pages/livestock/WithdrawalCalendarPage.js.map +1 -0
  21. package/dist/healthybowl/pages/livestock/withdrawal/AnimalWithdrawalCard.js +166 -0
  22. package/dist/healthybowl/pages/livestock/withdrawal/AnimalWithdrawalCard.js.map +1 -0
  23. package/dist/healthybowl/pages/livestock/withdrawal/LogTreatmentModal.js +274 -0
  24. package/dist/healthybowl/pages/livestock/withdrawal/LogTreatmentModal.js.map +1 -0
  25. package/dist/healthybowl/pages/livestock/withdrawal/WithdrawalNav.js +40 -0
  26. package/dist/healthybowl/pages/livestock/withdrawal/WithdrawalNav.js.map +1 -0
  27. package/dist/healthybowl/pages/livestock/withdrawal/status.js +53 -0
  28. package/dist/healthybowl/pages/livestock/withdrawal/status.js.map +1 -0
  29. package/package.json +1 -1
@@ -9,19 +9,20 @@ import { ToastContainer as re } from "../../components/Toast.js";
9
9
  import { useConfirm as ie } from "../../components/ConfirmDialog.js";
10
10
  import { PageLoader as ae } from "../../components/PageLoader.js";
11
11
  import { Modal as oe } from "../../components/Modal.js";
12
- import { HBEntityImages as a } from "../../components/HBEntityImages.js";
13
- import { useToast as se } from "../../hooks/useToast.js";
14
- import { CreateFarmTaskButton as ce } from "../../components/CreateFarmTaskButton.js";
12
+ import { HBEntityImages as se } from "../../components/HBEntityImages.js";
13
+ import { useToast as ce } from "../../hooks/useToast.js";
14
+ import { CreateFarmTaskButton as le } from "../../components/CreateFarmTaskButton.js";
15
15
  import "../../components/index.js";
16
- import { useHealthyBowlData as le } from "../../hooks/useHealthyBowlData.js";
17
- import { useMemo as o, useState as s } from "react";
18
- import { useI18n as ue } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
19
- import { ArrowLeft as de, Calendar as fe, ChevronRight as pe, Edit as me, Heart as c, Milk as l, Plus as u, Stethoscope as he, Syringe as ge, Trash2 as _e, TrendingUp as ve, Weight as ye } from "lucide-react";
20
- import { useNavigate as be, useParams as xe } from "react-router-dom";
21
- import { Fragment as Se, jsx as d, jsxs as f } from "react/jsx-runtime";
22
- import { Button as p, ResponsiveTable as Ce, Select as m, SelectContent as h, SelectItem as g, SelectTrigger as _, SelectValue as v } from "@burdenoff/fe-libs/ui";
16
+ import { useHealthyBowlData as ue } from "../../hooks/useHealthyBowlData.js";
17
+ import { AnimalWithdrawalCard as de } from "./withdrawal/AnimalWithdrawalCard.js";
18
+ import { useMemo as a, useState as o } from "react";
19
+ import { useI18n as fe } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
20
+ import { ArrowLeft as pe, Calendar as me, ChevronRight as he, Edit as ge, Heart as s, Milk as c, Plus as l, Stethoscope as _e, Syringe as ve, Trash2 as ye, TrendingUp as be, Weight as xe } from "lucide-react";
21
+ import { useNavigate as Se, useParams as Ce } from "react-router-dom";
22
+ import { Fragment as we, jsx as u, jsxs as d } from "react/jsx-runtime";
23
+ import { Button as f, ResponsiveTable as Te, Select as p, SelectContent as m, SelectItem as h, SelectTrigger as g, SelectValue as _ } from "@burdenoff/fe-libs/ui";
23
24
  //#region src/healthybowl/pages/livestock/AnimalDetailsPage.tsx
24
- var y = (e) => {
25
+ var Ee = (e) => {
25
26
  switch (e) {
26
27
  case "healthy": return "success";
27
28
  case "pregnant": return "info";
@@ -30,7 +31,7 @@ var y = (e) => {
30
31
  case "quarantine": return "error";
31
32
  default: return "muted";
32
33
  }
33
- }, we = (e) => {
34
+ }, De = (e) => {
34
35
  switch (e) {
35
36
  case "cattle":
36
37
  case "buffalo": return "🐄";
@@ -40,86 +41,86 @@ var y = (e) => {
40
41
  case "poultry": return "🐔";
41
42
  default: return "🐾";
42
43
  }
43
- }, b = () => {
44
- let { animals: b, healthRecords: x, vaccinations: S, breedingRecords: C, productionRecords: w, updateAnimal: Te, deleteAnimal: Ee, errors: De, loadings: Oe, refetch: ke } = le(), { t: T } = ue(), Ae = ie(), { animalId: je } = xe(), E = be(), { buildPath: D } = ee(), [O, k] = s("overview"), [Me, A] = s(!1), [j, M] = s(!1), { toasts: Ne, toast: N, dismiss: Pe } = se(), P = b.find((e) => e.id === je), [F, I] = s(""), [L, R] = s(""), [z, B] = s(""), [V, Fe] = s(""), [Ie, Le] = s(""), [H, Re] = s(""), [ze, Be] = s(""), [Ve, He] = s(""), [U, Ue] = s(""), [W, We] = s(""), [G, K] = s(""), [Ge, Ke] = s([]), qe = () => {
45
- P && (I(P.name), R(P.type), B(P.breed), Fe(P.gender), Le(P.healthStatus), Re(P.tagNumber), Be(String(P.vaccinations ?? 0)), He(String(P.weight ?? 0)), Ue(P.dateOfBirth ?? ""), We(P.lastCheckup ?? ""), K(P.productionType ?? ""), Ke(P.imageIds ?? []), A(!0));
44
+ }, v = () => {
45
+ let { animals: v, healthRecords: y, vaccinations: b, breedingRecords: Oe, productionRecords: ke, updateAnimal: Ae, deleteAnimal: je, errors: Me, loadings: Ne, refetch: Pe } = ue(), { t: x } = fe(), Fe = ie(), { animalId: S } = Ce(), C = Se(), { buildPath: w } = ee(), [T, E] = o("overview"), [Ie, D] = o(!1), [O, k] = o(!1), { toasts: Le, toast: A, dismiss: Re } = ce(), j = v.find((e) => e.id === S), [M, N] = o(""), [P, F] = o(""), [I, L] = o(""), [R, z] = o(""), [B, V] = o(""), [H, U] = o(""), [W, ze] = o(""), [Be, Ve] = o(""), [G, He] = o(""), [K, Ue] = o(""), [q, We] = o(""), [Ge, Ke] = o([]), qe = () => {
46
+ j && (N(j.name), F(j.type), L(j.breed), z(j.gender), V(j.healthStatus), U(j.tagNumber), ze(String(j.vaccinations ?? 0)), Ve(String(j.weight ?? 0)), He(j.dateOfBirth ?? ""), Ue(j.lastCheckup ?? ""), We(j.productionType ?? ""), Ke(j.imageIds ?? []), D(!0));
46
47
  }, Je = async () => {
47
- if (P) {
48
- if (!F.trim() || !H.trim()) {
49
- N({
50
- title: T("healthybowl.livestock.animalDetails.toast.missingFields.title", "Missing required fields"),
51
- description: T("healthybowl.livestock.animalDetails.toast.missingFields.description", "Name and tag number are required."),
48
+ if (j) {
49
+ if (!M.trim() || !H.trim()) {
50
+ A({
51
+ title: x("healthybowl.livestock.animalDetails.toast.missingFields.title", "Missing required fields"),
52
+ description: x("healthybowl.livestock.animalDetails.toast.missingFields.description", "Name and tag number are required."),
52
53
  variant: "warning"
53
54
  });
54
55
  return;
55
56
  }
56
- M(!0);
57
+ k(!0);
57
58
  try {
58
- await Te({
59
- id: P.id,
60
- name: F.trim(),
61
- type: L.trim() || "unknown",
62
- breed: z.trim() || "Unknown",
63
- gender: V.trim() || "unknown",
64
- healthStatus: Ie.trim() || "healthy",
59
+ await Ae({
60
+ id: j.id,
61
+ name: M.trim(),
62
+ type: P.trim() || "unknown",
63
+ breed: I.trim() || "Unknown",
64
+ gender: R.trim() || "unknown",
65
+ healthStatus: B.trim() || "healthy",
65
66
  tagNumber: H.trim(),
66
- vaccinations: Number(ze) || 0,
67
- weight: Number(Ve) || 0,
67
+ vaccinations: Number(W) || 0,
68
+ weight: Number(Be) || 0,
68
69
  imageIds: Ge,
69
- ...U ? { dateOfBirth: U } : {},
70
- ...W ? { lastCheckup: W } : {},
71
- ...G.trim() ? { productionType: G.trim() } : {}
72
- }), N({
73
- title: T("healthybowl.livestock.animalDetails.toast.updated.title", "Animal updated"),
74
- description: T("healthybowl.livestock.animalDetails.toast.updated.description", "{{name}} has been saved.", { name: F.trim() }),
70
+ ...G ? { dateOfBirth: G } : {},
71
+ ...K ? { lastCheckup: K } : {},
72
+ ...q.trim() ? { productionType: q.trim() } : {}
73
+ }), A({
74
+ title: x("healthybowl.livestock.animalDetails.toast.updated.title", "Animal updated"),
75
+ description: x("healthybowl.livestock.animalDetails.toast.updated.description", "{{name}} has been saved.", { name: M.trim() }),
75
76
  variant: "success"
76
- }), A(!1);
77
+ }), D(!1);
77
78
  } catch (e) {
78
- N({
79
- title: T("healthybowl.livestock.animalDetails.toast.updateFailed.title", "Update failed"),
79
+ A({
80
+ title: x("healthybowl.livestock.animalDetails.toast.updateFailed.title", "Update failed"),
80
81
  description: String(e),
81
82
  variant: "error"
82
83
  });
83
84
  } finally {
84
- M(!1);
85
+ k(!1);
85
86
  }
86
87
  }
87
88
  }, Ye = async () => {
88
- if (P && await Ae({
89
- title: T("healthybowl.livestock.animalDetails.confirmDelete.title", "Delete animal?"),
90
- message: T("healthybowl.livestock.animalDetails.confirmDelete.message", "{{name}} ({{tagNumber}}) will be permanently removed.", {
91
- name: P.name,
92
- tagNumber: P.tagNumber
89
+ if (j && await Fe({
90
+ title: x("healthybowl.livestock.animalDetails.confirmDelete.title", "Delete animal?"),
91
+ message: x("healthybowl.livestock.animalDetails.confirmDelete.message", "{{name}} ({{tagNumber}}) will be permanently removed.", {
92
+ name: j.name,
93
+ tagNumber: j.tagNumber
93
94
  }),
94
- okButtonTitle: T("healthybowl.common.delete", "Delete"),
95
- cancelButtonTitle: T("healthybowl.common.cancel", "Cancel")
95
+ okButtonTitle: x("healthybowl.common.delete", "Delete"),
96
+ cancelButtonTitle: x("healthybowl.common.cancel", "Cancel")
96
97
  }) !== !1) {
97
- M(!0);
98
+ k(!0);
98
99
  try {
99
- await Ee(P.id), N({
100
- title: T("healthybowl.livestock.animalDetails.toast.deleted.title", "Animal deleted"),
101
- description: T("healthybowl.livestock.animalDetails.toast.deleted.description", "{{name}} has been removed.", { name: P.name }),
100
+ await je(j.id), A({
101
+ title: x("healthybowl.livestock.animalDetails.toast.deleted.title", "Animal deleted"),
102
+ description: x("healthybowl.livestock.animalDetails.toast.deleted.description", "{{name}} has been removed.", { name: j.name }),
102
103
  variant: "success"
103
- }), E(D("livestock/animals"));
104
+ }), C(w("livestock/animals"));
104
105
  } catch (e) {
105
- N({
106
- title: T("healthybowl.livestock.animalDetails.toast.deleteFailed.title", "Delete failed"),
106
+ A({
107
+ title: x("healthybowl.livestock.animalDetails.toast.deleteFailed.title", "Delete failed"),
107
108
  description: String(e),
108
109
  variant: "error"
109
- }), M(!1);
110
+ }), k(!1);
110
111
  }
111
112
  }
112
- }, q = o(() => P ? x.filter((e) => e.animalId === P.id) : [], [x, P]), J = o(() => P ? S.filter((e) => e.animalId === P.id) : [], [S, P]), Y = o(() => P ? C.filter((e) => e.femaleId === P.id || e.maleId === P.id) : [], [C, P]), X = o(() => P ? w.filter((e) => e.animalId === P.id) : [], [w, P]), Z = X.filter((e) => e.type === "milk"), Xe = Z.length > 0 ? Z.reduce((e, t) => e + t.quantity, 0) / Z.length : 0, Ze = q.length > 0 ? Math.max(0, 100 - q.filter((e) => e.status === "active" || e.status === "monitoring").length * 15) : 100, Q = X.length > 0 ? X[0] : null, Qe = o(() => [
113
+ }, J = a(() => j ? y.filter((e) => e.animalId === j.id) : [], [y, j]), Y = a(() => j ? b.filter((e) => e.animalId === j.id) : [], [b, j]), X = a(() => j ? Oe.filter((e) => e.femaleId === j.id || e.maleId === j.id) : [], [Oe, j]), Z = a(() => j ? ke.filter((e) => e.animalId === j.id) : [], [ke, j]), Q = Z.filter((e) => e.type === "milk"), Xe = Q.length > 0 ? Q.reduce((e, t) => e + t.quantity, 0) / Q.length : 0, Ze = J.length > 0 ? Math.max(0, 100 - J.filter((e) => e.status === "active" || e.status === "monitoring").length * 15) : 100, $ = Z.length > 0 ? Z[0] : null, Qe = a(() => [
113
114
  {
114
115
  key: "date",
115
- header: T("healthybowl.livestock.animalDetails.production.table.date", "Date"),
116
+ header: x("healthybowl.livestock.animalDetails.production.table.date", "Date"),
116
117
  cell: (t) => e(t.date),
117
118
  priority: "primary"
118
119
  },
119
120
  {
120
121
  key: "type",
121
- header: T("healthybowl.livestock.animalDetails.production.table.type", "Type"),
122
- cell: (e) => /* @__PURE__ */ d("span", {
122
+ header: x("healthybowl.livestock.animalDetails.production.table.type", "Type"),
123
+ cell: (e) => /* @__PURE__ */ u("span", {
123
124
  className: "capitalize",
124
125
  children: e.type
125
126
  }),
@@ -127,8 +128,8 @@ var y = (e) => {
127
128
  },
128
129
  {
129
130
  key: "quantity",
130
- header: T("healthybowl.livestock.animalDetails.production.table.quantity", "Quantity"),
131
- cell: (e) => /* @__PURE__ */ f("span", {
131
+ header: x("healthybowl.livestock.animalDetails.production.table.quantity", "Quantity"),
132
+ cell: (e) => /* @__PURE__ */ d("span", {
132
133
  className: "tabular-nums",
133
134
  children: [
134
135
  e.quantity,
@@ -142,115 +143,115 @@ var y = (e) => {
142
143
  },
143
144
  {
144
145
  key: "quality",
145
- header: T("healthybowl.livestock.animalDetails.production.table.quality", "Quality"),
146
- cell: (e) => /* @__PURE__ */ d(i, {
146
+ header: x("healthybowl.livestock.animalDetails.production.table.quality", "Quality"),
147
+ cell: (e) => /* @__PURE__ */ u(i, {
147
148
  label: (e.quality ?? "").replace("_", " "),
148
149
  variant: e.quality === "premium" ? "success" : e.quality === "standard" ? "info" : "warning"
149
150
  }),
150
151
  priority: "secondary"
151
152
  }
152
- ], [T]), $ = o(() => {
153
+ ], [x]), $e = a(() => {
153
154
  let e = [];
154
- for (let t of q) e.push({
155
+ for (let t of J) e.push({
155
156
  id: t.id,
156
157
  date: t.date,
157
158
  category: "Health",
158
- categoryLabel: T("healthybowl.livestock.animalDetails.timeline.category.health", "Health"),
159
+ categoryLabel: x("healthybowl.livestock.animalDetails.timeline.category.health", "Health"),
159
160
  title: `${t.type} - ${t.diagnosis}`,
160
161
  detail: t.veterinarian
161
162
  });
162
- for (let t of J) e.push({
163
+ for (let t of Y) e.push({
163
164
  id: t.id,
164
165
  date: t.administrationDate,
165
166
  category: "Vaccination",
166
- categoryLabel: T("healthybowl.livestock.animalDetails.timeline.category.vaccination", "Vaccination"),
167
+ categoryLabel: x("healthybowl.livestock.animalDetails.timeline.category.vaccination", "Vaccination"),
167
168
  title: t.vaccineName,
168
169
  detail: t.veterinarian
169
170
  });
170
- for (let t of X) e.push({
171
+ for (let t of Z) e.push({
171
172
  id: t.id,
172
173
  date: t.date,
173
174
  category: "Production",
174
- categoryLabel: T("healthybowl.livestock.animalDetails.timeline.category.production", "Production"),
175
+ categoryLabel: x("healthybowl.livestock.animalDetails.timeline.category.production", "Production"),
175
176
  title: `${t.type} - ${t.quantity} ${t.unit}`,
176
177
  detail: t.quality
177
178
  });
178
179
  return e.sort((e, t) => new Date(t.date).getTime() - new Date(e.date).getTime()), e;
179
180
  }, [
180
- q,
181
181
  J,
182
- X,
183
- T
182
+ Y,
183
+ Z,
184
+ x
184
185
  ]);
185
- if (!P) return /* @__PURE__ */ d(n, {
186
- title: T("healthybowl.livestock.animalDetails.notFound.pageTitle", "Animal Not Found"),
187
- children: Oe.livestock ? /* @__PURE__ */ d(ae, {}) : De.livestock ? /* @__PURE__ */ d(ne, { onRetry: ke }) : /* @__PURE__ */ d(te, {
188
- title: T("healthybowl.livestock.animalDetails.notFound.title", "Animal not found"),
189
- description: T("healthybowl.livestock.animalDetails.notFound.description", "The animal you are looking for does not exist."),
190
- action: /* @__PURE__ */ d(p, {
191
- onClick: () => E(D("livestock/animals")),
192
- children: T("healthybowl.livestock.animalDetails.notFound.backToRegistry", "Back to Registry")
186
+ if (!j) return /* @__PURE__ */ u(n, {
187
+ title: x("healthybowl.livestock.animalDetails.notFound.pageTitle", "Animal Not Found"),
188
+ children: Ne.livestock ? /* @__PURE__ */ u(ae, {}) : Me.livestock ? /* @__PURE__ */ u(ne, { onRetry: Pe }) : /* @__PURE__ */ u(te, {
189
+ title: x("healthybowl.livestock.animalDetails.notFound.title", "Animal not found"),
190
+ description: x("healthybowl.livestock.animalDetails.notFound.description", "The animal you are looking for does not exist."),
191
+ action: /* @__PURE__ */ u(f, {
192
+ onClick: () => C(w("livestock/animals")),
193
+ children: x("healthybowl.livestock.animalDetails.notFound.backToRegistry", "Back to Registry")
193
194
  })
194
195
  })
195
196
  });
196
- let $e = [
197
+ let et = [
197
198
  {
198
199
  id: "overview",
199
- label: T("healthybowl.livestock.animalDetails.tabs.overview", "Overview")
200
+ label: x("healthybowl.livestock.animalDetails.tabs.overview", "Overview")
200
201
  },
201
202
  {
202
203
  id: "health",
203
- label: T("healthybowl.livestock.animalDetails.tabs.health", "Health")
204
+ label: x("healthybowl.livestock.animalDetails.tabs.health", "Health")
204
205
  },
205
206
  {
206
207
  id: "breeding",
207
- label: T("healthybowl.livestock.animalDetails.tabs.breeding", "Breeding")
208
+ label: x("healthybowl.livestock.animalDetails.tabs.breeding", "Breeding")
208
209
  },
209
210
  {
210
211
  id: "production",
211
- label: T("healthybowl.livestock.animalDetails.tabs.production", "Production")
212
+ label: x("healthybowl.livestock.animalDetails.tabs.production", "Production")
212
213
  },
213
214
  {
214
215
  id: "timeline",
215
- label: T("healthybowl.livestock.animalDetails.tabs.timeline", "Timeline")
216
+ label: x("healthybowl.livestock.animalDetails.tabs.timeline", "Timeline")
216
217
  }
217
218
  ];
218
- return /* @__PURE__ */ f(n, {
219
- title: `${P.name} (${P.tagNumber})`,
220
- description: `${P.breed} ${P.type}`,
221
- actions: /* @__PURE__ */ f("div", {
219
+ return /* @__PURE__ */ d(n, {
220
+ title: `${j.name} (${j.tagNumber})`,
221
+ description: `${j.breed} ${j.type}`,
222
+ actions: /* @__PURE__ */ d("div", {
222
223
  className: "flex items-center gap-2",
223
224
  children: [
224
- /* @__PURE__ */ d(ce, {
225
+ /* @__PURE__ */ u(le, {
225
226
  entityType: "ANIMAL",
226
- entityId: P.id,
227
- entityLabel: `${P.name} (${P.tagNumber})`
227
+ entityId: j.id,
228
+ entityLabel: `${j.name} (${j.tagNumber})`
228
229
  }),
229
- /* @__PURE__ */ f(p, {
230
+ /* @__PURE__ */ d(f, {
230
231
  variant: "outline",
231
- onClick: () => E(D("livestock/animals")),
232
+ onClick: () => C(w("livestock/animals")),
232
233
  children: [
233
- /* @__PURE__ */ d(de, { className: "h-4 w-4" }),
234
+ /* @__PURE__ */ u(pe, { className: "h-4 w-4" }),
234
235
  " ",
235
- T("healthybowl.common.back", "Back")
236
+ x("healthybowl.common.back", "Back")
236
237
  ]
237
238
  }),
238
- /* @__PURE__ */ f(p, {
239
+ /* @__PURE__ */ d(f, {
239
240
  onClick: qe,
240
241
  children: [
241
- /* @__PURE__ */ d(me, { className: "h-4 w-4" }),
242
+ /* @__PURE__ */ u(ge, { className: "h-4 w-4" }),
242
243
  " ",
243
- T("healthybowl.livestock.animalDetails.actions.editDetails", "Edit Details")
244
+ x("healthybowl.livestock.animalDetails.actions.editDetails", "Edit Details")
244
245
  ]
245
246
  }),
246
- /* @__PURE__ */ f(p, {
247
+ /* @__PURE__ */ d(f, {
247
248
  variant: "destructive",
248
249
  onClick: Ye,
249
- disabled: j,
250
+ disabled: O,
250
251
  children: [
251
- /* @__PURE__ */ d(_e, { className: "h-4 w-4" }),
252
+ /* @__PURE__ */ u(ye, { className: "h-4 w-4" }),
252
253
  " ",
253
- T("healthybowl.common.delete", "Delete")
254
+ x("healthybowl.common.delete", "Delete")
254
255
  ]
255
256
  })
256
257
  ]
@@ -259,314 +260,318 @@ var y = (e) => {
259
260
  nextSteps: [
260
261
  {
261
262
  id: "health",
262
- label: T("healthybowl.livestock.animalDetails.nextSteps.health.label", "Review health records"),
263
- description: T("healthybowl.livestock.animalDetails.nextSteps.health.desc", "Check treatments, vaccinations and any concerns for this animal."),
264
- onClick: () => k("health")
263
+ label: x("healthybowl.livestock.animalDetails.nextSteps.health.label", "Review health records"),
264
+ description: x("healthybowl.livestock.animalDetails.nextSteps.health.desc", "Check treatments, vaccinations and any concerns for this animal."),
265
+ onClick: () => E("health")
265
266
  },
266
267
  {
267
268
  id: "breeding",
268
- label: T("healthybowl.livestock.animalDetails.nextSteps.breeding.label", "Check breeding history"),
269
- description: T("healthybowl.livestock.animalDetails.nextSteps.breeding.desc", "See matings, pregnancies and offspring for this animal."),
270
- onClick: () => k("breeding")
269
+ label: x("healthybowl.livestock.animalDetails.nextSteps.breeding.label", "Check breeding history"),
270
+ description: x("healthybowl.livestock.animalDetails.nextSteps.breeding.desc", "See matings, pregnancies and offspring for this animal."),
271
+ onClick: () => E("breeding")
271
272
  },
272
273
  {
273
274
  id: "production",
274
- label: T("healthybowl.livestock.animalDetails.nextSteps.production.label", "Log production output"),
275
- description: T("healthybowl.livestock.animalDetails.nextSteps.production.desc", "Record milk, eggs, wool or other output this animal produces."),
276
- onClick: () => k("production")
275
+ label: x("healthybowl.livestock.animalDetails.nextSteps.production.label", "Log production output"),
276
+ description: x("healthybowl.livestock.animalDetails.nextSteps.production.desc", "Record milk, eggs, wool or other output this animal produces."),
277
+ onClick: () => E("production")
277
278
  }
278
279
  ],
279
280
  nextStepsKey: "healthybowl-animal-detail",
280
281
  children: [
281
- /* @__PURE__ */ f("div", {
282
+ /* @__PURE__ */ d("div", {
282
283
  className: "flex flex-wrap items-center gap-3",
283
284
  children: [
284
- /* @__PURE__ */ d(i, {
285
- label: (P.healthStatus ?? "").replace("_", " "),
286
- variant: y(P.healthStatus),
285
+ /* @__PURE__ */ u(i, {
286
+ label: (j.healthStatus ?? "").replace("_", " "),
287
+ variant: Ee(j.healthStatus),
287
288
  dot: !0
288
289
  }),
289
- /* @__PURE__ */ d(i, {
290
- label: P.gender,
290
+ /* @__PURE__ */ u(i, {
291
+ label: j.gender,
291
292
  variant: "muted"
292
293
  }),
293
- P.productionType && /* @__PURE__ */ d(i, {
294
- label: P.productionType,
294
+ j.productionType && /* @__PURE__ */ u(i, {
295
+ label: j.productionType,
295
296
  variant: "info"
296
297
  })
297
298
  ]
298
299
  }),
299
- /* @__PURE__ */ d("div", {
300
+ /* @__PURE__ */ u("div", {
300
301
  className: "border-b border-border-subtle",
301
- children: /* @__PURE__ */ d("nav", {
302
+ children: /* @__PURE__ */ u("nav", {
302
303
  className: "-mb-px flex gap-6 overflow-x-auto",
303
- children: $e.map((e) => /* @__PURE__ */ d("button", {
304
+ children: et.map((e) => /* @__PURE__ */ u("button", {
304
305
  type: "button",
305
- onClick: () => k(e.id),
306
- className: `whitespace-nowrap border-b-2 py-2 px-1 text-sm font-medium ${O === e.id ? "border-primary text-primary" : "border-transparent text-text-secondary hover:text-text-primary hover:border-border-subtle"}`,
306
+ onClick: () => E(e.id),
307
+ className: `whitespace-nowrap border-b-2 py-2 px-1 text-sm font-medium ${T === e.id ? "border-primary text-primary" : "border-transparent text-text-secondary hover:text-text-primary hover:border-border-subtle"}`,
307
308
  children: e.label
308
309
  }, e.id))
309
310
  })
310
311
  }),
311
- O === "overview" && /* @__PURE__ */ f("div", {
312
+ T === "overview" && /* @__PURE__ */ d("div", {
312
313
  className: "grid grid-cols-1 gap-6 lg:grid-cols-3",
313
- children: [/* @__PURE__ */ f("div", {
314
+ children: [/* @__PURE__ */ d("div", {
314
315
  className: "lg:col-span-2 space-y-6",
315
- children: [/* @__PURE__ */ f("div", {
316
- className: "rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm",
317
- children: [
318
- /* @__PURE__ */ d("h3", {
319
- className: "mb-4 text-sm font-medium text-text-primary",
320
- children: T("healthybowl.livestock.animalDetails.basicInfo.title", "Basic Information")
321
- }),
322
- /* @__PURE__ */ f("div", {
323
- className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
324
- children: [
325
- /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("p", {
326
- className: "text-xs text-text-secondary",
327
- children: T("healthybowl.livestock.animalDetails.fields.type", "Type")
328
- }), /* @__PURE__ */ f("p", {
329
- className: "mt-1 flex items-center gap-2 text-sm font-medium capitalize text-text-primary",
330
- children: [/* @__PURE__ */ d("span", {
331
- className: "text-xl",
332
- children: we(P.type)
333
- }), P.type]
334
- })] }),
335
- /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("p", {
336
- className: "text-xs text-text-secondary",
337
- children: T("healthybowl.livestock.animalDetails.fields.breed", "Breed")
338
- }), /* @__PURE__ */ d("p", {
339
- className: "mt-1 text-sm font-medium text-text-primary",
340
- children: P.breed
341
- })] }),
342
- /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("p", {
343
- className: "text-xs text-text-secondary",
344
- children: T("healthybowl.livestock.animalDetails.fields.gender", "Gender")
345
- }), /* @__PURE__ */ d("p", {
346
- className: "mt-1 text-sm font-medium capitalize text-text-primary",
347
- children: P.gender
348
- })] }),
349
- /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("p", {
350
- className: "text-xs text-text-secondary",
351
- children: T("healthybowl.livestock.animalDetails.fields.dateOfBirth", "Date of Birth")
352
- }), /* @__PURE__ */ d("p", {
353
- className: "mt-1 text-sm font-medium text-text-primary",
354
- children: e(P.dateOfBirth)
355
- })] }),
356
- /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("p", {
357
- className: "text-xs text-text-secondary",
358
- children: T("healthybowl.livestock.animalDetails.fields.currentWeight", "Current Weight")
359
- }), /* @__PURE__ */ f("p", {
360
- className: "mt-1 text-sm font-medium text-text-primary",
361
- children: [t(P.weight ?? 0), " kg"]
362
- })] }),
363
- /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("p", {
364
- className: "text-xs text-text-secondary",
365
- children: T("healthybowl.livestock.animalDetails.fields.lastCheckup", "Last Checkup")
366
- }), /* @__PURE__ */ d("p", {
367
- className: "mt-1 text-sm font-medium text-text-primary",
368
- children: e(P.lastCheckup)
369
- })] })
370
- ]
371
- }),
372
- (P.imageIds ?? []).length > 0 && /* @__PURE__ */ f("div", {
373
- className: "mt-4",
374
- children: [/* @__PURE__ */ d("p", {
375
- className: "mb-2 text-xs text-text-secondary",
376
- children: T("healthybowl.livestock.animalDetails.fields.photos", "Photos")
377
- }), /* @__PURE__ */ d(a, {
378
- entity: "Animal",
379
- imageIds: P.imageIds ?? [],
380
- onChange: () => {},
381
- readOnly: !0
316
+ children: [
317
+ S ? /* @__PURE__ */ u(de, { animalId: S }) : null,
318
+ /* @__PURE__ */ d("div", {
319
+ className: "rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm",
320
+ children: [
321
+ /* @__PURE__ */ u("h3", {
322
+ className: "mb-4 text-sm font-medium text-text-primary",
323
+ children: x("healthybowl.livestock.animalDetails.basicInfo.title", "Basic Information")
324
+ }),
325
+ /* @__PURE__ */ d("div", {
326
+ className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
327
+ children: [
328
+ /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("p", {
329
+ className: "text-xs text-text-secondary",
330
+ children: x("healthybowl.livestock.animalDetails.fields.type", "Type")
331
+ }), /* @__PURE__ */ d("p", {
332
+ className: "mt-1 flex items-center gap-2 text-sm font-medium capitalize text-text-primary",
333
+ children: [/* @__PURE__ */ u("span", {
334
+ className: "text-xl",
335
+ children: De(j.type)
336
+ }), j.type]
337
+ })] }),
338
+ /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("p", {
339
+ className: "text-xs text-text-secondary",
340
+ children: x("healthybowl.livestock.animalDetails.fields.breed", "Breed")
341
+ }), /* @__PURE__ */ u("p", {
342
+ className: "mt-1 text-sm font-medium text-text-primary",
343
+ children: j.breed
344
+ })] }),
345
+ /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("p", {
346
+ className: "text-xs text-text-secondary",
347
+ children: x("healthybowl.livestock.animalDetails.fields.gender", "Gender")
348
+ }), /* @__PURE__ */ u("p", {
349
+ className: "mt-1 text-sm font-medium capitalize text-text-primary",
350
+ children: j.gender
351
+ })] }),
352
+ /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("p", {
353
+ className: "text-xs text-text-secondary",
354
+ children: x("healthybowl.livestock.animalDetails.fields.dateOfBirth", "Date of Birth")
355
+ }), /* @__PURE__ */ u("p", {
356
+ className: "mt-1 text-sm font-medium text-text-primary",
357
+ children: e(j.dateOfBirth)
358
+ })] }),
359
+ /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("p", {
360
+ className: "text-xs text-text-secondary",
361
+ children: x("healthybowl.livestock.animalDetails.fields.currentWeight", "Current Weight")
362
+ }), /* @__PURE__ */ d("p", {
363
+ className: "mt-1 text-sm font-medium text-text-primary",
364
+ children: [t(j.weight ?? 0), " kg"]
365
+ })] }),
366
+ /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("p", {
367
+ className: "text-xs text-text-secondary",
368
+ children: x("healthybowl.livestock.animalDetails.fields.lastCheckup", "Last Checkup")
369
+ }), /* @__PURE__ */ u("p", {
370
+ className: "mt-1 text-sm font-medium text-text-primary",
371
+ children: e(j.lastCheckup)
372
+ })] })
373
+ ]
374
+ }),
375
+ (j.imageIds ?? []).length > 0 && /* @__PURE__ */ d("div", {
376
+ className: "mt-4",
377
+ children: [/* @__PURE__ */ u("p", {
378
+ className: "mb-2 text-xs text-text-secondary",
379
+ children: x("healthybowl.livestock.animalDetails.fields.photos", "Photos")
380
+ }), /* @__PURE__ */ u(se, {
381
+ entity: "Animal",
382
+ imageIds: j.imageIds ?? [],
383
+ onChange: () => {},
384
+ readOnly: !0
385
+ })]
386
+ })
387
+ ]
388
+ }),
389
+ /* @__PURE__ */ d("div", {
390
+ className: "rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm",
391
+ children: [/* @__PURE__ */ d("div", {
392
+ className: "mb-4 flex items-center justify-between",
393
+ children: [/* @__PURE__ */ u("h3", {
394
+ className: "text-sm font-medium text-text-primary",
395
+ children: x("healthybowl.livestock.animalDetails.recentActivity.title", "Recent Activity")
396
+ }), /* @__PURE__ */ u(f, {
397
+ variant: "link",
398
+ size: "sm",
399
+ onClick: () => E("health"),
400
+ className: "text-xs",
401
+ children: x("healthybowl.livestock.animalDetails.recentActivity.viewAll", "View All")
382
402
  })]
383
- })
384
- ]
385
- }), /* @__PURE__ */ f("div", {
386
- className: "rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm",
387
- children: [/* @__PURE__ */ f("div", {
388
- className: "mb-4 flex items-center justify-between",
389
- children: [/* @__PURE__ */ d("h3", {
390
- className: "text-sm font-medium text-text-primary",
391
- children: T("healthybowl.livestock.animalDetails.recentActivity.title", "Recent Activity")
392
- }), /* @__PURE__ */ d(p, {
393
- variant: "link",
394
- size: "sm",
395
- onClick: () => k("health"),
396
- className: "text-xs",
397
- children: T("healthybowl.livestock.animalDetails.recentActivity.viewAll", "View All")
398
- })]
399
- }), q.length > 0 ? /* @__PURE__ */ d("div", {
400
- className: "flex flex-col gap-3",
401
- children: q.map((t) => /* @__PURE__ */ f("div", {
402
- className: "flex items-center justify-between rounded-md border border-border-subtle p-3",
403
- children: [/* @__PURE__ */ f("div", {
404
- className: "flex items-center gap-3",
403
+ }), J.length > 0 ? /* @__PURE__ */ u("div", {
404
+ className: "flex flex-col gap-3",
405
+ children: J.map((t) => /* @__PURE__ */ d("div", {
406
+ className: "flex items-center justify-between rounded-md border border-border-subtle p-3",
405
407
  children: [/* @__PURE__ */ d("div", {
406
- className: "rounded-full bg-bg-sunken p-2",
407
- children: /* @__PURE__ */ d(c, { className: "h-4 w-4 text-text-secondary" })
408
- }), /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ f("p", {
409
- className: "text-sm font-medium text-text-primary",
410
- children: [
411
- t.type,
412
- " - ",
413
- t.diagnosis
414
- ]
415
- }), /* @__PURE__ */ f("p", {
416
- className: "text-xs text-text-secondary",
417
- children: [
418
- e(t.date),
419
- " · ",
420
- t.veterinarian
421
- ]
422
- })] })]
423
- }), /* @__PURE__ */ d(pe, { className: "h-4 w-4 text-text-secondary" })]
424
- }, t.id))
425
- }) : /* @__PURE__ */ d("p", {
426
- className: "py-4 text-center text-sm text-text-secondary",
427
- children: T("healthybowl.livestock.animalDetails.recentActivity.empty", "No recent activity")
428
- })]
429
- })]
430
- }), /* @__PURE__ */ f("div", {
408
+ className: "flex items-center gap-3",
409
+ children: [/* @__PURE__ */ u("div", {
410
+ className: "rounded-full bg-bg-sunken p-2",
411
+ children: /* @__PURE__ */ u(s, { className: "h-4 w-4 text-text-secondary" })
412
+ }), /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ d("p", {
413
+ className: "text-sm font-medium text-text-primary",
414
+ children: [
415
+ t.type,
416
+ " - ",
417
+ t.diagnosis
418
+ ]
419
+ }), /* @__PURE__ */ d("p", {
420
+ className: "text-xs text-text-secondary",
421
+ children: [
422
+ e(t.date),
423
+ " · ",
424
+ t.veterinarian
425
+ ]
426
+ })] })]
427
+ }), /* @__PURE__ */ u(he, { className: "h-4 w-4 text-text-secondary" })]
428
+ }, t.id))
429
+ }) : /* @__PURE__ */ u("p", {
430
+ className: "py-4 text-center text-sm text-text-secondary",
431
+ children: x("healthybowl.livestock.animalDetails.recentActivity.empty", "No recent activity")
432
+ })]
433
+ })
434
+ ]
435
+ }), /* @__PURE__ */ d("div", {
431
436
  className: "space-y-6",
432
- children: [/* @__PURE__ */ f("div", {
437
+ children: [/* @__PURE__ */ d("div", {
433
438
  className: "rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm",
434
- children: [/* @__PURE__ */ d("h3", {
439
+ children: [/* @__PURE__ */ u("h3", {
435
440
  className: "mb-4 text-sm font-medium text-text-primary",
436
- children: T("healthybowl.livestock.animalDetails.quickStats.title", "Quick Stats")
437
- }), /* @__PURE__ */ f("div", {
441
+ children: x("healthybowl.livestock.animalDetails.quickStats.title", "Quick Stats")
442
+ }), /* @__PURE__ */ d("div", {
438
443
  className: "space-y-4",
439
444
  children: [
440
- /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("p", {
445
+ /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("p", {
441
446
  className: "text-xs text-text-secondary",
442
- children: T("healthybowl.livestock.animalDetails.quickStats.avgDailyMilk", "Average Daily Milk")
443
- }), /* @__PURE__ */ f("p", {
447
+ children: x("healthybowl.livestock.animalDetails.quickStats.avgDailyMilk", "Average Daily Milk")
448
+ }), /* @__PURE__ */ d("p", {
444
449
  className: "text-xl font-bold text-text-primary",
445
450
  children: [Xe.toFixed(1), " L"]
446
451
  })] }),
447
- /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("p", {
452
+ /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("p", {
448
453
  className: "text-xs text-text-secondary",
449
- children: T("healthybowl.livestock.animalDetails.quickStats.totalVaccinations", "Total Vaccinations")
450
- }), /* @__PURE__ */ d("p", {
454
+ children: x("healthybowl.livestock.animalDetails.quickStats.totalVaccinations", "Total Vaccinations")
455
+ }), /* @__PURE__ */ u("p", {
451
456
  className: "text-xl font-bold text-text-primary",
452
- children: J.length
457
+ children: Y.length
453
458
  })] }),
454
- /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("p", {
459
+ /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("p", {
455
460
  className: "text-xs text-text-secondary",
456
- children: T("healthybowl.livestock.animalDetails.quickStats.breedingRecords", "Breeding Records")
457
- }), /* @__PURE__ */ d("p", {
461
+ children: x("healthybowl.livestock.animalDetails.quickStats.breedingRecords", "Breeding Records")
462
+ }), /* @__PURE__ */ u("p", {
458
463
  className: "text-xl font-bold text-text-primary",
459
- children: Y.length
464
+ children: X.length
460
465
  })] }),
461
- /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("p", {
466
+ /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("p", {
462
467
  className: "text-xs text-text-secondary",
463
- children: T("healthybowl.livestock.animalDetails.quickStats.healthScore", "Health Score")
464
- }), /* @__PURE__ */ f("div", {
468
+ children: x("healthybowl.livestock.animalDetails.quickStats.healthScore", "Health Score")
469
+ }), /* @__PURE__ */ d("div", {
465
470
  className: "mt-1",
466
- children: [/* @__PURE__ */ d("div", {
471
+ children: [/* @__PURE__ */ u("div", {
467
472
  className: "h-2 w-full rounded-full bg-bg-sunken",
468
- children: /* @__PURE__ */ d("div", {
473
+ children: /* @__PURE__ */ u("div", {
469
474
  className: "h-2 rounded-full bg-action-primary-bg",
470
475
  style: { width: `${Ze}%` }
471
476
  })
472
- }), /* @__PURE__ */ f("p", {
477
+ }), /* @__PURE__ */ d("p", {
473
478
  className: "mt-1 text-xs text-text-secondary",
474
479
  children: [Ze, "/100"]
475
480
  })]
476
481
  })] })
477
482
  ]
478
483
  })]
479
- }), /* @__PURE__ */ f("div", {
484
+ }), /* @__PURE__ */ d("div", {
480
485
  className: "rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm",
481
- children: [/* @__PURE__ */ d("h3", {
486
+ children: [/* @__PURE__ */ u("h3", {
482
487
  className: "mb-4 text-sm font-medium text-text-primary",
483
- children: T("healthybowl.livestock.animalDetails.quickActions.title", "Quick Actions")
484
- }), /* @__PURE__ */ d("div", {
488
+ children: x("healthybowl.livestock.animalDetails.quickActions.title", "Quick Actions")
489
+ }), /* @__PURE__ */ u("div", {
485
490
  className: "flex flex-col gap-2",
486
491
  children: [
487
492
  {
488
493
  id: "recordHealthCheck",
489
- label: T("healthybowl.livestock.animalDetails.quickActions.recordHealthCheck", "Record Health Check"),
490
- icon: c,
494
+ label: x("healthybowl.livestock.animalDetails.quickActions.recordHealthCheck", "Record Health Check"),
495
+ icon: s,
491
496
  path: "livestock/health"
492
497
  },
493
498
  {
494
499
  id: "addVaccination",
495
- label: T("healthybowl.livestock.animalDetails.quickActions.addVaccination", "Add Vaccination"),
496
- icon: ge,
500
+ label: x("healthybowl.livestock.animalDetails.quickActions.addVaccination", "Add Vaccination"),
501
+ icon: ve,
497
502
  path: "livestock/vaccinations"
498
503
  },
499
504
  {
500
505
  id: "updateWeight",
501
- label: T("healthybowl.livestock.animalDetails.quickActions.updateWeight", "Update Weight"),
502
- icon: ye,
503
- path: `livestock/animals/${P.id}`
506
+ label: x("healthybowl.livestock.animalDetails.quickActions.updateWeight", "Update Weight"),
507
+ icon: xe,
508
+ path: `livestock/animals/${j.id}`
504
509
  },
505
510
  {
506
511
  id: "recordProduction",
507
- label: T("healthybowl.livestock.animalDetails.quickActions.recordProduction", "Record Production"),
508
- icon: l,
512
+ label: x("healthybowl.livestock.animalDetails.quickActions.recordProduction", "Record Production"),
513
+ icon: c,
509
514
  path: "livestock/production"
510
515
  }
511
- ].map((e) => /* @__PURE__ */ f(p, {
516
+ ].map((e) => /* @__PURE__ */ d(f, {
512
517
  variant: "outline",
513
- onClick: () => E(D(e.path)),
518
+ onClick: () => C(w(e.path)),
514
519
  className: "justify-start",
515
- children: [/* @__PURE__ */ d(e.icon, { className: "h-4 w-4 text-text-secondary" }), e.label]
520
+ children: [/* @__PURE__ */ u(e.icon, { className: "h-4 w-4 text-text-secondary" }), e.label]
516
521
  }, e.id))
517
522
  })]
518
523
  })]
519
524
  })]
520
525
  }),
521
- O === "health" && /* @__PURE__ */ f("div", {
526
+ T === "health" && /* @__PURE__ */ d("div", {
522
527
  className: "grid grid-cols-1 gap-6 lg:grid-cols-3",
523
- children: [/* @__PURE__ */ f("div", {
528
+ children: [/* @__PURE__ */ d("div", {
524
529
  className: "lg:col-span-2 space-y-6",
525
- children: [/* @__PURE__ */ f("div", {
530
+ children: [/* @__PURE__ */ d("div", {
526
531
  className: "rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm",
527
- children: [/* @__PURE__ */ f("div", {
532
+ children: [/* @__PURE__ */ d("div", {
528
533
  className: "mb-4 flex items-center justify-between",
529
- children: [/* @__PURE__ */ d("h3", {
534
+ children: [/* @__PURE__ */ u("h3", {
530
535
  className: "text-sm font-medium text-text-primary",
531
- children: T("healthybowl.livestock.animalDetails.healthRecords.title", "Health Records")
532
- }), /* @__PURE__ */ f(p, {
536
+ children: x("healthybowl.livestock.animalDetails.healthRecords.title", "Health Records")
537
+ }), /* @__PURE__ */ d(f, {
533
538
  size: "sm",
534
- onClick: () => E(D("livestock/health")),
539
+ onClick: () => C(w("livestock/health")),
535
540
  className: "text-xs",
536
541
  children: [
537
- /* @__PURE__ */ d(u, { className: "h-3.5 w-3.5" }),
542
+ /* @__PURE__ */ u(l, { className: "h-3.5 w-3.5" }),
538
543
  " ",
539
- T("healthybowl.livestock.animalDetails.healthRecords.add", "Add Record")
544
+ x("healthybowl.livestock.animalDetails.healthRecords.add", "Add Record")
540
545
  ]
541
546
  })]
542
- }), q.length > 0 ? /* @__PURE__ */ d("div", {
547
+ }), J.length > 0 ? /* @__PURE__ */ u("div", {
543
548
  className: "flex flex-col gap-3",
544
- children: q.map((t) => /* @__PURE__ */ d("div", {
549
+ children: J.map((t) => /* @__PURE__ */ u("div", {
545
550
  className: "rounded-lg border border-border-subtle p-4",
546
- children: /* @__PURE__ */ d("div", {
551
+ children: /* @__PURE__ */ u("div", {
547
552
  className: "flex items-start justify-between",
548
- children: /* @__PURE__ */ f("div", {
553
+ children: /* @__PURE__ */ d("div", {
549
554
  className: "space-y-1.5",
550
555
  children: [
551
- /* @__PURE__ */ f("div", {
556
+ /* @__PURE__ */ d("div", {
552
557
  className: "flex items-center gap-2",
553
- children: [/* @__PURE__ */ d(i, {
558
+ children: [/* @__PURE__ */ u(i, {
554
559
  label: t.type,
555
560
  variant: "info"
556
- }), /* @__PURE__ */ d(i, {
561
+ }), /* @__PURE__ */ u(i, {
557
562
  label: t.status,
558
563
  variant: t.status === "resolved" ? "success" : t.status === "active" ? "warning" : "info"
559
564
  })]
560
565
  }),
561
- /* @__PURE__ */ d("p", {
566
+ /* @__PURE__ */ u("p", {
562
567
  className: "text-sm font-medium text-text-primary",
563
568
  children: t.diagnosis
564
569
  }),
565
- t.treatment && /* @__PURE__ */ d("p", {
570
+ t.treatment && /* @__PURE__ */ u("p", {
566
571
  className: "text-xs text-text-secondary",
567
- children: T("healthybowl.livestock.animalDetails.healthRecords.treatment", "Treatment: {{treatment}}", { treatment: t.treatment })
572
+ children: x("healthybowl.livestock.animalDetails.healthRecords.treatment", "Treatment: {{treatment}}", { treatment: t.treatment })
568
573
  }),
569
- /* @__PURE__ */ f("p", {
574
+ /* @__PURE__ */ d("p", {
570
575
  className: "text-xs text-text-secondary",
571
576
  children: [
572
577
  e(t.date),
@@ -578,255 +583,255 @@ var y = (e) => {
578
583
  })
579
584
  })
580
585
  }, t.id))
581
- }) : /* @__PURE__ */ d("p", {
586
+ }) : /* @__PURE__ */ u("p", {
582
587
  className: "py-4 text-center text-sm text-text-secondary",
583
- children: T("healthybowl.livestock.animalDetails.healthRecords.empty", "No health records")
588
+ children: x("healthybowl.livestock.animalDetails.healthRecords.empty", "No health records")
584
589
  })]
585
- }), /* @__PURE__ */ f("div", {
590
+ }), /* @__PURE__ */ d("div", {
586
591
  className: "rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm",
587
- children: [/* @__PURE__ */ f("div", {
592
+ children: [/* @__PURE__ */ d("div", {
588
593
  className: "mb-4 flex items-center justify-between",
589
- children: [/* @__PURE__ */ d("h3", {
594
+ children: [/* @__PURE__ */ u("h3", {
590
595
  className: "text-sm font-medium text-text-primary",
591
- children: T("healthybowl.livestock.animalDetails.vaccinations.title", "Vaccination History")
592
- }), /* @__PURE__ */ f(p, {
596
+ children: x("healthybowl.livestock.animalDetails.vaccinations.title", "Vaccination History")
597
+ }), /* @__PURE__ */ d(f, {
593
598
  variant: "outline",
594
599
  size: "sm",
595
- onClick: () => E(D("livestock/vaccinations")),
600
+ onClick: () => C(w("livestock/vaccinations")),
596
601
  className: "text-xs",
597
602
  children: [
598
- /* @__PURE__ */ d(fe, { className: "h-3.5 w-3.5" }),
603
+ /* @__PURE__ */ u(me, { className: "h-3.5 w-3.5" }),
599
604
  " ",
600
- T("healthybowl.livestock.animalDetails.vaccinations.schedule", "Schedule")
605
+ x("healthybowl.livestock.animalDetails.vaccinations.schedule", "Schedule")
601
606
  ]
602
607
  })]
603
- }), J.length > 0 ? /* @__PURE__ */ d("div", {
608
+ }), Y.length > 0 ? /* @__PURE__ */ u("div", {
604
609
  className: "flex flex-col gap-3",
605
- children: J.map((t) => /* @__PURE__ */ f("div", {
610
+ children: Y.map((t) => /* @__PURE__ */ d("div", {
606
611
  className: "flex items-center justify-between border-b border-border-subtle pb-3 last:border-0 last:pb-0",
607
- children: [/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("p", {
612
+ children: [/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("p", {
608
613
  className: "text-sm font-medium text-text-primary",
609
614
  children: t.vaccineName
610
- }), /* @__PURE__ */ d("p", {
615
+ }), /* @__PURE__ */ u("p", {
611
616
  className: "text-xs text-text-secondary",
612
- children: T("healthybowl.livestock.animalDetails.vaccinations.givenOn", "Given on {{date}}", { date: e(t.administrationDate) })
613
- })] }), /* @__PURE__ */ f("div", {
617
+ children: x("healthybowl.livestock.animalDetails.vaccinations.givenOn", "Given on {{date}}", { date: e(t.administrationDate) })
618
+ })] }), /* @__PURE__ */ d("div", {
614
619
  className: "text-right",
615
- children: [/* @__PURE__ */ d("p", {
620
+ children: [/* @__PURE__ */ u("p", {
616
621
  className: "text-xs text-text-secondary",
617
- children: T("healthybowl.livestock.animalDetails.vaccinations.nextDue", "Next due")
618
- }), /* @__PURE__ */ d("p", {
622
+ children: x("healthybowl.livestock.animalDetails.vaccinations.nextDue", "Next due")
623
+ }), /* @__PURE__ */ u("p", {
619
624
  className: "text-sm font-medium text-text-primary",
620
625
  children: e(t.nextDueDate)
621
626
  })]
622
627
  })]
623
628
  }, t.id))
624
- }) : /* @__PURE__ */ d("p", {
629
+ }) : /* @__PURE__ */ u("p", {
625
630
  className: "py-4 text-center text-sm text-text-secondary",
626
- children: T("healthybowl.livestock.animalDetails.vaccinations.empty", "No vaccination records")
631
+ children: x("healthybowl.livestock.animalDetails.vaccinations.empty", "No vaccination records")
627
632
  })]
628
633
  })]
629
- }), /* @__PURE__ */ d("div", {
634
+ }), /* @__PURE__ */ u("div", {
630
635
  className: "space-y-6",
631
- children: /* @__PURE__ */ f("div", {
636
+ children: /* @__PURE__ */ d("div", {
632
637
  className: "rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm",
633
- children: [/* @__PURE__ */ d("h3", {
638
+ children: [/* @__PURE__ */ u("h3", {
634
639
  className: "mb-4 text-sm font-medium text-text-primary",
635
- children: T("healthybowl.livestock.animalDetails.healthSummary.title", "Health Summary")
636
- }), /* @__PURE__ */ f("div", {
640
+ children: x("healthybowl.livestock.animalDetails.healthSummary.title", "Health Summary")
641
+ }), /* @__PURE__ */ d("div", {
637
642
  className: "space-y-4",
638
643
  children: [
639
- /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("p", {
644
+ /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("p", {
640
645
  className: "text-xs text-text-secondary",
641
- children: T("healthybowl.livestock.animalDetails.healthSummary.currentStatus", "Current Status")
642
- }), /* @__PURE__ */ d("div", {
646
+ children: x("healthybowl.livestock.animalDetails.healthSummary.currentStatus", "Current Status")
647
+ }), /* @__PURE__ */ u("div", {
643
648
  className: "mt-1",
644
- children: /* @__PURE__ */ d(i, {
645
- label: (P.healthStatus ?? "").replace("_", " "),
646
- variant: y(P.healthStatus),
649
+ children: /* @__PURE__ */ u(i, {
650
+ label: (j.healthStatus ?? "").replace("_", " "),
651
+ variant: Ee(j.healthStatus),
647
652
  dot: !0
648
653
  })
649
654
  })] }),
650
- /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("p", {
655
+ /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("p", {
651
656
  className: "text-xs text-text-secondary",
652
- children: T("healthybowl.livestock.animalDetails.fields.lastCheckup", "Last Checkup")
653
- }), /* @__PURE__ */ d("p", {
657
+ children: x("healthybowl.livestock.animalDetails.fields.lastCheckup", "Last Checkup")
658
+ }), /* @__PURE__ */ u("p", {
654
659
  className: "text-sm font-medium text-text-primary",
655
- children: e(P.lastCheckup)
660
+ children: e(j.lastCheckup)
656
661
  })] }),
657
- /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("p", {
662
+ /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("p", {
658
663
  className: "text-xs text-text-secondary",
659
- children: T("healthybowl.livestock.animalDetails.healthSummary.nextVaccination", "Next Vaccination")
660
- }), /* @__PURE__ */ d("p", {
664
+ children: x("healthybowl.livestock.animalDetails.healthSummary.nextVaccination", "Next Vaccination")
665
+ }), /* @__PURE__ */ u("p", {
661
666
  className: "text-sm font-medium text-text-primary",
662
- children: J.find((e) => e.status === "scheduled") ? `${J.find((e) => e.status === "scheduled").vaccineName} - ${e(J.find((e) => e.status === "scheduled").nextDueDate)}` : T("healthybowl.livestock.animalDetails.healthSummary.noneScheduled", "None scheduled")
667
+ children: Y.find((e) => e.status === "scheduled") ? `${Y.find((e) => e.status === "scheduled").vaccineName} - ${e(Y.find((e) => e.status === "scheduled").nextDueDate)}` : x("healthybowl.livestock.animalDetails.healthSummary.noneScheduled", "None scheduled")
663
668
  })] }),
664
- /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("p", {
669
+ /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("p", {
665
670
  className: "text-xs text-text-secondary",
666
- children: T("healthybowl.livestock.animalDetails.quickStats.totalVaccinations", "Total Vaccinations")
667
- }), /* @__PURE__ */ d("p", {
671
+ children: x("healthybowl.livestock.animalDetails.quickStats.totalVaccinations", "Total Vaccinations")
672
+ }), /* @__PURE__ */ u("p", {
668
673
  className: "text-xl font-bold text-text-primary",
669
- children: P.vaccinations ?? 0
674
+ children: j.vaccinations ?? 0
670
675
  })] })
671
676
  ]
672
677
  })]
673
678
  })
674
679
  })]
675
680
  }),
676
- O === "breeding" && /* @__PURE__ */ d("div", {
681
+ T === "breeding" && /* @__PURE__ */ u("div", {
677
682
  className: "space-y-6",
678
- children: /* @__PURE__ */ f("div", {
683
+ children: /* @__PURE__ */ d("div", {
679
684
  className: "rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm",
680
- children: [/* @__PURE__ */ f("div", {
685
+ children: [/* @__PURE__ */ d("div", {
681
686
  className: "mb-4 flex items-center justify-between",
682
- children: [/* @__PURE__ */ d("h3", {
687
+ children: [/* @__PURE__ */ u("h3", {
683
688
  className: "text-sm font-medium text-text-primary",
684
- children: T("healthybowl.livestock.animalDetails.breeding.title", "Breeding History")
685
- }), /* @__PURE__ */ f(p, {
689
+ children: x("healthybowl.livestock.animalDetails.breeding.title", "Breeding History")
690
+ }), /* @__PURE__ */ d(f, {
686
691
  size: "sm",
687
- onClick: () => E(D("livestock/breeding")),
692
+ onClick: () => C(w("livestock/breeding")),
688
693
  className: "text-xs",
689
694
  children: [
690
- /* @__PURE__ */ d(u, { className: "h-3.5 w-3.5" }),
695
+ /* @__PURE__ */ u(l, { className: "h-3.5 w-3.5" }),
691
696
  " ",
692
- T("healthybowl.livestock.animalDetails.healthRecords.add", "Add Record")
697
+ x("healthybowl.livestock.animalDetails.healthRecords.add", "Add Record")
693
698
  ]
694
699
  })]
695
- }), Y.length > 0 ? /* @__PURE__ */ d("div", {
700
+ }), X.length > 0 ? /* @__PURE__ */ u("div", {
696
701
  className: "flex flex-col gap-3",
697
- children: Y.map((t) => /* @__PURE__ */ d("div", {
702
+ children: X.map((t) => /* @__PURE__ */ u("div", {
698
703
  className: "rounded-lg border border-border-subtle p-4",
699
- children: /* @__PURE__ */ f("div", {
704
+ children: /* @__PURE__ */ d("div", {
700
705
  className: "grid grid-cols-1 gap-4 md:grid-cols-4",
701
706
  children: [
702
- /* @__PURE__ */ f("div", { children: [
703
- /* @__PURE__ */ d("p", {
707
+ /* @__PURE__ */ d("div", { children: [
708
+ /* @__PURE__ */ u("p", {
704
709
  className: "text-xs text-text-secondary",
705
- children: T("healthybowl.livestock.animalDetails.breeding.matingDate", "Mating Date")
710
+ children: x("healthybowl.livestock.animalDetails.breeding.matingDate", "Mating Date")
706
711
  }),
707
- /* @__PURE__ */ d("p", {
712
+ /* @__PURE__ */ u("p", {
708
713
  className: "text-sm font-medium text-text-primary",
709
714
  children: e(t.matingDate)
710
715
  }),
711
- /* @__PURE__ */ d("p", {
716
+ /* @__PURE__ */ u("p", {
712
717
  className: "text-xs capitalize text-text-secondary",
713
718
  children: t.matingType
714
719
  })
715
720
  ] }),
716
- /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("p", {
721
+ /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("p", {
717
722
  className: "text-xs text-text-secondary",
718
- children: T("healthybowl.livestock.animalDetails.breeding.female", "Female")
719
- }), /* @__PURE__ */ d("p", {
723
+ children: x("healthybowl.livestock.animalDetails.breeding.female", "Female")
724
+ }), /* @__PURE__ */ u("p", {
720
725
  className: "text-sm font-medium text-text-primary",
721
726
  children: t.femaleName
722
727
  })] }),
723
- /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("p", {
728
+ /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("p", {
724
729
  className: "text-xs text-text-secondary",
725
- children: T("healthybowl.livestock.animalDetails.breeding.male", "Male")
726
- }), /* @__PURE__ */ d("p", {
730
+ children: x("healthybowl.livestock.animalDetails.breeding.male", "Male")
731
+ }), /* @__PURE__ */ u("p", {
727
732
  className: "text-sm font-medium text-text-primary",
728
733
  children: t.maleName
729
734
  })] }),
730
- /* @__PURE__ */ f("div", { children: [
731
- /* @__PURE__ */ d("p", {
735
+ /* @__PURE__ */ d("div", { children: [
736
+ /* @__PURE__ */ u("p", {
732
737
  className: "text-xs text-text-secondary",
733
- children: T("healthybowl.livestock.animalDetails.breeding.status", "Status")
738
+ children: x("healthybowl.livestock.animalDetails.breeding.status", "Status")
734
739
  }),
735
- /* @__PURE__ */ d(i, {
740
+ /* @__PURE__ */ u(i, {
736
741
  label: t.status,
737
742
  variant: t.status === "confirmed" || t.status === "delivered" ? "success" : t.status === "failed" ? "error" : "info"
738
743
  }),
739
- t.expectedDeliveryDate && /* @__PURE__ */ d("p", {
744
+ t.expectedDeliveryDate && /* @__PURE__ */ u("p", {
740
745
  className: "mt-1 text-xs text-text-secondary",
741
- children: T("healthybowl.livestock.animalDetails.breeding.expected", "Expected: {{date}}", { date: e(t.expectedDeliveryDate) })
746
+ children: x("healthybowl.livestock.animalDetails.breeding.expected", "Expected: {{date}}", { date: e(t.expectedDeliveryDate) })
742
747
  })
743
748
  ] })
744
749
  ]
745
750
  })
746
751
  }, t.id))
747
- }) : /* @__PURE__ */ d("p", {
752
+ }) : /* @__PURE__ */ u("p", {
748
753
  className: "py-8 text-center text-sm text-text-secondary",
749
- children: T("healthybowl.livestock.animalDetails.breeding.empty", "No breeding records for this animal")
754
+ children: x("healthybowl.livestock.animalDetails.breeding.empty", "No breeding records for this animal")
750
755
  })]
751
756
  })
752
757
  }),
753
- O === "production" && /* @__PURE__ */ f("div", {
758
+ T === "production" && /* @__PURE__ */ d("div", {
754
759
  className: "space-y-6",
755
- children: [/* @__PURE__ */ f("div", {
760
+ children: [/* @__PURE__ */ d("div", {
756
761
  className: "grid grid-cols-1 gap-4 sm:grid-cols-3",
757
762
  children: [
758
- /* @__PURE__ */ d(r, {
763
+ /* @__PURE__ */ u(r, {
759
764
  hero: !0,
760
- label: T("healthybowl.livestock.animalDetails.production.stats.latest", "Latest Production"),
761
- value: Q ? Q.quantity : 0,
762
- unit: Q ? Q.unit : "",
763
- icon: /* @__PURE__ */ d(l, { className: "h-4 w-4" })
765
+ label: x("healthybowl.livestock.animalDetails.production.stats.latest", "Latest Production"),
766
+ value: $ ? $.quantity : 0,
767
+ unit: $ ? $.unit : "",
768
+ icon: /* @__PURE__ */ u(c, { className: "h-4 w-4" })
764
769
  }),
765
- /* @__PURE__ */ d(r, {
766
- label: T("healthybowl.livestock.animalDetails.production.stats.avg", "Avg Production"),
767
- value: X.length > 0 ? parseFloat((X.reduce((e, t) => e + t.quantity, 0) / X.length).toFixed(1)) : 0,
768
- unit: X.length > 0 ? X[0].unit : "",
769
- icon: /* @__PURE__ */ d(ve, { className: "h-4 w-4" })
770
+ /* @__PURE__ */ u(r, {
771
+ label: x("healthybowl.livestock.animalDetails.production.stats.avg", "Avg Production"),
772
+ value: Z.length > 0 ? parseFloat((Z.reduce((e, t) => e + t.quantity, 0) / Z.length).toFixed(1)) : 0,
773
+ unit: Z.length > 0 ? Z[0].unit : "",
774
+ icon: /* @__PURE__ */ u(be, { className: "h-4 w-4" })
770
775
  }),
771
- /* @__PURE__ */ d(r, {
772
- label: T("healthybowl.livestock.animalDetails.production.stats.totalRecords", "Total Records"),
773
- value: X.length,
774
- icon: /* @__PURE__ */ d(he, { className: "h-4 w-4" })
776
+ /* @__PURE__ */ u(r, {
777
+ label: x("healthybowl.livestock.animalDetails.production.stats.totalRecords", "Total Records"),
778
+ value: Z.length,
779
+ icon: /* @__PURE__ */ u(_e, { className: "h-4 w-4" })
775
780
  })
776
781
  ]
777
- }), /* @__PURE__ */ f("div", {
782
+ }), /* @__PURE__ */ d("div", {
778
783
  className: "rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm",
779
- children: [/* @__PURE__ */ f("div", {
784
+ children: [/* @__PURE__ */ d("div", {
780
785
  className: "mb-4 flex items-center justify-between",
781
- children: [/* @__PURE__ */ d("h3", {
786
+ children: [/* @__PURE__ */ u("h3", {
782
787
  className: "text-sm font-medium text-text-primary",
783
- children: T("healthybowl.livestock.animalDetails.production.recent.title", "Recent Production")
784
- }), /* @__PURE__ */ f(p, {
788
+ children: x("healthybowl.livestock.animalDetails.production.recent.title", "Recent Production")
789
+ }), /* @__PURE__ */ d(f, {
785
790
  size: "sm",
786
- onClick: () => E(D("livestock/production")),
791
+ onClick: () => C(w("livestock/production")),
787
792
  className: "text-xs",
788
793
  children: [
789
- /* @__PURE__ */ d(u, { className: "h-3.5 w-3.5" }),
794
+ /* @__PURE__ */ u(l, { className: "h-3.5 w-3.5" }),
790
795
  " ",
791
- T("healthybowl.livestock.animalDetails.production.recordProduction", "Record Production")
796
+ x("healthybowl.livestock.animalDetails.production.recordProduction", "Record Production")
792
797
  ]
793
798
  })]
794
- }), X.length > 0 ? /* @__PURE__ */ d(Ce, {
799
+ }), Z.length > 0 ? /* @__PURE__ */ u(Te, {
795
800
  columns: Qe,
796
- data: X,
801
+ data: Z,
797
802
  rowKey: (e) => String(e.id)
798
- }) : /* @__PURE__ */ d("p", {
803
+ }) : /* @__PURE__ */ u("p", {
799
804
  className: "py-8 text-center text-sm text-text-secondary",
800
- children: T("healthybowl.livestock.animalDetails.production.empty", "No production records for this animal")
805
+ children: x("healthybowl.livestock.animalDetails.production.empty", "No production records for this animal")
801
806
  })]
802
807
  })]
803
808
  }),
804
- O === "timeline" && /* @__PURE__ */ d("div", {
809
+ T === "timeline" && /* @__PURE__ */ u("div", {
805
810
  className: "rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm",
806
- children: $.length > 0 ? /* @__PURE__ */ f("div", {
811
+ children: $e.length > 0 ? /* @__PURE__ */ d("div", {
807
812
  className: "relative",
808
- children: [/* @__PURE__ */ d("div", { className: "absolute left-4 top-0 bottom-0 w-px bg-border" }), /* @__PURE__ */ d("div", {
813
+ children: [/* @__PURE__ */ u("div", { className: "absolute left-4 top-0 bottom-0 w-px bg-border" }), /* @__PURE__ */ u("div", {
809
814
  className: "flex flex-col gap-4",
810
- children: $.map((t) => /* @__PURE__ */ f("div", {
815
+ children: $e.map((t) => /* @__PURE__ */ d("div", {
811
816
  className: "relative flex items-start gap-4 pl-10",
812
- children: [/* @__PURE__ */ d("div", { className: `absolute left-2.5 top-1.5 h-3 w-3 rounded-full border-2 border-background ${t.category === "Health" ? "bg-status-error-bg" : t.category === "Vaccination" ? "bg-info" : "bg-success"}` }), /* @__PURE__ */ f("div", {
817
+ children: [/* @__PURE__ */ u("div", { className: `absolute left-2.5 top-1.5 h-3 w-3 rounded-full border-2 border-background ${t.category === "Health" ? "bg-status-error-bg" : t.category === "Vaccination" ? "bg-info" : "bg-success"}` }), /* @__PURE__ */ d("div", {
813
818
  className: "flex-1 rounded-md border border-border-subtle p-3",
814
819
  children: [
815
- /* @__PURE__ */ f("div", {
820
+ /* @__PURE__ */ d("div", {
816
821
  className: "flex items-center gap-2",
817
- children: [/* @__PURE__ */ d(i, {
822
+ children: [/* @__PURE__ */ u(i, {
818
823
  label: t.categoryLabel,
819
824
  variant: t.category === "Health" ? "warning" : t.category === "Vaccination" ? "info" : "success"
820
- }), /* @__PURE__ */ d("span", {
825
+ }), /* @__PURE__ */ u("span", {
821
826
  className: "text-xs text-text-secondary",
822
827
  children: e(t.date)
823
828
  })]
824
829
  }),
825
- /* @__PURE__ */ d("p", {
830
+ /* @__PURE__ */ u("p", {
826
831
  className: "mt-1 text-sm font-medium text-text-primary",
827
832
  children: t.title
828
833
  }),
829
- /* @__PURE__ */ d("p", {
834
+ /* @__PURE__ */ u("p", {
830
835
  className: "text-xs text-text-secondary",
831
836
  children: t.detail
832
837
  })
@@ -834,200 +839,200 @@ var y = (e) => {
834
839
  })]
835
840
  }, t.id))
836
841
  })]
837
- }) : /* @__PURE__ */ d("p", {
842
+ }) : /* @__PURE__ */ u("p", {
838
843
  className: "py-8 text-center text-sm text-text-secondary",
839
- children: T("healthybowl.livestock.animalDetails.timeline.empty", "No timeline records for this animal")
844
+ children: x("healthybowl.livestock.animalDetails.timeline.empty", "No timeline records for this animal")
840
845
  })
841
846
  }),
842
- /* @__PURE__ */ d(oe, {
843
- open: Me,
844
- onClose: () => A(!1),
845
- title: T("healthybowl.livestock.animalDetails.editModal.title", "Edit Animal Details"),
846
- description: T("healthybowl.livestock.animalDetails.editModal.description", "Update details for {{name}}", { name: P.name }),
847
+ /* @__PURE__ */ u(oe, {
848
+ open: Ie,
849
+ onClose: () => D(!1),
850
+ title: x("healthybowl.livestock.animalDetails.editModal.title", "Edit Animal Details"),
851
+ description: x("healthybowl.livestock.animalDetails.editModal.description", "Update details for {{name}}", { name: j.name }),
847
852
  size: "lg",
848
- footer: /* @__PURE__ */ f(Se, { children: [/* @__PURE__ */ d(p, {
853
+ footer: /* @__PURE__ */ d(we, { children: [/* @__PURE__ */ u(f, {
849
854
  variant: "outline",
850
- onClick: () => A(!1),
851
- children: T("healthybowl.common.cancel", "Cancel")
852
- }), /* @__PURE__ */ d(p, {
855
+ onClick: () => D(!1),
856
+ children: x("healthybowl.common.cancel", "Cancel")
857
+ }), /* @__PURE__ */ u(f, {
853
858
  onClick: Je,
854
- disabled: j,
855
- children: j ? T("healthybowl.common.saving", "Saving...") : T("healthybowl.livestock.animalDetails.editModal.save", "Save Changes")
859
+ disabled: O,
860
+ children: O ? x("healthybowl.common.saving", "Saving...") : x("healthybowl.livestock.animalDetails.editModal.save", "Save Changes")
856
861
  })] }),
857
- children: /* @__PURE__ */ f("div", {
862
+ children: /* @__PURE__ */ d("div", {
858
863
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
859
864
  children: [
860
- /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ f("label", {
865
+ /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ d("label", {
861
866
  className: "text-sm font-medium text-text-primary",
862
- children: [T("healthybowl.livestock.animalDetails.form.name", "Name"), " *"]
863
- }), /* @__PURE__ */ d("input", {
867
+ children: [x("healthybowl.livestock.animalDetails.form.name", "Name"), " *"]
868
+ }), /* @__PURE__ */ u("input", {
864
869
  type: "text",
865
- value: F,
866
- onChange: (e) => I(e.target.value),
870
+ value: M,
871
+ onChange: (e) => N(e.target.value),
867
872
  className: "mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
868
873
  })] }),
869
- /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ f("label", {
874
+ /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ d("label", {
870
875
  className: "text-sm font-medium text-text-primary",
871
- children: [T("healthybowl.livestock.animalDetails.form.tagNumber", "Tag Number"), " *"]
872
- }), /* @__PURE__ */ d("input", {
876
+ children: [x("healthybowl.livestock.animalDetails.form.tagNumber", "Tag Number"), " *"]
877
+ }), /* @__PURE__ */ u("input", {
873
878
  type: "text",
874
879
  value: H,
875
- onChange: (e) => Re(e.target.value),
880
+ onChange: (e) => U(e.target.value),
876
881
  className: "mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
877
882
  })] }),
878
- /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
883
+ /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("label", {
879
884
  className: "text-sm font-medium text-text-primary",
880
- children: T("healthybowl.livestock.animalDetails.fields.type", "Type")
881
- }), /* @__PURE__ */ f(m, {
882
- value: L,
883
- onValueChange: R,
884
- children: [/* @__PURE__ */ d(_, {
885
+ children: x("healthybowl.livestock.animalDetails.fields.type", "Type")
886
+ }), /* @__PURE__ */ d(p, {
887
+ value: P,
888
+ onValueChange: F,
889
+ children: [/* @__PURE__ */ u(g, {
885
890
  className: "mt-1 w-full",
886
- children: /* @__PURE__ */ d(v, { placeholder: T("healthybowl.livestock.animalDetails.fields.type", "Type") })
887
- }), /* @__PURE__ */ f(h, { children: [
888
- /* @__PURE__ */ d(g, {
891
+ children: /* @__PURE__ */ u(_, { placeholder: x("healthybowl.livestock.animalDetails.fields.type", "Type") })
892
+ }), /* @__PURE__ */ d(m, { children: [
893
+ /* @__PURE__ */ u(h, {
889
894
  value: "cattle",
890
- children: T("healthybowl.livestock.animalDetails.types.cattle", "Cattle")
895
+ children: x("healthybowl.livestock.animalDetails.types.cattle", "Cattle")
891
896
  }),
892
- /* @__PURE__ */ d(g, {
897
+ /* @__PURE__ */ u(h, {
893
898
  value: "buffalo",
894
- children: T("healthybowl.livestock.animalDetails.types.buffalo", "Buffalo")
899
+ children: x("healthybowl.livestock.animalDetails.types.buffalo", "Buffalo")
895
900
  }),
896
- /* @__PURE__ */ d(g, {
901
+ /* @__PURE__ */ u(h, {
897
902
  value: "goat",
898
- children: T("healthybowl.livestock.animalDetails.types.goat", "Goat")
903
+ children: x("healthybowl.livestock.animalDetails.types.goat", "Goat")
899
904
  }),
900
- /* @__PURE__ */ d(g, {
905
+ /* @__PURE__ */ u(h, {
901
906
  value: "sheep",
902
- children: T("healthybowl.livestock.animalDetails.types.sheep", "Sheep")
907
+ children: x("healthybowl.livestock.animalDetails.types.sheep", "Sheep")
903
908
  }),
904
- /* @__PURE__ */ d(g, {
909
+ /* @__PURE__ */ u(h, {
905
910
  value: "pig",
906
- children: T("healthybowl.livestock.animalDetails.types.pig", "Pig")
911
+ children: x("healthybowl.livestock.animalDetails.types.pig", "Pig")
907
912
  }),
908
- /* @__PURE__ */ d(g, {
913
+ /* @__PURE__ */ u(h, {
909
914
  value: "poultry",
910
- children: T("healthybowl.livestock.animalDetails.types.poultry", "Poultry")
915
+ children: x("healthybowl.livestock.animalDetails.types.poultry", "Poultry")
911
916
  })
912
917
  ] })]
913
918
  })] }),
914
- /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
919
+ /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("label", {
915
920
  className: "text-sm font-medium text-text-primary",
916
- children: T("healthybowl.livestock.animalDetails.fields.breed", "Breed")
917
- }), /* @__PURE__ */ d("input", {
921
+ children: x("healthybowl.livestock.animalDetails.fields.breed", "Breed")
922
+ }), /* @__PURE__ */ u("input", {
918
923
  type: "text",
919
- value: z,
920
- onChange: (e) => B(e.target.value),
924
+ value: I,
925
+ onChange: (e) => L(e.target.value),
921
926
  className: "mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
922
927
  })] }),
923
- /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
928
+ /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("label", {
924
929
  className: "text-sm font-medium text-text-primary",
925
- children: T("healthybowl.livestock.animalDetails.fields.gender", "Gender")
926
- }), /* @__PURE__ */ f(m, {
927
- value: V,
928
- onValueChange: Fe,
929
- children: [/* @__PURE__ */ d(_, {
930
+ children: x("healthybowl.livestock.animalDetails.fields.gender", "Gender")
931
+ }), /* @__PURE__ */ d(p, {
932
+ value: R,
933
+ onValueChange: z,
934
+ children: [/* @__PURE__ */ u(g, {
930
935
  className: "mt-1 w-full",
931
- children: /* @__PURE__ */ d(v, { placeholder: T("healthybowl.livestock.animalDetails.fields.gender", "Gender") })
932
- }), /* @__PURE__ */ f(h, { children: [/* @__PURE__ */ d(g, {
936
+ children: /* @__PURE__ */ u(_, { placeholder: x("healthybowl.livestock.animalDetails.fields.gender", "Gender") })
937
+ }), /* @__PURE__ */ d(m, { children: [/* @__PURE__ */ u(h, {
933
938
  value: "male",
934
- children: T("healthybowl.livestock.animalDetails.genders.male", "Male")
935
- }), /* @__PURE__ */ d(g, {
939
+ children: x("healthybowl.livestock.animalDetails.genders.male", "Male")
940
+ }), /* @__PURE__ */ u(h, {
936
941
  value: "female",
937
- children: T("healthybowl.livestock.animalDetails.genders.female", "Female")
942
+ children: x("healthybowl.livestock.animalDetails.genders.female", "Female")
938
943
  })] })]
939
944
  })] }),
940
- /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
945
+ /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("label", {
941
946
  className: "text-sm font-medium text-text-primary",
942
- children: T("healthybowl.livestock.animalDetails.form.healthStatus", "Health Status")
943
- }), /* @__PURE__ */ f(m, {
944
- value: Ie,
945
- onValueChange: Le,
946
- children: [/* @__PURE__ */ d(_, {
947
+ children: x("healthybowl.livestock.animalDetails.form.healthStatus", "Health Status")
948
+ }), /* @__PURE__ */ d(p, {
949
+ value: B,
950
+ onValueChange: V,
951
+ children: [/* @__PURE__ */ u(g, {
947
952
  className: "mt-1 w-full",
948
- children: /* @__PURE__ */ d(v, { placeholder: T("healthybowl.livestock.animalDetails.form.healthStatus", "Health Status") })
949
- }), /* @__PURE__ */ f(h, { children: [
950
- /* @__PURE__ */ d(g, {
953
+ children: /* @__PURE__ */ u(_, { placeholder: x("healthybowl.livestock.animalDetails.form.healthStatus", "Health Status") })
954
+ }), /* @__PURE__ */ d(m, { children: [
955
+ /* @__PURE__ */ u(h, {
951
956
  value: "healthy",
952
- children: T("healthybowl.livestock.animalDetails.healthStatuses.healthy", "Healthy")
957
+ children: x("healthybowl.livestock.animalDetails.healthStatuses.healthy", "Healthy")
953
958
  }),
954
- /* @__PURE__ */ d(g, {
959
+ /* @__PURE__ */ u(h, {
955
960
  value: "pregnant",
956
- children: T("healthybowl.livestock.animalDetails.healthStatuses.pregnant", "Pregnant")
961
+ children: x("healthybowl.livestock.animalDetails.healthStatuses.pregnant", "Pregnant")
957
962
  }),
958
- /* @__PURE__ */ d(g, {
963
+ /* @__PURE__ */ u(h, {
959
964
  value: "under_treatment",
960
- children: T("healthybowl.livestock.animalDetails.healthStatuses.underTreatment", "Under Treatment")
965
+ children: x("healthybowl.livestock.animalDetails.healthStatuses.underTreatment", "Under Treatment")
961
966
  }),
962
- /* @__PURE__ */ d(g, {
967
+ /* @__PURE__ */ u(h, {
963
968
  value: "sick",
964
- children: T("healthybowl.livestock.animalDetails.healthStatuses.sick", "Sick")
969
+ children: x("healthybowl.livestock.animalDetails.healthStatuses.sick", "Sick")
965
970
  }),
966
- /* @__PURE__ */ d(g, {
971
+ /* @__PURE__ */ u(h, {
967
972
  value: "quarantine",
968
- children: T("healthybowl.livestock.animalDetails.healthStatuses.quarantine", "Quarantine")
973
+ children: x("healthybowl.livestock.animalDetails.healthStatuses.quarantine", "Quarantine")
969
974
  })
970
975
  ] })]
971
976
  })] }),
972
- /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
977
+ /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("label", {
973
978
  className: "text-sm font-medium text-text-primary",
974
- children: T("healthybowl.livestock.animalDetails.form.weight", "Weight (kg)")
975
- }), /* @__PURE__ */ d("input", {
979
+ children: x("healthybowl.livestock.animalDetails.form.weight", "Weight (kg)")
980
+ }), /* @__PURE__ */ u("input", {
976
981
  type: "number",
977
982
  min: 0,
978
- value: Ve,
979
- onChange: (e) => He(e.target.value),
983
+ value: Be,
984
+ onChange: (e) => Ve(e.target.value),
980
985
  className: "mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
981
986
  })] }),
982
- /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
987
+ /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("label", {
983
988
  className: "text-sm font-medium text-text-primary",
984
- children: T("healthybowl.livestock.animalDetails.form.vaccinations", "Vaccinations")
985
- }), /* @__PURE__ */ d("input", {
989
+ children: x("healthybowl.livestock.animalDetails.form.vaccinations", "Vaccinations")
990
+ }), /* @__PURE__ */ u("input", {
986
991
  type: "number",
987
992
  min: 0,
988
- value: ze,
989
- onChange: (e) => Be(e.target.value),
993
+ value: W,
994
+ onChange: (e) => ze(e.target.value),
990
995
  className: "mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
991
996
  })] }),
992
- /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
997
+ /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("label", {
993
998
  className: "text-sm font-medium text-text-primary",
994
- children: T("healthybowl.livestock.animalDetails.fields.dateOfBirth", "Date of Birth")
995
- }), /* @__PURE__ */ d("input", {
999
+ children: x("healthybowl.livestock.animalDetails.fields.dateOfBirth", "Date of Birth")
1000
+ }), /* @__PURE__ */ u("input", {
996
1001
  type: "date",
997
- value: U,
998
- onChange: (e) => Ue(e.target.value),
1002
+ value: G,
1003
+ onChange: (e) => He(e.target.value),
999
1004
  className: "mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
1000
1005
  })] }),
1001
- /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
1006
+ /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("label", {
1002
1007
  className: "text-sm font-medium text-text-primary",
1003
- children: T("healthybowl.livestock.animalDetails.fields.lastCheckup", "Last Checkup")
1004
- }), /* @__PURE__ */ d("input", {
1008
+ children: x("healthybowl.livestock.animalDetails.fields.lastCheckup", "Last Checkup")
1009
+ }), /* @__PURE__ */ u("input", {
1005
1010
  type: "date",
1006
- value: W,
1007
- onChange: (e) => We(e.target.value),
1011
+ value: K,
1012
+ onChange: (e) => Ue(e.target.value),
1008
1013
  className: "mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
1009
1014
  })] }),
1010
- /* @__PURE__ */ f("div", {
1015
+ /* @__PURE__ */ d("div", {
1011
1016
  className: "sm:col-span-2",
1012
- children: [/* @__PURE__ */ d("label", {
1017
+ children: [/* @__PURE__ */ u("label", {
1013
1018
  className: "text-sm font-medium text-text-primary",
1014
- children: T("healthybowl.livestock.animalDetails.form.productionType", "Production Type")
1015
- }), /* @__PURE__ */ d("input", {
1019
+ children: x("healthybowl.livestock.animalDetails.form.productionType", "Production Type")
1020
+ }), /* @__PURE__ */ u("input", {
1016
1021
  type: "text",
1017
- value: G,
1018
- onChange: (e) => K(e.target.value),
1019
- placeholder: T("healthybowl.livestock.animalDetails.form.productionTypePlaceholder", "e.g. dairy, meat, eggs"),
1022
+ value: q,
1023
+ onChange: (e) => We(e.target.value),
1024
+ placeholder: x("healthybowl.livestock.animalDetails.form.productionTypePlaceholder", "e.g. dairy, meat, eggs"),
1020
1025
  className: "mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
1021
1026
  })]
1022
1027
  }),
1023
- /* @__PURE__ */ f("div", {
1028
+ /* @__PURE__ */ d("div", {
1024
1029
  className: "sm:col-span-2",
1025
- children: [/* @__PURE__ */ d("label", {
1030
+ children: [/* @__PURE__ */ u("label", {
1026
1031
  className: "text-sm font-medium text-text-primary",
1027
- children: T("healthybowl.livestock.animalDetails.form.photos", "Photos")
1028
- }), /* @__PURE__ */ d("div", {
1032
+ children: x("healthybowl.livestock.animalDetails.form.photos", "Photos")
1033
+ }), /* @__PURE__ */ u("div", {
1029
1034
  className: "mt-1",
1030
- children: /* @__PURE__ */ d(a, {
1035
+ children: /* @__PURE__ */ u(se, {
1031
1036
  entity: "Animal",
1032
1037
  imageIds: Ge,
1033
1038
  onChange: Ke
@@ -1037,14 +1042,14 @@ var y = (e) => {
1037
1042
  ]
1038
1043
  })
1039
1044
  }),
1040
- /* @__PURE__ */ d(re, {
1041
- toasts: Ne,
1042
- onDismiss: Pe
1045
+ /* @__PURE__ */ u(re, {
1046
+ toasts: Le,
1047
+ onDismiss: Re
1043
1048
  })
1044
1049
  ]
1045
1050
  });
1046
1051
  };
1047
1052
  //#endregion
1048
- export { b as AnimalDetailsPage };
1053
+ export { v as AnimalDetailsPage };
1049
1054
 
1050
1055
  //# sourceMappingURL=AnimalDetailsPage.js.map