@burdenoff/microfe-healthybowl 2026.904.21 → 2026.904.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (140) hide show
  1. package/dist/components/assistant/AssistantChatArea.js +7 -9
  2. package/dist/components/assistant/AssistantChatArea.js.map +1 -1
  3. package/dist/healthybowl/HealthyBowlRoot.js +56 -57
  4. package/dist/healthybowl/HealthyBowlRoot.js.map +1 -1
  5. package/dist/healthybowl/HealthyBowlRoutes.js +36 -48
  6. package/dist/healthybowl/HealthyBowlRoutes.js.map +1 -1
  7. package/dist/healthybowl/components/CreateFarmTaskButton.js.map +1 -1
  8. package/dist/healthybowl/components/PageLayout.js +10 -11
  9. package/dist/healthybowl/components/PageLayout.js.map +1 -1
  10. package/dist/healthybowl/context/HealthyBowlContext.js +7 -7
  11. package/dist/healthybowl/context/HealthyBowlContext.js.map +1 -1
  12. package/dist/healthybowl/hooks/useHealthyBowlCompliance.js +141 -157
  13. package/dist/healthybowl/hooks/useHealthyBowlCompliance.js.map +1 -1
  14. package/dist/healthybowl/hooks/useHealthyBowlData.js +0 -18
  15. package/dist/healthybowl/hooks/useHealthyBowlData.js.map +1 -1
  16. package/dist/healthybowl/hooks/useHealthyBowlDistribution.js +37 -52
  17. package/dist/healthybowl/hooks/useHealthyBowlDistribution.js.map +1 -1
  18. package/dist/healthybowl/hooks/useHealthyBowlLivestockDepth.js +78 -135
  19. package/dist/healthybowl/hooks/useHealthyBowlLivestockDepth.js.map +1 -1
  20. package/dist/healthybowl/hooks/useIrrigationAutomation.js +1 -1
  21. package/dist/healthybowl/hooks/useIrrigationAutomation.js.map +1 -1
  22. package/dist/healthybowl/hooks/useSuccessionPlanning.js +1 -1
  23. package/dist/healthybowl/hooks/useSuccessionPlanning.js.map +1 -1
  24. package/dist/healthybowl/hooks/useWeatherIntelligence.js +1 -1
  25. package/dist/healthybowl/hooks/useWeatherIntelligence.js.map +1 -1
  26. package/dist/healthybowl/offline/OfflineStatusPill.js +21 -40
  27. package/dist/healthybowl/offline/OfflineStatusPill.js.map +1 -1
  28. package/dist/healthybowl/offline/OfflineSyncProvider.js +130 -153
  29. package/dist/healthybowl/offline/OfflineSyncProvider.js.map +1 -1
  30. package/dist/healthybowl/offline/graphql.js.map +1 -1
  31. package/dist/healthybowl/offline/store.js +1 -1
  32. package/dist/healthybowl/offline/syncEngine.js +1 -2
  33. package/dist/healthybowl/offline/syncEngine.js.map +1 -1
  34. package/dist/healthybowl/offline/types.js.map +1 -1
  35. package/dist/healthybowl/pages/GettingStartedPage.js +0 -1
  36. package/dist/healthybowl/pages/GettingStartedPage.js.map +1 -1
  37. package/dist/healthybowl/pages/analytics/InsightsPage.js +2 -2
  38. package/dist/healthybowl/pages/analytics/InsightsPage.js.map +1 -1
  39. package/dist/healthybowl/pages/analytics/ReportsPage.js +99 -136
  40. package/dist/healthybowl/pages/analytics/ReportsPage.js.map +1 -1
  41. package/dist/healthybowl/pages/compliance/ComplianceOverviewPage.js +162 -204
  42. package/dist/healthybowl/pages/compliance/ComplianceOverviewPage.js.map +1 -1
  43. package/dist/healthybowl/pages/compliance/IcsGroupDetailPage.js +178 -196
  44. package/dist/healthybowl/pages/compliance/IcsGroupDetailPage.js.map +1 -1
  45. package/dist/healthybowl/pages/compliance/IcsGrowerDetailPage.js +141 -142
  46. package/dist/healthybowl/pages/compliance/IcsGrowerDetailPage.js.map +1 -1
  47. package/dist/healthybowl/pages/crops/CropFieldsPage.js +0 -2
  48. package/dist/healthybowl/pages/crops/CropFieldsPage.js.map +1 -1
  49. package/dist/healthybowl/pages/crops/CropHarvestPage.js +272 -316
  50. package/dist/healthybowl/pages/crops/CropHarvestPage.js.map +1 -1
  51. package/dist/healthybowl/pages/crops/CropPlanningPage.js +0 -6
  52. package/dist/healthybowl/pages/crops/CropPlanningPage.js.map +1 -1
  53. package/dist/healthybowl/pages/crops/FieldDetailsPage.js +846 -871
  54. package/dist/healthybowl/pages/crops/FieldDetailsPage.js.map +1 -1
  55. package/dist/healthybowl/pages/crops/HarvestDetailsPage.js +334 -376
  56. package/dist/healthybowl/pages/crops/HarvestDetailsPage.js.map +1 -1
  57. package/dist/healthybowl/pages/distribution/CsaPlanDetailPage.js +188 -415
  58. package/dist/healthybowl/pages/distribution/CsaPlanDetailPage.js.map +1 -1
  59. package/dist/healthybowl/pages/distribution/labels.js +2 -10
  60. package/dist/healthybowl/pages/distribution/labels.js.map +1 -1
  61. package/dist/healthybowl/pages/farm/FarmProfilePage.js +0 -1
  62. package/dist/healthybowl/pages/farm/FarmProfilePage.js.map +1 -1
  63. package/dist/healthybowl/pages/field-capture/CaptureObservationForm.js +8 -8
  64. package/dist/healthybowl/pages/fields/FieldMapPage.js +0 -2
  65. package/dist/healthybowl/pages/fields/FieldMapPage.js.map +1 -1
  66. package/dist/healthybowl/pages/financial/FinancialReportsPage.js +107 -92
  67. package/dist/healthybowl/pages/financial/FinancialReportsPage.js.map +1 -1
  68. package/dist/healthybowl/pages/government-schemes/ApplicationTrackingPage.js +188 -228
  69. package/dist/healthybowl/pages/government-schemes/ApplicationTrackingPage.js.map +1 -1
  70. package/dist/healthybowl/pages/government-schemes/SchemeDetailsPage.js +191 -261
  71. package/dist/healthybowl/pages/government-schemes/SchemeDetailsPage.js.map +1 -1
  72. package/dist/healthybowl/pages/inputs-insurance/InputsInsuranceOverviewPage.js +14 -14
  73. package/dist/healthybowl/pages/inputs-insurance/InputsInsuranceOverviewPage.js.map +1 -1
  74. package/dist/healthybowl/pages/irrigation/IrrigationPage.js +307 -338
  75. package/dist/healthybowl/pages/irrigation/IrrigationPage.js.map +1 -1
  76. package/dist/healthybowl/pages/livestock/AnimalDepthFormModal.js +102 -126
  77. package/dist/healthybowl/pages/livestock/AnimalDepthFormModal.js.map +1 -1
  78. package/dist/healthybowl/pages/livestock/AnimalDepthPage.js +215 -257
  79. package/dist/healthybowl/pages/livestock/AnimalDepthPage.js.map +1 -1
  80. package/dist/healthybowl/pages/livestock/GrazingPage.js +0 -1
  81. package/dist/healthybowl/pages/livestock/GrazingPage.js.map +1 -1
  82. package/dist/healthybowl/pages/livestock/HerdDepthPage.js +0 -4
  83. package/dist/healthybowl/pages/livestock/HerdDepthPage.js.map +1 -1
  84. package/dist/healthybowl/pages/livestock/grazing/RecordGrazingMoveModal.js +9 -8
  85. package/dist/healthybowl/pages/livestock/grazing/RecordGrazingMoveModal.js.map +1 -1
  86. package/dist/healthybowl/pages/network/ExpertsPage.js +419 -520
  87. package/dist/healthybowl/pages/network/ExpertsPage.js.map +1 -1
  88. package/dist/healthybowl/pages/weather/WeatherAlertHistoryPage.js +130 -129
  89. package/dist/healthybowl/pages/weather/WeatherAlertHistoryPage.js.map +1 -1
  90. package/dist/healthybowl/pages/weather/WeatherSettingsPage.js +237 -285
  91. package/dist/healthybowl/pages/weather/WeatherSettingsPage.js.map +1 -1
  92. package/dist/healthybowl/utils/plantingCapacity.js +10 -10
  93. package/dist/healthybowl/utils/plantingCapacity.js.map +1 -1
  94. package/dist/node_modules/fast-equals/dist/es/index.js +86 -74
  95. package/dist/node_modules/fast-equals/dist/es/index.js.map +1 -1
  96. package/dist/services/assistantApi.js +30 -59
  97. package/dist/services/assistantApi.js.map +1 -1
  98. package/dist/utils/pageContext.js +1 -15
  99. package/dist/utils/pageContext.js.map +1 -1
  100. package/package.json +1 -1
  101. package/dist/healthybowl/hooks/useAgronomyDecisions.js +0 -79
  102. package/dist/healthybowl/hooks/useAgronomyDecisions.js.map +0 -1
  103. package/dist/healthybowl/hooks/useAnalyticsReports.js +0 -173
  104. package/dist/healthybowl/hooks/useAnalyticsReports.js.map +0 -1
  105. package/dist/healthybowl/hooks/useComplianceExports.js +0 -74
  106. package/dist/healthybowl/hooks/useComplianceExports.js.map +0 -1
  107. package/dist/healthybowl/hooks/useConsultationPayments.js +0 -59
  108. package/dist/healthybowl/hooks/useConsultationPayments.js.map +0 -1
  109. package/dist/healthybowl/hooks/usePlantingEstimate.js +0 -88
  110. package/dist/healthybowl/hooks/usePlantingEstimate.js.map +0 -1
  111. package/dist/healthybowl/offline/HeaderOfflinePill.js +0 -28
  112. package/dist/healthybowl/offline/HeaderOfflinePill.js.map +0 -1
  113. package/dist/healthybowl/offline/captureCache.js +0 -30
  114. package/dist/healthybowl/offline/captureCache.js.map +0 -1
  115. package/dist/healthybowl/offline/headerSlot.js +0 -24
  116. package/dist/healthybowl/offline/headerSlot.js.map +0 -1
  117. package/dist/healthybowl/pages/ai/AiDecisionsPage.js +0 -287
  118. package/dist/healthybowl/pages/ai/AiDecisionsPage.js.map +0 -1
  119. package/dist/healthybowl/pages/compliance/ResidueTestsPage.js +0 -291
  120. package/dist/healthybowl/pages/compliance/ResidueTestsPage.js.map +0 -1
  121. package/dist/healthybowl/pages/compliance/SubstanceRulesPage.js +0 -300
  122. package/dist/healthybowl/pages/compliance/SubstanceRulesPage.js.map +0 -1
  123. package/dist/healthybowl/pages/compliance/substanceRuleForm.js +0 -135
  124. package/dist/healthybowl/pages/compliance/substanceRuleForm.js.map +0 -1
  125. package/dist/healthybowl/pages/government-schemes/schemeApplicationTransitions.js +0 -49
  126. package/dist/healthybowl/pages/government-schemes/schemeApplicationTransitions.js.map +0 -1
  127. package/dist/healthybowl/pages/government-schemes/schemeDocumentSlots.js +0 -48
  128. package/dist/healthybowl/pages/government-schemes/schemeDocumentSlots.js.map +0 -1
  129. package/dist/healthybowl/pages/government-schemes/useSchemeApplicationTransition.js +0 -54
  130. package/dist/healthybowl/pages/government-schemes/useSchemeApplicationTransition.js.map +0 -1
  131. package/dist/healthybowl/pages/livestock/PedigreeTree.js +0 -154
  132. package/dist/healthybowl/pages/livestock/PedigreeTree.js.map +0 -1
  133. package/dist/healthybowl/pages/livestock/eidTagInput.js +0 -39
  134. package/dist/healthybowl/pages/livestock/eidTagInput.js.map +0 -1
  135. package/dist/healthybowl/pages/livestock/pedigreeLayout.js +0 -68
  136. package/dist/healthybowl/pages/livestock/pedigreeLayout.js.map +0 -1
  137. package/dist/healthybowl/pages/weather/alertDelivery.js +0 -105
  138. package/dist/healthybowl/pages/weather/alertDelivery.js.map +0 -1
  139. package/dist/healthybowl/utils/icsInspection.js +0 -18
  140. package/dist/healthybowl/utils/icsInspection.js.map +0 -1
@@ -8,22 +8,20 @@ import { ToastContainer as o } from "../../components/Toast.js";
8
8
  import { Breadcrumbs as s } from "../../components/Breadcrumbs.js";
9
9
  import { PageLoader as c } from "../../components/PageLoader.js";
10
10
  import { Modal as l } from "../../components/Modal.js";
11
- import { useToast as re } from "../../hooks/useToast.js";
11
+ import { useToast as u } from "../../hooks/useToast.js";
12
12
  import "../../components/index.js";
13
- import { useHealthyBowlData as u } from "../../hooks/useHealthyBowlData.js";
14
- import { useOfflineSync as ie } from "../../offline/OfflineSyncProvider.js";
15
- import { useSchemeEligibility as ae } from "../../hooks/useSchemeEligibility.js";
16
- import { SCHEME_DOCUMENT_SLOT_SPECS as oe, canSubmitSchemeApplication as se, documentForSlot as ce, missingRequiredSchemeDocuments as le, removeSchemeDocument as ue, setSchemeDocument as de } from "./schemeDocumentSlots.js";
17
- import { getEffectiveSchemeStatus as d, isAcceptingSchemeApplications as fe } from "./schemeDiscoveryFilters.js";
18
- import { useMemo as f, useState as p } from "react";
19
- import { useI18n as pe } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
20
- import { AlertCircle as me, ArrowLeft as he, CalendarDays as ge, CheckCircle2 as m, ChevronDown as _e, ChevronUp as h, Circle as g, Clock as ve, DollarSign as ye, HelpCircle as be, Landmark as _, Upload as xe, XCircle as v } from "lucide-react";
21
- import { useNavigate as y, useParams as b } from "react-router";
22
- import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
13
+ import { useHealthyBowlData as d } from "../../hooks/useHealthyBowlData.js";
14
+ import { useOfflineSync as re } from "../../offline/OfflineSyncProvider.js";
15
+ import { useSchemeEligibility as ie } from "../../hooks/useSchemeEligibility.js";
16
+ import { getEffectiveSchemeStatus as f, isAcceptingSchemeApplications as ae } from "./schemeDiscoveryFilters.js";
17
+ import { useMemo as p, useState as m } from "react";
18
+ import { useI18n as oe } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
19
+ import { AlertCircle as se, ArrowLeft as ce, CalendarDays as le, CheckCircle2 as h, ChevronDown as ue, ChevronUp as g, Circle as _, Clock as v, DollarSign as y, HelpCircle as b, Landmark as x, Upload as de, XCircle as fe } from "lucide-react";
20
+ import { useNavigate as pe, useParams as me } from "react-router";
21
+ import { Fragment as he, jsx as S, jsxs as C } from "react/jsx-runtime";
23
22
  import { Button as w, GlassCard as T } from "@burdenoff/fe-libs/ui";
24
- import { useSaveToFiles as E } from "@burdenoff/fe-libs/storage";
25
23
  //#region src/healthybowl/pages/government-schemes/SchemeDetailsPage.tsx
26
- var D = (e) => {
24
+ var E = (e) => {
27
25
  switch (e) {
28
26
  case "open": return "success";
29
27
  case "closing_soon": return "warning";
@@ -31,7 +29,7 @@ var D = (e) => {
31
29
  case "expired": return "error";
32
30
  default: return "default";
33
31
  }
34
- }, O = (e) => {
32
+ }, D = (e) => {
35
33
  switch (e) {
36
34
  case "subsidy": return "success";
37
35
  case "credit": return "info";
@@ -41,90 +39,59 @@ var D = (e) => {
41
39
  case "equipment": return "muted";
42
40
  default: return "muted";
43
41
  }
44
- }, k = () => {
45
- let { governmentSchemes: k, errors: A, loadings: j, refetch: M } = u(), { queueSchemeApplication: Se } = ie(), { save: Ce } = E(), [N, P] = p([]), [we, F] = p(null), { schemeId: I } = b(), { eligibility: L } = ae(I), R = y(), { buildPath: z } = ee(), { toasts: Te, toast: B, dismiss: Ee } = re(), { t: V } = pe(), De = f(() => [
42
+ }, O = () => {
43
+ let { governmentSchemes: O, errors: k, loadings: A, refetch: j } = d(), { queueSchemeApplication: M } = re(), { schemeId: N } = me(), { eligibility: P } = ie(N), F = pe(), { buildPath: I } = ee(), { toasts: L, toast: R, dismiss: ge } = u(), { t: z } = oe(), _e = p(() => [
46
44
  {
47
- question: V("healthybowl.governmentSchemes.schemeDetails.faq.reviewTime.question", "How long does the application review process take?"),
48
- answer: V("healthybowl.governmentSchemes.schemeDetails.faq.reviewTime.answer", "Typically, applications are reviewed within 2-4 weeks of submission. You will receive status updates via email and on the Application Tracking page.")
45
+ question: z("healthybowl.governmentSchemes.schemeDetails.faq.reviewTime.question", "How long does the application review process take?"),
46
+ answer: z("healthybowl.governmentSchemes.schemeDetails.faq.reviewTime.answer", "Typically, applications are reviewed within 2-4 weeks of submission. You will receive status updates via email and on the Application Tracking page.")
49
47
  },
50
48
  {
51
- question: V("healthybowl.governmentSchemes.schemeDetails.faq.documents.question", "What documents do I need to submit?"),
52
- answer: V("healthybowl.governmentSchemes.schemeDetails.faq.documents.answer", "Required documents include farm ownership or lease proof, valid ID, bank account details, organic certification (if applicable), and any scheme-specific documents mentioned in the eligibility criteria.")
49
+ question: z("healthybowl.governmentSchemes.schemeDetails.faq.documents.question", "What documents do I need to submit?"),
50
+ answer: z("healthybowl.governmentSchemes.schemeDetails.faq.documents.answer", "Required documents include farm ownership or lease proof, valid ID, bank account details, organic certification (if applicable), and any scheme-specific documents mentioned in the eligibility criteria.")
53
51
  },
54
52
  {
55
- question: V("healthybowl.governmentSchemes.schemeDetails.faq.pendingCertification.question", "Can I apply if my organic certification is pending?"),
56
- answer: V("healthybowl.governmentSchemes.schemeDetails.faq.pendingCertification.answer", "For schemes requiring organic certification, you may apply during the transition period. Provide your transition plan and any in-process certification documentation.")
53
+ question: z("healthybowl.governmentSchemes.schemeDetails.faq.pendingCertification.question", "Can I apply if my organic certification is pending?"),
54
+ answer: z("healthybowl.governmentSchemes.schemeDetails.faq.pendingCertification.answer", "For schemes requiring organic certification, you may apply during the transition period. Provide your transition plan and any in-process certification documentation.")
57
55
  },
58
56
  {
59
- question: V("healthybowl.governmentSchemes.schemeDetails.faq.disbursement.question", "How will the benefits be disbursed?"),
60
- answer: V("healthybowl.governmentSchemes.schemeDetails.faq.disbursement.answer", "Approved benefits are transferred directly to your registered bank account. The disbursement typically occurs within 30 days of approval. You will receive a notification when the transfer is initiated.")
57
+ question: z("healthybowl.governmentSchemes.schemeDetails.faq.disbursement.question", "How will the benefits be disbursed?"),
58
+ answer: z("healthybowl.governmentSchemes.schemeDetails.faq.disbursement.answer", "Approved benefits are transferred directly to your registered bank account. The disbursement typically occurs within 30 days of approval. You will receive a notification when the transfer is initiated.")
61
59
  }
62
- ], [V]), [H, Oe] = p(null), [ke, U] = p(!1), [W, G] = p(!1), [K, q] = p({
60
+ ], [z]), [B, ve] = m(null), [ye, V] = m(!1), [H, U] = m(!1), [W, G] = m({
63
61
  applicantName: "",
64
62
  farmName: "",
65
63
  farmSize: "",
66
64
  farmLocation: "",
67
65
  declaration: !1
68
- }), J = k.find((e) => e.id === I), Y = f(() => J ? k.filter((e) => e.id !== J.id && e.category === J.category) : [], [k, J]);
66
+ }), [K, q] = m(() => /* @__PURE__ */ new Set()), J = O.find((e) => e.id === N), Y = p(() => J ? O.filter((e) => e.id !== J.id && e.category === J.category) : [], [O, J]);
69
67
  if (!J) return /* @__PURE__ */ S(i, {
70
- title: V("healthybowl.governmentSchemes.schemeDetails.notFound.title", "Scheme Not Found"),
71
- description: V("healthybowl.governmentSchemes.schemeDetails.notFound.description", "The requested scheme could not be found"),
72
- children: j.government ? /* @__PURE__ */ S(c, {}) : A.government ? /* @__PURE__ */ S(ne, { onRetry: M }) : /* @__PURE__ */ S(te, {
73
- icon: /* @__PURE__ */ S(me, { className: "h-12 w-12" }),
74
- title: V("healthybowl.governmentSchemes.schemeDetails.notFound.emptyState.title", "Scheme Not Found"),
75
- description: V("healthybowl.governmentSchemes.schemeDetails.notFound.emptyState.description", "The government scheme you are looking for does not exist or may have been removed."),
68
+ title: z("healthybowl.governmentSchemes.schemeDetails.notFound.title", "Scheme Not Found"),
69
+ description: z("healthybowl.governmentSchemes.schemeDetails.notFound.description", "The requested scheme could not be found"),
70
+ children: A.government ? /* @__PURE__ */ S(c, {}) : k.government ? /* @__PURE__ */ S(ne, { onRetry: j }) : /* @__PURE__ */ S(te, {
71
+ icon: /* @__PURE__ */ S(se, { className: "h-12 w-12" }),
72
+ title: z("healthybowl.governmentSchemes.schemeDetails.notFound.emptyState.title", "Scheme Not Found"),
73
+ description: z("healthybowl.governmentSchemes.schemeDetails.notFound.emptyState.description", "The government scheme you are looking for does not exist or may have been removed."),
76
74
  action: /* @__PURE__ */ S(w, {
77
- onClick: () => R(z("government-schemes/discover")),
78
- children: V("healthybowl.governmentSchemes.schemeDetails.notFound.browseSchemes", "Browse Schemes")
75
+ onClick: () => F(I("government-schemes/discover")),
76
+ children: z("healthybowl.governmentSchemes.schemeDetails.notFound.browseSchemes", "Browse Schemes")
79
77
  })
80
78
  })
81
79
  });
82
- let Ae = J.eligibility ?? [], X = (() => {
80
+ let be = J.eligibility ?? [], X = (() => {
83
81
  if (!J.applicationDeadline) return null;
84
82
  let e = (/* @__PURE__ */ new Date(`${J.applicationDeadline.slice(0, 10)}T12:00:00`)).getTime(), t = (/* @__PURE__ */ new Date(`${r()}T12:00:00`)).getTime();
85
83
  return Math.max(0, Math.round((e - t) / (1e3 * 60 * 60 * 24)));
86
- })(), Z = d(J, r()), Q = fe(J, r()), $ = () => {
84
+ })(), Z = f(J, r()), Q = ae(J, r()), $ = () => {
87
85
  if (!Q) {
88
86
  let e = Z === "expired";
89
- B({
90
- title: e ? V("healthybowl.governmentSchemes.schemeDetails.toast.schemeExpired.title", "Scheme Expired") : V("healthybowl.governmentSchemes.schemeDetails.toast.schemeClosed.title", "Scheme Closed"),
91
- description: e ? V("healthybowl.governmentSchemes.schemeDetails.toast.schemeExpired.message", "The application deadline for this scheme has passed.") : V("healthybowl.governmentSchemes.schemeDetails.toast.schemeClosed.message", "This scheme is no longer accepting applications."),
87
+ R({
88
+ title: e ? z("healthybowl.governmentSchemes.schemeDetails.toast.schemeExpired.title", "Scheme Expired") : z("healthybowl.governmentSchemes.schemeDetails.toast.schemeClosed.title", "Scheme Closed"),
89
+ description: e ? z("healthybowl.governmentSchemes.schemeDetails.toast.schemeExpired.message", "The application deadline for this scheme has passed.") : z("healthybowl.governmentSchemes.schemeDetails.toast.schemeClosed.message", "This scheme is no longer accepting applications."),
92
90
  variant: "error"
93
91
  });
94
92
  return;
95
93
  }
96
- U(!0);
97
- }, je = async (e, t) => {
98
- F(e);
99
- try {
100
- let n = await Ce({
101
- source: {
102
- kind: "blob",
103
- filename: t.name,
104
- mimeType: t.type || "application/octet-stream",
105
- getBlob: async () => ({
106
- blob: t,
107
- filename: t.name,
108
- mimeType: t.type || void 0
109
- })
110
- },
111
- folderPath: "/HealthyBowl/SchemeApplication"
112
- });
113
- P((r) => de(r, {
114
- slot: e,
115
- fileId: n.id,
116
- fileName: t.name,
117
- uploadedAt: (/* @__PURE__ */ new Date()).toISOString()
118
- }));
119
- } catch (e) {
120
- B({
121
- title: V("healthybowl.governmentSchemes.schemeDetails.toast.uploadFailed.title", "Upload failed"),
122
- description: e instanceof Error ? e.message : String(e),
123
- variant: "error"
124
- });
125
- } finally {
126
- F(null);
127
- }
94
+ V(!0);
128
95
  };
129
96
  return /* @__PURE__ */ C(i, {
130
97
  title: J.title,
@@ -132,45 +99,45 @@ var D = (e) => {
132
99
  actions: /* @__PURE__ */ C(w, {
133
100
  variant: "ghost",
134
101
  size: "sm",
135
- onClick: () => R(-1),
102
+ onClick: () => F(-1),
136
103
  className: "gap-1 text-text-secondary hover:text-text-primary",
137
104
  children: [
138
- /* @__PURE__ */ S(he, { className: "h-4 w-4" }),
105
+ /* @__PURE__ */ S(ce, { className: "h-4 w-4" }),
139
106
  " ",
140
- V("healthybowl.common.back", "Back")
107
+ z("healthybowl.common.back", "Back")
141
108
  ]
142
109
  }),
143
110
  purpose: "Everything you need to decide on one government scheme — what it offers, who qualifies, what documents you'll need, and how to apply. Read it through, then apply right here if it fits your farm.",
144
111
  nextSteps: [
145
112
  {
146
113
  id: "apply",
147
- label: V("healthybowl.governmentSchemes.schemeDetails.nextSteps.apply.label", "Apply for this scheme"),
148
- description: V("healthybowl.governmentSchemes.schemeDetails.nextSteps.apply.desc", "Start your application once you’ve checked the eligibility."),
114
+ label: z("healthybowl.governmentSchemes.schemeDetails.nextSteps.apply.label", "Apply for this scheme"),
115
+ description: z("healthybowl.governmentSchemes.schemeDetails.nextSteps.apply.desc", "Start your application once you’ve checked the eligibility."),
149
116
  onClick: $
150
117
  },
151
118
  {
152
119
  id: "track",
153
- label: V("healthybowl.governmentSchemes.schemeDetails.nextSteps.track.label", "Track your applications"),
154
- description: V("healthybowl.governmentSchemes.schemeDetails.nextSteps.track.desc", "Follow the status of schemes you’ve already applied to."),
155
- href: z("government-schemes/applications")
120
+ label: z("healthybowl.governmentSchemes.schemeDetails.nextSteps.track.label", "Track your applications"),
121
+ description: z("healthybowl.governmentSchemes.schemeDetails.nextSteps.track.desc", "Follow the status of schemes you’ve already applied to."),
122
+ href: I("government-schemes/applications")
156
123
  },
157
124
  {
158
125
  id: "discover",
159
- label: V("healthybowl.governmentSchemes.schemeDetails.nextSteps.discover.label", "Find more schemes"),
160
- description: V("healthybowl.governmentSchemes.schemeDetails.nextSteps.discover.desc", "Browse other programs your farm may qualify for."),
161
- href: z("government-schemes/discover")
126
+ label: z("healthybowl.governmentSchemes.schemeDetails.nextSteps.discover.label", "Find more schemes"),
127
+ description: z("healthybowl.governmentSchemes.schemeDetails.nextSteps.discover.desc", "Browse other programs your farm may qualify for."),
128
+ href: I("government-schemes/discover")
162
129
  }
163
130
  ],
164
131
  nextStepsKey: "healthybowl-scheme-detail",
165
132
  children: [
166
133
  /* @__PURE__ */ S(s, { items: [
167
134
  {
168
- label: V("healthybowl.governmentSchemes.schemeDetails.breadcrumbs.governmentSchemes", "Government Schemes"),
169
- href: z("government-schemes")
135
+ label: z("healthybowl.governmentSchemes.schemeDetails.breadcrumbs.governmentSchemes", "Government Schemes"),
136
+ href: I("government-schemes")
170
137
  },
171
138
  {
172
- label: V("healthybowl.governmentSchemes.schemeDetails.breadcrumbs.schemeDiscovery", "Scheme Discovery"),
173
- href: z("government-schemes/discover")
139
+ label: z("healthybowl.governmentSchemes.schemeDetails.breadcrumbs.schemeDiscovery", "Scheme Discovery"),
140
+ href: I("government-schemes/discover")
174
141
  },
175
142
  { label: J.title }
176
143
  ] }),
@@ -184,7 +151,7 @@ var D = (e) => {
184
151
  className: "flex items-center gap-3",
185
152
  children: [/* @__PURE__ */ S("div", {
186
153
  className: "rounded-md bg-bg-sunken p-2",
187
- children: /* @__PURE__ */ S(_, { className: "h-6 w-6 text-text-secondary" })
154
+ children: /* @__PURE__ */ S(x, { className: "h-6 w-6 text-text-secondary" })
188
155
  }), /* @__PURE__ */ C("div", { children: [
189
156
  /* @__PURE__ */ S("h2", {
190
157
  className: "text-lg font-semibold text-text-primary",
@@ -198,10 +165,10 @@ var D = (e) => {
198
165
  className: "mt-2 flex items-center gap-2",
199
166
  children: [/* @__PURE__ */ S(a, {
200
167
  label: Z.replace(/_/g, " "),
201
- variant: D(Z)
168
+ variant: E(Z)
202
169
  }), /* @__PURE__ */ S(a, {
203
170
  label: J.category,
204
- variant: O(J.category)
171
+ variant: D(J.category)
205
172
  })]
206
173
  })
207
174
  ] })]
@@ -213,9 +180,9 @@ var D = (e) => {
213
180
  className: "rounded-md bg-bg-sunken p-4",
214
181
  children: [/* @__PURE__ */ C("div", {
215
182
  className: "flex items-center gap-2",
216
- children: [/* @__PURE__ */ S(ye, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ S("p", {
183
+ children: [/* @__PURE__ */ S(y, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ S("p", {
217
184
  className: "text-xs text-text-secondary",
218
- children: V("healthybowl.governmentSchemes.schemeDetails.metrics.maxAmount.label", "Maximum Amount")
185
+ children: z("healthybowl.governmentSchemes.schemeDetails.metrics.maxAmount.label", "Maximum Amount")
219
186
  })]
220
187
  }), /* @__PURE__ */ S("p", {
221
188
  className: "mt-1 text-xl font-bold text-text-primary",
@@ -226,9 +193,9 @@ var D = (e) => {
226
193
  className: "rounded-md bg-bg-sunken p-4",
227
194
  children: [/* @__PURE__ */ C("div", {
228
195
  className: "flex items-center gap-2",
229
- children: [/* @__PURE__ */ S(ge, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ S("p", {
196
+ children: [/* @__PURE__ */ S(le, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ S("p", {
230
197
  className: "text-xs text-text-secondary",
231
- children: V("healthybowl.governmentSchemes.schemeDetails.metrics.deadline.label", "Application Deadline")
198
+ children: z("healthybowl.governmentSchemes.schemeDetails.metrics.deadline.label", "Application Deadline")
232
199
  })]
233
200
  }), /* @__PURE__ */ S("p", {
234
201
  className: "mt-1 text-xl font-bold text-text-primary",
@@ -239,13 +206,13 @@ var D = (e) => {
239
206
  className: e("rounded-md p-4", X <= 30 ? "bg-bg-sunken" : "bg-bg-surface"),
240
207
  children: [/* @__PURE__ */ C("div", {
241
208
  className: "flex items-center gap-2",
242
- children: [/* @__PURE__ */ S(ve, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ S("p", {
209
+ children: [/* @__PURE__ */ S(v, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ S("p", {
243
210
  className: "text-xs text-text-secondary",
244
- children: V("healthybowl.governmentSchemes.schemeDetails.metrics.daysRemaining.label", "Days Remaining")
211
+ children: z("healthybowl.governmentSchemes.schemeDetails.metrics.daysRemaining.label", "Days Remaining")
245
212
  })]
246
213
  }), /* @__PURE__ */ S("p", {
247
214
  className: "mt-1 text-xl font-bold text-text-primary",
248
- children: X === 1 ? V("healthybowl.governmentSchemes.schemeDetails.metrics.daysRemaining.valueOne", "{{count}} day", { count: X }) : V("healthybowl.governmentSchemes.schemeDetails.metrics.daysRemaining.valueOther", "{{count}} days", { count: X })
215
+ children: X === 1 ? z("healthybowl.governmentSchemes.schemeDetails.metrics.daysRemaining.valueOne", "{{count}} day", { count: X }) : z("healthybowl.governmentSchemes.schemeDetails.metrics.daysRemaining.valueOther", "{{count}} days", { count: X })
249
216
  })]
250
217
  })
251
218
  ]
@@ -255,7 +222,7 @@ var D = (e) => {
255
222
  className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
256
223
  children: [/* @__PURE__ */ S("h3", {
257
224
  className: "text-sm font-semibold text-text-primary",
258
- children: V("healthybowl.governmentSchemes.schemeDetails.sections.description.title", "Description")
225
+ children: z("healthybowl.governmentSchemes.schemeDetails.sections.description.title", "Description")
259
226
  }), /* @__PURE__ */ S("p", {
260
227
  className: "mt-2 text-sm leading-relaxed text-text-secondary",
261
228
  children: J.description
@@ -265,7 +232,7 @@ var D = (e) => {
265
232
  className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
266
233
  children: [/* @__PURE__ */ S("h3", {
267
234
  className: "text-sm font-semibold text-text-primary",
268
- children: V("healthybowl.governmentSchemes.schemeDetails.sections.benefits.title", "Benefits")
235
+ children: z("healthybowl.governmentSchemes.schemeDetails.sections.benefits.title", "Benefits")
269
236
  }), /* @__PURE__ */ S("p", {
270
237
  className: "mt-2 text-sm leading-relaxed text-text-secondary",
271
238
  children: J.benefits
@@ -276,37 +243,37 @@ var D = (e) => {
276
243
  children: [
277
244
  /* @__PURE__ */ S("h3", {
278
245
  className: "text-sm font-semibold text-text-primary",
279
- children: V("healthybowl.governmentSchemes.schemeDetails.sections.eligibility.requirementsTitle", "Eligibility Requirements")
246
+ children: z("healthybowl.governmentSchemes.schemeDetails.sections.eligibility.requirementsTitle", "Eligibility Requirements")
280
247
  }),
281
248
  /* @__PURE__ */ S("p", {
282
249
  className: "mt-1 text-xs text-text-secondary",
283
- children: V("healthybowl.governmentSchemes.schemeDetails.sections.eligibility.requirementsHelper", "Review each requirement and confirm you qualify before applying.")
250
+ children: z("healthybowl.governmentSchemes.schemeDetails.sections.eligibility.requirementsHelper", "Review each requirement and confirm you qualify before applying.")
284
251
  }),
285
- L && L.criteria.length > 0 && /* @__PURE__ */ C("div", {
286
- className: `mt-4 rounded-md border p-3 ${L.outcome === "ELIGIBLE" ? "border-success/40 bg-success/10" : L.outcome === "NOT_ELIGIBLE" ? "border-status-error-bg/40 bg-status-error-bg/10" : "border-border-subtle bg-bg-sunken/50"}`,
252
+ P && P.criteria.length > 0 && /* @__PURE__ */ C("div", {
253
+ className: `mt-4 rounded-md border p-3 ${P.outcome === "ELIGIBLE" ? "border-success/40 bg-success/10" : P.outcome === "NOT_ELIGIBLE" ? "border-status-error-bg/40 bg-status-error-bg/10" : "border-border-subtle bg-bg-sunken/50"}`,
287
254
  children: [/* @__PURE__ */ S("p", {
288
255
  className: "text-sm font-medium text-text-primary",
289
- children: L.summary
256
+ children: P.summary
290
257
  }), /* @__PURE__ */ S("p", {
291
258
  className: "mt-1 text-xs text-text-secondary",
292
- children: V("healthybowl.governmentSchemes.schemeDetails.sections.eligibility.checkedAgainstFarm", "Checked against your farm records. Always confirm against the scheme’s own wording before applying.")
259
+ children: z("healthybowl.governmentSchemes.schemeDetails.sections.eligibility.checkedAgainstFarm", "Checked against your farm records. Always confirm against the scheme’s own wording before applying.")
293
260
  })]
294
261
  }),
295
262
  /* @__PURE__ */ S("div", {
296
263
  className: "mt-4 space-y-3",
297
- children: L && L.criteria.length > 0 ? L.criteria.map((e) => /* @__PURE__ */ C("div", {
264
+ children: P && P.criteria.length > 0 ? P.criteria.map((e) => /* @__PURE__ */ C("div", {
298
265
  className: "flex items-start gap-3 rounded-md border border-border-subtle bg-bg-sunken/50 p-3",
299
- children: [e.verdict === "MET" ? /* @__PURE__ */ S(m, {
266
+ children: [e.verdict === "MET" ? /* @__PURE__ */ S(h, {
300
267
  role: "img",
301
- "aria-label": V("healthybowl.governmentSchemes.schemeDetails.eligibility.verdict.met", "Met"),
268
+ "aria-label": z("healthybowl.governmentSchemes.schemeDetails.eligibility.verdict.met", "Met"),
302
269
  className: "mt-0.5 h-4 w-4 shrink-0 text-success"
303
- }) : e.verdict === "UNMET" ? /* @__PURE__ */ S(v, {
270
+ }) : e.verdict === "UNMET" ? /* @__PURE__ */ S(fe, {
304
271
  role: "img",
305
- "aria-label": V("healthybowl.governmentSchemes.schemeDetails.eligibility.verdict.unmet", "Not met"),
272
+ "aria-label": z("healthybowl.governmentSchemes.schemeDetails.eligibility.verdict.unmet", "Not met"),
306
273
  className: "mt-0.5 h-4 w-4 shrink-0 text-status-error-bg"
307
- }) : /* @__PURE__ */ S(be, {
274
+ }) : /* @__PURE__ */ S(b, {
308
275
  role: "img",
309
- "aria-label": V("healthybowl.governmentSchemes.schemeDetails.eligibility.verdict.unknown", "Needs checking"),
276
+ "aria-label": z("healthybowl.governmentSchemes.schemeDetails.eligibility.verdict.unknown", "Needs checking"),
310
277
  className: "mt-0.5 h-4 w-4 shrink-0 text-text-secondary"
311
278
  }), /* @__PURE__ */ C("div", {
312
279
  className: "min-w-0",
@@ -318,9 +285,9 @@ var D = (e) => {
318
285
  children: e.reason
319
286
  }) : null]
320
287
  })]
321
- }, e.id)) : Ae.map((e) => /* @__PURE__ */ C("div", {
288
+ }, e.id)) : be.map((e) => /* @__PURE__ */ C("div", {
322
289
  className: "flex items-center gap-3 rounded-md border border-border-subtle bg-bg-sunken/50 p-3",
323
- children: [/* @__PURE__ */ S(g, { className: "h-4 w-4 shrink-0 text-text-secondary" }), /* @__PURE__ */ S("span", {
290
+ children: [/* @__PURE__ */ S(_, { className: "h-4 w-4 shrink-0 text-text-secondary" }), /* @__PURE__ */ S("span", {
324
291
  className: "text-sm text-text-primary",
325
292
  children: e
326
293
  })]
@@ -335,15 +302,15 @@ var D = (e) => {
335
302
  children: [/* @__PURE__ */ S("h3", {
336
303
  id: "scheme-required-documents",
337
304
  className: "text-sm font-semibold text-text-primary",
338
- children: V("healthybowl.governmentSchemes.schemeDetails.sections.documents.title", "Required Documents")
305
+ children: z("healthybowl.governmentSchemes.schemeDetails.sections.documents.title", "Required Documents")
339
306
  }), J.requiredDocuments.length === 0 ? /* @__PURE__ */ S("p", {
340
307
  className: "mt-2 text-sm text-text-secondary",
341
- children: V("healthybowl.governmentSchemes.schemeDetails.sections.documents.none", "The scheme provider has not listed any required documents.")
308
+ children: z("healthybowl.governmentSchemes.schemeDetails.sections.documents.none", "The scheme provider has not listed any required documents.")
342
309
  }) : /* @__PURE__ */ S("ul", {
343
310
  className: "mt-3 space-y-2",
344
311
  children: J.requiredDocuments.map((e) => /* @__PURE__ */ C("li", {
345
312
  className: "flex items-start gap-2 text-sm text-text-secondary",
346
- children: [/* @__PURE__ */ S(m, { className: "mt-0.5 h-4 w-4 shrink-0 text-success" }), /* @__PURE__ */ S("span", { children: e })]
313
+ children: [/* @__PURE__ */ S(h, { className: "mt-0.5 h-4 w-4 shrink-0 text-success" }), /* @__PURE__ */ S("span", { children: e })]
347
314
  }, e))
348
315
  })]
349
316
  }),
@@ -353,10 +320,10 @@ var D = (e) => {
353
320
  className: "rounded-md border border-border-subtle bg-bg-sunken p-4",
354
321
  children: [/* @__PURE__ */ S("p", {
355
322
  className: "text-sm font-medium text-text-primary",
356
- children: Z === "expired" ? V("healthybowl.governmentSchemes.schemeDetails.expired.title", "Application deadline has passed") : V("healthybowl.governmentSchemes.schemeDetails.closed.title", "Applications are closed")
323
+ children: Z === "expired" ? z("healthybowl.governmentSchemes.schemeDetails.expired.title", "Application deadline has passed") : z("healthybowl.governmentSchemes.schemeDetails.closed.title", "Applications are closed")
357
324
  }), /* @__PURE__ */ S("p", {
358
325
  className: "mt-1 text-xs text-text-secondary",
359
- children: Z === "expired" ? V("healthybowl.governmentSchemes.schemeDetails.expired.description", "This scheme has expired. You can still review its requirements and benefits.") : V("healthybowl.governmentSchemes.schemeDetails.closed.description", "This scheme is no longer accepting applications. You can still review its requirements and benefits.")
326
+ children: Z === "expired" ? z("healthybowl.governmentSchemes.schemeDetails.expired.description", "This scheme has expired. You can still review its requirements and benefits.") : z("healthybowl.governmentSchemes.schemeDetails.closed.description", "This scheme is no longer accepting applications. You can still review its requirements and benefits.")
360
327
  })]
361
328
  }),
362
329
  /* @__PURE__ */ C("div", {
@@ -364,28 +331,28 @@ var D = (e) => {
364
331
  children: [/* @__PURE__ */ S(w, {
365
332
  "data-testid": "scheme-apply-button",
366
333
  onClick: $,
367
- children: V("healthybowl.governmentSchemes.schemeDetails.actions.apply", "Apply for This Scheme")
334
+ children: z("healthybowl.governmentSchemes.schemeDetails.actions.apply", "Apply for This Scheme")
368
335
  }), /* @__PURE__ */ S(w, {
369
336
  variant: "outline",
370
- onClick: () => R(z("government-schemes/discover")),
371
- children: V("healthybowl.governmentSchemes.schemeDetails.actions.backToSchemes", "Back to Schemes")
337
+ onClick: () => F(I("government-schemes/discover")),
338
+ children: z("healthybowl.governmentSchemes.schemeDetails.actions.backToSchemes", "Back to Schemes")
372
339
  })]
373
340
  }),
374
341
  /* @__PURE__ */ C("div", {
375
342
  className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
376
343
  children: [/* @__PURE__ */ S("h3", {
377
344
  className: "text-sm font-semibold text-text-primary",
378
- children: V("healthybowl.governmentSchemes.schemeDetails.faq.title", "Frequently Asked Questions")
345
+ children: z("healthybowl.governmentSchemes.schemeDetails.faq.title", "Frequently Asked Questions")
379
346
  }), /* @__PURE__ */ S("div", {
380
347
  className: "mt-4 space-y-2",
381
- children: De.map((e, t) => /* @__PURE__ */ C("div", {
348
+ children: _e.map((e, t) => /* @__PURE__ */ C("div", {
382
349
  className: "rounded-md border border-border-subtle",
383
350
  children: [/* @__PURE__ */ C(w, {
384
351
  variant: "ghost",
385
- onClick: () => Oe(H === t ? null : t),
352
+ onClick: () => ve(B === t ? null : t),
386
353
  className: "h-auto w-full justify-between whitespace-normal px-4 py-3 text-start font-medium text-text-primary",
387
- children: [e.question, S(H === t ? h : _e, { className: "h-4 w-4 shrink-0 text-text-secondary" })]
388
- }), H === t && /* @__PURE__ */ S("div", {
354
+ children: [e.question, S(B === t ? g : ue, { className: "h-4 w-4 shrink-0 text-text-secondary" })]
355
+ }), B === t && /* @__PURE__ */ S("div", {
389
356
  className: "border-t border-border-subtle px-4 py-3 text-sm leading-relaxed text-text-secondary",
390
357
  children: e.answer
391
358
  })]
@@ -394,14 +361,14 @@ var D = (e) => {
394
361
  }),
395
362
  Y.length > 0 && /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("h3", {
396
363
  className: "mb-3 text-sm font-semibold text-text-primary",
397
- children: V("healthybowl.governmentSchemes.schemeDetails.related.title", "Related Schemes ({{category}})", { category: J.category })
364
+ children: z("healthybowl.governmentSchemes.schemeDetails.related.title", "Related Schemes ({{category}})", { category: J.category })
398
365
  }), /* @__PURE__ */ S("div", {
399
366
  className: "grid gap-4 sm:grid-cols-2",
400
367
  children: Y.map((e) => /* @__PURE__ */ C("button", {
401
368
  type: "button",
402
- onClick: () => R(z(`government-schemes/schemes/${e.id}`)),
369
+ onClick: () => F(I(`government-schemes/schemes/${e.id}`)),
403
370
  className: "flex items-start gap-3 rounded-lg border border-border-subtle bg-bg-surface p-4 text-start transition-colors hover:bg-bg-sunken/50",
404
- children: [/* @__PURE__ */ S(_, { className: "mt-0.5 h-5 w-5 shrink-0 text-text-secondary" }), /* @__PURE__ */ C("div", {
371
+ children: [/* @__PURE__ */ S(x, { className: "mt-0.5 h-5 w-5 shrink-0 text-text-secondary" }), /* @__PURE__ */ C("div", {
405
372
  className: "flex-1",
406
373
  children: [
407
374
  /* @__PURE__ */ S("p", {
@@ -415,11 +382,11 @@ var D = (e) => {
415
382
  /* @__PURE__ */ C("div", {
416
383
  className: "mt-2 flex items-center gap-2",
417
384
  children: [/* @__PURE__ */ S(a, {
418
- label: d(e, r()).replace(/_/g, " "),
419
- variant: D(d(e, r()))
385
+ label: f(e, r()).replace(/_/g, " "),
386
+ variant: E(f(e, r()))
420
387
  }), e.maxAmount && /* @__PURE__ */ S("span", {
421
388
  className: "text-xs text-text-secondary",
422
- children: V("healthybowl.governmentSchemes.schemeDetails.related.upTo", "Up to {{amount}}", { amount: t(e.maxAmount, e.currency) })
389
+ children: z("healthybowl.governmentSchemes.schemeDetails.related.upTo", "Up to {{amount}}", { amount: t(e.maxAmount, e.currency) })
423
390
  })]
424
391
  })
425
392
  ]
@@ -427,173 +394,158 @@ var D = (e) => {
427
394
  }, e.id))
428
395
  })] }),
429
396
  /* @__PURE__ */ S(l, {
430
- open: ke && Q,
397
+ open: ye && Q,
431
398
  onClose: () => {
432
- W || U(!1);
399
+ H || V(!1);
433
400
  },
434
- title: V("healthybowl.governmentSchemes.schemeDetails.modal.title", "Apply for Scheme"),
401
+ title: z("healthybowl.governmentSchemes.schemeDetails.modal.title", "Apply for Scheme"),
435
402
  description: J.title,
436
403
  size: "lg",
437
- footer: /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(w, {
404
+ footer: /* @__PURE__ */ C(he, { children: [/* @__PURE__ */ S(w, {
438
405
  variant: "outline",
439
- onClick: () => U(!1),
440
- disabled: W,
441
- children: V("healthybowl.common.cancel", "Cancel")
406
+ onClick: () => V(!1),
407
+ disabled: H,
408
+ children: z("healthybowl.common.cancel", "Cancel")
442
409
  }), /* @__PURE__ */ S(w, {
443
410
  onClick: async () => {
444
411
  if (!Q) {
445
- U(!1), $();
412
+ V(!1), $();
446
413
  return;
447
414
  }
448
- if (!W) {
449
- if (!K.applicantName.trim() || !K.farmName.trim()) {
450
- B({
451
- title: V("healthybowl.governmentSchemes.schemeDetails.toast.requiredFields.title", "Required Fields Missing"),
452
- description: V("healthybowl.governmentSchemes.schemeDetails.toast.requiredFields.message", "Please fill in all required fields."),
415
+ if (!H) {
416
+ if (!W.applicantName.trim() || !W.farmName.trim()) {
417
+ R({
418
+ title: z("healthybowl.governmentSchemes.schemeDetails.toast.requiredFields.title", "Required Fields Missing"),
419
+ description: z("healthybowl.governmentSchemes.schemeDetails.toast.requiredFields.message", "Please fill in all required fields."),
453
420
  variant: "error"
454
421
  });
455
422
  return;
456
423
  }
457
- if (!K.declaration) {
458
- B({
459
- title: V("healthybowl.governmentSchemes.schemeDetails.toast.declarationRequired.title", "Declaration Required"),
460
- description: V("healthybowl.governmentSchemes.schemeDetails.toast.declarationRequired.message", "Please accept the declaration to proceed."),
424
+ if (!W.declaration) {
425
+ R({
426
+ title: z("healthybowl.governmentSchemes.schemeDetails.toast.declarationRequired.title", "Declaration Required"),
427
+ description: z("healthybowl.governmentSchemes.schemeDetails.toast.declarationRequired.message", "Please accept the declaration to proceed."),
461
428
  variant: "error"
462
429
  });
463
430
  return;
464
431
  }
465
- if (!se(N)) {
466
- let e = le(N).map((e) => V(e.labelKey, e.labelFallback)).join(", ");
467
- B({
468
- title: V("healthybowl.governmentSchemes.schemeDetails.toast.documentsRequired.title", "Documents required"),
469
- description: V("healthybowl.governmentSchemes.schemeDetails.toast.documentsRequired.message", "Upload these before submitting: {{missing}}.", { missing: e }),
470
- variant: "error"
471
- });
472
- return;
473
- }
474
- G(!0);
432
+ U(!0);
475
433
  try {
476
- let e = [K.farmSize.trim(), K.farmLocation.trim()].filter(Boolean).join(", "), t = await Se({
434
+ let e = J.requiredDocuments.filter((e) => K.has(e)).join(", ") || "none", t = [W.farmSize.trim(), W.farmLocation.trim()].filter(Boolean).join(", "), n = await M({
477
435
  schemeId: J.id,
478
- applicantName: K.applicantName.trim(),
479
- farmName: K.farmName.trim(),
436
+ applicantName: W.applicantName.trim(),
437
+ farmName: W.farmName.trim(),
480
438
  declarationAccepted: !0,
481
- notes: `Applicant: ${K.applicantName.trim()}; Farm: ${K.farmName.trim()}${e ? ` (${e})` : ""}`,
482
- documents: N.map((e) => ({
483
- slot: e.slot,
484
- fileId: e.fileId,
485
- fileName: e.fileName,
486
- uploadedAt: e.uploadedAt
487
- }))
439
+ notes: `Applicant: ${W.applicantName.trim()}; Farm: ${W.farmName.trim()}${t ? ` (${t})` : ""}; Documents ready: ${e}`
488
440
  }, J.title);
489
- if (t.status === "FAILED") {
490
- B({
491
- title: V("healthybowl.governmentSchemes.schemeDetails.toast.submitFailed.title", "Submission failed"),
492
- description: t.message,
441
+ if (n.status === "FAILED") {
442
+ R({
443
+ title: z("healthybowl.governmentSchemes.schemeDetails.toast.submitFailed.title", "Submission failed"),
444
+ description: n.message,
493
445
  variant: "error"
494
446
  });
495
447
  return;
496
448
  }
497
- t.status === "SYNCED" ? (B({
498
- title: V("healthybowl.governmentSchemes.schemeDetails.toast.submitted.title", "Application Submitted"),
499
- description: V("healthybowl.governmentSchemes.schemeDetails.toast.submitted.message", "Your application for {{schemeTitle}} has been submitted successfully.", { schemeTitle: J.title }),
449
+ n.status === "SYNCED" ? (R({
450
+ title: z("healthybowl.governmentSchemes.schemeDetails.toast.submitted.title", "Application Submitted"),
451
+ description: z("healthybowl.governmentSchemes.schemeDetails.toast.submitted.message", "Your application for {{schemeTitle}} has been submitted successfully.", { schemeTitle: J.title }),
500
452
  variant: "success"
501
- }), M()) : B({
502
- title: V("healthybowl.governmentSchemes.schemeDetails.toast.queued.title", "Saved — will submit when online"),
503
- description: V("healthybowl.governmentSchemes.schemeDetails.toast.queued.message", "Your application for {{schemeTitle}} is saved on this device and will be submitted automatically when you have a connection. You can see it under Pending Sync.", { schemeTitle: J.title }),
453
+ }), j()) : R({
454
+ title: z("healthybowl.governmentSchemes.schemeDetails.toast.queued.title", "Saved — will submit when online"),
455
+ description: z("healthybowl.governmentSchemes.schemeDetails.toast.queued.message", "Your application for {{schemeTitle}} is saved on this device and will be submitted automatically when you have a connection. You can see it under Pending Sync.", { schemeTitle: J.title }),
504
456
  variant: "info"
505
- }), U(!1), q({
457
+ }), V(!1), G({
506
458
  applicantName: "",
507
459
  farmName: "",
508
460
  farmSize: "",
509
461
  farmLocation: "",
510
462
  declaration: !1
511
- }), P([]);
463
+ }), q(/* @__PURE__ */ new Set());
512
464
  } catch (e) {
513
- console.error("Scheme application submission failed", e), B({
514
- title: V("healthybowl.governmentSchemes.schemeDetails.toast.submitFailed.title", "Submission failed"),
515
- description: V("healthybowl.governmentSchemes.schemeDetails.toast.submitFailed.message", "Something went wrong while submitting your application. Please try again or contact support."),
465
+ console.error("Scheme application submission failed", e), R({
466
+ title: z("healthybowl.governmentSchemes.schemeDetails.toast.submitFailed.title", "Submission failed"),
467
+ description: z("healthybowl.governmentSchemes.schemeDetails.toast.submitFailed.message", "Something went wrong while submitting your application. Please try again or contact support."),
516
468
  variant: "error"
517
469
  });
518
470
  } finally {
519
- G(!1);
471
+ U(!1);
520
472
  }
521
473
  }
522
474
  },
523
- disabled: W,
524
- children: W ? V("healthybowl.governmentSchemes.schemeDetails.modal.submitting", "Submitting...") : V("healthybowl.governmentSchemes.schemeDetails.modal.submit", "Submit Application")
475
+ disabled: H,
476
+ children: H ? z("healthybowl.governmentSchemes.schemeDetails.modal.submitting", "Submitting...") : z("healthybowl.governmentSchemes.schemeDetails.modal.submit", "Submit Application")
525
477
  })] }),
526
478
  children: /* @__PURE__ */ C("div", {
527
479
  className: "space-y-4",
528
480
  children: [
529
481
  /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("h4", {
530
482
  className: "text-sm font-medium text-text-primary",
531
- children: V("healthybowl.governmentSchemes.schemeDetails.form.applicant.title", "Applicant Details")
483
+ children: z("healthybowl.governmentSchemes.schemeDetails.form.applicant.title", "Applicant Details")
532
484
  }), /* @__PURE__ */ S("div", {
533
485
  className: "mt-2 space-y-3",
534
486
  children: /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
535
487
  htmlFor: "scheme-applicant-name",
536
488
  className: "block text-xs font-medium text-text-secondary",
537
- children: V("healthybowl.governmentSchemes.schemeDetails.form.fields.fullName.label", "Full Name *")
489
+ children: z("healthybowl.governmentSchemes.schemeDetails.form.fields.fullName.label", "Full Name *")
538
490
  }), /* @__PURE__ */ S("input", {
539
491
  id: "scheme-applicant-name",
540
492
  type: "text",
541
- value: K.applicantName,
542
- onChange: (e) => q({
543
- ...K,
493
+ value: W.applicantName,
494
+ onChange: (e) => G({
495
+ ...W,
544
496
  applicantName: e.target.value
545
497
  }),
546
- placeholder: V("healthybowl.governmentSchemes.schemeDetails.form.fields.fullName.placeholder", "Enter your full name"),
498
+ placeholder: z("healthybowl.governmentSchemes.schemeDetails.form.fields.fullName.placeholder", "Enter your full name"),
547
499
  className: "mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary"
548
500
  })] })
549
501
  })] }),
550
502
  /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("h4", {
551
503
  className: "text-sm font-medium text-text-primary",
552
- children: V("healthybowl.governmentSchemes.schemeDetails.form.farm.title", "Farm Details")
504
+ children: z("healthybowl.governmentSchemes.schemeDetails.form.farm.title", "Farm Details")
553
505
  }), /* @__PURE__ */ C("div", {
554
506
  className: "mt-2 grid gap-3 sm:grid-cols-2",
555
507
  children: [
556
508
  /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
557
509
  htmlFor: "scheme-farm-name",
558
510
  className: "block text-xs font-medium text-text-secondary",
559
- children: V("healthybowl.governmentSchemes.schemeDetails.form.fields.farmName.label", "Farm Name *")
511
+ children: z("healthybowl.governmentSchemes.schemeDetails.form.fields.farmName.label", "Farm Name *")
560
512
  }), /* @__PURE__ */ S("input", {
561
513
  id: "scheme-farm-name",
562
514
  type: "text",
563
- value: K.farmName,
564
- onChange: (e) => q({
565
- ...K,
515
+ value: W.farmName,
516
+ onChange: (e) => G({
517
+ ...W,
566
518
  farmName: e.target.value
567
519
  }),
568
- placeholder: V("healthybowl.governmentSchemes.schemeDetails.form.fields.farmName.placeholder", "Your farm name"),
520
+ placeholder: z("healthybowl.governmentSchemes.schemeDetails.form.fields.farmName.placeholder", "Your farm name"),
569
521
  className: "mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary"
570
522
  })] }),
571
523
  /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
572
524
  className: "block text-xs font-medium text-text-secondary",
573
- children: V("healthybowl.governmentSchemes.schemeDetails.form.fields.farmSize.label", "Farm Size (acres)")
525
+ children: z("healthybowl.governmentSchemes.schemeDetails.form.fields.farmSize.label", "Farm Size (acres)")
574
526
  }), /* @__PURE__ */ S("input", {
575
527
  type: "text",
576
- value: K.farmSize,
577
- onChange: (e) => q({
578
- ...K,
528
+ value: W.farmSize,
529
+ onChange: (e) => G({
530
+ ...W,
579
531
  farmSize: e.target.value
580
532
  }),
581
- placeholder: V("healthybowl.governmentSchemes.schemeDetails.form.fields.farmSize.placeholder", "e.g., 50"),
533
+ placeholder: z("healthybowl.governmentSchemes.schemeDetails.form.fields.farmSize.placeholder", "e.g., 50"),
582
534
  className: "mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary"
583
535
  })] }),
584
536
  /* @__PURE__ */ C("div", {
585
537
  className: "sm:col-span-2",
586
538
  children: [/* @__PURE__ */ S("label", {
587
539
  className: "block text-xs font-medium text-text-secondary",
588
- children: V("healthybowl.governmentSchemes.schemeDetails.form.fields.farmLocation.label", "Farm Location")
540
+ children: z("healthybowl.governmentSchemes.schemeDetails.form.fields.farmLocation.label", "Farm Location")
589
541
  }), /* @__PURE__ */ S("input", {
590
542
  type: "text",
591
- value: K.farmLocation,
592
- onChange: (e) => q({
593
- ...K,
543
+ value: W.farmLocation,
544
+ onChange: (e) => G({
545
+ ...W,
594
546
  farmLocation: e.target.value
595
547
  }),
596
- placeholder: V("healthybowl.governmentSchemes.schemeDetails.form.fields.farmLocation.placeholder", "County, State"),
548
+ placeholder: z("healthybowl.governmentSchemes.schemeDetails.form.fields.farmLocation.placeholder", "County, State"),
597
549
  className: "mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary"
598
550
  })]
599
551
  })
@@ -602,60 +554,38 @@ var D = (e) => {
602
554
  /* @__PURE__ */ C("div", { children: [
603
555
  /* @__PURE__ */ S("h4", {
604
556
  className: "text-sm font-medium text-text-primary",
605
- children: V("healthybowl.governmentSchemes.schemeDetails.form.documents.title", "Supporting documents")
557
+ children: z("healthybowl.governmentSchemes.schemeDetails.form.documents.title", "Documents Checklist")
606
558
  }),
607
559
  /* @__PURE__ */ S("p", {
608
560
  className: "mt-0.5 text-xs text-text-secondary",
609
- children: V("healthybowl.governmentSchemes.schemeDetails.form.documents.helper", "Upload each document. They are attached to your application, so the department does not have to ask for them separately.")
561
+ children: z("healthybowl.governmentSchemes.schemeDetails.form.documents.helper", "Confirm you have the following documents ready for upload")
610
562
  }),
611
563
  /* @__PURE__ */ S("div", {
612
564
  className: "mt-2 space-y-2",
613
- children: oe.map((e) => {
614
- let t = ce(N, e.slot), n = we === e.slot;
615
- return /* @__PURE__ */ C("div", {
616
- className: "flex flex-wrap items-center justify-between gap-3 rounded-md border border-border-subtle p-3",
617
- children: [/* @__PURE__ */ C("div", {
618
- className: "flex items-center gap-2",
619
- children: [t ? /* @__PURE__ */ S(m, { className: "h-4 w-4 text-status-success-text" }) : /* @__PURE__ */ S(xe, { className: "h-3.5 w-3.5 text-text-secondary" }), /* @__PURE__ */ C("div", { children: [
620
- /* @__PURE__ */ S("span", {
621
- className: "text-sm text-text-primary",
622
- children: V(e.labelKey, e.labelFallback)
623
- }),
624
- e.required ? /* @__PURE__ */ S("span", {
625
- className: "ms-1 text-xs text-status-error-text",
626
- "aria-hidden": "true",
627
- children: "*"
628
- }) : /* @__PURE__ */ S("span", {
629
- className: "ms-2 text-xs text-text-secondary",
630
- children: V("healthybowl.governmentSchemes.schemeDetails.form.documents.optional", "optional")
631
- }),
632
- t ? /* @__PURE__ */ S("div", {
633
- className: "text-xs text-text-secondary",
634
- children: t.fileName ?? V("healthybowl.governmentSchemes.schemeDetails.form.documents.uploaded", "Uploaded")
635
- }) : null
636
- ] })]
565
+ children: J.requiredDocuments.map((e, t) => {
566
+ let n = `scheme-document-${t}`;
567
+ return /* @__PURE__ */ C("label", {
568
+ htmlFor: n,
569
+ className: "flex items-center gap-3 rounded-md border border-border-subtle p-3 transition-colors hover:bg-bg-sunken/50",
570
+ children: [/* @__PURE__ */ S("input", {
571
+ id: n,
572
+ type: "checkbox",
573
+ checked: K.has(e),
574
+ onChange: (t) => {
575
+ q((n) => {
576
+ let r = new Set(n);
577
+ return t.target.checked ? r.add(e) : r.delete(e), r;
578
+ });
579
+ },
580
+ className: "h-4 w-4 rounded border-border-subtle"
637
581
  }), /* @__PURE__ */ C("div", {
638
582
  className: "flex items-center gap-2",
639
- children: [/* @__PURE__ */ C("label", {
640
- className: "cursor-pointer text-xs font-medium text-action-primary-bg hover:underline",
641
- children: [n ? V("healthybowl.governmentSchemes.schemeDetails.form.documents.uploading", "Uploading…") : t ? V("healthybowl.governmentSchemes.schemeDetails.form.documents.replace", "Replace") : V("healthybowl.governmentSchemes.schemeDetails.form.documents.upload", "Upload"), /* @__PURE__ */ S("input", {
642
- type: "file",
643
- className: "sr-only",
644
- disabled: n,
645
- "aria-label": V(e.labelKey, e.labelFallback),
646
- onChange: (t) => {
647
- let n = t.target.files?.[0];
648
- t.target.value = "", n && je(e.slot, n);
649
- }
650
- })]
651
- }), t ? /* @__PURE__ */ S("button", {
652
- type: "button",
653
- onClick: () => P((t) => ue(t, e.slot)),
654
- className: "text-xs text-text-secondary hover:text-status-error-text",
655
- children: V("common.remove", "Remove")
656
- }) : null]
583
+ children: [/* @__PURE__ */ S(de, { className: "h-3.5 w-3.5 text-text-secondary" }), /* @__PURE__ */ S("span", {
584
+ className: "text-sm text-text-primary",
585
+ children: e
586
+ })]
657
587
  })]
658
- }, e.slot);
588
+ }, e);
659
589
  })
660
590
  })
661
591
  ] }),
@@ -667,15 +597,15 @@ var D = (e) => {
667
597
  children: [/* @__PURE__ */ S("input", {
668
598
  id: "scheme-declaration",
669
599
  type: "checkbox",
670
- checked: K.declaration,
671
- onChange: (e) => q({
672
- ...K,
600
+ checked: W.declaration,
601
+ onChange: (e) => G({
602
+ ...W,
673
603
  declaration: e.target.checked
674
604
  }),
675
605
  className: "mt-0.5 h-4 w-4 rounded border-border-subtle"
676
606
  }), /* @__PURE__ */ S("span", {
677
607
  className: "text-xs text-text-secondary",
678
- children: V("healthybowl.governmentSchemes.schemeDetails.form.declaration.text", "I declare that the information provided is true and accurate. I understand that providing false information may result in disqualification and legal action.")
608
+ children: z("healthybowl.governmentSchemes.schemeDetails.form.declaration.text", "I declare that the information provided is true and accurate. I understand that providing false information may result in disqualification and legal action.")
679
609
  })]
680
610
  })
681
611
  })
@@ -683,13 +613,13 @@ var D = (e) => {
683
613
  })
684
614
  }),
685
615
  /* @__PURE__ */ S(o, {
686
- toasts: Te,
687
- onDismiss: Ee
616
+ toasts: L,
617
+ onDismiss: ge
688
618
  })
689
619
  ]
690
620
  });
691
621
  };
692
622
  //#endregion
693
- export { k as SchemeDetailsPage };
623
+ export { O as SchemeDetailsPage };
694
624
 
695
625
  //# sourceMappingURL=SchemeDetailsPage.js.map