@burdenoff/microfe-healthybowl 2026.801.2 → 2026.801.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,250 +3,272 @@ import { useBasePath as n } from "../../hooks/useBasePath.js";
3
3
  import { PageLayout as r } from "../../components/PageLayout.js";
4
4
  import { StatusBadge as i } from "../../components/StatusBadge.js";
5
5
  import { EmptyState as ee } from "../../components/EmptyState.js";
6
- import { ErrorState as te } from "../../components/ErrorState.js";
7
- import { ToastContainer as ne } from "../../components/Toast.js";
8
- import { useConfirm as re } from "../../components/ConfirmDialog.js";
9
- import { Breadcrumbs as ie } from "../../components/Breadcrumbs.js";
10
- import { PageLoader as ae } from "../../components/PageLoader.js";
11
- import { Modal as oe } from "../../components/Modal.js";
12
- import { useToast as se } from "../../hooks/useToast.js";
13
- import { FieldMap as ce } from "../../components/FieldMap.js";
14
- import { CreateFarmTaskButton as le } from "../../components/CreateFarmTaskButton.js";
6
+ import { ErrorState as a } from "../../components/ErrorState.js";
7
+ import { ToastContainer as te } from "../../components/Toast.js";
8
+ import { useConfirm as ne } from "../../components/ConfirmDialog.js";
9
+ import { Breadcrumbs as re } from "../../components/Breadcrumbs.js";
10
+ import { PageLoader as ie } from "../../components/PageLoader.js";
11
+ import { Modal as ae } from "../../components/Modal.js";
12
+ import { useToast as oe } from "../../hooks/useToast.js";
13
+ import { FieldMap as se } from "../../components/FieldMap.js";
14
+ import { CreateFarmTaskButton as ce } from "../../components/CreateFarmTaskButton.js";
15
15
  import "../../components/index.js";
16
- import { useHealthyBowlData as ue } from "../../hooks/useHealthyBowlData.js";
17
- import { usePlantCatalog as de } from "../../hooks/usePlantCatalog.js";
18
- import { DEFAULT_BED_WIDTH_M as fe, DEFAULT_CROP_SPACING_PRESET as pe, DEFAULT_PATH_WIDTH_M as me, estimatePlantingCapacity as he, getCropSpacingPreset as a } from "../../utils/plantingCapacity.js";
16
+ import { useHealthyBowlData as le } from "../../hooks/useHealthyBowlData.js";
17
+ import { usePlantCatalog as ue } from "../../hooks/usePlantCatalog.js";
18
+ import { DEFAULT_BED_WIDTH_M as de, DEFAULT_CROP_SPACING_PRESET as fe, DEFAULT_PATH_WIDTH_M as pe, estimatePlantingCapacity as me, getCropSpacingPreset as he } from "../../utils/plantingCapacity.js";
19
19
  import { useSuccessionPlanning as ge } from "../../hooks/useSuccessionPlanning.js";
20
20
  import { computeSeedRate as _e } from "../../utils/seedRate.js";
21
- import { useCallback as ve, useEffect as ye, useMemo as o, useState as s } from "react";
22
- import { useI18n as be } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
23
- import { Activity as xe, ArrowLeft as Se, BarChart3 as Ce, Calendar as we, CloudRain as Te, Droplets as Ee, Edit as De, Eye as Oe, Leaf as ke, Map as Ae, Plus as je, Sprout as Me, Sun as Ne, Thermometer as Pe, Trash2 as Fe, TrendingUp as Ie, Wind as Le } from "lucide-react";
24
- import { useNavigate as Re, useParams as ze } from "react-router";
25
- import { Fragment as Be, jsx as c, jsxs as l } from "react/jsx-runtime";
26
- import { Button as u, GlassCard as Ve, Select as d, SelectContent as f, SelectItem as p, SelectTrigger as m, SelectValue as h } from "@burdenoff/fe-libs/ui";
21
+ import { buildCropComparison as ve, sortCropComparison as ye } from "../../utils/cropComparison.js";
22
+ import { useCallback as be, useEffect as xe, useMemo as o, useState as s } from "react";
23
+ import { useI18n as Se } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
24
+ import { Activity as Ce, ArrowLeft as we, BarChart3 as Te, Calendar as Ee, ChevronDown as c, ChevronUp as De, CloudRain as Oe, Droplets as ke, Edit as Ae, Eye as je, Leaf as Me, Map as Ne, Plus as Pe, Sprout as Fe, Sun as Ie, Table2 as Le, Thermometer as Re, Trash2 as ze, TrendingUp as Be, Wind as Ve } from "lucide-react";
25
+ import { useNavigate as He, useParams as Ue } from "react-router";
26
+ import { Fragment as We, jsx as l, jsxs as u } from "react/jsx-runtime";
27
+ import { Button as d, GlassCard as Ge, Select as f, SelectContent as p, SelectItem as m, SelectTrigger as h, SelectValue as g } from "@burdenoff/fe-libs/ui";
27
28
  //#region src/healthybowl/pages/crops/FieldDetailsPage.tsx
28
- var He = (e) => {
29
+ var Ke = (e) => {
29
30
  switch (e) {
30
31
  case "active": return "success";
31
32
  case "fallow": return "muted";
32
33
  case "preparation": return "warning";
33
34
  default: return "default";
34
35
  }
35
- }, Ue = (e) => {
36
+ }, qe = (e) => {
36
37
  switch (e) {
37
38
  case "optimal": return "success";
38
39
  case "acceptable": return "info";
39
40
  case "needs_attention": return "warning";
40
41
  default: return "error";
41
42
  }
42
- }, g = (e, t) => {
43
+ }, _ = (e, t) => {
43
44
  let n = Number(e);
44
45
  return Number.isFinite(n) && n > 0 ? n : t;
45
- }, We = (e, t) => {
46
+ }, Je = (e, t) => {
46
47
  let n = Number(e);
47
48
  return Number.isFinite(n) && n >= 0 ? n : t;
48
- }, _ = (e, t = 1) => new Intl.NumberFormat("en-US", { maximumFractionDigits: t }).format(e), v = () => {
49
- let { t: v } = be(), Ge = re(), { fields: Ke, crops: x, soilTests: qe, weatherData: S, errors: Je, loadings: Ye, updateField: Xe, deleteField: Ze, refetch: Qe } = ue(), { fieldId: $e } = ze(), C = Re(), { buildPath: w } = n(), { toasts: et, toast: T, dismiss: tt } = se(), [nt, E] = s(!1), [D, O] = s(!1), k = Ke.find((e) => e.id === $e), [A, rt] = s(""), [j, it] = s(""), [at, ot] = s("acres"), [st, M] = s(""), [ct, lt] = s(""), [ut, dt] = s("active"), [ft, pt] = s(!1), [N, mt] = s(""), { entries: P } = de(), [F, I] = s(""), [L, R] = s(String(pe.plantSpacingCm)), [z, B] = s(String(pe.rowSpacingCm)), [V, ht] = s(String(fe)), [H, gt] = s(String(me)), [U, _t] = s(null), vt = () => {
50
- k && (rt(k.name), it(String(k.area)), ot(k.unit ?? "acres"), M(k.soilType), lt(k.irrigationType), dt(k.status), pt(k.organicCertified), E(!0));
51
- }, yt = async () => {
52
- if (k) {
53
- if (!A.trim() || !j) {
49
+ }, v = (e, t = 1) => new Intl.NumberFormat("en-US", { maximumFractionDigits: t }).format(e), Ye = () => {
50
+ let { t: c } = Se(), De = ne(), { fields: Ye, crops: S, soilTests: Xe, weatherData: Ze, errors: Qe, loadings: $e, updateField: et, deleteField: tt, refetch: nt } = le(), { fieldId: rt } = Ue(), C = He(), { buildPath: w } = n(), { toasts: it, toast: T, dismiss: at } = oe(), [ot, E] = s(!1), [st, D] = s(!1), O = Ye.find((e) => e.id === rt), [k, ct] = s(""), [lt, ut] = s(""), [dt, ft] = s("acres"), [pt, mt] = s(""), [ht, gt] = s(""), [_t, vt] = s("active"), [yt, bt] = s(!1), [A, xt] = s(""), { entries: j } = ue(), [M, St] = s(""), [N, P] = s(String(fe.plantSpacingCm)), [Ct, F] = s(String(fe.rowSpacingCm)), [I, wt] = s(String(de)), [L, Tt] = s(String(pe)), [R, Et] = s(null), Dt = () => {
51
+ O && (ct(O.name), ut(String(O.area)), ft(O.unit ?? "acres"), mt(O.soilType), gt(O.irrigationType), vt(O.status), bt(O.organicCertified), E(!0));
52
+ }, Ot = async () => {
53
+ if (O) {
54
+ if (!k.trim() || !lt) {
54
55
  T({
55
- title: v("healthybowl.crops.fieldDetail.toast.missingFields.title", "Missing required fields"),
56
- description: v("healthybowl.crops.fieldDetail.toast.missingFields.description", "Name and area are required."),
56
+ title: c("healthybowl.crops.fieldDetail.toast.missingFields.title", "Missing required fields"),
57
+ description: c("healthybowl.crops.fieldDetail.toast.missingFields.description", "Name and area are required."),
57
58
  variant: "warning"
58
59
  });
59
60
  return;
60
61
  }
61
- O(!0);
62
+ D(!0);
62
63
  try {
63
- await Xe({
64
- id: k.id,
65
- name: A.trim(),
66
- area: Number(j),
67
- unit: at,
68
- soilType: st.trim() || "Unknown",
69
- irrigationType: ct.trim() || "None",
70
- status: ut,
71
- organicCertified: ft
64
+ await et({
65
+ id: O.id,
66
+ name: k.trim(),
67
+ area: Number(lt),
68
+ unit: dt,
69
+ soilType: pt.trim() || "Unknown",
70
+ irrigationType: ht.trim() || "None",
71
+ status: _t,
72
+ organicCertified: yt
72
73
  }), T({
73
- title: v("healthybowl.crops.fieldDetail.toast.updated.title", "Field updated"),
74
- description: v("healthybowl.crops.fieldDetail.toast.updated.description", "{{name}} has been saved.", { name: A.trim() }),
74
+ title: c("healthybowl.crops.fieldDetail.toast.updated.title", "Field updated"),
75
+ description: c("healthybowl.crops.fieldDetail.toast.updated.description", "{{name}} has been saved.", { name: k.trim() }),
75
76
  variant: "success"
76
77
  }), E(!1);
77
78
  } catch (e) {
78
79
  T({
79
- title: v("healthybowl.crops.fieldDetail.toast.updateFailed.title", "Update failed"),
80
+ title: c("healthybowl.crops.fieldDetail.toast.updateFailed.title", "Update failed"),
80
81
  description: String(e),
81
82
  variant: "error"
82
83
  });
83
84
  } finally {
84
- O(!1);
85
+ D(!1);
85
86
  }
86
87
  }
87
- }, bt = async () => {
88
- if (k && await Ge({
89
- title: v("healthybowl.crops.fieldDetail.deleteConfirm.title", "Delete field?"),
90
- message: v("healthybowl.crops.fieldDetail.deleteConfirm.message", "{{name}} will be permanently removed.", { name: k.name }),
91
- okButtonTitle: v("healthybowl.common.delete", "Delete"),
92
- cancelButtonTitle: v("healthybowl.common.cancel", "Cancel")
88
+ }, kt = async () => {
89
+ if (O && await De({
90
+ title: c("healthybowl.crops.fieldDetail.deleteConfirm.title", "Delete field?"),
91
+ message: c("healthybowl.crops.fieldDetail.deleteConfirm.message", "{{name}} will be permanently removed.", { name: O.name }),
92
+ okButtonTitle: c("healthybowl.common.delete", "Delete"),
93
+ cancelButtonTitle: c("healthybowl.common.cancel", "Cancel")
93
94
  }) !== !1) {
94
- O(!0);
95
+ D(!0);
95
96
  try {
96
- await Ze(k.id), T({
97
- title: v("healthybowl.crops.fieldDetail.toast.deleted.title", "Field deleted"),
98
- description: v("healthybowl.crops.fieldDetail.toast.deleted.description", "{{name}} has been removed.", { name: k.name }),
97
+ await tt(O.id), T({
98
+ title: c("healthybowl.crops.fieldDetail.toast.deleted.title", "Field deleted"),
99
+ description: c("healthybowl.crops.fieldDetail.toast.deleted.description", "{{name}} has been removed.", { name: O.name }),
99
100
  variant: "success"
100
101
  }), C(w("crops/fields"));
101
102
  } catch (e) {
102
103
  T({
103
- title: v("healthybowl.crops.fieldDetail.toast.deleteFailed.title", "Delete failed"),
104
+ title: c("healthybowl.crops.fieldDetail.toast.deleteFailed.title", "Delete failed"),
104
105
  description: String(e),
105
106
  variant: "error"
106
- }), O(!1);
107
+ }), D(!1);
107
108
  }
108
109
  }
109
- }, W = o(() => k ? x.filter((e) => e.field === k.id || e.fieldName === k.name) : [], [x, k]), G = o(() => {
110
+ }, z = o(() => O ? S.filter((e) => e.field === O.id || e.fieldName === O.name) : [], [S, O]), B = o(() => {
110
111
  let e = /* @__PURE__ */ new Set();
111
- return [...W, ...x].filter((t) => !e.has(t.id) && !!e.add(t.id));
112
- }, [x, W]), xt = o(() => W[0] ?? G[0] ?? null, [G, W]), K = o(() => G.find((e) => e.id === N) ?? xt, [
113
- N,
114
- G,
115
- xt
116
- ]), q = o(() => a(K), [K]), St = U != null && U > 0 ? U : k?.area ?? 0, Ct = U != null && U > 0, J = o(() => k ? he({
117
- fieldArea: St,
118
- fieldUnit: k.unit,
119
- bedWidthM: g(V, fe),
120
- pathWidthM: We(H, me),
121
- plantSpacingCm: g(L, q.plantSpacingCm),
122
- rowSpacingCm: g(z, q.rowSpacingCm)
112
+ return [...z, ...S].filter((t) => !e.has(t.id) && !!e.add(t.id));
113
+ }, [S, z]), At = o(() => z[0] ?? B[0] ?? null, [B, z]), V = o(() => B.find((e) => e.id === A) ?? At, [
114
+ A,
115
+ B,
116
+ At
117
+ ]), H = o(() => he(V), [V]), U = R != null && R > 0 ? R : O?.area ?? 0, jt = R != null && R > 0, W = o(() => O ? me({
118
+ fieldArea: U,
119
+ fieldUnit: O.unit,
120
+ bedWidthM: _(I, de),
121
+ pathWidthM: Je(L, pe),
122
+ plantSpacingCm: _(N, H.plantSpacingCm),
123
+ rowSpacingCm: _(Ct, H.rowSpacingCm)
123
124
  }) : null, [
124
- V,
125
- St,
126
- k,
127
- H,
125
+ I,
126
+ U,
127
+ O,
128
128
  L,
129
- z,
130
- q
129
+ N,
130
+ Ct,
131
+ H
131
132
  ]);
132
- ye(() => {
133
- if (!K || N === K.id) return;
134
- let e = a(K);
135
- mt(K.id), R(String(e.plantSpacingCm)), B(String(e.rowSpacingCm));
136
- }, [N, K]);
137
- let wt = (e) => {
138
- let t = G.find((t) => t.id === e);
139
- mt(e), I("");
140
- let n = a(t);
141
- R(String(n.plantSpacingCm)), B(String(n.rowSpacingCm));
142
- }, Tt = (e) => {
143
- if (I(e), e === "none") {
144
- I("");
133
+ xe(() => {
134
+ if (!V || A === V.id) return;
135
+ let e = he(V);
136
+ xt(V.id), P(String(e.plantSpacingCm)), F(String(e.rowSpacingCm));
137
+ }, [A, V]);
138
+ let Mt = (e) => {
139
+ let t = B.find((t) => t.id === e);
140
+ xt(e), St("");
141
+ let n = he(t);
142
+ P(String(n.plantSpacingCm)), F(String(n.rowSpacingCm));
143
+ }, Nt = (e) => {
144
+ if (St(e), e === "none") {
145
+ St("");
145
146
  return;
146
147
  }
147
- let t = P.find((t) => t.id === e);
148
- t && (t.plantSpacingCm != null && R(String(t.plantSpacingCm)), t.rowSpacingCm != null && B(String(t.rowSpacingCm)));
149
- }, Y = o(() => {
150
- let e = F ? P.find((e) => e.id === F) : void 0;
148
+ let t = j.find((t) => t.id === e);
149
+ t && (t.plantSpacingCm != null && P(String(t.plantSpacingCm)), t.rowSpacingCm != null && F(String(t.rowSpacingCm)));
150
+ }, G = o(() => {
151
+ let e = M ? j.find((e) => e.id === M) : void 0;
151
152
  if (e) return e;
152
- if (!K) return;
153
- let t = (K.name ?? "").trim().toLowerCase();
153
+ if (!V) return;
154
+ let t = (V.name ?? "").trim().toLowerCase();
154
155
  if (!t) return;
155
- let n = (K.variety ?? "").trim().toLowerCase();
156
- return P.find((e) => (e.name ?? "").trim().toLowerCase() === t && (e.variety ?? "").trim().toLowerCase() === n) ?? P.find((e) => (e.name ?? "").trim().toLowerCase() === t);
156
+ let n = (V.variety ?? "").trim().toLowerCase();
157
+ return j.find((e) => (e.name ?? "").trim().toLowerCase() === t && (e.variety ?? "").trim().toLowerCase() === n) ?? j.find((e) => (e.name ?? "").trim().toLowerCase() === t);
157
158
  }, [
158
- F,
159
- P,
160
- K
161
- ]), X = o(() => J ? _e({
162
- plantsNeeded: J.totalPlants,
163
- seedsPerGram: Y?.seedsPerGram,
164
- germinationRate: Y?.germinationRate,
165
- seedsPerCell: Y?.seedsPerCell
166
- }) : null, [J, Y]), { successionPlans: Et, beds: Dt, createSuccession: Ot, deletePlan: kt } = ge(k?.id), [Z, At] = s(() => (/* @__PURE__ */ new Date()).toISOString().split("T")[0]), [jt, Mt] = s("14"), [Nt, Pt] = s("4"), [Ft, It] = s(""), [Lt, Rt] = s(!1), zt = o(() => {
159
+ M,
160
+ j,
161
+ V
162
+ ]), K = o(() => W ? _e({
163
+ plantsNeeded: W.totalPlants,
164
+ seedsPerGram: G?.seedsPerGram,
165
+ germinationRate: G?.germinationRate,
166
+ seedsPerCell: G?.seedsPerCell
167
+ }) : null, [W, G]), [q, Pt] = s("label"), [J, Ft] = s("asc"), It = o(() => !O || j.length === 0 ? [] : ve(j, {
168
+ fieldArea: U,
169
+ fieldUnit: O.unit,
170
+ bedWidthM: _(I, de),
171
+ pathWidthM: Je(L, pe)
172
+ }), [
173
+ I,
174
+ U,
175
+ O,
176
+ L,
177
+ j
178
+ ]), Y = o(() => ye(It, q, J), [
179
+ It,
180
+ q,
181
+ J
182
+ ]), X = be((e) => {
183
+ if (e === q) {
184
+ Ft((e) => e === "asc" ? "desc" : "asc");
185
+ return;
186
+ }
187
+ Pt(e), Ft(e === "label" ? "asc" : "desc");
188
+ }, [q]), { successionPlans: Lt, beds: Rt, createSuccession: zt, deletePlan: Bt } = ge(O?.id), [Z, Vt] = s(() => (/* @__PURE__ */ new Date()).toISOString().split("T")[0]), [Ht, Ut] = s("14"), [Wt, Gt] = s("4"), [Kt, qt] = s(""), [Jt, Yt] = s(!1), Xt = o(() => {
167
189
  let e = /* @__PURE__ */ new Map();
168
- for (let t of Et) {
190
+ for (let t of Lt) {
169
191
  let n = String(t.successionGroupId), r = e.get(n);
170
192
  r ? r.push(t) : e.set(n, [t]);
171
193
  }
172
194
  return Array.from(e.entries());
173
- }, [Et]), Bt = ve((e) => {
174
- let t = e.cropId ? x.find((t) => t.id === e.cropId) : void 0;
195
+ }, [Lt]), Zt = be((e) => {
196
+ let t = e.cropId ? S.find((t) => t.id === e.cropId) : void 0;
175
197
  if (t) return t.variety ? `${t.name} - ${t.variety}` : t.name;
176
- let n = e.plantCatalogId ? P.find((t) => t.id === e.plantCatalogId) : void 0;
198
+ let n = e.plantCatalogId ? j.find((t) => t.id === e.plantCatalogId) : void 0;
177
199
  if (n?.name?.trim()) return n.variety ? `${n.name} - ${n.variety}` : n.name;
178
200
  let r = e.cropName?.trim();
179
201
  if (r && !/^unknown(\s+crop)?$/i.test(r)) return r;
180
- let i = W[0];
202
+ let i = z[0];
181
203
  return i ? i.variety ? `${i.name} - ${i.variety}` : i.name : "—";
182
204
  }, [
183
- x,
184
- P,
185
- W
186
- ]), Vt = async () => {
187
- if (!k) return;
188
- let e = Number(jt), t = Number(Nt);
205
+ S,
206
+ j,
207
+ z
208
+ ]), Qt = async () => {
209
+ if (!O) return;
210
+ let e = Number(Ht), t = Number(Wt);
189
211
  if (!Z || !Number.isFinite(e) || e < 1 || !Number.isFinite(t) || t < 1) {
190
212
  T({
191
- title: v("healthybowl.crops.fieldDetail.succession.toast.invalid.title", "Check the schedule inputs"),
192
- description: v("healthybowl.crops.fieldDetail.succession.toast.invalid.description", "A start date, an interval of at least 1 day and at least 1 sowing are required."),
213
+ title: c("healthybowl.crops.fieldDetail.succession.toast.invalid.title", "Check the schedule inputs"),
214
+ description: c("healthybowl.crops.fieldDetail.succession.toast.invalid.description", "A start date, an interval of at least 1 day and at least 1 sowing are required."),
193
215
  variant: "warning"
194
216
  });
195
217
  return;
196
218
  }
197
- Rt(!0);
219
+ Yt(!0);
198
220
  try {
199
- let n = await Ot({
200
- fieldId: k.id,
201
- bedId: Ft || void 0,
202
- cropId: K?.id ?? void 0,
203
- plantCatalogId: F || void 0,
204
- season: K?.season ? K.season.toUpperCase() : void 0,
221
+ let n = await zt({
222
+ fieldId: O.id,
223
+ bedId: Kt || void 0,
224
+ cropId: V?.id ?? void 0,
225
+ plantCatalogId: M || void 0,
226
+ season: V?.season ? V.season.toUpperCase() : void 0,
205
227
  year: new Date(Z).getFullYear(),
206
228
  startDate: Z,
207
229
  intervalDays: e,
208
230
  count: t,
209
- plantsNeeded: J?.totalPlants,
210
- seedGrams: X?.seedGrams ?? void 0,
211
- seedlingsToRaise: X?.seedlingsToRaise,
212
- density: J?.densityPlantsPerSqm
231
+ plantsNeeded: W?.totalPlants,
232
+ seedGrams: K?.seedGrams ?? void 0,
233
+ seedlingsToRaise: K?.seedlingsToRaise,
234
+ density: W?.densityPlantsPerSqm
213
235
  });
214
236
  T({
215
- title: v("healthybowl.crops.fieldDetail.succession.toast.created.title", "Succession schedule created"),
216
- description: v("healthybowl.crops.fieldDetail.succession.toast.created.description", "{{count}} sowings scheduled.", { count: n.length || t }),
237
+ title: c("healthybowl.crops.fieldDetail.succession.toast.created.title", "Succession schedule created"),
238
+ description: c("healthybowl.crops.fieldDetail.succession.toast.created.description", "{{count}} sowings scheduled.", { count: n.length || t }),
217
239
  variant: "success"
218
240
  });
219
241
  } catch (e) {
220
242
  T({
221
- title: v("healthybowl.crops.fieldDetail.succession.toast.failed.title", "Could not create schedule"),
243
+ title: c("healthybowl.crops.fieldDetail.succession.toast.failed.title", "Could not create schedule"),
222
244
  description: e instanceof Error ? e.message : String(e),
223
245
  variant: "error"
224
246
  });
225
247
  } finally {
226
- Rt(!1);
248
+ Yt(!1);
227
249
  }
228
- }, Ht = async (e) => {
229
- if (await Ge({
230
- title: v("healthybowl.crops.fieldDetail.succession.deleteConfirm.title", "Delete this sowing?"),
231
- message: v("healthybowl.crops.fieldDetail.succession.deleteConfirm.message", "This sowing will be permanently removed from the schedule."),
232
- okButtonTitle: v("healthybowl.common.delete", "Delete"),
233
- cancelButtonTitle: v("healthybowl.common.cancel", "Cancel")
250
+ }, $t = async (e) => {
251
+ if (await De({
252
+ title: c("healthybowl.crops.fieldDetail.succession.deleteConfirm.title", "Delete this sowing?"),
253
+ message: c("healthybowl.crops.fieldDetail.succession.deleteConfirm.message", "This sowing will be permanently removed from the schedule."),
254
+ okButtonTitle: c("healthybowl.common.delete", "Delete"),
255
+ cancelButtonTitle: c("healthybowl.common.cancel", "Cancel")
234
256
  }) !== !1) try {
235
- await kt(e.id), T({
236
- title: v("healthybowl.crops.fieldDetail.succession.toast.deleted.title", "Sowing removed"),
237
- description: v("healthybowl.crops.fieldDetail.succession.toast.deleted.description", "The sowing was deleted."),
257
+ await Bt(e.id), T({
258
+ title: c("healthybowl.crops.fieldDetail.succession.toast.deleted.title", "Sowing removed"),
259
+ description: c("healthybowl.crops.fieldDetail.succession.toast.deleted.description", "The sowing was deleted."),
238
260
  variant: "success"
239
261
  });
240
262
  } catch (e) {
241
263
  T({
242
- title: v("healthybowl.crops.fieldDetail.succession.toast.deleteFailed.title", "Could not delete sowing"),
264
+ title: c("healthybowl.crops.fieldDetail.succession.toast.deleteFailed.title", "Could not delete sowing"),
243
265
  description: e instanceof Error ? e.message : String(e),
244
266
  variant: "error"
245
267
  });
246
268
  }
247
- }, Q = k ? qe.find((e) => e.fieldName === k.name) : void 0, $ = {
248
- location: S?.location ?? "",
249
- current: S?.current ?? {
269
+ }, Q = O ? Xe.find((e) => e.fieldName === O.name) : void 0, $ = {
270
+ location: Ze?.location ?? "",
271
+ current: Ze?.current ?? {
250
272
  temperature: 0,
251
273
  condition: "N/A",
252
274
  feelsLike: 0,
@@ -256,85 +278,85 @@ var He = (e) => {
256
278
  pressure: 0,
257
279
  visibility: 0
258
280
  },
259
- forecast: S?.forecast ?? []
260
- }, Ut = o(() => {
281
+ forecast: Ze?.forecast ?? []
282
+ }, en = o(() => {
261
283
  let e = [];
262
- return W.forEach((t) => {
284
+ return z.forEach((t) => {
263
285
  t.plantingDate && e.push({
264
286
  date: t.plantingDate,
265
- action: v("healthybowl.crops.fieldDetail.timeline.planted", "{{name}} ({{variety}}) planted", {
287
+ action: c("healthybowl.crops.fieldDetail.timeline.planted", "{{name}} ({{variety}}) planted", {
266
288
  name: t.name,
267
289
  variety: t.variety
268
290
  }),
269
291
  type: "planting"
270
292
  }), t.expectedHarvestDate && e.push({
271
293
  date: t.expectedHarvestDate,
272
- action: v("healthybowl.crops.fieldDetail.timeline.expectedHarvest", "{{name}} expected harvest", { name: t.name }),
294
+ action: c("healthybowl.crops.fieldDetail.timeline.expectedHarvest", "{{name}} expected harvest", { name: t.name }),
273
295
  type: "harvest"
274
296
  });
275
297
  }), Q && e.push({
276
298
  date: Q.date,
277
- action: v("healthybowl.crops.fieldDetail.timeline.soilTestConducted", "Soil test conducted"),
299
+ action: c("healthybowl.crops.fieldDetail.timeline.soilTestConducted", "Soil test conducted"),
278
300
  type: "testing"
279
301
  }), e.sort((e, t) => new Date(t.date).getTime() - new Date(e.date).getTime()), e.length === 0 ? [{
280
302
  date: (/* @__PURE__ */ new Date()).toISOString().split("T")[0],
281
- action: v("healthybowl.crops.fieldDetail.timeline.noActivity", "No activity recorded yet"),
303
+ action: c("healthybowl.crops.fieldDetail.timeline.noActivity", "No activity recorded yet"),
282
304
  type: "info"
283
305
  }] : e.slice(0, 5);
284
306
  }, [
285
- W,
307
+ z,
286
308
  Q,
287
- v
288
- ]), Wt = o(() => W.length === 0 ? [{
289
- season: v("healthybowl.crops.fieldDetail.cropHistory.currentSeason", "Current"),
290
- crop: v("healthybowl.crops.fieldDetail.cropHistory.noCropsPlanted", "No crops planted"),
309
+ c
310
+ ]), tn = o(() => z.length === 0 ? [{
311
+ season: c("healthybowl.crops.fieldDetail.cropHistory.currentSeason", "Current"),
312
+ crop: c("healthybowl.crops.fieldDetail.cropHistory.noCropsPlanted", "No crops planted"),
291
313
  status: "fallow"
292
- }] : W.map((e) => ({
314
+ }] : z.map((e) => ({
293
315
  season: `${e.season.charAt(0).toUpperCase() + e.season.slice(1)} - ${e.plantingDate ? new Date(e.plantingDate).getFullYear() : "N/A"}`,
294
316
  crop: `${e.name} (${e.variety})`,
295
317
  status: e.status === "harvested" ? "completed" : "active"
296
- })), [W, v]);
297
- return k ? /* @__PURE__ */ l(r, {
298
- title: k.name,
299
- description: v("healthybowl.crops.fieldDetail.header.description", "{{area}} {{unit}} - {{soilType}}", {
300
- area: k.area,
301
- unit: k.unit,
302
- soilType: k.soilType
318
+ })), [z, c]);
319
+ return O ? /* @__PURE__ */ u(r, {
320
+ title: O.name,
321
+ description: c("healthybowl.crops.fieldDetail.header.description", "{{area}} {{unit}} - {{soilType}}", {
322
+ area: O.area,
323
+ unit: O.unit,
324
+ soilType: O.soilType
303
325
  }),
304
- actions: /* @__PURE__ */ l("div", {
326
+ actions: /* @__PURE__ */ u("div", {
305
327
  className: "flex items-center gap-2",
306
328
  children: [
307
- /* @__PURE__ */ c(le, {
329
+ /* @__PURE__ */ l(ce, {
308
330
  entityType: "FIELD",
309
- entityId: k.id,
310
- entityLabel: k.name
331
+ entityId: O.id,
332
+ entityLabel: O.name
311
333
  }),
312
- /* @__PURE__ */ l(u, {
334
+ /* @__PURE__ */ u(d, {
313
335
  variant: "outline",
314
336
  onClick: () => C(w("crops/fields")),
315
337
  children: [
316
- /* @__PURE__ */ c(Se, { className: "h-4 w-4" }),
338
+ /* @__PURE__ */ l(we, { className: "h-4 w-4" }),
317
339
  " ",
318
- v("healthybowl.crops.fieldDetail.actions.backToFields", "Back to Fields")
340
+ c("healthybowl.crops.fieldDetail.actions.backToFields", "Back to Fields")
319
341
  ]
320
342
  }),
321
- /* @__PURE__ */ l(u, {
343
+ /* @__PURE__ */ u(d, {
322
344
  variant: "outline",
323
- onClick: vt,
345
+ onClick: Dt,
324
346
  children: [
325
- /* @__PURE__ */ c(De, { className: "h-4 w-4" }),
347
+ /* @__PURE__ */ l(Ae, { className: "h-4 w-4" }),
326
348
  " ",
327
- v("healthybowl.crops.fieldDetail.actions.editField", "Edit Field")
349
+ c("healthybowl.crops.fieldDetail.actions.editField", "Edit Field")
328
350
  ]
329
351
  }),
330
- /* @__PURE__ */ l(u, {
352
+ /* @__PURE__ */ u(d, {
331
353
  variant: "destructive",
332
- onClick: bt,
333
- disabled: D,
354
+ onClick: kt,
355
+ disabled: st,
334
356
  children: [
335
- /* @__PURE__ */ c(Fe, { className: "h-4 w-4" }),
357
+ /* @__PURE__ */ l(ze, { className: "h-4 w-4" }),
336
358
  " ",
337
- v("healthybowl.common.delete", "Delete")
359
+ c("healthybowl.common.delete", "Delete")
338
360
  ]
339
361
  })
340
362
  ]
@@ -343,150 +365,150 @@ var He = (e) => {
343
365
  nextSteps: [
344
366
  {
345
367
  id: "edit",
346
- label: v("healthybowl.crops.fieldDetail.nextSteps.edit.label", "Update field details"),
347
- description: v("healthybowl.crops.fieldDetail.nextSteps.edit.desc", "Keep area, soil type and irrigation info current."),
348
- onClick: vt
368
+ label: c("healthybowl.crops.fieldDetail.nextSteps.edit.label", "Update field details"),
369
+ description: c("healthybowl.crops.fieldDetail.nextSteps.edit.desc", "Keep area, soil type and irrigation info current."),
370
+ onClick: Dt
349
371
  },
350
372
  {
351
373
  id: "soil",
352
- label: v("healthybowl.crops.fieldDetail.nextSteps.soil.label", "Run a soil test"),
353
- description: v("healthybowl.crops.fieldDetail.nextSteps.soil.desc", "Check fertility before you plant or fertilise this field."),
374
+ label: c("healthybowl.crops.fieldDetail.nextSteps.soil.label", "Run a soil test"),
375
+ description: c("healthybowl.crops.fieldDetail.nextSteps.soil.desc", "Check fertility before you plant or fertilise this field."),
354
376
  href: w("soil/tests")
355
377
  },
356
378
  {
357
379
  id: "plan",
358
- label: v("healthybowl.crops.fieldDetail.nextSteps.plan.label", "Plan what to plant here"),
359
- description: v("healthybowl.crops.fieldDetail.nextSteps.plan.desc", "Add a planting plan so this field is working toward your goals."),
380
+ label: c("healthybowl.crops.fieldDetail.nextSteps.plan.label", "Plan what to plant here"),
381
+ description: c("healthybowl.crops.fieldDetail.nextSteps.plan.desc", "Add a planting plan so this field is working toward your goals."),
360
382
  href: w("crops/planning")
361
383
  }
362
384
  ],
363
385
  nextStepsKey: "healthybowl-field-detail",
364
386
  children: [
365
- /* @__PURE__ */ c(ie, { items: [
387
+ /* @__PURE__ */ l(re, { items: [
366
388
  {
367
- label: v("healthybowl.crops.fieldDetail.breadcrumbs.crops", "Crops"),
389
+ label: c("healthybowl.crops.fieldDetail.breadcrumbs.crops", "Crops"),
368
390
  href: w("crops")
369
391
  },
370
392
  {
371
- label: v("healthybowl.crops.fieldDetail.breadcrumbs.fields", "Fields"),
393
+ label: c("healthybowl.crops.fieldDetail.breadcrumbs.fields", "Fields"),
372
394
  href: w("crops/fields")
373
395
  },
374
- { label: k.name }
396
+ { label: O.name }
375
397
  ] }),
376
- /* @__PURE__ */ l("div", {
398
+ /* @__PURE__ */ u("div", {
377
399
  className: "flex flex-wrap items-center gap-3",
378
- children: [/* @__PURE__ */ c(i, {
379
- label: k.status,
380
- variant: He(k.status),
400
+ children: [/* @__PURE__ */ l(i, {
401
+ label: O.status,
402
+ variant: Ke(O.status),
381
403
  dot: !0
382
- }), k.organicCertified ? /* @__PURE__ */ c(i, {
383
- label: v("healthybowl.crops.fieldDetail.badges.organicCertified", "Organic Certified"),
404
+ }), O.organicCertified ? /* @__PURE__ */ l(i, {
405
+ label: c("healthybowl.crops.fieldDetail.badges.organicCertified", "Organic Certified"),
384
406
  variant: "success"
385
- }) : /* @__PURE__ */ c(i, {
386
- label: v("healthybowl.crops.fieldDetail.badges.notCertified", "Not Certified"),
407
+ }) : /* @__PURE__ */ l(i, {
408
+ label: c("healthybowl.crops.fieldDetail.badges.notCertified", "Not Certified"),
387
409
  variant: "muted"
388
410
  })]
389
411
  }),
390
- /* @__PURE__ */ l("div", {
412
+ /* @__PURE__ */ u("div", {
391
413
  className: "grid grid-cols-1 gap-6 lg:grid-cols-3",
392
- children: [/* @__PURE__ */ l("div", {
414
+ children: [/* @__PURE__ */ u("div", {
393
415
  className: "space-y-6 lg:col-span-2",
394
416
  children: [
395
- /* @__PURE__ */ l(Ve, {
417
+ /* @__PURE__ */ u(Ge, {
396
418
  treatment: "glass",
397
419
  glow: !0,
398
420
  className: "border-border-seam p-6",
399
421
  children: [
400
- /* @__PURE__ */ c("h3", {
422
+ /* @__PURE__ */ l("h3", {
401
423
  className: "mb-4 text-sm font-semibold text-text-primary",
402
- children: v("healthybowl.crops.fieldDetail.info.heading", "Field Information")
424
+ children: c("healthybowl.crops.fieldDetail.info.heading", "Field Information")
403
425
  }),
404
- /* @__PURE__ */ l("div", {
426
+ /* @__PURE__ */ u("div", {
405
427
  className: "grid grid-cols-1 gap-6 sm:grid-cols-2",
406
- children: [/* @__PURE__ */ l("div", {
428
+ children: [/* @__PURE__ */ u("div", {
407
429
  className: "space-y-4",
408
430
  children: [
409
- /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("span", {
431
+ /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("span", {
410
432
  className: "text-xs text-text-secondary",
411
- children: v("healthybowl.crops.fieldDetail.info.fieldName", "Field Name")
412
- }), /* @__PURE__ */ c("p", {
433
+ children: c("healthybowl.crops.fieldDetail.info.fieldName", "Field Name")
434
+ }), /* @__PURE__ */ l("p", {
413
435
  className: "text-sm font-semibold text-text-primary",
414
- children: k.name
436
+ children: O.name
415
437
  })] }),
416
- /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("span", {
438
+ /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("span", {
417
439
  className: "text-xs text-text-secondary",
418
- children: v("healthybowl.crops.fieldDetail.info.area", "Area")
419
- }), /* @__PURE__ */ l("p", {
440
+ children: c("healthybowl.crops.fieldDetail.info.area", "Area")
441
+ }), /* @__PURE__ */ u("p", {
420
442
  className: "text-sm font-semibold text-text-primary",
421
443
  children: [
422
- k.area,
444
+ O.area,
423
445
  " ",
424
- k.unit
446
+ O.unit
425
447
  ]
426
448
  })] }),
427
- /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("span", {
449
+ /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("span", {
428
450
  className: "text-xs text-text-secondary",
429
- children: v("healthybowl.crops.fieldDetail.info.status", "Status")
430
- }), /* @__PURE__ */ c("div", {
451
+ children: c("healthybowl.crops.fieldDetail.info.status", "Status")
452
+ }), /* @__PURE__ */ l("div", {
431
453
  className: "mt-1",
432
- children: /* @__PURE__ */ c(i, {
433
- label: k.status,
434
- variant: He(k.status)
454
+ children: /* @__PURE__ */ l(i, {
455
+ label: O.status,
456
+ variant: Ke(O.status)
435
457
  })
436
458
  })] })
437
459
  ]
438
- }), /* @__PURE__ */ l("div", {
460
+ }), /* @__PURE__ */ u("div", {
439
461
  className: "space-y-4",
440
462
  children: [
441
- /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("span", {
463
+ /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("span", {
442
464
  className: "text-xs text-text-secondary",
443
- children: v("healthybowl.crops.fieldDetail.info.soilType", "Soil Type")
444
- }), /* @__PURE__ */ c("p", {
465
+ children: c("healthybowl.crops.fieldDetail.info.soilType", "Soil Type")
466
+ }), /* @__PURE__ */ l("p", {
445
467
  className: "text-sm font-semibold text-text-primary",
446
- children: k.soilType
468
+ children: O.soilType
447
469
  })] }),
448
- /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("span", {
470
+ /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("span", {
449
471
  className: "text-xs text-text-secondary",
450
- children: v("healthybowl.crops.fieldDetail.info.irrigation", "Irrigation")
451
- }), /* @__PURE__ */ c("p", {
472
+ children: c("healthybowl.crops.fieldDetail.info.irrigation", "Irrigation")
473
+ }), /* @__PURE__ */ l("p", {
452
474
  className: "text-sm font-semibold text-text-primary",
453
- children: k.irrigationType
475
+ children: O.irrigationType
454
476
  })] }),
455
- /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("span", {
477
+ /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("span", {
456
478
  className: "text-xs text-text-secondary",
457
- children: v("healthybowl.crops.fieldDetail.info.currentCrops", "Current Crops")
458
- }), /* @__PURE__ */ c("p", {
479
+ children: c("healthybowl.crops.fieldDetail.info.currentCrops", "Current Crops")
480
+ }), /* @__PURE__ */ l("p", {
459
481
  className: "text-sm font-semibold text-text-primary",
460
- children: (k.crops ?? []).length > 0 ? (k.crops ?? []).join(", ") : v("healthybowl.crops.fieldDetail.info.noneValue", "None")
482
+ children: (O.crops ?? []).length > 0 ? (O.crops ?? []).join(", ") : c("healthybowl.crops.fieldDetail.info.noneValue", "None")
461
483
  })] })
462
484
  ]
463
485
  })]
464
486
  }),
465
- /* @__PURE__ */ l("div", {
487
+ /* @__PURE__ */ u("div", {
466
488
  className: "mt-6 border-t border-border-subtle pt-4",
467
- children: [/* @__PURE__ */ c("span", {
489
+ children: [/* @__PURE__ */ l("span", {
468
490
  className: "text-xs text-text-secondary",
469
- children: v("healthybowl.crops.fieldDetail.info.gpsCoordinates", "GPS Coordinates")
470
- }), /* @__PURE__ */ l("div", {
491
+ children: c("healthybowl.crops.fieldDetail.info.gpsCoordinates", "GPS Coordinates")
492
+ }), /* @__PURE__ */ u("div", {
471
493
  className: "mt-1 flex items-center gap-4",
472
- children: [/* @__PURE__ */ l("span", {
494
+ children: [/* @__PURE__ */ u("span", {
473
495
  className: "text-xs text-text-secondary",
474
496
  children: [
475
- v("healthybowl.crops.fieldDetail.info.latLabel", "Lat:"),
497
+ c("healthybowl.crops.fieldDetail.info.latLabel", "Lat:"),
476
498
  " ",
477
- /* @__PURE__ */ c("span", {
499
+ /* @__PURE__ */ l("span", {
478
500
  className: "font-mono text-sm text-text-primary",
479
- children: k.location?.lat ?? 0
501
+ children: O.location?.lat ?? 0
480
502
  })
481
503
  ]
482
- }), /* @__PURE__ */ l("span", {
504
+ }), /* @__PURE__ */ u("span", {
483
505
  className: "text-xs text-text-secondary",
484
506
  children: [
485
- v("healthybowl.crops.fieldDetail.info.lngLabel", "Lng:"),
507
+ c("healthybowl.crops.fieldDetail.info.lngLabel", "Lng:"),
486
508
  " ",
487
- /* @__PURE__ */ c("span", {
509
+ /* @__PURE__ */ l("span", {
488
510
  className: "font-mono text-sm text-text-primary",
489
- children: k.location?.lng ?? 0
511
+ children: O.location?.lng ?? 0
490
512
  })
491
513
  ]
492
514
  })]
@@ -494,453 +516,589 @@ var He = (e) => {
494
516
  })
495
517
  ]
496
518
  }),
497
- /* @__PURE__ */ l("div", {
519
+ /* @__PURE__ */ u("div", {
498
520
  className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
499
521
  children: [
500
- /* @__PURE__ */ l("div", {
522
+ /* @__PURE__ */ u("div", {
501
523
  className: "mb-4",
502
- children: [/* @__PURE__ */ l("h3", {
524
+ children: [/* @__PURE__ */ u("h3", {
503
525
  className: "flex items-center gap-2 text-sm font-semibold text-text-primary",
504
526
  children: [
505
- /* @__PURE__ */ c(Ae, { className: "h-4 w-4 text-success" }),
527
+ /* @__PURE__ */ l(Ne, { className: "h-4 w-4 text-success" }),
506
528
  " ",
507
- v("healthybowl.crops.fieldDetail.boundary.heading", "Field Boundary")
529
+ c("healthybowl.crops.fieldDetail.boundary.heading", "Field Boundary")
508
530
  ]
509
- }), /* @__PURE__ */ c("p", {
531
+ }), /* @__PURE__ */ l("p", {
510
532
  className: "mt-1 text-xs text-text-secondary",
511
- children: v("healthybowl.crops.fieldDetail.boundary.description", "Draw or import this field’s boundary on the satellite map. Saving updates the field area automatically.")
533
+ children: c("healthybowl.crops.fieldDetail.boundary.description", "Draw or import this field’s boundary on the satellite map. Saving updates the field area automatically.")
512
534
  })]
513
535
  }),
514
- /* @__PURE__ */ c(ce, {
515
- fieldId: k.id,
516
- unit: k.unit ?? "acres",
517
- center: k.location,
518
- initialBoundary: k.boundary,
519
- onSaved: Qe,
520
- onAreaChange: _t
536
+ /* @__PURE__ */ l(se, {
537
+ fieldId: O.id,
538
+ unit: O.unit ?? "acres",
539
+ center: O.location,
540
+ initialBoundary: O.boundary,
541
+ onSaved: nt,
542
+ onAreaChange: Et
521
543
  }),
522
- /* @__PURE__ */ l("div", {
544
+ /* @__PURE__ */ u("div", {
523
545
  className: "mt-5 border-t border-border-subtle pt-5",
524
546
  children: [
525
- /* @__PURE__ */ l("div", {
547
+ /* @__PURE__ */ u("div", {
526
548
  className: "flex flex-wrap items-center justify-between gap-3",
527
- children: [/* @__PURE__ */ l("h4", {
549
+ children: [/* @__PURE__ */ u("h4", {
528
550
  className: "flex items-center gap-2 text-sm font-semibold text-text-primary",
529
- children: [v("healthybowl.crops.fieldDetail.capacity.heading", "Planting capacity"), Ct && /* @__PURE__ */ c("span", {
551
+ children: [c("healthybowl.crops.fieldDetail.capacity.heading", "Planting capacity"), jt && /* @__PURE__ */ l("span", {
530
552
  className: "rounded-full bg-success/10 px-2 py-0.5 text-[11px] font-medium text-success",
531
- children: v("healthybowl.crops.fieldDetail.capacity.fromBoundary", "from drawn boundary")
553
+ children: c("healthybowl.crops.fieldDetail.capacity.fromBoundary", "from drawn boundary")
532
554
  })]
533
- }), /* @__PURE__ */ c(i, {
534
- label: q.label,
555
+ }), /* @__PURE__ */ l(i, {
556
+ label: H.label,
535
557
  variant: "muted"
536
558
  })]
537
559
  }),
538
- /* @__PURE__ */ l("div", {
560
+ /* @__PURE__ */ u("div", {
539
561
  className: "mt-4 grid gap-3 md:grid-cols-2 xl:grid-cols-6",
540
562
  children: [
541
- /* @__PURE__ */ l("div", {
563
+ /* @__PURE__ */ u("div", {
542
564
  className: "xl:col-span-2",
543
- children: [/* @__PURE__ */ c("label", {
565
+ children: [/* @__PURE__ */ l("label", {
544
566
  className: "text-xs font-medium text-text-secondary",
545
- children: v("healthybowl.crops.fieldDetail.capacity.crop", "Crop")
546
- }), /* @__PURE__ */ l(d, {
547
- value: N,
548
- onValueChange: wt,
549
- children: [/* @__PURE__ */ c(m, {
567
+ children: c("healthybowl.crops.fieldDetail.capacity.crop", "Crop")
568
+ }), /* @__PURE__ */ u(f, {
569
+ value: A,
570
+ onValueChange: Mt,
571
+ children: [/* @__PURE__ */ l(h, {
550
572
  className: "mt-1 w-full",
551
- children: /* @__PURE__ */ c(h, { placeholder: v("healthybowl.crops.fieldDetail.capacity.cropPlaceholder", "Select crop") })
552
- }), /* @__PURE__ */ c(f, { children: G.map((e) => /* @__PURE__ */ c(p, {
573
+ children: /* @__PURE__ */ l(g, { placeholder: c("healthybowl.crops.fieldDetail.capacity.cropPlaceholder", "Select crop") })
574
+ }), /* @__PURE__ */ l(p, { children: B.map((e) => /* @__PURE__ */ l(m, {
553
575
  value: e.id,
554
576
  children: e.variety ? `${e.name} - ${e.variety}` : e.name
555
577
  }, e.id)) })]
556
578
  })]
557
579
  }),
558
- P.length > 0 && /* @__PURE__ */ l("div", {
580
+ j.length > 0 && /* @__PURE__ */ u("div", {
559
581
  className: "xl:col-span-2",
560
- children: [/* @__PURE__ */ c("label", {
582
+ children: [/* @__PURE__ */ l("label", {
561
583
  className: "text-xs font-medium text-text-secondary",
562
- children: v("healthybowl.crops.fieldDetail.capacity.catalog", "Master Plant List")
563
- }), /* @__PURE__ */ l(d, {
564
- value: F || "none",
565
- onValueChange: Tt,
566
- children: [/* @__PURE__ */ c(m, {
584
+ children: c("healthybowl.crops.fieldDetail.capacity.catalog", "Master Plant List")
585
+ }), /* @__PURE__ */ u(f, {
586
+ value: M || "none",
587
+ onValueChange: Nt,
588
+ children: [/* @__PURE__ */ l(h, {
567
589
  className: "mt-1 w-full",
568
- children: /* @__PURE__ */ c(h, { placeholder: v("healthybowl.crops.fieldDetail.capacity.catalogPlaceholder", "Fill spacing from catalog") })
569
- }), /* @__PURE__ */ l(f, { children: [/* @__PURE__ */ c(p, {
590
+ children: /* @__PURE__ */ l(g, { placeholder: c("healthybowl.crops.fieldDetail.capacity.catalogPlaceholder", "Fill spacing from catalog") })
591
+ }), /* @__PURE__ */ u(p, { children: [/* @__PURE__ */ l(m, {
570
592
  value: "none",
571
- children: v("healthybowl.crops.fieldDetail.capacity.catalogNone", "None")
572
- }), P.map((e) => /* @__PURE__ */ c(p, {
593
+ children: c("healthybowl.crops.fieldDetail.capacity.catalogNone", "None")
594
+ }), j.map((e) => /* @__PURE__ */ l(m, {
573
595
  value: e.id,
574
596
  children: e.variety ? `${e.name} - ${e.variety}` : e.name
575
597
  }, e.id))] })]
576
598
  })]
577
599
  }),
578
- /* @__PURE__ */ c(y, {
579
- label: v("healthybowl.crops.fieldDetail.capacity.plantSpacing", "Plant spacing"),
600
+ /* @__PURE__ */ l(y, {
601
+ label: c("healthybowl.crops.fieldDetail.capacity.plantSpacing", "Plant spacing"),
580
602
  unit: "cm",
581
- value: L,
603
+ value: N,
582
604
  min: "1",
583
605
  step: "1",
584
- onChange: R
606
+ onChange: P
585
607
  }),
586
- /* @__PURE__ */ c(y, {
587
- label: v("healthybowl.crops.fieldDetail.capacity.rowSpacing", "Row spacing"),
608
+ /* @__PURE__ */ l(y, {
609
+ label: c("healthybowl.crops.fieldDetail.capacity.rowSpacing", "Row spacing"),
588
610
  unit: "cm",
589
- value: z,
611
+ value: Ct,
590
612
  min: "1",
591
613
  step: "1",
592
- onChange: B
614
+ onChange: F
593
615
  }),
594
- /* @__PURE__ */ c(y, {
595
- label: v("healthybowl.crops.fieldDetail.capacity.bedWidth", "Bed width"),
616
+ /* @__PURE__ */ l(y, {
617
+ label: c("healthybowl.crops.fieldDetail.capacity.bedWidth", "Bed width"),
596
618
  unit: "m",
597
- value: V,
619
+ value: I,
598
620
  min: "0.1",
599
621
  step: "0.1",
600
- onChange: ht
622
+ onChange: wt
601
623
  }),
602
- /* @__PURE__ */ c(y, {
603
- label: v("healthybowl.crops.fieldDetail.capacity.pathWidth", "Path width"),
624
+ /* @__PURE__ */ l(y, {
625
+ label: c("healthybowl.crops.fieldDetail.capacity.pathWidth", "Path width"),
604
626
  unit: "m",
605
- value: H,
627
+ value: L,
606
628
  min: "0",
607
629
  step: "0.05",
608
- onChange: gt
630
+ onChange: Tt
609
631
  })
610
632
  ]
611
633
  }),
612
- J ? /* @__PURE__ */ l(Be, { children: [/* @__PURE__ */ l("div", {
613
- className: "mt-4 grid grid-cols-2 gap-3 md:grid-cols-3 xl:grid-cols-6",
614
- children: [
615
- /* @__PURE__ */ c(b, {
616
- label: v("healthybowl.crops.fieldDetail.capacity.metrics.beds", "Beds"),
617
- value: t(J.bedCount)
618
- }),
619
- /* @__PURE__ */ c(b, {
620
- label: v("healthybowl.crops.fieldDetail.capacity.metrics.rowsPerBed", "Rows / bed"),
621
- value: t(J.rowsPerBed)
622
- }),
623
- /* @__PURE__ */ c(b, {
624
- label: v("healthybowl.crops.fieldDetail.capacity.metrics.plantsPerBed", "Plants / bed"),
625
- value: t(J.plantsPerBed)
626
- }),
627
- /* @__PURE__ */ c(b, {
628
- label: v("healthybowl.crops.fieldDetail.capacity.metrics.totalPlants", "Total plants"),
629
- value: t(J.totalPlants)
630
- }),
631
- /* @__PURE__ */ c(b, {
632
- label: v("healthybowl.crops.fieldDetail.capacity.metrics.seedlings", "Seedlings"),
633
- value: t(J.seedlingTarget)
634
- }),
635
- /* @__PURE__ */ c(b, {
636
- label: v("healthybowl.crops.fieldDetail.capacity.metrics.bedLength", "Bed length"),
637
- value: _(J.bedLengthM),
638
- unit: "m"
639
- }),
640
- /* @__PURE__ */ c(b, {
641
- label: v("healthybowl.crops.fieldDetail.capacity.metrics.density", "Density"),
642
- value: _(J.densityPlantsPerSqm, 2),
643
- unit: v("healthybowl.crops.fieldDetail.capacity.metrics.densityUnit", "plants/m²")
644
- })
645
- ]
646
- }), X && /* @__PURE__ */ l("div", {
647
- className: "mt-5 border-t border-border-subtle pt-4",
648
- children: [
649
- /* @__PURE__ */ l("h5", {
650
- className: "mb-3 flex items-center gap-2 text-xs font-semibold uppercase tracking-wide text-text-secondary",
651
- children: [
652
- /* @__PURE__ */ c(Me, { className: "h-3.5 w-3.5 text-success" }),
653
- v("healthybowl.crops.fieldDetail.seedRate.heading", "Seed rate"),
654
- Y && /* @__PURE__ */ c("span", {
655
- className: "rounded-full bg-success/10 px-2 py-0.5 text-[11px] font-medium normal-case text-success",
656
- children: v("healthybowl.crops.fieldDetail.seedRate.fromCatalog", "from catalog")
657
- })
658
- ]
659
- }),
660
- /* @__PURE__ */ l("div", {
661
- className: "grid grid-cols-2 gap-3 md:grid-cols-3",
662
- children: [
663
- /* @__PURE__ */ c(b, {
664
- label: v("healthybowl.crops.fieldDetail.seedRate.seedNeeded", "Seed needed"),
665
- value: X.seedGrams == null ? "—" : _(X.seedGrams, 2),
666
- unit: X.seedGrams == null ? void 0 : "g"
667
- }),
668
- /* @__PURE__ */ c(b, {
669
- label: v("healthybowl.crops.fieldDetail.seedRate.seedlings", "Seedlings to raise"),
670
- value: t(X.seedlingsToRaise)
671
- }),
672
- /* @__PURE__ */ c(b, {
673
- label: v("healthybowl.crops.fieldDetail.seedRate.trays", "Trays"),
674
- value: X.trays == null ? "—" : t(X.trays)
634
+ W ? /* @__PURE__ */ u(We, { children: [
635
+ /* @__PURE__ */ u("div", {
636
+ className: "mt-4 grid grid-cols-2 gap-3 md:grid-cols-3 xl:grid-cols-6",
637
+ children: [
638
+ /* @__PURE__ */ l(b, {
639
+ label: c("healthybowl.crops.fieldDetail.capacity.metrics.beds", "Beds"),
640
+ value: t(W.bedCount)
641
+ }),
642
+ /* @__PURE__ */ l(b, {
643
+ label: c("healthybowl.crops.fieldDetail.capacity.metrics.rowsPerBed", "Rows / bed"),
644
+ value: t(W.rowsPerBed)
645
+ }),
646
+ /* @__PURE__ */ l(b, {
647
+ label: c("healthybowl.crops.fieldDetail.capacity.metrics.plantsPerBed", "Plants / bed"),
648
+ value: t(W.plantsPerBed)
649
+ }),
650
+ /* @__PURE__ */ l(b, {
651
+ label: c("healthybowl.crops.fieldDetail.capacity.metrics.totalPlants", "Total plants"),
652
+ value: t(W.totalPlants)
653
+ }),
654
+ /* @__PURE__ */ l(b, {
655
+ label: c("healthybowl.crops.fieldDetail.capacity.metrics.seedlings", "Seedlings"),
656
+ value: t(W.seedlingTarget)
657
+ }),
658
+ /* @__PURE__ */ l(b, {
659
+ label: c("healthybowl.crops.fieldDetail.capacity.metrics.bedLength", "Bed length"),
660
+ value: v(W.bedLengthM),
661
+ unit: "m"
662
+ }),
663
+ /* @__PURE__ */ l(b, {
664
+ label: c("healthybowl.crops.fieldDetail.capacity.metrics.density", "Density"),
665
+ value: v(W.densityPlantsPerSqm, 2),
666
+ unit: c("healthybowl.crops.fieldDetail.capacity.metrics.densityUnit", "plants/m²")
667
+ })
668
+ ]
669
+ }),
670
+ K && /* @__PURE__ */ u("div", {
671
+ className: "mt-5 border-t border-border-subtle pt-4",
672
+ children: [
673
+ /* @__PURE__ */ u("h5", {
674
+ className: "mb-3 flex items-center gap-2 text-xs font-semibold uppercase tracking-wide text-text-secondary",
675
+ children: [
676
+ /* @__PURE__ */ l(Fe, { className: "h-3.5 w-3.5 text-success" }),
677
+ c("healthybowl.crops.fieldDetail.seedRate.heading", "Seed rate"),
678
+ G && /* @__PURE__ */ l("span", {
679
+ className: "rounded-full bg-success/10 px-2 py-0.5 text-[11px] font-medium normal-case text-success",
680
+ children: c("healthybowl.crops.fieldDetail.seedRate.fromCatalog", "from catalog")
681
+ })
682
+ ]
683
+ }),
684
+ /* @__PURE__ */ u("div", {
685
+ className: "grid grid-cols-2 gap-3 md:grid-cols-3",
686
+ children: [
687
+ /* @__PURE__ */ l(b, {
688
+ label: c("healthybowl.crops.fieldDetail.seedRate.seedNeeded", "Seed needed"),
689
+ value: K.seedGrams == null ? "—" : v(K.seedGrams, 2),
690
+ unit: K.seedGrams == null ? void 0 : "g"
691
+ }),
692
+ /* @__PURE__ */ l(b, {
693
+ label: c("healthybowl.crops.fieldDetail.seedRate.seedlings", "Seedlings to raise"),
694
+ value: t(K.seedlingsToRaise)
695
+ }),
696
+ /* @__PURE__ */ l(b, {
697
+ label: c("healthybowl.crops.fieldDetail.seedRate.trays", "Trays"),
698
+ value: K.trays == null ? "—" : t(K.trays)
699
+ })
700
+ ]
701
+ }),
702
+ K.seedGrams == null && /* @__PURE__ */ l("p", {
703
+ className: "mt-3 text-xs text-text-secondary",
704
+ children: c("healthybowl.crops.fieldDetail.seedRate.noSeedsPerGram", "Set “seeds per gram” for this variety in the Master Plant List to calculate seed weight in grams.")
705
+ })
706
+ ]
707
+ }),
708
+ /* @__PURE__ */ u("div", {
709
+ className: "mt-5 border-t border-border-subtle pt-4",
710
+ children: [/* @__PURE__ */ u("div", {
711
+ className: "flex flex-wrap items-center justify-between gap-2",
712
+ children: [/* @__PURE__ */ u("h5", {
713
+ className: "flex items-center gap-2 text-xs font-semibold uppercase tracking-wide text-text-secondary",
714
+ children: [/* @__PURE__ */ l(Le, { className: "h-3.5 w-3.5 text-success" }), c("healthybowl.crops.fieldDetail.compare.heading", "Compare crops for this field")]
715
+ }), Y.length > 0 && /* @__PURE__ */ u("span", {
716
+ className: "text-xs text-text-secondary",
717
+ children: [
718
+ t(Y.length),
719
+ " ",
720
+ c("healthybowl.crops.fieldDetail.compare.varieties", "varieties")
721
+ ]
722
+ })]
723
+ }), Y.length > 0 ? /* @__PURE__ */ u(We, { children: [
724
+ /* @__PURE__ */ l("p", {
725
+ className: "mt-1 text-xs text-text-secondary",
726
+ children: c("healthybowl.crops.fieldDetail.compare.description", "What each variety in your Master Plant List would need on this field, at the bed and path widths above.")
727
+ }),
728
+ /* @__PURE__ */ l("div", {
729
+ className: "mt-3 overflow-x-auto rounded-md border border-border-subtle",
730
+ children: /* @__PURE__ */ u("table", {
731
+ className: "w-full min-w-[680px] border-collapse text-sm",
732
+ children: [/* @__PURE__ */ l("thead", { children: /* @__PURE__ */ u("tr", {
733
+ className: "border-b border-border-subtle bg-bg-sunken/60",
734
+ children: [
735
+ /* @__PURE__ */ l(x, {
736
+ label: c("healthybowl.crops.fieldDetail.compare.crop", "Crop"),
737
+ sortKey: "label",
738
+ activeKey: q,
739
+ direction: J,
740
+ onSort: X
741
+ }),
742
+ /* @__PURE__ */ l("th", {
743
+ scope: "col",
744
+ className: "whitespace-nowrap px-3 py-2 text-right text-xs font-medium text-text-secondary",
745
+ children: c("healthybowl.crops.fieldDetail.compare.spacing", "Spacing")
746
+ }),
747
+ /* @__PURE__ */ l("th", {
748
+ scope: "col",
749
+ className: "whitespace-nowrap px-3 py-2 text-right text-xs font-medium text-text-secondary",
750
+ children: c("healthybowl.crops.fieldDetail.compare.beds", "Beds")
751
+ }),
752
+ /* @__PURE__ */ l(x, {
753
+ label: c("healthybowl.crops.fieldDetail.compare.totalPlants", "Total plants"),
754
+ sortKey: "totalPlants",
755
+ activeKey: q,
756
+ direction: J,
757
+ onSort: X,
758
+ align: "right"
759
+ }),
760
+ /* @__PURE__ */ l(x, {
761
+ label: c("healthybowl.crops.fieldDetail.compare.seed", "Seed needed"),
762
+ sortKey: "seedGrams",
763
+ activeKey: q,
764
+ direction: J,
765
+ onSort: X,
766
+ align: "right"
767
+ }),
768
+ /* @__PURE__ */ l(x, {
769
+ label: c("healthybowl.crops.fieldDetail.compare.trays", "Trays"),
770
+ sortKey: "trays",
771
+ activeKey: q,
772
+ direction: J,
773
+ onSort: X,
774
+ align: "right"
775
+ }),
776
+ /* @__PURE__ */ l(x, {
777
+ label: c("healthybowl.crops.fieldDetail.compare.maturity", "Days to maturity"),
778
+ sortKey: "daysToMaturity",
779
+ activeKey: q,
780
+ direction: J,
781
+ onSort: X,
782
+ align: "right"
783
+ })
784
+ ]
785
+ }) }), /* @__PURE__ */ l("tbody", { children: Y.map((e) => /* @__PURE__ */ u("tr", {
786
+ className: `border-b border-border-subtle last:border-b-0 ${G?.id === e.id ? "bg-success/5" : ""}`,
787
+ children: [
788
+ /* @__PURE__ */ u("td", {
789
+ className: "px-3 py-2",
790
+ children: [/* @__PURE__ */ l("span", {
791
+ className: "font-medium text-text-primary",
792
+ children: e.label
793
+ }), !e.spacingFromCatalog && /* @__PURE__ */ l("span", {
794
+ className: "ml-2 whitespace-nowrap rounded-full bg-bg-sunken px-1.5 py-0.5 text-[10px] text-text-secondary",
795
+ title: e.presetLabel,
796
+ children: c("healthybowl.crops.fieldDetail.compare.presetSpacing", "preset spacing")
797
+ })]
798
+ }),
799
+ /* @__PURE__ */ u("td", {
800
+ className: "whitespace-nowrap px-3 py-2 text-right tabular-nums text-text-secondary",
801
+ children: [
802
+ e.plantSpacingCm,
803
+ "×",
804
+ e.rowSpacingCm,
805
+ " cm"
806
+ ]
807
+ }),
808
+ /* @__PURE__ */ l("td", {
809
+ className: "px-3 py-2 text-right tabular-nums text-text-secondary",
810
+ children: t(e.capacity.bedCount)
811
+ }),
812
+ /* @__PURE__ */ l("td", {
813
+ className: "px-3 py-2 text-right font-medium tabular-nums text-text-primary",
814
+ children: t(e.capacity.totalPlants)
815
+ }),
816
+ /* @__PURE__ */ l("td", {
817
+ className: "whitespace-nowrap px-3 py-2 text-right tabular-nums text-text-secondary",
818
+ children: e.seed.seedGrams == null ? "—" : `${v(e.seed.seedGrams, 2)} g`
819
+ }),
820
+ /* @__PURE__ */ l("td", {
821
+ className: "px-3 py-2 text-right tabular-nums text-text-secondary",
822
+ children: e.seed.trays == null ? "—" : t(e.seed.trays)
823
+ }),
824
+ /* @__PURE__ */ l("td", {
825
+ className: "px-3 py-2 text-right tabular-nums text-text-secondary",
826
+ children: e.daysToMaturity == null ? "—" : t(e.daysToMaturity)
827
+ })
828
+ ]
829
+ }, e.id)) })]
675
830
  })
676
- ]
677
- }),
678
- X.seedGrams == null && /* @__PURE__ */ c("p", {
679
- className: "mt-3 text-xs text-text-secondary",
680
- children: v("healthybowl.crops.fieldDetail.seedRate.noSeedsPerGram", "Set “seeds per gram” for this variety in the Master Plant List to calculate seed weight in grams.")
681
- })
682
- ]
683
- })] }) : /* @__PURE__ */ c("p", {
831
+ }),
832
+ /* @__PURE__ */ l("p", {
833
+ className: "mt-2 text-xs text-text-secondary",
834
+ children: c("healthybowl.crops.fieldDetail.compare.footnote", "A dash means the variety has no seeds-per-gram recorded yet. “Preset spacing” means the figures use a crop-family default rather than spacing you have recorded.")
835
+ })
836
+ ] }) : /* @__PURE__ */ l("p", {
837
+ className: "mt-3 rounded-md border border-border-subtle bg-bg-sunken/60 p-3 text-xs text-text-secondary",
838
+ children: c("healthybowl.crops.fieldDetail.compare.empty", "Add varieties to your Master Plant List to compare beds and seed across crops for this field.")
839
+ })]
840
+ })
841
+ ] }) : /* @__PURE__ */ l("p", {
684
842
  className: "mt-4 rounded-md border border-border-subtle bg-bg-sunken/60 p-3 text-sm text-text-secondary",
685
- children: v("healthybowl.crops.fieldDetail.capacity.empty", "Draw a boundary on the map above, or set this field’s area, to calculate beds and plants.")
843
+ children: c("healthybowl.crops.fieldDetail.capacity.empty", "Draw a boundary on the map above, or set this field’s area, to calculate beds and plants.")
686
844
  })
687
845
  ]
688
846
  })
689
847
  ]
690
848
  }),
691
- /* @__PURE__ */ l("div", {
849
+ /* @__PURE__ */ u("div", {
692
850
  className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
693
851
  children: [
694
- /* @__PURE__ */ l("div", {
852
+ /* @__PURE__ */ u("div", {
695
853
  className: "mb-4",
696
- children: [/* @__PURE__ */ l("h3", {
854
+ children: [/* @__PURE__ */ u("h3", {
697
855
  className: "flex items-center gap-2 text-sm font-semibold text-text-primary",
698
856
  children: [
699
- /* @__PURE__ */ c(Me, { className: "h-4 w-4 text-success" }),
857
+ /* @__PURE__ */ l(Fe, { className: "h-4 w-4 text-success" }),
700
858
  " ",
701
- v("healthybowl.crops.fieldDetail.succession.heading", "Succession planting")
859
+ c("healthybowl.crops.fieldDetail.succession.heading", "Succession planting")
702
860
  ]
703
- }), /* @__PURE__ */ c("p", {
861
+ }), /* @__PURE__ */ l("p", {
704
862
  className: "mt-1 text-xs text-text-secondary",
705
- children: v("healthybowl.crops.fieldDetail.succession.description", "Generate a series of staggered sowings for a steady, continuous harvest. Uses the crop and seed-rate above.")
863
+ children: c("healthybowl.crops.fieldDetail.succession.description", "Generate a series of staggered sowings for a steady, continuous harvest. Uses the crop and seed-rate above.")
706
864
  })]
707
865
  }),
708
- /* @__PURE__ */ l("div", {
866
+ /* @__PURE__ */ u("div", {
709
867
  className: "grid gap-3 md:grid-cols-2 xl:grid-cols-4",
710
868
  children: [
711
- /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
869
+ /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
712
870
  className: "text-xs font-medium text-text-secondary",
713
- children: v("healthybowl.crops.fieldDetail.succession.startDate", "Start date")
714
- }), /* @__PURE__ */ c("input", {
871
+ children: c("healthybowl.crops.fieldDetail.succession.startDate", "Start date")
872
+ }), /* @__PURE__ */ l("input", {
715
873
  type: "date",
716
874
  value: Z,
717
- onChange: (e) => At(e.target.value),
875
+ onChange: (e) => Vt(e.target.value),
718
876
  className: "mt-1 h-10 w-full rounded-md border border-border-subtle bg-bg-surface px-3 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
719
877
  })] }),
720
- /* @__PURE__ */ c(y, {
721
- label: v("healthybowl.crops.fieldDetail.succession.interval", "Interval"),
722
- unit: v("healthybowl.crops.fieldDetail.succession.days", "days"),
723
- value: jt,
878
+ /* @__PURE__ */ l(y, {
879
+ label: c("healthybowl.crops.fieldDetail.succession.interval", "Interval"),
880
+ unit: c("healthybowl.crops.fieldDetail.succession.days", "days"),
881
+ value: Ht,
724
882
  min: "1",
725
883
  step: "1",
726
- onChange: Mt
884
+ onChange: Ut
727
885
  }),
728
- /* @__PURE__ */ c(y, {
729
- label: v("healthybowl.crops.fieldDetail.succession.count", "Number of sowings"),
730
- unit: v("healthybowl.crops.fieldDetail.succession.sowings", "sowings"),
731
- value: Nt,
886
+ /* @__PURE__ */ l(y, {
887
+ label: c("healthybowl.crops.fieldDetail.succession.count", "Number of sowings"),
888
+ unit: c("healthybowl.crops.fieldDetail.succession.sowings", "sowings"),
889
+ value: Wt,
732
890
  min: "1",
733
891
  step: "1",
734
- onChange: Pt
892
+ onChange: Gt
735
893
  }),
736
- Dt.length > 0 && /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
894
+ Rt.length > 0 && /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
737
895
  className: "text-xs font-medium text-text-secondary",
738
- children: v("healthybowl.crops.fieldDetail.succession.bed", "Bed (optional)")
739
- }), /* @__PURE__ */ l(d, {
740
- value: Ft || "none",
741
- onValueChange: (e) => It(e === "none" ? "" : e),
742
- children: [/* @__PURE__ */ c(m, {
896
+ children: c("healthybowl.crops.fieldDetail.succession.bed", "Bed (optional)")
897
+ }), /* @__PURE__ */ u(f, {
898
+ value: Kt || "none",
899
+ onValueChange: (e) => qt(e === "none" ? "" : e),
900
+ children: [/* @__PURE__ */ l(h, {
743
901
  className: "mt-1 w-full",
744
- children: /* @__PURE__ */ c(h, { placeholder: v("healthybowl.crops.fieldDetail.succession.bedPlaceholder", "No specific bed") })
745
- }), /* @__PURE__ */ l(f, { children: [/* @__PURE__ */ c(p, {
902
+ children: /* @__PURE__ */ l(g, { placeholder: c("healthybowl.crops.fieldDetail.succession.bedPlaceholder", "No specific bed") })
903
+ }), /* @__PURE__ */ u(p, { children: [/* @__PURE__ */ l(m, {
746
904
  value: "none",
747
- children: v("healthybowl.crops.fieldDetail.succession.bedNone", "No specific bed")
748
- }), Dt.map((e) => /* @__PURE__ */ c(p, {
905
+ children: c("healthybowl.crops.fieldDetail.succession.bedNone", "No specific bed")
906
+ }), Rt.map((e) => /* @__PURE__ */ l(m, {
749
907
  value: e.id,
750
908
  children: e.name
751
909
  }, e.id))] })]
752
910
  })] })
753
911
  ]
754
912
  }),
755
- /* @__PURE__ */ l("div", {
913
+ /* @__PURE__ */ u("div", {
756
914
  className: "mt-4 flex flex-wrap items-center justify-between gap-3",
757
- children: [/* @__PURE__ */ c("p", {
915
+ children: [/* @__PURE__ */ l("p", {
758
916
  className: "text-xs text-text-secondary",
759
- children: K ? v("healthybowl.crops.fieldDetail.succession.forCrop", "For: {{crop}}", { crop: K.variety ? `${K.name} - ${K.variety}` : K.name }) : v("healthybowl.crops.fieldDetail.succession.noCrop", "Select a crop in the capacity planner above.")
760
- }), /* @__PURE__ */ l(u, {
761
- onClick: Vt,
762
- disabled: Lt,
763
- children: [/* @__PURE__ */ c(je, { className: "h-4 w-4" }), Lt ? v("healthybowl.crops.fieldDetail.succession.generating", "Generating...") : v("healthybowl.crops.fieldDetail.succession.generate", "Generate schedule")]
917
+ children: V ? c("healthybowl.crops.fieldDetail.succession.forCrop", "For: {{crop}}", { crop: V.variety ? `${V.name} - ${V.variety}` : V.name }) : c("healthybowl.crops.fieldDetail.succession.noCrop", "Select a crop in the capacity planner above.")
918
+ }), /* @__PURE__ */ u(d, {
919
+ onClick: Qt,
920
+ disabled: Jt,
921
+ children: [/* @__PURE__ */ l(Pe, { className: "h-4 w-4" }), Jt ? c("healthybowl.crops.fieldDetail.succession.generating", "Generating...") : c("healthybowl.crops.fieldDetail.succession.generate", "Generate schedule")]
764
922
  })]
765
923
  }),
766
- zt.length > 0 ? /* @__PURE__ */ c("div", {
924
+ Xt.length > 0 ? /* @__PURE__ */ l("div", {
767
925
  className: "mt-5 space-y-5 border-t border-border-subtle pt-5",
768
- children: zt.map(([n, r]) => /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ l("div", {
926
+ children: Xt.map(([n, r]) => /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ u("div", {
769
927
  className: "mb-2 flex items-center justify-between",
770
- children: [/* @__PURE__ */ c("h4", {
928
+ children: [/* @__PURE__ */ l("h4", {
771
929
  className: "text-sm font-semibold text-text-primary",
772
- children: r[0] ? Bt(r[0]) : v("healthybowl.crops.fieldDetail.succession.series", "Succession series")
773
- }), /* @__PURE__ */ c("span", {
930
+ children: r[0] ? Zt(r[0]) : c("healthybowl.crops.fieldDetail.succession.series", "Succession series")
931
+ }), /* @__PURE__ */ l("span", {
774
932
  className: "text-xs text-text-secondary",
775
- children: v("healthybowl.crops.fieldDetail.succession.sowingCount", "{{count}} sowings", { count: r.length })
933
+ children: c("healthybowl.crops.fieldDetail.succession.sowingCount", "{{count}} sowings", { count: r.length })
776
934
  })]
777
- }), /* @__PURE__ */ c("div", {
935
+ }), /* @__PURE__ */ l("div", {
778
936
  className: "space-y-2",
779
- children: r.map((n, r) => /* @__PURE__ */ l("div", {
937
+ children: r.map((n, r) => /* @__PURE__ */ u("div", {
780
938
  className: "flex items-center justify-between rounded-md border border-border-subtle p-3",
781
- children: [/* @__PURE__ */ l("div", {
939
+ children: [/* @__PURE__ */ u("div", {
782
940
  className: "flex items-center gap-3",
783
- children: [/* @__PURE__ */ c("div", {
941
+ children: [/* @__PURE__ */ l("div", {
784
942
  className: "flex h-7 w-7 shrink-0 items-center justify-center rounded-full bg-success/10 text-xs font-semibold text-success",
785
943
  children: (n.successionIndex ?? r) + 1
786
- }), /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ l("p", {
944
+ }), /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ u("p", {
787
945
  className: "text-sm font-medium text-text-primary",
788
946
  children: [
789
- v("healthybowl.crops.fieldDetail.succession.sowingLabel", "Sowing {{n}}", { n: (n.successionIndex ?? r) + 1 }),
947
+ c("healthybowl.crops.fieldDetail.succession.sowingLabel", "Sowing {{n}}", { n: (n.successionIndex ?? r) + 1 }),
790
948
  " ",
791
949
  "— ",
792
950
  e(n.sowDate ?? n.startDate)
793
951
  ]
794
- }), n.seedlingsToRaise != null && /* @__PURE__ */ c("p", {
952
+ }), n.seedlingsToRaise != null && /* @__PURE__ */ l("p", {
795
953
  className: "text-xs text-text-secondary",
796
- children: v("healthybowl.crops.fieldDetail.succession.sowingMeta", "{{seedlings}} seedlings{{grams}}", {
954
+ children: c("healthybowl.crops.fieldDetail.succession.sowingMeta", "{{seedlings}} seedlings{{grams}}", {
797
955
  seedlings: t(n.seedlingsToRaise),
798
- grams: n.seedGrams == null ? "" : ` · ${_(n.seedGrams, 2)} g seed`
956
+ grams: n.seedGrams == null ? "" : ` · ${v(n.seedGrams, 2)} g seed`
799
957
  })
800
958
  })] })]
801
- }), /* @__PURE__ */ c(u, {
959
+ }), /* @__PURE__ */ l(d, {
802
960
  variant: "ghost",
803
961
  size: "icon-sm",
804
- onClick: () => void Ht(n),
805
- "aria-label": v("healthybowl.common.delete", "Delete"),
962
+ onClick: () => void $t(n),
963
+ "aria-label": c("healthybowl.common.delete", "Delete"),
806
964
  className: "text-status-error-text hover:bg-status-error-bg/10 hover:text-status-error-text",
807
- children: /* @__PURE__ */ c(Fe, { className: "h-4 w-4" })
965
+ children: /* @__PURE__ */ l(ze, { className: "h-4 w-4" })
808
966
  })]
809
967
  }, n.id))
810
968
  })] }, n))
811
- }) : /* @__PURE__ */ c("p", {
969
+ }) : /* @__PURE__ */ l("p", {
812
970
  className: "mt-5 rounded-md border border-border-subtle bg-bg-sunken/60 p-3 text-sm text-text-secondary",
813
- children: v("healthybowl.crops.fieldDetail.succession.empty", "No succession schedules yet. Set a start date, interval and number of sowings, then generate a series.")
971
+ children: c("healthybowl.crops.fieldDetail.succession.empty", "No succession schedules yet. Set a start date, interval and number of sowings, then generate a series.")
814
972
  })
815
973
  ]
816
974
  }),
817
- /* @__PURE__ */ l("div", {
975
+ /* @__PURE__ */ u("div", {
818
976
  className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
819
- children: [/* @__PURE__ */ l("h3", {
977
+ children: [/* @__PURE__ */ u("h3", {
820
978
  className: "mb-4 flex items-center gap-2 text-sm font-semibold text-text-primary",
821
979
  children: [
822
- /* @__PURE__ */ c(ke, { className: "h-4 w-4 text-success" }),
980
+ /* @__PURE__ */ l(Me, { className: "h-4 w-4 text-success" }),
823
981
  " ",
824
- v("healthybowl.crops.fieldDetail.currentCrops.heading", "Current Crops")
982
+ c("healthybowl.crops.fieldDetail.currentCrops.heading", "Current Crops")
825
983
  ]
826
- }), W.length > 0 ? /* @__PURE__ */ c("div", {
984
+ }), z.length > 0 ? /* @__PURE__ */ l("div", {
827
985
  className: "flex flex-col gap-3",
828
- children: W.map((e) => /* @__PURE__ */ l("div", {
986
+ children: z.map((e) => /* @__PURE__ */ u("div", {
829
987
  onClick: () => C(w(`crops/${e.id}`)),
830
988
  className: "flex cursor-pointer items-center justify-between rounded-md border border-border-subtle p-3 transition-colors hover:bg-bg-sunken/50",
831
- children: [/* @__PURE__ */ l("div", { children: [
832
- /* @__PURE__ */ c("span", {
989
+ children: [/* @__PURE__ */ u("div", { children: [
990
+ /* @__PURE__ */ l("span", {
833
991
  className: "text-sm font-medium text-text-primary",
834
992
  children: e.name
835
993
  }),
836
- /* @__PURE__ */ c("span", {
994
+ /* @__PURE__ */ l("span", {
837
995
  className: "ml-2 text-xs text-text-secondary",
838
996
  children: e.variety
839
997
  }),
840
- /* @__PURE__ */ l("div", {
998
+ /* @__PURE__ */ u("div", {
841
999
  className: "mt-1 flex items-center gap-2",
842
- children: [/* @__PURE__ */ c("div", {
1000
+ children: [/* @__PURE__ */ l("div", {
843
1001
  className: "h-1.5 w-24 rounded-full bg-bg-sunken",
844
- children: /* @__PURE__ */ c("div", {
1002
+ children: /* @__PURE__ */ l("div", {
845
1003
  className: "h-1.5 rounded-full bg-action-primary-bg",
846
1004
  style: { width: `${e.progress}%` }
847
1005
  })
848
- }), /* @__PURE__ */ l("span", {
1006
+ }), /* @__PURE__ */ u("span", {
849
1007
  className: "text-xs text-text-secondary",
850
1008
  children: [e.progress, "%"]
851
1009
  })]
852
1010
  })
853
- ] }), /* @__PURE__ */ l("div", {
1011
+ ] }), /* @__PURE__ */ u("div", {
854
1012
  className: "flex items-center gap-2",
855
- children: [/* @__PURE__ */ c(i, {
1013
+ children: [/* @__PURE__ */ l(i, {
856
1014
  label: e.growthStage,
857
1015
  variant: "info"
858
- }), /* @__PURE__ */ l("span", {
1016
+ }), /* @__PURE__ */ u("span", {
859
1017
  className: "text-xs text-text-secondary",
860
1018
  children: [e.daysToHarvest, "d"]
861
1019
  })]
862
1020
  })]
863
1021
  }, e.id))
864
- }) : /* @__PURE__ */ c("p", {
1022
+ }) : /* @__PURE__ */ l("p", {
865
1023
  className: "text-sm text-text-secondary",
866
- children: v("healthybowl.crops.fieldDetail.currentCrops.empty", "No crops currently planted.")
1024
+ children: c("healthybowl.crops.fieldDetail.currentCrops.empty", "No crops currently planted.")
867
1025
  })]
868
1026
  }),
869
- Q && /* @__PURE__ */ l("div", {
1027
+ Q && /* @__PURE__ */ u("div", {
870
1028
  className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
871
1029
  children: [
872
- /* @__PURE__ */ l("div", {
1030
+ /* @__PURE__ */ u("div", {
873
1031
  className: "mb-4 flex items-center justify-between",
874
- children: [/* @__PURE__ */ l("h3", {
1032
+ children: [/* @__PURE__ */ u("h3", {
875
1033
  className: "flex items-center gap-2 text-sm font-semibold text-text-primary",
876
1034
  children: [
877
- /* @__PURE__ */ c(xe, { className: "h-4 w-4 text-warning" }),
1035
+ /* @__PURE__ */ l(Ce, { className: "h-4 w-4 text-warning" }),
878
1036
  " ",
879
- v("healthybowl.crops.fieldDetail.soilHealth.heading", "Soil Health")
1037
+ c("healthybowl.crops.fieldDetail.soilHealth.heading", "Soil Health")
880
1038
  ]
881
- }), /* @__PURE__ */ c(i, {
1039
+ }), /* @__PURE__ */ l(i, {
882
1040
  label: (Q.status ?? "unknown").replace("_", " "),
883
- variant: Ue(Q.status ?? "unknown")
1041
+ variant: qe(Q.status ?? "unknown")
884
1042
  })]
885
1043
  }),
886
- /* @__PURE__ */ c("div", {
1044
+ /* @__PURE__ */ l("div", {
887
1045
  className: "grid grid-cols-2 gap-4 sm:grid-cols-3 lg:grid-cols-6",
888
1046
  children: [
889
1047
  {
890
1048
  key: "pH",
891
- label: v("healthybowl.crops.fieldDetail.soilHealth.metrics.ph", "pH"),
1049
+ label: c("healthybowl.crops.fieldDetail.soilHealth.metrics.ph", "pH"),
892
1050
  value: Q.ph.toString(),
893
1051
  good: Q.ph >= 6 && Q.ph <= 7.5
894
1052
  },
895
1053
  {
896
1054
  key: "Nitrogen",
897
- label: v("healthybowl.crops.fieldDetail.soilHealth.metrics.nitrogen", "Nitrogen"),
1055
+ label: c("healthybowl.crops.fieldDetail.soilHealth.metrics.nitrogen", "Nitrogen"),
898
1056
  value: `${Q.nitrogen} ppm`,
899
1057
  good: Q.nitrogen >= 30
900
1058
  },
901
1059
  {
902
1060
  key: "Phosphorus",
903
- label: v("healthybowl.crops.fieldDetail.soilHealth.metrics.phosphorus", "Phosphorus"),
1061
+ label: c("healthybowl.crops.fieldDetail.soilHealth.metrics.phosphorus", "Phosphorus"),
904
1062
  value: `${Q.phosphorus} ppm`,
905
1063
  good: Q.phosphorus >= 25
906
1064
  },
907
1065
  {
908
1066
  key: "Potassium",
909
- label: v("healthybowl.crops.fieldDetail.soilHealth.metrics.potassium", "Potassium"),
1067
+ label: c("healthybowl.crops.fieldDetail.soilHealth.metrics.potassium", "Potassium"),
910
1068
  value: `${Q.potassium} ppm`,
911
1069
  good: Q.potassium >= 150
912
1070
  },
913
1071
  {
914
1072
  key: "Organic Matter",
915
- label: v("healthybowl.crops.fieldDetail.soilHealth.metrics.organicMatter", "Organic Matter"),
1073
+ label: c("healthybowl.crops.fieldDetail.soilHealth.metrics.organicMatter", "Organic Matter"),
916
1074
  value: `${Q.organicMatter}%`,
917
1075
  good: Q.organicMatter >= 3
918
1076
  },
919
1077
  {
920
1078
  key: "Moisture",
921
- label: v("healthybowl.crops.fieldDetail.soilHealth.metrics.moisture", "Moisture"),
1079
+ label: c("healthybowl.crops.fieldDetail.soilHealth.metrics.moisture", "Moisture"),
922
1080
  value: `${Q.moisture}%`,
923
1081
  good: Q.moisture >= 20 && Q.moisture <= 40
924
1082
  }
925
- ].map(({ key: e, label: t, value: n, good: r }) => /* @__PURE__ */ l("div", {
1083
+ ].map(({ key: e, label: t, value: n, good: r }) => /* @__PURE__ */ u("div", {
926
1084
  className: "text-center",
927
- children: [/* @__PURE__ */ c("span", {
1085
+ children: [/* @__PURE__ */ l("span", {
928
1086
  className: "text-xs text-text-secondary",
929
1087
  children: t
930
- }), /* @__PURE__ */ c("p", {
1088
+ }), /* @__PURE__ */ l("p", {
931
1089
  className: `text-sm font-semibold ${r ? "text-success" : "text-warning"}`,
932
1090
  children: n
933
1091
  })]
934
1092
  }, e))
935
1093
  }),
936
- Q.recommendations.length > 0 && /* @__PURE__ */ l("div", {
1094
+ Q.recommendations.length > 0 && /* @__PURE__ */ u("div", {
937
1095
  className: "mt-4 border-t border-border-subtle pt-4",
938
- children: [/* @__PURE__ */ c("h4", {
1096
+ children: [/* @__PURE__ */ l("h4", {
939
1097
  className: "mb-2 text-xs font-medium text-text-secondary",
940
- children: v("healthybowl.crops.fieldDetail.soilHealth.recommendations", "Recommendations")
941
- }), /* @__PURE__ */ c("ul", {
1098
+ children: c("healthybowl.crops.fieldDetail.soilHealth.recommendations", "Recommendations")
1099
+ }), /* @__PURE__ */ l("ul", {
942
1100
  className: "space-y-1",
943
- children: Q.recommendations.map((e, t) => /* @__PURE__ */ l("li", {
1101
+ children: Q.recommendations.map((e, t) => /* @__PURE__ */ u("li", {
944
1102
  className: "text-xs text-text-primary",
945
1103
  children: ["- ", e]
946
1104
  }, t))
@@ -948,26 +1106,26 @@ var He = (e) => {
948
1106
  })
949
1107
  ]
950
1108
  }),
951
- /* @__PURE__ */ l("div", {
1109
+ /* @__PURE__ */ u("div", {
952
1110
  className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
953
- children: [/* @__PURE__ */ l("h3", {
1111
+ children: [/* @__PURE__ */ u("h3", {
954
1112
  className: "mb-4 flex items-center gap-2 text-sm font-semibold text-text-primary",
955
1113
  children: [
956
- /* @__PURE__ */ c(we, { className: "h-4 w-4 text-info" }),
1114
+ /* @__PURE__ */ l(Ee, { className: "h-4 w-4 text-info" }),
957
1115
  " ",
958
- v("healthybowl.crops.fieldDetail.cropHistory.heading", "Crop History")
1116
+ c("healthybowl.crops.fieldDetail.cropHistory.heading", "Crop History")
959
1117
  ]
960
- }), /* @__PURE__ */ c("div", {
1118
+ }), /* @__PURE__ */ l("div", {
961
1119
  className: "space-y-3",
962
- children: Wt.map((e, t) => /* @__PURE__ */ l("div", {
1120
+ children: tn.map((e, t) => /* @__PURE__ */ u("div", {
963
1121
  className: "flex items-center justify-between rounded-md border border-border-subtle p-3",
964
- children: [/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("span", {
1122
+ children: [/* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("span", {
965
1123
  className: "text-sm font-medium text-text-primary",
966
1124
  children: e.crop
967
- }), /* @__PURE__ */ c("p", {
1125
+ }), /* @__PURE__ */ l("p", {
968
1126
  className: "text-xs text-text-secondary",
969
1127
  children: e.season
970
- })] }), /* @__PURE__ */ c(i, {
1128
+ })] }), /* @__PURE__ */ l(i, {
971
1129
  label: e.status,
972
1130
  variant: e.status === "active" ? "success" : "muted"
973
1131
  })]
@@ -975,87 +1133,87 @@ var He = (e) => {
975
1133
  })]
976
1134
  })
977
1135
  ]
978
- }), /* @__PURE__ */ l("div", {
1136
+ }), /* @__PURE__ */ u("div", {
979
1137
  className: "space-y-6",
980
1138
  children: [
981
- /* @__PURE__ */ l("div", {
1139
+ /* @__PURE__ */ u("div", {
982
1140
  className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
983
- children: [/* @__PURE__ */ l("h3", {
1141
+ children: [/* @__PURE__ */ u("h3", {
984
1142
  className: "mb-4 flex items-center gap-2 text-sm font-semibold text-text-primary",
985
1143
  children: [
986
- /* @__PURE__ */ c(Te, { className: "h-4 w-4 text-info" }),
1144
+ /* @__PURE__ */ l(Oe, { className: "h-4 w-4 text-info" }),
987
1145
  " ",
988
- v("healthybowl.crops.fieldDetail.weather.heading", "Current Conditions")
1146
+ c("healthybowl.crops.fieldDetail.weather.heading", "Current Conditions")
989
1147
  ]
990
- }), /* @__PURE__ */ l("div", {
1148
+ }), /* @__PURE__ */ u("div", {
991
1149
  className: "space-y-3",
992
1150
  children: [
993
- /* @__PURE__ */ l("div", {
1151
+ /* @__PURE__ */ u("div", {
994
1152
  className: "flex items-center justify-between",
995
- children: [/* @__PURE__ */ l("span", {
1153
+ children: [/* @__PURE__ */ u("span", {
996
1154
  className: "flex items-center gap-1.5 text-xs text-text-secondary",
997
1155
  children: [
998
- /* @__PURE__ */ c(Pe, { className: "h-3.5 w-3.5" }),
1156
+ /* @__PURE__ */ l(Re, { className: "h-3.5 w-3.5" }),
999
1157
  " ",
1000
- v("healthybowl.crops.fieldDetail.weather.temperature", "Temperature")
1158
+ c("healthybowl.crops.fieldDetail.weather.temperature", "Temperature")
1001
1159
  ]
1002
- }), /* @__PURE__ */ l("span", {
1160
+ }), /* @__PURE__ */ u("span", {
1003
1161
  className: "text-sm font-medium text-text-primary",
1004
1162
  children: [$.current.temperature, "°C"]
1005
1163
  })]
1006
1164
  }),
1007
- /* @__PURE__ */ l("div", {
1165
+ /* @__PURE__ */ u("div", {
1008
1166
  className: "flex items-center justify-between",
1009
- children: [/* @__PURE__ */ l("span", {
1167
+ children: [/* @__PURE__ */ u("span", {
1010
1168
  className: "flex items-center gap-1.5 text-xs text-text-secondary",
1011
1169
  children: [
1012
- /* @__PURE__ */ c(Ee, { className: "h-3.5 w-3.5" }),
1170
+ /* @__PURE__ */ l(ke, { className: "h-3.5 w-3.5" }),
1013
1171
  " ",
1014
- v("healthybowl.crops.fieldDetail.weather.humidity", "Humidity")
1172
+ c("healthybowl.crops.fieldDetail.weather.humidity", "Humidity")
1015
1173
  ]
1016
- }), /* @__PURE__ */ l("span", {
1174
+ }), /* @__PURE__ */ u("span", {
1017
1175
  className: "text-sm font-medium text-text-primary",
1018
1176
  children: [$.current.humidity, "%"]
1019
1177
  })]
1020
1178
  }),
1021
- /* @__PURE__ */ l("div", {
1179
+ /* @__PURE__ */ u("div", {
1022
1180
  className: "flex items-center justify-between",
1023
- children: [/* @__PURE__ */ l("span", {
1181
+ children: [/* @__PURE__ */ u("span", {
1024
1182
  className: "flex items-center gap-1.5 text-xs text-text-secondary",
1025
1183
  children: [
1026
- /* @__PURE__ */ c(Le, { className: "h-3.5 w-3.5" }),
1184
+ /* @__PURE__ */ l(Ve, { className: "h-3.5 w-3.5" }),
1027
1185
  " ",
1028
- v("healthybowl.crops.fieldDetail.weather.wind", "Wind")
1186
+ c("healthybowl.crops.fieldDetail.weather.wind", "Wind")
1029
1187
  ]
1030
- }), /* @__PURE__ */ l("span", {
1188
+ }), /* @__PURE__ */ u("span", {
1031
1189
  className: "text-sm font-medium text-text-primary",
1032
1190
  children: [$.current.windSpeed, " km/h"]
1033
1191
  })]
1034
1192
  }),
1035
- /* @__PURE__ */ l("div", {
1193
+ /* @__PURE__ */ u("div", {
1036
1194
  className: "flex items-center justify-between",
1037
- children: [/* @__PURE__ */ l("span", {
1195
+ children: [/* @__PURE__ */ u("span", {
1038
1196
  className: "flex items-center gap-1.5 text-xs text-text-secondary",
1039
1197
  children: [
1040
- /* @__PURE__ */ c(Ne, { className: "h-3.5 w-3.5" }),
1198
+ /* @__PURE__ */ l(Ie, { className: "h-3.5 w-3.5" }),
1041
1199
  " ",
1042
- v("healthybowl.crops.fieldDetail.weather.uvIndex", "UV Index")
1200
+ c("healthybowl.crops.fieldDetail.weather.uvIndex", "UV Index")
1043
1201
  ]
1044
- }), /* @__PURE__ */ c("span", {
1202
+ }), /* @__PURE__ */ l("span", {
1045
1203
  className: "text-sm font-medium text-text-primary",
1046
1204
  children: $.current.uvIndex
1047
1205
  })]
1048
1206
  }),
1049
- /* @__PURE__ */ l("div", {
1207
+ /* @__PURE__ */ u("div", {
1050
1208
  className: "flex items-center justify-between",
1051
- children: [/* @__PURE__ */ l("span", {
1209
+ children: [/* @__PURE__ */ u("span", {
1052
1210
  className: "flex items-center gap-1.5 text-xs text-text-secondary",
1053
1211
  children: [
1054
- /* @__PURE__ */ c(Oe, { className: "h-3.5 w-3.5" }),
1212
+ /* @__PURE__ */ l(je, { className: "h-3.5 w-3.5" }),
1055
1213
  " ",
1056
- v("healthybowl.crops.fieldDetail.weather.visibility", "Visibility")
1214
+ c("healthybowl.crops.fieldDetail.weather.visibility", "Visibility")
1057
1215
  ]
1058
- }), /* @__PURE__ */ l("span", {
1216
+ }), /* @__PURE__ */ u("span", {
1059
1217
  className: "text-sm font-medium text-text-primary",
1060
1218
  children: [$.current.visibility, " km"]
1061
1219
  })]
@@ -1063,75 +1221,75 @@ var He = (e) => {
1063
1221
  ]
1064
1222
  })]
1065
1223
  }),
1066
- /* @__PURE__ */ l("div", {
1224
+ /* @__PURE__ */ u("div", {
1067
1225
  className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
1068
- children: [/* @__PURE__ */ c("h3", {
1226
+ children: [/* @__PURE__ */ l("h3", {
1069
1227
  className: "mb-4 text-sm font-semibold text-text-primary",
1070
- children: v("healthybowl.crops.fieldDetail.quickActions.heading", "Quick Actions")
1071
- }), /* @__PURE__ */ l("div", {
1228
+ children: c("healthybowl.crops.fieldDetail.quickActions.heading", "Quick Actions")
1229
+ }), /* @__PURE__ */ u("div", {
1072
1230
  className: "space-y-2",
1073
1231
  children: [
1074
- /* @__PURE__ */ l(u, {
1232
+ /* @__PURE__ */ u(d, {
1075
1233
  variant: "outline",
1076
1234
  onClick: () => C(w("weather")),
1077
1235
  className: "w-full justify-start",
1078
1236
  children: [
1079
- /* @__PURE__ */ c(Ne, { className: "h-4 w-4 text-text-secondary" }),
1237
+ /* @__PURE__ */ l(Ie, { className: "h-4 w-4 text-text-secondary" }),
1080
1238
  " ",
1081
- v("healthybowl.crops.fieldDetail.quickActions.weatherData", "Weather Data")
1239
+ c("healthybowl.crops.fieldDetail.quickActions.weatherData", "Weather Data")
1082
1240
  ]
1083
1241
  }),
1084
- /* @__PURE__ */ l(u, {
1242
+ /* @__PURE__ */ u(d, {
1085
1243
  variant: "outline",
1086
1244
  onClick: () => C(w("soil-health")),
1087
1245
  className: "w-full justify-start",
1088
1246
  children: [
1089
- /* @__PURE__ */ c(Ce, { className: "h-4 w-4 text-text-secondary" }),
1247
+ /* @__PURE__ */ l(Te, { className: "h-4 w-4 text-text-secondary" }),
1090
1248
  " ",
1091
- v("healthybowl.crops.fieldDetail.quickActions.soilAnalysis", "Soil Analysis")
1249
+ c("healthybowl.crops.fieldDetail.quickActions.soilAnalysis", "Soil Analysis")
1092
1250
  ]
1093
1251
  }),
1094
- /* @__PURE__ */ l(u, {
1252
+ /* @__PURE__ */ u(d, {
1095
1253
  variant: "outline",
1096
1254
  onClick: () => C(w("crops")),
1097
1255
  className: "w-full justify-start",
1098
1256
  children: [
1099
- /* @__PURE__ */ c(Ie, { className: "h-4 w-4 text-text-secondary" }),
1257
+ /* @__PURE__ */ l(Be, { className: "h-4 w-4 text-text-secondary" }),
1100
1258
  " ",
1101
- v("healthybowl.crops.fieldDetail.quickActions.cropHistory", "Crop History")
1259
+ c("healthybowl.crops.fieldDetail.quickActions.cropHistory", "Crop History")
1102
1260
  ]
1103
1261
  }),
1104
- /* @__PURE__ */ l(u, {
1262
+ /* @__PURE__ */ u(d, {
1105
1263
  variant: "outline",
1106
1264
  onClick: () => C(w("analytics")),
1107
1265
  className: "w-full justify-start",
1108
1266
  children: [
1109
- /* @__PURE__ */ c(xe, { className: "h-4 w-4 text-text-secondary" }),
1267
+ /* @__PURE__ */ l(Ce, { className: "h-4 w-4 text-text-secondary" }),
1110
1268
  " ",
1111
- v("healthybowl.crops.fieldDetail.quickActions.generateReport", "Generate Report")
1269
+ c("healthybowl.crops.fieldDetail.quickActions.generateReport", "Generate Report")
1112
1270
  ]
1113
1271
  })
1114
1272
  ]
1115
1273
  })]
1116
1274
  }),
1117
- /* @__PURE__ */ l("div", {
1275
+ /* @__PURE__ */ u("div", {
1118
1276
  className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
1119
- children: [/* @__PURE__ */ c("h3", {
1277
+ children: [/* @__PURE__ */ l("h3", {
1120
1278
  className: "mb-4 text-sm font-semibold text-text-primary",
1121
- children: v("healthybowl.crops.fieldDetail.recentActivity.heading", "Recent Activity")
1122
- }), /* @__PURE__ */ c("div", {
1279
+ children: c("healthybowl.crops.fieldDetail.recentActivity.heading", "Recent Activity")
1280
+ }), /* @__PURE__ */ l("div", {
1123
1281
  className: "space-y-4",
1124
- children: Ut.map((t, n) => /* @__PURE__ */ l("div", {
1282
+ children: en.map((t, n) => /* @__PURE__ */ u("div", {
1125
1283
  className: "flex gap-3",
1126
- children: [/* @__PURE__ */ l("div", {
1284
+ children: [/* @__PURE__ */ u("div", {
1127
1285
  className: "relative flex flex-col items-center",
1128
- children: [/* @__PURE__ */ c("div", { className: "h-2 w-2 rounded-full bg-action-primary-bg" }), n < Ut.length - 1 && /* @__PURE__ */ c("div", { className: "w-0.5 flex-1 bg-border" })]
1129
- }), /* @__PURE__ */ l("div", {
1286
+ children: [/* @__PURE__ */ l("div", { className: "h-2 w-2 rounded-full bg-action-primary-bg" }), n < en.length - 1 && /* @__PURE__ */ l("div", { className: "w-0.5 flex-1 bg-border" })]
1287
+ }), /* @__PURE__ */ u("div", {
1130
1288
  className: "pb-4",
1131
- children: [/* @__PURE__ */ c("p", {
1289
+ children: [/* @__PURE__ */ l("p", {
1132
1290
  className: "text-sm text-text-primary",
1133
1291
  children: t.action
1134
- }), /* @__PURE__ */ c("p", {
1292
+ }), /* @__PURE__ */ l("p", {
1135
1293
  className: "text-xs text-text-secondary",
1136
1294
  children: e(t.date)
1137
1295
  })]
@@ -1142,163 +1300,179 @@ var He = (e) => {
1142
1300
  ]
1143
1301
  })]
1144
1302
  }),
1145
- /* @__PURE__ */ c(oe, {
1146
- open: nt,
1303
+ /* @__PURE__ */ l(ae, {
1304
+ open: ot,
1147
1305
  onClose: () => E(!1),
1148
- title: v("healthybowl.crops.fieldDetail.editModal.title", "Edit Field"),
1149
- description: v("healthybowl.crops.fieldDetail.editModal.description", "Update details for {{name}}", { name: k.name }),
1306
+ title: c("healthybowl.crops.fieldDetail.editModal.title", "Edit Field"),
1307
+ description: c("healthybowl.crops.fieldDetail.editModal.description", "Update details for {{name}}", { name: O.name }),
1150
1308
  size: "lg",
1151
- footer: /* @__PURE__ */ l(Be, { children: [/* @__PURE__ */ c(u, {
1309
+ footer: /* @__PURE__ */ u(We, { children: [/* @__PURE__ */ l(d, {
1152
1310
  variant: "outline",
1153
1311
  onClick: () => E(!1),
1154
- children: v("healthybowl.common.cancel", "Cancel")
1155
- }), /* @__PURE__ */ c(u, {
1156
- onClick: yt,
1157
- disabled: D,
1158
- children: D ? v("healthybowl.crops.fieldDetail.editModal.saving", "Saving...") : v("healthybowl.crops.fieldDetail.editModal.saveChanges", "Save Changes")
1312
+ children: c("healthybowl.common.cancel", "Cancel")
1313
+ }), /* @__PURE__ */ l(d, {
1314
+ onClick: Ot,
1315
+ disabled: st,
1316
+ children: st ? c("healthybowl.crops.fieldDetail.editModal.saving", "Saving...") : c("healthybowl.crops.fieldDetail.editModal.saveChanges", "Save Changes")
1159
1317
  })] }),
1160
- children: /* @__PURE__ */ l("div", {
1318
+ children: /* @__PURE__ */ u("div", {
1161
1319
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
1162
1320
  children: [
1163
- /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
1321
+ /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
1164
1322
  className: "text-sm font-medium text-text-primary",
1165
- children: v("healthybowl.crops.fieldDetail.form.fieldName.label", "Field Name *")
1166
- }), /* @__PURE__ */ c("input", {
1323
+ children: c("healthybowl.crops.fieldDetail.form.fieldName.label", "Field Name *")
1324
+ }), /* @__PURE__ */ l("input", {
1167
1325
  type: "text",
1168
- value: A,
1169
- onChange: (e) => rt(e.target.value),
1326
+ value: k,
1327
+ onChange: (e) => ct(e.target.value),
1170
1328
  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)]"
1171
1329
  })] }),
1172
- /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
1330
+ /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
1173
1331
  className: "text-sm font-medium text-text-primary",
1174
- children: v("healthybowl.crops.fieldDetail.form.area.label", "Area *")
1175
- }), /* @__PURE__ */ c("input", {
1332
+ children: c("healthybowl.crops.fieldDetail.form.area.label", "Area *")
1333
+ }), /* @__PURE__ */ l("input", {
1176
1334
  type: "number",
1177
1335
  min: 0,
1178
- value: j,
1179
- onChange: (e) => it(e.target.value),
1336
+ value: lt,
1337
+ onChange: (e) => ut(e.target.value),
1180
1338
  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)]"
1181
1339
  })] }),
1182
- /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
1340
+ /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
1183
1341
  className: "text-sm font-medium text-text-primary",
1184
- children: v("healthybowl.crops.fieldDetail.form.unit.label", "Unit")
1185
- }), /* @__PURE__ */ l(d, {
1186
- value: at,
1187
- onValueChange: (e) => ot(e),
1188
- children: [/* @__PURE__ */ c(m, {
1342
+ children: c("healthybowl.crops.fieldDetail.form.unit.label", "Unit")
1343
+ }), /* @__PURE__ */ u(f, {
1344
+ value: dt,
1345
+ onValueChange: (e) => ft(e),
1346
+ children: [/* @__PURE__ */ l(h, {
1189
1347
  className: "mt-1 w-full",
1190
- children: /* @__PURE__ */ c(h, {})
1191
- }), /* @__PURE__ */ l(f, { children: [/* @__PURE__ */ c(p, {
1348
+ children: /* @__PURE__ */ l(g, {})
1349
+ }), /* @__PURE__ */ u(p, { children: [/* @__PURE__ */ l(m, {
1192
1350
  value: "acres",
1193
- children: v("healthybowl.crops.fieldDetail.form.unit.options.acres", "Acres")
1194
- }), /* @__PURE__ */ c(p, {
1351
+ children: c("healthybowl.crops.fieldDetail.form.unit.options.acres", "Acres")
1352
+ }), /* @__PURE__ */ l(m, {
1195
1353
  value: "hectares",
1196
- children: v("healthybowl.crops.fieldDetail.form.unit.options.hectares", "Hectares")
1354
+ children: c("healthybowl.crops.fieldDetail.form.unit.options.hectares", "Hectares")
1197
1355
  })] })]
1198
1356
  })] }),
1199
- /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
1357
+ /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
1200
1358
  className: "text-sm font-medium text-text-primary",
1201
- children: v("healthybowl.crops.fieldDetail.form.status.label", "Status")
1202
- }), /* @__PURE__ */ l(d, {
1203
- value: ut,
1204
- onValueChange: dt,
1205
- children: [/* @__PURE__ */ c(m, {
1359
+ children: c("healthybowl.crops.fieldDetail.form.status.label", "Status")
1360
+ }), /* @__PURE__ */ u(f, {
1361
+ value: _t,
1362
+ onValueChange: vt,
1363
+ children: [/* @__PURE__ */ l(h, {
1206
1364
  className: "mt-1 w-full",
1207
- children: /* @__PURE__ */ c(h, {})
1208
- }), /* @__PURE__ */ l(f, { children: [
1209
- /* @__PURE__ */ c(p, {
1365
+ children: /* @__PURE__ */ l(g, {})
1366
+ }), /* @__PURE__ */ u(p, { children: [
1367
+ /* @__PURE__ */ l(m, {
1210
1368
  value: "active",
1211
- children: v("healthybowl.crops.fieldDetail.form.status.options.active", "Active")
1369
+ children: c("healthybowl.crops.fieldDetail.form.status.options.active", "Active")
1212
1370
  }),
1213
- /* @__PURE__ */ c(p, {
1371
+ /* @__PURE__ */ l(m, {
1214
1372
  value: "preparation",
1215
- children: v("healthybowl.crops.fieldDetail.form.status.options.preparation", "Preparation")
1373
+ children: c("healthybowl.crops.fieldDetail.form.status.options.preparation", "Preparation")
1216
1374
  }),
1217
- /* @__PURE__ */ c(p, {
1375
+ /* @__PURE__ */ l(m, {
1218
1376
  value: "fallow",
1219
- children: v("healthybowl.crops.fieldDetail.form.status.options.fallow", "Fallow")
1377
+ children: c("healthybowl.crops.fieldDetail.form.status.options.fallow", "Fallow")
1220
1378
  })
1221
1379
  ] })]
1222
1380
  })] }),
1223
- /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
1381
+ /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
1224
1382
  className: "text-sm font-medium text-text-primary",
1225
- children: v("healthybowl.crops.fieldDetail.form.soilType.label", "Soil Type")
1226
- }), /* @__PURE__ */ c("input", {
1383
+ children: c("healthybowl.crops.fieldDetail.form.soilType.label", "Soil Type")
1384
+ }), /* @__PURE__ */ l("input", {
1227
1385
  type: "text",
1228
- value: st,
1229
- onChange: (e) => M(e.target.value),
1386
+ value: pt,
1387
+ onChange: (e) => mt(e.target.value),
1230
1388
  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)]"
1231
1389
  })] }),
1232
- /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
1390
+ /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
1233
1391
  className: "text-sm font-medium text-text-primary",
1234
- children: v("healthybowl.crops.fieldDetail.form.irrigationType.label", "Irrigation Type")
1235
- }), /* @__PURE__ */ c("input", {
1392
+ children: c("healthybowl.crops.fieldDetail.form.irrigationType.label", "Irrigation Type")
1393
+ }), /* @__PURE__ */ l("input", {
1236
1394
  type: "text",
1237
- value: ct,
1238
- onChange: (e) => lt(e.target.value),
1395
+ value: ht,
1396
+ onChange: (e) => gt(e.target.value),
1239
1397
  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)]"
1240
1398
  })] }),
1241
- /* @__PURE__ */ c("div", {
1399
+ /* @__PURE__ */ l("div", {
1242
1400
  className: "sm:col-span-2",
1243
- children: /* @__PURE__ */ l("label", {
1401
+ children: /* @__PURE__ */ u("label", {
1244
1402
  className: "flex cursor-pointer items-center gap-2 text-sm font-medium text-text-primary",
1245
- children: [/* @__PURE__ */ c("input", {
1403
+ children: [/* @__PURE__ */ l("input", {
1246
1404
  type: "checkbox",
1247
- checked: ft,
1248
- onChange: (e) => pt(e.target.checked),
1405
+ checked: yt,
1406
+ onChange: (e) => bt(e.target.checked),
1249
1407
  className: "h-4 w-4 rounded border-border-subtle text-primary focus:ring-[var(--color-focus-ring)]"
1250
- }), v("healthybowl.crops.fieldDetail.form.organicCertified.label", "Organic Certified")]
1408
+ }), c("healthybowl.crops.fieldDetail.form.organicCertified.label", "Organic Certified")]
1251
1409
  })
1252
1410
  })
1253
1411
  ]
1254
1412
  })
1255
1413
  }),
1256
- /* @__PURE__ */ c(ne, {
1257
- toasts: et,
1258
- onDismiss: tt
1414
+ /* @__PURE__ */ l(te, {
1415
+ toasts: it,
1416
+ onDismiss: at
1259
1417
  })
1260
1418
  ]
1261
- }) : /* @__PURE__ */ c(r, {
1262
- title: v("healthybowl.crops.fieldDetail.notFound.pageTitle", "Field Not Found"),
1263
- children: Ye.crops ? /* @__PURE__ */ c(ae, {}) : Je.crops ? /* @__PURE__ */ c(te, { onRetry: Qe }) : /* @__PURE__ */ c(ee, {
1264
- title: v("healthybowl.crops.fieldDetail.notFound.title", "Field not found"),
1265
- description: v("healthybowl.crops.fieldDetail.notFound.description", "The field you are looking for does not exist."),
1266
- action: /* @__PURE__ */ c(u, {
1419
+ }) : /* @__PURE__ */ l(r, {
1420
+ title: c("healthybowl.crops.fieldDetail.notFound.pageTitle", "Field Not Found"),
1421
+ children: $e.crops ? /* @__PURE__ */ l(ie, {}) : Qe.crops ? /* @__PURE__ */ l(a, { onRetry: nt }) : /* @__PURE__ */ l(ee, {
1422
+ title: c("healthybowl.crops.fieldDetail.notFound.title", "Field not found"),
1423
+ description: c("healthybowl.crops.fieldDetail.notFound.description", "The field you are looking for does not exist."),
1424
+ action: /* @__PURE__ */ l(d, {
1267
1425
  onClick: () => C(w("crops/fields")),
1268
- children: v("healthybowl.crops.fieldDetail.actions.backToFields", "Back to Fields")
1426
+ children: c("healthybowl.crops.fieldDetail.actions.backToFields", "Back to Fields")
1269
1427
  })
1270
1428
  })
1271
1429
  });
1272
- }, y = ({ label: e, unit: t, value: n, min: r, step: i, onChange: ee }) => /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
1430
+ }, y = ({ label: e, unit: t, value: n, min: r, step: i, onChange: ee }) => /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
1273
1431
  className: "text-xs font-medium text-text-secondary",
1274
1432
  children: e
1275
- }), /* @__PURE__ */ l("div", {
1433
+ }), /* @__PURE__ */ u("div", {
1276
1434
  className: "relative mt-1",
1277
- children: [/* @__PURE__ */ c("input", {
1435
+ children: [/* @__PURE__ */ l("input", {
1278
1436
  type: "number",
1279
1437
  value: n,
1280
1438
  min: r,
1281
1439
  step: i,
1282
1440
  onChange: (e) => ee(e.target.value),
1283
1441
  className: "h-10 w-full rounded-md border border-border-subtle bg-bg-surface px-3 pr-10 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
1284
- }), /* @__PURE__ */ c("span", {
1442
+ }), /* @__PURE__ */ l("span", {
1285
1443
  className: "pointer-events-none absolute right-3 top-1/2 -translate-y-1/2 text-xs text-text-secondary",
1286
1444
  children: t
1287
1445
  })]
1288
- })] }), b = ({ label: e, value: t, unit: n }) => /* @__PURE__ */ l("div", {
1446
+ })] }), b = ({ label: e, value: t, unit: n }) => /* @__PURE__ */ u("div", {
1289
1447
  className: "min-w-0 rounded-md border border-border-subtle bg-bg-sunken/60 p-3",
1290
- children: [/* @__PURE__ */ c("span", {
1448
+ children: [/* @__PURE__ */ l("span", {
1291
1449
  className: "block truncate text-xs text-text-secondary",
1292
1450
  children: e
1293
- }), /* @__PURE__ */ l("p", {
1451
+ }), /* @__PURE__ */ u("p", {
1294
1452
  className: "mt-1 text-lg font-semibold text-text-primary",
1295
- children: [t, n && /* @__PURE__ */ c("span", {
1453
+ children: [t, n && /* @__PURE__ */ l("span", {
1296
1454
  className: "ml-1 text-xs font-medium text-text-secondary",
1297
1455
  children: n
1298
1456
  })]
1299
1457
  })]
1300
- });
1458
+ }), x = ({ label: e, sortKey: t, activeKey: n, direction: r, onSort: i, align: ee = "left" }) => {
1459
+ let a = n === t;
1460
+ return /* @__PURE__ */ l("th", {
1461
+ scope: "col",
1462
+ "aria-sort": a ? r === "asc" ? "ascending" : "descending" : "none",
1463
+ className: `whitespace-nowrap px-3 py-2 text-xs font-medium ${ee === "right" ? "text-right" : "text-left"}`,
1464
+ children: /* @__PURE__ */ u("button", {
1465
+ type: "button",
1466
+ onClick: () => i(t),
1467
+ className: `inline-flex items-center gap-1 rounded focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)] ${a ? "text-text-primary" : "text-text-secondary hover:text-text-primary"}`,
1468
+ children: [e, a && l(r === "asc" ? De : c, {
1469
+ className: "h-3 w-3",
1470
+ "aria-hidden": "true"
1471
+ })]
1472
+ })
1473
+ });
1474
+ };
1301
1475
  //#endregion
1302
- export { v as FieldDetailsPage };
1476
+ export { Ye as FieldDetailsPage };
1303
1477
 
1304
1478
  //# sourceMappingURL=FieldDetailsPage.js.map