@burdenoff/microfe-govcitizenhub 2026.720.6 → 2026.720.7

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/govcitizenhub/hooks/index.d.ts +1 -0
  2. package/dist/govcitizenhub/hooks/index.d.ts.map +1 -1
  3. package/dist/govcitizenhub/hooks/index.js +1 -0
  4. package/dist/govcitizenhub/hooks/useGovApi.d.ts +20 -0
  5. package/dist/govcitizenhub/hooks/useGovApi.d.ts.map +1 -1
  6. package/dist/govcitizenhub/hooks/useGovApi.js +18 -7
  7. package/dist/govcitizenhub/hooks/useGovApi.js.map +1 -1
  8. package/dist/govcitizenhub/hooks/useGovCitizenHubAnalytics.d.ts +24 -0
  9. package/dist/govcitizenhub/hooks/useGovCitizenHubAnalytics.d.ts.map +1 -0
  10. package/dist/govcitizenhub/hooks/useGovCitizenHubAnalytics.js +40 -0
  11. package/dist/govcitizenhub/hooks/useGovCitizenHubAnalytics.js.map +1 -0
  12. package/dist/govcitizenhub/pages/applications/ApplicationDetailPage.d.ts.map +1 -1
  13. package/dist/govcitizenhub/pages/applications/ApplicationDetailPage.js +169 -163
  14. package/dist/govcitizenhub/pages/applications/ApplicationDetailPage.js.map +1 -1
  15. package/dist/govcitizenhub/pages/applications/NewApplicationPage.d.ts.map +1 -1
  16. package/dist/govcitizenhub/pages/applications/NewApplicationPage.js +151 -147
  17. package/dist/govcitizenhub/pages/applications/NewApplicationPage.js.map +1 -1
  18. package/dist/govcitizenhub/pages/grievances/GrievancesPage.d.ts.map +1 -1
  19. package/dist/govcitizenhub/pages/grievances/GrievancesPage.js +173 -169
  20. package/dist/govcitizenhub/pages/grievances/GrievancesPage.js.map +1 -1
  21. package/dist/govcitizenhub/pages/payments/PaymentsPage.d.ts.map +1 -1
  22. package/dist/govcitizenhub/pages/payments/PaymentsPage.js +53 -49
  23. package/dist/govcitizenhub/pages/payments/PaymentsPage.js.map +1 -1
  24. package/dist/govcitizenhub/pages/permits/IssuePermitDialog.d.ts.map +1 -1
  25. package/dist/govcitizenhub/pages/permits/IssuePermitDialog.js +82 -76
  26. package/dist/govcitizenhub/pages/permits/IssuePermitDialog.js.map +1 -1
  27. package/dist/govcitizenhub/pages/permits/PermitsPage.d.ts.map +1 -1
  28. package/dist/govcitizenhub/pages/permits/PermitsPage.js +174 -120
  29. package/dist/govcitizenhub/pages/permits/PermitsPage.js.map +1 -1
  30. package/package.json +1 -1
@@ -2,72 +2,73 @@ import { useGovCitizenHub as e } from "../../context/GovCitizenHubContext.js";
2
2
  import "../../context/index.js";
3
3
  import { PageLayout as t } from "../../components/PageLayout.js";
4
4
  import { formatCurrency as n } from "../../utils/formatters.js";
5
- import { StatusBadge as r } from "../../components/StatusBadge.js";
6
- import { EmptyState as i } from "../../components/EmptyState.js";
7
- import { useGovCreateApplication as ee, useGovService as te, useGovServices as ne, useGovSubmitApplication as a } from "../../hooks/useGovApi.js";
8
- import { FILE_FOLDERS as o, uploadFileToFiles as s } from "../../hooks/useFiles.js";
5
+ import { StatusBadge as ee } from "../../components/StatusBadge.js";
6
+ import { EmptyState as te } from "../../components/EmptyState.js";
7
+ import { useGovCreateApplication as ne, useGovService as re, useGovServices as ie, useGovSubmitApplication as r } from "../../hooks/useGovApi.js";
8
+ import { FILE_FOLDERS as i, uploadFileToFiles as a } from "../../hooks/useFiles.js";
9
+ import { useGovCitizenHubAnalytics as ae } from "../../hooks/useGovCitizenHubAnalytics.js";
9
10
  import "../../hooks/index.js";
10
- import { ErrorView as c, LoadingView as l } from "../../components/StateViews.js";
11
- import { describeError as u, notify as d } from "../../lib/toast.js";
12
- import { StatusStepper as re } from "../../components/StatusStepper.js";
13
- import { KeyValueList as f } from "../../components/KeyValueList.js";
14
- import { isFieldVisible as ie, parseFormFields as ae } from "../../utils/dynamicForm.js";
15
- import { DynamicFormFields as p } from "../../components/DynamicFormFields.js";
16
- import { useMemo as m, useState as h } from "react";
17
- import { ChevronLeft as g, ChevronRight as _, Clock as v, FileText as y, Loader2 as b, Save as x, Send as oe } from "lucide-react";
18
- import { useSearchParams as se } from "react-router-dom";
19
- import { Fragment as ce, jsx as S, jsxs as C } from "react/jsx-runtime";
20
- import { Button as w, GlassCard as T, Input as le, Label as E, Select as ue, SelectContent as de, SelectItem as fe, SelectTrigger as pe, SelectValue as me, Textarea as he } from "@burdenoff/fe-libs/ui";
11
+ import { ErrorView as o, LoadingView as s } from "../../components/StateViews.js";
12
+ import { describeError as c, notify as l } from "../../lib/toast.js";
13
+ import { StatusStepper as oe } from "../../components/StatusStepper.js";
14
+ import { KeyValueList as u } from "../../components/KeyValueList.js";
15
+ import { isFieldVisible as se, parseFormFields as d } from "../../utils/dynamicForm.js";
16
+ import { DynamicFormFields as f } from "../../components/DynamicFormFields.js";
17
+ import { useMemo as p, useState as m } from "react";
18
+ import { ChevronLeft as h, ChevronRight as g, Clock as _, FileText as v, Loader2 as ce, Save as y, Send as le } from "lucide-react";
19
+ import { useSearchParams as ue } from "react-router-dom";
20
+ import { Fragment as de, jsx as b, jsxs as x } from "react/jsx-runtime";
21
+ import { Button as S, GlassCard as C, Input as fe, Label as w, Select as pe, SelectContent as me, SelectItem as he, SelectTrigger as ge, SelectValue as _e, Textarea as ve } from "@burdenoff/fe-libs/ui";
21
22
  //#region src/govcitizenhub/pages/applications/NewApplicationPage.tsx
22
- var ge = [
23
+ var T = [
23
24
  "LOW",
24
25
  "NORMAL",
25
26
  "HIGH",
26
27
  "URGENT"
27
- ], D = [
28
+ ], E = [
28
29
  "choose",
29
30
  "fill",
30
31
  "review"
31
32
  ];
32
- function O({ service: e }) {
33
- return /* @__PURE__ */ C("div", {
33
+ function D({ service: e }) {
34
+ return /* @__PURE__ */ x("div", {
34
35
  className: "flex flex-wrap items-center gap-x-3 gap-y-1.5 rounded-xl border border-border-seam bg-[var(--color-accent-soft)]/50 px-4 py-3",
35
36
  children: [
36
- /* @__PURE__ */ S("span", {
37
+ /* @__PURE__ */ b("span", {
37
38
  className: "inline-flex size-9 shrink-0 items-center justify-center rounded-lg bg-bg-surface text-action-primary-text",
38
- children: /* @__PURE__ */ S(y, { className: "size-5" })
39
+ children: /* @__PURE__ */ b(v, { className: "size-5" })
39
40
  }),
40
- /* @__PURE__ */ S("span", {
41
+ /* @__PURE__ */ b("span", {
41
42
  className: "text-base font-semibold text-text-primary",
42
43
  children: e.name
43
44
  }),
44
- /* @__PURE__ */ S("span", {
45
+ /* @__PURE__ */ b("span", {
45
46
  "aria-hidden": !0,
46
47
  className: "text-text-muted",
47
48
  children: "·"
48
49
  }),
49
- /* @__PURE__ */ S("span", {
50
+ /* @__PURE__ */ b("span", {
50
51
  className: "text-sm text-text-secondary",
51
52
  children: e.agency?.name ?? "Agency"
52
53
  }),
53
- /* @__PURE__ */ S("span", {
54
+ /* @__PURE__ */ b("span", {
54
55
  "aria-hidden": !0,
55
56
  className: "text-text-muted",
56
57
  children: "·"
57
58
  }),
58
- /* @__PURE__ */ S("span", {
59
+ /* @__PURE__ */ b("span", {
59
60
  className: "text-sm text-text-secondary",
60
61
  children: e.feeType === "FREE" ? "Free" : n(e.feeAmount, e.currency)
61
62
  }),
62
- /* @__PURE__ */ S("span", {
63
+ /* @__PURE__ */ b("span", {
63
64
  "aria-hidden": !0,
64
65
  className: "text-text-muted",
65
66
  children: "·"
66
67
  }),
67
- /* @__PURE__ */ C("span", {
68
+ /* @__PURE__ */ x("span", {
68
69
  className: "inline-flex items-center gap-1 text-sm text-text-secondary",
69
70
  children: [
70
- /* @__PURE__ */ S(v, { className: "size-3.5" }),
71
+ /* @__PURE__ */ b(_, { className: "size-3.5" }),
71
72
  " ",
72
73
  e.slaDays,
73
74
  "-day SLA"
@@ -76,317 +77,320 @@ function O({ service: e }) {
76
77
  ]
77
78
  });
78
79
  }
79
- function k() {
80
- let { navigateTo: v } = e(), [k] = se(), A = k.get("serviceId") ?? void 0, [j, M] = h(A), [N, P] = h(!1), F = j ?? A, I = ne({
80
+ function O() {
81
+ let { navigateTo: _, workspaceId: O } = e(), { emitApplicationCreated: k } = ae(), [A] = ue(), j = A.get("serviceId") ?? void 0, [M, N] = m(j), [P, F] = m(!1), I = M ?? j, L = ie({
81
82
  status: "PUBLISHED",
82
83
  pagination: { limit: 50 }
83
- }), { data: L, isLoading: _e, isError: ve, refetch: ye } = te(F), R = ee(), z = a(), B = m(() => ae(L?.formSchema ?? null), [L?.formSchema]), [V, be] = h({}), [H, xe] = h({}), [Se, U] = h(null), [W, Ce] = h(""), [G, we] = h(""), [K, Te] = h("NORMAL"), q = (e, t) => be((n) => ({
84
+ }), { data: R, isLoading: ye, isError: be, refetch: xe } = re(I), z = ne(), B = r(), V = p(() => d(R?.formSchema ?? null), [R?.formSchema]), [H, Se] = m({}), [U, Ce] = m({}), [we, W] = m(null), [G, Te] = m(""), [K, Ee] = m(""), [q, De] = m("NORMAL"), J = (e, t) => Se((n) => ({
84
85
  ...n,
85
86
  [e]: t
86
- })), J = async (e, t) => {
87
+ })), Oe = async (e, t) => {
87
88
  let n = t?.[0];
88
89
  if (n) {
89
- U(e);
90
+ W(e);
90
91
  try {
91
- let t = await s(n, o.documents);
92
- q(e, t.id), xe((n) => ({
92
+ let t = await a(n, i.documents);
93
+ J(e, t.id), Ce((n) => ({
93
94
  ...n,
94
95
  [e]: t.name
95
96
  }));
96
97
  } catch (e) {
97
- d.error("Upload failed", u(e));
98
+ l.error("Upload failed", c(e));
98
99
  } finally {
99
- U(null);
100
+ W(null);
100
101
  }
101
102
  }
102
- }, Y = m(() => B.filter((e) => ie(e, V, B)), [B, V]), Ee = () => {
103
+ }, Y = p(() => V.filter((e) => se(e, H, V)), [V, H]), ke = () => {
103
104
  if (Y.length > 0) {
104
105
  let e = {};
105
- for (let t of Y) e[t.key] = V[t.key] ?? "";
106
+ for (let t of Y) e[t.key] = H[t.key] ?? "";
106
107
  return e;
107
108
  }
108
- return W.trim() ? { details: W.trim() } : {};
109
- }, X = Y.some((e) => e.required && !(V[e.key] ?? "").trim()), Z = async (e) => {
110
- if (F) try {
111
- let t = await R.mutateAsync({
112
- serviceId: F,
113
- formData: Ee(),
114
- priority: K,
115
- reference: G.trim() || null
109
+ return G.trim() ? { details: G.trim() } : {};
110
+ }, X = Y.some((e) => e.required && !(H[e.key] ?? "").trim()), Z = async (e) => {
111
+ if (I) try {
112
+ let t = await z.mutateAsync({
113
+ serviceId: I,
114
+ formData: ke(),
115
+ priority: q,
116
+ reference: K.trim() || null
116
117
  });
117
- e ? (await z.mutateAsync(t.id), d.success("Application submitted", t.reference)) : d.success("Draft saved", t.reference), v(`applications/${t.id}`);
118
+ k({
119
+ workspaceId: O,
120
+ id: t.id
121
+ }), e ? (await B.mutateAsync(t.id), l.success("Application submitted", t.reference)) : l.success("Draft saved", t.reference), _(`applications/${t.id}`);
118
122
  } catch (e) {
119
- d.error("Could not file the application", u(e));
123
+ l.error("Could not file the application", c(e));
120
124
  }
121
- }, Q = R.isPending || z.isPending, De = F ? N ? 2 : 1 : 0, Oe = [
125
+ }, Q = z.isPending || B.isPending, Ae = I ? P ? 2 : 1 : 0, je = [
122
126
  {
123
- key: D[0],
127
+ key: E[0],
124
128
  label: "Choose service"
125
129
  },
126
130
  {
127
- key: D[1],
131
+ key: E[1],
128
132
  label: "Fill form"
129
133
  },
130
134
  {
131
- key: D[2],
135
+ key: E[2],
132
136
  label: "Review & submit"
133
137
  }
134
- ], ke = (e) => e.type === "file" ? H[e.key] ?? "" : V[e.key] ?? "", $ = /* @__PURE__ */ S(re, {
135
- steps: Oe,
136
- current: De,
138
+ ], Me = (e) => e.type === "file" ? U[e.key] ?? "" : H[e.key] ?? "", $ = /* @__PURE__ */ b(oe, {
139
+ steps: je,
140
+ current: Ae,
137
141
  className: "mb-6"
138
142
  });
139
- return F ? /* @__PURE__ */ C(t, {
143
+ return I ? /* @__PURE__ */ x(t, {
140
144
  title: "New application",
141
145
  back: {
142
146
  label: "Applications",
143
- onClick: () => v("applications")
147
+ onClick: () => _("applications")
144
148
  },
145
- description: L ? `Applying for ${L.name}` : "Loading service…",
146
- children: [$, _e ? /* @__PURE__ */ S(l, { label: "Loading service…" }) : ve || !L ? /* @__PURE__ */ S(c, {
149
+ description: R ? `Applying for ${R.name}` : "Loading service…",
150
+ children: [$, ye ? /* @__PURE__ */ b(s, { label: "Loading service…" }) : be || !R ? /* @__PURE__ */ b(o, {
147
151
  message: "We couldn't load this service.",
148
- onRetry: () => ye()
149
- }) : /* @__PURE__ */ C("div", {
152
+ onRetry: () => xe()
153
+ }) : /* @__PURE__ */ x("div", {
150
154
  className: "max-w-3xl space-y-4",
151
- children: [/* @__PURE__ */ S(O, { service: L }), N ? /* @__PURE__ */ C(T, {
155
+ children: [/* @__PURE__ */ b(D, { service: R }), P ? /* @__PURE__ */ x(C, {
152
156
  treatment: "plain",
153
157
  className: "border-border-seam p-6",
154
158
  children: [
155
- /* @__PURE__ */ S("h2", {
159
+ /* @__PURE__ */ b("h2", {
156
160
  className: "text-lg font-semibold text-text-primary",
157
161
  children: "Review your application"
158
162
  }),
159
- /* @__PURE__ */ S("p", {
163
+ /* @__PURE__ */ b("p", {
160
164
  className: "mt-0.5 text-sm text-text-muted",
161
165
  children: "Check the details below, then submit or save as a draft."
162
166
  }),
163
- /* @__PURE__ */ C("div", {
167
+ /* @__PURE__ */ x("div", {
164
168
  className: "mt-5 space-y-5",
165
169
  children: [
166
- /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("h3", {
170
+ /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("h3", {
167
171
  className: "mb-2 text-sm font-semibold text-text-secondary",
168
172
  children: "Application"
169
- }), /* @__PURE__ */ S(f, {
173
+ }), /* @__PURE__ */ b(u, {
170
174
  items: [
171
175
  {
172
176
  label: "Service",
173
- value: L.name
177
+ value: R.name
174
178
  },
175
179
  {
176
180
  label: "Agency",
177
- value: L.agency?.name ?? "—"
181
+ value: R.agency?.name ?? "—"
178
182
  },
179
183
  {
180
184
  label: "Priority",
181
- value: K.charAt(0) + K.slice(1).toLowerCase()
185
+ value: q.charAt(0) + q.slice(1).toLowerCase()
182
186
  },
183
187
  {
184
188
  label: "Reference",
185
- value: G.trim() || "Auto-generated"
189
+ value: K.trim() || "Auto-generated"
186
190
  }
187
191
  ],
188
192
  columns: 2
189
193
  })] }),
190
- Y.length > 0 && /* @__PURE__ */ C("div", {
194
+ Y.length > 0 && /* @__PURE__ */ x("div", {
191
195
  className: "border-t border-border-seam pt-4",
192
- children: [/* @__PURE__ */ S("h3", {
196
+ children: [/* @__PURE__ */ b("h3", {
193
197
  className: "mb-2 text-sm font-semibold text-text-secondary",
194
198
  children: "Your answers"
195
- }), /* @__PURE__ */ S(f, {
199
+ }), /* @__PURE__ */ b(u, {
196
200
  variant: "stacked",
197
201
  columns: 2,
198
202
  items: Y.map((e) => ({
199
- label: /* @__PURE__ */ C(ce, { children: [e.label, e.required && /* @__PURE__ */ S("span", {
203
+ label: /* @__PURE__ */ x(de, { children: [e.label, e.required && /* @__PURE__ */ b("span", {
200
204
  className: "text-status-error-text",
201
205
  children: " *"
202
206
  })] }),
203
- value: ke(e) || /* @__PURE__ */ S("span", {
207
+ value: Me(e) || /* @__PURE__ */ b("span", {
204
208
  className: "text-text-muted",
205
209
  children: "Not provided"
206
210
  })
207
211
  }))
208
212
  })]
209
213
  }),
210
- B.length === 0 && W.trim() && /* @__PURE__ */ C("div", {
214
+ V.length === 0 && G.trim() && /* @__PURE__ */ x("div", {
211
215
  className: "border-t border-border-seam pt-4",
212
- children: [/* @__PURE__ */ S("h3", {
216
+ children: [/* @__PURE__ */ b("h3", {
213
217
  className: "mb-1.5 text-sm font-semibold text-text-secondary",
214
218
  children: "Details"
215
- }), /* @__PURE__ */ S("p", {
219
+ }), /* @__PURE__ */ b("p", {
216
220
  className: "whitespace-pre-wrap text-sm text-text-primary",
217
- children: W.trim()
221
+ children: G.trim()
218
222
  })]
219
223
  })
220
224
  ]
221
225
  }),
222
- /* @__PURE__ */ C("div", {
226
+ /* @__PURE__ */ x("div", {
223
227
  className: "mt-6 flex flex-col gap-2 sm:flex-row sm:justify-between",
224
- children: [/* @__PURE__ */ C(w, {
228
+ children: [/* @__PURE__ */ x(S, {
225
229
  variant: "ghost",
226
- onClick: () => P(!1),
230
+ onClick: () => F(!1),
227
231
  disabled: Q,
228
- children: [/* @__PURE__ */ S(g, { className: "mr-1.5 h-4 w-4" }), " Back to edit"]
229
- }), /* @__PURE__ */ C("div", {
232
+ children: [/* @__PURE__ */ b(h, { className: "mr-1.5 h-4 w-4" }), " Back to edit"]
233
+ }), /* @__PURE__ */ x("div", {
230
234
  className: "flex flex-col gap-2 sm:flex-row",
231
- children: [/* @__PURE__ */ C(w, {
235
+ children: [/* @__PURE__ */ x(S, {
232
236
  variant: "outline",
233
237
  onClick: () => Z(!1),
234
238
  disabled: Q,
235
- children: [/* @__PURE__ */ S(x, { className: "mr-1.5 h-4 w-4" }), " Save draft"]
236
- }), /* @__PURE__ */ C(w, {
239
+ children: [/* @__PURE__ */ b(y, { className: "mr-1.5 h-4 w-4" }), " Save draft"]
240
+ }), /* @__PURE__ */ x(S, {
237
241
  onClick: () => Z(!0),
238
242
  disabled: Q || X,
239
- children: [Q ? /* @__PURE__ */ S(b, { className: "mr-1.5 h-4 w-4 animate-spin" }) : /* @__PURE__ */ S(oe, { className: "mr-1.5 h-4 w-4" }), "Submit application"]
243
+ children: [Q ? /* @__PURE__ */ b(ce, { className: "mr-1.5 h-4 w-4 animate-spin" }) : /* @__PURE__ */ b(le, { className: "mr-1.5 h-4 w-4" }), "Submit application"]
240
244
  })]
241
245
  })]
242
246
  })
243
247
  ]
244
- }) : /* @__PURE__ */ S(T, {
248
+ }) : /* @__PURE__ */ b(C, {
245
249
  treatment: "plain",
246
250
  className: "border-border-seam p-6",
247
- children: /* @__PURE__ */ C("div", {
251
+ children: /* @__PURE__ */ x("div", {
248
252
  className: "flex flex-col gap-4",
249
253
  children: [
250
- /* @__PURE__ */ C("div", {
254
+ /* @__PURE__ */ x("div", {
251
255
  className: "grid gap-4 sm:grid-cols-2",
252
- children: [/* @__PURE__ */ C("div", {
256
+ children: [/* @__PURE__ */ x("div", {
253
257
  className: "grid gap-1.5",
254
- children: [/* @__PURE__ */ S(E, {
258
+ children: [/* @__PURE__ */ b(w, {
255
259
  htmlFor: "app-ref",
256
260
  children: "Reference (optional)"
257
- }), /* @__PURE__ */ S(le, {
261
+ }), /* @__PURE__ */ b(fe, {
258
262
  id: "app-ref",
259
- value: G,
260
- onChange: (e) => we(e.target.value),
263
+ value: K,
264
+ onChange: (e) => Ee(e.target.value),
261
265
  placeholder: "Auto-generated if left blank"
262
266
  })]
263
- }), /* @__PURE__ */ C("div", {
267
+ }), /* @__PURE__ */ x("div", {
264
268
  className: "grid gap-1.5",
265
- children: [/* @__PURE__ */ S(E, { children: "Priority" }), /* @__PURE__ */ C(ue, {
266
- value: K,
267
- onValueChange: (e) => Te(e),
268
- children: [/* @__PURE__ */ S(pe, {
269
+ children: [/* @__PURE__ */ b(w, { children: "Priority" }), /* @__PURE__ */ x(pe, {
270
+ value: q,
271
+ onValueChange: (e) => De(e),
272
+ children: [/* @__PURE__ */ b(ge, {
269
273
  "aria-label": "Priority",
270
- children: /* @__PURE__ */ S(me, {})
271
- }), /* @__PURE__ */ S(de, { children: ge.map((e) => /* @__PURE__ */ S(fe, {
274
+ children: /* @__PURE__ */ b(_e, {})
275
+ }), /* @__PURE__ */ b(me, { children: T.map((e) => /* @__PURE__ */ b(he, {
272
276
  value: e,
273
277
  children: e.charAt(0) + e.slice(1).toLowerCase()
274
278
  }, e)) })]
275
279
  })]
276
280
  })]
277
281
  }),
278
- B.length > 0 ? /* @__PURE__ */ S(p, {
279
- fields: B,
280
- values: V,
281
- onChange: q,
282
- fileNames: H,
283
- uploadingKey: Se,
284
- onFileSelect: J
285
- }) : /* @__PURE__ */ C("div", {
282
+ V.length > 0 ? /* @__PURE__ */ b(f, {
283
+ fields: V,
284
+ values: H,
285
+ onChange: J,
286
+ fileNames: U,
287
+ uploadingKey: we,
288
+ onFileSelect: Oe
289
+ }) : /* @__PURE__ */ x("div", {
286
290
  className: "grid gap-1.5",
287
- children: [/* @__PURE__ */ S(E, {
291
+ children: [/* @__PURE__ */ b(w, {
288
292
  htmlFor: "app-details",
289
293
  children: "Application details"
290
- }), /* @__PURE__ */ S(he, {
294
+ }), /* @__PURE__ */ b(ve, {
291
295
  id: "app-details",
292
- value: W,
293
- onChange: (e) => Ce(e.target.value),
296
+ value: G,
297
+ onChange: (e) => Te(e.target.value),
294
298
  placeholder: "Describe your request and include any relevant information.",
295
299
  rows: 5
296
300
  })]
297
301
  }),
298
- L.requiredDocuments.length > 0 && /* @__PURE__ */ C("p", {
302
+ R.requiredDocuments.length > 0 && /* @__PURE__ */ x("p", {
299
303
  className: "rounded-lg bg-bg-sunken px-3 py-2 text-xs text-text-secondary",
300
304
  children: [
301
305
  "You will be able to upload the required documents (",
302
- L.requiredDocuments.join(", "),
306
+ R.requiredDocuments.join(", "),
303
307
  ") from the application page after filing."
304
308
  ]
305
309
  }),
306
- X && /* @__PURE__ */ C("p", {
310
+ X && /* @__PURE__ */ x("p", {
307
311
  className: "text-xs text-text-muted",
308
312
  children: [
309
313
  "Fields marked ",
310
- /* @__PURE__ */ S("span", {
314
+ /* @__PURE__ */ b("span", {
311
315
  className: "text-status-error-text",
312
316
  children: "*"
313
317
  }),
314
318
  " are required to submit — you can still save a draft."
315
319
  ]
316
320
  }),
317
- /* @__PURE__ */ C("div", {
321
+ /* @__PURE__ */ x("div", {
318
322
  className: "mt-2 flex flex-col gap-2 sm:flex-row sm:justify-end",
319
- children: [/* @__PURE__ */ C(w, {
323
+ children: [/* @__PURE__ */ x(S, {
320
324
  variant: "outline",
321
325
  onClick: () => Z(!1),
322
326
  disabled: Q,
323
- children: [/* @__PURE__ */ S(x, { className: "mr-1.5 h-4 w-4" }), " Save draft"]
324
- }), /* @__PURE__ */ C(w, {
325
- onClick: () => P(!0),
327
+ children: [/* @__PURE__ */ b(y, { className: "mr-1.5 h-4 w-4" }), " Save draft"]
328
+ }), /* @__PURE__ */ x(S, {
329
+ onClick: () => F(!0),
326
330
  disabled: Q,
327
- children: ["Review & submit ", /* @__PURE__ */ S(_, { className: "ml-1.5 h-4 w-4" })]
331
+ children: ["Review & submit ", /* @__PURE__ */ b(g, { className: "ml-1.5 h-4 w-4" })]
328
332
  })]
329
333
  })
330
334
  ]
331
335
  })
332
336
  })]
333
337
  })]
334
- }) : /* @__PURE__ */ C(t, {
338
+ }) : /* @__PURE__ */ x(t, {
335
339
  title: "New application",
336
340
  back: {
337
341
  label: "Applications",
338
- onClick: () => v("applications")
342
+ onClick: () => _("applications")
339
343
  },
340
344
  description: "Choose the service you want to apply for.",
341
- children: [$, I.isLoading ? /* @__PURE__ */ S(l, { label: "Loading services…" }) : I.isError ? /* @__PURE__ */ S(c, {
345
+ children: [$, L.isLoading ? /* @__PURE__ */ b(s, { label: "Loading services…" }) : L.isError ? /* @__PURE__ */ b(o, {
342
346
  message: "We couldn't load services.",
343
- onRetry: () => I.refetch()
344
- }) : (I.data?.items.length ?? 0) === 0 ? /* @__PURE__ */ S(i, {
347
+ onRetry: () => L.refetch()
348
+ }) : (L.data?.items.length ?? 0) === 0 ? /* @__PURE__ */ b(te, {
345
349
  illustration: "empty-data",
346
350
  title: "No published services",
347
351
  description: "There are no services available to apply for yet. Publish a service first.",
348
- action: /* @__PURE__ */ S(w, {
349
- onClick: () => v("services"),
352
+ action: /* @__PURE__ */ b(S, {
353
+ onClick: () => _("services"),
350
354
  children: "Go to services"
351
355
  })
352
- }) : /* @__PURE__ */ S("div", {
356
+ }) : /* @__PURE__ */ b("div", {
353
357
  className: "grid gap-3 sm:grid-cols-2",
354
- children: I.data?.items.map((e) => /* @__PURE__ */ C("button", {
358
+ children: L.data?.items.map((e) => /* @__PURE__ */ x("button", {
355
359
  type: "button",
356
- onClick: () => M(e.id),
360
+ onClick: () => N(e.id),
357
361
  className: "group flex items-center gap-3 rounded-xl border border-border-seam bg-bg-surface p-4 text-left outline-none transition-colors hover:bg-bg-sunken focus-visible:ring-1 focus-visible:ring-border-focus",
358
362
  children: [
359
- /* @__PURE__ */ S("span", {
363
+ /* @__PURE__ */ b("span", {
360
364
  className: "inline-flex size-10 shrink-0 items-center justify-center rounded-xl bg-[var(--color-accent-soft)] text-action-primary-text",
361
- children: /* @__PURE__ */ S(y, { className: "size-5" })
365
+ children: /* @__PURE__ */ b(v, { className: "size-5" })
362
366
  }),
363
- /* @__PURE__ */ C("div", {
367
+ /* @__PURE__ */ x("div", {
364
368
  className: "min-w-0 flex-1",
365
369
  children: [
366
- /* @__PURE__ */ S("p", {
370
+ /* @__PURE__ */ b("p", {
367
371
  className: "truncate font-medium text-text-primary",
368
372
  children: e.name
369
373
  }),
370
- /* @__PURE__ */ S("p", {
374
+ /* @__PURE__ */ b("p", {
371
375
  className: "truncate text-xs text-text-muted",
372
376
  children: e.agency?.name ?? "Agency"
373
377
  }),
374
- /* @__PURE__ */ C("div", {
378
+ /* @__PURE__ */ x("div", {
375
379
  className: "mt-2 flex items-center gap-2",
376
- children: [/* @__PURE__ */ S(r, { status: e.category }), /* @__PURE__ */ S("span", {
380
+ children: [/* @__PURE__ */ b(ee, { status: e.category }), /* @__PURE__ */ b("span", {
377
381
  className: "text-xs text-text-secondary",
378
382
  children: e.feeType === "FREE" ? "Free" : n(e.feeAmount, e.currency)
379
383
  })]
380
384
  })
381
385
  ]
382
386
  }),
383
- /* @__PURE__ */ S(_, { className: "h-4 w-4 shrink-0 text-text-muted transition-transform group-hover:translate-x-0.5" })
387
+ /* @__PURE__ */ b(g, { className: "h-4 w-4 shrink-0 text-text-muted transition-transform group-hover:translate-x-0.5" })
384
388
  ]
385
389
  }, e.id))
386
390
  })]
387
391
  });
388
392
  }
389
393
  //#endregion
390
- export { k as NewApplicationPage };
394
+ export { O as NewApplicationPage };
391
395
 
392
396
  //# sourceMappingURL=NewApplicationPage.js.map