@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
@@ -13,14 +13,15 @@ import { useToast as ce } from "../../hooks/useToast.js";
13
13
  import "../../components/index.js";
14
14
  import { useHealthyBowlData as le } from "../../hooks/useHealthyBowlData.js";
15
15
  import { isNative as ue, nativeNotify as de, nativeToast as fe } from "../../../utils/nativeBridge.js";
16
- import { useEffect as pe, useState as i } from "react";
17
- import { useI18n as me } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
18
- import { AlertTriangle as he, ArrowLeft as ge, Beaker as a, Calendar as _e, ClipboardList as o, Clock as s, CloudRain as ve, Edit as ye, Leaf as be, MapPin as c, Sprout as l, Target as xe, Trash2 as Se, TrendingUp as u } from "lucide-react";
19
- import { useNavigate as Ce, useParams as we } from "react-router-dom";
20
- import { Fragment as Te, jsx as d, jsxs as f } from "react/jsx-runtime";
21
- import { Button as p, GlassCard as Ee, Select as m, SelectContent as h, SelectItem as g, SelectTrigger as _, SelectValue as v } from "@burdenoff/fe-libs/ui";
16
+ import { PlanExecutionPanel as pe } from "../../components/PlanExecutionPanel.js";
17
+ import { useEffect as me, useState as i } from "react";
18
+ import { useI18n as he } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
19
+ import { AlertTriangle as ge, ArrowLeft as _e, Beaker as a, Calendar as ve, ClipboardList as ye, Clock as o, CloudRain as s, Edit as be, Leaf as xe, MapPin as c, Sprout as l, Target as Se, Trash2 as Ce, TrendingUp as u } from "lucide-react";
20
+ import { useNavigate as we, useParams as Te } from "react-router-dom";
21
+ import { Fragment as Ee, jsx as d, jsxs as f } from "react/jsx-runtime";
22
+ import { Button as p, GlassCard as De, Select as m, SelectContent as h, SelectItem as g, SelectTrigger as _, SelectValue as v } from "@burdenoff/fe-libs/ui";
22
23
  //#region src/healthybowl/pages/crops/PlanningDetailsPage.tsx
23
- var y = (e) => {
24
+ var Oe = (e) => {
24
25
  switch (e) {
25
26
  case "active": return "success";
26
27
  case "approved": return "info";
@@ -28,107 +29,107 @@ var y = (e) => {
28
29
  case "completed": return "default";
29
30
  default: return "muted";
30
31
  }
31
- }, b = (e) => {
32
+ }, y = (e) => {
32
33
  switch (e) {
33
34
  case "high": return "error";
34
35
  case "medium": return "warning";
35
36
  default: return "success";
36
37
  }
37
- }, x = (e) => {
38
+ }, b = (e) => {
38
39
  switch (e) {
39
40
  case "high": return "error";
40
41
  case "medium": return "warning";
41
42
  default: return "success";
42
43
  }
43
- }, S = (e) => (e ?? "").trim().toLowerCase(), C = () => {
44
- let { t: C } = me(), De = ie(), w = (e) => {
44
+ }, x = (e) => (e ?? "").trim().toLowerCase(), S = () => {
45
+ let { t: S } = he(), ke = ie(), C = (e) => {
45
46
  switch (e) {
46
- case "kharif": return C("healthybowl.crops.planningDetail.season.kharif", "Kharif");
47
- case "rabi": return C("healthybowl.crops.planningDetail.season.rabi", "Rabi");
48
- case "zaid": return C("healthybowl.crops.planningDetail.season.zaid", "Zaid");
49
- case "perennial": return C("healthybowl.crops.planningDetail.season.perennial", "Perennial");
47
+ case "kharif": return S("healthybowl.crops.planningDetail.season.kharif", "Kharif");
48
+ case "rabi": return S("healthybowl.crops.planningDetail.season.rabi", "Rabi");
49
+ case "zaid": return S("healthybowl.crops.planningDetail.season.zaid", "Zaid");
50
+ case "perennial": return S("healthybowl.crops.planningDetail.season.perennial", "Perennial");
50
51
  default: return e;
51
52
  }
52
- }, { plantingPlans: T, fields: E, crops: D, errors: Oe, loadings: ke, updatePlantingPlan: Ae, deletePlantingPlan: je, refetch: Me } = le(), { planId: O } = we(), k = Ce(), { buildPath: A } = ee(), { toasts: Ne, toast: j, dismiss: Pe } = ce(), [Fe, M] = i(!1), [N, P] = i(!1), [F, Ie] = i(() => T.find((e) => e.id === O));
53
- pe(() => {
54
- let e = T.find((e) => e.id === O);
55
- e && Ie(e);
56
- }, [T, O]);
57
- let [I, L] = i(""), [R, z] = i(""), [B, V] = i(""), [H, U] = i(""), [W, G] = i(""), [K, q] = i(""), [J, Y] = i("low"), [X, Le] = i("draft"), Re = () => {
58
- if (!F) return;
59
- let e = D.find((e) => e.id === F.cropId) ?? D.find((e) => S(e.name) === S(F.cropName)), t = E.find((e) => e.id === F.fieldId) ?? E.find((e) => S(e.name) === S(F.fieldName));
60
- L(e?.id ?? ""), z(t?.id ?? ""), V(F.startDate), U(F.endDate), G(String(F.expectedYield)), q(String(F.seedRequired)), Y(F.priority), Le(F.status), M(!0);
53
+ }, { plantingPlans: w, fields: T, crops: E, errors: Ae, loadings: je, updatePlantingPlan: Me, deletePlantingPlan: Ne, refetch: Pe } = le(), { planId: D } = Te(), O = we(), { buildPath: k } = ee(), { toasts: Fe, toast: A, dismiss: Ie } = ce(), [Le, j] = i(!1), [M, N] = i(!1), [P, Re] = i(() => w.find((e) => e.id === D));
54
+ me(() => {
55
+ let e = w.find((e) => e.id === D);
56
+ e && Re(e);
57
+ }, [w, D]);
58
+ let [F, I] = i(""), [L, R] = i(""), [z, B] = i(""), [V, H] = i(""), [U, W] = i(""), [G, K] = i(""), [q, J] = i("low"), [Y, X] = i("draft"), Z = () => {
59
+ if (!P) return;
60
+ let e = E.find((e) => e.id === P.cropId) ?? E.find((e) => x(e.name) === x(P.cropName)), t = T.find((e) => e.id === P.fieldId) ?? T.find((e) => x(e.name) === x(P.fieldName));
61
+ I(e?.id ?? ""), R(t?.id ?? ""), B(P.startDate), H(P.endDate), W(String(P.expectedYield)), K(String(P.seedRequired)), J(P.priority), X(P.status), j(!0);
61
62
  };
62
- if (!F) return /* @__PURE__ */ d(n, {
63
- title: C("healthybowl.crops.planningDetail.notFound.title", "Plan Not Found"),
64
- children: ke.crops ? /* @__PURE__ */ d(oe, {}) : Oe.crops ? /* @__PURE__ */ d(ne, { onRetry: Me }) : /* @__PURE__ */ d(te, {
65
- title: C("healthybowl.crops.planningDetail.notFound.emptyTitle", "Plan not found"),
66
- description: C("healthybowl.crops.planningDetail.notFound.description", "The planting plan you are looking for does not exist."),
63
+ if (!P) return /* @__PURE__ */ d(n, {
64
+ title: S("healthybowl.crops.planningDetail.notFound.title", "Plan Not Found"),
65
+ children: je.crops ? /* @__PURE__ */ d(oe, {}) : Ae.crops ? /* @__PURE__ */ d(ne, { onRetry: Pe }) : /* @__PURE__ */ d(te, {
66
+ title: S("healthybowl.crops.planningDetail.notFound.emptyTitle", "Plan not found"),
67
+ description: S("healthybowl.crops.planningDetail.notFound.description", "The planting plan you are looking for does not exist."),
67
68
  action: /* @__PURE__ */ d(p, {
68
- onClick: () => k(A("crops/planning")),
69
- children: C("healthybowl.crops.planningDetail.actions.backToPlans", "Back to Plans")
69
+ onClick: () => O(k("crops/planning")),
70
+ children: S("healthybowl.crops.planningDetail.actions.backToPlans", "Back to Plans")
70
71
  })
71
72
  })
72
73
  });
73
- let Z = E.find((e) => e.id === F.fieldId) ?? E.find((e) => S(e.name) === S(F.fieldName)), ze = /* @__PURE__ */ new Date(), Be = new Date(F.startDate), Q = new Date(F.endDate).getTime() - Be.getTime(), Ve = ze.getTime() - Be.getTime(), He = Q > 0 ? Math.max(0, Math.min(100, Math.round(Ve / Q * 100))) : 0, Ue = Math.ceil(Q / (1e3 * 60 * 60 * 24)), $ = Math.max(0, Math.ceil(Ve / (1e3 * 60 * 60 * 24))), We = Math.max(0, Ue - $);
74
+ let Q = T.find((e) => e.id === P.fieldId) ?? T.find((e) => x(e.name) === x(P.fieldName)), ze = /* @__PURE__ */ new Date(), Be = new Date(P.startDate), $ = new Date(P.endDate).getTime() - Be.getTime(), Ve = ze.getTime() - Be.getTime(), He = $ > 0 ? Math.max(0, Math.min(100, Math.round(Ve / $ * 100))) : 0, Ue = Math.ceil($ / (1e3 * 60 * 60 * 24)), We = Math.max(0, Math.ceil(Ve / (1e3 * 60 * 60 * 24))), Ge = Math.max(0, Ue - We);
74
75
  return /* @__PURE__ */ f(n, {
75
- title: `${F.cropName} - ${F.fieldName}`,
76
- description: C("healthybowl.crops.planningDetail.subtitle", "Planting plan for {{season}} season", { season: w(F.season) }),
76
+ title: `${P.cropName} - ${P.fieldName}`,
77
+ description: S("healthybowl.crops.planningDetail.subtitle", "Planting plan for {{season}} season", { season: C(P.season) }),
77
78
  actions: /* @__PURE__ */ f("div", {
78
79
  className: "flex items-center gap-2",
79
80
  children: [
80
81
  /* @__PURE__ */ f(p, {
81
82
  variant: "outline",
82
- onClick: Re,
83
+ onClick: Z,
83
84
  children: [
84
- /* @__PURE__ */ d(ye, { className: "h-4 w-4" }),
85
+ /* @__PURE__ */ d(be, { className: "h-4 w-4" }),
85
86
  " ",
86
- C("healthybowl.common.edit", "Edit")
87
+ S("healthybowl.common.edit", "Edit")
87
88
  ]
88
89
  }),
89
90
  /* @__PURE__ */ f(p, {
90
91
  variant: "destructive",
91
92
  onClick: async () => {
92
- if (F && await De({
93
- title: C("healthybowl.crops.planningDetail.deleteConfirm.title", "Delete planting plan?"),
94
- message: C("healthybowl.crops.planningDetail.deleteConfirm.message", "{{crop}} plan for {{field}} will be permanently removed.", {
95
- crop: F.cropName,
96
- field: F.fieldName
93
+ if (P && await ke({
94
+ title: S("healthybowl.crops.planningDetail.deleteConfirm.title", "Delete planting plan?"),
95
+ message: S("healthybowl.crops.planningDetail.deleteConfirm.message", "{{crop}} plan for {{field}} will be permanently removed.", {
96
+ crop: P.cropName,
97
+ field: P.fieldName
97
98
  }),
98
- okButtonTitle: C("healthybowl.common.delete", "Delete"),
99
- cancelButtonTitle: C("healthybowl.common.cancel", "Cancel")
99
+ okButtonTitle: S("healthybowl.common.delete", "Delete"),
100
+ cancelButtonTitle: S("healthybowl.common.cancel", "Cancel")
100
101
  }) !== !1) {
101
- P(!0);
102
+ N(!0);
102
103
  try {
103
- await je(F.id), j({
104
- title: C("healthybowl.crops.planningDetail.toast.deleted.title", "Plan deleted"),
105
- description: C("healthybowl.crops.planningDetail.toast.deleted.description", "{{crop}} plan has been removed.", { crop: F.cropName }),
104
+ await Ne(P.id), A({
105
+ title: S("healthybowl.crops.planningDetail.toast.deleted.title", "Plan deleted"),
106
+ description: S("healthybowl.crops.planningDetail.toast.deleted.description", "{{crop}} plan has been removed.", { crop: P.cropName }),
106
107
  variant: "success"
107
- }), ue() && (fe(C("healthybowl.crops.planningDetail.toast.deleted.title", "Plan deleted")), de("success")), k(A("crops/planning"));
108
+ }), ue() && (fe(S("healthybowl.crops.planningDetail.toast.deleted.title", "Plan deleted")), de("success")), O(k("crops/planning"));
108
109
  } catch (e) {
109
- j({
110
- title: C("healthybowl.crops.planningDetail.toast.deleteFailed.title", "Delete failed"),
110
+ A({
111
+ title: S("healthybowl.crops.planningDetail.toast.deleteFailed.title", "Delete failed"),
111
112
  description: String(e),
112
113
  variant: "error"
113
- }), P(!1);
114
+ }), N(!1);
114
115
  }
115
116
  }
116
117
  },
117
- disabled: N,
118
+ disabled: M,
118
119
  children: [
119
- /* @__PURE__ */ d(Se, { className: "h-4 w-4" }),
120
+ /* @__PURE__ */ d(Ce, { className: "h-4 w-4" }),
120
121
  " ",
121
- C("healthybowl.common.delete", "Delete")
122
+ S("healthybowl.common.delete", "Delete")
122
123
  ]
123
124
  }),
124
125
  /* @__PURE__ */ f(p, {
125
126
  variant: "outline",
126
127
  size: "sm",
127
- onClick: () => k(A("crops/planning")),
128
+ onClick: () => O(k("crops/planning")),
128
129
  children: [
129
- /* @__PURE__ */ d(ge, { className: "h-4 w-4" }),
130
+ /* @__PURE__ */ d(_e, { className: "h-4 w-4" }),
130
131
  " ",
131
- C("healthybowl.common.back", "Back")
132
+ S("healthybowl.common.back", "Back")
132
133
  ]
133
134
  })
134
135
  ]
@@ -137,54 +138,54 @@ var y = (e) => {
137
138
  nextSteps: [
138
139
  {
139
140
  id: "edit",
140
- label: C("healthybowl.crops.planningDetail.nextSteps.edit.label", "Refine this plan"),
141
- description: C("healthybowl.crops.planningDetail.nextSteps.edit.desc", "Adjust timing, field or priority before you commit to it."),
142
- onClick: Re
141
+ label: S("healthybowl.crops.planningDetail.nextSteps.edit.label", "Refine this plan"),
142
+ description: S("healthybowl.crops.planningDetail.nextSteps.edit.desc", "Adjust timing, field or priority before you commit to it."),
143
+ onClick: Z
143
144
  },
144
145
  {
145
146
  id: "weather",
146
- label: C("healthybowl.crops.planningDetail.nextSteps.weather.label", "Check the weather outlook"),
147
- description: C("healthybowl.crops.planningDetail.nextSteps.weather.desc", "Make sure conditions suit your planned planting window."),
148
- href: A("weather")
147
+ label: S("healthybowl.crops.planningDetail.nextSteps.weather.label", "Check the weather outlook"),
148
+ description: S("healthybowl.crops.planningDetail.nextSteps.weather.desc", "Make sure conditions suit your planned planting window."),
149
+ href: k("weather")
149
150
  },
150
151
  {
151
152
  id: "crops",
152
- label: C("healthybowl.crops.planningDetail.nextSteps.crops.label", "See your active crops"),
153
- description: C("healthybowl.crops.planningDetail.nextSteps.crops.desc", "Once planted, track this plan as a living crop."),
154
- href: A("crops")
153
+ label: S("healthybowl.crops.planningDetail.nextSteps.crops.label", "See your active crops"),
154
+ description: S("healthybowl.crops.planningDetail.nextSteps.crops.desc", "Once planted, track this plan as a living crop."),
155
+ href: k("crops")
155
156
  }
156
157
  ],
157
158
  nextStepsKey: "healthybowl-plan-detail",
158
159
  children: [
159
160
  /* @__PURE__ */ d(ae, { items: [
160
161
  {
161
- label: C("healthybowl.crops.planningDetail.breadcrumbs.crops", "Crops"),
162
- href: A("crops")
162
+ label: S("healthybowl.crops.planningDetail.breadcrumbs.crops", "Crops"),
163
+ href: k("crops")
163
164
  },
164
165
  {
165
- label: C("healthybowl.crops.planningDetail.breadcrumbs.planning", "Planning"),
166
- href: A("crops/planning")
166
+ label: S("healthybowl.crops.planningDetail.breadcrumbs.planning", "Planning"),
167
+ href: k("crops/planning")
167
168
  },
168
- { label: F.cropName }
169
+ { label: P.cropName }
169
170
  ] }),
170
171
  /* @__PURE__ */ f("div", {
171
172
  className: "flex flex-wrap items-center gap-3",
172
173
  children: [
173
174
  /* @__PURE__ */ d(r, {
174
- label: F.status,
175
- variant: y(F.status ?? "unknown"),
175
+ label: P.status,
176
+ variant: Oe(P.status ?? "unknown"),
176
177
  dot: !0
177
178
  }),
178
179
  /* @__PURE__ */ d(r, {
179
- label: C("healthybowl.crops.planningDetail.badges.priority", "Priority: {{priority}}", { priority: F.priority }),
180
- variant: b(F.priority)
180
+ label: S("healthybowl.crops.planningDetail.badges.priority", "Priority: {{priority}}", { priority: P.priority }),
181
+ variant: y(P.priority)
181
182
  }),
182
183
  /* @__PURE__ */ d(r, {
183
- label: C("healthybowl.crops.planningDetail.badges.weatherRisk", "Weather Risk: {{risk}}", { risk: F.weatherRisk }),
184
- variant: x(F.weatherRisk)
184
+ label: S("healthybowl.crops.planningDetail.badges.weatherRisk", "Weather Risk: {{risk}}", { risk: P.weatherRisk }),
185
+ variant: b(P.weatherRisk)
185
186
  }),
186
187
  /* @__PURE__ */ d(r, {
187
- label: w(F.season),
188
+ label: C(P.season),
188
189
  variant: "muted"
189
190
  })
190
191
  ]
@@ -194,16 +195,16 @@ var y = (e) => {
194
195
  children: [/* @__PURE__ */ f("div", {
195
196
  className: "space-y-6 lg:col-span-2",
196
197
  children: [
197
- /* @__PURE__ */ f(Ee, {
198
+ /* @__PURE__ */ f(De, {
198
199
  treatment: "glass",
199
200
  glow: !0,
200
201
  className: "border-border-seam p-6",
201
202
  children: [/* @__PURE__ */ f("h3", {
202
203
  className: "mb-4 flex items-center gap-2 text-sm font-semibold text-text-primary",
203
204
  children: [
204
- /* @__PURE__ */ d(o, { className: "h-4 w-4 text-info" }),
205
+ /* @__PURE__ */ d(ye, { className: "h-4 w-4 text-info" }),
205
206
  " ",
206
- C("healthybowl.crops.planningDetail.overview.title", "Plan Overview")
207
+ S("healthybowl.crops.planningDetail.overview.title", "Plan Overview")
207
208
  ]
208
209
  }), /* @__PURE__ */ f("div", {
209
210
  className: "grid grid-cols-2 gap-4 md:grid-cols-4",
@@ -212,44 +213,44 @@ var y = (e) => {
212
213
  className: "flex items-center gap-1 text-text-secondary",
213
214
  children: [/* @__PURE__ */ d(l, { className: "h-3.5 w-3.5" }), /* @__PURE__ */ d("span", {
214
215
  className: "text-xs",
215
- children: C("healthybowl.crops.planningDetail.overview.crop", "Crop")
216
+ children: S("healthybowl.crops.planningDetail.overview.crop", "Crop")
216
217
  })]
217
218
  }), /* @__PURE__ */ d("p", {
218
219
  className: "mt-1 text-sm font-semibold text-text-primary",
219
- children: F.cropName
220
+ children: P.cropName
220
221
  })] }),
221
222
  /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ f("div", {
222
223
  className: "flex items-center gap-1 text-text-secondary",
223
224
  children: [/* @__PURE__ */ d(c, { className: "h-3.5 w-3.5" }), /* @__PURE__ */ d("span", {
224
225
  className: "text-xs",
225
- children: C("healthybowl.crops.planningDetail.overview.field", "Field")
226
+ children: S("healthybowl.crops.planningDetail.overview.field", "Field")
226
227
  })]
227
228
  }), /* @__PURE__ */ d("p", {
228
229
  className: "mt-1 text-sm font-semibold text-text-primary",
229
- children: F.fieldName
230
+ children: P.fieldName
230
231
  })] }),
231
232
  /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ f("div", {
232
233
  className: "flex items-center gap-1 text-text-secondary",
233
- children: [/* @__PURE__ */ d(be, { className: "h-3.5 w-3.5" }), /* @__PURE__ */ d("span", {
234
+ children: [/* @__PURE__ */ d(xe, { className: "h-3.5 w-3.5" }), /* @__PURE__ */ d("span", {
234
235
  className: "text-xs",
235
- children: C("healthybowl.crops.planningDetail.overview.season", "Season")
236
+ children: S("healthybowl.crops.planningDetail.overview.season", "Season")
236
237
  })]
237
238
  }), /* @__PURE__ */ d("p", {
238
239
  className: "mt-1 text-sm font-semibold capitalize text-text-primary",
239
- children: w(F.season)
240
+ children: C(P.season)
240
241
  })] }),
241
- Z && /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ f("div", {
242
+ Q && /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ f("div", {
242
243
  className: "flex items-center gap-1 text-text-secondary",
243
244
  children: [/* @__PURE__ */ d(c, { className: "h-3.5 w-3.5" }), /* @__PURE__ */ d("span", {
244
245
  className: "text-xs",
245
- children: C("healthybowl.crops.planningDetail.overview.fieldArea", "Field Area")
246
+ children: S("healthybowl.crops.planningDetail.overview.fieldArea", "Field Area")
246
247
  })]
247
248
  }), /* @__PURE__ */ f("p", {
248
249
  className: "mt-1 text-sm font-semibold text-text-primary",
249
250
  children: [
250
- Z.area,
251
+ Q.area,
251
252
  " ",
252
- Z.unit
253
+ Q.unit
253
254
  ]
254
255
  })] })
255
256
  ]
@@ -261,9 +262,9 @@ var y = (e) => {
261
262
  /* @__PURE__ */ f("h3", {
262
263
  className: "mb-4 flex items-center gap-2 text-sm font-semibold text-text-primary",
263
264
  children: [
264
- /* @__PURE__ */ d(_e, { className: "h-4 w-4 text-info" }),
265
+ /* @__PURE__ */ d(ve, { className: "h-4 w-4 text-info" }),
265
266
  " ",
266
- C("healthybowl.crops.planningDetail.timeline.title", "Timeline")
267
+ S("healthybowl.crops.planningDetail.timeline.title", "Timeline")
267
268
  ]
268
269
  }),
269
270
  /* @__PURE__ */ f("div", {
@@ -271,24 +272,24 @@ var y = (e) => {
271
272
  children: [
272
273
  /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("span", {
273
274
  className: "text-xs text-text-secondary",
274
- children: C("healthybowl.crops.planningDetail.timeline.startDate", "Start Date")
275
+ children: S("healthybowl.crops.planningDetail.timeline.startDate", "Start Date")
275
276
  }), /* @__PURE__ */ d("p", {
276
277
  className: "text-sm font-semibold text-text-primary",
277
- children: e(F.startDate)
278
+ children: e(P.startDate)
278
279
  })] }),
279
280
  /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("span", {
280
281
  className: "text-xs text-text-secondary",
281
- children: C("healthybowl.crops.planningDetail.timeline.endDate", "End Date")
282
+ children: S("healthybowl.crops.planningDetail.timeline.endDate", "End Date")
282
283
  }), /* @__PURE__ */ d("p", {
283
284
  className: "text-sm font-semibold text-text-primary",
284
- children: e(F.endDate)
285
+ children: e(P.endDate)
285
286
  })] }),
286
287
  /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("span", {
287
288
  className: "text-xs text-text-secondary",
288
- children: C("healthybowl.crops.planningDetail.timeline.duration", "Duration")
289
+ children: S("healthybowl.crops.planningDetail.timeline.duration", "Duration")
289
290
  }), /* @__PURE__ */ d("p", {
290
291
  className: "text-sm font-semibold text-text-primary",
291
- children: C("healthybowl.crops.planningDetail.timeline.days", "{{count}} days", { count: Ue })
292
+ children: S("healthybowl.crops.planningDetail.timeline.days", "{{count}} days", { count: Ue })
292
293
  })] })
293
294
  ]
294
295
  }),
@@ -297,7 +298,7 @@ var y = (e) => {
297
298
  children: [
298
299
  /* @__PURE__ */ f("div", {
299
300
  className: "flex items-center justify-between text-xs text-text-secondary",
300
- children: [/* @__PURE__ */ d("span", { children: C("healthybowl.crops.planningDetail.timeline.progress", "Timeline Progress") }), /* @__PURE__ */ f("span", { children: [He, "%"] })]
301
+ children: [/* @__PURE__ */ d("span", { children: S("healthybowl.crops.planningDetail.timeline.progress", "Timeline Progress") }), /* @__PURE__ */ f("span", { children: [He, "%"] })]
301
302
  }),
302
303
  /* @__PURE__ */ d("div", {
303
304
  className: "mt-2 h-3 rounded-full bg-bg-sunken",
@@ -308,7 +309,7 @@ var y = (e) => {
308
309
  }),
309
310
  /* @__PURE__ */ f("div", {
310
311
  className: "mt-2 flex items-center justify-between text-xs text-text-secondary",
311
- children: [/* @__PURE__ */ d("span", { children: e(F.startDate) }), /* @__PURE__ */ d("span", { children: e(F.endDate) })]
312
+ children: [/* @__PURE__ */ d("span", { children: e(P.startDate) }), /* @__PURE__ */ d("span", { children: e(P.endDate) })]
312
313
  })
313
314
  ]
314
315
  }),
@@ -318,25 +319,25 @@ var y = (e) => {
318
319
  className: "rounded-lg bg-info/10 p-3",
319
320
  children: [/* @__PURE__ */ f("div", {
320
321
  className: "flex items-center gap-1.5",
321
- children: [/* @__PURE__ */ d(s, { className: "h-3.5 w-3.5 text-info" }), /* @__PURE__ */ d("span", {
322
+ children: [/* @__PURE__ */ d(o, { className: "h-3.5 w-3.5 text-info" }), /* @__PURE__ */ d("span", {
322
323
  className: "text-xs font-medium text-info",
323
- children: C("healthybowl.crops.planningDetail.timeline.elapsed", "Elapsed")
324
+ children: S("healthybowl.crops.planningDetail.timeline.elapsed", "Elapsed")
324
325
  })]
325
326
  }), /* @__PURE__ */ d("p", {
326
327
  className: "mt-1 text-lg font-bold text-info",
327
- children: C("healthybowl.crops.planningDetail.timeline.days", "{{count}} days", { count: $ })
328
+ children: S("healthybowl.crops.planningDetail.timeline.days", "{{count}} days", { count: We })
328
329
  })]
329
330
  }), /* @__PURE__ */ f("div", {
330
331
  className: "rounded-lg bg-warning/10 p-3",
331
332
  children: [/* @__PURE__ */ f("div", {
332
333
  className: "flex items-center gap-1.5",
333
- children: [/* @__PURE__ */ d(s, { className: "h-3.5 w-3.5 text-warning" }), /* @__PURE__ */ d("span", {
334
+ children: [/* @__PURE__ */ d(o, { className: "h-3.5 w-3.5 text-warning" }), /* @__PURE__ */ d("span", {
334
335
  className: "text-xs font-medium text-warning",
335
- children: C("healthybowl.crops.planningDetail.timeline.remaining", "Remaining")
336
+ children: S("healthybowl.crops.planningDetail.timeline.remaining", "Remaining")
336
337
  })]
337
338
  }), /* @__PURE__ */ d("p", {
338
339
  className: "mt-1 text-lg font-bold text-warning",
339
- children: C("healthybowl.crops.planningDetail.timeline.days", "{{count}} days", { count: We })
340
+ children: S("healthybowl.crops.planningDetail.timeline.days", "{{count}} days", { count: Ge })
340
341
  })]
341
342
  })]
342
343
  })
@@ -347,9 +348,9 @@ var y = (e) => {
347
348
  children: [/* @__PURE__ */ f("h3", {
348
349
  className: "mb-4 flex items-center gap-2 text-sm font-semibold text-text-primary",
349
350
  children: [
350
- /* @__PURE__ */ d(xe, { className: "h-4 w-4 text-success" }),
351
+ /* @__PURE__ */ d(Se, { className: "h-4 w-4 text-success" }),
351
352
  " ",
352
- C("healthybowl.crops.planningDetail.production.title", "Production Details")
353
+ S("healthybowl.crops.planningDetail.production.title", "Production Details")
353
354
  ]
354
355
  }), /* @__PURE__ */ f("div", {
355
356
  className: "grid grid-cols-1 gap-6 sm:grid-cols-2",
@@ -362,16 +363,16 @@ var y = (e) => {
362
363
  children: /* @__PURE__ */ d(u, { className: "h-5 w-5 text-success" })
363
364
  }), /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("span", {
364
365
  className: "text-xs text-text-secondary",
365
- children: C("healthybowl.crops.planningDetail.production.expectedYield", "Expected Yield")
366
+ children: S("healthybowl.crops.planningDetail.production.expectedYield", "Expected Yield")
366
367
  }), /* @__PURE__ */ f("p", {
367
368
  className: "text-xl font-bold text-text-primary",
368
- children: [t(F.expectedYield), " kg"]
369
+ children: [t(P.expectedYield), " kg"]
369
370
  })] })]
370
- }), Z && /* @__PURE__ */ d("p", {
371
+ }), Q && /* @__PURE__ */ d("p", {
371
372
  className: "mt-2 text-xs text-text-secondary",
372
- children: C("healthybowl.crops.planningDetail.production.yieldPerUnit", "~{{amount}} kg per {{unit}}", {
373
- amount: Math.round(F.expectedYield / Z.area),
374
- unit: (Z.unit ?? "").replace(/s$/, "")
373
+ children: S("healthybowl.crops.planningDetail.production.yieldPerUnit", "~{{amount}} kg per {{unit}}", {
374
+ amount: Math.round(P.expectedYield / Q.area),
375
+ unit: (Q.unit ?? "").replace(/s$/, "")
375
376
  })
376
377
  })]
377
378
  }), /* @__PURE__ */ f("div", {
@@ -383,16 +384,16 @@ var y = (e) => {
383
384
  children: /* @__PURE__ */ d(l, { className: "h-5 w-5 text-info" })
384
385
  }), /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("span", {
385
386
  className: "text-xs text-text-secondary",
386
- children: C("healthybowl.crops.planningDetail.production.seedRequired", "Seed Required")
387
+ children: S("healthybowl.crops.planningDetail.production.seedRequired", "Seed Required")
387
388
  }), /* @__PURE__ */ f("p", {
388
389
  className: "text-xl font-bold text-text-primary",
389
- children: [t(F.seedRequired), " kg"]
390
+ children: [t(P.seedRequired), " kg"]
390
391
  })] })]
391
- }), Z && /* @__PURE__ */ d("p", {
392
+ }), Q && /* @__PURE__ */ d("p", {
392
393
  className: "mt-2 text-xs text-text-secondary",
393
- children: C("healthybowl.crops.planningDetail.production.seedPerUnit", "~{{amount}} kg per {{unit}}", {
394
- amount: (F.seedRequired / Z.area).toFixed(1),
395
- unit: (Z.unit ?? "").replace(/s$/, "")
394
+ children: S("healthybowl.crops.planningDetail.production.seedPerUnit", "~{{amount}} kg per {{unit}}", {
395
+ amount: (P.seedRequired / Q.area).toFixed(1),
396
+ unit: (Q.unit ?? "").replace(/s$/, "")
396
397
  })
397
398
  })]
398
399
  })]
@@ -405,17 +406,17 @@ var y = (e) => {
405
406
  children: [
406
407
  /* @__PURE__ */ d(a, { className: "h-4 w-4 text-primary" }),
407
408
  " ",
408
- C("healthybowl.crops.planningDetail.fertilizers.title", "Fertilizers")
409
+ S("healthybowl.crops.planningDetail.fertilizers.title", "Fertilizers")
409
410
  ]
410
- }), F.fertilizers.length > 0 ? /* @__PURE__ */ d("div", {
411
+ }), P.fertilizers.length > 0 ? /* @__PURE__ */ d("div", {
411
412
  className: "flex flex-wrap gap-2",
412
- children: F.fertilizers.map((e) => /* @__PURE__ */ f("span", {
413
+ children: P.fertilizers.map((e) => /* @__PURE__ */ f("span", {
413
414
  className: "inline-flex items-center gap-1.5 rounded-lg border border-border-subtle bg-bg-sunken/50 px-3 py-2 text-sm font-medium text-text-primary",
414
415
  children: [/* @__PURE__ */ d(a, { className: "h-3.5 w-3.5 text-primary" }), e]
415
416
  }, e))
416
417
  }) : /* @__PURE__ */ d("p", {
417
418
  className: "text-sm text-text-secondary",
418
- children: C("healthybowl.crops.planningDetail.fertilizers.empty", "No fertilizers specified.")
419
+ children: S("healthybowl.crops.planningDetail.fertilizers.empty", "No fertilizers specified.")
419
420
  })]
420
421
  })
421
422
  ]
@@ -427,7 +428,7 @@ var y = (e) => {
427
428
  children: [
428
429
  /* @__PURE__ */ d("h3", {
429
430
  className: "mb-4 text-sm font-semibold text-text-primary",
430
- children: C("healthybowl.crops.planningDetail.statusCard.title", "Plan Status")
431
+ children: S("healthybowl.crops.planningDetail.statusCard.title", "Plan Status")
431
432
  }),
432
433
  /* @__PURE__ */ f("div", {
433
434
  className: "space-y-3",
@@ -436,72 +437,72 @@ var y = (e) => {
436
437
  className: "flex items-center justify-between",
437
438
  children: [/* @__PURE__ */ d("span", {
438
439
  className: "text-xs text-text-secondary",
439
- children: C("healthybowl.crops.planningDetail.statusCard.status", "Status")
440
+ children: S("healthybowl.crops.planningDetail.statusCard.status", "Status")
440
441
  }), /* @__PURE__ */ d(r, {
441
- label: F.status,
442
- variant: y(F.status ?? "unknown")
442
+ label: P.status,
443
+ variant: Oe(P.status ?? "unknown")
443
444
  })]
444
445
  }),
445
446
  /* @__PURE__ */ f("div", {
446
447
  className: "flex items-center justify-between",
447
448
  children: [/* @__PURE__ */ d("span", {
448
449
  className: "text-xs text-text-secondary",
449
- children: C("healthybowl.crops.planningDetail.statusCard.priority", "Priority")
450
+ children: S("healthybowl.crops.planningDetail.statusCard.priority", "Priority")
450
451
  }), /* @__PURE__ */ d(r, {
451
- label: F.priority,
452
- variant: b(F.priority)
452
+ label: P.priority,
453
+ variant: y(P.priority)
453
454
  })]
454
455
  }),
455
456
  /* @__PURE__ */ f("div", {
456
457
  className: "flex items-center justify-between",
457
458
  children: [/* @__PURE__ */ d("span", {
458
459
  className: "text-xs text-text-secondary",
459
- children: C("healthybowl.crops.planningDetail.statusCard.weatherRisk", "Weather Risk")
460
+ children: S("healthybowl.crops.planningDetail.statusCard.weatherRisk", "Weather Risk")
460
461
  }), /* @__PURE__ */ d(r, {
461
- label: F.weatherRisk,
462
- variant: x(F.weatherRisk)
462
+ label: P.weatherRisk,
463
+ variant: b(P.weatherRisk)
463
464
  })]
464
465
  }),
465
466
  /* @__PURE__ */ f("div", {
466
467
  className: "flex items-center justify-between",
467
468
  children: [/* @__PURE__ */ d("span", {
468
469
  className: "text-xs text-text-secondary",
469
- children: C("healthybowl.crops.planningDetail.statusCard.season", "Season")
470
+ children: S("healthybowl.crops.planningDetail.statusCard.season", "Season")
470
471
  }), /* @__PURE__ */ d("span", {
471
472
  className: "text-xs font-medium capitalize text-text-primary",
472
- children: w(F.season)
473
+ children: C(P.season)
473
474
  })]
474
475
  })
475
476
  ]
476
477
  }),
477
- F.priority === "high" && /* @__PURE__ */ d("div", {
478
+ P.priority === "high" && /* @__PURE__ */ d("div", {
478
479
  className: "mt-4 rounded-lg bg-status-error-bg/10 p-3",
479
480
  children: /* @__PURE__ */ f("div", {
480
481
  className: "flex items-start gap-2",
481
- children: [/* @__PURE__ */ d(he, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-status-error-text" }), /* @__PURE__ */ d("p", {
482
+ children: [/* @__PURE__ */ d(ge, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-status-error-text" }), /* @__PURE__ */ d("p", {
482
483
  className: "text-xs text-status-error-text",
483
- children: C("healthybowl.crops.planningDetail.alerts.highPriority", "High priority plan. Ensure resources are allocated promptly.")
484
+ children: S("healthybowl.crops.planningDetail.alerts.highPriority", "High priority plan. Ensure resources are allocated promptly.")
484
485
  })]
485
486
  })
486
487
  }),
487
- F.weatherRisk === "high" && /* @__PURE__ */ d("div", {
488
+ P.weatherRisk === "high" && /* @__PURE__ */ d("div", {
488
489
  className: "mt-3 rounded-lg bg-warning/10 p-3",
489
490
  children: /* @__PURE__ */ f("div", {
490
491
  className: "flex items-start gap-2",
491
- children: [/* @__PURE__ */ d(ve, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-warning" }), /* @__PURE__ */ d("p", {
492
+ children: [/* @__PURE__ */ d(s, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-warning" }), /* @__PURE__ */ d("p", {
492
493
  className: "text-xs text-warning",
493
- children: C("healthybowl.crops.planningDetail.alerts.highWeatherRisk", "High weather risk. Monitor forecasts closely and prepare contingency plans.")
494
+ children: S("healthybowl.crops.planningDetail.alerts.highWeatherRisk", "High weather risk. Monitor forecasts closely and prepare contingency plans.")
494
495
  })]
495
496
  })
496
497
  })
497
498
  ]
498
499
  }),
499
- Z && /* @__PURE__ */ f("div", {
500
+ Q && /* @__PURE__ */ f("div", {
500
501
  className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
501
502
  children: [
502
503
  /* @__PURE__ */ d("h3", {
503
504
  className: "mb-4 text-sm font-semibold text-text-primary",
504
- children: C("healthybowl.crops.planningDetail.fieldCard.title", "Field Details")
505
+ children: S("healthybowl.crops.planningDetail.fieldCard.title", "Field Details")
505
506
  }),
506
507
  /* @__PURE__ */ f("div", {
507
508
  className: "space-y-3",
@@ -510,23 +511,23 @@ var y = (e) => {
510
511
  className: "flex items-center justify-between",
511
512
  children: [/* @__PURE__ */ d("span", {
512
513
  className: "text-xs text-text-secondary",
513
- children: C("healthybowl.crops.planningDetail.fieldCard.name", "Name")
514
+ children: S("healthybowl.crops.planningDetail.fieldCard.name", "Name")
514
515
  }), /* @__PURE__ */ d("span", {
515
516
  className: "text-xs font-medium text-text-primary",
516
- children: Z.name
517
+ children: Q.name
517
518
  })]
518
519
  }),
519
520
  /* @__PURE__ */ f("div", {
520
521
  className: "flex items-center justify-between",
521
522
  children: [/* @__PURE__ */ d("span", {
522
523
  className: "text-xs text-text-secondary",
523
- children: C("healthybowl.crops.planningDetail.fieldCard.area", "Area")
524
+ children: S("healthybowl.crops.planningDetail.fieldCard.area", "Area")
524
525
  }), /* @__PURE__ */ f("span", {
525
526
  className: "text-xs font-medium text-text-primary",
526
527
  children: [
527
- Z.area,
528
+ Q.area,
528
529
  " ",
529
- Z.unit
530
+ Q.unit
530
531
  ]
531
532
  })]
532
533
  }),
@@ -534,42 +535,42 @@ var y = (e) => {
534
535
  className: "flex items-center justify-between",
535
536
  children: [/* @__PURE__ */ d("span", {
536
537
  className: "text-xs text-text-secondary",
537
- children: C("healthybowl.crops.planningDetail.fieldCard.soilType", "Soil Type")
538
+ children: S("healthybowl.crops.planningDetail.fieldCard.soilType", "Soil Type")
538
539
  }), /* @__PURE__ */ d("span", {
539
540
  className: "text-xs font-medium text-text-primary",
540
- children: Z.soilType
541
+ children: Q.soilType
541
542
  })]
542
543
  }),
543
544
  /* @__PURE__ */ f("div", {
544
545
  className: "flex items-center justify-between",
545
546
  children: [/* @__PURE__ */ d("span", {
546
547
  className: "text-xs text-text-secondary",
547
- children: C("healthybowl.crops.planningDetail.fieldCard.irrigation", "Irrigation")
548
+ children: S("healthybowl.crops.planningDetail.fieldCard.irrigation", "Irrigation")
548
549
  }), /* @__PURE__ */ d("span", {
549
550
  className: "text-xs font-medium text-text-primary",
550
- children: Z.irrigationType
551
+ children: Q.irrigationType
551
552
  })]
552
553
  }),
553
554
  /* @__PURE__ */ f("div", {
554
555
  className: "flex items-center justify-between",
555
556
  children: [/* @__PURE__ */ d("span", {
556
557
  className: "text-xs text-text-secondary",
557
- children: C("healthybowl.crops.planningDetail.fieldCard.status", "Status")
558
+ children: S("healthybowl.crops.planningDetail.fieldCard.status", "Status")
558
559
  }), /* @__PURE__ */ d(r, {
559
- label: Z.status,
560
- variant: Z.status === "active" ? "success" : "muted"
560
+ label: Q.status,
561
+ variant: Q.status === "active" ? "success" : "muted"
561
562
  })]
562
563
  })
563
564
  ]
564
565
  }),
565
566
  /* @__PURE__ */ f(p, {
566
567
  variant: "outline",
567
- onClick: () => k(A(`crops/fields/${Z.id}`)),
568
+ onClick: () => O(k(`crops/fields/${Q.id}`)),
568
569
  className: "mt-4 w-full",
569
570
  children: [
570
571
  /* @__PURE__ */ d(c, { className: "h-4 w-4 text-text-secondary" }),
571
572
  " ",
572
- C("healthybowl.crops.planningDetail.fieldCard.viewField", "View Field")
573
+ S("healthybowl.crops.planningDetail.fieldCard.viewField", "View Field")
573
574
  ]
574
575
  })
575
576
  ]
@@ -578,48 +579,48 @@ var y = (e) => {
578
579
  className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
579
580
  children: [/* @__PURE__ */ d("h3", {
580
581
  className: "mb-4 text-sm font-semibold text-text-primary",
581
- children: C("healthybowl.crops.planningDetail.quickActions.title", "Quick Actions")
582
+ children: S("healthybowl.crops.planningDetail.quickActions.title", "Quick Actions")
582
583
  }), /* @__PURE__ */ f("div", {
583
584
  className: "space-y-2",
584
585
  children: [
585
586
  /* @__PURE__ */ f(p, {
586
587
  variant: "outline",
587
- onClick: () => k(A("weather")),
588
+ onClick: () => O(k("weather")),
588
589
  className: "w-full justify-start",
589
590
  children: [
590
- /* @__PURE__ */ d(ve, { className: "h-4 w-4 text-text-secondary" }),
591
+ /* @__PURE__ */ d(s, { className: "h-4 w-4 text-text-secondary" }),
591
592
  " ",
592
- C("healthybowl.crops.planningDetail.quickActions.checkWeather", "Check Weather")
593
+ S("healthybowl.crops.planningDetail.quickActions.checkWeather", "Check Weather")
593
594
  ]
594
595
  }),
595
596
  /* @__PURE__ */ f(p, {
596
597
  variant: "outline",
597
- onClick: () => k(A("crops")),
598
+ onClick: () => O(k("crops")),
598
599
  className: "w-full justify-start",
599
600
  children: [
600
601
  /* @__PURE__ */ d(l, { className: "h-4 w-4 text-text-secondary" }),
601
602
  " ",
602
- C("healthybowl.crops.planningDetail.quickActions.allCrops", "All Crops")
603
+ S("healthybowl.crops.planningDetail.quickActions.allCrops", "All Crops")
603
604
  ]
604
605
  }),
605
606
  /* @__PURE__ */ f(p, {
606
607
  variant: "outline",
607
- onClick: () => k(A("crops/planning")),
608
+ onClick: () => O(k("crops/planning")),
608
609
  className: "w-full justify-start",
609
610
  children: [
610
- /* @__PURE__ */ d(o, { className: "h-4 w-4 text-text-secondary" }),
611
+ /* @__PURE__ */ d(ye, { className: "h-4 w-4 text-text-secondary" }),
611
612
  " ",
612
- C("healthybowl.crops.planningDetail.quickActions.allPlans", "All Plans")
613
+ S("healthybowl.crops.planningDetail.quickActions.allPlans", "All Plans")
613
614
  ]
614
615
  }),
615
616
  /* @__PURE__ */ f(p, {
616
617
  variant: "outline",
617
- onClick: () => k(A("analytics")),
618
+ onClick: () => O(k("analytics")),
618
619
  className: "w-full justify-start",
619
620
  children: [
620
621
  /* @__PURE__ */ d(u, { className: "h-4 w-4 text-text-secondary" }),
621
622
  " ",
622
- C("healthybowl.crops.planningDetail.quickActions.analytics", "Analytics")
623
+ S("healthybowl.crops.planningDetail.quickActions.analytics", "Analytics")
623
624
  ]
624
625
  })
625
626
  ]
@@ -628,174 +629,178 @@ var y = (e) => {
628
629
  ]
629
630
  })]
630
631
  }),
632
+ /* @__PURE__ */ d(pe, {
633
+ plan: P,
634
+ crops: E
635
+ }),
631
636
  /* @__PURE__ */ d(se, {
632
- open: Fe,
633
- onClose: () => M(!1),
634
- title: C("healthybowl.crops.planningDetail.editModal.title", "Edit Plan - {{crop}}", { crop: F.cropName }),
635
- description: C("healthybowl.crops.planningDetail.editModal.description", "Update planting plan details"),
637
+ open: Le,
638
+ onClose: () => j(!1),
639
+ title: S("healthybowl.crops.planningDetail.editModal.title", "Edit Plan - {{crop}}", { crop: P.cropName }),
640
+ description: S("healthybowl.crops.planningDetail.editModal.description", "Update planting plan details"),
636
641
  size: "lg",
637
- footer: /* @__PURE__ */ f(Te, { children: [/* @__PURE__ */ d(p, {
642
+ footer: /* @__PURE__ */ f(Ee, { children: [/* @__PURE__ */ d(p, {
638
643
  variant: "outline",
639
- onClick: () => M(!1),
640
- children: C("healthybowl.common.cancel", "Cancel")
644
+ onClick: () => j(!1),
645
+ children: S("healthybowl.common.cancel", "Cancel")
641
646
  }), /* @__PURE__ */ d(p, {
642
647
  onClick: async () => {
643
- if (!F) return;
644
- if (!I) {
645
- j({
646
- title: C("healthybowl.crops.planningDetail.toast.missingFields.title", "Missing required fields"),
647
- description: C("healthybowl.crops.planningDetail.toast.missingFields.description", "Crop is required."),
648
+ if (!P) return;
649
+ if (!F) {
650
+ A({
651
+ title: S("healthybowl.crops.planningDetail.toast.missingFields.title", "Missing required fields"),
652
+ description: S("healthybowl.crops.planningDetail.toast.missingFields.description", "Crop is required."),
648
653
  variant: "warning"
649
654
  });
650
655
  return;
651
656
  }
652
- let e = D.find((e) => e.id === I);
653
- P(!0);
657
+ let e = E.find((e) => e.id === F);
658
+ N(!0);
654
659
  try {
655
- await Ae({
656
- id: F.id,
657
- cropId: I,
658
- fieldId: R || void 0,
659
- startDate: B || void 0,
660
- endDate: H || void 0,
661
- expectedYield: W ? Number(W) : void 0,
662
- seedRequired: K ? Number(K) : void 0,
663
- priority: J,
664
- status: X
665
- }), j({
666
- title: C("healthybowl.crops.planningDetail.toast.updated.title", "Plan updated"),
667
- description: C("healthybowl.crops.planningDetail.toast.updated.description", "{{crop}} plan has been saved.", { crop: e?.name ?? F.cropName }),
660
+ await Me({
661
+ id: P.id,
662
+ cropId: F,
663
+ fieldId: L || void 0,
664
+ startDate: z || void 0,
665
+ endDate: V || void 0,
666
+ expectedYield: U ? Number(U) : void 0,
667
+ seedRequired: G ? Number(G) : void 0,
668
+ priority: q,
669
+ status: Y
670
+ }), A({
671
+ title: S("healthybowl.crops.planningDetail.toast.updated.title", "Plan updated"),
672
+ description: S("healthybowl.crops.planningDetail.toast.updated.description", "{{crop}} plan has been saved.", { crop: e?.name ?? P.cropName }),
668
673
  variant: "success"
669
- }), M(!1);
674
+ }), j(!1);
670
675
  } catch (e) {
671
- j({
672
- title: C("healthybowl.crops.planningDetail.toast.updateFailed.title", "Update failed"),
676
+ A({
677
+ title: S("healthybowl.crops.planningDetail.toast.updateFailed.title", "Update failed"),
673
678
  description: String(e),
674
679
  variant: "error"
675
680
  });
676
681
  } finally {
677
- P(!1);
682
+ N(!1);
678
683
  }
679
684
  },
680
- disabled: N,
681
- children: N ? C("healthybowl.crops.planningDetail.editModal.saving", "Saving...") : C("healthybowl.crops.planningDetail.editModal.save", "Save Changes")
685
+ disabled: M,
686
+ children: M ? S("healthybowl.crops.planningDetail.editModal.saving", "Saving...") : S("healthybowl.crops.planningDetail.editModal.save", "Save Changes")
682
687
  })] }),
683
688
  children: /* @__PURE__ */ f("div", {
684
689
  className: "grid gap-4 sm:grid-cols-2",
685
690
  children: [
686
691
  /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
687
692
  className: "text-sm font-medium text-text-primary",
688
- children: C("healthybowl.crops.planningDetail.form.cropName", "Crop Name")
693
+ children: S("healthybowl.crops.planningDetail.form.cropName", "Crop Name")
689
694
  }), /* @__PURE__ */ f(m, {
690
- value: I,
691
- onValueChange: L,
695
+ value: F,
696
+ onValueChange: I,
692
697
  children: [/* @__PURE__ */ d(_, {
693
698
  className: "mt-1 w-full",
694
699
  children: /* @__PURE__ */ d(v, {})
695
- }), /* @__PURE__ */ d(h, { children: D.map((e) => /* @__PURE__ */ d(g, {
700
+ }), /* @__PURE__ */ d(h, { children: E.map((e) => /* @__PURE__ */ d(g, {
696
701
  value: e.id,
697
702
  children: e.variety ? `${e.name} - ${e.variety}` : e.name
698
703
  }, e.id)) })]
699
704
  })] }),
700
705
  /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
701
706
  className: "text-sm font-medium text-text-primary",
702
- children: C("healthybowl.crops.planningDetail.form.field", "Field")
707
+ children: S("healthybowl.crops.planningDetail.form.field", "Field")
703
708
  }), /* @__PURE__ */ f(m, {
704
- value: R,
705
- onValueChange: z,
709
+ value: L,
710
+ onValueChange: R,
706
711
  children: [/* @__PURE__ */ d(_, {
707
712
  className: "mt-1 w-full",
708
713
  children: /* @__PURE__ */ d(v, {})
709
- }), /* @__PURE__ */ d(h, { children: E.map((e) => /* @__PURE__ */ d(g, {
714
+ }), /* @__PURE__ */ d(h, { children: T.map((e) => /* @__PURE__ */ d(g, {
710
715
  value: e.id,
711
716
  children: e.name
712
717
  }, e.id)) })]
713
718
  })] }),
714
719
  /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
715
720
  className: "text-sm font-medium text-text-primary",
716
- children: C("healthybowl.crops.planningDetail.form.startDate", "Start Date")
721
+ children: S("healthybowl.crops.planningDetail.form.startDate", "Start Date")
717
722
  }), /* @__PURE__ */ d("input", {
718
723
  type: "date",
719
- value: B,
720
- onChange: (e) => V(e.target.value),
724
+ value: z,
725
+ onChange: (e) => B(e.target.value),
721
726
  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)]"
722
727
  })] }),
723
728
  /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
724
729
  className: "text-sm font-medium text-text-primary",
725
- children: C("healthybowl.crops.planningDetail.form.endDate", "End Date")
730
+ children: S("healthybowl.crops.planningDetail.form.endDate", "End Date")
726
731
  }), /* @__PURE__ */ d("input", {
727
732
  type: "date",
728
- value: H,
729
- onChange: (e) => U(e.target.value),
733
+ value: V,
734
+ onChange: (e) => H(e.target.value),
730
735
  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)]"
731
736
  })] }),
732
737
  /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
733
738
  className: "text-sm font-medium text-text-primary",
734
- children: C("healthybowl.crops.planningDetail.form.expectedYield", "Expected Yield (kg)")
739
+ children: S("healthybowl.crops.planningDetail.form.expectedYield", "Expected Yield (kg)")
735
740
  }), /* @__PURE__ */ d("input", {
736
741
  type: "number",
737
- value: W,
738
- onChange: (e) => G(e.target.value),
742
+ value: U,
743
+ onChange: (e) => W(e.target.value),
739
744
  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)]"
740
745
  })] }),
741
746
  /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
742
747
  className: "text-sm font-medium text-text-primary",
743
- children: C("healthybowl.crops.planningDetail.form.seedRequired", "Seed Required (kg)")
748
+ children: S("healthybowl.crops.planningDetail.form.seedRequired", "Seed Required (kg)")
744
749
  }), /* @__PURE__ */ d("input", {
745
750
  type: "number",
746
- value: K,
747
- onChange: (e) => q(e.target.value),
751
+ value: G,
752
+ onChange: (e) => K(e.target.value),
748
753
  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)]"
749
754
  })] }),
750
755
  /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
751
756
  className: "text-sm font-medium text-text-primary",
752
- children: C("healthybowl.crops.planningDetail.form.priority", "Priority")
757
+ children: S("healthybowl.crops.planningDetail.form.priority", "Priority")
753
758
  }), /* @__PURE__ */ f(m, {
754
- value: J,
755
- onValueChange: (e) => Y(e),
759
+ value: q,
760
+ onValueChange: (e) => J(e),
756
761
  children: [/* @__PURE__ */ d(_, {
757
762
  className: "mt-1 w-full",
758
763
  children: /* @__PURE__ */ d(v, {})
759
764
  }), /* @__PURE__ */ f(h, { children: [
760
765
  /* @__PURE__ */ d(g, {
761
766
  value: "low",
762
- children: C("healthybowl.crops.planningDetail.priorityOptions.low", "Low")
767
+ children: S("healthybowl.crops.planningDetail.priorityOptions.low", "Low")
763
768
  }),
764
769
  /* @__PURE__ */ d(g, {
765
770
  value: "medium",
766
- children: C("healthybowl.crops.planningDetail.priorityOptions.medium", "Medium")
771
+ children: S("healthybowl.crops.planningDetail.priorityOptions.medium", "Medium")
767
772
  }),
768
773
  /* @__PURE__ */ d(g, {
769
774
  value: "high",
770
- children: C("healthybowl.crops.planningDetail.priorityOptions.high", "High")
775
+ children: S("healthybowl.crops.planningDetail.priorityOptions.high", "High")
771
776
  })
772
777
  ] })]
773
778
  })] }),
774
779
  /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
775
780
  className: "text-sm font-medium text-text-primary",
776
- children: C("healthybowl.crops.planningDetail.form.status", "Status")
781
+ children: S("healthybowl.crops.planningDetail.form.status", "Status")
777
782
  }), /* @__PURE__ */ f(m, {
778
- value: X,
779
- onValueChange: (e) => Le(e),
783
+ value: Y,
784
+ onValueChange: (e) => X(e),
780
785
  children: [/* @__PURE__ */ d(_, {
781
786
  className: "mt-1 w-full",
782
787
  children: /* @__PURE__ */ d(v, {})
783
788
  }), /* @__PURE__ */ f(h, { children: [
784
789
  /* @__PURE__ */ d(g, {
785
790
  value: "draft",
786
- children: C("healthybowl.crops.planningDetail.statusOptions.draft", "Draft")
791
+ children: S("healthybowl.crops.planningDetail.statusOptions.draft", "Draft")
787
792
  }),
788
793
  /* @__PURE__ */ d(g, {
789
794
  value: "approved",
790
- children: C("healthybowl.crops.planningDetail.statusOptions.approved", "Approved")
795
+ children: S("healthybowl.crops.planningDetail.statusOptions.approved", "Approved")
791
796
  }),
792
797
  /* @__PURE__ */ d(g, {
793
798
  value: "active",
794
- children: C("healthybowl.crops.planningDetail.statusOptions.active", "Active")
799
+ children: S("healthybowl.crops.planningDetail.statusOptions.active", "Active")
795
800
  }),
796
801
  /* @__PURE__ */ d(g, {
797
802
  value: "completed",
798
- children: C("healthybowl.crops.planningDetail.statusOptions.completed", "Completed")
803
+ children: S("healthybowl.crops.planningDetail.statusOptions.completed", "Completed")
799
804
  })
800
805
  ] })]
801
806
  })] })
@@ -803,13 +808,13 @@ var y = (e) => {
803
808
  })
804
809
  }),
805
810
  /* @__PURE__ */ d(re, {
806
- toasts: Ne,
807
- onDismiss: Pe
811
+ toasts: Fe,
812
+ onDismiss: Ie
808
813
  })
809
814
  ]
810
815
  });
811
816
  };
812
817
  //#endregion
813
- export { C as PlanningDetailsPage };
818
+ export { S as PlanningDetailsPage };
814
819
 
815
820
  //# sourceMappingURL=PlanningDetailsPage.js.map