@burdenoff/microfe-healthybowl 2026.709.3 → 2026.709.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.
@@ -1,10 +1,10 @@
1
- import { formatDate as e } from "../../utils/helpers.js";
2
- import { useBasePath as t } from "../../hooks/useBasePath.js";
3
- import { PageLayout as n } from "../../components/PageLayout.js";
4
- import { StatusBadge as r } from "../../components/StatusBadge.js";
5
- import { EmptyState as ee } from "../../components/EmptyState.js";
6
- import { ErrorState as te } from "../../components/ErrorState.js";
7
- import { ToastContainer as i } from "../../components/Toast.js";
1
+ import { formatDate as e, formatNumber as t } from "../../utils/helpers.js";
2
+ import { useBasePath as n } from "../../hooks/useBasePath.js";
3
+ import { PageLayout as r } from "../../components/PageLayout.js";
4
+ import { StatusBadge as i } from "../../components/StatusBadge.js";
5
+ import { EmptyState as a } from "../../components/EmptyState.js";
6
+ import { ErrorState as ee } from "../../components/ErrorState.js";
7
+ import { ToastContainer as te } from "../../components/Toast.js";
8
8
  import { useConfirm as ne } from "../../components/ConfirmDialog.js";
9
9
  import { Breadcrumbs as re } from "../../components/Breadcrumbs.js";
10
10
  import { PageLoader as ie } from "../../components/PageLoader.js";
@@ -14,91 +14,123 @@ import { FieldMap as se } from "../../components/FieldMap.js";
14
14
  import { CreateFarmTaskButton as ce } from "../../components/CreateFarmTaskButton.js";
15
15
  import "../../components/index.js";
16
16
  import { useHealthyBowlData as le } from "../../hooks/useHealthyBowlData.js";
17
- import { useMemo as a, useState as o } from "react";
18
- import { useI18n as ue } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
19
- import { Activity as s, ArrowLeft as c, BarChart3 as l, Calendar as de, CloudRain as fe, Droplets as pe, Edit as me, Eye as he, Leaf as ge, Map as _e, Sun as u, Thermometer as ve, Trash2 as ye, TrendingUp as be, Wind as xe } from "lucide-react";
20
- import { useNavigate as Se, useParams as Ce } from "react-router-dom";
21
- import { Fragment as we, jsx as d, jsxs as f } from "react/jsx-runtime";
22
- import { Button as p, GlassCard as Te, Select as m, SelectContent as h, SelectItem as g, SelectTrigger as _, SelectValue as v } from "@burdenoff/fe-libs/ui";
17
+ import { DEFAULT_BED_WIDTH_M as o, DEFAULT_CROP_SPACING_PRESET as s, DEFAULT_PATH_WIDTH_M as c, estimatePlantingCapacity as ue, getCropSpacingPreset as l } from "../../utils/plantingCapacity.js";
18
+ import { useEffect as de, useMemo as u, useState as d } from "react";
19
+ import { useI18n as fe } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
20
+ import { Activity as f, ArrowLeft as pe, BarChart3 as me, Calendar as he, CloudRain as ge, Droplets as _e, Edit as ve, Eye as ye, Leaf as be, Map as xe, Sun as Se, Thermometer as Ce, Trash2 as we, TrendingUp as Te, Wind as Ee } from "lucide-react";
21
+ import { useNavigate as De, useParams as Oe } from "react-router-dom";
22
+ import { Fragment as ke, jsx as p, jsxs as m } from "react/jsx-runtime";
23
+ import { Button as h, GlassCard as Ae, Select as g, SelectContent as _, SelectItem as v, SelectTrigger as y, SelectValue as b } from "@burdenoff/fe-libs/ui";
23
24
  //#region src/healthybowl/pages/crops/FieldDetailsPage.tsx
24
- var y = (e) => {
25
+ var x = (e) => {
25
26
  switch (e) {
26
27
  case "active": return "success";
27
28
  case "fallow": return "muted";
28
29
  case "preparation": return "warning";
29
30
  default: return "default";
30
31
  }
31
- }, Ee = (e) => {
32
+ }, je = (e) => {
32
33
  switch (e) {
33
34
  case "optimal": return "success";
34
35
  case "acceptable": return "info";
35
36
  case "needs_attention": return "warning";
36
37
  default: return "error";
37
38
  }
38
- }, b = () => {
39
- let { t: b } = ue(), De = ne(), { fields: x, crops: S, soilTests: C, weatherData: w, errors: T, loadings: E, updateField: Oe, deleteField: ke, refetch: D } = le(), { fieldId: Ae } = Ce(), O = Se(), { buildPath: k } = t(), { toasts: je, toast: A, dismiss: Me } = oe(), [Ne, j] = o(!1), [M, N] = o(!1), P = x.find((e) => e.id === Ae), [F, I] = o(""), [L, R] = o(""), [z, B] = o("acres"), [V, H] = o(""), [U, W] = o(""), [G, K] = o("active"), [q, J] = o(!1), Y = () => {
40
- P && (I(P.name), R(String(P.area)), B(P.unit ?? "acres"), H(P.soilType), W(P.irrigationType), K(P.status), J(P.organicCertified), j(!0));
41
- }, Pe = async () => {
42
- if (P) {
43
- if (!F.trim() || !L) {
44
- A({
45
- title: b("healthybowl.crops.fieldDetail.toast.missingFields.title", "Missing required fields"),
46
- description: b("healthybowl.crops.fieldDetail.toast.missingFields.description", "Name and area are required."),
39
+ }, S = (e, t) => {
40
+ let n = Number(e);
41
+ return Number.isFinite(n) && n > 0 ? n : t;
42
+ }, Me = (e, t) => {
43
+ let n = Number(e);
44
+ return Number.isFinite(n) && n >= 0 ? n : t;
45
+ }, Ne = (e, t = 1) => new Intl.NumberFormat("en-US", { maximumFractionDigits: t }).format(e), C = () => {
46
+ let { t: C } = fe(), Pe = ne(), { fields: Fe, crops: E, soilTests: Ie, weatherData: D, errors: Le, loadings: Re, updateField: ze, deleteField: Be, refetch: O } = le(), { fieldId: Ve } = Oe(), k = De(), { buildPath: A } = n(), { toasts: He, toast: j, dismiss: Ue } = oe(), [We, M] = d(!1), [N, P] = d(!1), F = Fe.find((e) => e.id === Ve), [I, Ge] = d(""), [L, Ke] = d(""), [qe, Je] = d("acres"), [Ye, Xe] = d(""), [Ze, Qe] = d(""), [$e, et] = d("active"), [tt, nt] = d(!1), [R, rt] = d(""), [z, B] = d(String(s.plantSpacingCm)), [V, H] = d(String(s.rowSpacingCm)), [U, it] = d(String(o)), [W, at] = d(String(c)), G = () => {
47
+ F && (Ge(F.name), Ke(String(F.area)), Je(F.unit ?? "acres"), Xe(F.soilType), Qe(F.irrigationType), et(F.status), nt(F.organicCertified), M(!0));
48
+ }, ot = async () => {
49
+ if (F) {
50
+ if (!I.trim() || !L) {
51
+ j({
52
+ title: C("healthybowl.crops.fieldDetail.toast.missingFields.title", "Missing required fields"),
53
+ description: C("healthybowl.crops.fieldDetail.toast.missingFields.description", "Name and area are required."),
47
54
  variant: "warning"
48
55
  });
49
56
  return;
50
57
  }
51
- N(!0);
58
+ P(!0);
52
59
  try {
53
- await Oe({
54
- id: P.id,
55
- name: F.trim(),
60
+ await ze({
61
+ id: F.id,
62
+ name: I.trim(),
56
63
  area: Number(L),
57
- unit: z,
58
- soilType: V.trim() || "Unknown",
59
- irrigationType: U.trim() || "None",
60
- status: G,
61
- organicCertified: q
62
- }), A({
63
- title: b("healthybowl.crops.fieldDetail.toast.updated.title", "Field updated"),
64
- description: b("healthybowl.crops.fieldDetail.toast.updated.description", "{{name}} has been saved.", { name: F.trim() }),
64
+ unit: qe,
65
+ soilType: Ye.trim() || "Unknown",
66
+ irrigationType: Ze.trim() || "None",
67
+ status: $e,
68
+ organicCertified: tt
69
+ }), j({
70
+ title: C("healthybowl.crops.fieldDetail.toast.updated.title", "Field updated"),
71
+ description: C("healthybowl.crops.fieldDetail.toast.updated.description", "{{name}} has been saved.", { name: I.trim() }),
65
72
  variant: "success"
66
- }), j(!1);
73
+ }), M(!1);
67
74
  } catch (e) {
68
- A({
69
- title: b("healthybowl.crops.fieldDetail.toast.updateFailed.title", "Update failed"),
75
+ j({
76
+ title: C("healthybowl.crops.fieldDetail.toast.updateFailed.title", "Update failed"),
70
77
  description: String(e),
71
78
  variant: "error"
72
79
  });
73
80
  } finally {
74
- N(!1);
81
+ P(!1);
75
82
  }
76
83
  }
77
- }, Fe = async () => {
78
- if (P && await De({
79
- title: b("healthybowl.crops.fieldDetail.deleteConfirm.title", "Delete field?"),
80
- message: b("healthybowl.crops.fieldDetail.deleteConfirm.message", "{{name}} will be permanently removed.", { name: P.name }),
81
- okButtonTitle: b("healthybowl.common.delete", "Delete"),
82
- cancelButtonTitle: b("healthybowl.common.cancel", "Cancel")
84
+ }, st = async () => {
85
+ if (F && await Pe({
86
+ title: C("healthybowl.crops.fieldDetail.deleteConfirm.title", "Delete field?"),
87
+ message: C("healthybowl.crops.fieldDetail.deleteConfirm.message", "{{name}} will be permanently removed.", { name: F.name }),
88
+ okButtonTitle: C("healthybowl.common.delete", "Delete"),
89
+ cancelButtonTitle: C("healthybowl.common.cancel", "Cancel")
83
90
  }) !== !1) {
84
- N(!0);
91
+ P(!0);
85
92
  try {
86
- await ke(P.id), A({
87
- title: b("healthybowl.crops.fieldDetail.toast.deleted.title", "Field deleted"),
88
- description: b("healthybowl.crops.fieldDetail.toast.deleted.description", "{{name}} has been removed.", { name: P.name }),
93
+ await Be(F.id), j({
94
+ title: C("healthybowl.crops.fieldDetail.toast.deleted.title", "Field deleted"),
95
+ description: C("healthybowl.crops.fieldDetail.toast.deleted.description", "{{name}} has been removed.", { name: F.name }),
89
96
  variant: "success"
90
- }), O(k("crops/fields"));
97
+ }), k(A("crops/fields"));
91
98
  } catch (e) {
92
- A({
93
- title: b("healthybowl.crops.fieldDetail.toast.deleteFailed.title", "Delete failed"),
99
+ j({
100
+ title: C("healthybowl.crops.fieldDetail.toast.deleteFailed.title", "Delete failed"),
94
101
  description: String(e),
95
102
  variant: "error"
96
- }), N(!1);
103
+ }), P(!1);
97
104
  }
98
105
  }
99
- }, X = a(() => P ? S.filter((e) => e.field === P.id || e.fieldName === P.name) : [], [S, P]), Z = P ? C.find((e) => e.fieldName === P.name) : void 0, Q = {
100
- location: w?.location ?? "",
101
- current: w?.current ?? {
106
+ }, K = u(() => F ? E.filter((e) => e.field === F.id || e.fieldName === F.name) : [], [E, F]), q = u(() => K.length > 0 ? K : E, [E, K]), J = u(() => q.find((e) => e.id === R) ?? q[0] ?? null, [R, q]), Y = u(() => l(J), [J]), X = u(() => F ? ue({
107
+ fieldArea: F.area,
108
+ fieldUnit: F.unit,
109
+ bedWidthM: S(U, o),
110
+ pathWidthM: Me(W, c),
111
+ plantSpacingCm: S(z, Y.plantSpacingCm),
112
+ rowSpacingCm: S(V, Y.rowSpacingCm)
113
+ }) : null, [
114
+ U,
115
+ F,
116
+ W,
117
+ z,
118
+ V,
119
+ Y
120
+ ]);
121
+ de(() => {
122
+ if (!J || R === J.id) return;
123
+ let e = l(J);
124
+ rt(J.id), B(String(e.plantSpacingCm)), H(String(e.rowSpacingCm));
125
+ }, [R, J]);
126
+ let ct = (e) => {
127
+ let t = q.find((t) => t.id === e);
128
+ rt(e);
129
+ let n = l(t);
130
+ B(String(n.plantSpacingCm)), H(String(n.rowSpacingCm));
131
+ }, Z = F ? Ie.find((e) => e.fieldName === F.name) : void 0, Q = {
132
+ location: D?.location ?? "",
133
+ current: D?.current ?? {
102
134
  temperature: 0,
103
135
  condition: "N/A",
104
136
  feelsLike: 0,
@@ -108,85 +140,85 @@ var y = (e) => {
108
140
  pressure: 0,
109
141
  visibility: 0
110
142
  },
111
- forecast: w?.forecast ?? []
112
- }, $ = a(() => {
143
+ forecast: D?.forecast ?? []
144
+ }, $ = u(() => {
113
145
  let e = [];
114
- return X.forEach((t) => {
146
+ return K.forEach((t) => {
115
147
  t.plantingDate && e.push({
116
148
  date: t.plantingDate,
117
- action: b("healthybowl.crops.fieldDetail.timeline.planted", "{{name}} ({{variety}}) planted", {
149
+ action: C("healthybowl.crops.fieldDetail.timeline.planted", "{{name}} ({{variety}}) planted", {
118
150
  name: t.name,
119
151
  variety: t.variety
120
152
  }),
121
153
  type: "planting"
122
154
  }), t.expectedHarvestDate && e.push({
123
155
  date: t.expectedHarvestDate,
124
- action: b("healthybowl.crops.fieldDetail.timeline.expectedHarvest", "{{name}} expected harvest", { name: t.name }),
156
+ action: C("healthybowl.crops.fieldDetail.timeline.expectedHarvest", "{{name}} expected harvest", { name: t.name }),
125
157
  type: "harvest"
126
158
  });
127
159
  }), Z && e.push({
128
160
  date: Z.date,
129
- action: b("healthybowl.crops.fieldDetail.timeline.soilTestConducted", "Soil test conducted"),
161
+ action: C("healthybowl.crops.fieldDetail.timeline.soilTestConducted", "Soil test conducted"),
130
162
  type: "testing"
131
163
  }), e.sort((e, t) => new Date(t.date).getTime() - new Date(e.date).getTime()), e.length === 0 ? [{
132
164
  date: (/* @__PURE__ */ new Date()).toISOString().split("T")[0],
133
- action: b("healthybowl.crops.fieldDetail.timeline.noActivity", "No activity recorded yet"),
165
+ action: C("healthybowl.crops.fieldDetail.timeline.noActivity", "No activity recorded yet"),
134
166
  type: "info"
135
167
  }] : e.slice(0, 5);
136
168
  }, [
137
- X,
169
+ K,
138
170
  Z,
139
- b
140
- ]), Ie = a(() => X.length === 0 ? [{
141
- season: b("healthybowl.crops.fieldDetail.cropHistory.currentSeason", "Current"),
142
- crop: b("healthybowl.crops.fieldDetail.cropHistory.noCropsPlanted", "No crops planted"),
171
+ C
172
+ ]), lt = u(() => K.length === 0 ? [{
173
+ season: C("healthybowl.crops.fieldDetail.cropHistory.currentSeason", "Current"),
174
+ crop: C("healthybowl.crops.fieldDetail.cropHistory.noCropsPlanted", "No crops planted"),
143
175
  status: "fallow"
144
- }] : X.map((e) => ({
176
+ }] : K.map((e) => ({
145
177
  season: `${e.season.charAt(0).toUpperCase() + e.season.slice(1)} - ${e.plantingDate ? new Date(e.plantingDate).getFullYear() : "N/A"}`,
146
178
  crop: `${e.name} (${e.variety})`,
147
179
  status: e.status === "harvested" ? "completed" : "active"
148
- })), [X, b]);
149
- return P ? /* @__PURE__ */ f(n, {
150
- title: P.name,
151
- description: b("healthybowl.crops.fieldDetail.header.description", "{{area}} {{unit}} - {{soilType}}", {
152
- area: P.area,
153
- unit: P.unit,
154
- soilType: P.soilType
180
+ })), [K, C]);
181
+ return F ? /* @__PURE__ */ m(r, {
182
+ title: F.name,
183
+ description: C("healthybowl.crops.fieldDetail.header.description", "{{area}} {{unit}} - {{soilType}}", {
184
+ area: F.area,
185
+ unit: F.unit,
186
+ soilType: F.soilType
155
187
  }),
156
- actions: /* @__PURE__ */ f("div", {
188
+ actions: /* @__PURE__ */ m("div", {
157
189
  className: "flex items-center gap-2",
158
190
  children: [
159
- /* @__PURE__ */ d(ce, {
191
+ /* @__PURE__ */ p(ce, {
160
192
  entityType: "FIELD",
161
- entityId: P.id,
162
- entityLabel: P.name
193
+ entityId: F.id,
194
+ entityLabel: F.name
163
195
  }),
164
- /* @__PURE__ */ f(p, {
196
+ /* @__PURE__ */ m(h, {
165
197
  variant: "outline",
166
- onClick: () => O(k("crops/fields")),
198
+ onClick: () => k(A("crops/fields")),
167
199
  children: [
168
- /* @__PURE__ */ d(c, { className: "h-4 w-4" }),
200
+ /* @__PURE__ */ p(pe, { className: "h-4 w-4" }),
169
201
  " ",
170
- b("healthybowl.crops.fieldDetail.actions.backToFields", "Back to Fields")
202
+ C("healthybowl.crops.fieldDetail.actions.backToFields", "Back to Fields")
171
203
  ]
172
204
  }),
173
- /* @__PURE__ */ f(p, {
205
+ /* @__PURE__ */ m(h, {
174
206
  variant: "outline",
175
- onClick: Y,
207
+ onClick: G,
176
208
  children: [
177
- /* @__PURE__ */ d(me, { className: "h-4 w-4" }),
209
+ /* @__PURE__ */ p(ve, { className: "h-4 w-4" }),
178
210
  " ",
179
- b("healthybowl.crops.fieldDetail.actions.editField", "Edit Field")
211
+ C("healthybowl.crops.fieldDetail.actions.editField", "Edit Field")
180
212
  ]
181
213
  }),
182
- /* @__PURE__ */ f(p, {
214
+ /* @__PURE__ */ m(h, {
183
215
  variant: "destructive",
184
- onClick: Fe,
185
- disabled: M,
216
+ onClick: st,
217
+ disabled: N,
186
218
  children: [
187
- /* @__PURE__ */ d(ye, { className: "h-4 w-4" }),
219
+ /* @__PURE__ */ p(we, { className: "h-4 w-4" }),
188
220
  " ",
189
- b("healthybowl.common.delete", "Delete")
221
+ C("healthybowl.common.delete", "Delete")
190
222
  ]
191
223
  })
192
224
  ]
@@ -195,150 +227,150 @@ var y = (e) => {
195
227
  nextSteps: [
196
228
  {
197
229
  id: "edit",
198
- label: b("healthybowl.crops.fieldDetail.nextSteps.edit.label", "Update field details"),
199
- description: b("healthybowl.crops.fieldDetail.nextSteps.edit.desc", "Keep area, soil type and irrigation info current."),
200
- onClick: Y
230
+ label: C("healthybowl.crops.fieldDetail.nextSteps.edit.label", "Update field details"),
231
+ description: C("healthybowl.crops.fieldDetail.nextSteps.edit.desc", "Keep area, soil type and irrigation info current."),
232
+ onClick: G
201
233
  },
202
234
  {
203
235
  id: "soil",
204
- label: b("healthybowl.crops.fieldDetail.nextSteps.soil.label", "Run a soil test"),
205
- description: b("healthybowl.crops.fieldDetail.nextSteps.soil.desc", "Check fertility before you plant or fertilise this field."),
206
- href: k("soil/tests")
236
+ label: C("healthybowl.crops.fieldDetail.nextSteps.soil.label", "Run a soil test"),
237
+ description: C("healthybowl.crops.fieldDetail.nextSteps.soil.desc", "Check fertility before you plant or fertilise this field."),
238
+ href: A("soil/tests")
207
239
  },
208
240
  {
209
241
  id: "plan",
210
- label: b("healthybowl.crops.fieldDetail.nextSteps.plan.label", "Plan what to plant here"),
211
- description: b("healthybowl.crops.fieldDetail.nextSteps.plan.desc", "Add a planting plan so this field is working toward your goals."),
212
- href: k("crops/planning")
242
+ label: C("healthybowl.crops.fieldDetail.nextSteps.plan.label", "Plan what to plant here"),
243
+ description: C("healthybowl.crops.fieldDetail.nextSteps.plan.desc", "Add a planting plan so this field is working toward your goals."),
244
+ href: A("crops/planning")
213
245
  }
214
246
  ],
215
247
  nextStepsKey: "healthybowl-field-detail",
216
248
  children: [
217
- /* @__PURE__ */ d(re, { items: [
249
+ /* @__PURE__ */ p(re, { items: [
218
250
  {
219
- label: b("healthybowl.crops.fieldDetail.breadcrumbs.crops", "Crops"),
220
- href: k("crops")
251
+ label: C("healthybowl.crops.fieldDetail.breadcrumbs.crops", "Crops"),
252
+ href: A("crops")
221
253
  },
222
254
  {
223
- label: b("healthybowl.crops.fieldDetail.breadcrumbs.fields", "Fields"),
224
- href: k("crops/fields")
255
+ label: C("healthybowl.crops.fieldDetail.breadcrumbs.fields", "Fields"),
256
+ href: A("crops/fields")
225
257
  },
226
- { label: P.name }
258
+ { label: F.name }
227
259
  ] }),
228
- /* @__PURE__ */ f("div", {
260
+ /* @__PURE__ */ m("div", {
229
261
  className: "flex flex-wrap items-center gap-3",
230
- children: [/* @__PURE__ */ d(r, {
231
- label: P.status,
232
- variant: y(P.status),
262
+ children: [/* @__PURE__ */ p(i, {
263
+ label: F.status,
264
+ variant: x(F.status),
233
265
  dot: !0
234
- }), P.organicCertified ? /* @__PURE__ */ d(r, {
235
- label: b("healthybowl.crops.fieldDetail.badges.organicCertified", "Organic Certified"),
266
+ }), F.organicCertified ? /* @__PURE__ */ p(i, {
267
+ label: C("healthybowl.crops.fieldDetail.badges.organicCertified", "Organic Certified"),
236
268
  variant: "success"
237
- }) : /* @__PURE__ */ d(r, {
238
- label: b("healthybowl.crops.fieldDetail.badges.notCertified", "Not Certified"),
269
+ }) : /* @__PURE__ */ p(i, {
270
+ label: C("healthybowl.crops.fieldDetail.badges.notCertified", "Not Certified"),
239
271
  variant: "muted"
240
272
  })]
241
273
  }),
242
- /* @__PURE__ */ f("div", {
274
+ /* @__PURE__ */ m("div", {
243
275
  className: "grid grid-cols-1 gap-6 lg:grid-cols-3",
244
- children: [/* @__PURE__ */ f("div", {
276
+ children: [/* @__PURE__ */ m("div", {
245
277
  className: "space-y-6 lg:col-span-2",
246
278
  children: [
247
- /* @__PURE__ */ f(Te, {
279
+ /* @__PURE__ */ m(Ae, {
248
280
  treatment: "glass",
249
281
  glow: !0,
250
282
  className: "border-border-seam p-6",
251
283
  children: [
252
- /* @__PURE__ */ d("h3", {
284
+ /* @__PURE__ */ p("h3", {
253
285
  className: "mb-4 text-sm font-semibold text-text-primary",
254
- children: b("healthybowl.crops.fieldDetail.info.heading", "Field Information")
286
+ children: C("healthybowl.crops.fieldDetail.info.heading", "Field Information")
255
287
  }),
256
- /* @__PURE__ */ f("div", {
288
+ /* @__PURE__ */ m("div", {
257
289
  className: "grid grid-cols-1 gap-6 sm:grid-cols-2",
258
- children: [/* @__PURE__ */ f("div", {
290
+ children: [/* @__PURE__ */ m("div", {
259
291
  className: "space-y-4",
260
292
  children: [
261
- /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("span", {
293
+ /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("span", {
262
294
  className: "text-xs text-text-secondary",
263
- children: b("healthybowl.crops.fieldDetail.info.fieldName", "Field Name")
264
- }), /* @__PURE__ */ d("p", {
295
+ children: C("healthybowl.crops.fieldDetail.info.fieldName", "Field Name")
296
+ }), /* @__PURE__ */ p("p", {
265
297
  className: "text-sm font-semibold text-text-primary",
266
- children: P.name
298
+ children: F.name
267
299
  })] }),
268
- /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("span", {
300
+ /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("span", {
269
301
  className: "text-xs text-text-secondary",
270
- children: b("healthybowl.crops.fieldDetail.info.area", "Area")
271
- }), /* @__PURE__ */ f("p", {
302
+ children: C("healthybowl.crops.fieldDetail.info.area", "Area")
303
+ }), /* @__PURE__ */ m("p", {
272
304
  className: "text-sm font-semibold text-text-primary",
273
305
  children: [
274
- P.area,
306
+ F.area,
275
307
  " ",
276
- P.unit
308
+ F.unit
277
309
  ]
278
310
  })] }),
279
- /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("span", {
311
+ /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("span", {
280
312
  className: "text-xs text-text-secondary",
281
- children: b("healthybowl.crops.fieldDetail.info.status", "Status")
282
- }), /* @__PURE__ */ d("div", {
313
+ children: C("healthybowl.crops.fieldDetail.info.status", "Status")
314
+ }), /* @__PURE__ */ p("div", {
283
315
  className: "mt-1",
284
- children: /* @__PURE__ */ d(r, {
285
- label: P.status,
286
- variant: y(P.status)
316
+ children: /* @__PURE__ */ p(i, {
317
+ label: F.status,
318
+ variant: x(F.status)
287
319
  })
288
320
  })] })
289
321
  ]
290
- }), /* @__PURE__ */ f("div", {
322
+ }), /* @__PURE__ */ m("div", {
291
323
  className: "space-y-4",
292
324
  children: [
293
- /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("span", {
325
+ /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("span", {
294
326
  className: "text-xs text-text-secondary",
295
- children: b("healthybowl.crops.fieldDetail.info.soilType", "Soil Type")
296
- }), /* @__PURE__ */ d("p", {
327
+ children: C("healthybowl.crops.fieldDetail.info.soilType", "Soil Type")
328
+ }), /* @__PURE__ */ p("p", {
297
329
  className: "text-sm font-semibold text-text-primary",
298
- children: P.soilType
330
+ children: F.soilType
299
331
  })] }),
300
- /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("span", {
332
+ /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("span", {
301
333
  className: "text-xs text-text-secondary",
302
- children: b("healthybowl.crops.fieldDetail.info.irrigation", "Irrigation")
303
- }), /* @__PURE__ */ d("p", {
334
+ children: C("healthybowl.crops.fieldDetail.info.irrigation", "Irrigation")
335
+ }), /* @__PURE__ */ p("p", {
304
336
  className: "text-sm font-semibold text-text-primary",
305
- children: P.irrigationType
337
+ children: F.irrigationType
306
338
  })] }),
307
- /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("span", {
339
+ /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("span", {
308
340
  className: "text-xs text-text-secondary",
309
- children: b("healthybowl.crops.fieldDetail.info.currentCrops", "Current Crops")
310
- }), /* @__PURE__ */ d("p", {
341
+ children: C("healthybowl.crops.fieldDetail.info.currentCrops", "Current Crops")
342
+ }), /* @__PURE__ */ p("p", {
311
343
  className: "text-sm font-semibold text-text-primary",
312
- children: (P.crops ?? []).length > 0 ? (P.crops ?? []).join(", ") : b("healthybowl.crops.fieldDetail.info.noneValue", "None")
344
+ children: (F.crops ?? []).length > 0 ? (F.crops ?? []).join(", ") : C("healthybowl.crops.fieldDetail.info.noneValue", "None")
313
345
  })] })
314
346
  ]
315
347
  })]
316
348
  }),
317
- /* @__PURE__ */ f("div", {
349
+ /* @__PURE__ */ m("div", {
318
350
  className: "mt-6 border-t border-border-subtle pt-4",
319
- children: [/* @__PURE__ */ d("span", {
351
+ children: [/* @__PURE__ */ p("span", {
320
352
  className: "text-xs text-text-secondary",
321
- children: b("healthybowl.crops.fieldDetail.info.gpsCoordinates", "GPS Coordinates")
322
- }), /* @__PURE__ */ f("div", {
353
+ children: C("healthybowl.crops.fieldDetail.info.gpsCoordinates", "GPS Coordinates")
354
+ }), /* @__PURE__ */ m("div", {
323
355
  className: "mt-1 flex items-center gap-4",
324
- children: [/* @__PURE__ */ f("span", {
356
+ children: [/* @__PURE__ */ m("span", {
325
357
  className: "text-xs text-text-secondary",
326
358
  children: [
327
- b("healthybowl.crops.fieldDetail.info.latLabel", "Lat:"),
359
+ C("healthybowl.crops.fieldDetail.info.latLabel", "Lat:"),
328
360
  " ",
329
- /* @__PURE__ */ d("span", {
361
+ /* @__PURE__ */ p("span", {
330
362
  className: "font-mono text-sm text-text-primary",
331
- children: P.location?.lat ?? 0
363
+ children: F.location?.lat ?? 0
332
364
  })
333
365
  ]
334
- }), /* @__PURE__ */ f("span", {
366
+ }), /* @__PURE__ */ m("span", {
335
367
  className: "text-xs text-text-secondary",
336
368
  children: [
337
- b("healthybowl.crops.fieldDetail.info.lngLabel", "Lng:"),
369
+ C("healthybowl.crops.fieldDetail.info.lngLabel", "Lng:"),
338
370
  " ",
339
- /* @__PURE__ */ d("span", {
371
+ /* @__PURE__ */ p("span", {
340
372
  className: "font-mono text-sm text-text-primary",
341
- children: P.location?.lng ?? 0
373
+ children: F.location?.lng ?? 0
342
374
  })
343
375
  ]
344
376
  })]
@@ -346,156 +378,261 @@ var y = (e) => {
346
378
  })
347
379
  ]
348
380
  }),
349
- /* @__PURE__ */ f("div", {
381
+ /* @__PURE__ */ m("div", {
350
382
  className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
351
- children: [/* @__PURE__ */ f("div", {
352
- className: "mb-4",
353
- children: [/* @__PURE__ */ f("h3", {
354
- className: "flex items-center gap-2 text-sm font-semibold text-text-primary",
383
+ children: [
384
+ /* @__PURE__ */ m("div", {
385
+ className: "mb-4",
386
+ children: [/* @__PURE__ */ m("h3", {
387
+ className: "flex items-center gap-2 text-sm font-semibold text-text-primary",
388
+ children: [
389
+ /* @__PURE__ */ p(xe, { className: "h-4 w-4 text-success" }),
390
+ " ",
391
+ C("healthybowl.crops.fieldDetail.boundary.heading", "Field Boundary")
392
+ ]
393
+ }), /* @__PURE__ */ p("p", {
394
+ className: "mt-1 text-xs text-text-secondary",
395
+ children: C("healthybowl.crops.fieldDetail.boundary.description", "Draw or import this field’s boundary on the satellite map. Saving updates the field area automatically.")
396
+ })]
397
+ }),
398
+ /* @__PURE__ */ p(se, {
399
+ fieldId: F.id,
400
+ unit: F.unit ?? "acres",
401
+ center: F.location,
402
+ initialBoundary: F.boundary,
403
+ onSaved: O
404
+ }),
405
+ /* @__PURE__ */ m("div", {
406
+ className: "mt-5 border-t border-border-subtle pt-5",
355
407
  children: [
356
- /* @__PURE__ */ d(_e, { className: "h-4 w-4 text-success" }),
357
- " ",
358
- b("healthybowl.crops.fieldDetail.boundary.heading", "Field Boundary")
408
+ /* @__PURE__ */ m("div", {
409
+ className: "flex flex-wrap items-center justify-between gap-3",
410
+ children: [/* @__PURE__ */ p("h4", {
411
+ className: "text-sm font-semibold text-text-primary",
412
+ children: C("healthybowl.crops.fieldDetail.capacity.heading", "Planting capacity")
413
+ }), /* @__PURE__ */ p(i, {
414
+ label: Y.label,
415
+ variant: "muted"
416
+ })]
417
+ }),
418
+ /* @__PURE__ */ m("div", {
419
+ className: "mt-4 grid gap-3 md:grid-cols-2 xl:grid-cols-6",
420
+ children: [
421
+ /* @__PURE__ */ m("div", {
422
+ className: "xl:col-span-2",
423
+ children: [/* @__PURE__ */ p("label", {
424
+ className: "text-xs font-medium text-text-secondary",
425
+ children: C("healthybowl.crops.fieldDetail.capacity.crop", "Crop")
426
+ }), /* @__PURE__ */ m(g, {
427
+ value: R,
428
+ onValueChange: ct,
429
+ children: [/* @__PURE__ */ p(y, {
430
+ className: "mt-1 w-full",
431
+ children: /* @__PURE__ */ p(b, { placeholder: C("healthybowl.crops.fieldDetail.capacity.cropPlaceholder", "Select crop") })
432
+ }), /* @__PURE__ */ p(_, { children: q.map((e) => /* @__PURE__ */ p(v, {
433
+ value: e.id,
434
+ children: e.variety ? `${e.name} - ${e.variety}` : e.name
435
+ }, e.id)) })]
436
+ })]
437
+ }),
438
+ /* @__PURE__ */ p(w, {
439
+ label: C("healthybowl.crops.fieldDetail.capacity.plantSpacing", "Plant spacing"),
440
+ unit: "cm",
441
+ value: z,
442
+ min: "1",
443
+ step: "1",
444
+ onChange: B
445
+ }),
446
+ /* @__PURE__ */ p(w, {
447
+ label: C("healthybowl.crops.fieldDetail.capacity.rowSpacing", "Row spacing"),
448
+ unit: "cm",
449
+ value: V,
450
+ min: "1",
451
+ step: "1",
452
+ onChange: H
453
+ }),
454
+ /* @__PURE__ */ p(w, {
455
+ label: C("healthybowl.crops.fieldDetail.capacity.bedWidth", "Bed width"),
456
+ unit: "m",
457
+ value: U,
458
+ min: "0.1",
459
+ step: "0.1",
460
+ onChange: it
461
+ }),
462
+ /* @__PURE__ */ p(w, {
463
+ label: C("healthybowl.crops.fieldDetail.capacity.pathWidth", "Path width"),
464
+ unit: "m",
465
+ value: W,
466
+ min: "0",
467
+ step: "0.05",
468
+ onChange: at
469
+ })
470
+ ]
471
+ }),
472
+ X ? /* @__PURE__ */ m("div", {
473
+ className: "mt-4 grid grid-cols-2 gap-3 md:grid-cols-3 xl:grid-cols-6",
474
+ children: [
475
+ /* @__PURE__ */ p(T, {
476
+ label: C("healthybowl.crops.fieldDetail.capacity.metrics.beds", "Beds"),
477
+ value: t(X.bedCount)
478
+ }),
479
+ /* @__PURE__ */ p(T, {
480
+ label: C("healthybowl.crops.fieldDetail.capacity.metrics.rowsPerBed", "Rows / bed"),
481
+ value: t(X.rowsPerBed)
482
+ }),
483
+ /* @__PURE__ */ p(T, {
484
+ label: C("healthybowl.crops.fieldDetail.capacity.metrics.plantsPerBed", "Plants / bed"),
485
+ value: t(X.plantsPerBed)
486
+ }),
487
+ /* @__PURE__ */ p(T, {
488
+ label: C("healthybowl.crops.fieldDetail.capacity.metrics.totalPlants", "Total plants"),
489
+ value: t(X.totalPlants)
490
+ }),
491
+ /* @__PURE__ */ p(T, {
492
+ label: C("healthybowl.crops.fieldDetail.capacity.metrics.seedlings", "Seedlings"),
493
+ value: t(X.seedlingTarget)
494
+ }),
495
+ /* @__PURE__ */ p(T, {
496
+ label: C("healthybowl.crops.fieldDetail.capacity.metrics.bedLength", "Bed length"),
497
+ value: Ne(X.bedLengthM),
498
+ unit: "m"
499
+ })
500
+ ]
501
+ }) : /* @__PURE__ */ p("p", {
502
+ className: "mt-4 rounded-md border border-border-subtle bg-bg-sunken/60 p-3 text-sm text-text-secondary",
503
+ children: C("healthybowl.crops.fieldDetail.capacity.empty", "Set this field area to calculate beds and plants.")
504
+ })
359
505
  ]
360
- }), /* @__PURE__ */ d("p", {
361
- className: "mt-1 text-xs text-text-secondary",
362
- children: b("healthybowl.crops.fieldDetail.boundary.description", "Draw or import this field’s boundary on the satellite map. Saving updates the field area automatically.")
363
- })]
364
- }), /* @__PURE__ */ d(se, {
365
- fieldId: P.id,
366
- unit: P.unit ?? "acres",
367
- center: P.location,
368
- initialBoundary: P.boundary,
369
- onSaved: D
370
- })]
506
+ })
507
+ ]
371
508
  }),
372
- /* @__PURE__ */ f("div", {
509
+ /* @__PURE__ */ m("div", {
373
510
  className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
374
- children: [/* @__PURE__ */ f("h3", {
511
+ children: [/* @__PURE__ */ m("h3", {
375
512
  className: "mb-4 flex items-center gap-2 text-sm font-semibold text-text-primary",
376
513
  children: [
377
- /* @__PURE__ */ d(ge, { className: "h-4 w-4 text-success" }),
514
+ /* @__PURE__ */ p(be, { className: "h-4 w-4 text-success" }),
378
515
  " ",
379
- b("healthybowl.crops.fieldDetail.currentCrops.heading", "Current Crops")
516
+ C("healthybowl.crops.fieldDetail.currentCrops.heading", "Current Crops")
380
517
  ]
381
- }), X.length > 0 ? /* @__PURE__ */ d("div", {
518
+ }), K.length > 0 ? /* @__PURE__ */ p("div", {
382
519
  className: "flex flex-col gap-3",
383
- children: X.map((e) => /* @__PURE__ */ f("div", {
384
- onClick: () => O(k(`crops/${e.id}`)),
520
+ children: K.map((e) => /* @__PURE__ */ m("div", {
521
+ onClick: () => k(A(`crops/${e.id}`)),
385
522
  className: "flex cursor-pointer items-center justify-between rounded-md border border-border-subtle p-3 transition-colors hover:bg-bg-sunken/50",
386
- children: [/* @__PURE__ */ f("div", { children: [
387
- /* @__PURE__ */ d("span", {
523
+ children: [/* @__PURE__ */ m("div", { children: [
524
+ /* @__PURE__ */ p("span", {
388
525
  className: "text-sm font-medium text-text-primary",
389
526
  children: e.name
390
527
  }),
391
- /* @__PURE__ */ d("span", {
528
+ /* @__PURE__ */ p("span", {
392
529
  className: "ml-2 text-xs text-text-secondary",
393
530
  children: e.variety
394
531
  }),
395
- /* @__PURE__ */ f("div", {
532
+ /* @__PURE__ */ m("div", {
396
533
  className: "mt-1 flex items-center gap-2",
397
- children: [/* @__PURE__ */ d("div", {
534
+ children: [/* @__PURE__ */ p("div", {
398
535
  className: "h-1.5 w-24 rounded-full bg-bg-sunken",
399
- children: /* @__PURE__ */ d("div", {
536
+ children: /* @__PURE__ */ p("div", {
400
537
  className: "h-1.5 rounded-full bg-action-primary-bg",
401
538
  style: { width: `${e.progress}%` }
402
539
  })
403
- }), /* @__PURE__ */ f("span", {
540
+ }), /* @__PURE__ */ m("span", {
404
541
  className: "text-xs text-text-secondary",
405
542
  children: [e.progress, "%"]
406
543
  })]
407
544
  })
408
- ] }), /* @__PURE__ */ f("div", {
545
+ ] }), /* @__PURE__ */ m("div", {
409
546
  className: "flex items-center gap-2",
410
- children: [/* @__PURE__ */ d(r, {
547
+ children: [/* @__PURE__ */ p(i, {
411
548
  label: e.growthStage,
412
549
  variant: "info"
413
- }), /* @__PURE__ */ f("span", {
550
+ }), /* @__PURE__ */ m("span", {
414
551
  className: "text-xs text-text-secondary",
415
552
  children: [e.daysToHarvest, "d"]
416
553
  })]
417
554
  })]
418
555
  }, e.id))
419
- }) : /* @__PURE__ */ d("p", {
556
+ }) : /* @__PURE__ */ p("p", {
420
557
  className: "text-sm text-text-secondary",
421
- children: b("healthybowl.crops.fieldDetail.currentCrops.empty", "No crops currently planted.")
558
+ children: C("healthybowl.crops.fieldDetail.currentCrops.empty", "No crops currently planted.")
422
559
  })]
423
560
  }),
424
- Z && /* @__PURE__ */ f("div", {
561
+ Z && /* @__PURE__ */ m("div", {
425
562
  className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
426
563
  children: [
427
- /* @__PURE__ */ f("div", {
564
+ /* @__PURE__ */ m("div", {
428
565
  className: "mb-4 flex items-center justify-between",
429
- children: [/* @__PURE__ */ f("h3", {
566
+ children: [/* @__PURE__ */ m("h3", {
430
567
  className: "flex items-center gap-2 text-sm font-semibold text-text-primary",
431
568
  children: [
432
- /* @__PURE__ */ d(s, { className: "h-4 w-4 text-warning" }),
569
+ /* @__PURE__ */ p(f, { className: "h-4 w-4 text-warning" }),
433
570
  " ",
434
- b("healthybowl.crops.fieldDetail.soilHealth.heading", "Soil Health")
571
+ C("healthybowl.crops.fieldDetail.soilHealth.heading", "Soil Health")
435
572
  ]
436
- }), /* @__PURE__ */ d(r, {
573
+ }), /* @__PURE__ */ p(i, {
437
574
  label: (Z.status ?? "unknown").replace("_", " "),
438
- variant: Ee(Z.status ?? "unknown")
575
+ variant: je(Z.status ?? "unknown")
439
576
  })]
440
577
  }),
441
- /* @__PURE__ */ d("div", {
578
+ /* @__PURE__ */ p("div", {
442
579
  className: "grid grid-cols-2 gap-4 sm:grid-cols-3 lg:grid-cols-6",
443
580
  children: [
444
581
  {
445
582
  key: "pH",
446
- label: b("healthybowl.crops.fieldDetail.soilHealth.metrics.ph", "pH"),
583
+ label: C("healthybowl.crops.fieldDetail.soilHealth.metrics.ph", "pH"),
447
584
  value: Z.ph.toString(),
448
585
  good: Z.ph >= 6 && Z.ph <= 7.5
449
586
  },
450
587
  {
451
588
  key: "Nitrogen",
452
- label: b("healthybowl.crops.fieldDetail.soilHealth.metrics.nitrogen", "Nitrogen"),
589
+ label: C("healthybowl.crops.fieldDetail.soilHealth.metrics.nitrogen", "Nitrogen"),
453
590
  value: `${Z.nitrogen} ppm`,
454
591
  good: Z.nitrogen >= 30
455
592
  },
456
593
  {
457
594
  key: "Phosphorus",
458
- label: b("healthybowl.crops.fieldDetail.soilHealth.metrics.phosphorus", "Phosphorus"),
595
+ label: C("healthybowl.crops.fieldDetail.soilHealth.metrics.phosphorus", "Phosphorus"),
459
596
  value: `${Z.phosphorus} ppm`,
460
597
  good: Z.phosphorus >= 25
461
598
  },
462
599
  {
463
600
  key: "Potassium",
464
- label: b("healthybowl.crops.fieldDetail.soilHealth.metrics.potassium", "Potassium"),
601
+ label: C("healthybowl.crops.fieldDetail.soilHealth.metrics.potassium", "Potassium"),
465
602
  value: `${Z.potassium} ppm`,
466
603
  good: Z.potassium >= 150
467
604
  },
468
605
  {
469
606
  key: "Organic Matter",
470
- label: b("healthybowl.crops.fieldDetail.soilHealth.metrics.organicMatter", "Organic Matter"),
607
+ label: C("healthybowl.crops.fieldDetail.soilHealth.metrics.organicMatter", "Organic Matter"),
471
608
  value: `${Z.organicMatter}%`,
472
609
  good: Z.organicMatter >= 3
473
610
  },
474
611
  {
475
612
  key: "Moisture",
476
- label: b("healthybowl.crops.fieldDetail.soilHealth.metrics.moisture", "Moisture"),
613
+ label: C("healthybowl.crops.fieldDetail.soilHealth.metrics.moisture", "Moisture"),
477
614
  value: `${Z.moisture}%`,
478
615
  good: Z.moisture >= 20 && Z.moisture <= 40
479
616
  }
480
- ].map(({ key: e, label: t, value: n, good: r }) => /* @__PURE__ */ f("div", {
617
+ ].map(({ key: e, label: t, value: n, good: r }) => /* @__PURE__ */ m("div", {
481
618
  className: "text-center",
482
- children: [/* @__PURE__ */ d("span", {
619
+ children: [/* @__PURE__ */ p("span", {
483
620
  className: "text-xs text-text-secondary",
484
621
  children: t
485
- }), /* @__PURE__ */ d("p", {
622
+ }), /* @__PURE__ */ p("p", {
486
623
  className: `text-sm font-semibold ${r ? "text-success" : "text-warning"}`,
487
624
  children: n
488
625
  })]
489
626
  }, e))
490
627
  }),
491
- Z.recommendations.length > 0 && /* @__PURE__ */ f("div", {
628
+ Z.recommendations.length > 0 && /* @__PURE__ */ m("div", {
492
629
  className: "mt-4 border-t border-border-subtle pt-4",
493
- children: [/* @__PURE__ */ d("h4", {
630
+ children: [/* @__PURE__ */ p("h4", {
494
631
  className: "mb-2 text-xs font-medium text-text-secondary",
495
- children: b("healthybowl.crops.fieldDetail.soilHealth.recommendations", "Recommendations")
496
- }), /* @__PURE__ */ d("ul", {
632
+ children: C("healthybowl.crops.fieldDetail.soilHealth.recommendations", "Recommendations")
633
+ }), /* @__PURE__ */ p("ul", {
497
634
  className: "space-y-1",
498
- children: Z.recommendations.map((e, t) => /* @__PURE__ */ f("li", {
635
+ children: Z.recommendations.map((e, t) => /* @__PURE__ */ m("li", {
499
636
  className: "text-xs text-text-primary",
500
637
  children: ["- ", e]
501
638
  }, t))
@@ -503,26 +640,26 @@ var y = (e) => {
503
640
  })
504
641
  ]
505
642
  }),
506
- /* @__PURE__ */ f("div", {
643
+ /* @__PURE__ */ m("div", {
507
644
  className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
508
- children: [/* @__PURE__ */ f("h3", {
645
+ children: [/* @__PURE__ */ m("h3", {
509
646
  className: "mb-4 flex items-center gap-2 text-sm font-semibold text-text-primary",
510
647
  children: [
511
- /* @__PURE__ */ d(de, { className: "h-4 w-4 text-info" }),
648
+ /* @__PURE__ */ p(he, { className: "h-4 w-4 text-info" }),
512
649
  " ",
513
- b("healthybowl.crops.fieldDetail.cropHistory.heading", "Crop History")
650
+ C("healthybowl.crops.fieldDetail.cropHistory.heading", "Crop History")
514
651
  ]
515
- }), /* @__PURE__ */ d("div", {
652
+ }), /* @__PURE__ */ p("div", {
516
653
  className: "space-y-3",
517
- children: Ie.map((e, t) => /* @__PURE__ */ f("div", {
654
+ children: lt.map((e, t) => /* @__PURE__ */ m("div", {
518
655
  className: "flex items-center justify-between rounded-md border border-border-subtle p-3",
519
- children: [/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("span", {
656
+ children: [/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("span", {
520
657
  className: "text-sm font-medium text-text-primary",
521
658
  children: e.crop
522
- }), /* @__PURE__ */ d("p", {
659
+ }), /* @__PURE__ */ p("p", {
523
660
  className: "text-xs text-text-secondary",
524
661
  children: e.season
525
- })] }), /* @__PURE__ */ d(r, {
662
+ })] }), /* @__PURE__ */ p(i, {
526
663
  label: e.status,
527
664
  variant: e.status === "active" ? "success" : "muted"
528
665
  })]
@@ -530,87 +667,87 @@ var y = (e) => {
530
667
  })]
531
668
  })
532
669
  ]
533
- }), /* @__PURE__ */ f("div", {
670
+ }), /* @__PURE__ */ m("div", {
534
671
  className: "space-y-6",
535
672
  children: [
536
- /* @__PURE__ */ f("div", {
673
+ /* @__PURE__ */ m("div", {
537
674
  className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
538
- children: [/* @__PURE__ */ f("h3", {
675
+ children: [/* @__PURE__ */ m("h3", {
539
676
  className: "mb-4 flex items-center gap-2 text-sm font-semibold text-text-primary",
540
677
  children: [
541
- /* @__PURE__ */ d(fe, { className: "h-4 w-4 text-info" }),
678
+ /* @__PURE__ */ p(ge, { className: "h-4 w-4 text-info" }),
542
679
  " ",
543
- b("healthybowl.crops.fieldDetail.weather.heading", "Current Conditions")
680
+ C("healthybowl.crops.fieldDetail.weather.heading", "Current Conditions")
544
681
  ]
545
- }), /* @__PURE__ */ f("div", {
682
+ }), /* @__PURE__ */ m("div", {
546
683
  className: "space-y-3",
547
684
  children: [
548
- /* @__PURE__ */ f("div", {
685
+ /* @__PURE__ */ m("div", {
549
686
  className: "flex items-center justify-between",
550
- children: [/* @__PURE__ */ f("span", {
687
+ children: [/* @__PURE__ */ m("span", {
551
688
  className: "flex items-center gap-1.5 text-xs text-text-secondary",
552
689
  children: [
553
- /* @__PURE__ */ d(ve, { className: "h-3.5 w-3.5" }),
690
+ /* @__PURE__ */ p(Ce, { className: "h-3.5 w-3.5" }),
554
691
  " ",
555
- b("healthybowl.crops.fieldDetail.weather.temperature", "Temperature")
692
+ C("healthybowl.crops.fieldDetail.weather.temperature", "Temperature")
556
693
  ]
557
- }), /* @__PURE__ */ f("span", {
694
+ }), /* @__PURE__ */ m("span", {
558
695
  className: "text-sm font-medium text-text-primary",
559
696
  children: [Q.current.temperature, "°C"]
560
697
  })]
561
698
  }),
562
- /* @__PURE__ */ f("div", {
699
+ /* @__PURE__ */ m("div", {
563
700
  className: "flex items-center justify-between",
564
- children: [/* @__PURE__ */ f("span", {
701
+ children: [/* @__PURE__ */ m("span", {
565
702
  className: "flex items-center gap-1.5 text-xs text-text-secondary",
566
703
  children: [
567
- /* @__PURE__ */ d(pe, { className: "h-3.5 w-3.5" }),
704
+ /* @__PURE__ */ p(_e, { className: "h-3.5 w-3.5" }),
568
705
  " ",
569
- b("healthybowl.crops.fieldDetail.weather.humidity", "Humidity")
706
+ C("healthybowl.crops.fieldDetail.weather.humidity", "Humidity")
570
707
  ]
571
- }), /* @__PURE__ */ f("span", {
708
+ }), /* @__PURE__ */ m("span", {
572
709
  className: "text-sm font-medium text-text-primary",
573
710
  children: [Q.current.humidity, "%"]
574
711
  })]
575
712
  }),
576
- /* @__PURE__ */ f("div", {
713
+ /* @__PURE__ */ m("div", {
577
714
  className: "flex items-center justify-between",
578
- children: [/* @__PURE__ */ f("span", {
715
+ children: [/* @__PURE__ */ m("span", {
579
716
  className: "flex items-center gap-1.5 text-xs text-text-secondary",
580
717
  children: [
581
- /* @__PURE__ */ d(xe, { className: "h-3.5 w-3.5" }),
718
+ /* @__PURE__ */ p(Ee, { className: "h-3.5 w-3.5" }),
582
719
  " ",
583
- b("healthybowl.crops.fieldDetail.weather.wind", "Wind")
720
+ C("healthybowl.crops.fieldDetail.weather.wind", "Wind")
584
721
  ]
585
- }), /* @__PURE__ */ f("span", {
722
+ }), /* @__PURE__ */ m("span", {
586
723
  className: "text-sm font-medium text-text-primary",
587
724
  children: [Q.current.windSpeed, " km/h"]
588
725
  })]
589
726
  }),
590
- /* @__PURE__ */ f("div", {
727
+ /* @__PURE__ */ m("div", {
591
728
  className: "flex items-center justify-between",
592
- children: [/* @__PURE__ */ f("span", {
729
+ children: [/* @__PURE__ */ m("span", {
593
730
  className: "flex items-center gap-1.5 text-xs text-text-secondary",
594
731
  children: [
595
- /* @__PURE__ */ d(u, { className: "h-3.5 w-3.5" }),
732
+ /* @__PURE__ */ p(Se, { className: "h-3.5 w-3.5" }),
596
733
  " ",
597
- b("healthybowl.crops.fieldDetail.weather.uvIndex", "UV Index")
734
+ C("healthybowl.crops.fieldDetail.weather.uvIndex", "UV Index")
598
735
  ]
599
- }), /* @__PURE__ */ d("span", {
736
+ }), /* @__PURE__ */ p("span", {
600
737
  className: "text-sm font-medium text-text-primary",
601
738
  children: Q.current.uvIndex
602
739
  })]
603
740
  }),
604
- /* @__PURE__ */ f("div", {
741
+ /* @__PURE__ */ m("div", {
605
742
  className: "flex items-center justify-between",
606
- children: [/* @__PURE__ */ f("span", {
743
+ children: [/* @__PURE__ */ m("span", {
607
744
  className: "flex items-center gap-1.5 text-xs text-text-secondary",
608
745
  children: [
609
- /* @__PURE__ */ d(he, { className: "h-3.5 w-3.5" }),
746
+ /* @__PURE__ */ p(ye, { className: "h-3.5 w-3.5" }),
610
747
  " ",
611
- b("healthybowl.crops.fieldDetail.weather.visibility", "Visibility")
748
+ C("healthybowl.crops.fieldDetail.weather.visibility", "Visibility")
612
749
  ]
613
- }), /* @__PURE__ */ f("span", {
750
+ }), /* @__PURE__ */ m("span", {
614
751
  className: "text-sm font-medium text-text-primary",
615
752
  children: [Q.current.visibility, " km"]
616
753
  })]
@@ -618,75 +755,75 @@ var y = (e) => {
618
755
  ]
619
756
  })]
620
757
  }),
621
- /* @__PURE__ */ f("div", {
758
+ /* @__PURE__ */ m("div", {
622
759
  className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
623
- children: [/* @__PURE__ */ d("h3", {
760
+ children: [/* @__PURE__ */ p("h3", {
624
761
  className: "mb-4 text-sm font-semibold text-text-primary",
625
- children: b("healthybowl.crops.fieldDetail.quickActions.heading", "Quick Actions")
626
- }), /* @__PURE__ */ f("div", {
762
+ children: C("healthybowl.crops.fieldDetail.quickActions.heading", "Quick Actions")
763
+ }), /* @__PURE__ */ m("div", {
627
764
  className: "space-y-2",
628
765
  children: [
629
- /* @__PURE__ */ f(p, {
766
+ /* @__PURE__ */ m(h, {
630
767
  variant: "outline",
631
- onClick: () => O(k("weather")),
768
+ onClick: () => k(A("weather")),
632
769
  className: "w-full justify-start",
633
770
  children: [
634
- /* @__PURE__ */ d(u, { className: "h-4 w-4 text-text-secondary" }),
771
+ /* @__PURE__ */ p(Se, { className: "h-4 w-4 text-text-secondary" }),
635
772
  " ",
636
- b("healthybowl.crops.fieldDetail.quickActions.weatherData", "Weather Data")
773
+ C("healthybowl.crops.fieldDetail.quickActions.weatherData", "Weather Data")
637
774
  ]
638
775
  }),
639
- /* @__PURE__ */ f(p, {
776
+ /* @__PURE__ */ m(h, {
640
777
  variant: "outline",
641
- onClick: () => O(k("soil-health")),
778
+ onClick: () => k(A("soil-health")),
642
779
  className: "w-full justify-start",
643
780
  children: [
644
- /* @__PURE__ */ d(l, { className: "h-4 w-4 text-text-secondary" }),
781
+ /* @__PURE__ */ p(me, { className: "h-4 w-4 text-text-secondary" }),
645
782
  " ",
646
- b("healthybowl.crops.fieldDetail.quickActions.soilAnalysis", "Soil Analysis")
783
+ C("healthybowl.crops.fieldDetail.quickActions.soilAnalysis", "Soil Analysis")
647
784
  ]
648
785
  }),
649
- /* @__PURE__ */ f(p, {
786
+ /* @__PURE__ */ m(h, {
650
787
  variant: "outline",
651
- onClick: () => O(k("crops")),
788
+ onClick: () => k(A("crops")),
652
789
  className: "w-full justify-start",
653
790
  children: [
654
- /* @__PURE__ */ d(be, { className: "h-4 w-4 text-text-secondary" }),
791
+ /* @__PURE__ */ p(Te, { className: "h-4 w-4 text-text-secondary" }),
655
792
  " ",
656
- b("healthybowl.crops.fieldDetail.quickActions.cropHistory", "Crop History")
793
+ C("healthybowl.crops.fieldDetail.quickActions.cropHistory", "Crop History")
657
794
  ]
658
795
  }),
659
- /* @__PURE__ */ f(p, {
796
+ /* @__PURE__ */ m(h, {
660
797
  variant: "outline",
661
- onClick: () => O(k("analytics")),
798
+ onClick: () => k(A("analytics")),
662
799
  className: "w-full justify-start",
663
800
  children: [
664
- /* @__PURE__ */ d(s, { className: "h-4 w-4 text-text-secondary" }),
801
+ /* @__PURE__ */ p(f, { className: "h-4 w-4 text-text-secondary" }),
665
802
  " ",
666
- b("healthybowl.crops.fieldDetail.quickActions.generateReport", "Generate Report")
803
+ C("healthybowl.crops.fieldDetail.quickActions.generateReport", "Generate Report")
667
804
  ]
668
805
  })
669
806
  ]
670
807
  })]
671
808
  }),
672
- /* @__PURE__ */ f("div", {
809
+ /* @__PURE__ */ m("div", {
673
810
  className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
674
- children: [/* @__PURE__ */ d("h3", {
811
+ children: [/* @__PURE__ */ p("h3", {
675
812
  className: "mb-4 text-sm font-semibold text-text-primary",
676
- children: b("healthybowl.crops.fieldDetail.recentActivity.heading", "Recent Activity")
677
- }), /* @__PURE__ */ d("div", {
813
+ children: C("healthybowl.crops.fieldDetail.recentActivity.heading", "Recent Activity")
814
+ }), /* @__PURE__ */ p("div", {
678
815
  className: "space-y-4",
679
- children: $.map((t, n) => /* @__PURE__ */ f("div", {
816
+ children: $.map((t, n) => /* @__PURE__ */ m("div", {
680
817
  className: "flex gap-3",
681
- children: [/* @__PURE__ */ f("div", {
818
+ children: [/* @__PURE__ */ m("div", {
682
819
  className: "relative flex flex-col items-center",
683
- children: [/* @__PURE__ */ d("div", { className: "h-2 w-2 rounded-full bg-action-primary-bg" }), n < $.length - 1 && /* @__PURE__ */ d("div", { className: "w-0.5 flex-1 bg-border" })]
684
- }), /* @__PURE__ */ f("div", {
820
+ children: [/* @__PURE__ */ p("div", { className: "h-2 w-2 rounded-full bg-action-primary-bg" }), n < $.length - 1 && /* @__PURE__ */ p("div", { className: "w-0.5 flex-1 bg-border" })]
821
+ }), /* @__PURE__ */ m("div", {
685
822
  className: "pb-4",
686
- children: [/* @__PURE__ */ d("p", {
823
+ children: [/* @__PURE__ */ p("p", {
687
824
  className: "text-sm text-text-primary",
688
825
  children: t.action
689
- }), /* @__PURE__ */ d("p", {
826
+ }), /* @__PURE__ */ p("p", {
690
827
  className: "text-xs text-text-secondary",
691
828
  children: e(t.date)
692
829
  })]
@@ -697,135 +834,163 @@ var y = (e) => {
697
834
  ]
698
835
  })]
699
836
  }),
700
- /* @__PURE__ */ d(ae, {
701
- open: Ne,
702
- onClose: () => j(!1),
703
- title: b("healthybowl.crops.fieldDetail.editModal.title", "Edit Field"),
704
- description: b("healthybowl.crops.fieldDetail.editModal.description", "Update details for {{name}}", { name: P.name }),
837
+ /* @__PURE__ */ p(ae, {
838
+ open: We,
839
+ onClose: () => M(!1),
840
+ title: C("healthybowl.crops.fieldDetail.editModal.title", "Edit Field"),
841
+ description: C("healthybowl.crops.fieldDetail.editModal.description", "Update details for {{name}}", { name: F.name }),
705
842
  size: "lg",
706
- footer: /* @__PURE__ */ f(we, { children: [/* @__PURE__ */ d(p, {
843
+ footer: /* @__PURE__ */ m(ke, { children: [/* @__PURE__ */ p(h, {
707
844
  variant: "outline",
708
- onClick: () => j(!1),
709
- children: b("healthybowl.common.cancel", "Cancel")
710
- }), /* @__PURE__ */ d(p, {
711
- onClick: Pe,
712
- disabled: M,
713
- children: M ? b("healthybowl.crops.fieldDetail.editModal.saving", "Saving...") : b("healthybowl.crops.fieldDetail.editModal.saveChanges", "Save Changes")
845
+ onClick: () => M(!1),
846
+ children: C("healthybowl.common.cancel", "Cancel")
847
+ }), /* @__PURE__ */ p(h, {
848
+ onClick: ot,
849
+ disabled: N,
850
+ children: N ? C("healthybowl.crops.fieldDetail.editModal.saving", "Saving...") : C("healthybowl.crops.fieldDetail.editModal.saveChanges", "Save Changes")
714
851
  })] }),
715
- children: /* @__PURE__ */ f("div", {
852
+ children: /* @__PURE__ */ m("div", {
716
853
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
717
854
  children: [
718
- /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
855
+ /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
719
856
  className: "text-sm font-medium text-text-primary",
720
- children: b("healthybowl.crops.fieldDetail.form.fieldName.label", "Field Name *")
721
- }), /* @__PURE__ */ d("input", {
857
+ children: C("healthybowl.crops.fieldDetail.form.fieldName.label", "Field Name *")
858
+ }), /* @__PURE__ */ p("input", {
722
859
  type: "text",
723
- value: F,
724
- onChange: (e) => I(e.target.value),
860
+ value: I,
861
+ onChange: (e) => Ge(e.target.value),
725
862
  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)]"
726
863
  })] }),
727
- /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
864
+ /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
728
865
  className: "text-sm font-medium text-text-primary",
729
- children: b("healthybowl.crops.fieldDetail.form.area.label", "Area *")
730
- }), /* @__PURE__ */ d("input", {
866
+ children: C("healthybowl.crops.fieldDetail.form.area.label", "Area *")
867
+ }), /* @__PURE__ */ p("input", {
731
868
  type: "number",
732
869
  min: 0,
733
870
  value: L,
734
- onChange: (e) => R(e.target.value),
871
+ onChange: (e) => Ke(e.target.value),
735
872
  className: "mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
736
873
  })] }),
737
- /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
874
+ /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
738
875
  className: "text-sm font-medium text-text-primary",
739
- children: b("healthybowl.crops.fieldDetail.form.unit.label", "Unit")
740
- }), /* @__PURE__ */ f(m, {
741
- value: z,
742
- onValueChange: (e) => B(e),
743
- children: [/* @__PURE__ */ d(_, {
876
+ children: C("healthybowl.crops.fieldDetail.form.unit.label", "Unit")
877
+ }), /* @__PURE__ */ m(g, {
878
+ value: qe,
879
+ onValueChange: (e) => Je(e),
880
+ children: [/* @__PURE__ */ p(y, {
744
881
  className: "mt-1 w-full",
745
- children: /* @__PURE__ */ d(v, {})
746
- }), /* @__PURE__ */ f(h, { children: [/* @__PURE__ */ d(g, {
882
+ children: /* @__PURE__ */ p(b, {})
883
+ }), /* @__PURE__ */ m(_, { children: [/* @__PURE__ */ p(v, {
747
884
  value: "acres",
748
- children: b("healthybowl.crops.fieldDetail.form.unit.options.acres", "Acres")
749
- }), /* @__PURE__ */ d(g, {
885
+ children: C("healthybowl.crops.fieldDetail.form.unit.options.acres", "Acres")
886
+ }), /* @__PURE__ */ p(v, {
750
887
  value: "hectares",
751
- children: b("healthybowl.crops.fieldDetail.form.unit.options.hectares", "Hectares")
888
+ children: C("healthybowl.crops.fieldDetail.form.unit.options.hectares", "Hectares")
752
889
  })] })]
753
890
  })] }),
754
- /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
891
+ /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
755
892
  className: "text-sm font-medium text-text-primary",
756
- children: b("healthybowl.crops.fieldDetail.form.status.label", "Status")
757
- }), /* @__PURE__ */ f(m, {
758
- value: G,
759
- onValueChange: K,
760
- children: [/* @__PURE__ */ d(_, {
893
+ children: C("healthybowl.crops.fieldDetail.form.status.label", "Status")
894
+ }), /* @__PURE__ */ m(g, {
895
+ value: $e,
896
+ onValueChange: et,
897
+ children: [/* @__PURE__ */ p(y, {
761
898
  className: "mt-1 w-full",
762
- children: /* @__PURE__ */ d(v, {})
763
- }), /* @__PURE__ */ f(h, { children: [
764
- /* @__PURE__ */ d(g, {
899
+ children: /* @__PURE__ */ p(b, {})
900
+ }), /* @__PURE__ */ m(_, { children: [
901
+ /* @__PURE__ */ p(v, {
765
902
  value: "active",
766
- children: b("healthybowl.crops.fieldDetail.form.status.options.active", "Active")
903
+ children: C("healthybowl.crops.fieldDetail.form.status.options.active", "Active")
767
904
  }),
768
- /* @__PURE__ */ d(g, {
905
+ /* @__PURE__ */ p(v, {
769
906
  value: "preparation",
770
- children: b("healthybowl.crops.fieldDetail.form.status.options.preparation", "Preparation")
907
+ children: C("healthybowl.crops.fieldDetail.form.status.options.preparation", "Preparation")
771
908
  }),
772
- /* @__PURE__ */ d(g, {
909
+ /* @__PURE__ */ p(v, {
773
910
  value: "fallow",
774
- children: b("healthybowl.crops.fieldDetail.form.status.options.fallow", "Fallow")
911
+ children: C("healthybowl.crops.fieldDetail.form.status.options.fallow", "Fallow")
775
912
  })
776
913
  ] })]
777
914
  })] }),
778
- /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
915
+ /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
779
916
  className: "text-sm font-medium text-text-primary",
780
- children: b("healthybowl.crops.fieldDetail.form.soilType.label", "Soil Type")
781
- }), /* @__PURE__ */ d("input", {
917
+ children: C("healthybowl.crops.fieldDetail.form.soilType.label", "Soil Type")
918
+ }), /* @__PURE__ */ p("input", {
782
919
  type: "text",
783
- value: V,
784
- onChange: (e) => H(e.target.value),
920
+ value: Ye,
921
+ onChange: (e) => Xe(e.target.value),
785
922
  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)]"
786
923
  })] }),
787
- /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
924
+ /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
788
925
  className: "text-sm font-medium text-text-primary",
789
- children: b("healthybowl.crops.fieldDetail.form.irrigationType.label", "Irrigation Type")
790
- }), /* @__PURE__ */ d("input", {
926
+ children: C("healthybowl.crops.fieldDetail.form.irrigationType.label", "Irrigation Type")
927
+ }), /* @__PURE__ */ p("input", {
791
928
  type: "text",
792
- value: U,
793
- onChange: (e) => W(e.target.value),
929
+ value: Ze,
930
+ onChange: (e) => Qe(e.target.value),
794
931
  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)]"
795
932
  })] }),
796
- /* @__PURE__ */ d("div", {
933
+ /* @__PURE__ */ p("div", {
797
934
  className: "sm:col-span-2",
798
- children: /* @__PURE__ */ f("label", {
935
+ children: /* @__PURE__ */ m("label", {
799
936
  className: "flex cursor-pointer items-center gap-2 text-sm font-medium text-text-primary",
800
- children: [/* @__PURE__ */ d("input", {
937
+ children: [/* @__PURE__ */ p("input", {
801
938
  type: "checkbox",
802
- checked: q,
803
- onChange: (e) => J(e.target.checked),
939
+ checked: tt,
940
+ onChange: (e) => nt(e.target.checked),
804
941
  className: "h-4 w-4 rounded border-border-subtle text-primary focus:ring-[var(--color-focus-ring)]"
805
- }), b("healthybowl.crops.fieldDetail.form.organicCertified.label", "Organic Certified")]
942
+ }), C("healthybowl.crops.fieldDetail.form.organicCertified.label", "Organic Certified")]
806
943
  })
807
944
  })
808
945
  ]
809
946
  })
810
947
  }),
811
- /* @__PURE__ */ d(i, {
812
- toasts: je,
813
- onDismiss: Me
948
+ /* @__PURE__ */ p(te, {
949
+ toasts: He,
950
+ onDismiss: Ue
814
951
  })
815
952
  ]
816
- }) : /* @__PURE__ */ d(n, {
817
- title: b("healthybowl.crops.fieldDetail.notFound.pageTitle", "Field Not Found"),
818
- children: E.crops ? /* @__PURE__ */ d(ie, {}) : T.crops ? /* @__PURE__ */ d(te, { onRetry: D }) : /* @__PURE__ */ d(ee, {
819
- title: b("healthybowl.crops.fieldDetail.notFound.title", "Field not found"),
820
- description: b("healthybowl.crops.fieldDetail.notFound.description", "The field you are looking for does not exist."),
821
- action: /* @__PURE__ */ d(p, {
822
- onClick: () => O(k("crops/fields")),
823
- children: b("healthybowl.crops.fieldDetail.actions.backToFields", "Back to Fields")
953
+ }) : /* @__PURE__ */ p(r, {
954
+ title: C("healthybowl.crops.fieldDetail.notFound.pageTitle", "Field Not Found"),
955
+ children: Re.crops ? /* @__PURE__ */ p(ie, {}) : Le.crops ? /* @__PURE__ */ p(ee, { onRetry: O }) : /* @__PURE__ */ p(a, {
956
+ title: C("healthybowl.crops.fieldDetail.notFound.title", "Field not found"),
957
+ description: C("healthybowl.crops.fieldDetail.notFound.description", "The field you are looking for does not exist."),
958
+ action: /* @__PURE__ */ p(h, {
959
+ onClick: () => k(A("crops/fields")),
960
+ children: C("healthybowl.crops.fieldDetail.actions.backToFields", "Back to Fields")
824
961
  })
825
962
  })
826
963
  });
827
- };
964
+ }, w = ({ label: e, unit: t, value: n, min: r, step: i, onChange: a }) => /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
965
+ className: "text-xs font-medium text-text-secondary",
966
+ children: e
967
+ }), /* @__PURE__ */ m("div", {
968
+ className: "relative mt-1",
969
+ children: [/* @__PURE__ */ p("input", {
970
+ type: "number",
971
+ value: n,
972
+ min: r,
973
+ step: i,
974
+ onChange: (e) => a(e.target.value),
975
+ 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)]"
976
+ }), /* @__PURE__ */ p("span", {
977
+ className: "pointer-events-none absolute right-3 top-1/2 -translate-y-1/2 text-xs text-text-secondary",
978
+ children: t
979
+ })]
980
+ })] }), T = ({ label: e, value: t, unit: n }) => /* @__PURE__ */ m("div", {
981
+ className: "min-w-0 rounded-md border border-border-subtle bg-bg-sunken/60 p-3",
982
+ children: [/* @__PURE__ */ p("span", {
983
+ className: "block truncate text-xs text-text-secondary",
984
+ children: e
985
+ }), /* @__PURE__ */ m("p", {
986
+ className: "mt-1 text-lg font-semibold text-text-primary",
987
+ children: [t, n && /* @__PURE__ */ p("span", {
988
+ className: "ml-1 text-xs font-medium text-text-secondary",
989
+ children: n
990
+ })]
991
+ })]
992
+ });
828
993
  //#endregion
829
- export { b as FieldDetailsPage };
994
+ export { C as FieldDetailsPage };
830
995
 
831
996
  //# sourceMappingURL=FieldDetailsPage.js.map