@burdenoff/microfe-healthybowl 2026.810.10 → 2026.810.11

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.
@@ -0,0 +1,47 @@
1
+ import { useHealthyBowl as e } from "../context/HealthyBowlContext.js";
2
+ import { gql as t } from "@apollo/client";
3
+ import { useQuery as n } from "@apollo/client/react";
4
+ //#region src/healthybowl/hooks/useSchemeEligibility.ts
5
+ var r = t`
6
+ query HealthyBowlSchemeEligibility($schemeId: ID!, $context: ContextInput!) {
7
+ getHealthyBowlSchemeEligibility(schemeId: $schemeId, context: $context) {
8
+ schemeId
9
+ schemeTitle
10
+ outcome
11
+ summary
12
+ metCount
13
+ unmetCount
14
+ unknownCount
15
+ criteria {
16
+ id
17
+ label
18
+ fact
19
+ operator
20
+ expected
21
+ actual
22
+ verdict
23
+ reason
24
+ }
25
+ eligibility
26
+ }
27
+ }
28
+ `;
29
+ function i(t) {
30
+ let { workspaceId: i } = e(), { data: a, loading: o, error: s } = n(r, {
31
+ variables: {
32
+ schemeId: t ?? "",
33
+ context: { workspaceId: i }
34
+ },
35
+ skip: !i || !t,
36
+ fetchPolicy: "cache-and-network"
37
+ });
38
+ return {
39
+ eligibility: a?.getHealthyBowlSchemeEligibility ?? null,
40
+ loading: o,
41
+ error: s ?? null
42
+ };
43
+ }
44
+ //#endregion
45
+ export { i as useSchemeEligibility };
46
+
47
+ //# sourceMappingURL=useSchemeEligibility.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSchemeEligibility.js","names":[],"sources":["../../../src/healthybowl/hooks/useSchemeEligibility.ts"],"sourcesContent":["/**\n * Scheme eligibility check (BOFF-6110).\n *\n * Scheme criteria were free text, so nothing could tell a farmer whether they qualify — the\n * details page said as much in a comment, having removed a `met: i < 2` fake that marked the\n * first two criteria met purely by position.\n *\n * This reads the real verdict from `getHealthyBowlSchemeEligibility`, which evaluates a scheme's\n * structured criteria against the farm data HealthyBowl already holds. The server never guesses:\n * anything it cannot settle comes back UNKNOWN rather than UNMET, and this hook passes that\n * through untouched — presenting UNKNOWN as \"not met\" in the UI would reintroduce exactly the\n * false negative the engine was written to avoid.\n *\n * Mirrors the raw-`gql` pattern used by {@link usePlanExecution} — the offline codegen doesn't\n * type these operations, so they're hand-written documents executed against the live gateway.\n * @module healthybowl\n */\nimport { gql } from '@apollo/client';\nimport { useQuery } from '@apollo/client/react';\nimport { useHealthyBowl } from '../context/HealthyBowlContext';\n\nconst SCHEME_ELIGIBILITY = gql`\n query HealthyBowlSchemeEligibility($schemeId: ID!, $context: ContextInput!) {\n getHealthyBowlSchemeEligibility(schemeId: $schemeId, context: $context) {\n schemeId\n schemeTitle\n outcome\n summary\n metCount\n unmetCount\n unknownCount\n criteria {\n id\n label\n fact\n operator\n expected\n actual\n verdict\n reason\n }\n eligibility\n }\n }\n`;\n\nexport type EligibilityVerdict = 'MET' | 'UNMET' | 'UNKNOWN';\nexport type EligibilityOutcome = 'ELIGIBLE' | 'NOT_ELIGIBLE' | 'UNKNOWN';\n\nexport interface EligibilityCriterion {\n id: string;\n label: string;\n fact: string | null;\n operator: string | null;\n expected: string | null;\n actual: string | null;\n verdict: EligibilityVerdict;\n reason: string;\n}\n\nexport interface SchemeEligibility {\n schemeId: string;\n schemeTitle: string;\n outcome: EligibilityOutcome;\n summary: string;\n metCount: number;\n unmetCount: number;\n unknownCount: number;\n criteria: EligibilityCriterion[];\n eligibility: string[];\n}\n\ninterface QueryData {\n getHealthyBowlSchemeEligibility: SchemeEligibility;\n}\n\n/**\n * Loads the eligibility verdict for one scheme.\n *\n * Errors are swallowed into `eligibility: null` on purpose: this is an advisory panel, and a\n * scheme's published criteria are shown regardless, so a failed check must degrade to \"we could\n * not check\" rather than blocking the page a farmer needs in order to apply.\n */\nexport function useSchemeEligibility(schemeId: string | undefined) {\n const { workspaceId } = useHealthyBowl();\n const { data, loading, error } = useQuery<QueryData>(SCHEME_ELIGIBILITY, {\n variables: { schemeId: schemeId ?? '', context: { workspaceId } },\n skip: !workspaceId || !schemeId,\n fetchPolicy: 'cache-and-network',\n });\n\n return {\n eligibility: data?.getHealthyBowlSchemeEligibility ?? null,\n loading,\n error: error ?? null,\n };\n}\n"],"mappings":";;;;AAqBA,IAAM,IAAqB,CAAG;;;;;;;;;;;;;;;;;;;;;;;;AA8D9B,SAAgB,EAAqB,GAA8B;CACjE,IAAM,EAAE,mBAAgB,GAAgB,EAClC,EAAE,SAAM,YAAS,aAAU,EAAoB,GAAoB;EACvE,WAAW;GAAE,UAAU,KAAY;GAAI,SAAS,EAAE,gBAAa;GAAE;EACjE,MAAM,CAAC,KAAe,CAAC;EACvB,aAAa;EACd,CAAC;AAEF,QAAO;EACL,aAAa,GAAM,mCAAmC;EACtD;EACA,OAAO,KAAS;EACjB"}
@@ -3,29 +3,30 @@ import { useBasePath as n } from "../../hooks/useBasePath.js";
3
3
  import { PageLayout as r } from "../../components/PageLayout.js";
4
4
  import { StatusBadge as i } from "../../components/StatusBadge.js";
5
5
  import { EmptyState as a } from "../../components/EmptyState.js";
6
- import { ErrorState as te } from "../../components/ErrorState.js";
7
- import { ToastContainer as o } from "../../components/Toast.js";
8
- import { Breadcrumbs as s } from "../../components/Breadcrumbs.js";
9
- import { PageLoader as c } from "../../components/PageLoader.js";
10
- import { Modal as l } from "../../components/Modal.js";
11
- import { useToast as u } from "../../hooks/useToast.js";
6
+ import { ErrorState as o } from "../../components/ErrorState.js";
7
+ import { ToastContainer as s } from "../../components/Toast.js";
8
+ import { Breadcrumbs as c } from "../../components/Breadcrumbs.js";
9
+ import { PageLoader as l } from "../../components/PageLoader.js";
10
+ import { Modal as u } from "../../components/Modal.js";
11
+ import { useToast as d } from "../../hooks/useToast.js";
12
12
  import "../../components/index.js";
13
- import { useHealthyBowlData as d } from "../../hooks/useHealthyBowlData.js";
14
- import { useMemo as f, useState as p } from "react";
15
- import { useI18n as ne } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
16
- import { AlertCircle as re, ArrowLeft as m, CalendarDays as h, ChevronDown as ie, ChevronUp as g, Circle as _, Clock as v, DollarSign as y, Landmark as b, Upload as ae } from "lucide-react";
17
- import { useNavigate as x, useParams as S } from "react-router";
18
- import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
19
- import { Button as E, GlassCard as D } from "@burdenoff/fe-libs/ui";
13
+ import { useHealthyBowlData as f } from "../../hooks/useHealthyBowlData.js";
14
+ import { useSchemeEligibility as p } from "../../hooks/useSchemeEligibility.js";
15
+ import { useMemo as m, useState as h } from "react";
16
+ import { useI18n as te } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
17
+ import { AlertCircle as ne, ArrowLeft as re, CalendarDays as ie, CheckCircle2 as g, ChevronDown as _, ChevronUp as ae, Circle as v, Clock as y, DollarSign as oe, HelpCircle as se, Landmark as b, Upload as x, XCircle as S } from "lucide-react";
18
+ import { useNavigate as C, useParams as w } from "react-router";
19
+ import { Fragment as T, jsx as E, jsxs as D } from "react/jsx-runtime";
20
+ import { Button as O, GlassCard as k } from "@burdenoff/fe-libs/ui";
20
21
  //#region src/healthybowl/pages/government-schemes/SchemeDetailsPage.tsx
21
- var O = (e) => {
22
+ var A = (e) => {
22
23
  switch (e) {
23
24
  case "open": return "success";
24
25
  case "closing_soon": return "warning";
25
26
  case "closed": return "error";
26
27
  default: return "default";
27
28
  }
28
- }, k = (e) => {
29
+ }, j = (e) => {
29
30
  switch (e) {
30
31
  case "subsidy": return "success";
31
32
  case "credit": return "info";
@@ -35,25 +36,25 @@ var O = (e) => {
35
36
  case "equipment": return "muted";
36
37
  default: return "muted";
37
38
  }
38
- }, A = () => {
39
- let { governmentSchemes: A, createSchemeApplication: j, errors: M, loadings: N, refetch: P } = d(), { schemeId: F } = S(), I = x(), { buildPath: L } = n(), { toasts: R, toast: z, dismiss: B } = u(), { t: V } = ne(), H = f(() => [
39
+ }, M = () => {
40
+ let { governmentSchemes: M, createSchemeApplication: N, errors: P, loadings: F, refetch: ce } = f(), { schemeId: I } = w(), { eligibility: L } = p(I), R = C(), { buildPath: z } = n(), { toasts: B, toast: V, dismiss: H } = d(), { t: U } = te(), W = m(() => [
40
41
  {
41
- question: V("healthybowl.governmentSchemes.schemeDetails.faq.reviewTime.question", "How long does the application review process take?"),
42
- 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.")
42
+ question: U("healthybowl.governmentSchemes.schemeDetails.faq.reviewTime.question", "How long does the application review process take?"),
43
+ answer: U("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.")
43
44
  },
44
45
  {
45
- question: V("healthybowl.governmentSchemes.schemeDetails.faq.documents.question", "What documents do I need to submit?"),
46
- 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.")
46
+ question: U("healthybowl.governmentSchemes.schemeDetails.faq.documents.question", "What documents do I need to submit?"),
47
+ answer: U("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.")
47
48
  },
48
49
  {
49
- question: V("healthybowl.governmentSchemes.schemeDetails.faq.pendingCertification.question", "Can I apply if my organic certification is pending?"),
50
- 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.")
50
+ question: U("healthybowl.governmentSchemes.schemeDetails.faq.pendingCertification.question", "Can I apply if my organic certification is pending?"),
51
+ answer: U("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.")
51
52
  },
52
53
  {
53
- question: V("healthybowl.governmentSchemes.schemeDetails.faq.disbursement.question", "How will the benefits be disbursed?"),
54
- 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.")
54
+ question: U("healthybowl.governmentSchemes.schemeDetails.faq.disbursement.question", "How will the benefits be disbursed?"),
55
+ answer: U("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.")
55
56
  }
56
- ], [V]), [U, W] = p(null), [G, K] = p(!1), [q, J] = p(!1), [Y, X] = p({
57
+ ], [U]), [G, le] = h(null), [ue, K] = h(!1), [q, J] = h(!1), [Y, X] = h({
57
58
  applicantName: "",
58
59
  farmName: "",
59
60
  farmSize: "",
@@ -63,186 +64,220 @@ var O = (e) => {
63
64
  hasBankDetails: !1,
64
65
  hasCertification: !1,
65
66
  declaration: !1
66
- }), Z = A.find((e) => e.id === F), Q = f(() => Z ? A.filter((e) => e.id !== Z.id && e.category === Z.category) : [], [A, Z]);
67
- if (!Z) return /* @__PURE__ */ w(r, {
68
- title: V("healthybowl.governmentSchemes.schemeDetails.notFound.title", "Scheme Not Found"),
69
- description: V("healthybowl.governmentSchemes.schemeDetails.notFound.description", "The requested scheme could not be found"),
70
- children: N.government ? /* @__PURE__ */ w(c, {}) : M.government ? /* @__PURE__ */ w(te, { onRetry: P }) : /* @__PURE__ */ w(a, {
71
- icon: /* @__PURE__ */ w(re, { className: "h-12 w-12" }),
72
- title: V("healthybowl.governmentSchemes.schemeDetails.notFound.emptyState.title", "Scheme Not Found"),
73
- description: V("healthybowl.governmentSchemes.schemeDetails.notFound.emptyState.description", "The government scheme you are looking for does not exist or may have been removed."),
74
- action: /* @__PURE__ */ w(E, {
75
- onClick: () => I(L("government-schemes/discover")),
76
- children: V("healthybowl.governmentSchemes.schemeDetails.notFound.browseSchemes", "Browse Schemes")
67
+ }), Z = M.find((e) => e.id === I), Q = m(() => Z ? M.filter((e) => e.id !== Z.id && e.category === Z.category) : [], [M, Z]);
68
+ if (!Z) return /* @__PURE__ */ E(r, {
69
+ title: U("healthybowl.governmentSchemes.schemeDetails.notFound.title", "Scheme Not Found"),
70
+ description: U("healthybowl.governmentSchemes.schemeDetails.notFound.description", "The requested scheme could not be found"),
71
+ children: F.government ? /* @__PURE__ */ E(l, {}) : P.government ? /* @__PURE__ */ E(o, { onRetry: ce }) : /* @__PURE__ */ E(a, {
72
+ icon: /* @__PURE__ */ E(ne, { className: "h-12 w-12" }),
73
+ title: U("healthybowl.governmentSchemes.schemeDetails.notFound.emptyState.title", "Scheme Not Found"),
74
+ description: U("healthybowl.governmentSchemes.schemeDetails.notFound.emptyState.description", "The government scheme you are looking for does not exist or may have been removed."),
75
+ action: /* @__PURE__ */ E(O, {
76
+ onClick: () => R(z("government-schemes/discover")),
77
+ children: U("healthybowl.governmentSchemes.schemeDetails.notFound.browseSchemes", "Browse Schemes")
77
78
  })
78
79
  })
79
80
  });
80
- let oe = Z.eligibility ?? [], $ = (() => {
81
+ let de = Z.eligibility ?? [], $ = (() => {
81
82
  if (!Z.applicationDeadline) return null;
82
83
  let e = Math.ceil((new Date(Z.applicationDeadline).getTime() - Date.now()) / (1e3 * 60 * 60 * 24));
83
84
  return e > 0 ? e : 0;
84
85
  })();
85
- return /* @__PURE__ */ T(r, {
86
+ return /* @__PURE__ */ D(r, {
86
87
  title: Z.title,
87
88
  description: Z.department,
88
- actions: /* @__PURE__ */ T(E, {
89
+ actions: /* @__PURE__ */ D(O, {
89
90
  variant: "ghost",
90
91
  size: "sm",
91
- onClick: () => I(-1),
92
+ onClick: () => R(-1),
92
93
  className: "gap-1 text-text-secondary hover:text-text-primary",
93
94
  children: [
94
- /* @__PURE__ */ w(m, { className: "h-4 w-4" }),
95
+ /* @__PURE__ */ E(re, { className: "h-4 w-4" }),
95
96
  " ",
96
- V("healthybowl.common.back", "Back")
97
+ U("healthybowl.common.back", "Back")
97
98
  ]
98
99
  }),
99
100
  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.",
100
101
  nextSteps: [
101
102
  {
102
103
  id: "apply",
103
- label: V("healthybowl.governmentSchemes.schemeDetails.nextSteps.apply.label", "Apply for this scheme"),
104
- description: V("healthybowl.governmentSchemes.schemeDetails.nextSteps.apply.desc", "Start your application once you’ve checked the eligibility."),
104
+ label: U("healthybowl.governmentSchemes.schemeDetails.nextSteps.apply.label", "Apply for this scheme"),
105
+ description: U("healthybowl.governmentSchemes.schemeDetails.nextSteps.apply.desc", "Start your application once you’ve checked the eligibility."),
105
106
  onClick: () => K(!0)
106
107
  },
107
108
  {
108
109
  id: "track",
109
- label: V("healthybowl.governmentSchemes.schemeDetails.nextSteps.track.label", "Track your applications"),
110
- description: V("healthybowl.governmentSchemes.schemeDetails.nextSteps.track.desc", "Follow the status of schemes you’ve already applied to."),
111
- href: L("government-schemes/applications")
110
+ label: U("healthybowl.governmentSchemes.schemeDetails.nextSteps.track.label", "Track your applications"),
111
+ description: U("healthybowl.governmentSchemes.schemeDetails.nextSteps.track.desc", "Follow the status of schemes you’ve already applied to."),
112
+ href: z("government-schemes/applications")
112
113
  },
113
114
  {
114
115
  id: "discover",
115
- label: V("healthybowl.governmentSchemes.schemeDetails.nextSteps.discover.label", "Find more schemes"),
116
- description: V("healthybowl.governmentSchemes.schemeDetails.nextSteps.discover.desc", "Browse other programs your farm may qualify for."),
117
- href: L("government-schemes/discover")
116
+ label: U("healthybowl.governmentSchemes.schemeDetails.nextSteps.discover.label", "Find more schemes"),
117
+ description: U("healthybowl.governmentSchemes.schemeDetails.nextSteps.discover.desc", "Browse other programs your farm may qualify for."),
118
+ href: z("government-schemes/discover")
118
119
  }
119
120
  ],
120
121
  nextStepsKey: "healthybowl-scheme-detail",
121
122
  children: [
122
- /* @__PURE__ */ w(s, { items: [
123
+ /* @__PURE__ */ E(c, { items: [
123
124
  {
124
- label: V("healthybowl.governmentSchemes.schemeDetails.breadcrumbs.governmentSchemes", "Government Schemes"),
125
- href: L("government-schemes")
125
+ label: U("healthybowl.governmentSchemes.schemeDetails.breadcrumbs.governmentSchemes", "Government Schemes"),
126
+ href: z("government-schemes")
126
127
  },
127
128
  {
128
- label: V("healthybowl.governmentSchemes.schemeDetails.breadcrumbs.schemeDiscovery", "Scheme Discovery"),
129
- href: L("government-schemes/discover")
129
+ label: U("healthybowl.governmentSchemes.schemeDetails.breadcrumbs.schemeDiscovery", "Scheme Discovery"),
130
+ href: z("government-schemes/discover")
130
131
  },
131
132
  { label: Z.title }
132
133
  ] }),
133
- /* @__PURE__ */ T(D, {
134
+ /* @__PURE__ */ D(k, {
134
135
  treatment: "glass",
135
136
  glow: !0,
136
137
  className: "border-border-seam p-6",
137
- children: [/* @__PURE__ */ w("div", {
138
+ children: [/* @__PURE__ */ E("div", {
138
139
  className: "flex items-start justify-between",
139
- children: /* @__PURE__ */ T("div", {
140
+ children: /* @__PURE__ */ D("div", {
140
141
  className: "flex items-center gap-3",
141
- children: [/* @__PURE__ */ w("div", {
142
+ children: [/* @__PURE__ */ E("div", {
142
143
  className: "rounded-md bg-bg-sunken p-2",
143
- children: /* @__PURE__ */ w(b, { className: "h-6 w-6 text-text-secondary" })
144
- }), /* @__PURE__ */ T("div", { children: [
145
- /* @__PURE__ */ w("h2", {
144
+ children: /* @__PURE__ */ E(b, { className: "h-6 w-6 text-text-secondary" })
145
+ }), /* @__PURE__ */ D("div", { children: [
146
+ /* @__PURE__ */ E("h2", {
146
147
  className: "text-lg font-semibold text-text-primary",
147
148
  children: Z.title
148
149
  }),
149
- /* @__PURE__ */ w("p", {
150
+ /* @__PURE__ */ E("p", {
150
151
  className: "text-sm text-text-secondary",
151
152
  children: Z.department
152
153
  }),
153
- /* @__PURE__ */ T("div", {
154
+ /* @__PURE__ */ D("div", {
154
155
  className: "mt-2 flex items-center gap-2",
155
- children: [/* @__PURE__ */ w(i, {
156
+ children: [/* @__PURE__ */ E(i, {
156
157
  label: (Z.status ?? "unknown").replace(/_/g, " "),
157
- variant: O(Z.status ?? "unknown")
158
- }), /* @__PURE__ */ w(i, {
158
+ variant: A(Z.status ?? "unknown")
159
+ }), /* @__PURE__ */ E(i, {
159
160
  label: Z.category,
160
- variant: k(Z.category)
161
+ variant: j(Z.category)
161
162
  })]
162
163
  })
163
164
  ] })]
164
165
  })
165
- }), /* @__PURE__ */ T("div", {
166
+ }), /* @__PURE__ */ D("div", {
166
167
  className: "mt-5 grid gap-3 sm:grid-cols-3",
167
168
  children: [
168
- Z.maxAmount && /* @__PURE__ */ T("div", {
169
+ Z.maxAmount && /* @__PURE__ */ D("div", {
169
170
  className: "rounded-md bg-bg-sunken p-4",
170
- children: [/* @__PURE__ */ T("div", {
171
+ children: [/* @__PURE__ */ D("div", {
171
172
  className: "flex items-center gap-2",
172
- children: [/* @__PURE__ */ w(y, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ w("p", {
173
+ children: [/* @__PURE__ */ E(oe, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ E("p", {
173
174
  className: "text-xs text-text-secondary",
174
- children: V("healthybowl.governmentSchemes.schemeDetails.metrics.maxAmount.label", "Maximum Amount")
175
+ children: U("healthybowl.governmentSchemes.schemeDetails.metrics.maxAmount.label", "Maximum Amount")
175
176
  })]
176
- }), /* @__PURE__ */ w("p", {
177
+ }), /* @__PURE__ */ E("p", {
177
178
  className: "mt-1 text-xl font-bold text-text-primary",
178
179
  children: t(Z.maxAmount, "INR")
179
180
  })]
180
181
  }),
181
- Z.applicationDeadline && /* @__PURE__ */ T("div", {
182
+ Z.applicationDeadline && /* @__PURE__ */ D("div", {
182
183
  className: "rounded-md bg-bg-sunken p-4",
183
- children: [/* @__PURE__ */ T("div", {
184
+ children: [/* @__PURE__ */ D("div", {
184
185
  className: "flex items-center gap-2",
185
- children: [/* @__PURE__ */ w(h, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ w("p", {
186
+ children: [/* @__PURE__ */ E(ie, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ E("p", {
186
187
  className: "text-xs text-text-secondary",
187
- children: V("healthybowl.governmentSchemes.schemeDetails.metrics.deadline.label", "Application Deadline")
188
+ children: U("healthybowl.governmentSchemes.schemeDetails.metrics.deadline.label", "Application Deadline")
188
189
  })]
189
- }), /* @__PURE__ */ w("p", {
190
+ }), /* @__PURE__ */ E("p", {
190
191
  className: "mt-1 text-xl font-bold text-text-primary",
191
192
  children: ee(Z.applicationDeadline)
192
193
  })]
193
194
  }),
194
- $ != null && /* @__PURE__ */ T("div", {
195
+ $ != null && /* @__PURE__ */ D("div", {
195
196
  className: e("rounded-md p-4", $ <= 30 ? "bg-bg-sunken" : "bg-bg-surface"),
196
- children: [/* @__PURE__ */ T("div", {
197
+ children: [/* @__PURE__ */ D("div", {
197
198
  className: "flex items-center gap-2",
198
- children: [/* @__PURE__ */ w(v, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ w("p", {
199
+ children: [/* @__PURE__ */ E(y, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ E("p", {
199
200
  className: "text-xs text-text-secondary",
200
- children: V("healthybowl.governmentSchemes.schemeDetails.metrics.daysRemaining.label", "Days Remaining")
201
+ children: U("healthybowl.governmentSchemes.schemeDetails.metrics.daysRemaining.label", "Days Remaining")
201
202
  })]
202
- }), /* @__PURE__ */ w("p", {
203
+ }), /* @__PURE__ */ E("p", {
203
204
  className: "mt-1 text-xl font-bold text-text-primary",
204
- children: $ === 1 ? V("healthybowl.governmentSchemes.schemeDetails.metrics.daysRemaining.valueOne", "{{count}} day", { count: $ }) : V("healthybowl.governmentSchemes.schemeDetails.metrics.daysRemaining.valueOther", "{{count}} days", { count: $ })
205
+ children: $ === 1 ? U("healthybowl.governmentSchemes.schemeDetails.metrics.daysRemaining.valueOne", "{{count}} day", { count: $ }) : U("healthybowl.governmentSchemes.schemeDetails.metrics.daysRemaining.valueOther", "{{count}} days", { count: $ })
205
206
  })]
206
207
  })
207
208
  ]
208
209
  })]
209
210
  }),
210
- /* @__PURE__ */ T("div", {
211
+ /* @__PURE__ */ D("div", {
211
212
  className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
212
- children: [/* @__PURE__ */ w("h3", {
213
+ children: [/* @__PURE__ */ E("h3", {
213
214
  className: "text-sm font-semibold text-text-primary",
214
- children: V("healthybowl.governmentSchemes.schemeDetails.sections.description.title", "Description")
215
- }), /* @__PURE__ */ w("p", {
215
+ children: U("healthybowl.governmentSchemes.schemeDetails.sections.description.title", "Description")
216
+ }), /* @__PURE__ */ E("p", {
216
217
  className: "mt-2 text-sm leading-relaxed text-text-secondary",
217
218
  children: Z.description
218
219
  })]
219
220
  }),
220
- /* @__PURE__ */ T("div", {
221
+ /* @__PURE__ */ D("div", {
221
222
  className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
222
- children: [/* @__PURE__ */ w("h3", {
223
+ children: [/* @__PURE__ */ E("h3", {
223
224
  className: "text-sm font-semibold text-text-primary",
224
- children: V("healthybowl.governmentSchemes.schemeDetails.sections.benefits.title", "Benefits")
225
- }), /* @__PURE__ */ w("p", {
225
+ children: U("healthybowl.governmentSchemes.schemeDetails.sections.benefits.title", "Benefits")
226
+ }), /* @__PURE__ */ E("p", {
226
227
  className: "mt-2 text-sm leading-relaxed text-text-secondary",
227
228
  children: Z.benefits
228
229
  })]
229
230
  }),
230
- /* @__PURE__ */ T("div", {
231
+ /* @__PURE__ */ D("div", {
231
232
  className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
232
233
  children: [
233
- /* @__PURE__ */ w("h3", {
234
+ /* @__PURE__ */ E("h3", {
234
235
  className: "text-sm font-semibold text-text-primary",
235
- children: V("healthybowl.governmentSchemes.schemeDetails.sections.eligibility.requirementsTitle", "Eligibility Requirements")
236
+ children: U("healthybowl.governmentSchemes.schemeDetails.sections.eligibility.requirementsTitle", "Eligibility Requirements")
236
237
  }),
237
- /* @__PURE__ */ w("p", {
238
+ /* @__PURE__ */ E("p", {
238
239
  className: "mt-1 text-xs text-text-secondary",
239
- children: V("healthybowl.governmentSchemes.schemeDetails.sections.eligibility.requirementsHelper", "Review each requirement and confirm you qualify before applying.")
240
+ children: U("healthybowl.governmentSchemes.schemeDetails.sections.eligibility.requirementsHelper", "Review each requirement and confirm you qualify before applying.")
240
241
  }),
241
- /* @__PURE__ */ w("div", {
242
+ L && L.criteria.length > 0 && /* @__PURE__ */ D("div", {
243
+ 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"}`,
244
+ children: [/* @__PURE__ */ E("p", {
245
+ className: "text-sm font-medium text-text-primary",
246
+ children: L.summary
247
+ }), /* @__PURE__ */ E("p", {
248
+ className: "mt-1 text-xs text-text-secondary",
249
+ children: U("healthybowl.governmentSchemes.schemeDetails.sections.eligibility.checkedAgainstFarm", "Checked against your farm records. Always confirm against the scheme’s own wording before applying.")
250
+ })]
251
+ }),
252
+ /* @__PURE__ */ E("div", {
242
253
  className: "mt-4 space-y-3",
243
- children: oe.map((e) => /* @__PURE__ */ T("div", {
254
+ children: L && L.criteria.length > 0 ? L.criteria.map((e) => /* @__PURE__ */ D("div", {
255
+ className: "flex items-start gap-3 rounded-md border border-border-subtle bg-bg-sunken/50 p-3",
256
+ children: [e.verdict === "MET" ? /* @__PURE__ */ E(g, {
257
+ role: "img",
258
+ "aria-label": U("healthybowl.governmentSchemes.schemeDetails.eligibility.verdict.met", "Met"),
259
+ className: "mt-0.5 h-4 w-4 shrink-0 text-success"
260
+ }) : e.verdict === "UNMET" ? /* @__PURE__ */ E(S, {
261
+ role: "img",
262
+ "aria-label": U("healthybowl.governmentSchemes.schemeDetails.eligibility.verdict.unmet", "Not met"),
263
+ className: "mt-0.5 h-4 w-4 shrink-0 text-status-error-bg"
264
+ }) : /* @__PURE__ */ E(se, {
265
+ role: "img",
266
+ "aria-label": U("healthybowl.governmentSchemes.schemeDetails.eligibility.verdict.unknown", "Needs checking"),
267
+ className: "mt-0.5 h-4 w-4 shrink-0 text-text-secondary"
268
+ }), /* @__PURE__ */ D("div", {
269
+ className: "min-w-0",
270
+ children: [/* @__PURE__ */ E("span", {
271
+ className: "text-sm text-text-primary",
272
+ children: e.label
273
+ }), e.reason ? /* @__PURE__ */ E("span", {
274
+ className: "mt-0.5 block text-xs text-text-secondary",
275
+ children: e.reason
276
+ }) : null]
277
+ })]
278
+ }, e.id)) : de.map((e) => /* @__PURE__ */ D("div", {
244
279
  className: "flex items-center gap-3 rounded-md border border-border-subtle bg-bg-sunken/50 p-3",
245
- children: [/* @__PURE__ */ w(_, { className: "h-4 w-4 shrink-0 text-text-secondary" }), /* @__PURE__ */ w("span", {
280
+ children: [/* @__PURE__ */ E(v, { className: "h-4 w-4 shrink-0 text-text-secondary" }), /* @__PURE__ */ E("span", {
246
281
  className: "text-sm text-text-primary",
247
282
  children: e
248
283
  })]
@@ -250,14 +285,14 @@ var O = (e) => {
250
285
  })
251
286
  ]
252
287
  }),
253
- /* @__PURE__ */ T("div", {
288
+ /* @__PURE__ */ D("div", {
254
289
  className: "flex gap-3",
255
- children: [/* @__PURE__ */ w(E, {
290
+ children: [/* @__PURE__ */ E(O, {
256
291
  onClick: () => {
257
292
  if (Z.status === "closed") {
258
- z({
259
- title: V("healthybowl.governmentSchemes.schemeDetails.toast.schemeClosed.title", "Scheme Closed"),
260
- description: V("healthybowl.governmentSchemes.schemeDetails.toast.schemeClosed.message", "This scheme is no longer accepting applications."),
293
+ V({
294
+ title: U("healthybowl.governmentSchemes.schemeDetails.toast.schemeClosed.title", "Scheme Closed"),
295
+ description: U("healthybowl.governmentSchemes.schemeDetails.toast.schemeClosed.message", "This scheme is no longer accepting applications."),
261
296
  variant: "error"
262
297
  });
263
298
  return;
@@ -265,96 +300,96 @@ var O = (e) => {
265
300
  K(!0);
266
301
  },
267
302
  disabled: Z.status === "closed",
268
- children: V("healthybowl.governmentSchemes.schemeDetails.actions.apply", "Apply for This Scheme")
269
- }), /* @__PURE__ */ w(E, {
303
+ children: U("healthybowl.governmentSchemes.schemeDetails.actions.apply", "Apply for This Scheme")
304
+ }), /* @__PURE__ */ E(O, {
270
305
  variant: "outline",
271
- onClick: () => I(L("government-schemes/discover")),
272
- children: V("healthybowl.governmentSchemes.schemeDetails.actions.backToSchemes", "Back to Schemes")
306
+ onClick: () => R(z("government-schemes/discover")),
307
+ children: U("healthybowl.governmentSchemes.schemeDetails.actions.backToSchemes", "Back to Schemes")
273
308
  })]
274
309
  }),
275
- /* @__PURE__ */ T("div", {
310
+ /* @__PURE__ */ D("div", {
276
311
  className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
277
- children: [/* @__PURE__ */ w("h3", {
312
+ children: [/* @__PURE__ */ E("h3", {
278
313
  className: "text-sm font-semibold text-text-primary",
279
- children: V("healthybowl.governmentSchemes.schemeDetails.faq.title", "Frequently Asked Questions")
280
- }), /* @__PURE__ */ w("div", {
314
+ children: U("healthybowl.governmentSchemes.schemeDetails.faq.title", "Frequently Asked Questions")
315
+ }), /* @__PURE__ */ E("div", {
281
316
  className: "mt-4 space-y-2",
282
- children: H.map((e, t) => /* @__PURE__ */ T("div", {
317
+ children: W.map((e, t) => /* @__PURE__ */ D("div", {
283
318
  className: "rounded-md border border-border-subtle",
284
- children: [/* @__PURE__ */ T(E, {
319
+ children: [/* @__PURE__ */ D(O, {
285
320
  variant: "ghost",
286
- onClick: () => W(U === t ? null : t),
321
+ onClick: () => le(G === t ? null : t),
287
322
  className: "h-auto w-full justify-between whitespace-normal px-4 py-3 text-left font-medium text-text-primary",
288
- children: [e.question, w(U === t ? g : ie, { className: "h-4 w-4 shrink-0 text-text-secondary" })]
289
- }), U === t && /* @__PURE__ */ w("div", {
323
+ children: [e.question, E(G === t ? ae : _, { className: "h-4 w-4 shrink-0 text-text-secondary" })]
324
+ }), G === t && /* @__PURE__ */ E("div", {
290
325
  className: "border-t border-border-subtle px-4 py-3 text-sm leading-relaxed text-text-secondary",
291
326
  children: e.answer
292
327
  })]
293
328
  }, t))
294
329
  })]
295
330
  }),
296
- Q.length > 0 && /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("h3", {
331
+ Q.length > 0 && /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("h3", {
297
332
  className: "mb-3 text-sm font-semibold text-text-primary",
298
- children: V("healthybowl.governmentSchemes.schemeDetails.related.title", "Related Schemes ({{category}})", { category: Z.category })
299
- }), /* @__PURE__ */ w("div", {
333
+ children: U("healthybowl.governmentSchemes.schemeDetails.related.title", "Related Schemes ({{category}})", { category: Z.category })
334
+ }), /* @__PURE__ */ E("div", {
300
335
  className: "grid gap-4 sm:grid-cols-2",
301
- children: Q.map((e) => /* @__PURE__ */ T("button", {
336
+ children: Q.map((e) => /* @__PURE__ */ D("button", {
302
337
  type: "button",
303
- onClick: () => I(L(`government-schemes/schemes/${e.id}`)),
338
+ onClick: () => R(z(`government-schemes/schemes/${e.id}`)),
304
339
  className: "flex items-start gap-3 rounded-lg border border-border-subtle bg-bg-surface p-4 text-left transition-colors hover:bg-bg-sunken/50",
305
- children: [/* @__PURE__ */ w(b, { className: "mt-0.5 h-5 w-5 shrink-0 text-text-secondary" }), /* @__PURE__ */ T("div", {
340
+ children: [/* @__PURE__ */ E(b, { className: "mt-0.5 h-5 w-5 shrink-0 text-text-secondary" }), /* @__PURE__ */ D("div", {
306
341
  className: "flex-1",
307
342
  children: [
308
- /* @__PURE__ */ w("p", {
343
+ /* @__PURE__ */ E("p", {
309
344
  className: "text-sm font-medium text-text-primary",
310
345
  children: e.title
311
346
  }),
312
- /* @__PURE__ */ w("p", {
347
+ /* @__PURE__ */ E("p", {
313
348
  className: "mt-0.5 text-xs text-text-secondary",
314
349
  children: e.department
315
350
  }),
316
- /* @__PURE__ */ T("div", {
351
+ /* @__PURE__ */ D("div", {
317
352
  className: "mt-2 flex items-center gap-2",
318
- children: [/* @__PURE__ */ w(i, {
353
+ children: [/* @__PURE__ */ E(i, {
319
354
  label: (e.status ?? "unknown").replace(/_/g, " "),
320
- variant: O(e.status ?? "unknown")
321
- }), e.maxAmount && /* @__PURE__ */ w("span", {
355
+ variant: A(e.status ?? "unknown")
356
+ }), e.maxAmount && /* @__PURE__ */ E("span", {
322
357
  className: "text-xs text-text-secondary",
323
- children: V("healthybowl.governmentSchemes.schemeDetails.related.upTo", "Up to {{amount}}", { amount: t(e.maxAmount, "INR") })
358
+ children: U("healthybowl.governmentSchemes.schemeDetails.related.upTo", "Up to {{amount}}", { amount: t(e.maxAmount, "INR") })
324
359
  })]
325
360
  })
326
361
  ]
327
362
  })]
328
363
  }, e.id))
329
364
  })] }),
330
- /* @__PURE__ */ w(l, {
331
- open: G,
365
+ /* @__PURE__ */ E(u, {
366
+ open: ue,
332
367
  onClose: () => {
333
368
  q || K(!1);
334
369
  },
335
- title: V("healthybowl.governmentSchemes.schemeDetails.modal.title", "Apply for Scheme"),
370
+ title: U("healthybowl.governmentSchemes.schemeDetails.modal.title", "Apply for Scheme"),
336
371
  description: Z.title,
337
372
  size: "lg",
338
- footer: /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(E, {
373
+ footer: /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ E(O, {
339
374
  variant: "outline",
340
375
  onClick: () => K(!1),
341
376
  disabled: q,
342
- children: V("healthybowl.common.cancel", "Cancel")
343
- }), /* @__PURE__ */ w(E, {
377
+ children: U("healthybowl.common.cancel", "Cancel")
378
+ }), /* @__PURE__ */ E(O, {
344
379
  onClick: async () => {
345
380
  if (!q) {
346
381
  if (!Y.applicantName.trim() || !Y.farmName.trim()) {
347
- z({
348
- title: V("healthybowl.governmentSchemes.schemeDetails.toast.requiredFields.title", "Required Fields Missing"),
349
- description: V("healthybowl.governmentSchemes.schemeDetails.toast.requiredFields.message", "Please fill in all required fields."),
382
+ V({
383
+ title: U("healthybowl.governmentSchemes.schemeDetails.toast.requiredFields.title", "Required Fields Missing"),
384
+ description: U("healthybowl.governmentSchemes.schemeDetails.toast.requiredFields.message", "Please fill in all required fields."),
350
385
  variant: "error"
351
386
  });
352
387
  return;
353
388
  }
354
389
  if (!Y.declaration) {
355
- z({
356
- title: V("healthybowl.governmentSchemes.schemeDetails.toast.declarationRequired.title", "Declaration Required"),
357
- description: V("healthybowl.governmentSchemes.schemeDetails.toast.declarationRequired.message", "Please accept the declaration to proceed."),
390
+ V({
391
+ title: U("healthybowl.governmentSchemes.schemeDetails.toast.declarationRequired.title", "Declaration Required"),
392
+ description: U("healthybowl.governmentSchemes.schemeDetails.toast.declarationRequired.message", "Please accept the declaration to proceed."),
358
393
  variant: "error"
359
394
  });
360
395
  return;
@@ -367,14 +402,14 @@ var O = (e) => {
367
402
  Y.hasBankDetails && "bank details",
368
403
  Y.hasCertification && "certification"
369
404
  ].filter(Boolean).join(", ") || "none", t = [Y.farmSize.trim(), Y.farmLocation.trim()].filter(Boolean).join(", ");
370
- await j({
405
+ await N({
371
406
  schemeId: Z.id,
372
407
  schemeName: Z.title,
373
408
  status: "submitted",
374
409
  notes: `Applicant: ${Y.applicantName}; Farm: ${Y.farmName}${t ? ` (${t})` : ""}; Documents ready: ${e}`
375
- }), z({
376
- title: V("healthybowl.governmentSchemes.schemeDetails.toast.submitted.title", "Application Submitted"),
377
- description: V("healthybowl.governmentSchemes.schemeDetails.toast.submitted.message", "Your application for {{schemeTitle}} has been submitted successfully.", { schemeTitle: Z.title }),
410
+ }), V({
411
+ title: U("healthybowl.governmentSchemes.schemeDetails.toast.submitted.title", "Application Submitted"),
412
+ description: U("healthybowl.governmentSchemes.schemeDetails.toast.submitted.message", "Your application for {{schemeTitle}} has been submitted successfully.", { schemeTitle: Z.title }),
378
413
  variant: "success"
379
414
  }), K(!1), X({
380
415
  applicantName: "",
@@ -388,9 +423,9 @@ var O = (e) => {
388
423
  declaration: !1
389
424
  });
390
425
  } catch (e) {
391
- console.error("Scheme application submission failed", e), z({
392
- title: V("healthybowl.governmentSchemes.schemeDetails.toast.submitFailed.title", "Submission failed"),
393
- description: V("healthybowl.governmentSchemes.schemeDetails.toast.submitFailed.message", "Something went wrong while submitting your application. Please try again or contact support."),
426
+ console.error("Scheme application submission failed", e), V({
427
+ title: U("healthybowl.governmentSchemes.schemeDetails.toast.submitFailed.title", "Submission failed"),
428
+ description: U("healthybowl.governmentSchemes.schemeDetails.toast.submitFailed.message", "Something went wrong while submitting your application. Please try again or contact support."),
394
429
  variant: "error"
395
430
  });
396
431
  } finally {
@@ -399,111 +434,111 @@ var O = (e) => {
399
434
  }
400
435
  },
401
436
  disabled: q,
402
- children: q ? V("healthybowl.governmentSchemes.schemeDetails.modal.submitting", "Submitting...") : V("healthybowl.governmentSchemes.schemeDetails.modal.submit", "Submit Application")
437
+ children: q ? U("healthybowl.governmentSchemes.schemeDetails.modal.submitting", "Submitting...") : U("healthybowl.governmentSchemes.schemeDetails.modal.submit", "Submit Application")
403
438
  })] }),
404
- children: /* @__PURE__ */ T("div", {
439
+ children: /* @__PURE__ */ D("div", {
405
440
  className: "space-y-4",
406
441
  children: [
407
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("h4", {
442
+ /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("h4", {
408
443
  className: "text-sm font-medium text-text-primary",
409
- children: V("healthybowl.governmentSchemes.schemeDetails.form.applicant.title", "Applicant Details")
410
- }), /* @__PURE__ */ w("div", {
444
+ children: U("healthybowl.governmentSchemes.schemeDetails.form.applicant.title", "Applicant Details")
445
+ }), /* @__PURE__ */ E("div", {
411
446
  className: "mt-2 space-y-3",
412
- children: /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
447
+ children: /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("label", {
413
448
  className: "block text-xs font-medium text-text-secondary",
414
- children: V("healthybowl.governmentSchemes.schemeDetails.form.fields.fullName.label", "Full Name *")
415
- }), /* @__PURE__ */ w("input", {
449
+ children: U("healthybowl.governmentSchemes.schemeDetails.form.fields.fullName.label", "Full Name *")
450
+ }), /* @__PURE__ */ E("input", {
416
451
  type: "text",
417
452
  value: Y.applicantName,
418
453
  onChange: (e) => X({
419
454
  ...Y,
420
455
  applicantName: e.target.value
421
456
  }),
422
- placeholder: V("healthybowl.governmentSchemes.schemeDetails.form.fields.fullName.placeholder", "Enter your full name"),
457
+ placeholder: U("healthybowl.governmentSchemes.schemeDetails.form.fields.fullName.placeholder", "Enter your full name"),
423
458
  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"
424
459
  })] })
425
460
  })] }),
426
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("h4", {
461
+ /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("h4", {
427
462
  className: "text-sm font-medium text-text-primary",
428
- children: V("healthybowl.governmentSchemes.schemeDetails.form.farm.title", "Farm Details")
429
- }), /* @__PURE__ */ T("div", {
463
+ children: U("healthybowl.governmentSchemes.schemeDetails.form.farm.title", "Farm Details")
464
+ }), /* @__PURE__ */ D("div", {
430
465
  className: "mt-2 grid gap-3 sm:grid-cols-2",
431
466
  children: [
432
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
467
+ /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("label", {
433
468
  className: "block text-xs font-medium text-text-secondary",
434
- children: V("healthybowl.governmentSchemes.schemeDetails.form.fields.farmName.label", "Farm Name *")
435
- }), /* @__PURE__ */ w("input", {
469
+ children: U("healthybowl.governmentSchemes.schemeDetails.form.fields.farmName.label", "Farm Name *")
470
+ }), /* @__PURE__ */ E("input", {
436
471
  type: "text",
437
472
  value: Y.farmName,
438
473
  onChange: (e) => X({
439
474
  ...Y,
440
475
  farmName: e.target.value
441
476
  }),
442
- placeholder: V("healthybowl.governmentSchemes.schemeDetails.form.fields.farmName.placeholder", "Your farm name"),
477
+ placeholder: U("healthybowl.governmentSchemes.schemeDetails.form.fields.farmName.placeholder", "Your farm name"),
443
478
  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"
444
479
  })] }),
445
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
480
+ /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("label", {
446
481
  className: "block text-xs font-medium text-text-secondary",
447
- children: V("healthybowl.governmentSchemes.schemeDetails.form.fields.farmSize.label", "Farm Size (acres)")
448
- }), /* @__PURE__ */ w("input", {
482
+ children: U("healthybowl.governmentSchemes.schemeDetails.form.fields.farmSize.label", "Farm Size (acres)")
483
+ }), /* @__PURE__ */ E("input", {
449
484
  type: "text",
450
485
  value: Y.farmSize,
451
486
  onChange: (e) => X({
452
487
  ...Y,
453
488
  farmSize: e.target.value
454
489
  }),
455
- placeholder: V("healthybowl.governmentSchemes.schemeDetails.form.fields.farmSize.placeholder", "e.g., 50"),
490
+ placeholder: U("healthybowl.governmentSchemes.schemeDetails.form.fields.farmSize.placeholder", "e.g., 50"),
456
491
  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"
457
492
  })] }),
458
- /* @__PURE__ */ T("div", {
493
+ /* @__PURE__ */ D("div", {
459
494
  className: "sm:col-span-2",
460
- children: [/* @__PURE__ */ w("label", {
495
+ children: [/* @__PURE__ */ E("label", {
461
496
  className: "block text-xs font-medium text-text-secondary",
462
- children: V("healthybowl.governmentSchemes.schemeDetails.form.fields.farmLocation.label", "Farm Location")
463
- }), /* @__PURE__ */ w("input", {
497
+ children: U("healthybowl.governmentSchemes.schemeDetails.form.fields.farmLocation.label", "Farm Location")
498
+ }), /* @__PURE__ */ E("input", {
464
499
  type: "text",
465
500
  value: Y.farmLocation,
466
501
  onChange: (e) => X({
467
502
  ...Y,
468
503
  farmLocation: e.target.value
469
504
  }),
470
- placeholder: V("healthybowl.governmentSchemes.schemeDetails.form.fields.farmLocation.placeholder", "County, State"),
505
+ placeholder: U("healthybowl.governmentSchemes.schemeDetails.form.fields.farmLocation.placeholder", "County, State"),
471
506
  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"
472
507
  })]
473
508
  })
474
509
  ]
475
510
  })] }),
476
- /* @__PURE__ */ T("div", { children: [
477
- /* @__PURE__ */ w("h4", {
511
+ /* @__PURE__ */ D("div", { children: [
512
+ /* @__PURE__ */ E("h4", {
478
513
  className: "text-sm font-medium text-text-primary",
479
- children: V("healthybowl.governmentSchemes.schemeDetails.form.documents.title", "Documents Checklist")
514
+ children: U("healthybowl.governmentSchemes.schemeDetails.form.documents.title", "Documents Checklist")
480
515
  }),
481
- /* @__PURE__ */ w("p", {
516
+ /* @__PURE__ */ E("p", {
482
517
  className: "mt-0.5 text-xs text-text-secondary",
483
- children: V("healthybowl.governmentSchemes.schemeDetails.form.documents.helper", "Confirm you have the following documents ready for upload")
518
+ children: U("healthybowl.governmentSchemes.schemeDetails.form.documents.helper", "Confirm you have the following documents ready for upload")
484
519
  }),
485
- /* @__PURE__ */ w("div", {
520
+ /* @__PURE__ */ E("div", {
486
521
  className: "mt-2 space-y-2",
487
522
  children: [
488
523
  {
489
524
  key: "hasOwnershipProof",
490
- label: V("healthybowl.governmentSchemes.schemeDetails.form.documents.ownershipProof", "Farm Ownership / Lease Proof")
525
+ label: U("healthybowl.governmentSchemes.schemeDetails.form.documents.ownershipProof", "Farm Ownership / Lease Proof")
491
526
  },
492
527
  {
493
528
  key: "hasIdDocument",
494
- label: V("healthybowl.governmentSchemes.schemeDetails.form.documents.idDocument", "Government-issued ID")
529
+ label: U("healthybowl.governmentSchemes.schemeDetails.form.documents.idDocument", "Government-issued ID")
495
530
  },
496
531
  {
497
532
  key: "hasBankDetails",
498
- label: V("healthybowl.governmentSchemes.schemeDetails.form.documents.bankDetails", "Bank Account Details")
533
+ label: U("healthybowl.governmentSchemes.schemeDetails.form.documents.bankDetails", "Bank Account Details")
499
534
  },
500
535
  {
501
536
  key: "hasCertification",
502
- label: V("healthybowl.governmentSchemes.schemeDetails.form.documents.certification", "Organic Certification (if applicable)")
537
+ label: U("healthybowl.governmentSchemes.schemeDetails.form.documents.certification", "Organic Certification (if applicable)")
503
538
  }
504
- ].map((e) => /* @__PURE__ */ T("label", {
539
+ ].map((e) => /* @__PURE__ */ D("label", {
505
540
  className: "flex items-center gap-3 rounded-md border border-border-subtle p-3 transition-colors hover:bg-bg-sunken/50",
506
- children: [/* @__PURE__ */ w("input", {
541
+ children: [/* @__PURE__ */ E("input", {
507
542
  type: "checkbox",
508
543
  checked: Y[e.key],
509
544
  onChange: (t) => X({
@@ -511,9 +546,9 @@ var O = (e) => {
511
546
  [e.key]: t.target.checked
512
547
  }),
513
548
  className: "h-4 w-4 rounded border-border-subtle"
514
- }), /* @__PURE__ */ T("div", {
549
+ }), /* @__PURE__ */ D("div", {
515
550
  className: "flex items-center gap-2",
516
- children: [/* @__PURE__ */ w(ae, { className: "h-3.5 w-3.5 text-text-secondary" }), /* @__PURE__ */ w("span", {
551
+ children: [/* @__PURE__ */ E(x, { className: "h-3.5 w-3.5 text-text-secondary" }), /* @__PURE__ */ E("span", {
517
552
  className: "text-sm text-text-primary",
518
553
  children: e.label
519
554
  })]
@@ -521,11 +556,11 @@ var O = (e) => {
521
556
  }, e.key))
522
557
  })
523
558
  ] }),
524
- /* @__PURE__ */ w("div", {
559
+ /* @__PURE__ */ E("div", {
525
560
  className: "rounded-md border border-border-subtle bg-bg-sunken/50 p-4",
526
- children: /* @__PURE__ */ T("label", {
561
+ children: /* @__PURE__ */ D("label", {
527
562
  className: "flex items-start gap-3",
528
- children: [/* @__PURE__ */ w("input", {
563
+ children: [/* @__PURE__ */ E("input", {
529
564
  type: "checkbox",
530
565
  checked: Y.declaration,
531
566
  onChange: (e) => X({
@@ -533,23 +568,23 @@ var O = (e) => {
533
568
  declaration: e.target.checked
534
569
  }),
535
570
  className: "mt-0.5 h-4 w-4 rounded border-border-subtle"
536
- }), /* @__PURE__ */ w("span", {
571
+ }), /* @__PURE__ */ E("span", {
537
572
  className: "text-xs text-text-secondary",
538
- 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.")
573
+ children: U("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.")
539
574
  })]
540
575
  })
541
576
  })
542
577
  ]
543
578
  })
544
579
  }),
545
- /* @__PURE__ */ w(o, {
546
- toasts: R,
547
- onDismiss: B
580
+ /* @__PURE__ */ E(s, {
581
+ toasts: B,
582
+ onDismiss: H
548
583
  })
549
584
  ]
550
585
  });
551
586
  };
552
587
  //#endregion
553
- export { A as SchemeDetailsPage };
588
+ export { M as SchemeDetailsPage };
554
589
 
555
590
  //# sourceMappingURL=SchemeDetailsPage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SchemeDetailsPage.js","names":[],"sources":["../../../../src/healthybowl/pages/government-schemes/SchemeDetailsPage.tsx"],"sourcesContent":["import { useState, useMemo } from 'react';\nimport { useParams, useNavigate } from 'react-router';\nimport {\n Landmark,\n Circle,\n ArrowLeft,\n CalendarDays,\n DollarSign,\n Clock,\n ChevronDown,\n ChevronUp,\n Upload,\n AlertCircle,\n} from 'lucide-react';\nimport { PageLayout, StatusBadge, Breadcrumbs, EmptyState, ErrorState, PageLoader, Modal } from '../../components';\nimport { ToastContainer } from '../../components/Toast';\nimport { GlassCard, Button } from '@burdenoff/fe-libs/ui';\nimport { useToast } from '../../hooks/useToast';\nimport { useBasePath } from '../../hooks/useBasePath';\nimport { useHealthyBowlData } from '../../hooks/useHealthyBowlData';\nimport { formatCurrency, HB_DEFAULT_CURRENCY, formatDate, cn } from '../../utils/helpers';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\n\nconst statusVariant = (s: string) => {\n switch (s) {\n case 'open':\n return 'success' as const;\n case 'closing_soon':\n return 'warning' as const;\n case 'closed':\n return 'error' as const;\n default:\n return 'default' as const;\n }\n};\n\nconst categoryVariant = (c: string) => {\n switch (c) {\n case 'subsidy':\n return 'success' as const;\n case 'credit':\n return 'info' as const;\n case 'insurance':\n return 'warning' as const;\n case 'training':\n return 'default' as const;\n case 'grant':\n return 'success' as const;\n case 'equipment':\n return 'muted' as const;\n default:\n return 'muted' as const;\n }\n};\n\ninterface FaqItem {\n question: string;\n answer: string;\n}\n\nexport const SchemeDetailsPage = () => {\n const { governmentSchemes, createSchemeApplication, errors, loadings, refetch } = useHealthyBowlData();\n\n const { schemeId } = useParams<{ schemeId: string }>();\n const navigate = useNavigate();\n const { buildPath } = useBasePath();\n const { toasts, toast, dismiss } = useToast();\n const { t } = useI18n();\n\n const schemeFaqs: FaqItem[] = useMemo(\n () => [\n {\n question: t(\n 'healthybowl.governmentSchemes.schemeDetails.faq.reviewTime.question',\n 'How long does the application review process take?'\n ),\n answer: t(\n 'healthybowl.governmentSchemes.schemeDetails.faq.reviewTime.answer',\n 'Typically, applications are reviewed within 2-4 weeks of submission. You will receive status updates via email and on the Application Tracking page.'\n ),\n },\n {\n question: t(\n 'healthybowl.governmentSchemes.schemeDetails.faq.documents.question',\n 'What documents do I need to submit?'\n ),\n answer: t(\n 'healthybowl.governmentSchemes.schemeDetails.faq.documents.answer',\n '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.'\n ),\n },\n {\n question: t(\n 'healthybowl.governmentSchemes.schemeDetails.faq.pendingCertification.question',\n 'Can I apply if my organic certification is pending?'\n ),\n answer: t(\n 'healthybowl.governmentSchemes.schemeDetails.faq.pendingCertification.answer',\n 'For schemes requiring organic certification, you may apply during the transition period. Provide your transition plan and any in-process certification documentation.'\n ),\n },\n {\n question: t(\n 'healthybowl.governmentSchemes.schemeDetails.faq.disbursement.question',\n 'How will the benefits be disbursed?'\n ),\n answer: t(\n 'healthybowl.governmentSchemes.schemeDetails.faq.disbursement.answer',\n '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.'\n ),\n },\n ],\n [t]\n );\n const [expandedFaq, setExpandedFaq] = useState<number | null>(null);\n const [showApplyModal, setShowApplyModal] = useState(false);\n const [submitting, setSubmitting] = useState(false);\n const [applicationForm, setApplicationForm] = useState({\n applicantName: '',\n farmName: '',\n farmSize: '',\n farmLocation: '',\n hasOwnershipProof: false,\n hasIdDocument: false,\n hasBankDetails: false,\n hasCertification: false,\n declaration: false,\n });\n\n const scheme = governmentSchemes.find((s) => s.id === schemeId);\n\n const relatedSchemes = useMemo(() => {\n if (!scheme) return [];\n return governmentSchemes.filter((s) => s.id !== scheme.id && s.category === scheme.category);\n }, [governmentSchemes, scheme]);\n\n if (!scheme) {\n return (\n <PageLayout\n title={t('healthybowl.governmentSchemes.schemeDetails.notFound.title', 'Scheme Not Found')}\n description={t(\n 'healthybowl.governmentSchemes.schemeDetails.notFound.description',\n 'The requested scheme could not be found'\n )}\n >\n {loadings.government ? (\n <PageLoader />\n ) : errors.government ? (\n <ErrorState onRetry={refetch} />\n ) : (\n <EmptyState\n icon={<AlertCircle className=\"h-12 w-12\" />}\n title={t('healthybowl.governmentSchemes.schemeDetails.notFound.emptyState.title', 'Scheme Not Found')}\n description={t(\n 'healthybowl.governmentSchemes.schemeDetails.notFound.emptyState.description',\n 'The government scheme you are looking for does not exist or may have been removed.'\n )}\n action={\n <Button onClick={() => navigate(buildPath('government-schemes/discover'))}>\n {t('healthybowl.governmentSchemes.schemeDetails.notFound.browseSchemes', 'Browse Schemes')}\n </Button>\n }\n />\n )}\n </PageLayout>\n );\n }\n\n // No structured eligibility engine yet, so present each criterion as a requirement to\n // self-verify rather than fabricating a met/unmet state. The previous `met: i < 2`\n // marked the first two criteria \"met\" positionally regardless of the farmer's actual\n // data — a misleading fake, now removed.\n const eligibilityRequirements = scheme.eligibility ?? [];\n\n const getDaysRemaining = () => {\n if (!scheme.applicationDeadline) return null;\n const diff = Math.ceil((new Date(scheme.applicationDeadline).getTime() - Date.now()) / (1000 * 60 * 60 * 24));\n return diff > 0 ? diff : 0;\n };\n\n const daysRemaining = getDaysRemaining();\n\n const handleSubmitApplication = async () => {\n if (submitting) return; // guard against a fast double-click firing before the button disables\n if (!applicationForm.applicantName.trim() || !applicationForm.farmName.trim()) {\n toast({\n title: t('healthybowl.governmentSchemes.schemeDetails.toast.requiredFields.title', 'Required Fields Missing'),\n description: t(\n 'healthybowl.governmentSchemes.schemeDetails.toast.requiredFields.message',\n 'Please fill in all required fields.'\n ),\n variant: 'error',\n });\n return;\n }\n if (!applicationForm.declaration) {\n toast({\n title: t('healthybowl.governmentSchemes.schemeDetails.toast.declarationRequired.title', 'Declaration Required'),\n description: t(\n 'healthybowl.governmentSchemes.schemeDetails.toast.declarationRequired.message',\n 'Please accept the declaration to proceed.'\n ),\n variant: 'error',\n });\n return;\n }\n setSubmitting(true);\n try {\n const docsReady =\n [\n applicationForm.hasOwnershipProof && 'ownership proof',\n applicationForm.hasIdDocument && 'ID',\n applicationForm.hasBankDetails && 'bank details',\n applicationForm.hasCertification && 'certification',\n ]\n .filter(Boolean)\n .join(', ') || 'none';\n const farmMeta = [applicationForm.farmSize.trim(), applicationForm.farmLocation.trim()]\n .filter(Boolean)\n .join(', ');\n await createSchemeApplication({\n schemeId: scheme.id,\n schemeName: scheme.title,\n status: 'submitted',\n notes: `Applicant: ${applicationForm.applicantName}; Farm: ${applicationForm.farmName}${\n farmMeta ? ` (${farmMeta})` : ''\n }; Documents ready: ${docsReady}`,\n });\n toast({\n title: t('healthybowl.governmentSchemes.schemeDetails.toast.submitted.title', 'Application Submitted'),\n description: t(\n 'healthybowl.governmentSchemes.schemeDetails.toast.submitted.message',\n 'Your application for {{schemeTitle}} has been submitted successfully.',\n { schemeTitle: scheme.title }\n ),\n variant: 'success',\n });\n setShowApplyModal(false);\n setApplicationForm({\n applicantName: '',\n farmName: '',\n farmSize: '',\n farmLocation: '',\n hasOwnershipProof: false,\n hasIdDocument: false,\n hasBankDetails: false,\n hasCertification: false,\n declaration: false,\n });\n } catch (err) {\n // Don't surface raw resolver/DB error text to users — log it, show a generic message.\n console.error('Scheme application submission failed', err);\n toast({\n title: t('healthybowl.governmentSchemes.schemeDetails.toast.submitFailed.title', 'Submission failed'),\n description: t(\n 'healthybowl.governmentSchemes.schemeDetails.toast.submitFailed.message',\n 'Something went wrong while submitting your application. Please try again or contact support.'\n ),\n variant: 'error',\n });\n } finally {\n setSubmitting(false);\n }\n };\n\n return (\n <PageLayout\n title={scheme.title}\n description={scheme.department}\n actions={\n <Button\n variant=\"ghost\"\n size=\"sm\"\n onClick={() => navigate(-1)}\n className=\"gap-1 text-text-secondary hover:text-text-primary\"\n >\n <ArrowLeft className=\"h-4 w-4\" /> {t('healthybowl.common.back', 'Back')}\n </Button>\n }\n 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.\"\n nextSteps={[\n {\n id: 'apply',\n label: t('healthybowl.governmentSchemes.schemeDetails.nextSteps.apply.label', 'Apply for this scheme'),\n description: t(\n 'healthybowl.governmentSchemes.schemeDetails.nextSteps.apply.desc',\n 'Start your application once you’ve checked the eligibility.'\n ),\n onClick: () => setShowApplyModal(true),\n },\n {\n id: 'track',\n label: t('healthybowl.governmentSchemes.schemeDetails.nextSteps.track.label', 'Track your applications'),\n description: t(\n 'healthybowl.governmentSchemes.schemeDetails.nextSteps.track.desc',\n 'Follow the status of schemes you’ve already applied to.'\n ),\n href: buildPath('government-schemes/applications'),\n },\n {\n id: 'discover',\n label: t('healthybowl.governmentSchemes.schemeDetails.nextSteps.discover.label', 'Find more schemes'),\n description: t(\n 'healthybowl.governmentSchemes.schemeDetails.nextSteps.discover.desc',\n 'Browse other programs your farm may qualify for.'\n ),\n href: buildPath('government-schemes/discover'),\n },\n ]}\n nextStepsKey=\"healthybowl-scheme-detail\"\n >\n {/* Breadcrumbs */}\n <Breadcrumbs\n items={[\n {\n label: t('healthybowl.governmentSchemes.schemeDetails.breadcrumbs.governmentSchemes', 'Government Schemes'),\n href: buildPath('government-schemes'),\n },\n {\n label: t('healthybowl.governmentSchemes.schemeDetails.breadcrumbs.schemeDiscovery', 'Scheme Discovery'),\n href: buildPath('government-schemes/discover'),\n },\n { label: scheme.title },\n ]}\n />\n\n {/* Scheme Header Card */}\n <GlassCard treatment=\"glass\" glow className=\"border-border-seam p-6\">\n <div className=\"flex items-start justify-between\">\n <div className=\"flex items-center gap-3\">\n <div className=\"rounded-md bg-bg-sunken p-2\">\n <Landmark className=\"h-6 w-6 text-text-secondary\" />\n </div>\n <div>\n <h2 className=\"text-lg font-semibold text-text-primary\">{scheme.title}</h2>\n <p className=\"text-sm text-text-secondary\">{scheme.department}</p>\n <div className=\"mt-2 flex items-center gap-2\">\n <StatusBadge\n label={(scheme.status ?? 'unknown').replace(/_/g, ' ')}\n variant={statusVariant(scheme.status ?? 'unknown')}\n />\n <StatusBadge label={scheme.category} variant={categoryVariant(scheme.category)} />\n </div>\n </div>\n </div>\n </div>\n\n {/* Key Metrics */}\n <div className=\"mt-5 grid gap-3 sm:grid-cols-3\">\n {scheme.maxAmount && (\n <div className=\"rounded-md bg-bg-sunken p-4\">\n <div className=\"flex items-center gap-2\">\n <DollarSign className=\"h-4 w-4 text-text-secondary\" />\n <p className=\"text-xs text-text-secondary\">\n {t('healthybowl.governmentSchemes.schemeDetails.metrics.maxAmount.label', 'Maximum Amount')}\n </p>\n </div>\n <p className=\"mt-1 text-xl font-bold text-text-primary\">\n {formatCurrency(scheme.maxAmount, HB_DEFAULT_CURRENCY)}\n </p>\n </div>\n )}\n {scheme.applicationDeadline && (\n <div className=\"rounded-md bg-bg-sunken p-4\">\n <div className=\"flex items-center gap-2\">\n <CalendarDays className=\"h-4 w-4 text-text-secondary\" />\n <p className=\"text-xs text-text-secondary\">\n {t('healthybowl.governmentSchemes.schemeDetails.metrics.deadline.label', 'Application Deadline')}\n </p>\n </div>\n <p className=\"mt-1 text-xl font-bold text-text-primary\">{formatDate(scheme.applicationDeadline)}</p>\n </div>\n )}\n {daysRemaining != null && (\n <div className={cn('rounded-md p-4', daysRemaining <= 30 ? 'bg-bg-sunken' : 'bg-bg-surface')}>\n <div className=\"flex items-center gap-2\">\n <Clock className=\"h-4 w-4 text-text-secondary\" />\n <p className=\"text-xs text-text-secondary\">\n {t('healthybowl.governmentSchemes.schemeDetails.metrics.daysRemaining.label', 'Days Remaining')}\n </p>\n </div>\n <p className=\"mt-1 text-xl font-bold text-text-primary\">\n {daysRemaining === 1\n ? t('healthybowl.governmentSchemes.schemeDetails.metrics.daysRemaining.valueOne', '{{count}} day', {\n count: daysRemaining,\n })\n : t(\n 'healthybowl.governmentSchemes.schemeDetails.metrics.daysRemaining.valueOther',\n '{{count}} days',\n { count: daysRemaining }\n )}\n </p>\n </div>\n )}\n </div>\n </GlassCard>\n\n {/* Description */}\n <div className=\"rounded-lg border border-border-subtle bg-bg-surface p-6\">\n <h3 className=\"text-sm font-semibold text-text-primary\">\n {t('healthybowl.governmentSchemes.schemeDetails.sections.description.title', 'Description')}\n </h3>\n <p className=\"mt-2 text-sm leading-relaxed text-text-secondary\">{scheme.description}</p>\n </div>\n\n {/* Benefits */}\n <div className=\"rounded-lg border border-border-subtle bg-bg-surface p-6\">\n <h3 className=\"text-sm font-semibold text-text-primary\">\n {t('healthybowl.governmentSchemes.schemeDetails.sections.benefits.title', 'Benefits')}\n </h3>\n <p className=\"mt-2 text-sm leading-relaxed text-text-secondary\">{scheme.benefits}</p>\n </div>\n\n {/* Eligibility Requirements */}\n <div className=\"rounded-lg border border-border-subtle bg-bg-surface p-6\">\n <h3 className=\"text-sm font-semibold text-text-primary\">\n {t(\n 'healthybowl.governmentSchemes.schemeDetails.sections.eligibility.requirementsTitle',\n 'Eligibility Requirements'\n )}\n </h3>\n <p className=\"mt-1 text-xs text-text-secondary\">\n {t(\n 'healthybowl.governmentSchemes.schemeDetails.sections.eligibility.requirementsHelper',\n 'Review each requirement and confirm you qualify before applying.'\n )}\n </p>\n <div className=\"mt-4 space-y-3\">\n {eligibilityRequirements.map((label) => (\n <div\n key={label}\n className=\"flex items-center gap-3 rounded-md border border-border-subtle bg-bg-sunken/50 p-3\"\n >\n <Circle className=\"h-4 w-4 shrink-0 text-text-secondary\" />\n <span className=\"text-sm text-text-primary\">{label}</span>\n </div>\n ))}\n </div>\n </div>\n\n {/* Apply Button */}\n <div className=\"flex gap-3\">\n <Button\n onClick={() => {\n if (scheme.status === 'closed') {\n toast({\n title: t('healthybowl.governmentSchemes.schemeDetails.toast.schemeClosed.title', 'Scheme Closed'),\n description: t(\n 'healthybowl.governmentSchemes.schemeDetails.toast.schemeClosed.message',\n 'This scheme is no longer accepting applications.'\n ),\n variant: 'error',\n });\n return;\n }\n setShowApplyModal(true);\n }}\n disabled={scheme.status === 'closed'}\n >\n {t('healthybowl.governmentSchemes.schemeDetails.actions.apply', 'Apply for This Scheme')}\n </Button>\n <Button variant=\"outline\" onClick={() => navigate(buildPath('government-schemes/discover'))}>\n {t('healthybowl.governmentSchemes.schemeDetails.actions.backToSchemes', 'Back to Schemes')}\n </Button>\n </div>\n\n {/* FAQ Accordion */}\n <div className=\"rounded-lg border border-border-subtle bg-bg-surface p-6\">\n <h3 className=\"text-sm font-semibold text-text-primary\">\n {t('healthybowl.governmentSchemes.schemeDetails.faq.title', 'Frequently Asked Questions')}\n </h3>\n <div className=\"mt-4 space-y-2\">\n {schemeFaqs.map((faq, i) => (\n <div key={i} className=\"rounded-md border border-border-subtle\">\n <Button\n variant=\"ghost\"\n onClick={() => setExpandedFaq(expandedFaq === i ? null : i)}\n className=\"h-auto w-full justify-between whitespace-normal px-4 py-3 text-left font-medium text-text-primary\"\n >\n {faq.question}\n {expandedFaq === i ? (\n <ChevronUp className=\"h-4 w-4 shrink-0 text-text-secondary\" />\n ) : (\n <ChevronDown className=\"h-4 w-4 shrink-0 text-text-secondary\" />\n )}\n </Button>\n {expandedFaq === i && (\n <div className=\"border-t border-border-subtle px-4 py-3 text-sm leading-relaxed text-text-secondary\">\n {faq.answer}\n </div>\n )}\n </div>\n ))}\n </div>\n </div>\n\n {/* Related Schemes */}\n {relatedSchemes.length > 0 && (\n <div>\n <h3 className=\"mb-3 text-sm font-semibold text-text-primary\">\n {t('healthybowl.governmentSchemes.schemeDetails.related.title', 'Related Schemes ({{category}})', {\n category: scheme.category,\n })}\n </h3>\n <div className=\"grid gap-4 sm:grid-cols-2\">\n {relatedSchemes.map((related) => (\n <button\n key={related.id}\n type=\"button\"\n onClick={() => navigate(buildPath(`government-schemes/schemes/${related.id}`))}\n className=\"flex items-start gap-3 rounded-lg border border-border-subtle bg-bg-surface p-4 text-left transition-colors hover:bg-bg-sunken/50\"\n >\n <Landmark className=\"mt-0.5 h-5 w-5 shrink-0 text-text-secondary\" />\n <div className=\"flex-1\">\n <p className=\"text-sm font-medium text-text-primary\">{related.title}</p>\n <p className=\"mt-0.5 text-xs text-text-secondary\">{related.department}</p>\n <div className=\"mt-2 flex items-center gap-2\">\n <StatusBadge\n label={(related.status ?? 'unknown').replace(/_/g, ' ')}\n variant={statusVariant(related.status ?? 'unknown')}\n />\n {related.maxAmount && (\n <span className=\"text-xs text-text-secondary\">\n {t('healthybowl.governmentSchemes.schemeDetails.related.upTo', 'Up to {{amount}}', {\n amount: formatCurrency(related.maxAmount, HB_DEFAULT_CURRENCY),\n })}\n </span>\n )}\n </div>\n </div>\n </button>\n ))}\n </div>\n </div>\n )}\n\n {/* Application Modal */}\n <Modal\n open={showApplyModal}\n onClose={() => {\n if (!submitting) setShowApplyModal(false);\n }}\n title={t('healthybowl.governmentSchemes.schemeDetails.modal.title', 'Apply for Scheme')}\n description={scheme.title}\n size=\"lg\"\n footer={\n <>\n <Button variant=\"outline\" onClick={() => setShowApplyModal(false)} disabled={submitting}>\n {t('healthybowl.common.cancel', 'Cancel')}\n </Button>\n <Button onClick={handleSubmitApplication} disabled={submitting}>\n {submitting\n ? t('healthybowl.governmentSchemes.schemeDetails.modal.submitting', 'Submitting...')\n : t('healthybowl.governmentSchemes.schemeDetails.modal.submit', 'Submit Application')}\n </Button>\n </>\n }\n >\n <div className=\"space-y-4\">\n {/* Applicant Details */}\n <div>\n <h4 className=\"text-sm font-medium text-text-primary\">\n {t('healthybowl.governmentSchemes.schemeDetails.form.applicant.title', 'Applicant Details')}\n </h4>\n <div className=\"mt-2 space-y-3\">\n <div>\n <label className=\"block text-xs font-medium text-text-secondary\">\n {t('healthybowl.governmentSchemes.schemeDetails.form.fields.fullName.label', 'Full Name *')}\n </label>\n <input\n type=\"text\"\n value={applicationForm.applicantName}\n onChange={(e) => setApplicationForm({ ...applicationForm, applicantName: e.target.value })}\n placeholder={t(\n 'healthybowl.governmentSchemes.schemeDetails.form.fields.fullName.placeholder',\n 'Enter your full name'\n )}\n 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\"\n />\n </div>\n </div>\n </div>\n\n {/* Farm Details */}\n <div>\n <h4 className=\"text-sm font-medium text-text-primary\">\n {t('healthybowl.governmentSchemes.schemeDetails.form.farm.title', 'Farm Details')}\n </h4>\n <div className=\"mt-2 grid gap-3 sm:grid-cols-2\">\n <div>\n <label className=\"block text-xs font-medium text-text-secondary\">\n {t('healthybowl.governmentSchemes.schemeDetails.form.fields.farmName.label', 'Farm Name *')}\n </label>\n <input\n type=\"text\"\n value={applicationForm.farmName}\n onChange={(e) => setApplicationForm({ ...applicationForm, farmName: e.target.value })}\n placeholder={t(\n 'healthybowl.governmentSchemes.schemeDetails.form.fields.farmName.placeholder',\n 'Your farm name'\n )}\n 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\"\n />\n </div>\n <div>\n <label className=\"block text-xs font-medium text-text-secondary\">\n {t('healthybowl.governmentSchemes.schemeDetails.form.fields.farmSize.label', 'Farm Size (acres)')}\n </label>\n <input\n type=\"text\"\n value={applicationForm.farmSize}\n onChange={(e) => setApplicationForm({ ...applicationForm, farmSize: e.target.value })}\n placeholder={t(\n 'healthybowl.governmentSchemes.schemeDetails.form.fields.farmSize.placeholder',\n 'e.g., 50'\n )}\n 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\"\n />\n </div>\n <div className=\"sm:col-span-2\">\n <label className=\"block text-xs font-medium text-text-secondary\">\n {t('healthybowl.governmentSchemes.schemeDetails.form.fields.farmLocation.label', 'Farm Location')}\n </label>\n <input\n type=\"text\"\n value={applicationForm.farmLocation}\n onChange={(e) => setApplicationForm({ ...applicationForm, farmLocation: e.target.value })}\n placeholder={t(\n 'healthybowl.governmentSchemes.schemeDetails.form.fields.farmLocation.placeholder',\n 'County, State'\n )}\n 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\"\n />\n </div>\n </div>\n </div>\n\n {/* Documents Checklist */}\n <div>\n <h4 className=\"text-sm font-medium text-text-primary\">\n {t('healthybowl.governmentSchemes.schemeDetails.form.documents.title', 'Documents Checklist')}\n </h4>\n <p className=\"mt-0.5 text-xs text-text-secondary\">\n {t(\n 'healthybowl.governmentSchemes.schemeDetails.form.documents.helper',\n 'Confirm you have the following documents ready for upload'\n )}\n </p>\n <div className=\"mt-2 space-y-2\">\n {[\n {\n key: 'hasOwnershipProof' as const,\n label: t(\n 'healthybowl.governmentSchemes.schemeDetails.form.documents.ownershipProof',\n 'Farm Ownership / Lease Proof'\n ),\n },\n {\n key: 'hasIdDocument' as const,\n label: t(\n 'healthybowl.governmentSchemes.schemeDetails.form.documents.idDocument',\n 'Government-issued ID'\n ),\n },\n {\n key: 'hasBankDetails' as const,\n label: t(\n 'healthybowl.governmentSchemes.schemeDetails.form.documents.bankDetails',\n 'Bank Account Details'\n ),\n },\n {\n key: 'hasCertification' as const,\n label: t(\n 'healthybowl.governmentSchemes.schemeDetails.form.documents.certification',\n 'Organic Certification (if applicable)'\n ),\n },\n ].map((doc) => (\n <label\n key={doc.key}\n className=\"flex items-center gap-3 rounded-md border border-border-subtle p-3 transition-colors hover:bg-bg-sunken/50\"\n >\n <input\n type=\"checkbox\"\n checked={applicationForm[doc.key]}\n onChange={(e) =>\n setApplicationForm({\n ...applicationForm,\n [doc.key]: e.target.checked,\n })\n }\n className=\"h-4 w-4 rounded border-border-subtle\"\n />\n <div className=\"flex items-center gap-2\">\n <Upload className=\"h-3.5 w-3.5 text-text-secondary\" />\n <span className=\"text-sm text-text-primary\">{doc.label}</span>\n </div>\n </label>\n ))}\n </div>\n </div>\n\n {/* Declaration */}\n <div className=\"rounded-md border border-border-subtle bg-bg-sunken/50 p-4\">\n <label className=\"flex items-start gap-3\">\n <input\n type=\"checkbox\"\n checked={applicationForm.declaration}\n onChange={(e) => setApplicationForm({ ...applicationForm, declaration: e.target.checked })}\n className=\"mt-0.5 h-4 w-4 rounded border-border-subtle\"\n />\n <span className=\"text-xs text-text-secondary\">\n {t(\n 'healthybowl.governmentSchemes.schemeDetails.form.declaration.text',\n 'I declare that the information provided is true and accurate. I understand that providing false information may result in disqualification and legal action.'\n )}\n </span>\n </label>\n </div>\n </div>\n </Modal>\n\n <ToastContainer toasts={toasts} onDismiss={dismiss} />\n </PageLayout>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAuBA,IAAM,KAAiB,MAAc;AACnC,SAAQ,GAAR;EACE,KAAK,OACH,QAAO;EACT,KAAK,eACH,QAAO;EACT,KAAK,SACH,QAAO;EACT,QACE,QAAO;;GAIP,KAAmB,MAAc;AACrC,SAAQ,GAAR;EACE,KAAK,UACH,QAAO;EACT,KAAK,SACH,QAAO;EACT,KAAK,YACH,QAAO;EACT,KAAK,WACH,QAAO;EACT,KAAK,QACH,QAAO;EACT,KAAK,YACH,QAAO;EACT,QACE,QAAO;;GASA,UAA0B;CACrC,IAAM,EAAE,s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AAA;OACE,kBAAC,MAAD;QAAI,WAAU;kBACX,EAAE,oEAAoE,sBAAsB;QAC1F,CAAA;OACL,kBAAC,KAAD;QAAG,WAAU;kBACV,EACC,qEACA,4DACD;QACC,CAAA;OACJ,kBAAC,OAAD;QAAK,WAAU;kBACZ;SACC;UACE,KAAK;UACL,OAAO,EACL,6EACA,+BACD;UACF;SACD;UACE,KAAK;UACL,OAAO,EACL,yEACA,uBACD;UACF;SACD;UACE,KAAK;UACL,OAAO,EACL,0EACA,uBACD;UACF;SACD;UACE,KAAK;UACL,OAAO,EACL,4EACA,wCACD;UACF;SACF,CAAC,KAAK,MACL,kBAAC,SAAD;SAEE,WAAU;mBAFZ,CAIE,kBAAC,SAAD;UACE,MAAK;UACL,SAAS,EAAgB,EAAI;UAC7B,WAAW,MACT,EAAmB;WACjB,GAAG;YACF,EAAI,MAAM,EAAE,OAAO;WACrB,CAAC;UAEJ,WAAU;UACV,CAAA,EACF,kBAAC,OAAD;UAAK,WAAU;oBAAf,CACE,kBAAC,IAAD,EAAQ,WAAU,mCAAoC,CAAA,EACtD,kBAAC,QAAD;WAAM,WAAU;qBAA6B,EAAI;WAAa,CAAA,CAC1D;YACA;WAlBD,EAAI,IAkBH,CACR;QACE,CAAA;OACF,EAAA,CAAA;MAGN,kBAAC,OAAD;OAAK,WAAU;iBACb,kBAAC,SAAD;QAAO,WAAU;kBAAjB,CACE,kBAAC,SAAD;SACE,MAAK;SACL,SAAS,EAAgB;SACzB,WAAW,MAAM,EAAmB;UAAE,GAAG;UAAiB,aAAa,EAAE,OAAO;UAAS,CAAC;SAC1F,WAAU;SACV,CAAA,EACF,kBAAC,QAAD;SAAM,WAAU;mBACb,EACC,qEACA,+JACD;SACI,CAAA,CACD;;OACJ,CAAA;MACF;;IACA,CAAA;GAER,kBAAC,GAAD;IAAwB;IAAQ,WAAW;IAAW,CAAA;GAC3C"}
1
+ {"version":3,"file":"SchemeDetailsPage.js","names":[],"sources":["../../../../src/healthybowl/pages/government-schemes/SchemeDetailsPage.tsx"],"sourcesContent":["import { useState, useMemo } from 'react';\nimport { useParams, useNavigate } from 'react-router';\nimport {\n Landmark,\n Circle,\n CheckCircle2,\n XCircle,\n HelpCircle,\n ArrowLeft,\n CalendarDays,\n DollarSign,\n Clock,\n ChevronDown,\n ChevronUp,\n Upload,\n AlertCircle,\n} from 'lucide-react';\nimport { PageLayout, StatusBadge, Breadcrumbs, EmptyState, ErrorState, PageLoader, Modal } from '../../components';\nimport { ToastContainer } from '../../components/Toast';\nimport { GlassCard, Button } from '@burdenoff/fe-libs/ui';\nimport { useToast } from '../../hooks/useToast';\nimport { useBasePath } from '../../hooks/useBasePath';\nimport { useHealthyBowlData } from '../../hooks/useHealthyBowlData';\nimport { useSchemeEligibility } from '../../hooks/useSchemeEligibility';\nimport { formatCurrency, HB_DEFAULT_CURRENCY, formatDate, cn } from '../../utils/helpers';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\n\nconst statusVariant = (s: string) => {\n switch (s) {\n case 'open':\n return 'success' as const;\n case 'closing_soon':\n return 'warning' as const;\n case 'closed':\n return 'error' as const;\n default:\n return 'default' as const;\n }\n};\n\nconst categoryVariant = (c: string) => {\n switch (c) {\n case 'subsidy':\n return 'success' as const;\n case 'credit':\n return 'info' as const;\n case 'insurance':\n return 'warning' as const;\n case 'training':\n return 'default' as const;\n case 'grant':\n return 'success' as const;\n case 'equipment':\n return 'muted' as const;\n default:\n return 'muted' as const;\n }\n};\n\ninterface FaqItem {\n question: string;\n answer: string;\n}\n\nexport const SchemeDetailsPage = () => {\n const { governmentSchemes, createSchemeApplication, errors, loadings, refetch } = useHealthyBowlData();\n\n const { schemeId } = useParams<{ schemeId: string }>();\n // BOFF-6110 — the met/unmet verdict from this workspace's own farm data. Advisory: the panel\n // degrades to the scheme's published criteria if the check fails or the scheme has no rules.\n const { eligibility } = useSchemeEligibility(schemeId);\n const navigate = useNavigate();\n const { buildPath } = useBasePath();\n const { toasts, toast, dismiss } = useToast();\n const { t } = useI18n();\n\n const schemeFaqs: FaqItem[] = useMemo(\n () => [\n {\n question: t(\n 'healthybowl.governmentSchemes.schemeDetails.faq.reviewTime.question',\n 'How long does the application review process take?'\n ),\n answer: t(\n 'healthybowl.governmentSchemes.schemeDetails.faq.reviewTime.answer',\n 'Typically, applications are reviewed within 2-4 weeks of submission. You will receive status updates via email and on the Application Tracking page.'\n ),\n },\n {\n question: t(\n 'healthybowl.governmentSchemes.schemeDetails.faq.documents.question',\n 'What documents do I need to submit?'\n ),\n answer: t(\n 'healthybowl.governmentSchemes.schemeDetails.faq.documents.answer',\n '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.'\n ),\n },\n {\n question: t(\n 'healthybowl.governmentSchemes.schemeDetails.faq.pendingCertification.question',\n 'Can I apply if my organic certification is pending?'\n ),\n answer: t(\n 'healthybowl.governmentSchemes.schemeDetails.faq.pendingCertification.answer',\n 'For schemes requiring organic certification, you may apply during the transition period. Provide your transition plan and any in-process certification documentation.'\n ),\n },\n {\n question: t(\n 'healthybowl.governmentSchemes.schemeDetails.faq.disbursement.question',\n 'How will the benefits be disbursed?'\n ),\n answer: t(\n 'healthybowl.governmentSchemes.schemeDetails.faq.disbursement.answer',\n '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.'\n ),\n },\n ],\n [t]\n );\n const [expandedFaq, setExpandedFaq] = useState<number | null>(null);\n const [showApplyModal, setShowApplyModal] = useState(false);\n const [submitting, setSubmitting] = useState(false);\n const [applicationForm, setApplicationForm] = useState({\n applicantName: '',\n farmName: '',\n farmSize: '',\n farmLocation: '',\n hasOwnershipProof: false,\n hasIdDocument: false,\n hasBankDetails: false,\n hasCertification: false,\n declaration: false,\n });\n\n const scheme = governmentSchemes.find((s) => s.id === schemeId);\n\n const relatedSchemes = useMemo(() => {\n if (!scheme) return [];\n return governmentSchemes.filter((s) => s.id !== scheme.id && s.category === scheme.category);\n }, [governmentSchemes, scheme]);\n\n if (!scheme) {\n return (\n <PageLayout\n title={t('healthybowl.governmentSchemes.schemeDetails.notFound.title', 'Scheme Not Found')}\n description={t(\n 'healthybowl.governmentSchemes.schemeDetails.notFound.description',\n 'The requested scheme could not be found'\n )}\n >\n {loadings.government ? (\n <PageLoader />\n ) : errors.government ? (\n <ErrorState onRetry={refetch} />\n ) : (\n <EmptyState\n icon={<AlertCircle className=\"h-12 w-12\" />}\n title={t('healthybowl.governmentSchemes.schemeDetails.notFound.emptyState.title', 'Scheme Not Found')}\n description={t(\n 'healthybowl.governmentSchemes.schemeDetails.notFound.emptyState.description',\n 'The government scheme you are looking for does not exist or may have been removed.'\n )}\n action={\n <Button onClick={() => navigate(buildPath('government-schemes/discover'))}>\n {t('healthybowl.governmentSchemes.schemeDetails.notFound.browseSchemes', 'Browse Schemes')}\n </Button>\n }\n />\n )}\n </PageLayout>\n );\n }\n\n // BOFF-6110 — the criteria the scheme publishes. Still shown verbatim and in full: the\n // scheme's own wording is the authority, and the structured check below only says which of\n // them this farm's data demonstrably satisfies.\n const eligibilityRequirements = scheme.eligibility ?? [];\n\n const getDaysRemaining = () => {\n if (!scheme.applicationDeadline) return null;\n const diff = Math.ceil((new Date(scheme.applicationDeadline).getTime() - Date.now()) / (1000 * 60 * 60 * 24));\n return diff > 0 ? diff : 0;\n };\n\n const daysRemaining = getDaysRemaining();\n\n const handleSubmitApplication = async () => {\n if (submitting) return; // guard against a fast double-click firing before the button disables\n if (!applicationForm.applicantName.trim() || !applicationForm.farmName.trim()) {\n toast({\n title: t('healthybowl.governmentSchemes.schemeDetails.toast.requiredFields.title', 'Required Fields Missing'),\n description: t(\n 'healthybowl.governmentSchemes.schemeDetails.toast.requiredFields.message',\n 'Please fill in all required fields.'\n ),\n variant: 'error',\n });\n return;\n }\n if (!applicationForm.declaration) {\n toast({\n title: t('healthybowl.governmentSchemes.schemeDetails.toast.declarationRequired.title', 'Declaration Required'),\n description: t(\n 'healthybowl.governmentSchemes.schemeDetails.toast.declarationRequired.message',\n 'Please accept the declaration to proceed.'\n ),\n variant: 'error',\n });\n return;\n }\n setSubmitting(true);\n try {\n const docsReady =\n [\n applicationForm.hasOwnershipProof && 'ownership proof',\n applicationForm.hasIdDocument && 'ID',\n applicationForm.hasBankDetails && 'bank details',\n applicationForm.hasCertification && 'certification',\n ]\n .filter(Boolean)\n .join(', ') || 'none';\n const farmMeta = [applicationForm.farmSize.trim(), applicationForm.farmLocation.trim()]\n .filter(Boolean)\n .join(', ');\n await createSchemeApplication({\n schemeId: scheme.id,\n schemeName: scheme.title,\n status: 'submitted',\n notes: `Applicant: ${applicationForm.applicantName}; Farm: ${applicationForm.farmName}${\n farmMeta ? ` (${farmMeta})` : ''\n }; Documents ready: ${docsReady}`,\n });\n toast({\n title: t('healthybowl.governmentSchemes.schemeDetails.toast.submitted.title', 'Application Submitted'),\n description: t(\n 'healthybowl.governmentSchemes.schemeDetails.toast.submitted.message',\n 'Your application for {{schemeTitle}} has been submitted successfully.',\n { schemeTitle: scheme.title }\n ),\n variant: 'success',\n });\n setShowApplyModal(false);\n setApplicationForm({\n applicantName: '',\n farmName: '',\n farmSize: '',\n farmLocation: '',\n hasOwnershipProof: false,\n hasIdDocument: false,\n hasBankDetails: false,\n hasCertification: false,\n declaration: false,\n });\n } catch (err) {\n // Don't surface raw resolver/DB error text to users — log it, show a generic message.\n console.error('Scheme application submission failed', err);\n toast({\n title: t('healthybowl.governmentSchemes.schemeDetails.toast.submitFailed.title', 'Submission failed'),\n description: t(\n 'healthybowl.governmentSchemes.schemeDetails.toast.submitFailed.message',\n 'Something went wrong while submitting your application. Please try again or contact support.'\n ),\n variant: 'error',\n });\n } finally {\n setSubmitting(false);\n }\n };\n\n return (\n <PageLayout\n title={scheme.title}\n description={scheme.department}\n actions={\n <Button\n variant=\"ghost\"\n size=\"sm\"\n onClick={() => navigate(-1)}\n className=\"gap-1 text-text-secondary hover:text-text-primary\"\n >\n <ArrowLeft className=\"h-4 w-4\" /> {t('healthybowl.common.back', 'Back')}\n </Button>\n }\n 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.\"\n nextSteps={[\n {\n id: 'apply',\n label: t('healthybowl.governmentSchemes.schemeDetails.nextSteps.apply.label', 'Apply for this scheme'),\n description: t(\n 'healthybowl.governmentSchemes.schemeDetails.nextSteps.apply.desc',\n 'Start your application once you’ve checked the eligibility.'\n ),\n onClick: () => setShowApplyModal(true),\n },\n {\n id: 'track',\n label: t('healthybowl.governmentSchemes.schemeDetails.nextSteps.track.label', 'Track your applications'),\n description: t(\n 'healthybowl.governmentSchemes.schemeDetails.nextSteps.track.desc',\n 'Follow the status of schemes you’ve already applied to.'\n ),\n href: buildPath('government-schemes/applications'),\n },\n {\n id: 'discover',\n label: t('healthybowl.governmentSchemes.schemeDetails.nextSteps.discover.label', 'Find more schemes'),\n description: t(\n 'healthybowl.governmentSchemes.schemeDetails.nextSteps.discover.desc',\n 'Browse other programs your farm may qualify for.'\n ),\n href: buildPath('government-schemes/discover'),\n },\n ]}\n nextStepsKey=\"healthybowl-scheme-detail\"\n >\n {/* Breadcrumbs */}\n <Breadcrumbs\n items={[\n {\n label: t('healthybowl.governmentSchemes.schemeDetails.breadcrumbs.governmentSchemes', 'Government Schemes'),\n href: buildPath('government-schemes'),\n },\n {\n label: t('healthybowl.governmentSchemes.schemeDetails.breadcrumbs.schemeDiscovery', 'Scheme Discovery'),\n href: buildPath('government-schemes/discover'),\n },\n { label: scheme.title },\n ]}\n />\n\n {/* Scheme Header Card */}\n <GlassCard treatment=\"glass\" glow className=\"border-border-seam p-6\">\n <div className=\"flex items-start justify-between\">\n <div className=\"flex items-center gap-3\">\n <div className=\"rounded-md bg-bg-sunken p-2\">\n <Landmark className=\"h-6 w-6 text-text-secondary\" />\n </div>\n <div>\n <h2 className=\"text-lg font-semibold text-text-primary\">{scheme.title}</h2>\n <p className=\"text-sm text-text-secondary\">{scheme.department}</p>\n <div className=\"mt-2 flex items-center gap-2\">\n <StatusBadge\n label={(scheme.status ?? 'unknown').replace(/_/g, ' ')}\n variant={statusVariant(scheme.status ?? 'unknown')}\n />\n <StatusBadge label={scheme.category} variant={categoryVariant(scheme.category)} />\n </div>\n </div>\n </div>\n </div>\n\n {/* Key Metrics */}\n <div className=\"mt-5 grid gap-3 sm:grid-cols-3\">\n {scheme.maxAmount && (\n <div className=\"rounded-md bg-bg-sunken p-4\">\n <div className=\"flex items-center gap-2\">\n <DollarSign className=\"h-4 w-4 text-text-secondary\" />\n <p className=\"text-xs text-text-secondary\">\n {t('healthybowl.governmentSchemes.schemeDetails.metrics.maxAmount.label', 'Maximum Amount')}\n </p>\n </div>\n <p className=\"mt-1 text-xl font-bold text-text-primary\">\n {formatCurrency(scheme.maxAmount, HB_DEFAULT_CURRENCY)}\n </p>\n </div>\n )}\n {scheme.applicationDeadline && (\n <div className=\"rounded-md bg-bg-sunken p-4\">\n <div className=\"flex items-center gap-2\">\n <CalendarDays className=\"h-4 w-4 text-text-secondary\" />\n <p className=\"text-xs text-text-secondary\">\n {t('healthybowl.governmentSchemes.schemeDetails.metrics.deadline.label', 'Application Deadline')}\n </p>\n </div>\n <p className=\"mt-1 text-xl font-bold text-text-primary\">{formatDate(scheme.applicationDeadline)}</p>\n </div>\n )}\n {daysRemaining != null && (\n <div className={cn('rounded-md p-4', daysRemaining <= 30 ? 'bg-bg-sunken' : 'bg-bg-surface')}>\n <div className=\"flex items-center gap-2\">\n <Clock className=\"h-4 w-4 text-text-secondary\" />\n <p className=\"text-xs text-text-secondary\">\n {t('healthybowl.governmentSchemes.schemeDetails.metrics.daysRemaining.label', 'Days Remaining')}\n </p>\n </div>\n <p className=\"mt-1 text-xl font-bold text-text-primary\">\n {daysRemaining === 1\n ? t('healthybowl.governmentSchemes.schemeDetails.metrics.daysRemaining.valueOne', '{{count}} day', {\n count: daysRemaining,\n })\n : t(\n 'healthybowl.governmentSchemes.schemeDetails.metrics.daysRemaining.valueOther',\n '{{count}} days',\n { count: daysRemaining }\n )}\n </p>\n </div>\n )}\n </div>\n </GlassCard>\n\n {/* Description */}\n <div className=\"rounded-lg border border-border-subtle bg-bg-surface p-6\">\n <h3 className=\"text-sm font-semibold text-text-primary\">\n {t('healthybowl.governmentSchemes.schemeDetails.sections.description.title', 'Description')}\n </h3>\n <p className=\"mt-2 text-sm leading-relaxed text-text-secondary\">{scheme.description}</p>\n </div>\n\n {/* Benefits */}\n <div className=\"rounded-lg border border-border-subtle bg-bg-surface p-6\">\n <h3 className=\"text-sm font-semibold text-text-primary\">\n {t('healthybowl.governmentSchemes.schemeDetails.sections.benefits.title', 'Benefits')}\n </h3>\n <p className=\"mt-2 text-sm leading-relaxed text-text-secondary\">{scheme.benefits}</p>\n </div>\n\n {/* Eligibility Requirements */}\n <div className=\"rounded-lg border border-border-subtle bg-bg-surface p-6\">\n <h3 className=\"text-sm font-semibold text-text-primary\">\n {t(\n 'healthybowl.governmentSchemes.schemeDetails.sections.eligibility.requirementsTitle',\n 'Eligibility Requirements'\n )}\n </h3>\n <p className=\"mt-1 text-xs text-text-secondary\">\n {t(\n 'healthybowl.governmentSchemes.schemeDetails.sections.eligibility.requirementsHelper',\n 'Review each requirement and confirm you qualify before applying.'\n )}\n </p>\n {/* BOFF-6110 — the verdict from the farm's own data, when the scheme carries structured\n criteria. Absent or still loading, the published requirements stand alone exactly as\n before. */}\n {eligibility && eligibility.criteria.length > 0 && (\n <div\n className={`mt-4 rounded-md border p-3 ${\n eligibility.outcome === 'ELIGIBLE'\n ? 'border-success/40 bg-success/10'\n : eligibility.outcome === 'NOT_ELIGIBLE'\n ? 'border-status-error-bg/40 bg-status-error-bg/10'\n : 'border-border-subtle bg-bg-sunken/50'\n }`}\n >\n <p className=\"text-sm font-medium text-text-primary\">{eligibility.summary}</p>\n <p className=\"mt-1 text-xs text-text-secondary\">\n {t(\n 'healthybowl.governmentSchemes.schemeDetails.sections.eligibility.checkedAgainstFarm',\n 'Checked against your farm records. Always confirm against the scheme’s own wording before applying.'\n )}\n </p>\n </div>\n )}\n\n <div className=\"mt-4 space-y-3\">\n {eligibility && eligibility.criteria.length > 0\n ? eligibility.criteria.map((criterion) => (\n <div\n key={criterion.id}\n className=\"flex items-start gap-3 rounded-md border border-border-subtle bg-bg-sunken/50 p-3\"\n >\n {/* The verdict is carried by icon shape and colour, so it needs a text label\n too — without one every row reads identically to a screen reader, which\n would strip the whole feature of meaning for those users. */}\n {criterion.verdict === 'MET' ? (\n <CheckCircle2\n role=\"img\"\n aria-label={t('healthybowl.governmentSchemes.schemeDetails.eligibility.verdict.met', 'Met')}\n className=\"mt-0.5 h-4 w-4 shrink-0 text-success\"\n />\n ) : criterion.verdict === 'UNMET' ? (\n <XCircle\n role=\"img\"\n aria-label={t('healthybowl.governmentSchemes.schemeDetails.eligibility.verdict.unmet', 'Not met')}\n className=\"mt-0.5 h-4 w-4 shrink-0 text-status-error-bg\"\n />\n ) : (\n <HelpCircle\n role=\"img\"\n aria-label={t(\n 'healthybowl.governmentSchemes.schemeDetails.eligibility.verdict.unknown',\n 'Needs checking'\n )}\n className=\"mt-0.5 h-4 w-4 shrink-0 text-text-secondary\"\n />\n )}\n <div className=\"min-w-0\">\n <span className=\"text-sm text-text-primary\">{criterion.label}</span>\n {/* The reason is what keeps an UNKNOWN honest — it says WHY we cannot tell,\n rather than leaving a farmer to read it as a refusal. Omitted when empty so\n it cannot render as a stray gap. */}\n {criterion.reason ? (\n <span className=\"mt-0.5 block text-xs text-text-secondary\">{criterion.reason}</span>\n ) : null}\n </div>\n </div>\n ))\n : eligibilityRequirements.map((label) => (\n <div\n key={label}\n className=\"flex items-center gap-3 rounded-md border border-border-subtle bg-bg-sunken/50 p-3\"\n >\n <Circle className=\"h-4 w-4 shrink-0 text-text-secondary\" />\n <span className=\"text-sm text-text-primary\">{label}</span>\n </div>\n ))}\n </div>\n </div>\n\n {/* Apply Button */}\n <div className=\"flex gap-3\">\n <Button\n onClick={() => {\n if (scheme.status === 'closed') {\n toast({\n title: t('healthybowl.governmentSchemes.schemeDetails.toast.schemeClosed.title', 'Scheme Closed'),\n description: t(\n 'healthybowl.governmentSchemes.schemeDetails.toast.schemeClosed.message',\n 'This scheme is no longer accepting applications.'\n ),\n variant: 'error',\n });\n return;\n }\n setShowApplyModal(true);\n }}\n disabled={scheme.status === 'closed'}\n >\n {t('healthybowl.governmentSchemes.schemeDetails.actions.apply', 'Apply for This Scheme')}\n </Button>\n <Button variant=\"outline\" onClick={() => navigate(buildPath('government-schemes/discover'))}>\n {t('healthybowl.governmentSchemes.schemeDetails.actions.backToSchemes', 'Back to Schemes')}\n </Button>\n </div>\n\n {/* FAQ Accordion */}\n <div className=\"rounded-lg border border-border-subtle bg-bg-surface p-6\">\n <h3 className=\"text-sm font-semibold text-text-primary\">\n {t('healthybowl.governmentSchemes.schemeDetails.faq.title', 'Frequently Asked Questions')}\n </h3>\n <div className=\"mt-4 space-y-2\">\n {schemeFaqs.map((faq, i) => (\n <div key={i} className=\"rounded-md border border-border-subtle\">\n <Button\n variant=\"ghost\"\n onClick={() => setExpandedFaq(expandedFaq === i ? null : i)}\n className=\"h-auto w-full justify-between whitespace-normal px-4 py-3 text-left font-medium text-text-primary\"\n >\n {faq.question}\n {expandedFaq === i ? (\n <ChevronUp className=\"h-4 w-4 shrink-0 text-text-secondary\" />\n ) : (\n <ChevronDown className=\"h-4 w-4 shrink-0 text-text-secondary\" />\n )}\n </Button>\n {expandedFaq === i && (\n <div className=\"border-t border-border-subtle px-4 py-3 text-sm leading-relaxed text-text-secondary\">\n {faq.answer}\n </div>\n )}\n </div>\n ))}\n </div>\n </div>\n\n {/* Related Schemes */}\n {relatedSchemes.length > 0 && (\n <div>\n <h3 className=\"mb-3 text-sm font-semibold text-text-primary\">\n {t('healthybowl.governmentSchemes.schemeDetails.related.title', 'Related Schemes ({{category}})', {\n category: scheme.category,\n })}\n </h3>\n <div className=\"grid gap-4 sm:grid-cols-2\">\n {relatedSchemes.map((related) => (\n <button\n key={related.id}\n type=\"button\"\n onClick={() => navigate(buildPath(`government-schemes/schemes/${related.id}`))}\n className=\"flex items-start gap-3 rounded-lg border border-border-subtle bg-bg-surface p-4 text-left transition-colors hover:bg-bg-sunken/50\"\n >\n <Landmark className=\"mt-0.5 h-5 w-5 shrink-0 text-text-secondary\" />\n <div className=\"flex-1\">\n <p className=\"text-sm font-medium text-text-primary\">{related.title}</p>\n <p className=\"mt-0.5 text-xs text-text-secondary\">{related.department}</p>\n <div className=\"mt-2 flex items-center gap-2\">\n <StatusBadge\n label={(related.status ?? 'unknown').replace(/_/g, ' ')}\n variant={statusVariant(related.status ?? 'unknown')}\n />\n {related.maxAmount && (\n <span className=\"text-xs text-text-secondary\">\n {t('healthybowl.governmentSchemes.schemeDetails.related.upTo', 'Up to {{amount}}', {\n amount: formatCurrency(related.maxAmount, HB_DEFAULT_CURRENCY),\n })}\n </span>\n )}\n </div>\n </div>\n </button>\n ))}\n </div>\n </div>\n )}\n\n {/* Application Modal */}\n <Modal\n open={showApplyModal}\n onClose={() => {\n if (!submitting) setShowApplyModal(false);\n }}\n title={t('healthybowl.governmentSchemes.schemeDetails.modal.title', 'Apply for Scheme')}\n description={scheme.title}\n size=\"lg\"\n footer={\n <>\n <Button variant=\"outline\" onClick={() => setShowApplyModal(false)} disabled={submitting}>\n {t('healthybowl.common.cancel', 'Cancel')}\n </Button>\n <Button onClick={handleSubmitApplication} disabled={submitting}>\n {submitting\n ? t('healthybowl.governmentSchemes.schemeDetails.modal.submitting', 'Submitting...')\n : t('healthybowl.governmentSchemes.schemeDetails.modal.submit', 'Submit Application')}\n </Button>\n </>\n }\n >\n <div className=\"space-y-4\">\n {/* Applicant Details */}\n <div>\n <h4 className=\"text-sm font-medium text-text-primary\">\n {t('healthybowl.governmentSchemes.schemeDetails.form.applicant.title', 'Applicant Details')}\n </h4>\n <div className=\"mt-2 space-y-3\">\n <div>\n <label className=\"block text-xs font-medium text-text-secondary\">\n {t('healthybowl.governmentSchemes.schemeDetails.form.fields.fullName.label', 'Full Name *')}\n </label>\n <input\n type=\"text\"\n value={applicationForm.applicantName}\n onChange={(e) => setApplicationForm({ ...applicationForm, applicantName: e.target.value })}\n placeholder={t(\n 'healthybowl.governmentSchemes.schemeDetails.form.fields.fullName.placeholder',\n 'Enter your full name'\n )}\n 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\"\n />\n </div>\n </div>\n </div>\n\n {/* Farm Details */}\n <div>\n <h4 className=\"text-sm font-medium text-text-primary\">\n {t('healthybowl.governmentSchemes.schemeDetails.form.farm.title', 'Farm Details')}\n </h4>\n <div className=\"mt-2 grid gap-3 sm:grid-cols-2\">\n <div>\n <label className=\"block text-xs font-medium text-text-secondary\">\n {t('healthybowl.governmentSchemes.schemeDetails.form.fields.farmName.label', 'Farm Name *')}\n </label>\n <input\n type=\"text\"\n value={applicationForm.farmName}\n onChange={(e) => setApplicationForm({ ...applicationForm, farmName: e.target.value })}\n placeholder={t(\n 'healthybowl.governmentSchemes.schemeDetails.form.fields.farmName.placeholder',\n 'Your farm name'\n )}\n 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\"\n />\n </div>\n <div>\n <label className=\"block text-xs font-medium text-text-secondary\">\n {t('healthybowl.governmentSchemes.schemeDetails.form.fields.farmSize.label', 'Farm Size (acres)')}\n </label>\n <input\n type=\"text\"\n value={applicationForm.farmSize}\n onChange={(e) => setApplicationForm({ ...applicationForm, farmSize: e.target.value })}\n placeholder={t(\n 'healthybowl.governmentSchemes.schemeDetails.form.fields.farmSize.placeholder',\n 'e.g., 50'\n )}\n 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\"\n />\n </div>\n <div className=\"sm:col-span-2\">\n <label className=\"block text-xs font-medium text-text-secondary\">\n {t('healthybowl.governmentSchemes.schemeDetails.form.fields.farmLocation.label', 'Farm Location')}\n </label>\n <input\n type=\"text\"\n value={applicationForm.farmLocation}\n onChange={(e) => setApplicationForm({ ...applicationForm, farmLocation: e.target.value })}\n placeholder={t(\n 'healthybowl.governmentSchemes.schemeDetails.form.fields.farmLocation.placeholder',\n 'County, State'\n )}\n 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\"\n />\n </div>\n </div>\n </div>\n\n {/* Documents Checklist */}\n <div>\n <h4 className=\"text-sm font-medium text-text-primary\">\n {t('healthybowl.governmentSchemes.schemeDetails.form.documents.title', 'Documents Checklist')}\n </h4>\n <p className=\"mt-0.5 text-xs text-text-secondary\">\n {t(\n 'healthybowl.governmentSchemes.schemeDetails.form.documents.helper',\n 'Confirm you have the following documents ready for upload'\n )}\n </p>\n <div className=\"mt-2 space-y-2\">\n {[\n {\n key: 'hasOwnershipProof' as const,\n label: t(\n 'healthybowl.governmentSchemes.schemeDetails.form.documents.ownershipProof',\n 'Farm Ownership / Lease Proof'\n ),\n },\n {\n key: 'hasIdDocument' as const,\n label: t(\n 'healthybowl.governmentSchemes.schemeDetails.form.documents.idDocument',\n 'Government-issued ID'\n ),\n },\n {\n key: 'hasBankDetails' as const,\n label: t(\n 'healthybowl.governmentSchemes.schemeDetails.form.documents.bankDetails',\n 'Bank Account Details'\n ),\n },\n {\n key: 'hasCertification' as const,\n label: t(\n 'healthybowl.governmentSchemes.schemeDetails.form.documents.certification',\n 'Organic Certification (if applicable)'\n ),\n },\n ].map((doc) => (\n <label\n key={doc.key}\n className=\"flex items-center gap-3 rounded-md border border-border-subtle p-3 transition-colors hover:bg-bg-sunken/50\"\n >\n <input\n type=\"checkbox\"\n checked={applicationForm[doc.key]}\n onChange={(e) =>\n setApplicationForm({\n ...applicationForm,\n [doc.key]: e.target.checked,\n })\n }\n className=\"h-4 w-4 rounded border-border-subtle\"\n />\n <div className=\"flex items-center gap-2\">\n <Upload className=\"h-3.5 w-3.5 text-text-secondary\" />\n <span className=\"text-sm text-text-primary\">{doc.label}</span>\n </div>\n </label>\n ))}\n </div>\n </div>\n\n {/* Declaration */}\n <div className=\"rounded-md border border-border-subtle bg-bg-sunken/50 p-4\">\n <label className=\"flex items-start gap-3\">\n <input\n type=\"checkbox\"\n checked={applicationForm.declaration}\n onChange={(e) => setApplicationForm({ ...applicationForm, declaration: e.target.checked })}\n className=\"mt-0.5 h-4 w-4 rounded border-border-subtle\"\n />\n <span className=\"text-xs text-text-secondary\">\n {t(\n 'healthybowl.governmentSchemes.schemeDetails.form.declaration.text',\n 'I declare that the information provided is true and accurate. I understand that providing false information may result in disqualification and legal action.'\n )}\n </span>\n </label>\n </div>\n </div>\n </Modal>\n\n <ToastContainer toasts={toasts} onDismiss={dismiss} />\n </PageLayout>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA2BA,IAAM,KAAiB,MAAc;AACnC,SAAQ,GAAR;EACE,KAAK,OACH,QAAO;EACT,KAAK,eACH,QAAO;EACT,KAAK,SACH,QAAO;EACT,QACE,QAAO;;GAIP,KAAmB,MAAc;AACrC,SAAQ,GAAR;EACE,KAAK,UACH,QAAO;EACT,KAAK,SACH,QAAO;EACT,KAAK,YACH,QAAO;EACT,KAAK,WACH,QAAO;EACT,KAAK,QACH,QAAO;EACT,KAAK,YACH,QAAO;EACT,QACE,QAAO;;GASA,UAA0B;CACrC,IAAM,EAAE,sBAAmB,4BAAyB,WAAQ,aAAU,gBAAY,GAAoB,EAEhG,EAAE,gBAAa,GAAiC,EAGhD,EAAE,mBAAgB,EAAqB,EAAS,EAChD,IAAW,GAAa,EACxB,EAAE,iBAAc,GAAa,EAC7B,EAAE,WAAQ,UAAO,eAAY,GAAU,EACvC,EAAE,SAAM,IAAS,EAEjB,IAAwB,QACtB;EACJ;GACE,UAAU,EACR,uEACA,qDACD;GACD,QAAQ,EACN,qEACA,uJACD;GACF;EACD;GACE,UAAU,EACR,sEACA,sCACD;GACD,QAAQ,EACN,o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WAAa,CAAA,CAC1D;YACA;WAlBD,EAAI,IAkBH,CACR;QACE,CAAA;OACF,EAAA,CAAA;MAGN,kBAAC,OAAD;OAAK,WAAU;iBACb,kBAAC,SAAD;QAAO,WAAU;kBAAjB,CACE,kBAAC,SAAD;SACE,MAAK;SACL,SAAS,EAAgB;SACzB,WAAW,MAAM,EAAmB;UAAE,GAAG;UAAiB,aAAa,EAAE,OAAO;UAAS,CAAC;SAC1F,WAAU;SACV,CAAA,EACF,kBAAC,QAAD;SAAM,WAAU;mBACb,EACC,qEACA,+JACD;SACI,CAAA,CACD;;OACJ,CAAA;MACF;;IACA,CAAA;GAER,kBAAC,GAAD;IAAwB;IAAQ,WAAW;IAAW,CAAA;GAC3C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/microfe-healthybowl",
3
- "version": "2026.810.10",
3
+ "version": "2026.810.11",
4
4
  "description": "Burdenoff HealthyBowl Microfrontend - Comprehensive organic farming and agro-foods management platform",
5
5
  "type": "module",
6
6
  "files": [