braid-ui 1.0.5 → 1.0.6

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.
package/dist/index.js CHANGED
@@ -1,32 +1,34 @@
1
- import * as React13 from 'react';
1
+ import * as React15 from 'react';
2
2
  import { useState, useEffect, useCallback, useMemo } from 'react';
3
3
  import { cva } from 'class-variance-authority';
4
4
  import { clsx } from 'clsx';
5
5
  import { twMerge } from 'tailwind-merge';
6
6
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
7
- import { Slot } from '@radix-ui/react-slot';
8
- import { ChevronDown, ChevronUp, Check, X, PanelLeft, Edit, Home, Globe, CreditCard, Building, MoreVertical, Minus, TrendingDown, TrendingUp, ChevronRight, Eye, Trash2, Plus, MessageSquare, Upload, FileText, Download, Copy, LayoutDashboard, Bell, Briefcase, FileCheck, Receipt, ArrowLeftRight, Users, Building2, Zap, Shield, AlertCircle, RefreshCw, Landmark, Search, Repeat, Box, Settings, BarChart3, Key, Heart, User, AlertTriangle, XCircle, CheckCircle, Clock, Filter, ChevronLeft, Calendar as Calendar$1, CalendarIcon, CheckCircle2, Circle, UserPlus, ChevronsUpDown } from 'lucide-react';
7
+ import { ChevronDown, ChevronUp, Check, X, PanelLeft, Edit, Home, Globe, CreditCard, Building, MoreVertical, Minus, TrendingDown, TrendingUp, ChevronRight, Eye, Trash2, Plus, MessageSquare, Upload, FileText, Download, Copy, LayoutDashboard, Bell, Briefcase, FileCheck, Receipt, ArrowLeftRight, Users, Building2, Zap, Shield, AlertCircle, RefreshCw, Landmark, Search, Repeat, Box, Settings, BarChart3, Key, Heart, User, AlertTriangle, XCircle, CheckCircle, Clock, CalendarIcon, ArrowDownRight, ArrowUpRight, Filter, ChevronLeft, Calendar as Calendar$1, CheckCircle2, StickyNote, FileUp, Circle, UserPlus, ChevronsUpDown, FileJson } from 'lucide-react';
9
8
  import { createPortal } from 'react-dom';
9
+ import { Slot } from '@radix-ui/react-slot';
10
10
  import * as SelectPrimitive from '@radix-ui/react-select';
11
+ import { NavLink, useLocation, useParams, useNavigate, Link } from 'react-router-dom';
12
+ import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
11
13
  import * as DialogPrimitive from '@radix-ui/react-dialog';
12
- import { NavLink, useLocation, useParams, useNavigate } from 'react-router-dom';
13
- import { Collapsible, CollapsibleTrigger, CollapsibleContent } from '@radix-ui/react-collapsible';
14
- import * as SeparatorPrimitive from '@radix-ui/react-separator';
15
- import * as TooltipPrimitive from '@radix-ui/react-tooltip';
16
14
  import { FormProvider as FormProvider$1, useFormContext, Controller, useForm } from 'react-hook-form';
17
15
  import { zodResolver } from '@hookform/resolvers/zod';
18
16
  import { z } from 'zod';
17
+ import { Collapsible, CollapsibleTrigger, CollapsibleContent } from '@radix-ui/react-collapsible';
18
+ import * as SeparatorPrimitive from '@radix-ui/react-separator';
19
+ import * as TooltipPrimitive from '@radix-ui/react-tooltip';
19
20
  import * as LabelPrimitive from '@radix-ui/react-label';
21
+ import { format } from 'date-fns';
20
22
  import { DayPicker } from 'react-day-picker';
21
- import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
22
23
  import * as PopoverPrimitive from '@radix-ui/react-popover';
24
+ import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
25
+ import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
23
26
  import { useTheme } from 'next-themes';
24
27
  import { Toaster as Toaster$1, toast as toast$1 } from 'sonner';
25
28
  import * as TabsPrimitive from '@radix-ui/react-tabs';
26
29
  import * as ToastPrimitives from '@radix-ui/react-toast';
27
- import { format } from 'date-fns';
28
30
 
29
- // src/components/ui/form-card.tsx
31
+ // src/components/alerts/OFACAlertView.tsx
30
32
  function cn(...inputs) {
31
33
  return twMerge(clsx(inputs));
32
34
  }
@@ -64,7 +66,7 @@ var cardVariants = cva(
64
66
  }
65
67
  }
66
68
  );
67
- var Card = React13.forwardRef(
69
+ var Card = React15.forwardRef(
68
70
  ({ className, variant, size, fullHeight, interactive, ...props }, ref) => /* @__PURE__ */ jsx(
69
71
  "div",
70
72
  {
@@ -101,7 +103,7 @@ var cardHeaderVariants = cva(
101
103
  }
102
104
  }
103
105
  );
104
- var CardHeader = React13.forwardRef(
106
+ var CardHeader = React15.forwardRef(
105
107
  ({ className, size, align, direction, ...props }, ref) => /* @__PURE__ */ jsx(
106
108
  "div",
107
109
  {
@@ -127,7 +129,7 @@ var cardTitleVariants = cva(
127
129
  }
128
130
  }
129
131
  );
130
- var CardTitle = React13.forwardRef(
132
+ var CardTitle = React15.forwardRef(
131
133
  ({ className, size, ...props }, ref) => /* @__PURE__ */ jsx(
132
134
  "h3",
133
135
  {
@@ -138,7 +140,7 @@ var CardTitle = React13.forwardRef(
138
140
  )
139
141
  );
140
142
  CardTitle.displayName = "CardTitle";
141
- var CardDescription = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
143
+ var CardDescription = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
142
144
  "p",
143
145
  {
144
146
  ref,
@@ -167,7 +169,7 @@ var cardContentVariants = cva(
167
169
  }
168
170
  }
169
171
  );
170
- var CardContent = React13.forwardRef(
172
+ var CardContent = React15.forwardRef(
171
173
  ({ className, size, fullHeight, ...props }, ref) => /* @__PURE__ */ jsx(
172
174
  "div",
173
175
  {
@@ -200,7 +202,7 @@ var cardFooterVariants = cva(
200
202
  }
201
203
  }
202
204
  );
203
- var CardFooter = React13.forwardRef(
205
+ var CardFooter = React15.forwardRef(
204
206
  ({ className, size, justify, ...props }, ref) => /* @__PURE__ */ jsx(
205
207
  "div",
206
208
  {
@@ -211,7 +213,7 @@ var CardFooter = React13.forwardRef(
211
213
  )
212
214
  );
213
215
  CardFooter.displayName = "CardFooter";
214
- var FormCard = React13.forwardRef(
216
+ var FormCard = React15.forwardRef(
215
217
  ({ title, description, children, headerActions, className, variant = "default", ...props }, ref) => /* @__PURE__ */ jsxs(
216
218
  Card,
217
219
  {
@@ -238,45 +240,6 @@ var FormCard = React13.forwardRef(
238
240
  )
239
241
  );
240
242
  FormCard.displayName = "FormCard";
241
- var buttonVariants = cva(
242
- "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
243
- {
244
- variants: {
245
- variant: {
246
- default: "bg-primary text-primary-foreground hover:bg-primary/90",
247
- destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
248
- outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
249
- secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
250
- ghost: "hover:bg-accent hover:text-accent-foreground",
251
- link: "text-primary underline-offset-4 hover:underline"
252
- },
253
- size: {
254
- default: "h-10 px-4 py-2",
255
- sm: "h-9 rounded-md px-3",
256
- lg: "h-11 rounded-md px-8",
257
- icon: "h-10 w-10"
258
- }
259
- },
260
- defaultVariants: {
261
- variant: "default",
262
- size: "default"
263
- }
264
- }
265
- );
266
- var Button = React13.forwardRef(
267
- ({ className, variant, size, asChild = false, ...props }, ref) => {
268
- const Comp = asChild ? Slot : "button";
269
- return /* @__PURE__ */ jsx(
270
- Comp,
271
- {
272
- className: cn(buttonVariants({ variant, size, className })),
273
- ref,
274
- ...props
275
- }
276
- );
277
- }
278
- );
279
- Button.displayName = "Button";
280
243
  var badgeVariants = cva(
281
244
  "inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
282
245
  {
@@ -288,6 +251,8 @@ var badgeVariants = cva(
288
251
  outline: "text-foreground",
289
252
  success: "border-transparent bg-success text-success-foreground hover:bg-success/80",
290
253
  warning: "border-transparent bg-warning text-warning-foreground hover:bg-warning/80",
254
+ inbound: "border-transparent bg-blue-500 text-white hover:bg-blue-600",
255
+ outbound: "border-transparent bg-orange-500 text-white hover:bg-orange-600",
291
256
  // Business type specific variants
292
257
  business: "border-blue-200 bg-blue-50 text-blue-700 hover:bg-blue-100 dark:border-blue-800 dark:bg-blue-950 dark:text-blue-300",
293
258
  individual: "border-green-200 bg-green-50 text-green-700 hover:bg-green-100 dark:border-green-800 dark:bg-green-950 dark:text-green-300",
@@ -320,6 +285,11 @@ function Badge({ className, variant, ...props }) {
320
285
  }
321
286
  var AlertTimeline = ({ events }) => {
322
287
  const getIcon = (action) => {
288
+ if (action.includes("Note added")) return /* @__PURE__ */ jsx(StickyNote, { className: "h-4 w-4" });
289
+ if (action.includes("Document added")) return /* @__PURE__ */ jsx(FileUp, { className: "h-4 w-4" });
290
+ if (action.includes("Alert Approved")) return /* @__PURE__ */ jsx(CheckCircle, { className: "h-4 w-4" });
291
+ if (action.includes("Alert Declined")) return /* @__PURE__ */ jsx(XCircle, { className: "h-4 w-4" });
292
+ if (action.includes("RFI Status change")) return /* @__PURE__ */ jsx(RefreshCw, { className: "h-4 w-4" });
323
293
  if (action.includes("Created")) return /* @__PURE__ */ jsx(Circle, { className: "h-4 w-4" });
324
294
  if (action.includes("Assigned")) return /* @__PURE__ */ jsx(UserPlus, { className: "h-4 w-4" });
325
295
  if (action.includes("Updated") || action.includes("Modified")) return /* @__PURE__ */ jsx(Edit, { className: "h-4 w-4" });
@@ -327,7 +297,12 @@ var AlertTimeline = ({ events }) => {
327
297
  if (action.includes("Rejected")) return /* @__PURE__ */ jsx(XCircle, { className: "h-4 w-4" });
328
298
  return /* @__PURE__ */ jsx(Circle, { className: "h-4 w-4" });
329
299
  };
330
- const getStatusColor2 = (status) => {
300
+ const getStatusColor2 = (status, action) => {
301
+ if (action?.includes("Note added")) return "text-blue-500";
302
+ if (action?.includes("Document added")) return "text-purple-500";
303
+ if (action?.includes("Alert Approved")) return "text-success";
304
+ if (action?.includes("Alert Declined")) return "text-destructive";
305
+ if (action?.includes("RFI Status change")) return "text-warning";
331
306
  switch (status) {
332
307
  case "Unassigned":
333
308
  return "text-destructive";
@@ -344,10 +319,7 @@ var AlertTimeline = ({ events }) => {
344
319
  }
345
320
  return /* @__PURE__ */ jsx("div", { className: "space-y-3", children: events.map((event, index) => /* @__PURE__ */ jsxs("div", { className: "relative pl-6 pb-3", children: [
346
321
  index !== events.length - 1 && /* @__PURE__ */ jsx("div", { className: "absolute left-[7px] top-5 bottom-0 w-[2px] bg-border" }),
347
- /* @__PURE__ */ jsx("div", { className: cn(
348
- "absolute left-0 top-0 flex-none",
349
- getStatusColor2(event.status)
350
- ), children: /* @__PURE__ */ jsx("div", { className: "h-4 w-4", children: getIcon(event.action) }) }),
322
+ /* @__PURE__ */ jsx("div", { className: cn("absolute left-0 top-0 flex-none", getStatusColor2(event.status, event.action)), children: /* @__PURE__ */ jsx("div", { className: "h-4 w-4", children: getIcon(event.action) }) }),
351
323
  /* @__PURE__ */ jsxs("div", { className: "space-y-0.5", children: [
352
324
  /* @__PURE__ */ jsx("p", { className: "text-xs font-medium text-foreground", children: event.action }),
353
325
  /* @__PURE__ */ jsxs("p", { className: "text-xs text-muted-foreground", children: [
@@ -355,14 +327,49 @@ var AlertTimeline = ({ events }) => {
355
327
  event.user
356
328
  ] }),
357
329
  event.details && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: event.details }),
358
- event.status && /* @__PURE__ */ jsxs("p", { className: cn("text-xs font-medium", getStatusColor2(event.status)), children: [
359
- "Status: ",
360
- event.status
361
- ] }),
362
330
  /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground/70 pt-0.5", children: event.timestamp })
363
331
  ] })
364
332
  ] }, event.id)) });
365
333
  };
334
+ var buttonVariants = cva(
335
+ "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
336
+ {
337
+ variants: {
338
+ variant: {
339
+ default: "bg-primary text-primary-foreground hover:bg-primary/90",
340
+ destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
341
+ outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
342
+ secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
343
+ ghost: "hover:bg-accent hover:text-accent-foreground",
344
+ link: "text-primary underline-offset-4 hover:underline"
345
+ },
346
+ size: {
347
+ default: "h-10 px-4 py-2",
348
+ sm: "h-9 rounded-md px-3",
349
+ lg: "h-11 rounded-md px-8",
350
+ icon: "h-10 w-10"
351
+ }
352
+ },
353
+ defaultVariants: {
354
+ variant: "default",
355
+ size: "default"
356
+ }
357
+ }
358
+ );
359
+ var Button = React15.forwardRef(
360
+ ({ className, variant, size, asChild = false, ...props }, ref) => {
361
+ const Comp = asChild ? Slot : "button";
362
+ return /* @__PURE__ */ jsx(
363
+ Comp,
364
+ {
365
+ className: cn(buttonVariants({ variant, size, className })),
366
+ ref,
367
+ ...props
368
+ }
369
+ );
370
+ }
371
+ );
372
+ Button.displayName = "Button";
366
373
  var textareaVariants = cva(
367
374
  "flex min-h-[80px] w-full rounded-md bg-form-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground transition-form resize-y",
368
375
  {
@@ -380,7 +387,7 @@ var textareaVariants = cva(
380
387
  }
381
388
  }
382
389
  );
383
- var EnhancedTextarea = React13.forwardRef(
390
+ var EnhancedTextarea = React15.forwardRef(
384
391
  ({ className, variant, label, hint, error, success, ...props }, ref) => {
385
392
  const textareaVariant = error ? "error" : success ? "success" : props.disabled ? "disabled" : props.readOnly ? "readonly" : variant;
386
393
  return /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
@@ -419,9 +426,9 @@ var selectVariants = cva(
419
426
  }
420
427
  }
421
428
  );
422
- var EnhancedSelect = React13.forwardRef(({ variant, label, hint, error, success, placeholder, options, disabled, ...props }, ref) => {
429
+ var EnhancedSelect = React15.forwardRef(({ variant, label, hint, error, success, placeholder, options, disabled, className, ...props }, ref) => {
423
430
  const selectVariant = error ? "error" : success ? "success" : disabled ? "disabled" : variant;
424
- return /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
431
+ return /* @__PURE__ */ jsxs("div", { className: cn("space-y-2", className), children: [
425
432
  label && /* @__PURE__ */ jsx("label", { className: "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", children: label }),
426
433
  /* @__PURE__ */ jsxs(SelectPrimitive.Root, { ...props, disabled, children: [
427
434
  /* @__PURE__ */ jsxs(
@@ -435,7 +442,7 @@ var EnhancedSelect = React13.forwardRef(({ variant, label, hint, error, success,
435
442
  ]
436
443
  }
437
444
  ),
438
- /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(SelectPrimitive.Content, { className: "relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", children: [
445
+ /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(SelectPrimitive.Content, { className: "relative z-[9999] max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", children: [
439
446
  /* @__PURE__ */ jsx(SelectPrimitive.ScrollUpButton, { className: "flex cursor-default items-center justify-center py-1", children: /* @__PURE__ */ jsx(ChevronUp, { className: "h-4 w-4" }) }),
440
447
  /* @__PURE__ */ jsx(SelectPrimitive.Viewport, { className: "p-1", children: options.map((option) => /* @__PURE__ */ jsxs(
441
448
  SelectPrimitive.Item,
@@ -559,8 +566,8 @@ function toast({ ...props }) {
559
566
  };
560
567
  }
561
568
  function useToast() {
562
- const [state, setState] = React13.useState(memoryState);
563
- React13.useEffect(() => {
569
+ const [state, setState] = React15.useState(memoryState);
570
+ React15.useEffect(() => {
564
571
  listeners.push(setState);
565
572
  return () => {
566
573
  const index = listeners.indexOf(setState);
@@ -660,7 +667,8 @@ var AlertNotes = ({ alertId, notes }) => {
660
667
  placeholder: "Enter your note here...",
661
668
  value: newNote,
662
669
  onChange: (e) => setNewNote(e.target.value),
663
- rows: 6
670
+ rows: 6,
671
+ required: true
664
672
  }
665
673
  )
666
674
  ] }),
@@ -717,7 +725,7 @@ var AlertNotes = ({ alertId, notes }) => {
717
725
  /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-4 mb-2", children: [
718
726
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
719
727
  /* @__PURE__ */ jsx("p", { className: "font-medium text-sm text-foreground", children: note.user }),
720
- /* @__PURE__ */ jsx(Badge, { variant: note.type === "RFI Note" ? "default" : "outline", children: note.type })
728
+ /* @__PURE__ */ jsx(Badge, { variant: note.type === "RFI Note" ? "default" : "outline", children: note.type === "RFI Note" ? "RFI" : "Internal" })
721
729
  ] }),
722
730
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
723
731
  /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground whitespace-nowrap", children: note.timestamp }),
@@ -764,7 +772,7 @@ var inputVariants = cva(
764
772
  }
765
773
  }
766
774
  );
767
- var EnhancedInput = React13.forwardRef(
775
+ var EnhancedInput = React15.forwardRef(
768
776
  ({ className, variant, size, label, hint, error, success, isLoading, ...props }, ref) => {
769
777
  const inputVariant = error ? "error" : success ? "success" : props.disabled ? "disabled" : props.readOnly ? "readonly" : variant;
770
778
  return /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
@@ -1028,10 +1036,8 @@ var AlertDocuments = ({ alertId, documents }) => {
1028
1036
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 flex-1 min-w-0", children: [
1029
1037
  !isImageType(doc.name) && /* @__PURE__ */ jsx("div", { className: cn(getFileTypeColor(doc.type)), children: getFileIcon(doc.type) }),
1030
1038
  /* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
1031
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
1032
- /* @__PURE__ */ jsx("h4", { className: "font-medium text-sm truncate", children: doc.name }),
1033
- /* @__PURE__ */ jsx("span", { className: cn("text-xs px-2 py-0.5 rounded-full bg-muted", getFileTypeColor(doc.type)), children: doc.type })
1034
- ] }),
1039
+ /* @__PURE__ */ jsx("h4", { className: "font-medium text-sm truncate", children: doc.name }),
1040
+ /* @__PURE__ */ jsx("span", { className: cn("text-xs px-2 py-0.5 rounded-full bg-muted inline-block mt-1", getFileTypeColor(doc.type)), children: doc.type }),
1035
1041
  doc.description && /* @__PURE__ */ jsx("p", { className: "text-sm text-foreground mt-1", children: doc.description }),
1036
1042
  /* @__PURE__ */ jsxs("p", { className: "text-xs text-muted-foreground mt-1", children: [
1037
1043
  doc.size,
@@ -1103,23 +1109,127 @@ var InfoField = ({ label, value, layout = "vertical", className }) => {
1103
1109
  /* @__PURE__ */ jsx("div", { className: `text-sm text-foreground ${label ? "mt-1" : ""}`, children: value })
1104
1110
  ] });
1105
1111
  };
1112
+ var ScrollArea = React15.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
1113
+ ScrollAreaPrimitive.Root,
1114
+ {
1115
+ ref,
1116
+ className: cn("relative overflow-hidden", className),
1117
+ ...props,
1118
+ children: [
1119
+ /* @__PURE__ */ jsx(ScrollAreaPrimitive.Viewport, { className: "h-full w-full rounded-[inherit]", children }),
1120
+ /* @__PURE__ */ jsx(ScrollBar, {}),
1121
+ /* @__PURE__ */ jsx(ScrollAreaPrimitive.Corner, {})
1122
+ ]
1123
+ }
1124
+ ));
1125
+ ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
1126
+ var ScrollBar = React15.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsx(
1127
+ ScrollAreaPrimitive.ScrollAreaScrollbar,
1128
+ {
1129
+ ref,
1130
+ orientation,
1131
+ className: cn(
1132
+ "flex touch-none select-none transition-colors",
1133
+ orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent p-[1px]",
1134
+ orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-[1px]",
1135
+ className
1136
+ ),
1137
+ ...props,
1138
+ children: /* @__PURE__ */ jsx(ScrollAreaPrimitive.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
1139
+ }
1140
+ ));
1141
+ ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
1142
+ var Table = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ jsx(
1143
+ "table",
1144
+ {
1145
+ ref,
1146
+ className: cn("w-full caption-bottom text-sm", className),
1147
+ ...props
1148
+ }
1149
+ ) }));
1150
+ Table.displayName = "Table";
1151
+ var TableHeader = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("thead", { ref, className: cn("[&_tr]:border-b", className), ...props }));
1152
+ TableHeader.displayName = "TableHeader";
1153
+ var TableBody = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1154
+ "tbody",
1155
+ {
1156
+ ref,
1157
+ className: cn("[&_tr:last-child]:border-0", className),
1158
+ ...props
1159
+ }
1160
+ ));
1161
+ TableBody.displayName = "TableBody";
1162
+ var TableFooter = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1163
+ "tfoot",
1164
+ {
1165
+ ref,
1166
+ className: cn(
1167
+ "border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",
1168
+ className
1169
+ ),
1170
+ ...props
1171
+ }
1172
+ ));
1173
+ TableFooter.displayName = "TableFooter";
1174
+ var TableRow = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1175
+ "tr",
1176
+ {
1177
+ ref,
1178
+ className: cn(
1179
+ "border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",
1180
+ className
1181
+ ),
1182
+ ...props
1183
+ }
1184
+ ));
1185
+ TableRow.displayName = "TableRow";
1186
+ var TableHead = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1187
+ "th",
1188
+ {
1189
+ ref,
1190
+ className: cn(
1191
+ "h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",
1192
+ className
1193
+ ),
1194
+ ...props
1195
+ }
1196
+ ));
1197
+ TableHead.displayName = "TableHead";
1198
+ var TableCell = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1199
+ "td",
1200
+ {
1201
+ ref,
1202
+ className: cn("p-4 align-middle [&:has([role=checkbox])]:pr-0", className),
1203
+ ...props
1204
+ }
1205
+ ));
1206
+ TableCell.displayName = "TableCell";
1207
+ var TableCaption = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1208
+ "caption",
1209
+ {
1210
+ ref,
1211
+ className: cn("mt-4 text-sm text-muted-foreground", className),
1212
+ ...props
1213
+ }
1214
+ ));
1215
+ TableCaption.displayName = "TableCaption";
1106
1216
  var Dialog = DialogPrimitive.Root;
1107
1217
  var DialogTrigger = DialogPrimitive.Trigger;
1108
1218
  var DialogPortal = DialogPrimitive.Portal;
1109
1219
  var DialogClose = DialogPrimitive.Close;
1110
- var DialogOverlay = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1220
+ var DialogOverlay = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1111
1221
  DialogPrimitive.Overlay,
1112
1222
  {
1113
1223
  ref,
1114
1224
  className: cn(
1115
- "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
1225
+ "fixed inset-0 z-50 bg-white/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
1116
1226
  className
1117
1227
  ),
1118
1228
  ...props
1119
1229
  }
1120
1230
  ));
1121
1231
  DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
1122
- var DialogContent = React13.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DialogPortal, { children: [
1232
+ var DialogContent = React15.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DialogPortal, { children: [
1123
1233
  /* @__PURE__ */ jsx(DialogOverlay, {}),
1124
1234
  /* @__PURE__ */ jsxs(
1125
1235
  DialogPrimitive.Content,
@@ -1169,7 +1279,7 @@ var DialogFooter = ({
1169
1279
  }
1170
1280
  );
1171
1281
  DialogFooter.displayName = "DialogFooter";
1172
- var DialogTitle = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1282
+ var DialogTitle = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1173
1283
  DialogPrimitive.Title,
1174
1284
  {
1175
1285
  ref,
@@ -1181,7 +1291,7 @@ var DialogTitle = React13.forwardRef(({ className, ...props }, ref) => /* @__PUR
1181
1291
  }
1182
1292
  ));
1183
1293
  DialogTitle.displayName = DialogPrimitive.Title.displayName;
1184
- var DialogDescription = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1294
+ var DialogDescription = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1185
1295
  DialogPrimitive.Description,
1186
1296
  {
1187
1297
  ref,
@@ -1290,45 +1400,124 @@ var JsonNode = ({ data, name, depth, compact = false }) => {
1290
1400
  ] })
1291
1401
  ] });
1292
1402
  };
1293
- var ContextSection = ({ alert }) => {
1294
- const [isDialogOpen, setIsDialogOpen] = useState(false);
1403
+ var OFACAlertView = ({ alert }) => {
1404
+ const [isJsonDialogOpen, setIsJsonDialogOpen] = useState(false);
1405
+ const parseOFACMatches = (data) => {
1406
+ if (!data.rawResults || !data.ofacCheckDetails) return [];
1407
+ try {
1408
+ const rawResults = JSON.parse(data.rawResults);
1409
+ const tableRows = [];
1410
+ const getListName = (listType) => {
1411
+ const listNames = {
1412
+ "SDNs": "OFAC SDN List",
1413
+ "altNames": "OFAC Alternate Names",
1414
+ "sectoralSanctions": "OFAC Sectoral Sanctions",
1415
+ "nonSDNMenuBasedSanctionsList": "OFAC Non-SDN List",
1416
+ "ukConsolidatedSanctionsList": "UK Consolidated List"
1417
+ };
1418
+ return listNames[listType] || listType;
1419
+ };
1420
+ const formatCheckKey = (key) => {
1421
+ return key.replace(/([A-Z])/g, " $1").replace(/^./, (str) => str.toUpperCase()).trim();
1422
+ };
1423
+ const listTypes = [
1424
+ { key: "SDNs", nameField: "sdnName" },
1425
+ { key: "altNames", nameField: "alternateName" },
1426
+ { key: "sectoralSanctions", nameField: "Name" },
1427
+ { key: "nonSDNMenuBasedSanctionsList", nameField: "Name" },
1428
+ { key: "ukConsolidatedSanctionsList", nameField: "Names" }
1429
+ ];
1430
+ listTypes.forEach(({ key, nameField }) => {
1431
+ const list = rawResults[key];
1432
+ if (list && Array.isArray(list)) {
1433
+ list.forEach((item) => {
1434
+ data.ofacCheckDetails.forEach((check) => {
1435
+ tableRows.push({
1436
+ type: formatCheckKey(check.checkKey),
1437
+ name: check.checkValue,
1438
+ matchedName: item.matchedName || item[nameField] || "N/A",
1439
+ list: getListName(key),
1440
+ matchScore: item.match ? `${(item.match * 100).toFixed(2)}%` : "N/A"
1441
+ });
1442
+ });
1443
+ });
1444
+ }
1445
+ });
1446
+ return tableRows;
1447
+ } catch (error) {
1448
+ console.error("Error parsing OFAC results:", error);
1449
+ return [];
1450
+ }
1451
+ };
1295
1452
  const renderOFACContext = () => {
1296
1453
  const data = alert.contextData;
1297
1454
  if (!data) return null;
1455
+ const tableRows = parseOFACMatches(data);
1456
+ const entityName = data.counterpartyName || data.businessName || data.individualName || data.transactionPaymentId || "N/A";
1457
+ const entityType = data.counterpartyName ? "Counterparty" : data.businessName ? "Business" : data.individualName ? "Individual" : data.transactionPaymentId ? "Transaction" : "N/A";
1458
+ const entityId = data.counterpartyId || data.businessId || data.individualId || data.transactionPaymentId;
1459
+ const entityLink = entityId ? data.counterpartyId ? `/counterparties/${entityId}` : data.businessId ? `/businesses/${entityId}` : data.individualId ? `/individuals/${entityId}` : data.transactionPaymentId ? `/transactions/${entityId}` : null : null;
1298
1460
  return /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
1299
1461
  /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
1300
- /* @__PURE__ */ jsx(InfoField, { label: "Entity Name", value: data.entityName }),
1301
- /* @__PURE__ */ jsx(InfoField, { label: "Entity Type", value: data.entityType }),
1302
- /* @__PURE__ */ jsx(InfoField, { label: "Match Score", value: /* @__PURE__ */ jsx(Badge, { variant: "alert-ofac", children: data.matchScore }) }),
1303
- /* @__PURE__ */ jsx(InfoField, { label: "List Name", value: data.listName })
1304
- ] }),
1305
- /* @__PURE__ */ jsxs("div", { children: [
1306
- /* @__PURE__ */ jsx("h4", { className: "text-sm font-medium mb-3", children: "Flagged Items" }),
1307
- /* @__PURE__ */ jsx("div", { className: "overflow-x-auto border rounded-lg", children: /* @__PURE__ */ jsxs("table", { className: "w-full", children: [
1308
- /* @__PURE__ */ jsx("thead", { className: "border-b bg-muted/50", children: /* @__PURE__ */ jsxs("tr", { children: [
1309
- /* @__PURE__ */ jsx("th", { className: "px-4 py-3 text-left text-sm font-medium", children: "Field" }),
1310
- /* @__PURE__ */ jsx("th", { className: "px-4 py-3 text-left text-sm font-medium", children: "Value" }),
1311
- /* @__PURE__ */ jsx("th", { className: "px-4 py-3 text-left text-sm font-medium", children: "Match Score" })
1312
- ] }) }),
1313
- /* @__PURE__ */ jsx("tbody", { children: data.flaggedItems?.map((item, index) => /* @__PURE__ */ jsxs("tr", { className: "border-b hover:bg-muted/50", children: [
1314
- /* @__PURE__ */ jsx("td", { className: "px-4 py-3 text-sm font-medium", children: item.field }),
1315
- /* @__PURE__ */ jsx("td", { className: "px-4 py-3 text-sm", children: item.value }),
1316
- /* @__PURE__ */ jsx("td", { className: "px-4 py-3", children: /* @__PURE__ */ jsx(Badge, { variant: parseInt(item.matchScore) > 90 ? "alert-ofac" : "outline", children: item.matchScore }) })
1317
- ] }, index)) })
1318
- ] }) })
1462
+ /* @__PURE__ */ jsx(
1463
+ InfoField,
1464
+ {
1465
+ label: "Entity Name",
1466
+ value: entityLink ? /* @__PURE__ */ jsx(
1467
+ Link,
1468
+ {
1469
+ to: entityLink,
1470
+ className: "text-primary hover:underline",
1471
+ children: entityName
1472
+ }
1473
+ ) : entityName,
1474
+ layout: "horizontal"
1475
+ }
1476
+ ),
1477
+ /* @__PURE__ */ jsx(InfoField, { label: "Entity Type", value: entityType, layout: "horizontal" })
1319
1478
  ] }),
1320
- alert.contextData && /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
1321
- Button,
1322
- {
1323
- variant: "ghost",
1324
- className: "w-full justify-between h-auto py-3 px-4 border rounded-lg hover:bg-muted/50",
1325
- onClick: () => setIsDialogOpen(true),
1326
- children: [
1327
- /* @__PURE__ */ jsx("span", { className: "text-sm font-medium", children: "Detail Result" }),
1328
- /* @__PURE__ */ jsx(ChevronRight, { className: "h-4 w-4" })
1329
- ]
1330
- }
1331
- ) })
1479
+ tableRows.length > 0 && /* @__PURE__ */ jsx("div", { className: "mt-4", children: /* @__PURE__ */ jsx(ScrollArea, { className: "h-[300px] rounded-md border", children: /* @__PURE__ */ jsxs(Table, { children: [
1480
+ /* @__PURE__ */ jsx(TableHeader, { children: /* @__PURE__ */ jsxs(TableRow, { children: [
1481
+ /* @__PURE__ */ jsx(TableHead, { children: "Type" }),
1482
+ /* @__PURE__ */ jsx(TableHead, { children: "Name" }),
1483
+ /* @__PURE__ */ jsx(TableHead, { children: "Matched Name" }),
1484
+ /* @__PURE__ */ jsxs(TableHead, { className: "flex items-center gap-1", children: [
1485
+ /* @__PURE__ */ jsx("span", { children: "List" }),
1486
+ /* @__PURE__ */ jsxs(Dialog, { open: isJsonDialogOpen, onOpenChange: setIsJsonDialogOpen, children: [
1487
+ /* @__PURE__ */ jsx(DialogTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
1488
+ Button,
1489
+ {
1490
+ variant: "ghost",
1491
+ size: "icon",
1492
+ className: "h-6 w-6 text-primary hover:text-primary/80",
1493
+ children: /* @__PURE__ */ jsx(FileJson, { className: "h-4 w-4" })
1494
+ }
1495
+ ) }),
1496
+ /* @__PURE__ */ jsxs(DialogContent, { className: "max-w-4xl max-h-[80vh]", children: [
1497
+ /* @__PURE__ */ jsxs(DialogHeader, { children: [
1498
+ /* @__PURE__ */ jsx(DialogTitle, { children: "OFAC Raw Results" }),
1499
+ /* @__PURE__ */ jsx(DialogDescription, { children: "Complete JSON response from the OFAC screening check" })
1500
+ ] }),
1501
+ /* @__PURE__ */ jsx(
1502
+ JsonViewer,
1503
+ {
1504
+ data: data.rawResults ? JSON.parse(data.rawResults) : {},
1505
+ maxHeight: "60vh"
1506
+ }
1507
+ )
1508
+ ] })
1509
+ ] })
1510
+ ] }),
1511
+ /* @__PURE__ */ jsx(TableHead, { children: "Match Score" })
1512
+ ] }) }),
1513
+ /* @__PURE__ */ jsx(TableBody, { children: tableRows.map((row, index) => /* @__PURE__ */ jsxs(TableRow, { children: [
1514
+ /* @__PURE__ */ jsx(TableCell, { children: row.type }),
1515
+ /* @__PURE__ */ jsx(TableCell, { children: row.name }),
1516
+ /* @__PURE__ */ jsx(TableCell, { children: row.matchedName }),
1517
+ /* @__PURE__ */ jsx(TableCell, { children: row.list }),
1518
+ /* @__PURE__ */ jsx(TableCell, { children: row.matchScore })
1519
+ ] }, index)) })
1520
+ ] }) }) })
1332
1521
  ] });
1333
1522
  };
1334
1523
  const renderTransactionContext = () => {
@@ -1355,20 +1544,6 @@ var ContextSection = ({ alert }) => {
1355
1544
  /* @__PURE__ */ jsx(InfoField, { label: "Reason", value: "Compliance review required" })
1356
1545
  ] });
1357
1546
  };
1358
- const getContextTitle = () => {
1359
- switch (alert.contextType) {
1360
- case "Ofac":
1361
- return "OFAC Context";
1362
- case "Transaction":
1363
- return "Transaction Context";
1364
- case "File Record":
1365
- return "File Processing Context";
1366
- case "Product":
1367
- return "Product Context";
1368
- default:
1369
- return "Context Information";
1370
- }
1371
- };
1372
1547
  const renderContext = () => {
1373
1548
  switch (alert.contextType) {
1374
1549
  case "Ofac":
@@ -1383,87 +1558,39 @@ var ContextSection = ({ alert }) => {
1383
1558
  return /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: "No additional context available" });
1384
1559
  }
1385
1560
  };
1386
- return /* @__PURE__ */ jsxs(Fragment, { children: [
1387
- /* @__PURE__ */ jsx(FormCard, { title: getContextTitle(), children: renderContext() }),
1388
- /* @__PURE__ */ jsx(Dialog, { open: isDialogOpen, onOpenChange: setIsDialogOpen, children: /* @__PURE__ */ jsxs(DialogContent, { className: "max-w-4xl", children: [
1389
- /* @__PURE__ */ jsx(DialogHeader, { children: /* @__PURE__ */ jsxs(DialogTitle, { children: [
1390
- getContextTitle(),
1391
- " - Detail Result"
1561
+ return /* @__PURE__ */ jsxs("div", { className: "flex flex-col lg:flex-row gap-6", children: [
1562
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 grid grid-cols-1 lg:grid-cols-2 gap-6", children: [
1563
+ /* @__PURE__ */ jsx(FormCard, { title: "Alert Details", className: "lg:col-span-2", children: /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
1564
+ /* @__PURE__ */ jsx(InfoField, { label: "Description", value: alert.description, layout: "horizontal" }),
1565
+ renderContext()
1392
1566
  ] }) }),
1393
- /* @__PURE__ */ jsx(JsonViewer, { data: alert.contextData })
1394
- ] }) })
1567
+ /* @__PURE__ */ jsx(FormCard, { title: "Notes", children: /* @__PURE__ */ jsx(AlertNotes, { alertId: alert.id, notes: alert.notes || [] }) }),
1568
+ /* @__PURE__ */ jsx(FormCard, { title: "Documents", children: /* @__PURE__ */ jsx(AlertDocuments, { alertId: alert.id, documents: alert.documents || [] }) })
1569
+ ] }),
1570
+ /* @__PURE__ */ jsx("div", { className: "lg:w-64", children: /* @__PURE__ */ jsx(FormCard, { title: "Status Timeline", className: "h-full", children: /* @__PURE__ */ jsx(AlertTimeline, { events: alert.timeline || [] }) }) })
1395
1571
  ] });
1396
1572
  };
1397
- var EditableInfoField = ({
1398
- label,
1399
- value,
1400
- options,
1401
- onChange,
1402
- placeholder = "Select...",
1403
- renderValue,
1404
- className
1405
- }) => {
1406
- const [isEditing, setIsEditing] = useState(false);
1407
- const handleChange = (newValue) => {
1408
- onChange(newValue);
1409
- setIsEditing(false);
1410
- };
1411
- if (isEditing) {
1412
- return /* @__PURE__ */ jsx("div", { className, children: /* @__PURE__ */ jsx(
1413
- EnhancedSelect,
1414
- {
1415
- label,
1416
- value: value || "",
1417
- onValueChange: handleChange,
1418
- options,
1419
- placeholder
1420
- }
1421
- ) });
1422
- }
1423
- const displayValue = value ? renderValue ? renderValue(value) : value : placeholder;
1424
- return /* @__PURE__ */ jsx(
1425
- "div",
1426
- {
1427
- className: cn("cursor-pointer transition-colors hover:bg-muted/50 rounded-md -mx-2 px-2 -my-1 py-1", className),
1428
- onClick: () => setIsEditing(true),
1429
- role: "button",
1430
- tabIndex: 0,
1431
- onKeyDown: (e) => {
1432
- if (e.key === "Enter" || e.key === " ") {
1433
- e.preventDefault();
1434
- setIsEditing(true);
1435
- }
1436
- },
1437
- children: /* @__PURE__ */ jsx(InfoField, { label, value: displayValue })
1438
- }
1439
- );
1440
- };
1441
-
1442
- // src/lib/utils/alert-utils.ts
1443
- var getTypeBadgeVariant = (type) => {
1444
- switch (type) {
1573
+ var AlertDetailRouter = ({ alert }) => {
1574
+ switch (alert.type) {
1445
1575
  case "Ofac":
1446
- return "alert-ofac";
1447
- case "Dual Approval":
1448
- return "alert-dual";
1576
+ return /* @__PURE__ */ jsx(OFACAlertView, { alert });
1449
1577
  case "Transaction Monitoring":
1450
- return "alert-monitoring";
1578
+ return /* @__PURE__ */ jsx("div", { children: "Transaction Monitoring view - Coming soon" });
1579
+ case "Prohibited Entity":
1580
+ return /* @__PURE__ */ jsx("div", { children: "Prohibited Entity view - Coming soon" });
1581
+ case "314a":
1582
+ return /* @__PURE__ */ jsx("div", { children: "314a view - Coming soon" });
1583
+ case "Dual Approval":
1584
+ return /* @__PURE__ */ jsx("div", { children: "Dual Approval view - Coming soon" });
1451
1585
  case "Transaction Processing Error":
1452
- return "alert-error";
1453
- default:
1454
- return "outline";
1455
- }
1456
- };
1457
- var getStatusColor = (status) => {
1458
- switch (status) {
1459
- case "Unassigned":
1460
- return "text-destructive";
1461
- case "Closed":
1462
- return "text-success";
1463
- case "In Progress":
1464
- return "text-warning";
1586
+ return /* @__PURE__ */ jsx("div", { children: "Transaction Processing Error view - Coming soon" });
1587
+ case "ACH Return":
1588
+ return /* @__PURE__ */ jsx("div", { children: "ACH Return view - Coming soon" });
1465
1589
  default:
1466
- return "";
1590
+ return /* @__PURE__ */ jsxs("div", { children: [
1591
+ "Unknown alert type: ",
1592
+ alert.type
1593
+ ] });
1467
1594
  }
1468
1595
  };
1469
1596
 
@@ -1501,135 +1628,506 @@ var ASSIGNEE_OPTIONS = [
1501
1628
  { value: "approverdev", label: "approverdev" },
1502
1629
  { value: "Unassigned", label: "Unassigned" }
1503
1630
  ];
1504
- var AlertDetailView = ({
1505
- alert,
1506
- rfiStatus,
1631
+
1632
+ // src/lib/utils/alert-utils.ts
1633
+ var getTypeBadgeVariant = (type) => {
1634
+ switch (type) {
1635
+ case "Ofac":
1636
+ return "alert-ofac";
1637
+ case "Dual Approval":
1638
+ return "alert-dual";
1639
+ case "Transaction Monitoring":
1640
+ return "alert-monitoring";
1641
+ case "Transaction Processing Error":
1642
+ return "alert-error";
1643
+ default:
1644
+ return "outline";
1645
+ }
1646
+ };
1647
+ var getStatusColor = (status) => {
1648
+ switch (status) {
1649
+ case "Unassigned":
1650
+ return "text-destructive";
1651
+ case "Closed":
1652
+ return "text-success";
1653
+ case "In Progress":
1654
+ return "text-warning";
1655
+ default:
1656
+ return "";
1657
+ }
1658
+ };
1659
+ var AlertHeaderControls = ({
1660
+ status,
1507
1661
  assignee,
1508
- onRfiStatusChange,
1509
- onAssigneeChange
1662
+ rfiStatus,
1663
+ onAssigneeChange,
1664
+ onRfiStatusChange
1510
1665
  }) => {
1511
- return /* @__PURE__ */ jsxs("div", { className: "flex flex-col lg:flex-row gap-6", children: [
1512
- /* @__PURE__ */ jsxs("div", { className: "flex-1 grid grid-cols-1 lg:grid-cols-2 gap-6", children: [
1666
+ return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-4", children: [
1667
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
1668
+ /* @__PURE__ */ jsx("span", { className: "text-sm text-muted-foreground", children: "Status:" }),
1669
+ /* @__PURE__ */ jsx("span", { className: cn("font-medium text-sm", getStatusColor(status)), children: status })
1670
+ ] }),
1671
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 min-w-[180px]", children: [
1672
+ /* @__PURE__ */ jsx("span", { className: "text-sm text-muted-foreground", children: "Assignee:" }),
1513
1673
  /* @__PURE__ */ jsx(
1514
- FormCard,
1674
+ EnhancedSelect,
1515
1675
  {
1516
- title: "Alert Information",
1517
- headerActions: /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", children: /* @__PURE__ */ jsx(Edit, { className: "h-4 w-4" }) }),
1518
- children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
1519
- /* @__PURE__ */ jsx(InfoField, { label: "Alert ID", value: alert.id }),
1520
- /* @__PURE__ */ jsx(
1521
- InfoField,
1522
- {
1523
- label: "Type",
1524
- value: /* @__PURE__ */ jsx(Badge, { variant: getTypeBadgeVariant(alert.type), children: alert.type })
1525
- }
1526
- ),
1527
- /* @__PURE__ */ jsx(
1528
- InfoField,
1529
- {
1530
- label: "Status",
1531
- value: /* @__PURE__ */ jsx("span", { className: cn("font-medium", getStatusColor(alert.status)), children: alert.status })
1532
- }
1533
- ),
1534
- /* @__PURE__ */ jsx(InfoField, { label: "Created At", value: alert.createdAt }),
1535
- /* @__PURE__ */ jsx(
1536
- InfoField,
1537
- {
1538
- label: "Context Type",
1539
- value: /* @__PURE__ */ jsx(Badge, { variant: "outline", children: alert.contextType })
1540
- }
1541
- ),
1542
- /* @__PURE__ */ jsx(InfoField, { label: "Context ID", value: alert.contextId || "N/A" }),
1543
- /* @__PURE__ */ jsx(
1544
- EditableInfoField,
1545
- {
1546
- label: "Assignee",
1547
- value: assignee,
1548
- options: ASSIGNEE_OPTIONS,
1549
- onChange: onAssigneeChange,
1550
- placeholder: "Unassigned"
1551
- }
1552
- ),
1553
- /* @__PURE__ */ jsx(
1554
- EditableInfoField,
1555
- {
1556
- label: "RFI Status",
1557
- value: rfiStatus,
1558
- options: RFI_STATUS_OPTIONS,
1559
- onChange: onRfiStatusChange,
1560
- placeholder: "Select status",
1561
- renderValue: (value) => /* @__PURE__ */ jsx(Badge, { variant: "success", children: value })
1562
- }
1563
- ),
1564
- /* @__PURE__ */ jsx("div", { className: "col-span-2", children: /* @__PURE__ */ jsx(InfoField, { label: "Description", value: alert.description }) })
1565
- ] })
1676
+ value: assignee,
1677
+ onValueChange: onAssigneeChange,
1678
+ options: ASSIGNEE_OPTIONS,
1679
+ placeholder: "Unassigned"
1566
1680
  }
1567
- ),
1568
- /* @__PURE__ */ jsx(ContextSection, { alert }),
1569
- /* @__PURE__ */ jsx(FormCard, { title: "Notes", children: /* @__PURE__ */ jsx(AlertNotes, { alertId: alert.id, notes: alert.notes || [] }) }),
1570
- /* @__PURE__ */ jsx(FormCard, { title: "Documents", children: /* @__PURE__ */ jsx(AlertDocuments, { alertId: alert.id, documents: alert.documents || [] }) })
1681
+ )
1571
1682
  ] }),
1572
- /* @__PURE__ */ jsx("div", { className: "lg:w-64", children: /* @__PURE__ */ jsx(FormCard, { title: "Status Timeline", className: "h-full", children: /* @__PURE__ */ jsx(AlertTimeline, { events: alert.timeline || [] }) }) })
1683
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 min-w-[180px]", children: [
1684
+ /* @__PURE__ */ jsx("span", { className: "text-sm text-muted-foreground", children: "RFI Status:" }),
1685
+ /* @__PURE__ */ jsx(
1686
+ EnhancedSelect,
1687
+ {
1688
+ value: rfiStatus,
1689
+ onValueChange: onRfiStatusChange,
1690
+ options: RFI_STATUS_OPTIONS,
1691
+ placeholder: "Select status"
1692
+ }
1693
+ )
1694
+ ] })
1573
1695
  ] });
1574
1696
  };
1575
-
1576
- // src/assets/braid-logo.png
1577
- var braid_logo_default = "./braid-logo-343BOQZ2.png";
1578
- var MOBILE_BREAKPOINT = 768;
1579
- function useIsMobile() {
1580
- const [isMobile, setIsMobile] = React13.useState(void 0);
1581
- React13.useEffect(() => {
1582
- const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
1583
- const onChange = () => {
1584
- setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
1585
- };
1586
- mql.addEventListener("change", onChange);
1587
- setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
1588
- return () => mql.removeEventListener("change", onChange);
1589
- }, []);
1590
- return !!isMobile;
1591
- }
1592
- var Separator = React13.forwardRef(
1593
- ({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsx(
1594
- SeparatorPrimitive.Root,
1595
- {
1596
- ref,
1597
- decorative,
1598
- orientation,
1599
- className: cn(
1600
- "shrink-0 bg-border",
1601
- orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
1602
- className
1603
- ),
1604
- ...props
1697
+ var ContextSection = ({ alert }) => {
1698
+ const [isDialogOpen, setIsDialogOpen] = useState(false);
1699
+ const renderOFACContext = () => {
1700
+ const data = alert.contextData;
1701
+ if (!data) return null;
1702
+ return /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
1703
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
1704
+ /* @__PURE__ */ jsx(InfoField, { label: "Entity Name", value: data.entityName }),
1705
+ /* @__PURE__ */ jsx(InfoField, { label: "Entity Type", value: data.entityType }),
1706
+ /* @__PURE__ */ jsx(InfoField, { label: "Match Score", value: /* @__PURE__ */ jsx(Badge, { variant: "alert-ofac", children: data.matchScore }) }),
1707
+ /* @__PURE__ */ jsx(InfoField, { label: "List Name", value: data.listName })
1708
+ ] }),
1709
+ /* @__PURE__ */ jsxs("div", { children: [
1710
+ /* @__PURE__ */ jsx("h4", { className: "text-sm font-medium mb-3", children: "Flagged Items" }),
1711
+ /* @__PURE__ */ jsx("div", { className: "overflow-x-auto border rounded-lg", children: /* @__PURE__ */ jsxs("table", { className: "w-full", children: [
1712
+ /* @__PURE__ */ jsx("thead", { className: "border-b bg-muted/50", children: /* @__PURE__ */ jsxs("tr", { children: [
1713
+ /* @__PURE__ */ jsx("th", { className: "px-4 py-3 text-left text-sm font-medium", children: "Field" }),
1714
+ /* @__PURE__ */ jsx("th", { className: "px-4 py-3 text-left text-sm font-medium", children: "Value" }),
1715
+ /* @__PURE__ */ jsx("th", { className: "px-4 py-3 text-left text-sm font-medium", children: "Match Score" })
1716
+ ] }) }),
1717
+ /* @__PURE__ */ jsx("tbody", { children: data.flaggedItems?.map((item, index) => /* @__PURE__ */ jsxs("tr", { className: "border-b hover:bg-muted/50", children: [
1718
+ /* @__PURE__ */ jsx("td", { className: "px-4 py-3 text-sm font-medium", children: item.field }),
1719
+ /* @__PURE__ */ jsx("td", { className: "px-4 py-3 text-sm", children: item.value }),
1720
+ /* @__PURE__ */ jsx("td", { className: "px-4 py-3", children: /* @__PURE__ */ jsx(Badge, { variant: parseInt(item.matchScore) > 90 ? "alert-ofac" : "outline", children: item.matchScore }) })
1721
+ ] }, index)) })
1722
+ ] }) })
1723
+ ] }),
1724
+ alert.contextData && /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
1725
+ Button,
1726
+ {
1727
+ variant: "ghost",
1728
+ className: "w-full justify-between h-auto py-3 px-4 border rounded-lg hover:bg-muted/50",
1729
+ onClick: () => setIsDialogOpen(true),
1730
+ children: [
1731
+ /* @__PURE__ */ jsx("span", { className: "text-sm font-medium", children: "Detail Result" }),
1732
+ /* @__PURE__ */ jsx(ChevronRight, { className: "h-4 w-4" })
1733
+ ]
1734
+ }
1735
+ ) })
1736
+ ] });
1737
+ };
1738
+ const renderTransactionContext = () => {
1739
+ return /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
1740
+ /* @__PURE__ */ jsx(InfoField, { label: "Transaction ID", value: "TXN-12345" }),
1741
+ /* @__PURE__ */ jsx(InfoField, { label: "Amount", value: "$30,000.00" }),
1742
+ /* @__PURE__ */ jsx(InfoField, { label: "Transaction Type", value: "Wire Transfer" }),
1743
+ /* @__PURE__ */ jsx(InfoField, { label: "Date", value: "2025-09-30" })
1744
+ ] });
1745
+ };
1746
+ const renderFileRecordContext = () => {
1747
+ return /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
1748
+ /* @__PURE__ */ jsx(InfoField, { label: "File Name", value: "wire_batch_093025.csv" }),
1749
+ /* @__PURE__ */ jsx(InfoField, { label: "Record Count", value: "1,234" }),
1750
+ /* @__PURE__ */ jsx(InfoField, { label: "Error Count", value: "3" }),
1751
+ /* @__PURE__ */ jsx(InfoField, { label: "Status", value: /* @__PURE__ */ jsx(Badge, { variant: "alert-error", children: "Failed" }) })
1752
+ ] });
1753
+ };
1754
+ const renderProductContext = () => {
1755
+ return /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
1756
+ /* @__PURE__ */ jsx(InfoField, { label: "Product ID", value: "PROD-2787" }),
1757
+ /* @__PURE__ */ jsx(InfoField, { label: "Product Name", value: "Business Checking Account" }),
1758
+ /* @__PURE__ */ jsx(InfoField, { label: "Status", value: "Pending Deactivation" }),
1759
+ /* @__PURE__ */ jsx(InfoField, { label: "Reason", value: "Compliance review required" })
1760
+ ] });
1761
+ };
1762
+ const getContextTitle = () => {
1763
+ switch (alert.contextType) {
1764
+ case "Ofac":
1765
+ return "OFAC Context";
1766
+ case "Transaction":
1767
+ return "Transaction Context";
1768
+ case "File Record":
1769
+ return "File Processing Context";
1770
+ case "Product":
1771
+ return "Product Context";
1772
+ default:
1773
+ return "Context Information";
1605
1774
  }
1606
- )
1607
- );
1608
- Separator.displayName = SeparatorPrimitive.Root.displayName;
1609
- var Sheet = DialogPrimitive.Root;
1610
- var SheetTrigger = DialogPrimitive.Trigger;
1611
- var SheetClose = DialogPrimitive.Close;
1612
- var SheetPortal = DialogPrimitive.Portal;
1613
- var SheetOverlay = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1614
- DialogPrimitive.Overlay,
1615
- {
1616
- className: cn(
1617
- "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
1618
- className
1619
- ),
1620
- ...props,
1621
- ref
1622
- }
1623
- ));
1624
- SheetOverlay.displayName = DialogPrimitive.Overlay.displayName;
1625
- var sheetVariants = cva(
1626
- "fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
1627
- {
1628
- variants: {
1629
- side: {
1630
- top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
1631
- bottom: "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
1632
- left: "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",
1775
+ };
1776
+ const renderContext = () => {
1777
+ switch (alert.contextType) {
1778
+ case "Ofac":
1779
+ return renderOFACContext();
1780
+ case "Transaction":
1781
+ return renderTransactionContext();
1782
+ case "File Record":
1783
+ return renderFileRecordContext();
1784
+ case "Product":
1785
+ return renderProductContext();
1786
+ default:
1787
+ return /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: "No additional context available" });
1788
+ }
1789
+ };
1790
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
1791
+ /* @__PURE__ */ jsx(FormCard, { title: getContextTitle(), children: renderContext() }),
1792
+ /* @__PURE__ */ jsx(Dialog, { open: isDialogOpen, onOpenChange: setIsDialogOpen, children: /* @__PURE__ */ jsxs(DialogContent, { className: "max-w-4xl", children: [
1793
+ /* @__PURE__ */ jsx(DialogHeader, { children: /* @__PURE__ */ jsxs(DialogTitle, { children: [
1794
+ getContextTitle(),
1795
+ " - Detail Result"
1796
+ ] }) }),
1797
+ /* @__PURE__ */ jsx(JsonViewer, { data: alert.contextData })
1798
+ ] }) })
1799
+ ] });
1800
+ };
1801
+ var FormProvider = ({
1802
+ form,
1803
+ children
1804
+ }) => {
1805
+ return /* @__PURE__ */ jsx(FormProvider$1, { ...form, children });
1806
+ };
1807
+ var FormInput = ({
1808
+ name,
1809
+ ...props
1810
+ }) => {
1811
+ const { control, formState } = useFormContext();
1812
+ const error = formState.errors[name]?.message;
1813
+ return /* @__PURE__ */ jsx(
1814
+ Controller,
1815
+ {
1816
+ name,
1817
+ control,
1818
+ render: ({ field }) => /* @__PURE__ */ jsx(
1819
+ EnhancedInput,
1820
+ {
1821
+ ...props,
1822
+ ...field,
1823
+ error
1824
+ }
1825
+ )
1826
+ }
1827
+ );
1828
+ };
1829
+ var FormSelect = ({
1830
+ name,
1831
+ ...props
1832
+ }) => {
1833
+ const { control, formState } = useFormContext();
1834
+ const error = formState.errors[name]?.message;
1835
+ return /* @__PURE__ */ jsx(
1836
+ Controller,
1837
+ {
1838
+ name,
1839
+ control,
1840
+ render: ({ field }) => /* @__PURE__ */ jsx(
1841
+ EnhancedSelect,
1842
+ {
1843
+ ...props,
1844
+ value: field.value,
1845
+ onValueChange: field.onChange,
1846
+ error
1847
+ }
1848
+ )
1849
+ }
1850
+ );
1851
+ };
1852
+ var useFormWithEditState = ({
1853
+ schema,
1854
+ initialEditing = false,
1855
+ onToggleEdit,
1856
+ onSave,
1857
+ onCancel,
1858
+ ...formProps
1859
+ }) => {
1860
+ const [localEditing, setLocalEditing] = useState(initialEditing);
1861
+ const [isLoading, setIsLoading] = useState(false);
1862
+ const form = useForm({
1863
+ ...formProps,
1864
+ resolver: schema ? zodResolver(schema) : void 0
1865
+ });
1866
+ const { formState, reset, setError } = form;
1867
+ const { isValid, isDirty } = formState;
1868
+ useEffect(() => {
1869
+ setLocalEditing(initialEditing);
1870
+ }, [initialEditing]);
1871
+ const isEditing = onToggleEdit !== void 0 ? initialEditing : localEditing;
1872
+ const handleToggleEdit = useCallback(() => {
1873
+ if (onToggleEdit) {
1874
+ onToggleEdit();
1875
+ } else {
1876
+ setLocalEditing((prev) => !prev);
1877
+ }
1878
+ }, [onToggleEdit]);
1879
+ const handleSave = useCallback(async () => {
1880
+ if (!isValid) return;
1881
+ setIsLoading(true);
1882
+ try {
1883
+ const data = form.getValues();
1884
+ if (onSave) {
1885
+ await onSave(data);
1886
+ }
1887
+ if (onToggleEdit) {
1888
+ onToggleEdit();
1889
+ } else {
1890
+ setLocalEditing(false);
1891
+ }
1892
+ } catch (error) {
1893
+ console.error("Form save error:", error);
1894
+ } finally {
1895
+ setIsLoading(false);
1896
+ }
1897
+ }, [form, isValid, onSave, onToggleEdit]);
1898
+ const handleCancel = useCallback(() => {
1899
+ reset();
1900
+ if (onCancel) {
1901
+ onCancel();
1902
+ }
1903
+ if (onToggleEdit) {
1904
+ onToggleEdit();
1905
+ } else {
1906
+ setLocalEditing(false);
1907
+ }
1908
+ }, [reset, onCancel, onToggleEdit]);
1909
+ const setFieldError = useCallback((field, error) => {
1910
+ setError(field, { type: "manual", message: error });
1911
+ }, [setError]);
1912
+ return {
1913
+ ...form,
1914
+ isEditing,
1915
+ isLoading,
1916
+ handleToggleEdit,
1917
+ handleSave,
1918
+ handleCancel,
1919
+ isFormValid: isValid,
1920
+ isDirty,
1921
+ setFieldError
1922
+ };
1923
+ };
1924
+ var resolveAlertSchema = z.object({
1925
+ action: z.enum(["APPROVE", "DECLINE", "CLOSE"], {
1926
+ required_error: "Please select an action"
1927
+ }),
1928
+ changeToAccount: z.string().optional(),
1929
+ note: z.string().min(1, "Note is required").max(1e3, "Note must be less than 1000 characters"),
1930
+ returnCode: z.string().optional()
1931
+ }).refine((data) => {
1932
+ if (data.action === "DECLINE" && !data.returnCode) {
1933
+ return false;
1934
+ }
1935
+ return true;
1936
+ }, {
1937
+ message: "Return code is required when declining",
1938
+ path: ["returnCode"]
1939
+ });
1940
+ var RETURN_CODES = [
1941
+ { value: "R03_NO_ACCOUNT", label: "R03 - No Account/Unable to Locate Account" },
1942
+ { value: "R01_INSUFFICIENT_FUNDS", label: "R01 - Insufficient Funds" },
1943
+ { value: "R02_ACCOUNT_CLOSED", label: "R02 - Account Closed" },
1944
+ { value: "R04_INVALID_ACCOUNT", label: "R04 - Invalid Account Number" },
1945
+ { value: "R10_UNAUTHORIZED", label: "R10 - Customer Advises Unauthorized" },
1946
+ { value: "R07_AUTHORIZATION_REVOKED", label: "R07 - Authorization Revoked" },
1947
+ { value: "R08_PAYMENT_STOPPED", label: "R08 - Payment Stopped" },
1948
+ { value: "R09_UNCOLLECTED_FUNDS", label: "R09 - Uncollected Funds" }
1949
+ ];
1950
+ var ResolveAlertDialog = ({
1951
+ alertId,
1952
+ open,
1953
+ onOpenChange,
1954
+ onResolve
1955
+ }) => {
1956
+ const form = useFormWithEditState({
1957
+ schema: resolveAlertSchema,
1958
+ defaultValues: {
1959
+ action: "APPROVE",
1960
+ changeToAccount: "",
1961
+ note: "",
1962
+ returnCode: ""
1963
+ }
1964
+ });
1965
+ const { handleSubmit, watch, control, formState } = form;
1966
+ const action = watch("action");
1967
+ const onSubmit = async (data) => {
1968
+ try {
1969
+ await onResolve(data);
1970
+ toast({
1971
+ title: "Alert Resolved",
1972
+ description: `Alert #${alertId} has been ${data.action.toLowerCase()}d successfully.`
1973
+ });
1974
+ onOpenChange(false);
1975
+ form.reset();
1976
+ } catch (error) {
1977
+ toast({
1978
+ title: "Error",
1979
+ description: "Failed to resolve alert. Please try again.",
1980
+ variant: "destructive"
1981
+ });
1982
+ }
1983
+ };
1984
+ return /* @__PURE__ */ jsx(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxs(DialogContent, { className: "sm:max-w-[600px]", children: [
1985
+ /* @__PURE__ */ jsxs(DialogHeader, { children: [
1986
+ /* @__PURE__ */ jsxs(DialogTitle, { children: [
1987
+ "Resolve Alert #",
1988
+ alertId
1989
+ ] }),
1990
+ /* @__PURE__ */ jsx(DialogDescription, { children: "Select an action and provide details to resolve this alert." })
1991
+ ] }),
1992
+ /* @__PURE__ */ jsx(FormProvider, { form, children: /* @__PURE__ */ jsxs("form", { onSubmit: handleSubmit(onSubmit), className: "space-y-4", children: [
1993
+ /* @__PURE__ */ jsx(
1994
+ FormSelect,
1995
+ {
1996
+ name: "action",
1997
+ label: "Action",
1998
+ placeholder: "Select action",
1999
+ options: [
2000
+ { value: "APPROVE", label: "Approve" },
2001
+ { value: "DECLINE", label: "Decline" },
2002
+ { value: "CLOSE", label: "Close" }
2003
+ ]
2004
+ }
2005
+ ),
2006
+ /* @__PURE__ */ jsx(
2007
+ FormInput,
2008
+ {
2009
+ name: "changeToAccount",
2010
+ label: "Change to Account (Optional)",
2011
+ placeholder: "Enter account number"
2012
+ }
2013
+ ),
2014
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
2015
+ /* @__PURE__ */ jsxs("label", { className: "text-sm font-medium text-foreground", children: [
2016
+ "Note ",
2017
+ /* @__PURE__ */ jsx("span", { className: "text-destructive", children: "*" })
2018
+ ] }),
2019
+ /* @__PURE__ */ jsx(
2020
+ Controller,
2021
+ {
2022
+ name: "note",
2023
+ control,
2024
+ render: ({ field }) => /* @__PURE__ */ jsx(
2025
+ EnhancedTextarea,
2026
+ {
2027
+ ...field,
2028
+ placeholder: "Enter resolution notes...",
2029
+ rows: 4,
2030
+ error: formState.errors.note?.message
2031
+ }
2032
+ )
2033
+ }
2034
+ )
2035
+ ] }),
2036
+ action === "DECLINE" && /* @__PURE__ */ jsx(
2037
+ FormSelect,
2038
+ {
2039
+ name: "returnCode",
2040
+ label: "Return Code",
2041
+ placeholder: "Select return code",
2042
+ options: RETURN_CODES.map((code) => ({
2043
+ value: code.value,
2044
+ label: code.label
2045
+ }))
2046
+ }
2047
+ ),
2048
+ /* @__PURE__ */ jsxs(DialogFooter, { children: [
2049
+ /* @__PURE__ */ jsx(
2050
+ Button,
2051
+ {
2052
+ type: "button",
2053
+ variant: "outline",
2054
+ onClick: () => {
2055
+ onOpenChange(false);
2056
+ form.reset();
2057
+ },
2058
+ children: "Cancel"
2059
+ }
2060
+ ),
2061
+ /* @__PURE__ */ jsx(
2062
+ Button,
2063
+ {
2064
+ type: "submit",
2065
+ disabled: !formState.isValid || formState.isSubmitting,
2066
+ children: formState.isSubmitting ? "Submitting..." : "Resolve"
2067
+ }
2068
+ )
2069
+ ] })
2070
+ ] }) })
2071
+ ] }) });
2072
+ };
2073
+
2074
+ // src/assets/braid-logo.png
2075
+ var braid_logo_default = "./braid-logo-343BOQZ2.png";
2076
+ var MOBILE_BREAKPOINT = 768;
2077
+ function useIsMobile() {
2078
+ const [isMobile, setIsMobile] = React15.useState(void 0);
2079
+ React15.useEffect(() => {
2080
+ const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
2081
+ const onChange = () => {
2082
+ setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
2083
+ };
2084
+ mql.addEventListener("change", onChange);
2085
+ setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
2086
+ return () => mql.removeEventListener("change", onChange);
2087
+ }, []);
2088
+ return !!isMobile;
2089
+ }
2090
+ var Separator = React15.forwardRef(
2091
+ ({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsx(
2092
+ SeparatorPrimitive.Root,
2093
+ {
2094
+ ref,
2095
+ decorative,
2096
+ orientation,
2097
+ className: cn(
2098
+ "shrink-0 bg-border",
2099
+ orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
2100
+ className
2101
+ ),
2102
+ ...props
2103
+ }
2104
+ )
2105
+ );
2106
+ Separator.displayName = SeparatorPrimitive.Root.displayName;
2107
+ var Sheet = DialogPrimitive.Root;
2108
+ var SheetTrigger = DialogPrimitive.Trigger;
2109
+ var SheetClose = DialogPrimitive.Close;
2110
+ var SheetPortal = DialogPrimitive.Portal;
2111
+ var SheetOverlay = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2112
+ DialogPrimitive.Overlay,
2113
+ {
2114
+ className: cn(
2115
+ "fixed inset-0 z-50 bg-white/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
2116
+ className
2117
+ ),
2118
+ ...props,
2119
+ ref
2120
+ }
2121
+ ));
2122
+ SheetOverlay.displayName = DialogPrimitive.Overlay.displayName;
2123
+ var sheetVariants = cva(
2124
+ "fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
2125
+ {
2126
+ variants: {
2127
+ side: {
2128
+ top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
2129
+ bottom: "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
2130
+ left: "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",
1633
2131
  right: "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"
1634
2132
  }
1635
2133
  },
@@ -1638,7 +2136,7 @@ var sheetVariants = cva(
1638
2136
  }
1639
2137
  }
1640
2138
  );
1641
- var SheetContent = React13.forwardRef(({ side = "right", className, children, ...props }, ref) => /* @__PURE__ */ jsxs(SheetPortal, { children: [
2139
+ var SheetContent = React15.forwardRef(({ side = "right", className, children, ...props }, ref) => /* @__PURE__ */ jsxs(SheetPortal, { children: [
1642
2140
  /* @__PURE__ */ jsx(SheetOverlay, {}),
1643
2141
  /* @__PURE__ */ jsxs(
1644
2142
  DialogPrimitive.Content,
@@ -1685,7 +2183,7 @@ var SheetFooter = ({
1685
2183
  }
1686
2184
  );
1687
2185
  SheetFooter.displayName = "SheetFooter";
1688
- var SheetTitle = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2186
+ var SheetTitle = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1689
2187
  DialogPrimitive.Title,
1690
2188
  {
1691
2189
  ref,
@@ -1694,7 +2192,7 @@ var SheetTitle = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE
1694
2192
  }
1695
2193
  ));
1696
2194
  SheetTitle.displayName = DialogPrimitive.Title.displayName;
1697
- var SheetDescription = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2195
+ var SheetDescription = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1698
2196
  DialogPrimitive.Description,
1699
2197
  {
1700
2198
  ref,
@@ -1706,7 +2204,7 @@ SheetDescription.displayName = DialogPrimitive.Description.displayName;
1706
2204
  var TooltipProvider = TooltipPrimitive.Provider;
1707
2205
  var Tooltip = TooltipPrimitive.Root;
1708
2206
  var TooltipTrigger = TooltipPrimitive.Trigger;
1709
- var TooltipContent = React13.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(
2207
+ var TooltipContent = React15.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(
1710
2208
  TooltipPrimitive.Content,
1711
2209
  {
1712
2210
  ref,
@@ -1725,15 +2223,15 @@ var SIDEBAR_WIDTH = "15rem";
1725
2223
  var SIDEBAR_WIDTH_MOBILE = "18rem";
1726
2224
  var SIDEBAR_WIDTH_ICON = "3rem";
1727
2225
  var SIDEBAR_KEYBOARD_SHORTCUT = "b";
1728
- var SidebarContext = React13.createContext(null);
2226
+ var SidebarContext = React15.createContext(null);
1729
2227
  function useSidebar() {
1730
- const context = React13.useContext(SidebarContext);
2228
+ const context = React15.useContext(SidebarContext);
1731
2229
  if (!context) {
1732
2230
  throw new Error("useSidebar must be used within a SidebarProvider.");
1733
2231
  }
1734
2232
  return context;
1735
2233
  }
1736
- var SidebarProvider = React13.forwardRef(
2234
+ var SidebarProvider = React15.forwardRef(
1737
2235
  ({
1738
2236
  defaultOpen = true,
1739
2237
  open: openProp,
@@ -1744,10 +2242,10 @@ var SidebarProvider = React13.forwardRef(
1744
2242
  ...props
1745
2243
  }, ref) => {
1746
2244
  const isMobile = useIsMobile();
1747
- const [openMobile, setOpenMobile] = React13.useState(false);
1748
- const [_open, _setOpen] = React13.useState(defaultOpen);
2245
+ const [openMobile, setOpenMobile] = React15.useState(false);
2246
+ const [_open, _setOpen] = React15.useState(defaultOpen);
1749
2247
  const open = openProp ?? _open;
1750
- const setOpen = React13.useCallback(
2248
+ const setOpen = React15.useCallback(
1751
2249
  (value) => {
1752
2250
  const openState = typeof value === "function" ? value(open) : value;
1753
2251
  if (setOpenProp) {
@@ -1759,10 +2257,10 @@ var SidebarProvider = React13.forwardRef(
1759
2257
  },
1760
2258
  [setOpenProp, open]
1761
2259
  );
1762
- const toggleSidebar = React13.useCallback(() => {
2260
+ const toggleSidebar = React15.useCallback(() => {
1763
2261
  return isMobile ? setOpenMobile((open2) => !open2) : setOpen((open2) => !open2);
1764
2262
  }, [isMobile, setOpen, setOpenMobile]);
1765
- React13.useEffect(() => {
2263
+ React15.useEffect(() => {
1766
2264
  const handleKeyDown = (event) => {
1767
2265
  if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
1768
2266
  event.preventDefault();
@@ -1773,7 +2271,7 @@ var SidebarProvider = React13.forwardRef(
1773
2271
  return () => window.removeEventListener("keydown", handleKeyDown);
1774
2272
  }, [toggleSidebar]);
1775
2273
  const state = open ? "expanded" : "collapsed";
1776
- const contextValue = React13.useMemo(
2274
+ const contextValue = React15.useMemo(
1777
2275
  () => ({
1778
2276
  state,
1779
2277
  open,
@@ -1805,7 +2303,7 @@ var SidebarProvider = React13.forwardRef(
1805
2303
  }
1806
2304
  );
1807
2305
  SidebarProvider.displayName = "SidebarProvider";
1808
- var Sidebar = React13.forwardRef(
2306
+ var Sidebar = React15.forwardRef(
1809
2307
  ({
1810
2308
  side = "left",
1811
2309
  variant = "sidebar",
@@ -1892,7 +2390,7 @@ var Sidebar = React13.forwardRef(
1892
2390
  }
1893
2391
  );
1894
2392
  Sidebar.displayName = "Sidebar";
1895
- var SidebarTrigger = React13.forwardRef(({ className, onClick, ...props }, ref) => {
2393
+ var SidebarTrigger = React15.forwardRef(({ className, onClick, ...props }, ref) => {
1896
2394
  const { toggleSidebar } = useSidebar();
1897
2395
  return /* @__PURE__ */ jsxs(
1898
2396
  Button,
@@ -1915,7 +2413,7 @@ var SidebarTrigger = React13.forwardRef(({ className, onClick, ...props }, ref)
1915
2413
  );
1916
2414
  });
1917
2415
  SidebarTrigger.displayName = "SidebarTrigger";
1918
- var SidebarRail = React13.forwardRef(({ className, ...props }, ref) => {
2416
+ var SidebarRail = React15.forwardRef(({ className, ...props }, ref) => {
1919
2417
  const { toggleSidebar } = useSidebar();
1920
2418
  return /* @__PURE__ */ jsx(
1921
2419
  "button",
@@ -1940,7 +2438,7 @@ var SidebarRail = React13.forwardRef(({ className, ...props }, ref) => {
1940
2438
  );
1941
2439
  });
1942
2440
  SidebarRail.displayName = "SidebarRail";
1943
- var SidebarInset = React13.forwardRef(({ className, ...props }, ref) => {
2441
+ var SidebarInset = React15.forwardRef(({ className, ...props }, ref) => {
1944
2442
  return /* @__PURE__ */ jsx(
1945
2443
  "main",
1946
2444
  {
@@ -1955,7 +2453,7 @@ var SidebarInset = React13.forwardRef(({ className, ...props }, ref) => {
1955
2453
  );
1956
2454
  });
1957
2455
  SidebarInset.displayName = "SidebarInset";
1958
- var SidebarInput = React13.forwardRef(({ className, ...props }, ref) => {
2456
+ var SidebarInput = React15.forwardRef(({ className, ...props }, ref) => {
1959
2457
  return /* @__PURE__ */ jsx(
1960
2458
  "input",
1961
2459
  {
@@ -1970,7 +2468,7 @@ var SidebarInput = React13.forwardRef(({ className, ...props }, ref) => {
1970
2468
  );
1971
2469
  });
1972
2470
  SidebarInput.displayName = "SidebarInput";
1973
- var SidebarHeader = React13.forwardRef(({ className, ...props }, ref) => {
2471
+ var SidebarHeader = React15.forwardRef(({ className, ...props }, ref) => {
1974
2472
  return /* @__PURE__ */ jsx(
1975
2473
  "div",
1976
2474
  {
@@ -1982,7 +2480,7 @@ var SidebarHeader = React13.forwardRef(({ className, ...props }, ref) => {
1982
2480
  );
1983
2481
  });
1984
2482
  SidebarHeader.displayName = "SidebarHeader";
1985
- var SidebarFooter = React13.forwardRef(({ className, ...props }, ref) => {
2483
+ var SidebarFooter = React15.forwardRef(({ className, ...props }, ref) => {
1986
2484
  return /* @__PURE__ */ jsx(
1987
2485
  "div",
1988
2486
  {
@@ -1994,7 +2492,7 @@ var SidebarFooter = React13.forwardRef(({ className, ...props }, ref) => {
1994
2492
  );
1995
2493
  });
1996
2494
  SidebarFooter.displayName = "SidebarFooter";
1997
- var SidebarSeparator = React13.forwardRef(({ className, ...props }, ref) => {
2495
+ var SidebarSeparator = React15.forwardRef(({ className, ...props }, ref) => {
1998
2496
  return /* @__PURE__ */ jsx(
1999
2497
  Separator,
2000
2498
  {
@@ -2006,7 +2504,7 @@ var SidebarSeparator = React13.forwardRef(({ className, ...props }, ref) => {
2006
2504
  );
2007
2505
  });
2008
2506
  SidebarSeparator.displayName = "SidebarSeparator";
2009
- var SidebarContent = React13.forwardRef(({ className, ...props }, ref) => {
2507
+ var SidebarContent = React15.forwardRef(({ className, ...props }, ref) => {
2010
2508
  return /* @__PURE__ */ jsx(
2011
2509
  "div",
2012
2510
  {
@@ -2021,7 +2519,7 @@ var SidebarContent = React13.forwardRef(({ className, ...props }, ref) => {
2021
2519
  );
2022
2520
  });
2023
2521
  SidebarContent.displayName = "SidebarContent";
2024
- var SidebarGroup = React13.forwardRef(({ className, ...props }, ref) => {
2522
+ var SidebarGroup = React15.forwardRef(({ className, ...props }, ref) => {
2025
2523
  return /* @__PURE__ */ jsx(
2026
2524
  "div",
2027
2525
  {
@@ -2033,7 +2531,7 @@ var SidebarGroup = React13.forwardRef(({ className, ...props }, ref) => {
2033
2531
  );
2034
2532
  });
2035
2533
  SidebarGroup.displayName = "SidebarGroup";
2036
- var SidebarGroupLabel = React13.forwardRef(({ className, asChild = false, ...props }, ref) => {
2534
+ var SidebarGroupLabel = React15.forwardRef(({ className, asChild = false, ...props }, ref) => {
2037
2535
  const Comp = asChild ? Slot : "div";
2038
2536
  return /* @__PURE__ */ jsx(
2039
2537
  Comp,
@@ -2050,7 +2548,7 @@ var SidebarGroupLabel = React13.forwardRef(({ className, asChild = false, ...pro
2050
2548
  );
2051
2549
  });
2052
2550
  SidebarGroupLabel.displayName = "SidebarGroupLabel";
2053
- var SidebarGroupAction = React13.forwardRef(({ className, asChild = false, ...props }, ref) => {
2551
+ var SidebarGroupAction = React15.forwardRef(({ className, asChild = false, ...props }, ref) => {
2054
2552
  const Comp = asChild ? Slot : "button";
2055
2553
  return /* @__PURE__ */ jsx(
2056
2554
  Comp,
@@ -2069,7 +2567,7 @@ var SidebarGroupAction = React13.forwardRef(({ className, asChild = false, ...pr
2069
2567
  );
2070
2568
  });
2071
2569
  SidebarGroupAction.displayName = "SidebarGroupAction";
2072
- var SidebarGroupContent = React13.forwardRef(({ className, ...props }, ref) => {
2570
+ var SidebarGroupContent = React15.forwardRef(({ className, ...props }, ref) => {
2073
2571
  return /* @__PURE__ */ jsx(
2074
2572
  "div",
2075
2573
  {
@@ -2081,7 +2579,7 @@ var SidebarGroupContent = React13.forwardRef(({ className, ...props }, ref) => {
2081
2579
  );
2082
2580
  });
2083
2581
  SidebarGroupContent.displayName = "SidebarGroupContent";
2084
- var SidebarMenu = React13.forwardRef(({ className, ...props }, ref) => {
2582
+ var SidebarMenu = React15.forwardRef(({ className, ...props }, ref) => {
2085
2583
  return /* @__PURE__ */ jsx(
2086
2584
  "ul",
2087
2585
  {
@@ -2093,7 +2591,7 @@ var SidebarMenu = React13.forwardRef(({ className, ...props }, ref) => {
2093
2591
  );
2094
2592
  });
2095
2593
  SidebarMenu.displayName = "SidebarMenu";
2096
- var SidebarMenuItem = React13.forwardRef(({ className, ...props }, ref) => {
2594
+ var SidebarMenuItem = React15.forwardRef(({ className, ...props }, ref) => {
2097
2595
  return /* @__PURE__ */ jsx(
2098
2596
  "li",
2099
2597
  {
@@ -2125,7 +2623,7 @@ var sidebarMenuButtonVariants = cva(
2125
2623
  }
2126
2624
  }
2127
2625
  );
2128
- var SidebarMenuButton = React13.forwardRef(
2626
+ var SidebarMenuButton = React15.forwardRef(
2129
2627
  ({
2130
2628
  asChild = false,
2131
2629
  isActive = false,
@@ -2171,7 +2669,7 @@ var SidebarMenuButton = React13.forwardRef(
2171
2669
  }
2172
2670
  );
2173
2671
  SidebarMenuButton.displayName = "SidebarMenuButton";
2174
- var SidebarMenuAction = React13.forwardRef(({ className, asChild = false, showOnHover = false, ...props }, ref) => {
2672
+ var SidebarMenuAction = React15.forwardRef(({ className, asChild = false, showOnHover = false, ...props }, ref) => {
2175
2673
  const Comp = asChild ? Slot : "button";
2176
2674
  return /* @__PURE__ */ jsx(
2177
2675
  Comp,
@@ -2194,7 +2692,7 @@ var SidebarMenuAction = React13.forwardRef(({ className, asChild = false, showOn
2194
2692
  );
2195
2693
  });
2196
2694
  SidebarMenuAction.displayName = "SidebarMenuAction";
2197
- var SidebarMenuBadge = React13.forwardRef(({ className, ...props }, ref) => {
2695
+ var SidebarMenuBadge = React15.forwardRef(({ className, ...props }, ref) => {
2198
2696
  return /* @__PURE__ */ jsx(
2199
2697
  "div",
2200
2698
  {
@@ -2214,8 +2712,8 @@ var SidebarMenuBadge = React13.forwardRef(({ className, ...props }, ref) => {
2214
2712
  );
2215
2713
  });
2216
2714
  SidebarMenuBadge.displayName = "SidebarMenuBadge";
2217
- var SidebarMenuSkeleton = React13.forwardRef(({ className, showIcon = false, ...props }, ref) => {
2218
- const width = React13.useMemo(() => {
2715
+ var SidebarMenuSkeleton = React15.forwardRef(({ className, showIcon = false, ...props }, ref) => {
2716
+ const width = React15.useMemo(() => {
2219
2717
  return `${Math.floor(Math.random() * 40) + 50}%`;
2220
2718
  }, []);
2221
2719
  return /* @__PURE__ */ jsxs(
@@ -2241,7 +2739,7 @@ var SidebarMenuSkeleton = React13.forwardRef(({ className, showIcon = false, ...
2241
2739
  );
2242
2740
  });
2243
2741
  SidebarMenuSkeleton.displayName = "SidebarMenuSkeleton";
2244
- var SidebarMenuSub = React13.forwardRef(({ className, ...props }, ref) => {
2742
+ var SidebarMenuSub = React15.forwardRef(({ className, ...props }, ref) => {
2245
2743
  return /* @__PURE__ */ jsx(
2246
2744
  "ul",
2247
2745
  {
@@ -2257,11 +2755,11 @@ var SidebarMenuSub = React13.forwardRef(({ className, ...props }, ref) => {
2257
2755
  );
2258
2756
  });
2259
2757
  SidebarMenuSub.displayName = "SidebarMenuSub";
2260
- var SidebarMenuSubItem = React13.forwardRef(({ ...props }, ref) => {
2758
+ var SidebarMenuSubItem = React15.forwardRef(({ ...props }, ref) => {
2261
2759
  return /* @__PURE__ */ jsx("li", { ref, ...props });
2262
2760
  });
2263
2761
  SidebarMenuSubItem.displayName = "SidebarMenuSubItem";
2264
- var SidebarMenuSubButton = React13.forwardRef(({ asChild = false, size = "md", isActive, className, ...props }, ref) => {
2762
+ var SidebarMenuSubButton = React15.forwardRef(({ asChild = false, size = "md", isActive, className, ...props }, ref) => {
2265
2763
  const Comp = asChild ? Slot : "a";
2266
2764
  return /* @__PURE__ */ jsx(
2267
2765
  Comp,
@@ -2615,7 +3113,7 @@ var useEditState = ({ initialEditing = false, onToggleEdit, onSave, onCancel })
2615
3113
  handleCancel
2616
3114
  };
2617
3115
  };
2618
- var EditableFormCard = React13.forwardRef(
3116
+ var EditableFormCard = React15.forwardRef(
2619
3117
  ({
2620
3118
  title,
2621
3119
  description,
@@ -2682,109 +3180,9 @@ var EditableFormCard = React13.forwardRef(
2682
3180
  children: currentlyEditing ? editContent : viewContent
2683
3181
  }
2684
3182
  );
2685
- }
2686
- );
2687
- EditableFormCard.displayName = "EditableFormCard";
2688
- var FormProvider = ({
2689
- form,
2690
- children
2691
- }) => {
2692
- return /* @__PURE__ */ jsx(FormProvider$1, { ...form, children });
2693
- };
2694
- var FormInput = ({
2695
- name,
2696
- ...props
2697
- }) => {
2698
- const { control, formState } = useFormContext();
2699
- const error = formState.errors[name]?.message;
2700
- return /* @__PURE__ */ jsx(
2701
- Controller,
2702
- {
2703
- name,
2704
- control,
2705
- render: ({ field }) => /* @__PURE__ */ jsx(
2706
- EnhancedInput,
2707
- {
2708
- ...props,
2709
- ...field,
2710
- error
2711
- }
2712
- )
2713
- }
2714
- );
2715
- };
2716
- var useFormWithEditState = ({
2717
- schema,
2718
- initialEditing = false,
2719
- onToggleEdit,
2720
- onSave,
2721
- onCancel,
2722
- ...formProps
2723
- }) => {
2724
- const [localEditing, setLocalEditing] = useState(initialEditing);
2725
- const [isLoading, setIsLoading] = useState(false);
2726
- const form = useForm({
2727
- ...formProps,
2728
- resolver: schema ? zodResolver(schema) : void 0
2729
- });
2730
- const { formState, reset, setError } = form;
2731
- const { isValid, isDirty } = formState;
2732
- useEffect(() => {
2733
- setLocalEditing(initialEditing);
2734
- }, [initialEditing]);
2735
- const isEditing = onToggleEdit !== void 0 ? initialEditing : localEditing;
2736
- const handleToggleEdit = useCallback(() => {
2737
- if (onToggleEdit) {
2738
- onToggleEdit();
2739
- } else {
2740
- setLocalEditing((prev) => !prev);
2741
- }
2742
- }, [onToggleEdit]);
2743
- const handleSave = useCallback(async () => {
2744
- if (!isValid) return;
2745
- setIsLoading(true);
2746
- try {
2747
- const data = form.getValues();
2748
- if (onSave) {
2749
- await onSave(data);
2750
- }
2751
- if (onToggleEdit) {
2752
- onToggleEdit();
2753
- } else {
2754
- setLocalEditing(false);
2755
- }
2756
- } catch (error) {
2757
- console.error("Form save error:", error);
2758
- } finally {
2759
- setIsLoading(false);
2760
- }
2761
- }, [form, isValid, onSave, onToggleEdit]);
2762
- const handleCancel = useCallback(() => {
2763
- reset();
2764
- if (onCancel) {
2765
- onCancel();
2766
- }
2767
- if (onToggleEdit) {
2768
- onToggleEdit();
2769
- } else {
2770
- setLocalEditing(false);
2771
- }
2772
- }, [reset, onCancel, onToggleEdit]);
2773
- const setFieldError = useCallback((field, error) => {
2774
- setError(field, { type: "manual", message: error });
2775
- }, [setError]);
2776
- return {
2777
- ...form,
2778
- isEditing,
2779
- isLoading,
2780
- handleToggleEdit,
2781
- handleSave,
2782
- handleCancel,
2783
- isFormValid: isValid,
2784
- isDirty,
2785
- setFieldError
2786
- };
2787
- };
3183
+ }
3184
+ );
3185
+ EditableFormCard.displayName = "EditableFormCard";
2788
3186
  var achBasicInfoSchema = z.object({
2789
3187
  counterpartyName: z.string().min(1, "Counterparty name is required"),
2790
3188
  shortName: z.string().min(1, "Short name is required"),
@@ -2883,29 +3281,6 @@ var ACHBankCard = ({ data, onDataChange, isEditing, onToggleEdit, className, hid
2883
3281
  }
2884
3282
  );
2885
3283
  };
2886
- var FormSelect = ({
2887
- name,
2888
- ...props
2889
- }) => {
2890
- const { control, formState } = useFormContext();
2891
- const error = formState.errors[name]?.message;
2892
- return /* @__PURE__ */ jsx(
2893
- Controller,
2894
- {
2895
- name,
2896
- control,
2897
- render: ({ field }) => /* @__PURE__ */ jsx(
2898
- EnhancedSelect,
2899
- {
2900
- ...props,
2901
- value: field.value,
2902
- onValueChange: field.onChange,
2903
- error
2904
- }
2905
- )
2906
- }
2907
- );
2908
- };
2909
3284
  var ACHBasicInfoCard = ({
2910
3285
  data,
2911
3286
  onDataChange,
@@ -3001,7 +3376,7 @@ var gapClasses = {
3001
3376
  lg: "gap-6",
3002
3377
  xl: "gap-8"
3003
3378
  };
3004
- var ResponsiveGrid = React13.forwardRef(
3379
+ var ResponsiveGrid = React15.forwardRef(
3005
3380
  ({ children, type = "cards", gap = "md", editMode = false, className }, ref) => {
3006
3381
  const gridClasses2 = editMode ? "grid-cols-1" : typeClasses[type];
3007
3382
  return /* @__PURE__ */ jsx(
@@ -3681,8 +4056,8 @@ var columnClasses = {
3681
4056
  3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3",
3682
4057
  4: "grid-cols-1 md:grid-cols-2 lg:grid-cols-4"
3683
4058
  };
3684
- var DataGrid = React13.forwardRef(
3685
- ({ data, columns = 2, gap = "md", className }, ref) => {
4059
+ var DataGrid = React15.forwardRef(
4060
+ ({ data, columns: columns2 = 2, gap = "md", className }, ref) => {
3686
4061
  const isItemArray = data.length > 0 && "label" in data[0];
3687
4062
  if (isItemArray) {
3688
4063
  const items = data;
@@ -3692,7 +4067,7 @@ var DataGrid = React13.forwardRef(
3692
4067
  ref,
3693
4068
  className: cn(
3694
4069
  "grid",
3695
- columnClasses[columns],
4070
+ columnClasses[columns2],
3696
4071
  gapClasses2[gap],
3697
4072
  className
3698
4073
  ),
@@ -3713,7 +4088,7 @@ var DataGrid = React13.forwardRef(
3713
4088
  section.title && /* @__PURE__ */ jsx("h4", { className: "text-sm font-medium text-foreground mb-2", children: section.title }),
3714
4089
  /* @__PURE__ */ jsx("div", { className: cn(
3715
4090
  "grid",
3716
- columnClasses[columns],
4091
+ columnClasses[columns2],
3717
4092
  gapClasses2[gap]
3718
4093
  ), children: section.items.map((item, itemIndex) => /* @__PURE__ */ jsx(
3719
4094
  InfoField,
@@ -4156,7 +4531,7 @@ var ContactInfoCard = ({ isEditing, onToggleEdit, className }) => {
4156
4531
  var labelVariants = cva(
4157
4532
  "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
4158
4533
  );
4159
- var Label = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
4534
+ var Label = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
4160
4535
  LabelPrimitive.Root,
4161
4536
  {
4162
4537
  ref,
@@ -4277,7 +4652,7 @@ var gridClasses = {
4277
4652
  3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3",
4278
4653
  4: "grid-cols-1 md:grid-cols-2 lg:grid-cols-4"
4279
4654
  };
4280
- var FormSection = React13.forwardRef(
4655
+ var FormSection = React15.forwardRef(
4281
4656
  ({
4282
4657
  title,
4283
4658
  description,
@@ -4285,7 +4660,7 @@ var FormSection = React13.forwardRef(
4285
4660
  className,
4286
4661
  spacing: spacing2 = "md",
4287
4662
  layout = "vertical",
4288
- columns = 2
4663
+ columns: columns2 = 2
4289
4664
  }, ref) => {
4290
4665
  return /* @__PURE__ */ jsxs("div", { ref, className: cn("space-y-4", className), children: [
4291
4666
  (title || description) && /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
@@ -4293,7 +4668,7 @@ var FormSection = React13.forwardRef(
4293
4668
  description && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: description })
4294
4669
  ] }),
4295
4670
  /* @__PURE__ */ jsx("div", { className: cn(
4296
- layout === "grid" ? `grid gap-4 ${gridClasses[columns]}` : spacingClasses[spacing2]
4671
+ layout === "grid" ? `grid gap-4 ${gridClasses[columns2]}` : spacingClasses[spacing2]
4297
4672
  ), children })
4298
4673
  ] });
4299
4674
  }
@@ -4743,267 +5118,614 @@ var WireTransferSection = ({ isEditing, onToggleEdit, className, hideActions })
4743
5118
  ] })
4744
5119
  ] });
4745
5120
  return /* @__PURE__ */ jsx(
4746
- EditableFormCard,
5121
+ EditableFormCard,
5122
+ {
5123
+ title: "Wire Transfer Configuration",
5124
+ description: "Configure wire transfer settings and participants",
5125
+ variant: "subtle",
5126
+ className,
5127
+ isEditing,
5128
+ onToggleEdit,
5129
+ hideActions,
5130
+ editContent,
5131
+ viewContent
5132
+ }
5133
+ );
5134
+ };
5135
+ var sizeClasses = {
5136
+ sm: "max-w-2xl",
5137
+ md: "max-w-4xl",
5138
+ lg: "max-w-6xl",
5139
+ xl: "max-w-7xl",
5140
+ full: "max-w-full"
5141
+ };
5142
+ var paddingClasses = {
5143
+ none: "",
5144
+ sm: "px-4 py-4",
5145
+ md: "px-6 py-6",
5146
+ lg: "px-8 py-8"
5147
+ };
5148
+ var Container = React15.forwardRef(
5149
+ ({ children, size = "lg", padding = "md", center = true, className }, ref) => {
5150
+ return /* @__PURE__ */ jsx(
5151
+ "div",
5152
+ {
5153
+ ref,
5154
+ className: cn(
5155
+ sizeClasses[size],
5156
+ paddingClasses[padding],
5157
+ center && "mx-auto",
5158
+ className
5159
+ ),
5160
+ children
5161
+ }
5162
+ );
5163
+ }
5164
+ );
5165
+ Container.displayName = "Container";
5166
+ var spacingClasses2 = {
5167
+ vertical: {
5168
+ none: "",
5169
+ xs: "space-y-1",
5170
+ sm: "space-y-2",
5171
+ md: "space-y-4",
5172
+ lg: "space-y-6",
5173
+ xl: "space-y-8"
5174
+ },
5175
+ horizontal: {
5176
+ none: "",
5177
+ xs: "space-x-1",
5178
+ sm: "space-x-2",
5179
+ md: "space-x-4",
5180
+ lg: "space-x-6",
5181
+ xl: "space-x-8"
5182
+ }
5183
+ };
5184
+ var alignClasses = {
5185
+ vertical: {
5186
+ start: "",
5187
+ center: "items-center",
5188
+ end: "items-end",
5189
+ stretch: "items-stretch"
5190
+ },
5191
+ horizontal: {
5192
+ start: "",
5193
+ center: "items-center",
5194
+ end: "items-end",
5195
+ stretch: "items-stretch"
5196
+ }
5197
+ };
5198
+ var justifyClasses = {
5199
+ start: "",
5200
+ center: "justify-center",
5201
+ end: "justify-end",
5202
+ between: "justify-between",
5203
+ around: "justify-around"
5204
+ };
5205
+ var Stack = React15.forwardRef(
5206
+ ({ children, direction = "vertical", spacing: spacing2 = "md", align = "start", justify = "start", className }, ref) => {
5207
+ const isHorizontal = direction === "horizontal";
5208
+ return /* @__PURE__ */ jsx(
5209
+ "div",
5210
+ {
5211
+ ref,
5212
+ className: cn(
5213
+ "flex",
5214
+ isHorizontal ? "flex-row" : "flex-col",
5215
+ spacingClasses2[direction][spacing2],
5216
+ alignClasses[direction][align],
5217
+ justifyClasses[justify],
5218
+ className
5219
+ ),
5220
+ children
5221
+ }
5222
+ );
5223
+ }
5224
+ );
5225
+ Stack.displayName = "Stack";
5226
+ var Breadcrumb = React15.forwardRef(
5227
+ ({ items, showHome = true, separator, className }, ref) => {
5228
+ const defaultSeparator = /* @__PURE__ */ jsx(ChevronRight, { className: "w-4 h-4 text-muted-foreground" });
5229
+ const separatorElement = separator || defaultSeparator;
5230
+ return /* @__PURE__ */ jsxs(
5231
+ "nav",
5232
+ {
5233
+ ref,
5234
+ "aria-label": "Breadcrumb",
5235
+ className: cn("flex items-center space-x-1 text-sm", className),
5236
+ children: [
5237
+ showHome && /* @__PURE__ */ jsxs(Fragment, { children: [
5238
+ /* @__PURE__ */ jsx(
5239
+ NavLink,
5240
+ {
5241
+ to: "/",
5242
+ className: "flex items-center text-muted-foreground hover:text-foreground transition-colors",
5243
+ children: /* @__PURE__ */ jsx(Home, { className: "w-4 h-4" })
5244
+ }
5245
+ ),
5246
+ items.length > 0 && /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: separatorElement })
5247
+ ] }),
5248
+ items.map((item, index) => {
5249
+ const isLast = index === items.length - 1;
5250
+ return /* @__PURE__ */ jsxs(React15.Fragment, { children: [
5251
+ item.href && !isLast ? /* @__PURE__ */ jsxs(
5252
+ NavLink,
5253
+ {
5254
+ to: item.href,
5255
+ className: "flex items-center text-muted-foreground hover:text-foreground transition-colors",
5256
+ children: [
5257
+ item.icon && /* @__PURE__ */ jsx("span", { className: "mr-1", children: item.icon }),
5258
+ item.label
5259
+ ]
5260
+ }
5261
+ ) : /* @__PURE__ */ jsxs("span", { className: cn(
5262
+ "flex items-center",
5263
+ isLast ? "text-foreground font-medium" : "text-muted-foreground"
5264
+ ), children: [
5265
+ item.icon && /* @__PURE__ */ jsx("span", { className: "mr-1", children: item.icon }),
5266
+ item.label
5267
+ ] }),
5268
+ !isLast && /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: separatorElement })
5269
+ ] }, index);
5270
+ })
5271
+ ]
5272
+ }
5273
+ );
5274
+ }
5275
+ );
5276
+ Breadcrumb.displayName = "Breadcrumb";
5277
+ var ListPage = React15.forwardRef(
5278
+ ({
5279
+ title,
5280
+ description,
5281
+ breadcrumbs,
5282
+ actions,
5283
+ children,
5284
+ maxWidth = "xl",
5285
+ loading = false,
5286
+ emptyState,
5287
+ className
5288
+ }, ref) => {
5289
+ const hasData = React15.Children.count(children) > 0;
5290
+ return /* @__PURE__ */ jsx("div", { ref, className: cn("min-h-screen bg-gradient-subtle", className), children: /* @__PURE__ */ jsx(Container, { size: maxWidth, children: /* @__PURE__ */ jsxs(Stack, { spacing: "lg", children: [
5291
+ breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ jsx(Breadcrumb, { items: breadcrumbs }),
5292
+ /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between", children: [
5293
+ /* @__PURE__ */ jsxs(Stack, { spacing: "sm", children: [
5294
+ /* @__PURE__ */ jsx("h1", { className: "text-3xl font-bold text-foreground", children: title }),
5295
+ description && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground max-w-2xl", children: description })
5296
+ ] }),
5297
+ actions && actions.length > 0 && /* @__PURE__ */ jsx(Stack, { direction: "horizontal", spacing: "sm", children: actions.map((action, index) => /* @__PURE__ */ jsxs(
5298
+ Button,
5299
+ {
5300
+ variant: action.variant || "default",
5301
+ onClick: action.onClick,
5302
+ children: [
5303
+ action.icon,
5304
+ action.label
5305
+ ]
5306
+ },
5307
+ index
5308
+ )) })
5309
+ ] }),
5310
+ loading ? /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center py-12", children: /* @__PURE__ */ jsx("div", { className: "animate-pulse text-muted-foreground", children: "Loading..." }) }) : hasData ? /* @__PURE__ */ jsx(ResponsiveGrid, { type: "cards", gap: "lg", children }) : emptyState ? /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center py-12", children: emptyState }) : /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center py-12", children: /* @__PURE__ */ jsx("div", { className: "text-center", children: /* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: "No items found" }) }) })
5311
+ ] }) }) });
5312
+ }
5313
+ );
5314
+ ListPage.displayName = "ListPage";
5315
+ var StatementHeader = ({ data, onEdit }) => {
5316
+ return /* @__PURE__ */ jsxs(Card, { children: [
5317
+ /* @__PURE__ */ jsxs(CardHeader, { direction: "row", children: [
5318
+ /* @__PURE__ */ jsx(CardTitle, { size: "md", children: "Statement Summary" }),
5319
+ /* @__PURE__ */ jsxs(Button, { variant: "outline", size: "sm", onClick: onEdit, children: [
5320
+ /* @__PURE__ */ jsx(Edit, { className: "h-4 w-4 mr-2" }),
5321
+ "Edit"
5322
+ ] })
5323
+ ] }),
5324
+ /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6", children: [
5325
+ /* @__PURE__ */ jsx(
5326
+ InfoField,
5327
+ {
5328
+ label: "Account",
5329
+ value: data.account,
5330
+ layout: "horizontal"
5331
+ }
5332
+ ),
5333
+ /* @__PURE__ */ jsx(
5334
+ InfoField,
5335
+ {
5336
+ label: "Product ID",
5337
+ value: data.productId,
5338
+ layout: "horizontal"
5339
+ }
5340
+ ),
5341
+ /* @__PURE__ */ jsx(
5342
+ InfoField,
5343
+ {
5344
+ label: "Program ID",
5345
+ value: data.programId,
5346
+ layout: "horizontal"
5347
+ }
5348
+ ),
5349
+ /* @__PURE__ */ jsx(
5350
+ InfoField,
5351
+ {
5352
+ label: "Start Date",
5353
+ value: data.startDate,
5354
+ layout: "horizontal"
5355
+ }
5356
+ ),
5357
+ /* @__PURE__ */ jsx(
5358
+ InfoField,
5359
+ {
5360
+ label: "End Date",
5361
+ value: data.endDate,
5362
+ layout: "horizontal"
5363
+ }
5364
+ ),
5365
+ /* @__PURE__ */ jsx(
5366
+ InfoField,
5367
+ {
5368
+ label: "Starting Balance",
5369
+ value: data.startingBalance,
5370
+ layout: "horizontal"
5371
+ }
5372
+ ),
5373
+ /* @__PURE__ */ jsx(
5374
+ InfoField,
5375
+ {
5376
+ label: "Ending Balance",
5377
+ value: data.endingBalance,
5378
+ layout: "horizontal"
5379
+ }
5380
+ )
5381
+ ] }) })
5382
+ ] });
5383
+ };
5384
+ function Calendar({
5385
+ className,
5386
+ classNames,
5387
+ showOutsideDays = true,
5388
+ ...props
5389
+ }) {
5390
+ return /* @__PURE__ */ jsx(
5391
+ DayPicker,
4747
5392
  {
4748
- title: "Wire Transfer Configuration",
4749
- description: "Configure wire transfer settings and participants",
4750
- variant: "subtle",
4751
- className,
4752
- isEditing,
4753
- onToggleEdit,
4754
- hideActions,
4755
- editContent,
4756
- viewContent
5393
+ showOutsideDays,
5394
+ className: cn("p-3 pointer-events-auto", className),
5395
+ classNames: {
5396
+ months: "flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",
5397
+ month: "space-y-4",
5398
+ caption: "flex justify-center pt-1 relative items-center",
5399
+ caption_label: "text-sm font-medium",
5400
+ nav: "space-x-1 flex items-center",
5401
+ button_previous: "absolute left-1 h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100",
5402
+ button_next: "absolute right-1 h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100",
5403
+ month_grid: "w-full border-collapse space-y-1",
5404
+ weekdays: "flex",
5405
+ weekday: "text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",
5406
+ week: "flex w-full mt-2",
5407
+ day: "h-9 w-9 text-center text-sm p-0 relative hover:bg-accent hover:text-accent-foreground rounded-md",
5408
+ day_button: cn(
5409
+ buttonVariants({ variant: "ghost" }),
5410
+ "h-9 w-9 p-0 font-normal"
5411
+ ),
5412
+ selected: "bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground",
5413
+ today: "bg-accent text-accent-foreground",
5414
+ outside: "text-muted-foreground opacity-50",
5415
+ disabled: "text-muted-foreground opacity-50",
5416
+ hidden: "invisible",
5417
+ ...classNames
5418
+ },
5419
+ ...props
4757
5420
  }
4758
5421
  );
4759
- };
4760
- var sizeClasses = {
4761
- sm: "max-w-2xl",
4762
- md: "max-w-4xl",
4763
- lg: "max-w-6xl",
4764
- xl: "max-w-7xl",
4765
- full: "max-w-full"
4766
- };
4767
- var paddingClasses = {
4768
- none: "",
4769
- sm: "px-4 py-4",
4770
- md: "px-6 py-6",
4771
- lg: "px-8 py-8"
4772
- };
4773
- var Container = React13.forwardRef(
4774
- ({ children, size = "lg", padding = "md", center = true, className }, ref) => {
4775
- return /* @__PURE__ */ jsx(
4776
- "div",
4777
- {
4778
- ref,
4779
- className: cn(
4780
- sizeClasses[size],
4781
- paddingClasses[padding],
4782
- center && "mx-auto",
4783
- className
4784
- ),
4785
- children
4786
- }
4787
- );
4788
- }
4789
- );
4790
- Container.displayName = "Container";
4791
- var spacingClasses2 = {
4792
- vertical: {
4793
- none: "",
4794
- xs: "space-y-1",
4795
- sm: "space-y-2",
4796
- md: "space-y-4",
4797
- lg: "space-y-6",
4798
- xl: "space-y-8"
4799
- },
4800
- horizontal: {
4801
- none: "",
4802
- xs: "space-x-1",
4803
- sm: "space-x-2",
4804
- md: "space-x-4",
4805
- lg: "space-x-6",
4806
- xl: "space-x-8"
5422
+ }
5423
+ Calendar.displayName = "Calendar";
5424
+ var Popover = PopoverPrimitive.Root;
5425
+ var PopoverTrigger = PopoverPrimitive.Trigger;
5426
+ var PopoverContent = React15.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(
5427
+ PopoverPrimitive.Content,
5428
+ {
5429
+ ref,
5430
+ align,
5431
+ sideOffset,
5432
+ className: cn(
5433
+ "z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
5434
+ className
5435
+ ),
5436
+ ...props
4807
5437
  }
4808
- };
4809
- var alignClasses = {
4810
- vertical: {
4811
- start: "",
4812
- center: "items-center",
4813
- end: "items-end",
4814
- stretch: "items-stretch"
4815
- },
4816
- horizontal: {
4817
- start: "",
4818
- center: "items-center",
4819
- end: "items-end",
4820
- stretch: "items-stretch"
5438
+ ) }));
5439
+ PopoverContent.displayName = PopoverPrimitive.Content.displayName;
5440
+ function DataTable({
5441
+ columns: columns2,
5442
+ data,
5443
+ sortBy,
5444
+ sortDirection,
5445
+ onSort,
5446
+ onRowClick,
5447
+ loading = false,
5448
+ emptyMessage = "No data available",
5449
+ className
5450
+ }) {
5451
+ const handleSort = (key) => {
5452
+ if (onSort) {
5453
+ onSort(key);
5454
+ }
5455
+ };
5456
+ const renderSortIcon = (column) => {
5457
+ if (!column.sortable || !onSort) return null;
5458
+ if (sortBy === column.key) {
5459
+ return sortDirection === "asc" ? /* @__PURE__ */ jsx(ChevronUp, { className: "w-4 h-4 ml-1" }) : /* @__PURE__ */ jsx(ChevronDown, { className: "w-4 h-4 ml-1" });
5460
+ }
5461
+ return /* @__PURE__ */ jsx(ChevronsUpDown, { className: "w-4 h-4 ml-1 opacity-50" });
5462
+ };
5463
+ const renderCell = (column, row) => {
5464
+ const value = row[column.key];
5465
+ if (column.render) {
5466
+ return column.render(value, row);
5467
+ }
5468
+ if (typeof value === "boolean") {
5469
+ return /* @__PURE__ */ jsx(Badge, { variant: value ? "success" : "secondary", children: value ? "Yes" : "No" });
5470
+ }
5471
+ if (Array.isArray(value)) {
5472
+ return value.join(", ");
5473
+ }
5474
+ return value?.toString() || "-";
5475
+ };
5476
+ if (loading) {
5477
+ return /* @__PURE__ */ jsx("div", { className: cn("rounded-md border", className), children: /* @__PURE__ */ jsx("div", { className: "p-8 text-center", children: /* @__PURE__ */ jsx("div", { className: "animate-pulse text-muted-foreground", children: "Loading..." }) }) });
4821
5478
  }
4822
- };
4823
- var justifyClasses = {
4824
- start: "",
4825
- center: "justify-center",
4826
- end: "justify-end",
4827
- between: "justify-between",
4828
- around: "justify-around"
4829
- };
4830
- var Stack = React13.forwardRef(
4831
- ({ children, direction = "vertical", spacing: spacing2 = "md", align = "start", justify = "start", className }, ref) => {
4832
- const isHorizontal = direction === "horizontal";
4833
- return /* @__PURE__ */ jsx(
4834
- "div",
5479
+ return /* @__PURE__ */ jsx("div", { className: cn("rounded-md border", className), children: /* @__PURE__ */ jsx("div", { className: "overflow-x-auto", children: /* @__PURE__ */ jsxs("table", { className: "w-full", children: [
5480
+ /* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsx("tr", { className: "border-b bg-muted/50", children: columns2.map((column) => /* @__PURE__ */ jsx(
5481
+ "th",
4835
5482
  {
4836
- ref,
4837
5483
  className: cn(
4838
- "flex",
4839
- isHorizontal ? "flex-row" : "flex-col",
4840
- spacingClasses2[direction][spacing2],
4841
- alignClasses[direction][align],
4842
- justifyClasses[justify],
4843
- className
5484
+ "px-3 py-2 text-left align-middle text-sm font-medium bg-muted/50",
5485
+ column.align === "center" && "text-center",
5486
+ column.align === "right" && "text-right",
5487
+ column.width && `w-[${column.width}]`
4844
5488
  ),
4845
- children
4846
- }
4847
- );
4848
- }
4849
- );
4850
- Stack.displayName = "Stack";
4851
- var Breadcrumb = React13.forwardRef(
4852
- ({ items, showHome = true, separator, className }, ref) => {
4853
- const defaultSeparator = /* @__PURE__ */ jsx(ChevronRight, { className: "w-4 h-4 text-muted-foreground" });
4854
- const separatorElement = separator || defaultSeparator;
4855
- return /* @__PURE__ */ jsxs(
4856
- "nav",
5489
+ children: column.sortable && onSort ? /* @__PURE__ */ jsx(
5490
+ Button,
5491
+ {
5492
+ variant: "ghost",
5493
+ size: "sm",
5494
+ className: "h-auto p-0 text-sm font-medium hover:bg-transparent",
5495
+ onClick: () => handleSort(column.key),
5496
+ children: /* @__PURE__ */ jsxs("span", { className: "flex items-center", children: [
5497
+ column.title,
5498
+ renderSortIcon(column)
5499
+ ] })
5500
+ }
5501
+ ) : column.title
5502
+ },
5503
+ column.key
5504
+ )) }) }),
5505
+ /* @__PURE__ */ jsx("tbody", { children: data.length === 0 ? /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx("td", { colSpan: columns2.length, className: "h-24 text-center text-muted-foreground", children: emptyMessage }) }) : data.map((row, index) => /* @__PURE__ */ jsx(
5506
+ "tr",
4857
5507
  {
4858
- ref,
4859
- "aria-label": "Breadcrumb",
4860
- className: cn("flex items-center space-x-1 text-sm", className),
4861
- children: [
4862
- showHome && /* @__PURE__ */ jsxs(Fragment, { children: [
4863
- /* @__PURE__ */ jsx(
4864
- NavLink,
4865
- {
4866
- to: "/",
4867
- className: "flex items-center text-muted-foreground hover:text-foreground transition-colors",
4868
- children: /* @__PURE__ */ jsx(Home, { className: "w-4 h-4" })
4869
- }
5508
+ className: cn(
5509
+ "border-b transition-colors hover:bg-muted/50",
5510
+ onRowClick && "cursor-pointer"
5511
+ ),
5512
+ onClick: () => onRowClick?.(row),
5513
+ children: columns2.map((column) => /* @__PURE__ */ jsx(
5514
+ "td",
5515
+ {
5516
+ className: cn(
5517
+ "px-3 py-2 align-middle text-sm",
5518
+ column.align === "center" && "text-center",
5519
+ column.align === "right" && "text-right"
4870
5520
  ),
4871
- items.length > 0 && /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: separatorElement })
5521
+ children: renderCell(column, row)
5522
+ },
5523
+ column.key
5524
+ ))
5525
+ },
5526
+ index
5527
+ )) })
5528
+ ] }) }) });
5529
+ }
5530
+ var statementTypes = [
5531
+ { value: "root", label: "Root" },
5532
+ { value: "program", label: "Program" },
5533
+ { value: "product", label: "Product" },
5534
+ { value: "account", label: "Account" }
5535
+ ];
5536
+ var columns = [
5537
+ {
5538
+ key: "transactionType",
5539
+ title: "Transaction Type",
5540
+ sortable: true,
5541
+ align: "left"
5542
+ },
5543
+ {
5544
+ key: "direction",
5545
+ title: "Direction",
5546
+ sortable: true,
5547
+ align: "left",
5548
+ render: (value) => /* @__PURE__ */ jsx(Badge, { variant: value === "CREDIT" ? "success" : "secondary", children: value })
5549
+ },
5550
+ {
5551
+ key: "amount",
5552
+ title: "Amount",
5553
+ sortable: true,
5554
+ align: "right",
5555
+ render: (value) => `$${value.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 })}`
5556
+ },
5557
+ {
5558
+ key: "count",
5559
+ title: "Count",
5560
+ sortable: true,
5561
+ align: "right"
5562
+ }
5563
+ ];
5564
+ var StatementView = ({
5565
+ statementType,
5566
+ selectedProgram,
5567
+ selectedProduct,
5568
+ accountNumber,
5569
+ startDate,
5570
+ endDate,
5571
+ statementGenerated,
5572
+ programs,
5573
+ products,
5574
+ statementHeader,
5575
+ statementTransactions,
5576
+ onStatementTypeChange,
5577
+ onProgramChange,
5578
+ onProductChange,
5579
+ onAccountNumberChange,
5580
+ onStartDateChange,
5581
+ onEndDateChange,
5582
+ onGenerateStatement,
5583
+ onEdit,
5584
+ onDownloadCSV,
5585
+ onPrintPDF,
5586
+ isGenerateDisabled
5587
+ }) => {
5588
+ return /* @__PURE__ */ jsxs("div", { className: "container mx-auto p-6 space-y-6", children: [
5589
+ /* @__PURE__ */ jsxs("div", { children: [
5590
+ /* @__PURE__ */ jsx("h1", { className: "text-3xl font-bold tracking-tight", children: "Statement" }),
5591
+ /* @__PURE__ */ jsx("p", { className: "text-muted-foreground mt-1", children: "Generate and view statement reports" })
5592
+ ] }),
5593
+ !statementGenerated && /* @__PURE__ */ jsxs(Card, { children: [
5594
+ /* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { size: "md", children: "Statement Parameters" }) }),
5595
+ /* @__PURE__ */ jsxs(CardContent, { className: "space-y-4", children: [
5596
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4", children: [
5597
+ /* @__PURE__ */ jsx(
5598
+ EnhancedSelect,
5599
+ {
5600
+ label: "Statement Type",
5601
+ placeholder: "Select type",
5602
+ options: statementTypes,
5603
+ value: statementType,
5604
+ onValueChange: onStatementTypeChange
5605
+ }
5606
+ ),
5607
+ statementType === "program" && /* @__PURE__ */ jsx(
5608
+ EnhancedSelect,
5609
+ {
5610
+ label: "Program Name",
5611
+ placeholder: "Select program",
5612
+ options: programs,
5613
+ value: selectedProgram,
5614
+ onValueChange: onProgramChange
5615
+ }
5616
+ ),
5617
+ statementType === "product" && /* @__PURE__ */ jsx(
5618
+ EnhancedSelect,
5619
+ {
5620
+ label: "Product Name",
5621
+ placeholder: "Select product",
5622
+ options: products,
5623
+ value: selectedProduct,
5624
+ onValueChange: onProductChange
5625
+ }
5626
+ ),
5627
+ statementType === "account" && /* @__PURE__ */ jsx(
5628
+ EnhancedInput,
5629
+ {
5630
+ label: "Account Number",
5631
+ placeholder: "Enter account number",
5632
+ value: accountNumber,
5633
+ onChange: (e) => onAccountNumberChange(e.target.value)
5634
+ }
5635
+ ),
5636
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
5637
+ /* @__PURE__ */ jsx("label", { className: "text-sm font-medium", children: "Start Date" }),
5638
+ /* @__PURE__ */ jsxs(Popover, { children: [
5639
+ /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
5640
+ Button,
5641
+ {
5642
+ variant: "outline",
5643
+ className: cn(
5644
+ "justify-start text-left font-normal",
5645
+ !startDate && "text-muted-foreground"
5646
+ ),
5647
+ children: [
5648
+ /* @__PURE__ */ jsx(CalendarIcon, { className: "mr-2 h-4 w-4" }),
5649
+ startDate ? format(startDate, "MM/dd/yyyy") : "Select date"
5650
+ ]
5651
+ }
5652
+ ) }),
5653
+ /* @__PURE__ */ jsx(PopoverContent, { className: "w-auto p-0", align: "start", children: /* @__PURE__ */ jsx(
5654
+ Calendar,
5655
+ {
5656
+ mode: "single",
5657
+ selected: startDate,
5658
+ onSelect: onStartDateChange,
5659
+ initialFocus: true
5660
+ }
5661
+ ) })
5662
+ ] })
4872
5663
  ] }),
4873
- items.map((item, index) => {
4874
- const isLast = index === items.length - 1;
4875
- return /* @__PURE__ */ jsxs(React13.Fragment, { children: [
4876
- item.href && !isLast ? /* @__PURE__ */ jsxs(
4877
- NavLink,
5664
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
5665
+ /* @__PURE__ */ jsx("label", { className: "text-sm font-medium", children: "End Date" }),
5666
+ /* @__PURE__ */ jsxs(Popover, { children: [
5667
+ /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
5668
+ Button,
4878
5669
  {
4879
- to: item.href,
4880
- className: "flex items-center text-muted-foreground hover:text-foreground transition-colors",
5670
+ variant: "outline",
5671
+ className: cn(
5672
+ "justify-start text-left font-normal",
5673
+ !endDate && "text-muted-foreground"
5674
+ ),
4881
5675
  children: [
4882
- item.icon && /* @__PURE__ */ jsx("span", { className: "mr-1", children: item.icon }),
4883
- item.label
5676
+ /* @__PURE__ */ jsx(CalendarIcon, { className: "mr-2 h-4 w-4" }),
5677
+ endDate ? format(endDate, "MM/dd/yyyy") : "Select date"
4884
5678
  ]
4885
5679
  }
4886
- ) : /* @__PURE__ */ jsxs("span", { className: cn(
4887
- "flex items-center",
4888
- isLast ? "text-foreground font-medium" : "text-muted-foreground"
4889
- ), children: [
4890
- item.icon && /* @__PURE__ */ jsx("span", { className: "mr-1", children: item.icon }),
4891
- item.label
4892
- ] }),
4893
- !isLast && /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: separatorElement })
4894
- ] }, index);
4895
- })
4896
- ]
4897
- }
4898
- );
4899
- }
4900
- );
4901
- Breadcrumb.displayName = "Breadcrumb";
4902
- var ListPage = React13.forwardRef(
4903
- ({
4904
- title,
4905
- description,
4906
- breadcrumbs,
4907
- actions,
4908
- children,
4909
- maxWidth = "xl",
4910
- loading = false,
4911
- emptyState,
4912
- className
4913
- }, ref) => {
4914
- const hasData = React13.Children.count(children) > 0;
4915
- return /* @__PURE__ */ jsx("div", { ref, className: cn("min-h-screen bg-gradient-subtle", className), children: /* @__PURE__ */ jsx(Container, { size: maxWidth, children: /* @__PURE__ */ jsxs(Stack, { spacing: "lg", children: [
4916
- breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ jsx(Breadcrumb, { items: breadcrumbs }),
4917
- /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between", children: [
4918
- /* @__PURE__ */ jsxs(Stack, { spacing: "sm", children: [
4919
- /* @__PURE__ */ jsx("h1", { className: "text-3xl font-bold text-foreground", children: title }),
4920
- description && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground max-w-2xl", children: description })
5680
+ ) }),
5681
+ /* @__PURE__ */ jsx(PopoverContent, { className: "w-auto p-0", align: "start", children: /* @__PURE__ */ jsx(
5682
+ Calendar,
5683
+ {
5684
+ mode: "single",
5685
+ selected: endDate,
5686
+ onSelect: onEndDateChange,
5687
+ initialFocus: true
5688
+ }
5689
+ ) })
5690
+ ] })
5691
+ ] })
4921
5692
  ] }),
4922
- actions && actions.length > 0 && /* @__PURE__ */ jsx(Stack, { direction: "horizontal", spacing: "sm", children: actions.map((action, index) => /* @__PURE__ */ jsxs(
5693
+ /* @__PURE__ */ jsx("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx(
4923
5694
  Button,
4924
5695
  {
4925
- variant: action.variant || "default",
4926
- onClick: action.onClick,
4927
- children: [
4928
- action.icon,
4929
- action.label
4930
- ]
4931
- },
4932
- index
4933
- )) })
4934
- ] }),
4935
- loading ? /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center py-12", children: /* @__PURE__ */ jsx("div", { className: "animate-pulse text-muted-foreground", children: "Loading..." }) }) : hasData ? /* @__PURE__ */ jsx(ResponsiveGrid, { type: "cards", gap: "lg", children }) : emptyState ? /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center py-12", children: emptyState }) : /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center py-12", children: /* @__PURE__ */ jsx("div", { className: "text-center", children: /* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: "No items found" }) }) })
4936
- ] }) }) });
4937
- }
4938
- );
4939
- ListPage.displayName = "ListPage";
4940
- var StatementHeader = ({ data, onEdit }) => {
4941
- return /* @__PURE__ */ jsxs(Card, { children: [
4942
- /* @__PURE__ */ jsxs(CardHeader, { direction: "row", children: [
4943
- /* @__PURE__ */ jsx(CardTitle, { size: "md", children: "Statement Summary" }),
4944
- /* @__PURE__ */ jsxs(Button, { variant: "outline", size: "sm", onClick: onEdit, children: [
4945
- /* @__PURE__ */ jsx(Edit, { className: "h-4 w-4 mr-2" }),
4946
- "Edit"
5696
+ onClick: onGenerateStatement,
5697
+ disabled: isGenerateDisabled,
5698
+ children: "Generate Statement"
5699
+ }
5700
+ ) })
4947
5701
  ] })
4948
5702
  ] }),
4949
- /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6", children: [
4950
- /* @__PURE__ */ jsx(
4951
- InfoField,
4952
- {
4953
- label: "Account",
4954
- value: data.account,
4955
- layout: "horizontal"
4956
- }
4957
- ),
4958
- /* @__PURE__ */ jsx(
4959
- InfoField,
4960
- {
4961
- label: "Product ID",
4962
- value: data.productId,
4963
- layout: "horizontal"
4964
- }
4965
- ),
4966
- /* @__PURE__ */ jsx(
4967
- InfoField,
4968
- {
4969
- label: "Program ID",
4970
- value: data.programId,
4971
- layout: "horizontal"
4972
- }
4973
- ),
4974
- /* @__PURE__ */ jsx(
4975
- InfoField,
4976
- {
4977
- label: "Start Date",
4978
- value: data.startDate,
4979
- layout: "horizontal"
4980
- }
4981
- ),
4982
- /* @__PURE__ */ jsx(
4983
- InfoField,
4984
- {
4985
- label: "End Date",
4986
- value: data.endDate,
4987
- layout: "horizontal"
4988
- }
4989
- ),
4990
- /* @__PURE__ */ jsx(
4991
- InfoField,
4992
- {
4993
- label: "Starting Balance",
4994
- value: data.startingBalance,
4995
- layout: "horizontal"
4996
- }
4997
- ),
4998
- /* @__PURE__ */ jsx(
4999
- InfoField,
5000
- {
5001
- label: "Ending Balance",
5002
- value: data.endingBalance,
5003
- layout: "horizontal"
5004
- }
5005
- )
5006
- ] }) })
5703
+ statementGenerated && statementHeader && /* @__PURE__ */ jsxs(Fragment, { children: [
5704
+ /* @__PURE__ */ jsx(StatementHeader, { data: statementHeader, onEdit }),
5705
+ /* @__PURE__ */ jsxs(Card, { children: [
5706
+ /* @__PURE__ */ jsxs(CardHeader, { direction: "row", children: [
5707
+ /* @__PURE__ */ jsx(CardTitle, { size: "md", children: "Transaction Summary" }),
5708
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
5709
+ /* @__PURE__ */ jsxs(Button, { variant: "outline", onClick: onDownloadCSV, children: [
5710
+ /* @__PURE__ */ jsx(Download, { className: "h-4 w-4 mr-2" }),
5711
+ "Download CSV"
5712
+ ] }),
5713
+ /* @__PURE__ */ jsxs(Button, { variant: "outline", onClick: onPrintPDF, children: [
5714
+ /* @__PURE__ */ jsx(FileText, { className: "h-4 w-4 mr-2" }),
5715
+ "Print PDF"
5716
+ ] })
5717
+ ] })
5718
+ ] }),
5719
+ /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(
5720
+ DataTable,
5721
+ {
5722
+ columns,
5723
+ data: statementTransactions,
5724
+ emptyMessage: "No transactions found"
5725
+ }
5726
+ ) })
5727
+ ] })
5728
+ ] })
5007
5729
  ] });
5008
5730
  };
5009
5731
  var ACHDetailsSection = ({ data }) => {
@@ -5138,7 +5860,7 @@ var typeLabels = {
5138
5860
  credit: "Credit",
5139
5861
  investment: "Investment"
5140
5862
  };
5141
- var AccountCard = React13.forwardRef(
5863
+ var AccountCard = React15.forwardRef(
5142
5864
  ({ account, showBalance = true, className }, ref) => {
5143
5865
  const TypeIcon = typeIcons[account.type];
5144
5866
  const accountData = [
@@ -5200,136 +5922,25 @@ var BusinessTypeBadge = ({ type, className }) => {
5200
5922
  config.label
5201
5923
  ] });
5202
5924
  };
5203
- function Calendar({
5204
- className,
5205
- classNames,
5206
- showOutsideDays = true,
5207
- ...props
5208
- }) {
5209
- return /* @__PURE__ */ jsx(
5210
- DayPicker,
5211
- {
5212
- showOutsideDays,
5213
- className: cn("p-3 pointer-events-auto", className),
5214
- classNames: {
5215
- months: "flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",
5216
- month: "space-y-4",
5217
- caption: "flex justify-center pt-1 relative items-center",
5218
- caption_label: "text-sm font-medium",
5219
- nav: "space-x-1 flex items-center",
5220
- button_previous: "absolute left-1 h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100",
5221
- button_next: "absolute right-1 h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100",
5222
- month_grid: "w-full border-collapse space-y-1",
5223
- weekdays: "flex",
5224
- weekday: "text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",
5225
- week: "flex w-full mt-2",
5226
- day: "h-9 w-9 text-center text-sm p-0 relative hover:bg-accent hover:text-accent-foreground rounded-md",
5227
- day_button: cn(
5228
- buttonVariants({ variant: "ghost" }),
5229
- "h-9 w-9 p-0 font-normal"
5230
- ),
5231
- selected: "bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground",
5232
- today: "bg-accent text-accent-foreground",
5233
- outside: "text-muted-foreground opacity-50",
5234
- disabled: "text-muted-foreground opacity-50",
5235
- hidden: "invisible",
5236
- ...classNames
5237
- },
5238
- ...props
5239
- }
5240
- );
5241
- }
5242
- Calendar.displayName = "Calendar";
5243
- function DataTable({
5244
- columns,
5245
- data,
5246
- sortBy,
5247
- sortDirection,
5248
- onSort,
5249
- onRowClick,
5250
- loading = false,
5251
- emptyMessage = "No data available",
5252
- className
5253
- }) {
5254
- const handleSort = (key) => {
5255
- if (onSort) {
5256
- onSort(key);
5257
- }
5258
- };
5259
- const renderSortIcon = (column) => {
5260
- if (!column.sortable || !onSort) return null;
5261
- if (sortBy === column.key) {
5262
- return sortDirection === "asc" ? /* @__PURE__ */ jsx(ChevronUp, { className: "w-4 h-4 ml-1" }) : /* @__PURE__ */ jsx(ChevronDown, { className: "w-4 h-4 ml-1" });
5263
- }
5264
- return /* @__PURE__ */ jsx(ChevronsUpDown, { className: "w-4 h-4 ml-1 opacity-50" });
5265
- };
5266
- const renderCell = (column, row) => {
5267
- const value = row[column.key];
5268
- if (column.render) {
5269
- return column.render(value, row);
5270
- }
5271
- if (typeof value === "boolean") {
5272
- return /* @__PURE__ */ jsx(Badge, { variant: value ? "success" : "secondary", children: value ? "Yes" : "No" });
5273
- }
5274
- if (Array.isArray(value)) {
5275
- return value.join(", ");
5276
- }
5277
- return value?.toString() || "-";
5278
- };
5279
- if (loading) {
5280
- return /* @__PURE__ */ jsx("div", { className: cn("rounded-md border", className), children: /* @__PURE__ */ jsx("div", { className: "p-8 text-center", children: /* @__PURE__ */ jsx("div", { className: "animate-pulse text-muted-foreground", children: "Loading..." }) }) });
5281
- }
5282
- return /* @__PURE__ */ jsx("div", { className: cn("rounded-md border", className), children: /* @__PURE__ */ jsx("div", { className: "overflow-x-auto", children: /* @__PURE__ */ jsxs("table", { className: "w-full", children: [
5283
- /* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsx("tr", { className: "border-b bg-muted/50", children: columns.map((column) => /* @__PURE__ */ jsx(
5284
- "th",
5285
- {
5286
- className: cn(
5287
- "px-3 py-2 text-left align-middle text-sm font-medium bg-muted/50",
5288
- column.align === "center" && "text-center",
5289
- column.align === "right" && "text-right",
5290
- column.width && `w-[${column.width}]`
5291
- ),
5292
- children: column.sortable && onSort ? /* @__PURE__ */ jsx(
5293
- Button,
5294
- {
5295
- variant: "ghost",
5296
- size: "sm",
5297
- className: "h-auto p-0 text-sm font-medium hover:bg-transparent",
5298
- onClick: () => handleSort(column.key),
5299
- children: /* @__PURE__ */ jsxs("span", { className: "flex items-center", children: [
5300
- column.title,
5301
- renderSortIcon(column)
5302
- ] })
5303
- }
5304
- ) : column.title
5305
- },
5306
- column.key
5307
- )) }) }),
5308
- /* @__PURE__ */ jsx("tbody", { children: data.length === 0 ? /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx("td", { colSpan: columns.length, className: "h-24 text-center text-muted-foreground", children: emptyMessage }) }) : data.map((row, index) => /* @__PURE__ */ jsx(
5309
- "tr",
5925
+ var Checkbox = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
5926
+ CheckboxPrimitive.Root,
5927
+ {
5928
+ ref,
5929
+ className: cn(
5930
+ "peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
5931
+ className
5932
+ ),
5933
+ ...props,
5934
+ children: /* @__PURE__ */ jsx(
5935
+ CheckboxPrimitive.Indicator,
5310
5936
  {
5311
- className: cn(
5312
- "border-b transition-colors hover:bg-muted/50",
5313
- onRowClick && "cursor-pointer"
5314
- ),
5315
- onClick: () => onRowClick?.(row),
5316
- children: columns.map((column) => /* @__PURE__ */ jsx(
5317
- "td",
5318
- {
5319
- className: cn(
5320
- "px-3 py-2 align-middle text-sm",
5321
- column.align === "center" && "text-center",
5322
- column.align === "right" && "text-right"
5323
- ),
5324
- children: renderCell(column, row)
5325
- },
5326
- column.key
5327
- ))
5328
- },
5329
- index
5330
- )) })
5331
- ] }) }) });
5332
- }
5937
+ className: cn("flex items-center justify-center text-current"),
5938
+ children: /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" })
5939
+ }
5940
+ )
5941
+ }
5942
+ ));
5943
+ Checkbox.displayName = CheckboxPrimitive.Root.displayName;
5333
5944
  var maxWidthClasses = {
5334
5945
  sm: "max-w-2xl",
5335
5946
  md: "max-w-4xl",
@@ -5361,7 +5972,7 @@ var getGridClasses = (gridCols, responsive) => {
5361
5972
  return "grid-cols-1 lg:grid-cols-2";
5362
5973
  }
5363
5974
  };
5364
- var PageLayout = React13.forwardRef(
5975
+ var PageLayout = React15.forwardRef(
5365
5976
  ({
5366
5977
  title,
5367
5978
  description,
@@ -5372,9 +5983,10 @@ var PageLayout = React13.forwardRef(
5372
5983
  maxWidth = "xl",
5373
5984
  gridCols = 2,
5374
5985
  responsive = true,
5375
- className
5986
+ className,
5987
+ headerContent
5376
5988
  }, ref) => {
5377
- const [editingCards, setEditingCards] = React13.useState(/* @__PURE__ */ new Set());
5989
+ const [editingCards, setEditingCards] = React15.useState(/* @__PURE__ */ new Set());
5378
5990
  const toggleEdit = (cardKey) => {
5379
5991
  setEditingCards((prev) => {
5380
5992
  const next = new Set(prev);
@@ -5391,11 +6003,12 @@ var PageLayout = React13.forwardRef(
5391
6003
  "sticky top-0 z-10 bg-gradient-subtle border-b border-border/40",
5392
6004
  "container mx-auto px-4 pt-8 pb-4",
5393
6005
  maxWidthClasses[maxWidth]
5394
- ), children: /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between", children: [
5395
- /* @__PURE__ */ jsxs("div", { children: [
6006
+ ), children: /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-4", children: [
6007
+ /* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
5396
6008
  /* @__PURE__ */ jsx("h1", { className: "text-3xl font-bold text-foreground mb-2", children: title }),
5397
6009
  description && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: description })
5398
6010
  ] }),
6011
+ headerContent && /* @__PURE__ */ jsx("div", { className: "flex items-center", children: headerContent }),
5399
6012
  actions.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: actions.map((action, index) => {
5400
6013
  const Icon2 = action.icon;
5401
6014
  return /* @__PURE__ */ jsxs(
@@ -5502,7 +6115,7 @@ var DetailPageLayout = ({
5502
6115
  };
5503
6116
  var DropdownMenu = DropdownMenuPrimitive.Root;
5504
6117
  var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
5505
- var DropdownMenuContent = React13.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
6118
+ var DropdownMenuContent = React15.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
5506
6119
  DropdownMenuPrimitive.Content,
5507
6120
  {
5508
6121
  ref,
@@ -5515,7 +6128,7 @@ var DropdownMenuContent = React13.forwardRef(({ className, sideOffset = 4, ...pr
5515
6128
  }
5516
6129
  ) }));
5517
6130
  DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
5518
- var DropdownMenuItem = React13.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
6131
+ var DropdownMenuItem = React15.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
5519
6132
  DropdownMenuPrimitive.Item,
5520
6133
  {
5521
6134
  ref,
@@ -5528,7 +6141,7 @@ var DropdownMenuItem = React13.forwardRef(({ className, inset, ...props }, ref)
5528
6141
  }
5529
6142
  ));
5530
6143
  DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
5531
- var DropdownMenuLabel = React13.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
6144
+ var DropdownMenuLabel = React15.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
5532
6145
  DropdownMenuPrimitive.Label,
5533
6146
  {
5534
6147
  ref,
@@ -5541,7 +6154,7 @@ var DropdownMenuLabel = React13.forwardRef(({ className, inset, ...props }, ref)
5541
6154
  }
5542
6155
  ));
5543
6156
  DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
5544
- var DropdownMenuSeparator = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
6157
+ var DropdownMenuSeparator = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
5545
6158
  DropdownMenuPrimitive.Separator,
5546
6159
  {
5547
6160
  ref,
@@ -5550,7 +6163,51 @@ var DropdownMenuSeparator = React13.forwardRef(({ className, ...props }, ref) =>
5550
6163
  }
5551
6164
  ));
5552
6165
  DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
5553
- var EntityCard = React13.forwardRef(
6166
+ var EditableInfoField = ({
6167
+ label,
6168
+ value,
6169
+ options,
6170
+ onChange,
6171
+ placeholder = "Select...",
6172
+ renderValue,
6173
+ className
6174
+ }) => {
6175
+ const [isEditing, setIsEditing] = useState(false);
6176
+ const handleChange = (newValue) => {
6177
+ onChange(newValue);
6178
+ setIsEditing(false);
6179
+ };
6180
+ if (isEditing) {
6181
+ return /* @__PURE__ */ jsx("div", { className, children: /* @__PURE__ */ jsx(
6182
+ EnhancedSelect,
6183
+ {
6184
+ label,
6185
+ value: value || "",
6186
+ onValueChange: handleChange,
6187
+ options,
6188
+ placeholder
6189
+ }
6190
+ ) });
6191
+ }
6192
+ const displayValue = value ? renderValue ? renderValue(value) : value : placeholder;
6193
+ return /* @__PURE__ */ jsx(
6194
+ "div",
6195
+ {
6196
+ className: cn("cursor-pointer transition-colors hover:bg-muted/50 rounded-md -mx-2 px-2 -my-1 py-1", className),
6197
+ onClick: () => setIsEditing(true),
6198
+ role: "button",
6199
+ tabIndex: 0,
6200
+ onKeyDown: (e) => {
6201
+ if (e.key === "Enter" || e.key === " ") {
6202
+ e.preventDefault();
6203
+ setIsEditing(true);
6204
+ }
6205
+ },
6206
+ children: /* @__PURE__ */ jsx(InfoField, { label, value: displayValue })
6207
+ }
6208
+ );
6209
+ };
6210
+ var EntityCard = React15.forwardRef(
5554
6211
  ({
5555
6212
  entity,
5556
6213
  actions,
@@ -5596,7 +6253,7 @@ var EntityCard = React13.forwardRef(
5596
6253
  ] }),
5597
6254
  allActions.length > 0 && /* @__PURE__ */ jsxs(DropdownMenu, { children: [
5598
6255
  /* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "icon", className: "h-8 w-8", children: /* @__PURE__ */ jsx(MoreVertical, { className: "w-4 h-4" }) }) }),
5599
- /* @__PURE__ */ jsx(DropdownMenuContent, { align: "end", children: allActions.map((action, index) => /* @__PURE__ */ jsxs(React13.Fragment, { children: [
6256
+ /* @__PURE__ */ jsx(DropdownMenuContent, { align: "end", children: allActions.map((action, index) => /* @__PURE__ */ jsxs(React15.Fragment, { children: [
5600
6257
  /* @__PURE__ */ jsxs(
5601
6258
  DropdownMenuItem,
5602
6259
  {
@@ -5622,7 +6279,7 @@ var EntityCard = React13.forwardRef(
5622
6279
  }
5623
6280
  );
5624
6281
  EntityCard.displayName = "EntityCard";
5625
- var FormField = React13.forwardRef(
6282
+ var FormField = React15.forwardRef(
5626
6283
  ({ label, description, error, required, children, className, layout = "vertical" }, ref) => {
5627
6284
  const isHorizontal = layout === "horizontal";
5628
6285
  return /* @__PURE__ */ jsxs(
@@ -5668,7 +6325,7 @@ var trendColors = {
5668
6325
  down: "destructive",
5669
6326
  neutral: "secondary"
5670
6327
  };
5671
- var MetricCard = React13.forwardRef(
6328
+ var MetricCard = React15.forwardRef(
5672
6329
  ({ title, value, description, trend, icon, variant = "default", className }, ref) => {
5673
6330
  const TrendIcon = trend ? trendIcons[trend.direction] : null;
5674
6331
  return /* @__PURE__ */ jsxs(
@@ -5700,22 +6357,6 @@ var MetricCard = React13.forwardRef(
5700
6357
  }
5701
6358
  );
5702
6359
  MetricCard.displayName = "MetricCard";
5703
- var Popover = PopoverPrimitive.Root;
5704
- var PopoverTrigger = PopoverPrimitive.Trigger;
5705
- var PopoverContent = React13.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(
5706
- PopoverPrimitive.Content,
5707
- {
5708
- ref,
5709
- align,
5710
- sideOffset,
5711
- className: cn(
5712
- "z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
5713
- className
5714
- ),
5715
- ...props
5716
- }
5717
- ) }));
5718
- PopoverContent.displayName = PopoverPrimitive.Content.displayName;
5719
6360
  var Toaster = ({ ...props }) => {
5720
6361
  const { theme = "system" } = useTheme();
5721
6362
  return /* @__PURE__ */ jsx(
@@ -5736,7 +6377,7 @@ var Toaster = ({ ...props }) => {
5736
6377
  );
5737
6378
  };
5738
6379
  var Tabs = TabsPrimitive.Root;
5739
- var TabsList = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
6380
+ var TabsList = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
5740
6381
  TabsPrimitive.List,
5741
6382
  {
5742
6383
  ref,
@@ -5748,7 +6389,7 @@ var TabsList = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__
5748
6389
  }
5749
6390
  ));
5750
6391
  TabsList.displayName = TabsPrimitive.List.displayName;
5751
- var TabsTrigger = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
6392
+ var TabsTrigger = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
5752
6393
  TabsPrimitive.Trigger,
5753
6394
  {
5754
6395
  ref,
@@ -5760,7 +6401,7 @@ var TabsTrigger = React13.forwardRef(({ className, ...props }, ref) => /* @__PUR
5760
6401
  }
5761
6402
  ));
5762
6403
  TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
5763
- var TabsContent = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
6404
+ var TabsContent = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
5764
6405
  TabsPrimitive.Content,
5765
6406
  {
5766
6407
  ref,
@@ -5773,7 +6414,7 @@ var TabsContent = React13.forwardRef(({ className, ...props }, ref) => /* @__PUR
5773
6414
  ));
5774
6415
  TabsContent.displayName = TabsPrimitive.Content.displayName;
5775
6416
  var ToastProvider = ToastPrimitives.Provider;
5776
- var ToastViewport = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
6417
+ var ToastViewport = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
5777
6418
  ToastPrimitives.Viewport,
5778
6419
  {
5779
6420
  ref,
@@ -5799,7 +6440,7 @@ var toastVariants = cva(
5799
6440
  }
5800
6441
  }
5801
6442
  );
5802
- var Toast = React13.forwardRef(({ className, variant, ...props }, ref) => {
6443
+ var Toast = React15.forwardRef(({ className, variant, ...props }, ref) => {
5803
6444
  return /* @__PURE__ */ jsx(
5804
6445
  ToastPrimitives.Root,
5805
6446
  {
@@ -5810,7 +6451,7 @@ var Toast = React13.forwardRef(({ className, variant, ...props }, ref) => {
5810
6451
  );
5811
6452
  });
5812
6453
  Toast.displayName = ToastPrimitives.Root.displayName;
5813
- var ToastAction = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
6454
+ var ToastAction = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
5814
6455
  ToastPrimitives.Action,
5815
6456
  {
5816
6457
  ref,
@@ -5822,7 +6463,7 @@ var ToastAction = React13.forwardRef(({ className, ...props }, ref) => /* @__PUR
5822
6463
  }
5823
6464
  ));
5824
6465
  ToastAction.displayName = ToastPrimitives.Action.displayName;
5825
- var ToastClose = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
6466
+ var ToastClose = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
5826
6467
  ToastPrimitives.Close,
5827
6468
  {
5828
6469
  ref,
@@ -5836,7 +6477,7 @@ var ToastClose = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE
5836
6477
  }
5837
6478
  ));
5838
6479
  ToastClose.displayName = ToastPrimitives.Close.displayName;
5839
- var ToastTitle = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
6480
+ var ToastTitle = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
5840
6481
  ToastPrimitives.Title,
5841
6482
  {
5842
6483
  ref,
@@ -5845,7 +6486,7 @@ var ToastTitle = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE
5845
6486
  }
5846
6487
  ));
5847
6488
  ToastTitle.displayName = ToastPrimitives.Title.displayName;
5848
- var ToastDescription = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
6489
+ var ToastDescription = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
5849
6490
  ToastPrimitives.Description,
5850
6491
  {
5851
6492
  ref,
@@ -5854,6 +6495,19 @@ var ToastDescription = React13.forwardRef(({ className, ...props }, ref) => /* @
5854
6495
  }
5855
6496
  ));
5856
6497
  ToastDescription.displayName = ToastPrimitives.Description.displayName;
6498
+ var TransactionTypeBadge = ({
6499
+ transactionType,
6500
+ isInbound,
6501
+ className
6502
+ }) => {
6503
+ const Icon2 = isInbound ? ArrowDownRight : ArrowUpRight;
6504
+ const variant = "outline";
6505
+ return /* @__PURE__ */ jsxs(Badge, { variant, className, children: [
6506
+ isInbound && /* @__PURE__ */ jsx(Icon2, { className: "w-3 h-3 mr-1" }),
6507
+ transactionType,
6508
+ !isInbound && /* @__PURE__ */ jsx(Icon2, { className: "w-3 h-3 ml-1" })
6509
+ ] });
6510
+ };
5857
6511
  var mockCounterparties = [
5858
6512
  {
5859
6513
  id: "1",
@@ -6068,8 +6722,8 @@ var transactionColumns = [
6068
6722
  { key: "date", title: "Date", sortable: true }
6069
6723
  ];
6070
6724
  function DashboardDemo() {
6071
- const [sortBy, setSortBy] = React13.useState();
6072
- const [sortDirection, setSortDirection] = React13.useState("asc");
6725
+ const [sortBy, setSortBy] = React15.useState();
6726
+ const [sortDirection, setSortDirection] = React15.useState("asc");
6073
6727
  const handleSort = (key) => {
6074
6728
  if (sortBy === key) {
6075
6729
  setSortDirection(sortDirection === "asc" ? "desc" : "asc");
@@ -6203,7 +6857,7 @@ var badgeVariants2 = [
6203
6857
  "suspended"
6204
6858
  ];
6205
6859
  function ColorSwatch({ color }) {
6206
- const [copied, setCopied] = React13.useState(false);
6860
+ const [copied, setCopied] = React15.useState(false);
6207
6861
  const copyToClipboard = () => {
6208
6862
  navigator.clipboard.writeText(color.value);
6209
6863
  setCopied(true);
@@ -6309,8 +6963,8 @@ var tableColumns = [
6309
6963
  { key: "verified", title: "Verified", sortable: true }
6310
6964
  ];
6311
6965
  function UIKitShowcase() {
6312
- const [sortBy, setSortBy] = React13.useState();
6313
- const [sortDirection, setSortDirection] = React13.useState("asc");
6966
+ const [sortBy, setSortBy] = React15.useState();
6967
+ const [sortDirection, setSortDirection] = React15.useState("asc");
6314
6968
  const handleSort = (key) => {
6315
6969
  if (sortBy === key) {
6316
6970
  setSortDirection(sortDirection === "asc" ? "desc" : "asc");
@@ -6447,10 +7101,15 @@ var mockAlerts = [
6447
7101
  type: "Ofac",
6448
7102
  status: "Unassigned",
6449
7103
  contextType: "Ofac",
6450
- description: "INDIVIDUAL: ali hassan is flagged for OFAC",
7104
+ description: "WIRE TRANSFER: Multiple OFAC matches detected for beneficiary bank",
6451
7105
  timeline: [
6452
7106
  { id: "1", timestamp: "2025-09-30 03:00:21", user: "System", action: "Alert Created", status: "Unassigned" },
6453
- { id: "2", timestamp: "2025-09-30 09:15:32", user: "John Smith", action: "Alert Assigned", details: "Assigned to compliance team", status: "In Progress" }
7107
+ { id: "2", timestamp: "2025-09-30 09:15:32", user: "John Smith", action: "Alert Assigned", details: "Assigned to compliance team", status: "In Progress" },
7108
+ { id: "3", timestamp: "2025-09-30 10:22:15", user: "John Smith", action: "Note added", details: "Added RFI note requesting documentation" },
7109
+ { id: "4", timestamp: "2025-09-30 10:25:00", user: "John Smith", action: "Document added", details: "Uploaded passport_scan.pdf" },
7110
+ { id: "5", timestamp: "2025-09-30 11:50:00", user: "Sarah Johnson", action: "Document added", details: "Uploaded proof_of_address.jpg" },
7111
+ { id: "6", timestamp: "2025-10-01 08:30:00", user: "System", action: "RFI Status change", details: "Status changed from Pending to Provided" },
7112
+ { id: "7", timestamp: "2025-10-01 14:20:00", user: "Michael Chen", action: "Alert Approved", details: "Approved after review - false positive confirmed" }
6454
7113
  ],
6455
7114
  notes: [
6456
7115
  { id: "1", timestamp: "2025-09-30 10:22:15", user: "John Smith", content: "Reviewing OFAC match. Need to verify identity documents.", type: "RFI Note" },
@@ -6481,111 +7140,45 @@ var mockAlerts = [
6481
7140
  }
6482
7141
  ],
6483
7142
  contextData: {
6484
- entityName: "Ali Hassan",
6485
- entityType: "Individual",
6486
- matchScore: "95%",
6487
- listName: "OFAC SDN List",
6488
- flaggedItems: [
6489
- { field: "Name", value: "Ali Hassan", matchScore: "95%" },
6490
- { field: "DOB", value: "1985-03-12", matchScore: "100%" }
6491
- ],
6492
- sdns: [
6493
- {
6494
- uid: 12345,
6495
- firstName: "Ali",
6496
- lastName: "Hassan",
6497
- sdnType: "Individual",
6498
- programs: ["SYRIA", "SDGT"],
6499
- title: "Military Commander",
6500
- remarks: "DOB 12 Mar 1985; POB Damascus, Syria; Passport D1234567 (Syria); alt. Passport E7654321 (Lebanon); Linked to Entity XYZ",
6501
- nationalities: ["Syria", "Lebanon"],
6502
- citizenships: ["Syria"],
6503
- dateOfBirthList: [
6504
- { dateOfBirth: "1985-03-12", mainEntry: true },
6505
- { dateOfBirth: "1985-03-15", mainEntry: false }
6506
- ],
6507
- placeOfBirthList: [
6508
- { placeOfBirth: "Damascus, Syria", mainEntry: true },
6509
- { placeOfBirth: "Aleppo, Syria", mainEntry: false }
6510
- ],
6511
- akaList: [
6512
- { category: "strong", firstName: "Ali", lastName: "Al-Hassan" },
6513
- { category: "weak", firstName: "Ali", lastName: "Hasan" },
6514
- { category: "strong", firstName: "Ali Hassan", lastName: "Mohamed" }
6515
- ],
6516
- idList: [
6517
- { idType: "Passport", idNumber: "D1234567", idCountry: "Syria", issueDate: "2010-01-15", expirationDate: "2020-01-15" },
6518
- { idType: "Passport", idNumber: "E7654321", idCountry: "Lebanon", issueDate: "2015-06-20", expirationDate: "2025-06-20" },
6519
- { idType: "National ID", idNumber: "SY123456789", idCountry: "Syria" }
6520
- ]
6521
- }
6522
- ],
6523
- addresses: [
6524
- {
6525
- uid: 67890,
6526
- address1: "Building 42, Al-Mazzeh",
6527
- city: "Damascus",
6528
- stateOrProvince: "Damascus Governorate",
6529
- postalCode: "12345",
6530
- country: "Syria",
6531
- addressRemarks: "Primary Residence"
6532
- },
7143
+ ofacId: 5043462,
7144
+ counterpartyName: null,
7145
+ counterpartyId: null,
7146
+ businessName: null,
7147
+ businessId: null,
7148
+ individualName: null,
7149
+ individualId: null,
7150
+ uboId: null,
7151
+ transactionPaymentId: "5c73200c-3ade-4ba5-b6e6-39ad4b519fab",
7152
+ tenantId: "JakeUAT",
7153
+ alertId: 4425,
7154
+ note: null,
7155
+ status: "REVIEW",
7156
+ createdAt: 1760162113,
7157
+ updatedAt: 176016211300416e-5,
7158
+ updatedBy: null,
7159
+ ofacCheckDetails: [
6533
7160
  {
6534
- uid: 67891,
6535
- address1: "Apartment 15, Hamra Street",
6536
- city: "Beirut",
6537
- country: "Lebanon",
6538
- addressRemarks: "Secondary Address"
7161
+ id: 24870,
7162
+ checkKey: "originatorName",
7163
+ checkValue: "Kim jung un"
6539
7164
  },
6540
7165
  {
6541
- uid: 67892,
6542
- address1: "Office 203, Business District",
6543
- city: "Aleppo",
6544
- stateOrProvince: "Aleppo Governorate",
6545
- country: "Syria",
6546
- addressRemarks: "Business Address - Suspected Front Company"
6547
- }
6548
- ],
6549
- alt_names: [
6550
- { uid: 54321, type: "aka", category: "strong", firstName: "Ali", lastName: "Al-Hassan" },
6551
- { uid: 54322, type: "aka", category: "weak", firstName: "Ali", lastName: "Hasan" },
6552
- { uid: 54323, type: "aka", category: "strong", firstName: "Ali Hassan", lastName: "Mohamed" },
6553
- { uid: 54324, type: "fka", category: "weak", firstName: "Ali", lastName: "Hassani" }
6554
- ],
6555
- sanctions_entries: [
6556
- {
6557
- program: "SYRIA",
6558
- effectiveDate: "2015-03-15",
6559
- authority: "Executive Order 13572",
6560
- legalBasis: "Involvement in human rights abuses in Syria"
7166
+ id: 24871,
7167
+ checkKey: "originatorBankName",
7168
+ checkValue: "TD bank"
6561
7169
  },
6562
7170
  {
6563
- program: "SDGT",
6564
- effectiveDate: "2016-08-22",
6565
- authority: "Executive Order 13224",
6566
- legalBasis: "Specially Designated Global Terrorist"
6567
- }
6568
- ],
6569
- associated_entities: [
6570
- {
6571
- entityName: "XYZ Trading Company",
6572
- relationship: "Director",
6573
- entityType: "Business"
7171
+ id: 24872,
7172
+ checkKey: "beneficiaryName",
7173
+ checkValue: "Jake from Braid LLC"
6574
7174
  },
6575
7175
  {
6576
- entityName: "Hassan Family Trust",
6577
- relationship: "Beneficiary",
6578
- entityType: "Trust"
7176
+ id: 24873,
7177
+ checkKey: "beneficiaryBankName",
7178
+ checkValue: "RUssian bank"
6579
7179
  }
6580
7180
  ],
6581
- screening_metadata: {
6582
- screenedAt: "2025-09-30T03:00:21Z",
6583
- screeningEngine: "OFAC Advanced Matcher v3.2",
6584
- datasetVersion: "2025-09-25",
6585
- totalRecordsScreened: 1,
6586
- matchAlgorithm: "Fuzzy + Phonetic",
6587
- confidenceThreshold: 0.85
6588
- }
7181
+ rawResults: `{"SDNs":[{"entityID":"51656","sdnName":"RUSSIAN UNIVERSAL BANK","sdnType":"","program":["RUSSIA-EO14024"],"title":"","callSign":"","vesselType":"","tonnage":"","grossRegisteredTonnage":"","vesselFlag":"","vesselOwner":"","remarks":"SWIFT/BIC RUNIRUMM; Website www.rubank.ru; Secondary sanctions risk: See Section 11 of Executive Order 14024.; Target Type Financial Institution; Tax ID No. 7718120593 (Russia); Legal Entity Number 253400YYHA5GJQB46R62; Registration Number 1027739671288 (Russia).","match":0.9325,"matchedName":"russian universal bank"},{"entityID":"17755","sdnName":"RUSSIAN NATIONAL COMMERCIAL BANK","sdnType":"","program":["UKRAINE-EO13685"],"title":"","callSign":"","vesselType":"","tonnage":"","grossRegisteredTonnage":"","vesselFlag":"","vesselOwner":"","remarks":"SWIFT/BIC RNCORUMM; Website http://www.rncb.ru; Email Address rncb@rncb.ru; BIK (RU) 044525607; Secondary sanctions risk: Ukraine-/Russia-Related Sanctions Regulations, 31 CFR 589.201 and/or 589.209; Registration ID 1027700381290 (Russia); Tax ID No. 7701105460 (Russia); Government Gazette Number 09610705 (Russia); a.k.a. 'RNCB'.","match":0.906896551724138,"matchedName":"russian national commercial bank"}],"altNames":[{"entityID":"51760","alternateID":"81078","alternateType":"aka","alternateName":"RUSSITA BANK","alternateRemarks":"","match":0.9636363636363636,"matchedName":"russita bank"},{"entityID":"18268","alternateID":"28201","alternateType":"aka","alternateName":"RUSSIAN EXPORT-IMPORT BANK","alternateRemarks":"","match":0.9217391304347826,"matchedName":"russian export import bank"},{"entityID":"16681","alternateID":"25333","alternateType":"fka","alternateName":"AKTSIONERNY BANK RUSSIAN FEDERATION","alternateRemarks":"","match":0.9015625,"matchedName":"aktsionerny bank russian federation"}],"sectoralSanctions":[{"Addresses":["3, Gagarinsky Pereulok, Moscow, 119034, RU","3 Gagarinsky per., Moscow, 119034, RU"],"AlternateNames":["Russian Agricultural Bank","Russian Agricultural Bank Open Joint Stock Company","Rosselkhozbank","Russian Agricultural Bank OJSC","RusAg"],"EntityID":"17014","IDsOnRecord":["Registration Number, 1027700342890, RU","Government Gazette Number, 52750822, RU","Website, http://www.rshb.ru","SWIFT/BIC, RUAGRUMM","Executive Order 13662 Directive Determination -, Subject to Directive 1","Executive Order 14024 Directive Information -, For more information on directives, please visit the following link: https://home.treasury.gov/policy-issues/financial-sanctions/sanctions-programs-and-country-information/russian-harmful-foreign-activities-sanctions#directives","Executive Order 14024 Directive Information, Subject to Directive 3 - All transactions in, provision of financing for, and other dealings in new debt of longer than 14 days maturity or new equity where such new debt or new equity is issued on or after the 'Effective Date (EO 14024 Directive)' associated with this name are prohibited.","Listing Date (EO 14024 Directive 3):, 2022-02-24","Effective Date (EO 14024 Directive 3):, 2022-03-26","Secondary sanctions risk:, Ukraine-/Russia-Related Sanctions Regulations, 31 CFR 589.201 and/or 589.209"],"Name":"Joint Stock Company Russian Agricultural Bank","Programs":["UKRAINE-EO13662","RUSSIA-EO14024"],"Remarks":["For more information on directives, please visit the following link: http://www.treasury.gov/resource-center/sanctions/Programs/Pages/ukraine.aspx#directives."],"SourceInfoURL":"https://ofac.treasury.gov/other-ofac-sanctions-lists","SourceListURL":"https://sanctionslist.ofac.treas.gov/Home/ConsolidatedList","Type":"Entity","match":0.9217391304347826,"matchedName":"russian agricultural bank"},{"Addresses":["12 Krasnopresnenskaya Embankments, Moscow, 123610, RU"],"AlternateNames":["ROSEKSIMBANK, ZAO","RUSSIAN EXPORT-IMPORT BANK","GOSUDARSTVENNY SPETSIALIZIROVANNY ROSSISKI EKSPORTNO-IMPORTNY BANK (ZAKRYTOE AKTSIONERNOE OBSHCHESTVO)","STATE SPECIALIZED RUSSIAN EXPORT-IMPORT BANK JOINT-STOCK COMPANY","Eximbank of Russia ZAO","Eximbank of Russia","AO Roseksimbank"],"EntityID":"18268","IDsOnRecord":["Registration Number, 1027739109133, RU","Tax ID No., 7704001959, RU","Legal Entity Number, 253400HA6URWT39X2982","SWIFT/BIC, EXIRRUMM","Website, eximbank.ru","Executive Order 13662 Directive Determination -, Subject to Directive 1","Organization Established Date, 1994-05-24","Target Type, Financial Institution","Secondary sanctions risk:, Ukraine-/Russia-Related Sanctions Regulations, 31 CFR 589.201 and/or 589.209","Secondary sanctions risk:, See Section 11 of Executive Order 14024."],"Name":"EXIMBANK OF RUSSIA JSC","Programs":["UKRAINE-EO13662","RUSSIA-EO14024"],"Remarks":["All offices worldwide","for more information on directives, please visit the following link: http://www.treasury.gov/resource-center/sanctions/Programs/Pages/ukraine.aspx#directives."],"SourceInfoURL":"https://ofac.treasury.gov/other-ofac-sanctions-lists","SourceListURL":"https://sanctionslist.ofac.treas.gov/Home/ConsolidatedList","Type":"Entity","match":0.9217391304347826,"matchedName":"russian export import bank"},{"Addresses":["65/1 Suschevsky Val, Moscow, 129594, RU","65 Sushchevskiy val, Moscow, 129594, RU"],"AlternateNames":["RUSSIAN REGIONAL DEVELOPMENT BANK","VBRR"],"EntityID":"18298","IDsOnRecord":["Registration ID, 3287, RU","Website, www.vbrr.ru","Executive Order 13662 Directive Determination -, Subject to Directive 2","Executive Order 13662 Directive Determination -, Subject to Directive 4","Secondary sanctions risk:, Ukraine-/Russia-Related Sanctions Regulations, 31 CFR 589.201 and/or 589.209"],"Name":"OJSC RUSSIAN REGIONAL DEVELOPMENT BANK","Programs":["UKRAINE-EO13662"],"Remarks":["For more information on directives, please visit the following link: http://www.treasury.gov/resource-center/sanctions/Programs/Pages/ukraine.aspx#directives."],"SourceInfoURL":"https://ofac.treasury.gov/other-ofac-sanctions-lists","SourceListURL":"https://sanctionslist.ofac.treas.gov/Home/ConsolidatedList","Type":"Entity","match":0.905,"matchedName":"russian regional development bank"}],"nonSDNMenuBasedSanctionsList":[{"Addresses":["Neglinnaya St 12, Moscow, 107016, RU","Moscow, RU"],"AlternateNames":["Bank Rossi, Federal State Budgetary Institution","Bank of Russia","Bank of Russia, Central Bank","Tsentralny Bank Rossiskoi Federatsii","Central Bank of Russia"],"EntityID":"31695","EntityNumber":"31695","IDs":["Registration Number, 1037700013020, RU","Government Gazette Number, 00032253, RU","Tax ID No., 7702235133, RU","SWIFT/BIC, CBRFRUMM","Website, www.cbr.ru","Organization Established Date, 1990-07-13","Organization Type:, Central banking","Executive Order 14024 Directive Information -, For more information on directives, please visit the following link: https://home.treasury.gov/policy-issues/financial-sanctions/sanctions-programs-and-country-information/russian-harmful-foreign-activities-sanctions#directives","Executive Order 14024 Directive Information, Subject to Directive 1a - As of the effective date, participation in the secondary market for ruble or non-ruble denominated bonds issued on or after the effective date by the Central Bank of the Russian Federation, the National Wealth Fund of the Russian Federation, or the Ministry of Finance of the Russian Federation is prohibited.","Target Type, Government Entity","Listing Date (EO 14024 Directive 1a):, 2022-02-22","Effective Date (EO 14024 Directive 1a):, 2022-03-01","Executive Order 14024 Directive Information, Subject to Directive 4 - any transaction involving the Central Bank of the Russian Federation, the National Wealth Fund of the Russian Federation, or the Ministry of Finance of the Russian Federation, including any transfer of assets to such entities or any foreign exchange transaction for or on behalf of such entities is prohibited."],"Name":"Central Bank of the Russian Federation","Programs":["RUSSIA-EO14024"],"SourceInfoURL":"https://ofac.treasury.gov/other-ofac-sanctions-lists","Type":"Entity","match":0.9326268221574344,"matchedName":"bank of russia"},{"Addresses":["3, Gagarinsky Pereulok, Moscow, 119034, RU","3 Gagarinsky per., Moscow, 119034, RU"],"AlternateNames":["Russian Agricultural Bank","Russian Agricultural Bank Open Joint Stock Company","Rosselkhozbank","Russian Agricultural Bank OJSC","RusAg"],"EntityID":"17014","EntityNumber":"17014","IDs":["Registration Number, 1027700342890, RU","Government Gazette Number, 52750822, RU","Website, http://www.rshb.ru","SWIFT/BIC, RUAGRUMM","Executive Order 13662 Directive Determination -, Subject to Directive 1","Executive Order 14024 Directive Information -, For more information on directives, please visit the following link: https://home.treasury.gov/policy-issues/financial-sanctions/sanctions-programs-and-country-information/russian-harmful-foreign-activities-sanctions#directives","Executive Order 14024 Directive Information, Subject to Directive 3 - All transactions in, provision of financing for, and other dealings in new debt of longer than 14 days maturity or new equity where such new debt or new equity is issued on or after the 'Effective Date (EO 14024 Directive)' associated with this name are prohibited.","Listing Date (EO 14024 Directive 3):, 2022-02-24","Effective Date (EO 14024 Directive 3):, 2022-03-26","Secondary sanctions risk:, Ukraine-/Russia-Related Sanctions Regulations, 31 CFR 589.201 and/or 589.209"],"Name":"Joint Stock Company Russian Agricultural Bank","Programs":["UKRAINE-EO13662","RUSSIA-EO14024"],"Remarks":["For more information on directives, please visit the following link: http://www.treasury.gov/resource-center/sanctions/Programs/Pages/ukraine.aspx#directives."],"SourceInfoURL":"https://ofac.treasury.gov/other-ofac-sanctions-lists","Type":"Entity","match":0.9217391304347826,"matchedName":"russian agricultural bank"}],"ukConsolidatedSanctionsList":[{"Addresses":["Rastrelli Square, 2A, Saint-Petersburg"],"GroupID":14177,"GroupType":"Entity","LastUpdates":["15/12/2023"],"ListedDates":["22/02/2022"],"Names":["BANK OF RUSSIA","BANK ROSSIYA","RUSSIA BANK"],"OtherInfos":["(UK Sanctions List Ref):RUS0232. Financial sanctions imposed in addition to an asset freeze: Correspondent banking relationships etc. Trust services. Date trust services sanctions imposed: 21/03/2023. The prohibition on correspondent banking relationships etc. measure was imposed on 15/12/2023. (UK Statement of Reasons):Bank \\"Rossiya\\" is a Russian bank privately owned by elite Russian billionaires with direct links to Putin. Bank \\"Rossiya\\" also has important stakes in the National Media Group, which controls television stations which actively support the Russian Government's policies of destabilisation in Ukraine. Since the annexation of Crimea, Bank \\"Rossiya\\" has opened branches across Crimea and Sevastopol, and provided travel cards for the public to travel across the peninsula thereby supporting the integration of Crimea and Sevastopol into the Russian Federation through the financial system. Bank \\"Rossiya\\" has also contributed to the provision of insurance and investment throughout Crimea and Sevastopol and services to support military capability and major transport links. Bank \\"Rossiya\\" therefore is or has been involved in providing financial services, or making available funds, economic resources, goods or technology and engaging in, providing support for, or promoting any policy or action that could contribute to destabilising Ukraine or undermining or threatening the territorial integrity, sovereignty or independence of Ukraine. (Website):https://abr.ru/ (Type of entity):Public Joint Stock Company (PJSC) (Business Reg No):License number: 328 INN: 7831000122 OGRN: 1027800000084"],"PostalCodes":["191124"],"SanctionListDates":["22/02/2022"],"match":0.9565403304178814,"matchedName":"russia bank"},{"Addresses":["0 Bld. 2 Presnenskaya Emb. (Moscow City, IQ-quarter Complex), Moscow","3, Gagarinsky Pereulok, Moscow"],"Countries":["Russia"],"GroupID":15016,"GroupType":"Entity","LastUpdates":["15/12/2023"],"ListedDates":["24/03/2022"],"Names":["JSC ROSSELKHOZBANK","RUSAG","RUSSIAN AGRICULTURAL BANK"],"OtherInfos":["(UK Sanctions List Ref):RUS1073. Financial sanctions imposed in addition to an asset freeze: Dealing with transferable securities or money-market instruments. Loans and credit arrangements. Correspondent banking relationships etc. Trust services. Date trust services sanctions imposed: 21/03/2023. The prohibition on correspondent banking relationships etc. measure was imposed on 15/12/2023. (UK Statement of Reasons):RUSSIAN AGRICULTURAL BANK is a Russian bank. RUSSIAN AGRICULTURAL BANK is or has been involved in obtaining a benefit from or supporting the Government of Russia by carrying on business in the financial services sector - a sector of strategic significance to the Government of Russia. (Phone number):(1) 7 (495) 777-11-00 (2) 7 (495) 787-7-787 (3) 8 (800) 100-0-100 (Website):(1) http://www.rshb.ru/en/ (2) https://www.rshb.ru/ (Email address):office@rshb.ru"],"PostalCodes":["123112","119034"],"SanctionListDates":["24/03/2022"],"match":0.9217391304347826,"matchedName":"russian agricultural bank"},{"Addresses":["27 Kalanchevskaya str., Moscow"],"Countries":["Russia"],"GroupID":15017,"GroupType":"Entity","LastUpdates":["15/12/2023"],"ListedDates":["24/03/2022"],"Names":["ALFA-BANK JSC","ALFA-BANK RUSSIA"],"OtherInfos":["(UK Sanctions List Ref):RUS1074. Financial sanctions imposed in addition to an asset freeze: Correspondent banking relationships etc. Trust services. Date trust services sanctions imposed: 21/03/2023. The prohibition on correspondent banking relationships etc. measure was imposed on 15/12/2023. (UK Statement of Reasons):Alfa-Bank JSC is a Russian bank. There are reasonable grounds to suspect that Alfa-Bank JSC is or has been involved in obtaining a benefit from or supporting the Government of Russia by carrying on business in the financial services sector - a sector of strategic significance to the Government of Russia. (Phone number):7 495 755-58-58. 7 495 78-888-78 (Website):https://alfabank.ru/ (Type of entity):Bank, Financial Services Company, JSC"],"PostalCodes":["107078"],"SanctionListDates":["24/03/2022"],"match":0.9155457448285437,"matchedName":"alfa bank russia"},{"Addresses":["Naberezhnaja street, 34, Simferopol, The Autonomous Republic of Crimea and the city of Sevastopol"],"Countries":["Ukraine"],"GroupID":13078,"GroupType":"Entity","LastUpdates":["21/03/2023"],"ListedDates":["31/07/2014"],"Names":["RUSSIAN NATIONAL COMMERCIAL BANK"],"OtherInfos":["(UK Sanctions List Ref):RUS0193. Financial sanctions imposed in addition to an asset freeze: Trust services. Date trust services sanctions imposed: 21/03/2023. (UK Statement of Reasons):After the illegal annexation of Crimea, Russian National Commercial Bank (RNCB) became fully owned by the so-called 'Republic of Crimea'. In January 2016 became a property of Federal Agency for State Property Management also known as Rosimushchestvo. It has become the dominant player in the market, while it had no presence in Crimea before the annexation. By buying or taking over from branches of retreating banks operating in Crimea, RNBC supported materially and financially the actions of the Russian government to integrate Crimea into the Russian Federation, thus undermining Ukraine's territorial integrity. (Website):http://www.rncb.ru"],"PostalCodes":["295000"],"SanctionListDates":["31/12/2020"],"match":0.906896551724138,"matchedName":"russian national commercial bank"},{"Addresses":["65 Sushchevskiy val, Moscow"],"Countries":["Russia"],"GroupID":15918,"GroupType":"Entity","LastUpdates":["15/12/2023"],"ListedDates":["19/05/2023"],"Names":["RUSSIAN REGIONAL DEVELOPMENT BANK"],"OtherInfos":["(UK Sanctions List Ref):RUS1860. Financial sanctions imposed in addition to an asset freeze: Correspondent banking relationships etc. Trust services. Date trust services sanctions imposed: 18/05/2023. The prohibition on correspondent banking relationships etc. measure was imposed on 15/12/2023. (UK Statement of Reasons):RUSSIAN REGIONAL DEVELOPMENT BANK is an involved person under the Russia (EU Exit) (Sanctions) Regulations 2019 because it is or has been involved in obtaining a benefit from or supporting the Government of Russia by carrying on business in a sector of strategic significance to the Government of Russia, namely the Russian financial services sector."],"PostalCodes":["129594"],"SanctionListDates":["18/05/2023"],"match":0.905,"matchedName":"russian regional development bank"}],"refreshedAt":"2025-10-11T00:54:13.808076626Z"}`
6589
7182
  }
6590
7183
  },
6591
7184
  {
@@ -6685,6 +7278,11 @@ var useAlertDetail = (id) => {
6685
7278
  setAssignee(newAssignee);
6686
7279
  console.log("Assignee updated to:", newAssignee);
6687
7280
  };
7281
+ const handleResolveAlert = async (data) => {
7282
+ console.log("Resolving alert with data:", data);
7283
+ await new Promise((resolve) => setTimeout(resolve, 1e3));
7284
+ console.log("Alert resolved successfully");
7285
+ };
6688
7286
  return {
6689
7287
  alert,
6690
7288
  isLoading: false,
@@ -6692,18 +7290,21 @@ var useAlertDetail = (id) => {
6692
7290
  rfiStatus,
6693
7291
  assignee,
6694
7292
  handleRfiStatusChange,
6695
- handleAssigneeChange
7293
+ handleAssigneeChange,
7294
+ handleResolveAlert
6696
7295
  };
6697
7296
  };
6698
7297
  var AlertDetail = () => {
6699
7298
  const { id } = useParams();
6700
7299
  const navigate = useNavigate();
7300
+ const [resolveDialogOpen, setResolveDialogOpen] = useState(false);
6701
7301
  const {
6702
7302
  alert,
6703
7303
  rfiStatus,
6704
7304
  assignee,
6705
7305
  handleRfiStatusChange,
6706
- handleAssigneeChange
7306
+ handleAssigneeChange,
7307
+ handleResolveAlert
6707
7308
  } = useAlertDetail(id);
6708
7309
  if (!alert) {
6709
7310
  return /* @__PURE__ */ jsx("div", { className: "container mx-auto px-4 py-8", children: /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
@@ -6716,39 +7317,46 @@ var AlertDetail = () => {
6716
7317
  /* @__PURE__ */ jsx(Button, { onClick: () => navigate("/alerts"), children: "Back to Alerts" })
6717
7318
  ] }) });
6718
7319
  }
6719
- return /* @__PURE__ */ jsx(
7320
+ return /* @__PURE__ */ jsxs(
6720
7321
  PageLayout,
6721
7322
  {
6722
- title: `Alert #${alert.id}`,
6723
- description: alert.description,
7323
+ title: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
7324
+ /* @__PURE__ */ jsxs("span", { children: [
7325
+ "Alert #",
7326
+ alert.id
7327
+ ] }),
7328
+ /* @__PURE__ */ jsx(Badge, { variant: getTypeBadgeVariant(alert.type), children: alert.type })
7329
+ ] }),
6724
7330
  maxWidth: "full",
6725
- actions: [
7331
+ headerContent: /* @__PURE__ */ jsx(
7332
+ AlertHeaderControls,
6726
7333
  {
6727
- label: "Back to Alerts",
6728
- variant: "outline",
6729
- onClick: () => navigate("/alerts")
6730
- },
6731
- {
6732
- label: "Assign",
6733
- variant: "outline",
6734
- onClick: () => console.log("Assign alert")
6735
- },
7334
+ status: alert.status,
7335
+ assignee,
7336
+ rfiStatus,
7337
+ onAssigneeChange: handleAssigneeChange,
7338
+ onRfiStatusChange: handleRfiStatusChange
7339
+ }
7340
+ ),
7341
+ actions: [
6736
7342
  {
6737
- label: "Close Alert",
7343
+ label: "Resolve Alert",
6738
7344
  variant: "default",
6739
- onClick: () => console.log("Close alert")
7345
+ onClick: () => setResolveDialogOpen(true)
6740
7346
  }
6741
7347
  ],
6742
- children: /* @__PURE__ */ jsx(
6743
- AlertDetailView,
6744
- {
6745
- alert,
6746
- rfiStatus,
6747
- assignee,
6748
- onRfiStatusChange: handleRfiStatusChange,
6749
- onAssigneeChange: handleAssigneeChange
6750
- }
6751
- )
7348
+ children: [
7349
+ /* @__PURE__ */ jsx(AlertDetailRouter, { alert }),
7350
+ /* @__PURE__ */ jsx(
7351
+ ResolveAlertDialog,
7352
+ {
7353
+ alertId: alert.id,
7354
+ open: resolveDialogOpen,
7355
+ onOpenChange: setResolveDialogOpen,
7356
+ onResolve: handleResolveAlert
7357
+ }
7358
+ )
7359
+ ]
6752
7360
  }
6753
7361
  );
6754
7362
  };
@@ -7173,7 +7781,7 @@ var Businesses = () => {
7173
7781
  const handleRowClick = (business) => {
7174
7782
  navigate(`/business/${business.id}`);
7175
7783
  };
7176
- const columns = [
7784
+ const columns2 = [
7177
7785
  {
7178
7786
  key: "id",
7179
7787
  title: "Business ID",
@@ -7350,7 +7958,7 @@ var Businesses = () => {
7350
7958
  /* @__PURE__ */ jsx("div", { className: "flex-1 overflow-hidden", children: /* @__PURE__ */ jsx("div", { className: "container mx-auto px-4 h-full max-w-none flex flex-col", children: /* @__PURE__ */ jsx("div", { className: "flex-1 mt-4 overflow-auto", children: /* @__PURE__ */ jsx(
7351
7959
  DataTable,
7352
7960
  {
7353
- columns,
7961
+ columns: columns2,
7354
7962
  data: sortedBusinesses,
7355
7963
  sortBy,
7356
7964
  sortDirection,
@@ -7434,6 +8042,9 @@ var businessCounterparties = [
7434
8042
  }
7435
8043
  ];
7436
8044
  var Business = () => {
8045
+ const { id } = useParams();
8046
+ const business = mockBusinessesList.find((b) => b.id === id);
8047
+ const [currentStatus, setCurrentStatus] = useState(business?.status || "active");
7437
8048
  const accountColumns = [
7438
8049
  {
7439
8050
  key: "number",
@@ -7457,76 +8068,103 @@ var Business = () => {
7457
8068
  render: (value) => /* @__PURE__ */ jsx(StatusBadge, { status: value })
7458
8069
  }
7459
8070
  ];
7460
- return /* @__PURE__ */ jsxs("div", { className: "container mx-auto p-6 space-y-6", children: [
7461
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx("h1", { className: "text-3xl font-bold tracking-tight", children: "Business Management" }) }),
7462
- /* @__PURE__ */ jsxs(Tabs, { defaultValue: "profile", className: "space-y-6", children: [
7463
- /* @__PURE__ */ jsxs(TabsList, { className: "inline-flex gap-8 h-auto bg-transparent border-b border-border w-full p-0 rounded-none justify-start", children: [
7464
- /* @__PURE__ */ jsx(
7465
- TabsTrigger,
7466
- {
7467
- value: "profile",
7468
- className: "rounded-none border-b-2 border-transparent data-[state=active]:border-primary data-[state=active]:bg-transparent data-[state=active]:shadow-none pb-3",
7469
- children: "Profile"
7470
- }
7471
- ),
7472
- /* @__PURE__ */ jsx(
7473
- TabsTrigger,
7474
- {
7475
- value: "kyc",
7476
- className: "rounded-none border-b-2 border-transparent data-[state=active]:border-primary data-[state=active]:bg-transparent data-[state=active]:shadow-none pb-3",
7477
- children: "KYC"
7478
- }
7479
- ),
8071
+ if (!business) {
8072
+ return /* @__PURE__ */ jsx("div", { className: "container mx-auto px-4 py-8", children: /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
8073
+ /* @__PURE__ */ jsx("h1", { className: "text-2xl font-bold mb-2", children: "Business Not Found" }),
8074
+ /* @__PURE__ */ jsx("p", { className: "text-muted-foreground mb-4", children: "The business could not be found." })
8075
+ ] }) });
8076
+ }
8077
+ return /* @__PURE__ */ jsx(
8078
+ PageLayout,
8079
+ {
8080
+ title: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
8081
+ /* @__PURE__ */ jsx("span", { children: business.businessName }),
7480
8082
  /* @__PURE__ */ jsx(
7481
- TabsTrigger,
8083
+ EditableInfoField,
7482
8084
  {
7483
- value: "counterparty",
7484
- className: "rounded-none border-b-2 border-transparent data-[state=active]:border-primary data-[state=active]:bg-transparent data-[state=active]:shadow-none pb-3",
7485
- children: "Counterparty"
8085
+ label: "",
8086
+ value: currentStatus,
8087
+ options: [
8088
+ { value: "active", label: "Active" },
8089
+ { value: "inactive", label: "Inactive" },
8090
+ { value: "suspended", label: "Suspended" }
8091
+ ],
8092
+ onChange: (newStatus) => setCurrentStatus(newStatus),
8093
+ renderValue: (value) => /* @__PURE__ */ jsx(StatusBadge, { status: value.toUpperCase() }),
8094
+ className: "inline-block"
7486
8095
  }
7487
8096
  )
7488
8097
  ] }),
7489
- /* @__PURE__ */ jsx(TabsContent, { value: "profile", className: "space-y-0", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col lg:flex-row items-start gap-6", children: [
7490
- /* @__PURE__ */ jsxs("div", { className: "flex-1 space-y-6", children: [
7491
- /* @__PURE__ */ jsx(BusinessProfileCard, { isEditing: false, onToggleEdit: () => {
7492
- } }),
7493
- /* @__PURE__ */ jsxs(Card, { children: [
7494
- /* @__PURE__ */ jsxs(CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-4", children: [
7495
- /* @__PURE__ */ jsx(CardTitle, { children: "Accounts" }),
7496
- /* @__PURE__ */ jsx(Button, { size: "sm", children: "+ New Account" })
7497
- ] }),
7498
- /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(
7499
- DataTable,
7500
- {
7501
- columns: accountColumns,
7502
- data: businessAccounts,
7503
- emptyMessage: "No accounts found"
7504
- }
7505
- ) })
7506
- ] })
8098
+ maxWidth: "full",
8099
+ children: /* @__PURE__ */ jsxs(Tabs, { defaultValue: "profile", className: "space-y-6", children: [
8100
+ /* @__PURE__ */ jsxs(TabsList, { className: "inline-flex gap-8 h-auto bg-transparent border-b border-border w-full p-0 rounded-none justify-start", children: [
8101
+ /* @__PURE__ */ jsx(
8102
+ TabsTrigger,
8103
+ {
8104
+ value: "profile",
8105
+ className: "rounded-none border-b-2 border-transparent data-[state=active]:border-primary data-[state=active]:bg-transparent data-[state=active]:shadow-none pb-3",
8106
+ children: "Profile"
8107
+ }
8108
+ ),
8109
+ /* @__PURE__ */ jsx(
8110
+ TabsTrigger,
8111
+ {
8112
+ value: "kyc",
8113
+ className: "rounded-none border-b-2 border-transparent data-[state=active]:border-primary data-[state=active]:bg-transparent data-[state=active]:shadow-none pb-3",
8114
+ children: "KYC"
8115
+ }
8116
+ ),
8117
+ /* @__PURE__ */ jsx(
8118
+ TabsTrigger,
8119
+ {
8120
+ value: "counterparty",
8121
+ className: "rounded-none border-b-2 border-transparent data-[state=active]:border-primary data-[state=active]:bg-transparent data-[state=active]:shadow-none pb-3",
8122
+ children: "Counterparty"
8123
+ }
8124
+ )
7507
8125
  ] }),
7508
- /* @__PURE__ */ jsx("div", { className: "lg:w-64", children: /* @__PURE__ */ jsx(BusinessStatusCard, { isEditing: false, onToggleEdit: () => {
7509
- } }) })
7510
- ] }) }),
7511
- /* @__PURE__ */ jsx(TabsContent, { value: "kyc", className: "space-y-0", children: /* @__PURE__ */ jsx("div", { className: "p-8 text-center text-muted-foreground", children: "KYC content coming soon" }) }),
7512
- /* @__PURE__ */ jsx(TabsContent, { value: "counterparty", className: "space-y-0", children: /* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 gap-6", children: businessCounterparties.map((counterparty) => /* @__PURE__ */ jsxs(Card, { children: [
7513
- /* @__PURE__ */ jsxs(CardHeader, { children: [
7514
- /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
7515
- /* @__PURE__ */ jsx(CardTitle, { className: "text-lg", children: counterparty.name }),
7516
- /* @__PURE__ */ jsx(CounterpartyTypeBadge, { type: counterparty.type })
8126
+ /* @__PURE__ */ jsx(TabsContent, { value: "profile", className: "space-y-0", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col lg:flex-row items-start gap-6", children: [
8127
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 space-y-6", children: [
8128
+ /* @__PURE__ */ jsx(BusinessProfileCard, { isEditing: false, onToggleEdit: () => {
8129
+ } }),
8130
+ /* @__PURE__ */ jsxs(Card, { children: [
8131
+ /* @__PURE__ */ jsxs(CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-4", children: [
8132
+ /* @__PURE__ */ jsx(CardTitle, { children: "Accounts" }),
8133
+ /* @__PURE__ */ jsx(Button, { size: "sm", children: "+ New Account" })
8134
+ ] }),
8135
+ /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(
8136
+ DataTable,
8137
+ {
8138
+ columns: accountColumns,
8139
+ data: businessAccounts,
8140
+ emptyMessage: "No accounts found"
8141
+ }
8142
+ ) })
8143
+ ] })
7517
8144
  ] }),
7518
- /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2 mt-2", children: /* @__PURE__ */ jsx(Badge, { variant: counterparty.status === "active" ? "default" : "secondary", children: counterparty.status }) })
7519
- ] }),
7520
- /* @__PURE__ */ jsxs(CardContent, { className: "space-y-3", children: [
7521
- /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: counterparty.description }),
7522
- /* @__PURE__ */ jsxs("div", { className: "flex justify-between items-center text-sm", children: [
7523
- /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "Last Transaction" }),
7524
- /* @__PURE__ */ jsx("span", { className: "font-medium", children: counterparty.lastTransaction })
8145
+ /* @__PURE__ */ jsx("div", { className: "lg:w-64", children: /* @__PURE__ */ jsx(BusinessStatusCard, { isEditing: false, onToggleEdit: () => {
8146
+ } }) })
8147
+ ] }) }),
8148
+ /* @__PURE__ */ jsx(TabsContent, { value: "kyc", className: "space-y-0", children: /* @__PURE__ */ jsx("div", { className: "p-8 text-center text-muted-foreground", children: "KYC content coming soon" }) }),
8149
+ /* @__PURE__ */ jsx(TabsContent, { value: "counterparty", className: "space-y-0", children: /* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 gap-6", children: businessCounterparties.map((counterparty) => /* @__PURE__ */ jsxs(Card, { children: [
8150
+ /* @__PURE__ */ jsxs(CardHeader, { children: [
8151
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
8152
+ /* @__PURE__ */ jsx(CardTitle, { className: "text-lg", children: counterparty.name }),
8153
+ /* @__PURE__ */ jsx(CounterpartyTypeBadge, { type: counterparty.type })
8154
+ ] }),
8155
+ /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2 mt-2", children: /* @__PURE__ */ jsx(Badge, { variant: counterparty.status === "active" ? "default" : "secondary", children: counterparty.status }) })
8156
+ ] }),
8157
+ /* @__PURE__ */ jsxs(CardContent, { className: "space-y-3", children: [
8158
+ /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: counterparty.description }),
8159
+ /* @__PURE__ */ jsxs("div", { className: "flex justify-between items-center text-sm", children: [
8160
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "Last Transaction" }),
8161
+ /* @__PURE__ */ jsx("span", { className: "font-medium", children: counterparty.lastTransaction })
8162
+ ] })
7525
8163
  ] })
7526
- ] })
7527
- ] }, counterparty.id)) }) })
7528
- ] })
7529
- ] });
8164
+ ] }, counterparty.id)) }) })
8165
+ ] })
8166
+ }
8167
+ );
7530
8168
  };
7531
8169
  var BusinessDetail_default = Business;
7532
8170
  var CreateBusiness = () => {
@@ -7937,12 +8575,6 @@ var mockProducts = [
7937
8575
  { value: "PROD-003", label: "Money Market Account" },
7938
8576
  { value: "PROD-004", label: "Business Checking" }
7939
8577
  ];
7940
- var statementTypes = [
7941
- { value: "root", label: "Root" },
7942
- { value: "program", label: "Program" },
7943
- { value: "product", label: "Product" },
7944
- { value: "account", label: "Account" }
7945
- ];
7946
8578
  function Statement() {
7947
8579
  const [statementType, setStatementType] = useState("");
7948
8580
  const [selectedProgram, setSelectedProgram] = useState("");
@@ -7951,6 +8583,10 @@ function Statement() {
7951
8583
  const [startDate, setStartDate] = useState();
7952
8584
  const [endDate, setEndDate] = useState();
7953
8585
  const [statementGenerated, setStatementGenerated] = useState(false);
8586
+ const [programs] = useState(mockPrograms);
8587
+ const [products] = useState(mockProducts);
8588
+ const [statementHeader, setStatementHeader] = useState(null);
8589
+ const [statementTransactions, setStatementTransactions] = useState([]);
7954
8590
  const handleStatementTypeChange = (value) => {
7955
8591
  setStatementType(value);
7956
8592
  setSelectedProgram("");
@@ -7962,6 +8598,16 @@ function Statement() {
7962
8598
  if (statementType === "program" && !selectedProgram) return;
7963
8599
  if (statementType === "product" && !selectedProduct) return;
7964
8600
  if (statementType === "account" && !accountNumber) return;
8601
+ console.log("Generating statement with:", {
8602
+ statementType,
8603
+ selectedProgram,
8604
+ selectedProduct,
8605
+ accountNumber,
8606
+ startDate,
8607
+ endDate
8608
+ });
8609
+ setStatementHeader(mockStatementHeader);
8610
+ setStatementTransactions(mockStatementTransactions);
7965
8611
  setStatementGenerated(true);
7966
8612
  };
7967
8613
  const isGenerateDisabled = () => {
@@ -7971,34 +8617,6 @@ function Statement() {
7971
8617
  if (statementType === "account" && !accountNumber) return true;
7972
8618
  return false;
7973
8619
  };
7974
- const columns = [
7975
- {
7976
- key: "transactionType",
7977
- title: "Transaction Type",
7978
- sortable: true,
7979
- align: "left"
7980
- },
7981
- {
7982
- key: "direction",
7983
- title: "Direction",
7984
- sortable: true,
7985
- align: "left",
7986
- render: (value) => /* @__PURE__ */ jsx(Badge, { variant: value === "CREDIT" ? "success" : "secondary", children: value })
7987
- },
7988
- {
7989
- key: "amount",
7990
- title: "Amount",
7991
- sortable: true,
7992
- align: "right",
7993
- render: (value) => `$${value.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 })}`
7994
- },
7995
- {
7996
- key: "count",
7997
- title: "Count",
7998
- sortable: true,
7999
- align: "right"
8000
- }
8001
- ];
8002
8620
  const handleDownloadCSV = () => {
8003
8621
  console.log("Downloading CSV...");
8004
8622
  };
@@ -8008,148 +8626,33 @@ function Statement() {
8008
8626
  const handleEdit = () => {
8009
8627
  setStatementGenerated(false);
8010
8628
  };
8011
- return /* @__PURE__ */ jsxs("div", { className: "container mx-auto p-6 space-y-6", children: [
8012
- /* @__PURE__ */ jsxs("div", { children: [
8013
- /* @__PURE__ */ jsx("h1", { className: "text-3xl font-bold tracking-tight", children: "Statement" }),
8014
- /* @__PURE__ */ jsx("p", { className: "text-muted-foreground mt-1", children: "Generate and view statement reports" })
8015
- ] }),
8016
- !statementGenerated && /* @__PURE__ */ jsxs(Card, { children: [
8017
- /* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { size: "md", children: "Statement Parameters" }) }),
8018
- /* @__PURE__ */ jsxs(CardContent, { className: "space-y-4", children: [
8019
- /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4", children: [
8020
- /* @__PURE__ */ jsx(
8021
- EnhancedSelect,
8022
- {
8023
- label: "Statement Type",
8024
- placeholder: "Select type",
8025
- options: statementTypes,
8026
- value: statementType,
8027
- onValueChange: handleStatementTypeChange
8028
- }
8029
- ),
8030
- statementType === "program" && /* @__PURE__ */ jsx(
8031
- EnhancedSelect,
8032
- {
8033
- label: "Program Name",
8034
- placeholder: "Select program",
8035
- options: mockPrograms,
8036
- value: selectedProgram,
8037
- onValueChange: setSelectedProgram
8038
- }
8039
- ),
8040
- statementType === "product" && /* @__PURE__ */ jsx(
8041
- EnhancedSelect,
8042
- {
8043
- label: "Product Name",
8044
- placeholder: "Select product",
8045
- options: mockProducts,
8046
- value: selectedProduct,
8047
- onValueChange: setSelectedProduct
8048
- }
8049
- ),
8050
- statementType === "account" && /* @__PURE__ */ jsx(
8051
- EnhancedInput,
8052
- {
8053
- label: "Account Number",
8054
- placeholder: "Enter account number",
8055
- value: accountNumber,
8056
- onChange: (e) => setAccountNumber(e.target.value)
8057
- }
8058
- ),
8059
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
8060
- /* @__PURE__ */ jsx("label", { className: "text-sm font-medium", children: "Start Date" }),
8061
- /* @__PURE__ */ jsxs(Popover, { children: [
8062
- /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
8063
- Button,
8064
- {
8065
- variant: "outline",
8066
- className: cn(
8067
- "justify-start text-left font-normal",
8068
- !startDate && "text-muted-foreground"
8069
- ),
8070
- children: [
8071
- /* @__PURE__ */ jsx(CalendarIcon, { className: "mr-2 h-4 w-4" }),
8072
- startDate ? format(startDate, "MM/dd/yyyy") : "Select date"
8073
- ]
8074
- }
8075
- ) }),
8076
- /* @__PURE__ */ jsx(PopoverContent, { className: "w-auto p-0", align: "start", children: /* @__PURE__ */ jsx(
8077
- Calendar,
8078
- {
8079
- mode: "single",
8080
- selected: startDate,
8081
- onSelect: setStartDate,
8082
- initialFocus: true
8083
- }
8084
- ) })
8085
- ] })
8086
- ] }),
8087
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
8088
- /* @__PURE__ */ jsx("label", { className: "text-sm font-medium", children: "End Date" }),
8089
- /* @__PURE__ */ jsxs(Popover, { children: [
8090
- /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
8091
- Button,
8092
- {
8093
- variant: "outline",
8094
- className: cn(
8095
- "justify-start text-left font-normal",
8096
- !endDate && "text-muted-foreground"
8097
- ),
8098
- children: [
8099
- /* @__PURE__ */ jsx(CalendarIcon, { className: "mr-2 h-4 w-4" }),
8100
- endDate ? format(endDate, "MM/dd/yyyy") : "Select date"
8101
- ]
8102
- }
8103
- ) }),
8104
- /* @__PURE__ */ jsx(PopoverContent, { className: "w-auto p-0", align: "start", children: /* @__PURE__ */ jsx(
8105
- Calendar,
8106
- {
8107
- mode: "single",
8108
- selected: endDate,
8109
- onSelect: setEndDate,
8110
- initialFocus: true
8111
- }
8112
- ) })
8113
- ] })
8114
- ] })
8115
- ] }),
8116
- /* @__PURE__ */ jsx("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx(
8117
- Button,
8118
- {
8119
- onClick: handleGenerateStatement,
8120
- disabled: isGenerateDisabled(),
8121
- children: "Generate Statement"
8122
- }
8123
- ) })
8124
- ] })
8125
- ] }),
8126
- statementGenerated && /* @__PURE__ */ jsxs(Fragment, { children: [
8127
- /* @__PURE__ */ jsx(StatementHeader, { data: mockStatementHeader, onEdit: handleEdit }),
8128
- /* @__PURE__ */ jsxs(Card, { children: [
8129
- /* @__PURE__ */ jsxs(CardHeader, { direction: "row", children: [
8130
- /* @__PURE__ */ jsx(CardTitle, { size: "md", children: "Transaction Summary" }),
8131
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
8132
- /* @__PURE__ */ jsxs(Button, { variant: "outline", onClick: handleDownloadCSV, children: [
8133
- /* @__PURE__ */ jsx(Download, { className: "h-4 w-4 mr-2" }),
8134
- "Download CSV"
8135
- ] }),
8136
- /* @__PURE__ */ jsxs(Button, { variant: "outline", onClick: handlePrintPDF, children: [
8137
- /* @__PURE__ */ jsx(FileText, { className: "h-4 w-4 mr-2" }),
8138
- "Print PDF"
8139
- ] })
8140
- ] })
8141
- ] }),
8142
- /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(
8143
- DataTable,
8144
- {
8145
- columns,
8146
- data: mockStatementTransactions,
8147
- emptyMessage: "No transactions found"
8148
- }
8149
- ) })
8150
- ] })
8151
- ] })
8152
- ] });
8629
+ return /* @__PURE__ */ jsx(
8630
+ StatementView,
8631
+ {
8632
+ statementType,
8633
+ selectedProgram,
8634
+ selectedProduct,
8635
+ accountNumber,
8636
+ startDate,
8637
+ endDate,
8638
+ statementGenerated,
8639
+ programs,
8640
+ products,
8641
+ statementHeader,
8642
+ statementTransactions,
8643
+ onStatementTypeChange: handleStatementTypeChange,
8644
+ onProgramChange: setSelectedProgram,
8645
+ onProductChange: setSelectedProduct,
8646
+ onAccountNumberChange: setAccountNumber,
8647
+ onStartDateChange: setStartDate,
8648
+ onEndDateChange: setEndDate,
8649
+ onGenerateStatement: handleGenerateStatement,
8650
+ onEdit: handleEdit,
8651
+ onDownloadCSV: handleDownloadCSV,
8652
+ onPrintPDF: handlePrintPDF,
8653
+ isGenerateDisabled: isGenerateDisabled()
8654
+ }
8655
+ );
8153
8656
  }
8154
8657
 
8155
8658
  // src/lib/mock-data/transaction-data.ts
@@ -8158,13 +8661,15 @@ var mockTransactions = [
8158
8661
  id: "1",
8159
8662
  created: "2025-10-01 00:16",
8160
8663
  accountNumber: "126713605718",
8161
- amount: -7293.32,
8664
+ amount: 34539.18,
8162
8665
  customer: "Rise Works Inc",
8163
8666
  counterparty: "VEDANT JAYESHKUMAR PATI",
8164
8667
  description: "4NnuJKyD9a8LUmkm",
8165
8668
  transactionType: "Ach Originator Credit",
8166
8669
  status: "PENDING",
8670
+ processingStatus: "SENT",
8167
8671
  updated: "2025-10-01 00:16",
8672
+ isInbound: true,
8168
8673
  achDetails: {
8169
8674
  type: "ACH Credit",
8170
8675
  originatorName: "Rise Works Inc",
@@ -8219,7 +8724,9 @@ var mockTransactions = [
8219
8724
  description: "ACH Fee",
8220
8725
  transactionType: "Fee Ach Transaction",
8221
8726
  status: "POSTED",
8222
- updated: "2025-10-01 00:09"
8727
+ processingStatus: "CONFIRMED",
8728
+ updated: "2025-10-01 00:09",
8729
+ isInbound: false
8223
8730
  },
8224
8731
  {
8225
8732
  id: "3",
@@ -8231,7 +8738,9 @@ var mockTransactions = [
8231
8738
  description: "Invoice Payment #INV-2024-089",
8232
8739
  transactionType: "Wire Domestic Credit",
8233
8740
  status: "POSTED",
8741
+ processingStatus: "CONFIRMED",
8234
8742
  updated: "2025-10-01 00:12",
8743
+ isInbound: false,
8235
8744
  wireDetails: {
8236
8745
  type: "Domestic Wire",
8237
8746
  originatorName: "Tech Solutions LLC",
@@ -8329,7 +8838,9 @@ var mockTransactions = [
8329
8838
  description: "Vendor Payment",
8330
8839
  transactionType: "Ach Originator Debit",
8331
8840
  status: "POSTED",
8332
- updated: "2025-09-30 23:01"
8841
+ processingStatus: "CONFIRMED",
8842
+ updated: "2025-09-30 23:01",
8843
+ isInbound: false
8333
8844
  },
8334
8845
  {
8335
8846
  id: "5",
@@ -8341,7 +8852,9 @@ var mockTransactions = [
8341
8852
  description: "Contractor Payment",
8342
8853
  transactionType: "Ach Originator Credit",
8343
8854
  status: "PENDING",
8344
- updated: "2025-09-30 21:05"
8855
+ processingStatus: "CUSTOMER_REVIEW",
8856
+ updated: "2025-09-30 21:05",
8857
+ isInbound: false
8345
8858
  },
8346
8859
  {
8347
8860
  id: "6",
@@ -8353,7 +8866,9 @@ var mockTransactions = [
8353
8866
  description: "Monthly Rent Payment",
8354
8867
  transactionType: "Wire Domestic Debit",
8355
8868
  status: "POSTED",
8356
- updated: "2025-09-30 20:15"
8869
+ processingStatus: "CONFIRMED",
8870
+ updated: "2025-09-30 20:15",
8871
+ isInbound: false
8357
8872
  },
8358
8873
  {
8359
8874
  id: "7",
@@ -8365,7 +8880,9 @@ var mockTransactions = [
8365
8880
  description: "Wire Transfer Fee",
8366
8881
  transactionType: "Fee Wire Transaction",
8367
8882
  status: "POSTED",
8368
- updated: "2025-09-30 17:22"
8883
+ processingStatus: "CONFIRMED",
8884
+ updated: "2025-09-30 17:22",
8885
+ isInbound: false
8369
8886
  },
8370
8887
  {
8371
8888
  id: "8",
@@ -8377,7 +8894,9 @@ var mockTransactions = [
8377
8894
  description: "R&D Funding Transfer",
8378
8895
  transactionType: "Ach Originator Credit",
8379
8896
  status: "FAILED",
8380
- updated: "2025-09-30 16:10"
8897
+ processingStatus: "MANUAL_REVIEW",
8898
+ updated: "2025-09-30 16:10",
8899
+ isInbound: false
8381
8900
  }
8382
8901
  ];
8383
8902
  var mockTransactionTimeline = [
@@ -8916,7 +9435,10 @@ var newTransactionSchema = z.object({
8916
9435
  counterpartyName: z.string().min(1, "Counterparty name is required"),
8917
9436
  amount: z.string().min(1, "Amount is required"),
8918
9437
  currency: z.string().min(1, "Currency is required"),
8919
- description: z.string().optional()
9438
+ description: z.string().optional(),
9439
+ certifyInformation: z.boolean().refine((val) => val === true, {
9440
+ message: "You must certify the information is correct"
9441
+ })
8920
9442
  });
8921
9443
  var TRANSACTION_TYPES = [
8922
9444
  { value: "transfer", label: "Transfer", icon: ArrowLeftRight },
@@ -8972,7 +9494,8 @@ function NewTransaction() {
8972
9494
  counterpartyName: "",
8973
9495
  amount: "",
8974
9496
  currency: "USD",
8975
- description: ""
9497
+ description: "",
9498
+ certifyInformation: false
8976
9499
  }
8977
9500
  });
8978
9501
  const transactionType = form.watch("transactionType");
@@ -9098,7 +9621,6 @@ function NewTransaction() {
9098
9621
  PageLayout,
9099
9622
  {
9100
9623
  title: "New Transaction",
9101
- description: "Complete the form below to initiate a new transaction",
9102
9624
  children: /* @__PURE__ */ jsxs("div", { className: "max-w-4xl mx-auto space-y-6", children: [
9103
9625
  /* @__PURE__ */ jsx(FormProvider, { form, children: /* @__PURE__ */ jsxs("form", { onSubmit: (e) => e.preventDefault(), children: [
9104
9626
  !accountLookedUp ? /* @__PURE__ */ jsx(
@@ -9106,21 +9628,20 @@ function NewTransaction() {
9106
9628
  {
9107
9629
  title: "Account Lookup",
9108
9630
  variant: "default",
9109
- children: /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
9110
- /* @__PURE__ */ jsx(
9631
+ children: /* @__PURE__ */ jsxs("div", { className: "flex gap-3 items-start w-full", children: [
9632
+ /* @__PURE__ */ jsx("div", { className: "flex-1", children: /* @__PURE__ */ jsx(
9111
9633
  FormInput,
9112
9634
  {
9113
9635
  name: "accountNumber",
9114
- label: "Account Number",
9115
9636
  placeholder: "Enter account number"
9116
9637
  }
9117
- ),
9638
+ ) }),
9118
9639
  /* @__PURE__ */ jsxs(
9119
9640
  Button,
9120
9641
  {
9121
9642
  onClick: handleAccountLookup,
9122
- className: "w-full sm:w-auto",
9123
9643
  disabled: !accountNumber,
9644
+ className: "shrink-0 mt-0 w-48",
9124
9645
  children: [
9125
9646
  /* @__PURE__ */ jsx(Search, { className: "h-4 w-4 mr-2" }),
9126
9647
  "Lookup Account"
@@ -9197,22 +9718,21 @@ function NewTransaction() {
9197
9718
  title: "Counterparty Lookup",
9198
9719
  variant: "default",
9199
9720
  className: cn(!transactionType && "opacity-50 pointer-events-none"),
9200
- children: /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
9201
- /* @__PURE__ */ jsx(
9721
+ children: /* @__PURE__ */ jsxs("div", { className: "flex gap-3 items-start w-full", children: [
9722
+ /* @__PURE__ */ jsx("div", { className: "flex-1", children: /* @__PURE__ */ jsx(
9202
9723
  FormInput,
9203
9724
  {
9204
9725
  name: "counterpartyName",
9205
- label: "Counterparty Name",
9206
9726
  placeholder: "Enter counterparty name",
9207
9727
  disabled: !transactionType
9208
9728
  }
9209
- ),
9729
+ ) }),
9210
9730
  /* @__PURE__ */ jsxs(
9211
9731
  Button,
9212
9732
  {
9213
9733
  onClick: handleCounterpartyLookup,
9214
- className: "w-full sm:w-auto",
9215
9734
  disabled: !transactionType || !counterpartyName,
9735
+ className: "shrink-0 mt-0 w-48",
9216
9736
  children: [
9217
9737
  /* @__PURE__ */ jsx(Search, { className: "h-4 w-4 mr-2" }),
9218
9738
  "Lookup Counterparty"
@@ -9271,7 +9791,8 @@ function NewTransaction() {
9271
9791
  name: "currency",
9272
9792
  label: "Currency",
9273
9793
  options: CURRENCY_OPTIONS,
9274
- disabled: !counterpartyLookedUp
9794
+ disabled: !counterpartyLookedUp,
9795
+ className: "w-48"
9275
9796
  }
9276
9797
  )
9277
9798
  ] }),
@@ -9294,6 +9815,34 @@ function NewTransaction() {
9294
9815
  variant: "default",
9295
9816
  children: /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
9296
9817
  /* @__PURE__ */ jsx(DataGrid, { data: reviewData, columns: 2 }),
9818
+ /* @__PURE__ */ jsx("div", { className: "bg-muted/30 rounded-lg p-4 border border-border/50", children: /* @__PURE__ */ jsx(
9819
+ Controller,
9820
+ {
9821
+ name: "certifyInformation",
9822
+ control: form.control,
9823
+ render: ({ field }) => /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
9824
+ /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3", children: [
9825
+ /* @__PURE__ */ jsx(
9826
+ Checkbox,
9827
+ {
9828
+ id: "certifyInformation",
9829
+ checked: field.value,
9830
+ onCheckedChange: field.onChange
9831
+ }
9832
+ ),
9833
+ /* @__PURE__ */ jsx(
9834
+ "label",
9835
+ {
9836
+ htmlFor: "certifyInformation",
9837
+ className: "text-sm font-medium leading-relaxed cursor-pointer select-none",
9838
+ children: "I certify that all information entered is correct and accurate to the best of my knowledge"
9839
+ }
9840
+ )
9841
+ ] }),
9842
+ form.formState.errors.certifyInformation && /* @__PURE__ */ jsx("p", { className: "text-xs text-destructive ml-7", children: form.formState.errors.certifyInformation.message })
9843
+ ] })
9844
+ }
9845
+ ) }),
9297
9846
  /* @__PURE__ */ jsxs("div", { className: "flex gap-3 justify-end pt-4 border-t border-border", children: [
9298
9847
  /* @__PURE__ */ jsx(
9299
9848
  Button,
@@ -9311,7 +9860,7 @@ function NewTransaction() {
9311
9860
  type: "button",
9312
9861
  onClick: handleSubmit,
9313
9862
  className: "w-48",
9314
- disabled: !transactionType || !accountNumber || !counterpartyName || !amount,
9863
+ disabled: !transactionType || !accountNumber || !counterpartyName || !amount || !form.watch("certifyInformation"),
9315
9864
  children: [
9316
9865
  /* @__PURE__ */ jsx(CheckCircle2, { className: "h-4 w-4 mr-2" }),
9317
9866
  "Submit Transaction"
@@ -9421,6 +9970,24 @@ var TransactionDetail = () => {
9421
9970
  return "outline";
9422
9971
  }
9423
9972
  };
9973
+ const getProcessingStatusVariant = (status) => {
9974
+ switch (status) {
9975
+ case "CONFIRMED":
9976
+ return "success";
9977
+ case "SENT":
9978
+ return "success";
9979
+ case "SUBMITTED":
9980
+ return "warning";
9981
+ case "CUSTOMER_REVIEW":
9982
+ return "warning";
9983
+ case "MANUAL_REVIEW":
9984
+ return "warning";
9985
+ case "INITIATED":
9986
+ return "outline";
9987
+ default:
9988
+ return "outline";
9989
+ }
9990
+ };
9424
9991
  const formatCurrency = (value) => {
9425
9992
  return new Intl.NumberFormat("en-US", {
9426
9993
  style: "currency",
@@ -9433,7 +10000,21 @@ var TransactionDetail = () => {
9433
10000
  return /* @__PURE__ */ jsx(
9434
10001
  PageLayout,
9435
10002
  {
9436
- title: `Transaction #${transaction.id}`,
10003
+ title: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
10004
+ /* @__PURE__ */ jsx("span", { className: cn(
10005
+ "font-semibold",
10006
+ transaction.amount < 0 ? "text-destructive" : "text-success"
10007
+ ), children: formatCurrency(transaction.amount) }),
10008
+ /* @__PURE__ */ jsx(
10009
+ TransactionTypeBadge,
10010
+ {
10011
+ transactionType: transaction.transactionType,
10012
+ isInbound: transaction.isInbound
10013
+ }
10014
+ ),
10015
+ /* @__PURE__ */ jsx(Badge, { variant: getStatusVariant(transaction.status), children: transaction.status }),
10016
+ /* @__PURE__ */ jsx(Badge, { variant: getProcessingStatusVariant(transaction.processingStatus), children: transaction.processingStatus })
10017
+ ] }),
9437
10018
  maxWidth: "full",
9438
10019
  actions: [
9439
10020
  {
@@ -9450,33 +10031,6 @@ var TransactionDetail = () => {
9450
10031
  children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col lg:flex-row items-start gap-6", children: [
9451
10032
  /* @__PURE__ */ jsxs("div", { className: "flex-1 space-y-6", children: [
9452
10033
  /* @__PURE__ */ jsx(FormCard, { title: "Details", children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-x-8 gap-y-4", children: [
9453
- /* @__PURE__ */ jsx(
9454
- InfoField,
9455
- {
9456
- label: "Transaction Type",
9457
- value: /* @__PURE__ */ jsx(Badge, { variant: "outline", children: transaction.transactionType }),
9458
- layout: "horizontal"
9459
- }
9460
- ),
9461
- /* @__PURE__ */ jsx(
9462
- InfoField,
9463
- {
9464
- label: "Status",
9465
- value: /* @__PURE__ */ jsx(Badge, { variant: getStatusVariant(transaction.status), children: transaction.status }),
9466
- layout: "horizontal"
9467
- }
9468
- ),
9469
- /* @__PURE__ */ jsx(
9470
- InfoField,
9471
- {
9472
- label: "Amount",
9473
- value: /* @__PURE__ */ jsx("span", { className: cn(
9474
- "font-semibold",
9475
- transaction.amount < 0 ? "text-destructive" : "text-success"
9476
- ), children: formatCurrency(transaction.amount) }),
9477
- layout: "horizontal"
9478
- }
9479
- ),
9480
10034
  /* @__PURE__ */ jsx(
9481
10035
  InfoField,
9482
10036
  {
@@ -9488,7 +10042,7 @@ var TransactionDetail = () => {
9488
10042
  /* @__PURE__ */ jsx(
9489
10043
  InfoField,
9490
10044
  {
9491
- label: "Customer Name",
10045
+ label: "Customer",
9492
10046
  value: /* @__PURE__ */ jsx(Button, { variant: "link", className: "h-auto p-0 text-sm", children: transaction.customer }),
9493
10047
  layout: "horizontal"
9494
10048
  }
@@ -9497,21 +10051,18 @@ var TransactionDetail = () => {
9497
10051
  /* @__PURE__ */ jsx(
9498
10052
  InfoField,
9499
10053
  {
9500
- label: "Direction",
9501
- value: transaction.amount < 0 ? "DEBIT" : "CREDIT",
10054
+ label: "Counterparty",
10055
+ value: /* @__PURE__ */ jsx(Button, { variant: "link", className: "h-auto p-0 text-sm", children: transaction.counterparty }),
9502
10056
  layout: "horizontal"
9503
10057
  }
9504
10058
  ),
9505
- /* @__PURE__ */ jsx(InfoField, { label: "Counterparty Name", value: transaction.counterparty, layout: "horizontal" }),
9506
10059
  /* @__PURE__ */ jsx(InfoField, { label: "Post Date", value: transaction.created.split(" ")[0], layout: "horizontal" }),
9507
10060
  /* @__PURE__ */ jsx(InfoField, { label: "OFAC ID", value: /* @__PURE__ */ jsx(Button, { variant: "link", className: "h-auto p-0 text-sm", children: "18323208" }), layout: "horizontal" }),
9508
10061
  /* @__PURE__ */ jsx(InfoField, { label: "Original Filename", value: "-", layout: "horizontal" }),
9509
10062
  /* @__PURE__ */ jsx(InfoField, { label: "Loaded From File", value: "iso21130757012764355B7.xml.126534273Q299", layout: "horizontal" }),
9510
10063
  /* @__PURE__ */ jsx(InfoField, { label: "Payment ID", value: transaction.id, layout: "horizontal" }),
9511
10064
  /* @__PURE__ */ jsx(InfoField, { label: "Linked Payment ID", value: "-", layout: "horizontal" }),
9512
- /* @__PURE__ */ jsx(InfoField, { label: "Is Inbound", value: "True", layout: "horizontal" }),
9513
10065
  /* @__PURE__ */ jsx(InfoField, { label: "Pending until Date", value: "-", layout: "horizontal" }),
9514
- /* @__PURE__ */ jsx(InfoField, { label: "Processing Status", value: "Sent", layout: "horizontal" }),
9515
10066
  /* @__PURE__ */ jsx(InfoField, { label: "Further Credit To", value: "-", layout: "horizontal" }),
9516
10067
  /* @__PURE__ */ jsx(InfoField, { label: "Balance Available Date", value: "-", layout: "horizontal" }),
9517
10068
  /* @__PURE__ */ jsx(InfoField, { label: "Requester Username", value: "-", layout: "horizontal" }),
@@ -9561,6 +10112,6 @@ function UIKit() {
9561
10112
  ] }) }) });
9562
10113
  }
9563
10114
 
9564
- export { ACHBankCard, ACHBasicInfoCard, ACHDetailsSection, ACHTransferSection, AccountCard, AddressForm, AlertDetail_default as AlertDetail, AlertDetailView, AlertDocuments, AlertNotes, AlertTimeline, Alerts_default as Alerts, AppSidebar, Badge, BankAddressCard, BankingDetailsCard, BasicInfoCard, BasicInfoSection, BeneficiaryAddress, BeneficiaryCard, BeneficiaryDomesticWire, Breadcrumb, BusinessDetail_default as BusinessDetail, BusinessProfileCard, BusinessStatusCard, BusinessTypeBadge, Businesses_default as Businesses, Button, Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Cases_default as Cases, ContactInfoCard, Container, ContextSection, CounterpartyBasicInfo, DomesticWire_default as CounterpartyDomesticWire, Manage_default as CounterpartyManage, CounterpartyProfileCard, CounterpartyRecordsCard, CounterpartyTypeBadge, Create_default as CreateBusiness, Create_default2 as CreateCounterparty, Dashboard_default as Dashboard, DashboardDemo, DataGrid, DataTable, DetailPageLayout, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, EditableFormCard, EditableInfoField, EnhancedInput, EnhancedSelect, EnhancedTextarea, EntityCard, FormCard, FormField, FormInput, FormProvider, FormSection, FormSelect, InfoField, IntermediaryCard, IntermediaryFI, IntermediaryFIAddress, JsonViewer, Label, ListPage, MainLayout, MetricCard, NewTransaction, NotFound_default as NotFound, OriginatorCard, OriginatorFI, OriginatorFIAddress, PageLayout, PatternLibrary, PaymentInformationSection, Popover, PopoverContent, PopoverTrigger, ReceiverCard, ResponsiveGrid, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Stack, Statement, StatementHeader, StatusBadge, Tabs, TabsContent, TabsList, TabsTrigger, Toast, ToastAction, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TransactionDetail_default as TransactionDetail, TransactionHistory_default as TransactionHistory, UIKit, UIKitShowcase, WireDetailsSection, WireTransferSection, badgeVariants, buttonVariants, cardVariants, inputVariants, reducer, textareaVariants, toast, useAlertDetail, useEditState, useFormWithEditState, useIsMobile, useSidebar, useToast };
10115
+ export { ACHBankCard, ACHBasicInfoCard, ACHDetailsSection, ACHTransferSection, AccountCard, AddressForm, AlertDetail_default as AlertDetail, AlertDetailRouter, AlertDocuments, AlertHeaderControls, AlertNotes, AlertTimeline, Alerts_default as Alerts, AppSidebar, Badge, BankAddressCard, BankingDetailsCard, BasicInfoCard, BasicInfoSection, BeneficiaryAddress, BeneficiaryCard, BeneficiaryDomesticWire, Breadcrumb, BusinessDetail_default as BusinessDetail, BusinessProfileCard, BusinessStatusCard, BusinessTypeBadge, Businesses_default as Businesses, Button, Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Cases_default as Cases, Checkbox, ContactInfoCard, Container, ContextSection, CounterpartyBasicInfo, DomesticWire_default as CounterpartyDomesticWire, Manage_default as CounterpartyManage, CounterpartyProfileCard, CounterpartyRecordsCard, CounterpartyTypeBadge, Create_default as CreateBusiness, Create_default2 as CreateCounterparty, Dashboard_default as Dashboard, DashboardDemo, DataGrid, DataTable, DetailPageLayout, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, EditableFormCard, EditableInfoField, EnhancedInput, EnhancedSelect, EnhancedTextarea, EntityCard, FormCard, FormField, FormInput, FormProvider, FormSection, FormSelect, InfoField, IntermediaryCard, IntermediaryFI, IntermediaryFIAddress, JsonViewer, Label, ListPage, MainLayout, MetricCard, NewTransaction, NotFound_default as NotFound, OFACAlertView, OriginatorCard, OriginatorFI, OriginatorFIAddress, PageLayout, PatternLibrary, PaymentInformationSection, Popover, PopoverContent, PopoverTrigger, ReceiverCard, ResolveAlertDialog, ResponsiveGrid, ScrollArea, ScrollBar, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Stack, Statement, StatementHeader, StatementView, StatusBadge, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Toast, ToastAction, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TransactionDetail_default as TransactionDetail, TransactionHistory_default as TransactionHistory, TransactionTypeBadge, UIKit, UIKitShowcase, WireDetailsSection, WireTransferSection, badgeVariants, buttonVariants, cardVariants, inputVariants, reducer, textareaVariants, toast, useAlertDetail, useEditState, useFormWithEditState, useIsMobile, useSidebar, useToast };
9565
10116
  //# sourceMappingURL=index.js.map
9566
10117
  //# sourceMappingURL=index.js.map