@burdenoff/microfe-healthybowl 2026.902.19 → 2026.902.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/dist/components/assistant/AssistantChatArea.js +234 -220
  2. package/dist/components/assistant/AssistantChatArea.js.map +1 -1
  3. package/dist/components/assistant/AssistantSpokenTurnsNotice.js +33 -0
  4. package/dist/components/assistant/AssistantSpokenTurnsNotice.js.map +1 -0
  5. package/dist/components/assistant/voice/AssistantVoiceSession.js +16 -16
  6. package/dist/components/assistant/voice/VoiceTranscriptDrawer.js.map +1 -1
  7. package/dist/healthybowl/hooks/useConsultationPayments.js +59 -0
  8. package/dist/healthybowl/hooks/useConsultationPayments.js.map +1 -0
  9. package/dist/healthybowl/hooks/useHealthyBowlData.js +15 -0
  10. package/dist/healthybowl/hooks/useHealthyBowlData.js.map +1 -1
  11. package/dist/healthybowl/offline/graphql.js.map +1 -1
  12. package/dist/healthybowl/offline/syncEngine.js +2 -1
  13. package/dist/healthybowl/offline/syncEngine.js.map +1 -1
  14. package/dist/healthybowl/offline/types.js.map +1 -1
  15. package/dist/healthybowl/pages/government-schemes/ApplicationTrackingPage.js +228 -188
  16. package/dist/healthybowl/pages/government-schemes/ApplicationTrackingPage.js.map +1 -1
  17. package/dist/healthybowl/pages/government-schemes/SchemeDetailsPage.js +261 -191
  18. package/dist/healthybowl/pages/government-schemes/SchemeDetailsPage.js.map +1 -1
  19. package/dist/healthybowl/pages/government-schemes/schemeApplicationTransitions.js +49 -0
  20. package/dist/healthybowl/pages/government-schemes/schemeApplicationTransitions.js.map +1 -0
  21. package/dist/healthybowl/pages/government-schemes/schemeDocumentSlots.js +48 -0
  22. package/dist/healthybowl/pages/government-schemes/schemeDocumentSlots.js.map +1 -0
  23. package/dist/healthybowl/pages/government-schemes/useSchemeApplicationTransition.js +54 -0
  24. package/dist/healthybowl/pages/government-schemes/useSchemeApplicationTransition.js.map +1 -0
  25. package/dist/healthybowl/pages/network/ExpertsPage.js +520 -419
  26. package/dist/healthybowl/pages/network/ExpertsPage.js.map +1 -1
  27. package/dist/hooks/useConversationTurns.js +19 -0
  28. package/dist/hooks/useConversationTurns.js.map +1 -0
  29. package/dist/types/assistant.js.map +1 -1
  30. package/package.json +1 -1
@@ -1,25 +1,30 @@
1
- import { cn as e, formatCurrency as t, formatDate as n } from "../../utils/helpers.js";
2
- import { PageLayout as r } from "../../components/PageLayout.js";
3
- import { useBasePath as i } from "../../hooks/useBasePath.js";
4
- import { StatCard as a } from "../../components/StatCard.js";
5
- import { StatusBadge as o } from "../../components/StatusBadge.js";
6
- import { EmptyState as s } from "../../components/EmptyState.js";
7
- import { ErrorState as c } from "../../components/ErrorState.js";
8
- import { FilterBar as l } from "../../components/FilterBar.js";
9
- import { ToastContainer as u } from "../../components/Toast.js";
10
- import { PageLoader as d } from "../../components/PageLoader.js";
11
- import { useToast as f } from "../../hooks/useToast.js";
1
+ import { useHealthyBowl as e } from "../../context/HealthyBowlContext.js";
2
+ import { cn as t, formatCurrency as n, formatDate as r } from "../../utils/helpers.js";
3
+ import { PageLayout as i } from "../../components/PageLayout.js";
4
+ import { useBasePath as a } from "../../hooks/useBasePath.js";
5
+ import { StatCard as o } from "../../components/StatCard.js";
6
+ import { StatusBadge as s } from "../../components/StatusBadge.js";
7
+ import { EmptyState as c } from "../../components/EmptyState.js";
8
+ import { ErrorState as l } from "../../components/ErrorState.js";
9
+ import { FilterBar as u } from "../../components/FilterBar.js";
10
+ import { ToastContainer as d } from "../../components/Toast.js";
11
+ import { useConfirm as f } from "../../components/ConfirmDialog.js";
12
+ import { PageLoader as p } from "../../components/PageLoader.js";
13
+ import { useToast as m } from "../../hooks/useToast.js";
12
14
  import "../../components/index.js";
13
- import { useHealthyBowlData as ee } from "../../hooks/useHealthyBowlData.js";
14
- import { useOfflineSync as p } from "../../offline/OfflineSyncProvider.js";
15
- import { useMemo as m, useState as h } from "react";
16
- import { useI18n as g } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
17
- import { CheckCircle as _, ChevronDown as v, ChevronUp as y, Clock as b, CloudOff as x, FileText as S, Landmark as C, Plus as w, XCircle as T } from "lucide-react";
18
- import { useNavigate as E } from "react-router";
19
- import { jsx as D, jsxs as O } from "react/jsx-runtime";
20
- import { Button as k } from "@burdenoff/fe-libs/ui";
15
+ import { useHealthyBowlData as h } from "../../hooks/useHealthyBowlData.js";
16
+ import { useOfflineSync as g } from "../../offline/OfflineSyncProvider.js";
17
+ import { useCanManageGovernmentSchemes as ee } from "./useCanManageGovernmentSchemes.js";
18
+ import { useSchemeApplicationTransition as te } from "./useSchemeApplicationTransition.js";
19
+ import { isTerminalSchemeApplicationStatus as _, transitionActionsFor as v } from "./schemeApplicationTransitions.js";
20
+ import { useMemo as ne, useState as y } from "react";
21
+ import { useI18n as b } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
22
+ import { CheckCircle as x, ChevronDown as S, ChevronUp as C, Clock as re, CloudOff as ie, FileText as ae, Landmark as w, Plus as T, XCircle as E } from "lucide-react";
23
+ import { useNavigate as D } from "react-router";
24
+ import { jsx as O, jsxs as k } from "react/jsx-runtime";
25
+ import { Button as A } from "@burdenoff/fe-libs/ui";
21
26
  //#region src/healthybowl/pages/government-schemes/ApplicationTrackingPage.tsx
22
- var A = (e) => {
27
+ var j = (e) => {
23
28
  switch (e) {
24
29
  case "approved":
25
30
  case "disbursed": return "success";
@@ -28,264 +33,299 @@ var A = (e) => {
28
33
  case "rejected": return "error";
29
34
  default: return "default";
30
35
  }
31
- }, j = [
36
+ }, M = [
32
37
  "submitted",
33
38
  "under_review",
34
39
  "approved",
35
40
  "disbursed"
36
- ], M = (e) => {
41
+ ], N = (e) => {
37
42
  if (e === "rejected") return 1;
38
- let t = j.indexOf(e);
43
+ let t = M.indexOf(e);
39
44
  return t >= 0 ? t : 0;
40
45
  };
41
- function N(e, n) {
42
- return n ? t(e, n) : new Intl.NumberFormat(void 0, { maximumFractionDigits: 2 }).format(e);
46
+ function P(e, t) {
47
+ return t ? n(e, t) : new Intl.NumberFormat(void 0, { maximumFractionDigits: 2 }).format(e);
43
48
  }
44
- var P = () => {
45
- let { t } = g(), { schemeApplications: P, governmentSchemes: F, errors: I, loadings: L, refetch: R } = ee(), { pendingMutations: z } = p(), B = z.filter((e) => e.status !== "SYNCED"), te = [
49
+ var F = () => {
50
+ let { t: n } = b(), { schemeApplications: F, governmentSchemes: I, errors: L, loadings: R, refetch: z } = h(), { pendingMutations: B } = g(), V = B.filter((e) => e.status !== "SYNCED"), H = [
46
51
  {
47
52
  value: "all",
48
- label: t("healthybowl.common.all", "All")
53
+ label: n("healthybowl.common.all", "All")
49
54
  },
50
55
  {
51
56
  value: "submitted",
52
- label: t("healthybowl.governmentSchemes.applicationTracking.filters.submitted", "Submitted")
57
+ label: n("healthybowl.governmentSchemes.applicationTracking.filters.submitted", "Submitted")
53
58
  },
54
59
  {
55
60
  value: "under_review",
56
- label: t("healthybowl.governmentSchemes.applicationTracking.filters.underReview", "Under Review")
61
+ label: n("healthybowl.governmentSchemes.applicationTracking.filters.underReview", "Under Review")
57
62
  },
58
63
  {
59
64
  value: "approved",
60
- label: t("healthybowl.governmentSchemes.applicationTracking.filters.approved", "Approved")
65
+ label: n("healthybowl.governmentSchemes.applicationTracking.filters.approved", "Approved")
61
66
  },
62
67
  {
63
68
  value: "rejected",
64
- label: t("healthybowl.governmentSchemes.applicationTracking.filters.rejected", "Rejected")
69
+ label: n("healthybowl.governmentSchemes.applicationTracking.filters.rejected", "Rejected")
65
70
  },
66
71
  {
67
72
  value: "disbursed",
68
- label: t("healthybowl.governmentSchemes.applicationTracking.filters.disbursed", "Disbursed")
73
+ label: n("healthybowl.governmentSchemes.applicationTracking.filters.disbursed", "Disbursed")
69
74
  }
70
- ], V = E(), { buildPath: H } = i(), { toasts: U, dismiss: W } = f(), [G, K] = h("all"), [q, J] = h(""), [Y, X] = h(null), Z = m(() => new Map(F.map((e) => [e.id, e.currency])), [F]), Q = P.length, ne = P.filter((e) => e.status === "approved" || e.status === "disbursed").length, re = P.filter((e) => e.status === "under_review").length, ie = P.filter((e) => e.status === "rejected").length, $ = P.filter((e) => {
71
- let t = G === "all" || e.status === G, n = q === "" || (e.schemeName ?? "").toLowerCase().includes(q.toLowerCase());
75
+ ], U = D(), { buildPath: W } = a(), { toast: G, toasts: K, dismiss: q } = m(), { workspaceId: J } = e(), { canManage: Y } = ee(J), { transition: oe, pendingId: X } = te(), se = f(), ce = async (e, t) => {
76
+ _(t.status) && !await se({
77
+ title: n("healthybowl.governmentSchemes.tracking.confirm.title", "This cannot be undone"),
78
+ message: n("healthybowl.governmentSchemes.tracking.confirm.message", "Moving this application to {{status}} is final — nothing can move it out of that state afterwards. The applicant is notified straight away.", { status: n(t.labelKey, t.labelFallback).toLowerCase() }),
79
+ okButtonTitle: n(t.labelKey, t.labelFallback),
80
+ destructive: t.destructive
81
+ }) || await oe(e.id, t.status, {
82
+ onSuccess: () => G({
83
+ title: n("healthybowl.governmentSchemes.tracking.toast.moved", "Application updated"),
84
+ variant: "success"
85
+ }),
86
+ onError: (e) => G({
87
+ title: n("healthybowl.governmentSchemes.tracking.toast.moveFailed", "Could not update the application"),
88
+ description: e,
89
+ variant: "error"
90
+ })
91
+ });
92
+ }, [Z, le] = y("all"), [Q, ue] = y(""), [de, fe] = y(null), pe = ne(() => new Map(I.map((e) => [e.id, e.currency])), [I]), me = F.length, he = F.filter((e) => e.status === "approved" || e.status === "disbursed").length, ge = F.filter((e) => e.status === "under_review").length, _e = F.filter((e) => e.status === "rejected").length, $ = F.filter((e) => {
93
+ let t = Z === "all" || e.status === Z, n = Q === "" || (e.schemeName ?? "").toLowerCase().includes(Q.toLowerCase());
72
94
  return t && n;
73
95
  });
74
- return /* @__PURE__ */ O(r, {
75
- title: t("healthybowl.governmentSchemes.applicationTracking.title", "Application Tracking"),
76
- description: t("healthybowl.governmentSchemes.applicationTracking.description", "Track your scheme applications"),
96
+ return /* @__PURE__ */ k(i, {
97
+ title: n("healthybowl.governmentSchemes.applicationTracking.title", "Application Tracking"),
98
+ description: n("healthybowl.governmentSchemes.applicationTracking.description", "Track your scheme applications"),
77
99
  purpose: "Follow every scheme application from submitted to approved. See what's pending, what needs more documents, and what's been granted — so nothing stalls and you can chase up anything that's stuck.",
78
100
  children: [
79
- /* @__PURE__ */ O("div", {
101
+ /* @__PURE__ */ k("div", {
80
102
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",
81
103
  children: [
82
- /* @__PURE__ */ D(a, {
104
+ /* @__PURE__ */ O(o, {
83
105
  hero: !0,
84
- label: t("healthybowl.governmentSchemes.applicationTracking.stats.total.label", "Total Applications"),
85
- value: Q,
86
- icon: /* @__PURE__ */ D(S, { className: "h-4 w-4" })
106
+ label: n("healthybowl.governmentSchemes.applicationTracking.stats.total.label", "Total Applications"),
107
+ value: me,
108
+ icon: /* @__PURE__ */ O(ae, { className: "h-4 w-4" })
87
109
  }),
88
- /* @__PURE__ */ D(a, {
89
- label: t("healthybowl.governmentSchemes.applicationTracking.stats.approved.label", "Approved"),
90
- value: ne,
91
- icon: /* @__PURE__ */ D(_, { className: "h-4 w-4" })
110
+ /* @__PURE__ */ O(o, {
111
+ label: n("healthybowl.governmentSchemes.applicationTracking.stats.approved.label", "Approved"),
112
+ value: he,
113
+ icon: /* @__PURE__ */ O(x, { className: "h-4 w-4" })
92
114
  }),
93
- /* @__PURE__ */ D(a, {
94
- label: t("healthybowl.governmentSchemes.applicationTracking.stats.underReview.label", "Under Review"),
95
- value: re,
96
- icon: /* @__PURE__ */ D(b, { className: "h-4 w-4" })
115
+ /* @__PURE__ */ O(o, {
116
+ label: n("healthybowl.governmentSchemes.applicationTracking.stats.underReview.label", "Under Review"),
117
+ value: ge,
118
+ icon: /* @__PURE__ */ O(re, { className: "h-4 w-4" })
97
119
  }),
98
- /* @__PURE__ */ D(a, {
99
- label: t("healthybowl.governmentSchemes.applicationTracking.stats.rejected.label", "Rejected"),
100
- value: ie,
101
- icon: /* @__PURE__ */ D(T, { className: "h-4 w-4" })
120
+ /* @__PURE__ */ O(o, {
121
+ label: n("healthybowl.governmentSchemes.applicationTracking.stats.rejected.label", "Rejected"),
122
+ value: _e,
123
+ icon: /* @__PURE__ */ O(E, { className: "h-4 w-4" })
102
124
  })
103
125
  ]
104
126
  }),
105
- /* @__PURE__ */ D(l, {
106
- searchValue: q,
107
- onSearchChange: J,
108
- searchPlaceholder: t("healthybowl.governmentSchemes.applicationTracking.searchPlaceholder", "Search by scheme name..."),
109
- filters: /* @__PURE__ */ D("div", {
127
+ /* @__PURE__ */ O(u, {
128
+ searchValue: Q,
129
+ onSearchChange: ue,
130
+ searchPlaceholder: n("healthybowl.governmentSchemes.applicationTracking.searchPlaceholder", "Search by scheme name..."),
131
+ filters: /* @__PURE__ */ O("div", {
110
132
  className: "flex flex-wrap items-center gap-1.5",
111
- children: te.map((t) => /* @__PURE__ */ D("button", {
133
+ children: H.map((e) => /* @__PURE__ */ O("button", {
112
134
  type: "button",
113
- onClick: () => K(t.value),
114
- className: e("rounded-full px-3 py-1 text-xs font-medium transition-colors", G === t.value ? "bg-action-primary-bg text-action-primary-text" : "bg-bg-sunken text-text-secondary hover:bg-bg-sunken/80"),
115
- children: t.label
116
- }, t.value))
135
+ onClick: () => le(e.value),
136
+ className: t("rounded-full px-3 py-1 text-xs font-medium transition-colors", Z === e.value ? "bg-action-primary-bg text-action-primary-text" : "bg-bg-sunken text-text-secondary hover:bg-bg-sunken/80"),
137
+ children: e.label
138
+ }, e.value))
117
139
  }),
118
- actions: /* @__PURE__ */ O(k, {
140
+ actions: /* @__PURE__ */ k(A, {
119
141
  variant: "default",
120
142
  size: "sm",
121
- onClick: () => V(H("government-schemes/discover")),
143
+ onClick: () => U(W("government-schemes/discover")),
122
144
  children: [
123
- /* @__PURE__ */ D(w, { className: "h-3.5 w-3.5" }),
145
+ /* @__PURE__ */ O(T, { className: "h-3.5 w-3.5" }),
124
146
  " ",
125
- t("healthybowl.governmentSchemes.applicationTracking.actions.newApplication", "New Application")
147
+ n("healthybowl.governmentSchemes.applicationTracking.actions.newApplication", "New Application")
126
148
  ]
127
149
  })
128
150
  }),
129
- B.length > 0 && /* @__PURE__ */ D("div", {
151
+ V.length > 0 && /* @__PURE__ */ O("div", {
130
152
  className: "space-y-3",
131
- children: B.map((t) => {
132
- let n = t.status === "FAILED";
133
- return /* @__PURE__ */ O("div", {
134
- className: e("flex items-center gap-3 rounded-lg border border-dashed p-4", n ? "border-status-error-border bg-status-error-bgSubtle" : "border-border-subtle bg-bg-sunken"),
153
+ children: V.map((e) => {
154
+ let n = e.status === "FAILED";
155
+ return /* @__PURE__ */ k("div", {
156
+ className: t("flex items-center gap-3 rounded-lg border border-dashed p-4", n ? "border-status-error-border bg-status-error-bgSubtle" : "border-border-subtle bg-bg-sunken"),
135
157
  children: [
136
- /* @__PURE__ */ D("div", {
158
+ /* @__PURE__ */ O("div", {
137
159
  className: "rounded-md bg-bg-surface p-2",
138
- children: n ? /* @__PURE__ */ D(T, { className: "h-5 w-5 text-status-error-text" }) : /* @__PURE__ */ D(x, { className: "h-5 w-5 text-text-secondary" })
160
+ children: n ? /* @__PURE__ */ O(E, { className: "h-5 w-5 text-status-error-text" }) : /* @__PURE__ */ O(ie, { className: "h-5 w-5 text-text-secondary" })
139
161
  }),
140
- /* @__PURE__ */ O("div", {
162
+ /* @__PURE__ */ k("div", {
141
163
  className: "min-w-0 flex-1",
142
- children: [/* @__PURE__ */ D("p", {
164
+ children: [/* @__PURE__ */ O("p", {
143
165
  className: "truncate text-sm font-semibold text-text-primary",
144
- children: t.label
145
- }), /* @__PURE__ */ D("p", {
166
+ children: e.label
167
+ }), /* @__PURE__ */ O("p", {
146
168
  className: "mt-0.5 text-xs text-text-secondary",
147
- children: n ? t.message ?? "This application was refused and has not been submitted." : "Saved on this device — it will be submitted automatically when you have a connection."
169
+ children: n ? e.message ?? "This application was refused and has not been submitted." : "Saved on this device — it will be submitted automatically when you have a connection."
148
170
  })]
149
171
  }),
150
- /* @__PURE__ */ D("span", {
151
- className: e("shrink-0 rounded-full px-2.5 py-0.5 text-xs font-semibold", n ? "bg-status-error-bgSubtle text-status-error-text" : "bg-status-warning-bgSubtle text-status-warning-text"),
172
+ /* @__PURE__ */ O("span", {
173
+ className: t("shrink-0 rounded-full px-2.5 py-0.5 text-xs font-semibold", n ? "bg-status-error-bgSubtle text-status-error-text" : "bg-status-warning-bgSubtle text-status-warning-text"),
152
174
  children: n ? "Not submitted" : "Queued"
153
175
  })
154
176
  ]
155
- }, t.clientId);
177
+ }, e.clientId);
156
178
  })
157
179
  }),
158
- $.length === 0 ? L.government ? /* @__PURE__ */ D(d, {}) : I.government ? /* @__PURE__ */ D(c, { onRetry: R }) : /* @__PURE__ */ D(s, {
180
+ $.length === 0 ? R.government ? /* @__PURE__ */ O(p, {}) : L.government ? /* @__PURE__ */ O(l, { onRetry: z }) : /* @__PURE__ */ O(c, {
159
181
  illustration: "empty-files",
160
- title: t("healthybowl.governmentSchemes.applicationTracking.emptyState.title", "No Applications Found"),
161
- description: G === "all" ? t("healthybowl.governmentSchemes.applicationTracking.emptyState.message", "You have not submitted any applications yet.") : t("healthybowl.governmentSchemes.applicationTracking.emptyState.filteredMessage", "No applications match the selected filter."),
162
- action: /* @__PURE__ */ D(k, {
182
+ title: n("healthybowl.governmentSchemes.applicationTracking.emptyState.title", "No Applications Found"),
183
+ description: Z === "all" ? n("healthybowl.governmentSchemes.applicationTracking.emptyState.message", "You have not submitted any applications yet.") : n("healthybowl.governmentSchemes.applicationTracking.emptyState.filteredMessage", "No applications match the selected filter."),
184
+ action: /* @__PURE__ */ O(A, {
163
185
  variant: "default",
164
- onClick: () => V(H("government-schemes/discover")),
165
- children: t("healthybowl.governmentSchemes.applicationTracking.actions.browseSchemes", "Browse Schemes")
186
+ onClick: () => U(W("government-schemes/discover")),
187
+ children: n("healthybowl.governmentSchemes.applicationTracking.actions.browseSchemes", "Browse Schemes")
166
188
  })
167
- }) : /* @__PURE__ */ D("div", {
189
+ }) : /* @__PURE__ */ O("div", {
168
190
  className: "space-y-4",
169
- children: $.map((r) => {
170
- let i = Y === r.id, a = r.status === "rejected", s = M(r.status), c = Z.get(r.schemeId);
171
- return /* @__PURE__ */ O("div", {
191
+ children: $.map((e) => {
192
+ let i = de === e.id, a = Y ? v(e.status) : [], o = e.status === "rejected", c = N(e.status), l = pe.get(e.schemeId);
193
+ return /* @__PURE__ */ k("div", {
172
194
  className: "rounded-lg border border-border-subtle bg-bg-surface",
173
- children: [/* @__PURE__ */ O("button", {
195
+ children: [/* @__PURE__ */ k("button", {
174
196
  type: "button",
175
- onClick: () => X(i ? null : r.id),
197
+ onClick: () => fe(i ? null : e.id),
176
198
  className: "flex w-full items-center justify-between p-5 text-start",
177
- children: [/* @__PURE__ */ O("div", {
199
+ children: [/* @__PURE__ */ k("div", {
178
200
  className: "flex items-center gap-3",
179
- children: [/* @__PURE__ */ D("div", {
201
+ children: [/* @__PURE__ */ O("div", {
180
202
  className: "rounded-md bg-bg-sunken p-2",
181
- children: /* @__PURE__ */ D(C, { className: "h-5 w-5 text-text-secondary" })
182
- }), /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("p", {
203
+ children: /* @__PURE__ */ O(w, { className: "h-5 w-5 text-text-secondary" })
204
+ }), /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("p", {
183
205
  className: "text-sm font-semibold text-text-primary",
184
- children: r.schemeName
185
- }), /* @__PURE__ */ D("p", {
206
+ children: e.schemeName
207
+ }), /* @__PURE__ */ O("p", {
186
208
  className: "mt-0.5 text-xs text-text-secondary",
187
- children: t("healthybowl.governmentSchemes.applicationTracking.card.applied", "Applied: {{date}}", { date: n(r.appliedDate) })
209
+ children: n("healthybowl.governmentSchemes.applicationTracking.card.applied", "Applied: {{date}}", { date: r(e.appliedDate) })
188
210
  })] })]
189
- }), /* @__PURE__ */ O("div", {
211
+ }), /* @__PURE__ */ k("div", {
190
212
  className: "flex items-center gap-3",
191
213
  children: [
192
- r.amount != null && /* @__PURE__ */ D("span", {
214
+ e.amount != null && /* @__PURE__ */ O("span", {
193
215
  className: "text-sm font-medium text-text-primary",
194
- children: N(r.amount, c)
216
+ children: P(e.amount, l)
195
217
  }),
196
- /* @__PURE__ */ D(o, {
197
- label: (r.status ?? "unknown").replace(/_/g, " "),
198
- variant: A(r.status ?? "unknown")
218
+ /* @__PURE__ */ O(s, {
219
+ label: (e.status ?? "unknown").replace(/_/g, " "),
220
+ variant: j(e.status ?? "unknown")
199
221
  }),
200
- D(i ? y : v, { className: "h-4 w-4 text-text-secondary" })
222
+ O(i ? C : S, { className: "h-4 w-4 text-text-secondary" })
201
223
  ]
202
224
  })]
203
- }), i && /* @__PURE__ */ O("div", {
225
+ }), i && /* @__PURE__ */ k("div", {
204
226
  className: "border-t border-border-subtle px-5 pb-5 pt-4",
205
- children: [/* @__PURE__ */ O("div", {
206
- className: "mb-4",
207
- children: [/* @__PURE__ */ D("p", {
208
- className: "mb-3 text-xs font-medium text-text-primary",
209
- children: t("healthybowl.governmentSchemes.applicationTracking.progress.heading", "Application Progress")
210
- }), /* @__PURE__ */ D("div", {
211
- className: "flex items-center",
212
- children: j.map((t, n) => {
213
- let r = !a && n <= s, i = !a && n === s, o = a && n === 1;
214
- return /* @__PURE__ */ O("div", {
215
- className: "flex flex-1 items-center",
216
- children: [/* @__PURE__ */ O("div", {
217
- className: "flex flex-col items-center",
218
- children: [/* @__PURE__ */ D("div", {
219
- className: e("flex h-8 w-8 items-center justify-center rounded-full border-2", o ? "border-status-error-border bg-status-error-bg/10" : r ? "border-primary bg-action-primary-bg" : "border-border-subtle bg-bg-surface"),
220
- children: o ? /* @__PURE__ */ D(T, { className: "h-4 w-4 text-status-error-text" }) : r ? /* @__PURE__ */ D(_, { className: "h-4 w-4 text-action-primary-text" }) : /* @__PURE__ */ D("span", {
221
- className: "text-xs text-text-secondary",
222
- children: n + 1
223
- })
224
- }), /* @__PURE__ */ D("span", {
225
- className: e("mt-1 text-[10px] capitalize", i || o ? "font-semibold text-text-primary" : "text-text-secondary"),
226
- children: t.replace(/_/g, " ")
227
- })]
228
- }), n < j.length - 1 && /* @__PURE__ */ D("div", { className: e("mx-1 h-0.5 flex-1", !a && n < s ? "bg-action-primary-bg" : "bg-border") })]
229
- }, t);
230
- })
231
- })]
232
- }), /* @__PURE__ */ O("div", {
233
- className: "grid gap-3 sm:grid-cols-2",
234
- children: [
235
- /* @__PURE__ */ O("div", {
236
- className: "rounded-md bg-bg-sunken p-3",
237
- children: [/* @__PURE__ */ D("p", {
238
- className: "text-xs text-text-secondary",
239
- children: t("healthybowl.governmentSchemes.applicationTracking.details.scheme.label", "Scheme")
240
- }), /* @__PURE__ */ D("p", {
241
- className: "text-sm font-medium text-text-primary",
242
- children: r.schemeName
243
- })]
244
- }),
245
- /* @__PURE__ */ O("div", {
246
- className: "rounded-md bg-bg-sunken p-3",
247
- children: [/* @__PURE__ */ D("p", {
248
- className: "text-xs text-text-secondary",
249
- children: t("healthybowl.governmentSchemes.applicationTracking.details.appliedDate.label", "Applied Date")
250
- }), /* @__PURE__ */ D("p", {
251
- className: "text-sm font-medium text-text-primary",
252
- children: n(r.appliedDate)
253
- })]
254
- }),
255
- r.amount != null && /* @__PURE__ */ O("div", {
256
- className: "rounded-md bg-bg-sunken p-3",
257
- children: [/* @__PURE__ */ D("p", {
258
- className: "text-xs text-text-secondary",
259
- children: t("healthybowl.governmentSchemes.applicationTracking.details.amount.label", "Amount")
260
- }), /* @__PURE__ */ D("p", {
261
- className: "text-sm font-medium text-text-primary",
262
- children: N(r.amount, c)
263
- })]
264
- }),
265
- r.remarks && /* @__PURE__ */ O("div", {
266
- className: "rounded-md bg-bg-sunken p-3 sm:col-span-2",
267
- children: [/* @__PURE__ */ D("p", {
268
- className: "text-xs text-text-secondary",
269
- children: t("healthybowl.governmentSchemes.applicationTracking.details.remarks.label", "Remarks")
270
- }), /* @__PURE__ */ D("p", {
271
- className: "text-sm text-text-primary",
272
- children: r.remarks
273
- })]
274
- })
275
- ]
276
- })]
227
+ children: [
228
+ /* @__PURE__ */ k("div", {
229
+ className: "mb-4",
230
+ children: [/* @__PURE__ */ O("p", {
231
+ className: "mb-3 text-xs font-medium text-text-primary",
232
+ children: n("healthybowl.governmentSchemes.applicationTracking.progress.heading", "Application Progress")
233
+ }), /* @__PURE__ */ O("div", {
234
+ className: "flex items-center",
235
+ children: M.map((e, n) => {
236
+ let r = !o && n <= c, i = !o && n === c, a = o && n === 1;
237
+ return /* @__PURE__ */ k("div", {
238
+ className: "flex flex-1 items-center",
239
+ children: [/* @__PURE__ */ k("div", {
240
+ className: "flex flex-col items-center",
241
+ children: [/* @__PURE__ */ O("div", {
242
+ className: t("flex h-8 w-8 items-center justify-center rounded-full border-2", a ? "border-status-error-border bg-status-error-bg/10" : r ? "border-primary bg-action-primary-bg" : "border-border-subtle bg-bg-surface"),
243
+ children: a ? /* @__PURE__ */ O(E, { className: "h-4 w-4 text-status-error-text" }) : r ? /* @__PURE__ */ O(x, { className: "h-4 w-4 text-action-primary-text" }) : /* @__PURE__ */ O("span", {
244
+ className: "text-xs text-text-secondary",
245
+ children: n + 1
246
+ })
247
+ }), /* @__PURE__ */ O("span", {
248
+ className: t("mt-1 text-[10px] capitalize", i || a ? "font-semibold text-text-primary" : "text-text-secondary"),
249
+ children: e.replace(/_/g, " ")
250
+ })]
251
+ }), n < M.length - 1 && /* @__PURE__ */ O("div", { className: t("mx-1 h-0.5 flex-1", !o && n < c ? "bg-action-primary-bg" : "bg-border") })]
252
+ }, e);
253
+ })
254
+ })]
255
+ }),
256
+ /* @__PURE__ */ k("div", {
257
+ className: "grid gap-3 sm:grid-cols-2",
258
+ children: [
259
+ /* @__PURE__ */ k("div", {
260
+ className: "rounded-md bg-bg-sunken p-3",
261
+ children: [/* @__PURE__ */ O("p", {
262
+ className: "text-xs text-text-secondary",
263
+ children: n("healthybowl.governmentSchemes.applicationTracking.details.scheme.label", "Scheme")
264
+ }), /* @__PURE__ */ O("p", {
265
+ className: "text-sm font-medium text-text-primary",
266
+ children: e.schemeName
267
+ })]
268
+ }),
269
+ /* @__PURE__ */ k("div", {
270
+ className: "rounded-md bg-bg-sunken p-3",
271
+ children: [/* @__PURE__ */ O("p", {
272
+ className: "text-xs text-text-secondary",
273
+ children: n("healthybowl.governmentSchemes.applicationTracking.details.appliedDate.label", "Applied Date")
274
+ }), /* @__PURE__ */ O("p", {
275
+ className: "text-sm font-medium text-text-primary",
276
+ children: r(e.appliedDate)
277
+ })]
278
+ }),
279
+ e.amount != null && /* @__PURE__ */ k("div", {
280
+ className: "rounded-md bg-bg-sunken p-3",
281
+ children: [/* @__PURE__ */ O("p", {
282
+ className: "text-xs text-text-secondary",
283
+ children: n("healthybowl.governmentSchemes.applicationTracking.details.amount.label", "Amount")
284
+ }), /* @__PURE__ */ O("p", {
285
+ className: "text-sm font-medium text-text-primary",
286
+ children: P(e.amount, l)
287
+ })]
288
+ }),
289
+ e.remarks && /* @__PURE__ */ k("div", {
290
+ className: "rounded-md bg-bg-sunken p-3 sm:col-span-2",
291
+ children: [/* @__PURE__ */ O("p", {
292
+ className: "text-xs text-text-secondary",
293
+ children: n("healthybowl.governmentSchemes.applicationTracking.details.remarks.label", "Remarks")
294
+ }), /* @__PURE__ */ O("p", {
295
+ className: "text-sm text-text-primary",
296
+ children: e.remarks
297
+ })]
298
+ })
299
+ ]
300
+ }),
301
+ Y && a.length > 0 ? /* @__PURE__ */ k("div", {
302
+ className: "mt-3 flex flex-wrap items-center gap-2 border-t border-border-subtle pt-3",
303
+ children: [/* @__PURE__ */ O("span", {
304
+ className: "text-xs text-text-secondary",
305
+ children: n("healthybowl.governmentSchemes.tracking.moveTo", "Move this application to:")
306
+ }), a.map((t) => /* @__PURE__ */ O(A, {
307
+ size: "sm",
308
+ variant: t.destructive ? "outline" : "default",
309
+ disabled: X !== null,
310
+ onClick: () => {
311
+ ce(e, t);
312
+ },
313
+ children: X === e.id ? n("common.saving", "Saving…") : n(t.labelKey, t.labelFallback)
314
+ }, t.status))]
315
+ }) : null
316
+ ]
277
317
  })]
278
- }, r.id);
318
+ }, e.id);
279
319
  })
280
320
  }),
281
- /* @__PURE__ */ D(u, {
282
- toasts: U,
283
- onDismiss: W
321
+ /* @__PURE__ */ O(d, {
322
+ toasts: K,
323
+ onDismiss: q
284
324
  })
285
325
  ]
286
326
  });
287
327
  };
288
328
  //#endregion
289
- export { P as ApplicationTrackingPage };
329
+ export { F as ApplicationTrackingPage };
290
330
 
291
331
  //# sourceMappingURL=ApplicationTrackingPage.js.map