@gelabs/ovr 0.4.3 → 0.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/dist/accounts.d.ts +52 -0
  2. package/dist/accounts.js +13 -0
  3. package/dist/audit.d.ts +13 -0
  4. package/dist/audit.js +11 -0
  5. package/dist/auth-auth.d.ts +1 -1
  6. package/dist/auth.d.ts +1 -1
  7. package/dist/chunk-4EDMZRGS.js +98 -0
  8. package/dist/chunk-4JMHQKMK.js +268 -0
  9. package/dist/chunk-6662IONX.js +69 -0
  10. package/dist/chunk-6WMPBAUH.js +18 -0
  11. package/dist/chunk-7GVZZWK3.js +74 -0
  12. package/dist/chunk-ACXED4UH.js +403 -0
  13. package/dist/chunk-BBTAG3FD.js +165 -0
  14. package/dist/chunk-HX7QT2FE.js +452 -0
  15. package/dist/chunk-LC3S47FM.js +468 -0
  16. package/dist/chunk-NPTR7GFZ.js +432 -0
  17. package/dist/chunk-SLQRZBMR.js +66 -0
  18. package/dist/chunk-UBUXPJLN.js +29 -0
  19. package/dist/chunk-UN6Z4WGF.js +31 -0
  20. package/dist/chunk-YE3D2DYY.js +83 -0
  21. package/dist/citizen.d.ts +5 -0
  22. package/dist/citizen.js +12 -0
  23. package/dist/config.d.ts +2 -2
  24. package/dist/core-i18n.d.ts +1 -1
  25. package/dist/core.d.ts +2 -2
  26. package/dist/dashboard.d.ts +10 -0
  27. package/dist/dashboard.js +3 -0
  28. package/dist/data-mock-store.d.ts +1 -1
  29. package/dist/{format-C7MSwUHK.d.ts → format-VyCUfF8R.d.ts} +1 -1
  30. package/dist/generated/client/edge.js +2 -2
  31. package/dist/generated/client/index.js +2 -2
  32. package/dist/generated/client/wasm.js +2 -2
  33. package/dist/index.d.ts +2 -2
  34. package/dist/notifications.d.ts +6 -0
  35. package/dist/notifications.js +11 -0
  36. package/dist/officers.d.ts +27 -0
  37. package/dist/officers.js +11 -0
  38. package/dist/offline.d.ts +1 -1
  39. package/dist/payments.d.ts +15 -0
  40. package/dist/payments.js +11 -0
  41. package/dist/roles.d.ts +37 -0
  42. package/dist/roles.js +12 -0
  43. package/dist/runtime.d.ts +1 -1
  44. package/dist/tickets.d.ts +6 -0
  45. package/dist/tickets.js +24 -0
  46. package/dist/ui-components-admin/accounts-manager.d.ts +3 -52
  47. package/dist/ui-components-admin/accounts-manager.js +11 -468
  48. package/dist/ui-components-admin/admin-nav.js +9 -81
  49. package/dist/ui-components-admin/issuance-form.js +15 -432
  50. package/dist/ui-components-admin/logs-viewer.d.ts +3 -13
  51. package/dist/ui-components-admin/logs-viewer.js +8 -98
  52. package/dist/ui-components-admin/notifications-list.js +6 -66
  53. package/dist/ui-components-admin/officers-manager.d.ts +3 -27
  54. package/dist/ui-components-admin/officers-manager.js +9 -268
  55. package/dist/ui-components-admin/roles-manager.d.ts +3 -37
  56. package/dist/ui-components-admin/roles-manager.js +10 -403
  57. package/dist/ui-components-admin/stat-card.d.ts +2 -10
  58. package/dist/ui-components-admin/stat-card.js +3 -29
  59. package/dist/ui-components-admin/ticket-preview.js +2 -2
  60. package/dist/ui-components-admin/tickets-table.js +7 -69
  61. package/dist/ui-components-admin/violations-manager.js +13 -452
  62. package/dist/ui-components-citizen/citizen-nav.js +3 -31
  63. package/dist/ui-components-citizen/payment-form.d.ts +3 -14
  64. package/dist/ui-components-citizen/payment-form.js +9 -165
  65. package/dist/ui-components-citizen/payment-qr-dialog.js +2 -2
  66. package/dist/ui-components-citizen/ticket-not-found.js +4 -18
  67. package/dist/ui-components-citizen/violation-history-table.js +6 -74
  68. package/dist/ui-config.d.ts +2 -2
  69. package/dist/ui-server.d.ts +2 -2
  70. package/dist/violations.d.ts +3 -0
  71. package/dist/violations.js +14 -0
  72. package/package.json +42 -2
  73. package/dist/{chunk-ZUMEOZ22.js → chunk-JTSTNZAB.js} +1 -1
  74. package/dist/{chunk-TLG4C2XI.js → chunk-QCAURREW.js} +1 -1
  75. package/dist/{schema-CdsFQxIg.d.ts → schema-BUhh_mKX.d.ts} +108 -108
@@ -1,454 +1,15 @@
1
1
  "use client";
2
- import { Textarea } from '../chunk-QCRVT2SS.js';
3
- import { Money } from '../chunk-BVI5XDDA.js';
4
- import { Card, CardContent } from '../chunk-SETIN6XP.js';
5
- import { usePagination, Pagination } from '../chunk-6YFZLXFP.js';
6
- import { Table, TableHeader, TableRow, TableHead, TableBody, TableCell } from '../chunk-OWCGEEAZ.js';
7
- import { Badge } from '../chunk-55FQP2DO.js';
8
- import { Label } from '../chunk-XQTVSNHC.js';
9
- import { Dialog, DialogTrigger, DialogContent, DialogHeader, DialogTitle, DialogDescription, DialogFooter, DialogClose } from '../chunk-M35R6JLA.js';
10
- import { Input } from '../chunk-K3KIBHJF.js';
11
- import { Button } from '../chunk-I4WDVYHX.js';
12
- import { useCopy } from '../chunk-TJSNVTVB.js';
13
- import { cn } from '../chunk-77QBZC7J.js';
2
+ export { ViolationsManager } from '../chunk-HX7QT2FE.js';
3
+ import '../chunk-QCRVT2SS.js';
4
+ import '../chunk-XQTVSNHC.js';
5
+ import '../chunk-M35R6JLA.js';
6
+ import '../chunk-6YFZLXFP.js';
7
+ import '../chunk-K3KIBHJF.js';
8
+ import '../chunk-BVI5XDDA.js';
9
+ import '../chunk-OWCGEEAZ.js';
10
+ import '../chunk-55FQP2DO.js';
11
+ import '../chunk-I4WDVYHX.js';
12
+ import '../chunk-TJSNVTVB.js';
13
+ import '../chunk-SETIN6XP.js';
14
+ import '../chunk-77QBZC7J.js';
14
15
  import '../chunk-BI4EGLPG.js';
15
- import * as React from 'react';
16
- import { toast } from 'sonner';
17
- import { useRouter } from 'next/navigation';
18
- import { Plus, Pencil, Loader2, Archive, ArchiveRestore, Trash2 } from 'lucide-react';
19
- import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
20
-
21
- var fieldClass = "h-9 w-full rounded-lg border border-input bg-transparent px-2.5 text-sm shadow-xs outline-none transition-colors focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:opacity-50 dark:bg-input/30";
22
- function ViolationsManager({
23
- violations,
24
- createAction,
25
- updateAction,
26
- deleteAction,
27
- usedCodes = [],
28
- purgeAction
29
- }) {
30
- const t = useCopy().admin.violationsPage;
31
- const router = useRouter();
32
- const used = React.useMemo(() => new Set(usedCodes), [usedCodes]);
33
- const { pageItems, page, setPage, totalPages, from, to, total } = usePagination(violations, 12);
34
- const categoryLabel = (c) => c === "TRAFFIC" ? t.categoryTraffic : t.categoryOrdinance;
35
- return /* @__PURE__ */ jsxs("div", { className: "mx-auto w-full max-w-5xl p-4 sm:p-6 lg:p-8", children: [
36
- /* @__PURE__ */ jsxs("div", { className: "mb-6 flex items-center justify-between gap-3", children: [
37
- /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
38
- /* @__PURE__ */ jsx("h1", { className: "font-heading text-2xl font-semibold tracking-tight", children: t.title }),
39
- /* @__PURE__ */ jsx("p", { className: "max-w-2xl text-sm text-muted-foreground", children: t.subtitle })
40
- ] }),
41
- /* @__PURE__ */ jsx(
42
- ViolationDialog,
43
- {
44
- mode: "create",
45
- createAction,
46
- onDone: () => router.refresh()
47
- }
48
- )
49
- ] }),
50
- /* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsx(CardContent, { className: "p-0", children: violations.length === 0 ? /* @__PURE__ */ jsx("p", { className: "p-8 text-center text-sm text-muted-foreground", children: t.empty }) : /* @__PURE__ */ jsxs(Fragment, { children: [
51
- /* @__PURE__ */ jsxs(Table, { children: [
52
- /* @__PURE__ */ jsx(TableHeader, { children: /* @__PURE__ */ jsxs(TableRow, { children: [
53
- /* @__PURE__ */ jsx(TableHead, { children: t.code }),
54
- /* @__PURE__ */ jsx(TableHead, { children: t.titleLabel }),
55
- /* @__PURE__ */ jsx(TableHead, { className: "hidden sm:table-cell", children: t.category }),
56
- /* @__PURE__ */ jsx(TableHead, { className: "text-right", children: t.fine }),
57
- /* @__PURE__ */ jsx(TableHead, { children: t.status }),
58
- /* @__PURE__ */ jsx(TableHead, { className: "text-right", children: t.actions })
59
- ] }) }),
60
- /* @__PURE__ */ jsx(TableBody, { children: pageItems.map((v) => {
61
- const archived = v.active === false;
62
- return /* @__PURE__ */ jsxs(TableRow, { className: cn(archived && "opacity-60"), children: [
63
- /* @__PURE__ */ jsx(TableCell, { className: "font-mono text-xs", children: v.code }),
64
- /* @__PURE__ */ jsx(TableCell, { className: "font-medium", children: v.title }),
65
- /* @__PURE__ */ jsx(TableCell, { className: "hidden text-muted-foreground sm:table-cell", children: categoryLabel(v.category) }),
66
- /* @__PURE__ */ jsx(TableCell, { className: "text-right", children: /* @__PURE__ */ jsx(Money, { value: v.basicFine }) }),
67
- /* @__PURE__ */ jsx(TableCell, { children: /* @__PURE__ */ jsx(Badge, { variant: archived ? "outline" : "secondary", children: archived ? t.archived : t.active }) }),
68
- /* @__PURE__ */ jsx(TableCell, { children: /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-1.5", children: [
69
- /* @__PURE__ */ jsx(
70
- ViolationDialog,
71
- {
72
- mode: "edit",
73
- violation: v,
74
- updateAction,
75
- onDone: () => router.refresh()
76
- }
77
- ),
78
- archived ? /* @__PURE__ */ jsx(
79
- RestoreButton,
80
- {
81
- violation: v,
82
- updateAction,
83
- onDone: () => router.refresh()
84
- }
85
- ) : /* @__PURE__ */ jsx(
86
- ArchiveButton,
87
- {
88
- violation: v,
89
- deleteAction,
90
- onDone: () => router.refresh()
91
- }
92
- ),
93
- purgeAction && !used.has(v.code) ? /* @__PURE__ */ jsx(
94
- DeleteButton,
95
- {
96
- violation: v,
97
- purgeAction,
98
- onDone: () => router.refresh()
99
- }
100
- ) : null
101
- ] }) })
102
- ] }, v.code);
103
- }) })
104
- ] }),
105
- /* @__PURE__ */ jsx(
106
- Pagination,
107
- {
108
- page,
109
- totalPages,
110
- from,
111
- to,
112
- total,
113
- onPage: setPage
114
- }
115
- )
116
- ] }) }) })
117
- ] });
118
- }
119
- function ViolationDialog({
120
- mode,
121
- violation,
122
- createAction,
123
- updateAction,
124
- onDone
125
- }) {
126
- const t = useCopy().admin.violationsPage;
127
- const [open, setOpen] = React.useState(false);
128
- const [code, setCode] = React.useState(violation?.code ?? "");
129
- const [title, setTitle] = React.useState(violation?.title ?? "");
130
- const [category, setCategory] = React.useState(
131
- violation?.category ?? "TRAFFIC"
132
- );
133
- const [fine, setFine] = React.useState(
134
- violation ? String(violation.basicFine) : ""
135
- );
136
- const [legalText, setLegalText] = React.useState(violation?.legalText ?? "");
137
- const [submitting, setSubmitting] = React.useState(false);
138
- function resetTo(v) {
139
- setCode(v?.code ?? "");
140
- setTitle(v?.title ?? "");
141
- setCategory(v?.category ?? "TRAFFIC");
142
- setFine(v ? String(v.basicFine) : "");
143
- setLegalText(v?.legalText ?? "");
144
- }
145
- async function submit(e) {
146
- e.preventDefault();
147
- if (mode === "create" && !code.trim())
148
- return toast.error(`${t.code} is required.`);
149
- if (!title.trim()) return toast.error(`${t.titleLabel} is required.`);
150
- const fineNum = Number(fine);
151
- if (!Number.isFinite(fineNum) || fineNum < 0)
152
- return toast.error(`${t.fine} must be a number \u2265 0.`);
153
- setSubmitting(true);
154
- try {
155
- let res;
156
- if (mode === "create") {
157
- const input = {
158
- code: code.trim(),
159
- title: title.trim(),
160
- category,
161
- basicFine: fineNum,
162
- legalText: legalText.trim() || void 0
163
- };
164
- res = await createAction?.(input);
165
- } else {
166
- res = await updateAction?.(violation.code, {
167
- title: title.trim(),
168
- category,
169
- basicFine: fineNum,
170
- legalText: legalText.trim() || void 0
171
- });
172
- }
173
- if (res?.error) {
174
- toast.error(res.error);
175
- return;
176
- }
177
- toast.success(
178
- `${mode === "create" ? t.create : t.editTitle}: ${title.trim()}`
179
- );
180
- setOpen(false);
181
- onDone();
182
- } finally {
183
- setSubmitting(false);
184
- }
185
- }
186
- return /* @__PURE__ */ jsxs(
187
- Dialog,
188
- {
189
- open,
190
- onOpenChange: (o) => {
191
- if (o) resetTo(violation);
192
- setOpen(o);
193
- },
194
- children: [
195
- /* @__PURE__ */ jsxs(
196
- DialogTrigger,
197
- {
198
- render: mode === "create" ? /* @__PURE__ */ jsx(Button, { className: "gap-1.5" }) : /* @__PURE__ */ jsx(Button, { variant: "outline", size: "sm", className: "gap-1.5" }),
199
- children: [
200
- mode === "create" ? /* @__PURE__ */ jsx(Plus, { className: "size-4" }) : /* @__PURE__ */ jsx(Pencil, { className: "size-3.5" }),
201
- /* @__PURE__ */ jsx("span", { className: mode === "create" ? "" : "hidden sm:inline", children: mode === "create" ? t.newViolation : t.edit })
202
- ]
203
- }
204
- ),
205
- /* @__PURE__ */ jsxs(DialogContent, { className: "sm:max-w-md", children: [
206
- /* @__PURE__ */ jsxs(DialogHeader, { children: [
207
- /* @__PURE__ */ jsx(DialogTitle, { children: mode === "create" ? t.newViolation : t.editTitle }),
208
- /* @__PURE__ */ jsx(DialogDescription, { children: t.subtitle })
209
- ] }),
210
- /* @__PURE__ */ jsxs("form", { onSubmit: submit, className: "space-y-4", children: [
211
- /* @__PURE__ */ jsxs("div", { className: "space-y-1.5", children: [
212
- /* @__PURE__ */ jsx(Label, { htmlFor: "vio-code", children: t.code }),
213
- /* @__PURE__ */ jsx(
214
- Input,
215
- {
216
- id: "vio-code",
217
- value: code,
218
- onChange: (e) => setCode(e.target.value),
219
- placeholder: t.codePlaceholder,
220
- autoComplete: "off",
221
- disabled: mode === "edit",
222
- autoFocus: mode === "create"
223
- }
224
- )
225
- ] }),
226
- /* @__PURE__ */ jsxs("div", { className: "space-y-1.5", children: [
227
- /* @__PURE__ */ jsx(Label, { htmlFor: "vio-title", children: t.titleLabel }),
228
- /* @__PURE__ */ jsx(
229
- Input,
230
- {
231
- id: "vio-title",
232
- value: title,
233
- onChange: (e) => setTitle(e.target.value),
234
- placeholder: t.titlePlaceholder,
235
- autoComplete: "off",
236
- autoFocus: mode === "edit"
237
- }
238
- )
239
- ] }),
240
- /* @__PURE__ */ jsxs("div", { className: "grid gap-4 sm:grid-cols-2", children: [
241
- /* @__PURE__ */ jsxs("div", { className: "space-y-1.5", children: [
242
- /* @__PURE__ */ jsx(Label, { htmlFor: "vio-category", children: t.category }),
243
- /* @__PURE__ */ jsxs(
244
- "select",
245
- {
246
- id: "vio-category",
247
- value: category,
248
- onChange: (e) => setCategory(e.target.value),
249
- className: fieldClass,
250
- children: [
251
- /* @__PURE__ */ jsx("option", { value: "TRAFFIC", children: t.categoryTraffic }),
252
- /* @__PURE__ */ jsx("option", { value: "ORDINANCE", children: t.categoryOrdinance })
253
- ]
254
- }
255
- )
256
- ] }),
257
- /* @__PURE__ */ jsxs("div", { className: "space-y-1.5", children: [
258
- /* @__PURE__ */ jsx(Label, { htmlFor: "vio-fine", children: t.fine }),
259
- /* @__PURE__ */ jsx(
260
- Input,
261
- {
262
- id: "vio-fine",
263
- type: "number",
264
- min: "0",
265
- step: "1",
266
- inputMode: "numeric",
267
- value: fine,
268
- onChange: (e) => setFine(e.target.value),
269
- placeholder: t.finePlaceholder,
270
- autoComplete: "off"
271
- }
272
- )
273
- ] })
274
- ] }),
275
- /* @__PURE__ */ jsxs("div", { className: "space-y-1.5", children: [
276
- /* @__PURE__ */ jsx(Label, { htmlFor: "vio-legal", children: t.legalText }),
277
- /* @__PURE__ */ jsx(
278
- Textarea,
279
- {
280
- id: "vio-legal",
281
- value: legalText,
282
- onChange: (e) => setLegalText(e.target.value),
283
- placeholder: t.legalTextPlaceholder,
284
- rows: 2
285
- }
286
- )
287
- ] }),
288
- /* @__PURE__ */ jsxs(DialogFooter, { children: [
289
- /* @__PURE__ */ jsx(DialogClose, { render: /* @__PURE__ */ jsx(Button, { type: "button", variant: "outline" }), children: t.cancel }),
290
- /* @__PURE__ */ jsxs(Button, { type: "submit", disabled: submitting, className: "gap-1.5", children: [
291
- submitting ? /* @__PURE__ */ jsx(Loader2, { className: "size-4 animate-spin" }) : null,
292
- submitting ? mode === "create" ? t.creating : t.saving : mode === "create" ? t.create : t.save
293
- ] })
294
- ] })
295
- ] })
296
- ] })
297
- ]
298
- }
299
- );
300
- }
301
- function ArchiveButton({
302
- violation,
303
- deleteAction,
304
- onDone
305
- }) {
306
- const t = useCopy().admin.violationsPage;
307
- const [busy, setBusy] = React.useState(false);
308
- async function archive() {
309
- setBusy(true);
310
- try {
311
- const res = await deleteAction(violation.code);
312
- if (res?.error) {
313
- toast.error(res.error);
314
- return;
315
- }
316
- toast.success(`${t.archive}: ${violation.title}`);
317
- onDone();
318
- } finally {
319
- setBusy(false);
320
- }
321
- }
322
- return /* @__PURE__ */ jsxs(Dialog, { children: [
323
- /* @__PURE__ */ jsxs(
324
- DialogTrigger,
325
- {
326
- render: /* @__PURE__ */ jsx(Button, { variant: "outline", size: "sm", className: "gap-1.5" }),
327
- children: [
328
- /* @__PURE__ */ jsx(Archive, { className: "size-3.5" }),
329
- /* @__PURE__ */ jsx("span", { className: "hidden sm:inline", children: t.archive })
330
- ]
331
- }
332
- ),
333
- /* @__PURE__ */ jsxs(DialogContent, { className: "sm:max-w-sm", children: [
334
- /* @__PURE__ */ jsxs(DialogHeader, { children: [
335
- /* @__PURE__ */ jsx(DialogTitle, { children: t.archiveConfirmTitle }),
336
- /* @__PURE__ */ jsxs(DialogDescription, { children: [
337
- violation.title,
338
- " \u2014 ",
339
- t.archiveConfirmBody
340
- ] })
341
- ] }),
342
- /* @__PURE__ */ jsxs(DialogFooter, { children: [
343
- /* @__PURE__ */ jsx(DialogClose, { render: /* @__PURE__ */ jsx(Button, { variant: "outline" }), children: t.cancel }),
344
- /* @__PURE__ */ jsxs(
345
- DialogClose,
346
- {
347
- render: /* @__PURE__ */ jsx(Button, { className: "gap-2", disabled: busy }),
348
- onClick: archive,
349
- children: [
350
- /* @__PURE__ */ jsx(Archive, { className: "size-4" }),
351
- t.archive
352
- ]
353
- }
354
- )
355
- ] })
356
- ] })
357
- ] });
358
- }
359
- function RestoreButton({
360
- violation,
361
- updateAction,
362
- onDone
363
- }) {
364
- const t = useCopy().admin.violationsPage;
365
- const [busy, setBusy] = React.useState(false);
366
- async function restore() {
367
- setBusy(true);
368
- try {
369
- const res = await updateAction(violation.code, { active: true });
370
- if (res?.error) {
371
- toast.error(res.error);
372
- return;
373
- }
374
- toast.success(`${t.restore}: ${violation.title}`);
375
- onDone();
376
- } finally {
377
- setBusy(false);
378
- }
379
- }
380
- return /* @__PURE__ */ jsxs(
381
- Button,
382
- {
383
- variant: "outline",
384
- size: "sm",
385
- className: "gap-1.5",
386
- disabled: busy,
387
- onClick: restore,
388
- children: [
389
- busy ? /* @__PURE__ */ jsx(Loader2, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ jsx(ArchiveRestore, { className: "size-3.5" }),
390
- /* @__PURE__ */ jsx("span", { className: "hidden sm:inline", children: t.restore })
391
- ]
392
- }
393
- );
394
- }
395
- function DeleteButton({
396
- violation,
397
- purgeAction,
398
- onDone
399
- }) {
400
- const t = useCopy().admin.violationsPage;
401
- const [busy, setBusy] = React.useState(false);
402
- async function purge() {
403
- setBusy(true);
404
- try {
405
- const res = await purgeAction(violation.code);
406
- if (res?.error) {
407
- toast.error(res.error);
408
- return;
409
- }
410
- toast.success(`${t.delete}: ${violation.title}`);
411
- onDone();
412
- } finally {
413
- setBusy(false);
414
- }
415
- }
416
- return /* @__PURE__ */ jsxs(Dialog, { children: [
417
- /* @__PURE__ */ jsxs(
418
- DialogTrigger,
419
- {
420
- render: /* @__PURE__ */ jsx(Button, { variant: "destructive", size: "sm", className: "gap-1.5" }),
421
- children: [
422
- /* @__PURE__ */ jsx(Trash2, { className: "size-3.5" }),
423
- /* @__PURE__ */ jsx("span", { className: "hidden sm:inline", children: t.delete })
424
- ]
425
- }
426
- ),
427
- /* @__PURE__ */ jsxs(DialogContent, { className: "sm:max-w-sm", children: [
428
- /* @__PURE__ */ jsxs(DialogHeader, { children: [
429
- /* @__PURE__ */ jsx(DialogTitle, { children: t.deleteConfirmTitle }),
430
- /* @__PURE__ */ jsxs(DialogDescription, { children: [
431
- violation.title,
432
- " \u2014 ",
433
- t.deleteConfirmBody
434
- ] })
435
- ] }),
436
- /* @__PURE__ */ jsxs(DialogFooter, { children: [
437
- /* @__PURE__ */ jsx(DialogClose, { render: /* @__PURE__ */ jsx(Button, { variant: "outline" }), children: t.cancel }),
438
- /* @__PURE__ */ jsxs(
439
- DialogClose,
440
- {
441
- render: /* @__PURE__ */ jsx(Button, { variant: "destructive", className: "gap-2", disabled: busy }),
442
- onClick: purge,
443
- children: [
444
- /* @__PURE__ */ jsx(Trash2, { className: "size-4" }),
445
- t.delete
446
- ]
447
- }
448
- )
449
- ] })
450
- ] })
451
- ] });
452
- }
453
-
454
- export { ViolationsManager };
@@ -1,33 +1,5 @@
1
1
  "use client";
2
- import { useCopy } from '../chunk-TJSNVTVB.js';
3
- import { cn } from '../chunk-77QBZC7J.js';
2
+ export { CitizenNav } from '../chunk-UN6Z4WGF.js';
3
+ import '../chunk-TJSNVTVB.js';
4
+ import '../chunk-77QBZC7J.js';
4
5
  import '../chunk-BI4EGLPG.js';
5
- import Link from 'next/link';
6
- import { usePathname } from 'next/navigation';
7
- import { jsx } from 'react/jsx-runtime';
8
-
9
- function CitizenNav() {
10
- const pathname = usePathname();
11
- const copy = useCopy();
12
- const items = [
13
- { href: "/citizen", label: "Home", exact: true },
14
- { href: "/citizen/search", label: copy.citizen.home.searchCta }
15
- ];
16
- return /* @__PURE__ */ jsx("nav", { className: "flex items-center gap-1", children: items.map((it) => {
17
- const active = it.exact ? pathname === it.href : pathname.startsWith(it.href);
18
- return /* @__PURE__ */ jsx(
19
- Link,
20
- {
21
- href: it.href,
22
- className: cn(
23
- "rounded-md px-2.5 py-1.5 text-sm font-medium transition-colors sm:px-3",
24
- active ? "bg-white/15 text-gov-foreground" : "text-gov-foreground/80 hover:bg-white/10 hover:text-gov-foreground"
25
- ),
26
- children: it.label
27
- },
28
- it.href
29
- );
30
- }) });
31
- }
32
-
33
- export { CitizenNav };
@@ -1,14 +1,3 @@
1
- import * as React from 'react';
2
- import { PayAction } from './payment-qr-dialog.js';
3
-
4
- declare function PaymentForm({ ovrTicketNo, lastName, violatorName, basicFines, penalty, amount, payAction, }: {
5
- ovrTicketNo: string;
6
- lastName: string;
7
- violatorName: string;
8
- basicFines: number;
9
- penalty: number;
10
- amount: number;
11
- payAction: PayAction;
12
- }): React.JSX.Element;
13
-
14
- export { PaymentForm };
1
+ export { PaymentForm } from '../payments.js';
2
+ import './payment-qr-dialog.js';
3
+ import 'react';