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.cjs CHANGED
@@ -1,31 +1,33 @@
1
1
  'use strict';
2
2
 
3
- var React13 = require('react');
3
+ var React15 = require('react');
4
4
  var classVarianceAuthority = require('class-variance-authority');
5
5
  var clsx = require('clsx');
6
6
  var tailwindMerge = require('tailwind-merge');
7
7
  var jsxRuntime = require('react/jsx-runtime');
8
- var reactSlot = require('@radix-ui/react-slot');
9
8
  var lucideReact = require('lucide-react');
10
9
  var reactDom = require('react-dom');
10
+ var reactSlot = require('@radix-ui/react-slot');
11
11
  var SelectPrimitive = require('@radix-ui/react-select');
12
- var DialogPrimitive = require('@radix-ui/react-dialog');
13
12
  var reactRouterDom = require('react-router-dom');
14
- var reactCollapsible = require('@radix-ui/react-collapsible');
15
- var SeparatorPrimitive = require('@radix-ui/react-separator');
16
- var TooltipPrimitive = require('@radix-ui/react-tooltip');
13
+ var ScrollAreaPrimitive = require('@radix-ui/react-scroll-area');
14
+ var DialogPrimitive = require('@radix-ui/react-dialog');
17
15
  var reactHookForm = require('react-hook-form');
18
16
  var zod$1 = require('@hookform/resolvers/zod');
19
17
  var zod = require('zod');
18
+ var reactCollapsible = require('@radix-ui/react-collapsible');
19
+ var SeparatorPrimitive = require('@radix-ui/react-separator');
20
+ var TooltipPrimitive = require('@radix-ui/react-tooltip');
20
21
  var LabelPrimitive = require('@radix-ui/react-label');
22
+ var dateFns = require('date-fns');
21
23
  var reactDayPicker = require('react-day-picker');
22
- var DropdownMenuPrimitive = require('@radix-ui/react-dropdown-menu');
23
24
  var PopoverPrimitive = require('@radix-ui/react-popover');
25
+ var CheckboxPrimitive = require('@radix-ui/react-checkbox');
26
+ var DropdownMenuPrimitive = require('@radix-ui/react-dropdown-menu');
24
27
  var nextThemes = require('next-themes');
25
28
  var sonner = require('sonner');
26
29
  var TabsPrimitive = require('@radix-ui/react-tabs');
27
30
  var ToastPrimitives = require('@radix-ui/react-toast');
28
- var dateFns = require('date-fns');
29
31
 
30
32
  function _interopNamespace(e) {
31
33
  if (e && e.__esModule) return e;
@@ -45,18 +47,20 @@ function _interopNamespace(e) {
45
47
  return Object.freeze(n);
46
48
  }
47
49
 
48
- var React13__namespace = /*#__PURE__*/_interopNamespace(React13);
50
+ var React15__namespace = /*#__PURE__*/_interopNamespace(React15);
49
51
  var SelectPrimitive__namespace = /*#__PURE__*/_interopNamespace(SelectPrimitive);
52
+ var ScrollAreaPrimitive__namespace = /*#__PURE__*/_interopNamespace(ScrollAreaPrimitive);
50
53
  var DialogPrimitive__namespace = /*#__PURE__*/_interopNamespace(DialogPrimitive);
51
54
  var SeparatorPrimitive__namespace = /*#__PURE__*/_interopNamespace(SeparatorPrimitive);
52
55
  var TooltipPrimitive__namespace = /*#__PURE__*/_interopNamespace(TooltipPrimitive);
53
56
  var LabelPrimitive__namespace = /*#__PURE__*/_interopNamespace(LabelPrimitive);
54
- var DropdownMenuPrimitive__namespace = /*#__PURE__*/_interopNamespace(DropdownMenuPrimitive);
55
57
  var PopoverPrimitive__namespace = /*#__PURE__*/_interopNamespace(PopoverPrimitive);
58
+ var CheckboxPrimitive__namespace = /*#__PURE__*/_interopNamespace(CheckboxPrimitive);
59
+ var DropdownMenuPrimitive__namespace = /*#__PURE__*/_interopNamespace(DropdownMenuPrimitive);
56
60
  var TabsPrimitive__namespace = /*#__PURE__*/_interopNamespace(TabsPrimitive);
57
61
  var ToastPrimitives__namespace = /*#__PURE__*/_interopNamespace(ToastPrimitives);
58
62
 
59
- // src/components/ui/form-card.tsx
63
+ // src/components/alerts/OFACAlertView.tsx
60
64
  function cn(...inputs) {
61
65
  return tailwindMerge.twMerge(clsx.clsx(inputs));
62
66
  }
@@ -94,7 +98,7 @@ var cardVariants = classVarianceAuthority.cva(
94
98
  }
95
99
  }
96
100
  );
97
- var Card = React13__namespace.forwardRef(
101
+ var Card = React15__namespace.forwardRef(
98
102
  ({ className, variant, size, fullHeight, interactive, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
99
103
  "div",
100
104
  {
@@ -131,7 +135,7 @@ var cardHeaderVariants = classVarianceAuthority.cva(
131
135
  }
132
136
  }
133
137
  );
134
- var CardHeader = React13__namespace.forwardRef(
138
+ var CardHeader = React15__namespace.forwardRef(
135
139
  ({ className, size, align, direction, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
136
140
  "div",
137
141
  {
@@ -157,7 +161,7 @@ var cardTitleVariants = classVarianceAuthority.cva(
157
161
  }
158
162
  }
159
163
  );
160
- var CardTitle = React13__namespace.forwardRef(
164
+ var CardTitle = React15__namespace.forwardRef(
161
165
  ({ className, size, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
162
166
  "h3",
163
167
  {
@@ -168,7 +172,7 @@ var CardTitle = React13__namespace.forwardRef(
168
172
  )
169
173
  );
170
174
  CardTitle.displayName = "CardTitle";
171
- var CardDescription = React13__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
175
+ var CardDescription = React15__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
172
176
  "p",
173
177
  {
174
178
  ref,
@@ -197,7 +201,7 @@ var cardContentVariants = classVarianceAuthority.cva(
197
201
  }
198
202
  }
199
203
  );
200
- var CardContent = React13__namespace.forwardRef(
204
+ var CardContent = React15__namespace.forwardRef(
201
205
  ({ className, size, fullHeight, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
202
206
  "div",
203
207
  {
@@ -230,7 +234,7 @@ var cardFooterVariants = classVarianceAuthority.cva(
230
234
  }
231
235
  }
232
236
  );
233
- var CardFooter = React13__namespace.forwardRef(
237
+ var CardFooter = React15__namespace.forwardRef(
234
238
  ({ className, size, justify, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
235
239
  "div",
236
240
  {
@@ -241,7 +245,7 @@ var CardFooter = React13__namespace.forwardRef(
241
245
  )
242
246
  );
243
247
  CardFooter.displayName = "CardFooter";
244
- var FormCard = React13__namespace.forwardRef(
248
+ var FormCard = React15__namespace.forwardRef(
245
249
  ({ title, description, children, headerActions, className, variant = "default", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
246
250
  Card,
247
251
  {
@@ -268,45 +272,6 @@ var FormCard = React13__namespace.forwardRef(
268
272
  )
269
273
  );
270
274
  FormCard.displayName = "FormCard";
271
- var buttonVariants = classVarianceAuthority.cva(
272
- "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",
273
- {
274
- variants: {
275
- variant: {
276
- default: "bg-primary text-primary-foreground hover:bg-primary/90",
277
- destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
278
- outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
279
- secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
280
- ghost: "hover:bg-accent hover:text-accent-foreground",
281
- link: "text-primary underline-offset-4 hover:underline"
282
- },
283
- size: {
284
- default: "h-10 px-4 py-2",
285
- sm: "h-9 rounded-md px-3",
286
- lg: "h-11 rounded-md px-8",
287
- icon: "h-10 w-10"
288
- }
289
- },
290
- defaultVariants: {
291
- variant: "default",
292
- size: "default"
293
- }
294
- }
295
- );
296
- var Button = React13__namespace.forwardRef(
297
- ({ className, variant, size, asChild = false, ...props }, ref) => {
298
- const Comp = asChild ? reactSlot.Slot : "button";
299
- return /* @__PURE__ */ jsxRuntime.jsx(
300
- Comp,
301
- {
302
- className: cn(buttonVariants({ variant, size, className })),
303
- ref,
304
- ...props
305
- }
306
- );
307
- }
308
- );
309
- Button.displayName = "Button";
310
275
  var badgeVariants = classVarianceAuthority.cva(
311
276
  "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",
312
277
  {
@@ -318,6 +283,8 @@ var badgeVariants = classVarianceAuthority.cva(
318
283
  outline: "text-foreground",
319
284
  success: "border-transparent bg-success text-success-foreground hover:bg-success/80",
320
285
  warning: "border-transparent bg-warning text-warning-foreground hover:bg-warning/80",
286
+ inbound: "border-transparent bg-blue-500 text-white hover:bg-blue-600",
287
+ outbound: "border-transparent bg-orange-500 text-white hover:bg-orange-600",
321
288
  // Business type specific variants
322
289
  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",
323
290
  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",
@@ -350,6 +317,11 @@ function Badge({ className, variant, ...props }) {
350
317
  }
351
318
  var AlertTimeline = ({ events }) => {
352
319
  const getIcon = (action) => {
320
+ if (action.includes("Note added")) return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.StickyNote, { className: "h-4 w-4" });
321
+ if (action.includes("Document added")) return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.FileUp, { className: "h-4 w-4" });
322
+ if (action.includes("Alert Approved")) return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckCircle, { className: "h-4 w-4" });
323
+ if (action.includes("Alert Declined")) return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.XCircle, { className: "h-4 w-4" });
324
+ if (action.includes("RFI Status change")) return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.RefreshCw, { className: "h-4 w-4" });
353
325
  if (action.includes("Created")) return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Circle, { className: "h-4 w-4" });
354
326
  if (action.includes("Assigned")) return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.UserPlus, { className: "h-4 w-4" });
355
327
  if (action.includes("Updated") || action.includes("Modified")) return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Edit, { className: "h-4 w-4" });
@@ -357,7 +329,12 @@ var AlertTimeline = ({ events }) => {
357
329
  if (action.includes("Rejected")) return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.XCircle, { className: "h-4 w-4" });
358
330
  return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Circle, { className: "h-4 w-4" });
359
331
  };
360
- const getStatusColor2 = (status) => {
332
+ const getStatusColor2 = (status, action) => {
333
+ if (action?.includes("Note added")) return "text-blue-500";
334
+ if (action?.includes("Document added")) return "text-purple-500";
335
+ if (action?.includes("Alert Approved")) return "text-success";
336
+ if (action?.includes("Alert Declined")) return "text-destructive";
337
+ if (action?.includes("RFI Status change")) return "text-warning";
361
338
  switch (status) {
362
339
  case "Unassigned":
363
340
  return "text-destructive";
@@ -374,10 +351,7 @@ var AlertTimeline = ({ events }) => {
374
351
  }
375
352
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-3", children: events.map((event, index) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative pl-6 pb-3", children: [
376
353
  index !== events.length - 1 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute left-[7px] top-5 bottom-0 w-[2px] bg-border" }),
377
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(
378
- "absolute left-0 top-0 flex-none",
379
- getStatusColor2(event.status)
380
- ), children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-4 w-4", children: getIcon(event.action) }) }),
354
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("absolute left-0 top-0 flex-none", getStatusColor2(event.status, event.action)), children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-4 w-4", children: getIcon(event.action) }) }),
381
355
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-0.5", children: [
382
356
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-medium text-foreground", children: event.action }),
383
357
  /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-xs text-muted-foreground", children: [
@@ -385,14 +359,49 @@ var AlertTimeline = ({ events }) => {
385
359
  event.user
386
360
  ] }),
387
361
  event.details && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground", children: event.details }),
388
- event.status && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: cn("text-xs font-medium", getStatusColor2(event.status)), children: [
389
- "Status: ",
390
- event.status
391
- ] }),
392
362
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground/70 pt-0.5", children: event.timestamp })
393
363
  ] })
394
364
  ] }, event.id)) });
395
365
  };
366
+ var buttonVariants = classVarianceAuthority.cva(
367
+ "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",
368
+ {
369
+ variants: {
370
+ variant: {
371
+ default: "bg-primary text-primary-foreground hover:bg-primary/90",
372
+ destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
373
+ outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
374
+ secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
375
+ ghost: "hover:bg-accent hover:text-accent-foreground",
376
+ link: "text-primary underline-offset-4 hover:underline"
377
+ },
378
+ size: {
379
+ default: "h-10 px-4 py-2",
380
+ sm: "h-9 rounded-md px-3",
381
+ lg: "h-11 rounded-md px-8",
382
+ icon: "h-10 w-10"
383
+ }
384
+ },
385
+ defaultVariants: {
386
+ variant: "default",
387
+ size: "default"
388
+ }
389
+ }
390
+ );
391
+ var Button = React15__namespace.forwardRef(
392
+ ({ className, variant, size, asChild = false, ...props }, ref) => {
393
+ const Comp = asChild ? reactSlot.Slot : "button";
394
+ return /* @__PURE__ */ jsxRuntime.jsx(
395
+ Comp,
396
+ {
397
+ className: cn(buttonVariants({ variant, size, className })),
398
+ ref,
399
+ ...props
400
+ }
401
+ );
402
+ }
403
+ );
404
+ Button.displayName = "Button";
396
405
  var textareaVariants = classVarianceAuthority.cva(
397
406
  "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",
398
407
  {
@@ -410,7 +419,7 @@ var textareaVariants = classVarianceAuthority.cva(
410
419
  }
411
420
  }
412
421
  );
413
- var EnhancedTextarea = React13__namespace.forwardRef(
422
+ var EnhancedTextarea = React15__namespace.forwardRef(
414
423
  ({ className, variant, label, hint, error, success, ...props }, ref) => {
415
424
  const textareaVariant = error ? "error" : success ? "success" : props.disabled ? "disabled" : props.readOnly ? "readonly" : variant;
416
425
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
@@ -449,9 +458,9 @@ var selectVariants = classVarianceAuthority.cva(
449
458
  }
450
459
  }
451
460
  );
452
- var EnhancedSelect = React13__namespace.forwardRef(({ variant, label, hint, error, success, placeholder, options, disabled, ...props }, ref) => {
461
+ var EnhancedSelect = React15__namespace.forwardRef(({ variant, label, hint, error, success, placeholder, options, disabled, className, ...props }, ref) => {
453
462
  const selectVariant = error ? "error" : success ? "success" : disabled ? "disabled" : variant;
454
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
463
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("space-y-2", className), children: [
455
464
  label && /* @__PURE__ */ jsxRuntime.jsx("label", { className: "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", children: label }),
456
465
  /* @__PURE__ */ jsxRuntime.jsxs(SelectPrimitive__namespace.Root, { ...props, disabled, children: [
457
466
  /* @__PURE__ */ jsxRuntime.jsxs(
@@ -465,7 +474,7 @@ var EnhancedSelect = React13__namespace.forwardRef(({ variant, label, hint, erro
465
474
  ]
466
475
  }
467
476
  ),
468
- /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsxs(SelectPrimitive__namespace.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: [
477
+ /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsxs(SelectPrimitive__namespace.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: [
469
478
  /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.ScrollUpButton, { className: "flex cursor-default items-center justify-center py-1", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronUp, { className: "h-4 w-4" }) }),
470
479
  /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Viewport, { className: "p-1", children: options.map((option) => /* @__PURE__ */ jsxRuntime.jsxs(
471
480
  SelectPrimitive__namespace.Item,
@@ -589,8 +598,8 @@ function toast({ ...props }) {
589
598
  };
590
599
  }
591
600
  function useToast() {
592
- const [state, setState] = React13__namespace.useState(memoryState);
593
- React13__namespace.useEffect(() => {
601
+ const [state, setState] = React15__namespace.useState(memoryState);
602
+ React15__namespace.useEffect(() => {
594
603
  listeners.push(setState);
595
604
  return () => {
596
605
  const index = listeners.indexOf(setState);
@@ -610,10 +619,10 @@ var NOTE_TYPE_OPTIONS = [
610
619
  { value: "Internal Note", label: "Internal Note" }
611
620
  ];
612
621
  var AlertNotes = ({ alertId, notes }) => {
613
- const [showNoteDialog, setShowNoteDialog] = React13.useState(false);
614
- const [newNote, setNewNote] = React13.useState("");
615
- const [noteType, setNoteType] = React13.useState("RFI Note");
616
- const [isSubmitting, setIsSubmitting] = React13.useState(false);
622
+ const [showNoteDialog, setShowNoteDialog] = React15.useState(false);
623
+ const [newNote, setNewNote] = React15.useState("");
624
+ const [noteType, setNoteType] = React15.useState("RFI Note");
625
+ const [isSubmitting, setIsSubmitting] = React15.useState(false);
617
626
  const resetForm = () => {
618
627
  setNewNote("");
619
628
  setNoteType("RFI Note");
@@ -690,7 +699,8 @@ var AlertNotes = ({ alertId, notes }) => {
690
699
  placeholder: "Enter your note here...",
691
700
  value: newNote,
692
701
  onChange: (e) => setNewNote(e.target.value),
693
- rows: 6
702
+ rows: 6,
703
+ required: true
694
704
  }
695
705
  )
696
706
  ] }),
@@ -747,7 +757,7 @@ var AlertNotes = ({ alertId, notes }) => {
747
757
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-4 mb-2", children: [
748
758
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
749
759
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "font-medium text-sm text-foreground", children: note.user }),
750
- /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: note.type === "RFI Note" ? "default" : "outline", children: note.type })
760
+ /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: note.type === "RFI Note" ? "default" : "outline", children: note.type === "RFI Note" ? "RFI" : "Internal" })
751
761
  ] }),
752
762
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
753
763
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-muted-foreground whitespace-nowrap", children: note.timestamp }),
@@ -794,7 +804,7 @@ var inputVariants = classVarianceAuthority.cva(
794
804
  }
795
805
  }
796
806
  );
797
- var EnhancedInput = React13__namespace.forwardRef(
807
+ var EnhancedInput = React15__namespace.forwardRef(
798
808
  ({ className, variant, size, label, hint, error, success, isLoading, ...props }, ref) => {
799
809
  const inputVariant = error ? "error" : success ? "success" : props.disabled ? "disabled" : props.readOnly ? "readonly" : variant;
800
810
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
@@ -821,12 +831,12 @@ var EnhancedInput = React13__namespace.forwardRef(
821
831
  );
822
832
  EnhancedInput.displayName = "EnhancedInput";
823
833
  var AlertDocuments = ({ alertId, documents }) => {
824
- const [isUploading, setIsUploading] = React13.useState(false);
825
- const [showUploadDialog, setShowUploadDialog] = React13.useState(false);
826
- const [selectedFile, setSelectedFile] = React13.useState(null);
827
- const [documentName, setDocumentName] = React13.useState("");
828
- const [description, setDescription] = React13.useState("");
829
- const [documentType, setDocumentType] = React13.useState("");
834
+ const [isUploading, setIsUploading] = React15.useState(false);
835
+ const [showUploadDialog, setShowUploadDialog] = React15.useState(false);
836
+ const [selectedFile, setSelectedFile] = React15.useState(null);
837
+ const [documentName, setDocumentName] = React15.useState("");
838
+ const [description, setDescription] = React15.useState("");
839
+ const [documentType, setDocumentType] = React15.useState("");
830
840
  const handleFileSelect = (e) => {
831
841
  const file = e.target.files?.[0];
832
842
  if (!file) return;
@@ -1058,10 +1068,8 @@ var AlertDocuments = ({ alertId, documents }) => {
1058
1068
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 flex-1 min-w-0", children: [
1059
1069
  !isImageType(doc.name) && /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(getFileTypeColor(doc.type)), children: getFileIcon(doc.type) }),
1060
1070
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 min-w-0", children: [
1061
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
1062
- /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "font-medium text-sm truncate", children: doc.name }),
1063
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("text-xs px-2 py-0.5 rounded-full bg-muted", getFileTypeColor(doc.type)), children: doc.type })
1064
- ] }),
1071
+ /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "font-medium text-sm truncate", children: doc.name }),
1072
+ /* @__PURE__ */ jsxRuntime.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 }),
1065
1073
  doc.description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-foreground mt-1", children: doc.description }),
1066
1074
  /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-xs text-muted-foreground mt-1", children: [
1067
1075
  doc.size,
@@ -1133,23 +1141,127 @@ var InfoField = ({ label, value, layout = "vertical", className }) => {
1133
1141
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: `text-sm text-foreground ${label ? "mt-1" : ""}`, children: value })
1134
1142
  ] });
1135
1143
  };
1144
+ var ScrollArea = React15__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
1145
+ ScrollAreaPrimitive__namespace.Root,
1146
+ {
1147
+ ref,
1148
+ className: cn("relative overflow-hidden", className),
1149
+ ...props,
1150
+ children: [
1151
+ /* @__PURE__ */ jsxRuntime.jsx(ScrollAreaPrimitive__namespace.Viewport, { className: "h-full w-full rounded-[inherit]", children }),
1152
+ /* @__PURE__ */ jsxRuntime.jsx(ScrollBar, {}),
1153
+ /* @__PURE__ */ jsxRuntime.jsx(ScrollAreaPrimitive__namespace.Corner, {})
1154
+ ]
1155
+ }
1156
+ ));
1157
+ ScrollArea.displayName = ScrollAreaPrimitive__namespace.Root.displayName;
1158
+ var ScrollBar = React15__namespace.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
1159
+ ScrollAreaPrimitive__namespace.ScrollAreaScrollbar,
1160
+ {
1161
+ ref,
1162
+ orientation,
1163
+ className: cn(
1164
+ "flex touch-none select-none transition-colors",
1165
+ orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent p-[1px]",
1166
+ orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-[1px]",
1167
+ className
1168
+ ),
1169
+ ...props,
1170
+ children: /* @__PURE__ */ jsxRuntime.jsx(ScrollAreaPrimitive__namespace.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
1171
+ }
1172
+ ));
1173
+ ScrollBar.displayName = ScrollAreaPrimitive__namespace.ScrollAreaScrollbar.displayName;
1174
+ var Table = React15__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ jsxRuntime.jsx(
1175
+ "table",
1176
+ {
1177
+ ref,
1178
+ className: cn("w-full caption-bottom text-sm", className),
1179
+ ...props
1180
+ }
1181
+ ) }));
1182
+ Table.displayName = "Table";
1183
+ var TableHeader = React15__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("thead", { ref, className: cn("[&_tr]:border-b", className), ...props }));
1184
+ TableHeader.displayName = "TableHeader";
1185
+ var TableBody = React15__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
1186
+ "tbody",
1187
+ {
1188
+ ref,
1189
+ className: cn("[&_tr:last-child]:border-0", className),
1190
+ ...props
1191
+ }
1192
+ ));
1193
+ TableBody.displayName = "TableBody";
1194
+ var TableFooter = React15__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
1195
+ "tfoot",
1196
+ {
1197
+ ref,
1198
+ className: cn(
1199
+ "border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",
1200
+ className
1201
+ ),
1202
+ ...props
1203
+ }
1204
+ ));
1205
+ TableFooter.displayName = "TableFooter";
1206
+ var TableRow = React15__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
1207
+ "tr",
1208
+ {
1209
+ ref,
1210
+ className: cn(
1211
+ "border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",
1212
+ className
1213
+ ),
1214
+ ...props
1215
+ }
1216
+ ));
1217
+ TableRow.displayName = "TableRow";
1218
+ var TableHead = React15__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
1219
+ "th",
1220
+ {
1221
+ ref,
1222
+ className: cn(
1223
+ "h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",
1224
+ className
1225
+ ),
1226
+ ...props
1227
+ }
1228
+ ));
1229
+ TableHead.displayName = "TableHead";
1230
+ var TableCell = React15__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
1231
+ "td",
1232
+ {
1233
+ ref,
1234
+ className: cn("p-4 align-middle [&:has([role=checkbox])]:pr-0", className),
1235
+ ...props
1236
+ }
1237
+ ));
1238
+ TableCell.displayName = "TableCell";
1239
+ var TableCaption = React15__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
1240
+ "caption",
1241
+ {
1242
+ ref,
1243
+ className: cn("mt-4 text-sm text-muted-foreground", className),
1244
+ ...props
1245
+ }
1246
+ ));
1247
+ TableCaption.displayName = "TableCaption";
1136
1248
  var Dialog = DialogPrimitive__namespace.Root;
1137
1249
  var DialogTrigger = DialogPrimitive__namespace.Trigger;
1138
1250
  var DialogPortal = DialogPrimitive__namespace.Portal;
1139
1251
  var DialogClose = DialogPrimitive__namespace.Close;
1140
- var DialogOverlay = React13__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
1252
+ var DialogOverlay = React15__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
1141
1253
  DialogPrimitive__namespace.Overlay,
1142
1254
  {
1143
1255
  ref,
1144
1256
  className: cn(
1145
- "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",
1257
+ "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",
1146
1258
  className
1147
1259
  ),
1148
1260
  ...props
1149
1261
  }
1150
1262
  ));
1151
1263
  DialogOverlay.displayName = DialogPrimitive__namespace.Overlay.displayName;
1152
- var DialogContent = React13__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(DialogPortal, { children: [
1264
+ var DialogContent = React15__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(DialogPortal, { children: [
1153
1265
  /* @__PURE__ */ jsxRuntime.jsx(DialogOverlay, {}),
1154
1266
  /* @__PURE__ */ jsxRuntime.jsxs(
1155
1267
  DialogPrimitive__namespace.Content,
@@ -1199,7 +1311,7 @@ var DialogFooter = ({
1199
1311
  }
1200
1312
  );
1201
1313
  DialogFooter.displayName = "DialogFooter";
1202
- var DialogTitle = React13__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
1314
+ var DialogTitle = React15__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
1203
1315
  DialogPrimitive__namespace.Title,
1204
1316
  {
1205
1317
  ref,
@@ -1211,7 +1323,7 @@ var DialogTitle = React13__namespace.forwardRef(({ className, ...props }, ref) =
1211
1323
  }
1212
1324
  ));
1213
1325
  DialogTitle.displayName = DialogPrimitive__namespace.Title.displayName;
1214
- var DialogDescription = React13__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
1326
+ var DialogDescription = React15__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
1215
1327
  DialogPrimitive__namespace.Description,
1216
1328
  {
1217
1329
  ref,
@@ -1221,7 +1333,7 @@ var DialogDescription = React13__namespace.forwardRef(({ className, ...props },
1221
1333
  ));
1222
1334
  DialogDescription.displayName = DialogPrimitive__namespace.Description.displayName;
1223
1335
  var JsonViewer = ({ data, className, compact = false, maxHeight = "60vh" }) => {
1224
- const [copied, setCopied] = React13.useState(false);
1336
+ const [copied, setCopied] = React15.useState(false);
1225
1337
  const handleCopy = () => {
1226
1338
  navigator.clipboard.writeText(JSON.stringify(data, null, 2));
1227
1339
  setCopied(true);
@@ -1258,7 +1370,7 @@ var JsonViewer = ({ data, className, compact = false, maxHeight = "60vh" }) => {
1258
1370
  ] });
1259
1371
  };
1260
1372
  var JsonNode = ({ data, name, depth, compact = false }) => {
1261
- const [isExpanded, setIsExpanded] = React13.useState(compact ? depth < 1 : depth < 2);
1373
+ const [isExpanded, setIsExpanded] = React15.useState(compact ? depth < 1 : depth < 2);
1262
1374
  const indent = compact ? depth * 12 : depth * 16;
1263
1375
  if (data === null) {
1264
1376
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { paddingLeft: indent }, className: "text-muted-foreground", children: [
@@ -1320,45 +1432,124 @@ var JsonNode = ({ data, name, depth, compact = false }) => {
1320
1432
  ] })
1321
1433
  ] });
1322
1434
  };
1323
- var ContextSection = ({ alert }) => {
1324
- const [isDialogOpen, setIsDialogOpen] = React13.useState(false);
1435
+ var OFACAlertView = ({ alert }) => {
1436
+ const [isJsonDialogOpen, setIsJsonDialogOpen] = React15.useState(false);
1437
+ const parseOFACMatches = (data) => {
1438
+ if (!data.rawResults || !data.ofacCheckDetails) return [];
1439
+ try {
1440
+ const rawResults = JSON.parse(data.rawResults);
1441
+ const tableRows = [];
1442
+ const getListName = (listType) => {
1443
+ const listNames = {
1444
+ "SDNs": "OFAC SDN List",
1445
+ "altNames": "OFAC Alternate Names",
1446
+ "sectoralSanctions": "OFAC Sectoral Sanctions",
1447
+ "nonSDNMenuBasedSanctionsList": "OFAC Non-SDN List",
1448
+ "ukConsolidatedSanctionsList": "UK Consolidated List"
1449
+ };
1450
+ return listNames[listType] || listType;
1451
+ };
1452
+ const formatCheckKey = (key) => {
1453
+ return key.replace(/([A-Z])/g, " $1").replace(/^./, (str) => str.toUpperCase()).trim();
1454
+ };
1455
+ const listTypes = [
1456
+ { key: "SDNs", nameField: "sdnName" },
1457
+ { key: "altNames", nameField: "alternateName" },
1458
+ { key: "sectoralSanctions", nameField: "Name" },
1459
+ { key: "nonSDNMenuBasedSanctionsList", nameField: "Name" },
1460
+ { key: "ukConsolidatedSanctionsList", nameField: "Names" }
1461
+ ];
1462
+ listTypes.forEach(({ key, nameField }) => {
1463
+ const list = rawResults[key];
1464
+ if (list && Array.isArray(list)) {
1465
+ list.forEach((item) => {
1466
+ data.ofacCheckDetails.forEach((check) => {
1467
+ tableRows.push({
1468
+ type: formatCheckKey(check.checkKey),
1469
+ name: check.checkValue,
1470
+ matchedName: item.matchedName || item[nameField] || "N/A",
1471
+ list: getListName(key),
1472
+ matchScore: item.match ? `${(item.match * 100).toFixed(2)}%` : "N/A"
1473
+ });
1474
+ });
1475
+ });
1476
+ }
1477
+ });
1478
+ return tableRows;
1479
+ } catch (error) {
1480
+ console.error("Error parsing OFAC results:", error);
1481
+ return [];
1482
+ }
1483
+ };
1325
1484
  const renderOFACContext = () => {
1326
1485
  const data = alert.contextData;
1327
1486
  if (!data) return null;
1487
+ const tableRows = parseOFACMatches(data);
1488
+ const entityName = data.counterpartyName || data.businessName || data.individualName || data.transactionPaymentId || "N/A";
1489
+ const entityType = data.counterpartyName ? "Counterparty" : data.businessName ? "Business" : data.individualName ? "Individual" : data.transactionPaymentId ? "Transaction" : "N/A";
1490
+ const entityId = data.counterpartyId || data.businessId || data.individualId || data.transactionPaymentId;
1491
+ const entityLink = entityId ? data.counterpartyId ? `/counterparties/${entityId}` : data.businessId ? `/businesses/${entityId}` : data.individualId ? `/individuals/${entityId}` : data.transactionPaymentId ? `/transactions/${entityId}` : null : null;
1328
1492
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
1329
1493
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
1330
- /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Entity Name", value: data.entityName }),
1331
- /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Entity Type", value: data.entityType }),
1332
- /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Match Score", value: /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "alert-ofac", children: data.matchScore }) }),
1333
- /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "List Name", value: data.listName })
1334
- ] }),
1335
- /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
1336
- /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-sm font-medium mb-3", children: "Flagged Items" }),
1337
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "overflow-x-auto border rounded-lg", children: /* @__PURE__ */ jsxRuntime.jsxs("table", { className: "w-full", children: [
1338
- /* @__PURE__ */ jsxRuntime.jsx("thead", { className: "border-b bg-muted/50", children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
1339
- /* @__PURE__ */ jsxRuntime.jsx("th", { className: "px-4 py-3 text-left text-sm font-medium", children: "Field" }),
1340
- /* @__PURE__ */ jsxRuntime.jsx("th", { className: "px-4 py-3 text-left text-sm font-medium", children: "Value" }),
1341
- /* @__PURE__ */ jsxRuntime.jsx("th", { className: "px-4 py-3 text-left text-sm font-medium", children: "Match Score" })
1342
- ] }) }),
1343
- /* @__PURE__ */ jsxRuntime.jsx("tbody", { children: data.flaggedItems?.map((item, index) => /* @__PURE__ */ jsxRuntime.jsxs("tr", { className: "border-b hover:bg-muted/50", children: [
1344
- /* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-4 py-3 text-sm font-medium", children: item.field }),
1345
- /* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-4 py-3 text-sm", children: item.value }),
1346
- /* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-4 py-3", children: /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: parseInt(item.matchScore) > 90 ? "alert-ofac" : "outline", children: item.matchScore }) })
1347
- ] }, index)) })
1348
- ] }) })
1494
+ /* @__PURE__ */ jsxRuntime.jsx(
1495
+ InfoField,
1496
+ {
1497
+ label: "Entity Name",
1498
+ value: entityLink ? /* @__PURE__ */ jsxRuntime.jsx(
1499
+ reactRouterDom.Link,
1500
+ {
1501
+ to: entityLink,
1502
+ className: "text-primary hover:underline",
1503
+ children: entityName
1504
+ }
1505
+ ) : entityName,
1506
+ layout: "horizontal"
1507
+ }
1508
+ ),
1509
+ /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Entity Type", value: entityType, layout: "horizontal" })
1349
1510
  ] }),
1350
- alert.contextData && /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsxs(
1351
- Button,
1352
- {
1353
- variant: "ghost",
1354
- className: "w-full justify-between h-auto py-3 px-4 border rounded-lg hover:bg-muted/50",
1355
- onClick: () => setIsDialogOpen(true),
1356
- children: [
1357
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium", children: "Detail Result" }),
1358
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "h-4 w-4" })
1359
- ]
1360
- }
1361
- ) })
1511
+ tableRows.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-4", children: /* @__PURE__ */ jsxRuntime.jsx(ScrollArea, { className: "h-[300px] rounded-md border", children: /* @__PURE__ */ jsxRuntime.jsxs(Table, { children: [
1512
+ /* @__PURE__ */ jsxRuntime.jsx(TableHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs(TableRow, { children: [
1513
+ /* @__PURE__ */ jsxRuntime.jsx(TableHead, { children: "Type" }),
1514
+ /* @__PURE__ */ jsxRuntime.jsx(TableHead, { children: "Name" }),
1515
+ /* @__PURE__ */ jsxRuntime.jsx(TableHead, { children: "Matched Name" }),
1516
+ /* @__PURE__ */ jsxRuntime.jsxs(TableHead, { className: "flex items-center gap-1", children: [
1517
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: "List" }),
1518
+ /* @__PURE__ */ jsxRuntime.jsxs(Dialog, { open: isJsonDialogOpen, onOpenChange: setIsJsonDialogOpen, children: [
1519
+ /* @__PURE__ */ jsxRuntime.jsx(DialogTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
1520
+ Button,
1521
+ {
1522
+ variant: "ghost",
1523
+ size: "icon",
1524
+ className: "h-6 w-6 text-primary hover:text-primary/80",
1525
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.FileJson, { className: "h-4 w-4" })
1526
+ }
1527
+ ) }),
1528
+ /* @__PURE__ */ jsxRuntime.jsxs(DialogContent, { className: "max-w-4xl max-h-[80vh]", children: [
1529
+ /* @__PURE__ */ jsxRuntime.jsxs(DialogHeader, { children: [
1530
+ /* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { children: "OFAC Raw Results" }),
1531
+ /* @__PURE__ */ jsxRuntime.jsx(DialogDescription, { children: "Complete JSON response from the OFAC screening check" })
1532
+ ] }),
1533
+ /* @__PURE__ */ jsxRuntime.jsx(
1534
+ JsonViewer,
1535
+ {
1536
+ data: data.rawResults ? JSON.parse(data.rawResults) : {},
1537
+ maxHeight: "60vh"
1538
+ }
1539
+ )
1540
+ ] })
1541
+ ] })
1542
+ ] }),
1543
+ /* @__PURE__ */ jsxRuntime.jsx(TableHead, { children: "Match Score" })
1544
+ ] }) }),
1545
+ /* @__PURE__ */ jsxRuntime.jsx(TableBody, { children: tableRows.map((row, index) => /* @__PURE__ */ jsxRuntime.jsxs(TableRow, { children: [
1546
+ /* @__PURE__ */ jsxRuntime.jsx(TableCell, { children: row.type }),
1547
+ /* @__PURE__ */ jsxRuntime.jsx(TableCell, { children: row.name }),
1548
+ /* @__PURE__ */ jsxRuntime.jsx(TableCell, { children: row.matchedName }),
1549
+ /* @__PURE__ */ jsxRuntime.jsx(TableCell, { children: row.list }),
1550
+ /* @__PURE__ */ jsxRuntime.jsx(TableCell, { children: row.matchScore })
1551
+ ] }, index)) })
1552
+ ] }) }) })
1362
1553
  ] });
1363
1554
  };
1364
1555
  const renderTransactionContext = () => {
@@ -1385,20 +1576,6 @@ var ContextSection = ({ alert }) => {
1385
1576
  /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Reason", value: "Compliance review required" })
1386
1577
  ] });
1387
1578
  };
1388
- const getContextTitle = () => {
1389
- switch (alert.contextType) {
1390
- case "Ofac":
1391
- return "OFAC Context";
1392
- case "Transaction":
1393
- return "Transaction Context";
1394
- case "File Record":
1395
- return "File Processing Context";
1396
- case "Product":
1397
- return "Product Context";
1398
- default:
1399
- return "Context Information";
1400
- }
1401
- };
1402
1579
  const renderContext = () => {
1403
1580
  switch (alert.contextType) {
1404
1581
  case "Ofac":
@@ -1413,87 +1590,39 @@ var ContextSection = ({ alert }) => {
1413
1590
  return /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: "No additional context available" });
1414
1591
  }
1415
1592
  };
1416
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1417
- /* @__PURE__ */ jsxRuntime.jsx(FormCard, { title: getContextTitle(), children: renderContext() }),
1418
- /* @__PURE__ */ jsxRuntime.jsx(Dialog, { open: isDialogOpen, onOpenChange: setIsDialogOpen, children: /* @__PURE__ */ jsxRuntime.jsxs(DialogContent, { className: "max-w-4xl", children: [
1419
- /* @__PURE__ */ jsxRuntime.jsx(DialogHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs(DialogTitle, { children: [
1420
- getContextTitle(),
1421
- " - Detail Result"
1593
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col lg:flex-row gap-6", children: [
1594
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 grid grid-cols-1 lg:grid-cols-2 gap-6", children: [
1595
+ /* @__PURE__ */ jsxRuntime.jsx(FormCard, { title: "Alert Details", className: "lg:col-span-2", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3", children: [
1596
+ /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Description", value: alert.description, layout: "horizontal" }),
1597
+ renderContext()
1422
1598
  ] }) }),
1423
- /* @__PURE__ */ jsxRuntime.jsx(JsonViewer, { data: alert.contextData })
1424
- ] }) })
1599
+ /* @__PURE__ */ jsxRuntime.jsx(FormCard, { title: "Notes", children: /* @__PURE__ */ jsxRuntime.jsx(AlertNotes, { alertId: alert.id, notes: alert.notes || [] }) }),
1600
+ /* @__PURE__ */ jsxRuntime.jsx(FormCard, { title: "Documents", children: /* @__PURE__ */ jsxRuntime.jsx(AlertDocuments, { alertId: alert.id, documents: alert.documents || [] }) })
1601
+ ] }),
1602
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "lg:w-64", children: /* @__PURE__ */ jsxRuntime.jsx(FormCard, { title: "Status Timeline", className: "h-full", children: /* @__PURE__ */ jsxRuntime.jsx(AlertTimeline, { events: alert.timeline || [] }) }) })
1425
1603
  ] });
1426
1604
  };
1427
- var EditableInfoField = ({
1428
- label,
1429
- value,
1430
- options,
1431
- onChange,
1432
- placeholder = "Select...",
1433
- renderValue,
1434
- className
1435
- }) => {
1436
- const [isEditing, setIsEditing] = React13.useState(false);
1437
- const handleChange = (newValue) => {
1438
- onChange(newValue);
1439
- setIsEditing(false);
1440
- };
1441
- if (isEditing) {
1442
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className, children: /* @__PURE__ */ jsxRuntime.jsx(
1443
- EnhancedSelect,
1444
- {
1445
- label,
1446
- value: value || "",
1447
- onValueChange: handleChange,
1448
- options,
1449
- placeholder
1450
- }
1451
- ) });
1452
- }
1453
- const displayValue = value ? renderValue ? renderValue(value) : value : placeholder;
1454
- return /* @__PURE__ */ jsxRuntime.jsx(
1455
- "div",
1456
- {
1457
- className: cn("cursor-pointer transition-colors hover:bg-muted/50 rounded-md -mx-2 px-2 -my-1 py-1", className),
1458
- onClick: () => setIsEditing(true),
1459
- role: "button",
1460
- tabIndex: 0,
1461
- onKeyDown: (e) => {
1462
- if (e.key === "Enter" || e.key === " ") {
1463
- e.preventDefault();
1464
- setIsEditing(true);
1465
- }
1466
- },
1467
- children: /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label, value: displayValue })
1468
- }
1469
- );
1470
- };
1471
-
1472
- // src/lib/utils/alert-utils.ts
1473
- var getTypeBadgeVariant = (type) => {
1474
- switch (type) {
1605
+ var AlertDetailRouter = ({ alert }) => {
1606
+ switch (alert.type) {
1475
1607
  case "Ofac":
1476
- return "alert-ofac";
1477
- case "Dual Approval":
1478
- return "alert-dual";
1608
+ return /* @__PURE__ */ jsxRuntime.jsx(OFACAlertView, { alert });
1479
1609
  case "Transaction Monitoring":
1480
- return "alert-monitoring";
1610
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { children: "Transaction Monitoring view - Coming soon" });
1611
+ case "Prohibited Entity":
1612
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { children: "Prohibited Entity view - Coming soon" });
1613
+ case "314a":
1614
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { children: "314a view - Coming soon" });
1615
+ case "Dual Approval":
1616
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { children: "Dual Approval view - Coming soon" });
1481
1617
  case "Transaction Processing Error":
1482
- return "alert-error";
1483
- default:
1484
- return "outline";
1485
- }
1486
- };
1487
- var getStatusColor = (status) => {
1488
- switch (status) {
1489
- case "Unassigned":
1490
- return "text-destructive";
1491
- case "Closed":
1492
- return "text-success";
1493
- case "In Progress":
1494
- return "text-warning";
1618
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { children: "Transaction Processing Error view - Coming soon" });
1619
+ case "ACH Return":
1620
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { children: "ACH Return view - Coming soon" });
1495
1621
  default:
1496
- return "";
1622
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
1623
+ "Unknown alert type: ",
1624
+ alert.type
1625
+ ] });
1497
1626
  }
1498
1627
  };
1499
1628
 
@@ -1531,134 +1660,505 @@ var ASSIGNEE_OPTIONS = [
1531
1660
  { value: "approverdev", label: "approverdev" },
1532
1661
  { value: "Unassigned", label: "Unassigned" }
1533
1662
  ];
1534
- var AlertDetailView = ({
1535
- alert,
1536
- rfiStatus,
1663
+
1664
+ // src/lib/utils/alert-utils.ts
1665
+ var getTypeBadgeVariant = (type) => {
1666
+ switch (type) {
1667
+ case "Ofac":
1668
+ return "alert-ofac";
1669
+ case "Dual Approval":
1670
+ return "alert-dual";
1671
+ case "Transaction Monitoring":
1672
+ return "alert-monitoring";
1673
+ case "Transaction Processing Error":
1674
+ return "alert-error";
1675
+ default:
1676
+ return "outline";
1677
+ }
1678
+ };
1679
+ var getStatusColor = (status) => {
1680
+ switch (status) {
1681
+ case "Unassigned":
1682
+ return "text-destructive";
1683
+ case "Closed":
1684
+ return "text-success";
1685
+ case "In Progress":
1686
+ return "text-warning";
1687
+ default:
1688
+ return "";
1689
+ }
1690
+ };
1691
+ var AlertHeaderControls = ({
1692
+ status,
1537
1693
  assignee,
1538
- onRfiStatusChange,
1539
- onAssigneeChange
1694
+ rfiStatus,
1695
+ onAssigneeChange,
1696
+ onRfiStatusChange
1540
1697
  }) => {
1541
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col lg:flex-row gap-6", children: [
1542
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 grid grid-cols-1 lg:grid-cols-2 gap-6", children: [
1698
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-4", children: [
1699
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
1700
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground", children: "Status:" }),
1701
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("font-medium text-sm", getStatusColor(status)), children: status })
1702
+ ] }),
1703
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 min-w-[180px]", children: [
1704
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground", children: "Assignee:" }),
1543
1705
  /* @__PURE__ */ jsxRuntime.jsx(
1544
- FormCard,
1706
+ EnhancedSelect,
1545
1707
  {
1546
- title: "Alert Information",
1547
- headerActions: /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "ghost", size: "sm", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Edit, { className: "h-4 w-4" }) }),
1548
- children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
1549
- /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Alert ID", value: alert.id }),
1550
- /* @__PURE__ */ jsxRuntime.jsx(
1551
- InfoField,
1552
- {
1553
- label: "Type",
1554
- value: /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: getTypeBadgeVariant(alert.type), children: alert.type })
1555
- }
1556
- ),
1557
- /* @__PURE__ */ jsxRuntime.jsx(
1558
- InfoField,
1559
- {
1560
- label: "Status",
1561
- value: /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("font-medium", getStatusColor(alert.status)), children: alert.status })
1562
- }
1563
- ),
1564
- /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Created At", value: alert.createdAt }),
1565
- /* @__PURE__ */ jsxRuntime.jsx(
1566
- InfoField,
1567
- {
1568
- label: "Context Type",
1569
- value: /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "outline", children: alert.contextType })
1570
- }
1571
- ),
1572
- /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Context ID", value: alert.contextId || "N/A" }),
1573
- /* @__PURE__ */ jsxRuntime.jsx(
1574
- EditableInfoField,
1575
- {
1576
- label: "Assignee",
1577
- value: assignee,
1578
- options: ASSIGNEE_OPTIONS,
1579
- onChange: onAssigneeChange,
1580
- placeholder: "Unassigned"
1581
- }
1582
- ),
1583
- /* @__PURE__ */ jsxRuntime.jsx(
1584
- EditableInfoField,
1585
- {
1586
- label: "RFI Status",
1587
- value: rfiStatus,
1588
- options: RFI_STATUS_OPTIONS,
1589
- onChange: onRfiStatusChange,
1590
- placeholder: "Select status",
1591
- renderValue: (value) => /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "success", children: value })
1592
- }
1593
- ),
1594
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-2", children: /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Description", value: alert.description }) })
1595
- ] })
1708
+ value: assignee,
1709
+ onValueChange: onAssigneeChange,
1710
+ options: ASSIGNEE_OPTIONS,
1711
+ placeholder: "Unassigned"
1596
1712
  }
1597
- ),
1598
- /* @__PURE__ */ jsxRuntime.jsx(ContextSection, { alert }),
1599
- /* @__PURE__ */ jsxRuntime.jsx(FormCard, { title: "Notes", children: /* @__PURE__ */ jsxRuntime.jsx(AlertNotes, { alertId: alert.id, notes: alert.notes || [] }) }),
1600
- /* @__PURE__ */ jsxRuntime.jsx(FormCard, { title: "Documents", children: /* @__PURE__ */ jsxRuntime.jsx(AlertDocuments, { alertId: alert.id, documents: alert.documents || [] }) })
1713
+ )
1601
1714
  ] }),
1602
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "lg:w-64", children: /* @__PURE__ */ jsxRuntime.jsx(FormCard, { title: "Status Timeline", className: "h-full", children: /* @__PURE__ */ jsxRuntime.jsx(AlertTimeline, { events: alert.timeline || [] }) }) })
1715
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 min-w-[180px]", children: [
1716
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground", children: "RFI Status:" }),
1717
+ /* @__PURE__ */ jsxRuntime.jsx(
1718
+ EnhancedSelect,
1719
+ {
1720
+ value: rfiStatus,
1721
+ onValueChange: onRfiStatusChange,
1722
+ options: RFI_STATUS_OPTIONS,
1723
+ placeholder: "Select status"
1724
+ }
1725
+ )
1726
+ ] })
1603
1727
  ] });
1604
1728
  };
1605
-
1606
- // src/assets/braid-logo.png
1607
- var braid_logo_default = "./braid-logo-343BOQZ2.png";
1608
- var MOBILE_BREAKPOINT = 768;
1609
- function useIsMobile() {
1610
- const [isMobile, setIsMobile] = React13__namespace.useState(void 0);
1611
- React13__namespace.useEffect(() => {
1612
- const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
1613
- const onChange = () => {
1614
- setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
1615
- };
1616
- mql.addEventListener("change", onChange);
1617
- setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
1618
- return () => mql.removeEventListener("change", onChange);
1619
- }, []);
1620
- return !!isMobile;
1621
- }
1622
- var Separator = React13__namespace.forwardRef(
1623
- ({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
1624
- SeparatorPrimitive__namespace.Root,
1625
- {
1626
- ref,
1627
- decorative,
1628
- orientation,
1629
- className: cn(
1630
- "shrink-0 bg-border",
1631
- orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
1632
- className
1633
- ),
1634
- ...props
1729
+ var ContextSection = ({ alert }) => {
1730
+ const [isDialogOpen, setIsDialogOpen] = React15.useState(false);
1731
+ const renderOFACContext = () => {
1732
+ const data = alert.contextData;
1733
+ if (!data) return null;
1734
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
1735
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
1736
+ /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Entity Name", value: data.entityName }),
1737
+ /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Entity Type", value: data.entityType }),
1738
+ /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Match Score", value: /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "alert-ofac", children: data.matchScore }) }),
1739
+ /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "List Name", value: data.listName })
1740
+ ] }),
1741
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
1742
+ /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-sm font-medium mb-3", children: "Flagged Items" }),
1743
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "overflow-x-auto border rounded-lg", children: /* @__PURE__ */ jsxRuntime.jsxs("table", { className: "w-full", children: [
1744
+ /* @__PURE__ */ jsxRuntime.jsx("thead", { className: "border-b bg-muted/50", children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
1745
+ /* @__PURE__ */ jsxRuntime.jsx("th", { className: "px-4 py-3 text-left text-sm font-medium", children: "Field" }),
1746
+ /* @__PURE__ */ jsxRuntime.jsx("th", { className: "px-4 py-3 text-left text-sm font-medium", children: "Value" }),
1747
+ /* @__PURE__ */ jsxRuntime.jsx("th", { className: "px-4 py-3 text-left text-sm font-medium", children: "Match Score" })
1748
+ ] }) }),
1749
+ /* @__PURE__ */ jsxRuntime.jsx("tbody", { children: data.flaggedItems?.map((item, index) => /* @__PURE__ */ jsxRuntime.jsxs("tr", { className: "border-b hover:bg-muted/50", children: [
1750
+ /* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-4 py-3 text-sm font-medium", children: item.field }),
1751
+ /* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-4 py-3 text-sm", children: item.value }),
1752
+ /* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-4 py-3", children: /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: parseInt(item.matchScore) > 90 ? "alert-ofac" : "outline", children: item.matchScore }) })
1753
+ ] }, index)) })
1754
+ ] }) })
1755
+ ] }),
1756
+ alert.contextData && /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsxs(
1757
+ Button,
1758
+ {
1759
+ variant: "ghost",
1760
+ className: "w-full justify-between h-auto py-3 px-4 border rounded-lg hover:bg-muted/50",
1761
+ onClick: () => setIsDialogOpen(true),
1762
+ children: [
1763
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium", children: "Detail Result" }),
1764
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "h-4 w-4" })
1765
+ ]
1766
+ }
1767
+ ) })
1768
+ ] });
1769
+ };
1770
+ const renderTransactionContext = () => {
1771
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
1772
+ /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Transaction ID", value: "TXN-12345" }),
1773
+ /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Amount", value: "$30,000.00" }),
1774
+ /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Transaction Type", value: "Wire Transfer" }),
1775
+ /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Date", value: "2025-09-30" })
1776
+ ] });
1777
+ };
1778
+ const renderFileRecordContext = () => {
1779
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
1780
+ /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "File Name", value: "wire_batch_093025.csv" }),
1781
+ /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Record Count", value: "1,234" }),
1782
+ /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Error Count", value: "3" }),
1783
+ /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Status", value: /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "alert-error", children: "Failed" }) })
1784
+ ] });
1785
+ };
1786
+ const renderProductContext = () => {
1787
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
1788
+ /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Product ID", value: "PROD-2787" }),
1789
+ /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Product Name", value: "Business Checking Account" }),
1790
+ /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Status", value: "Pending Deactivation" }),
1791
+ /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Reason", value: "Compliance review required" })
1792
+ ] });
1793
+ };
1794
+ const getContextTitle = () => {
1795
+ switch (alert.contextType) {
1796
+ case "Ofac":
1797
+ return "OFAC Context";
1798
+ case "Transaction":
1799
+ return "Transaction Context";
1800
+ case "File Record":
1801
+ return "File Processing Context";
1802
+ case "Product":
1803
+ return "Product Context";
1804
+ default:
1805
+ return "Context Information";
1635
1806
  }
1636
- )
1637
- );
1638
- Separator.displayName = SeparatorPrimitive__namespace.Root.displayName;
1639
- var Sheet = DialogPrimitive__namespace.Root;
1640
- var SheetTrigger = DialogPrimitive__namespace.Trigger;
1641
- var SheetClose = DialogPrimitive__namespace.Close;
1642
- var SheetPortal = DialogPrimitive__namespace.Portal;
1643
- var SheetOverlay = React13__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
1644
- DialogPrimitive__namespace.Overlay,
1645
- {
1646
- className: cn(
1647
- "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",
1648
- className
1649
- ),
1650
- ...props,
1651
- ref
1652
- }
1653
- ));
1654
- SheetOverlay.displayName = DialogPrimitive__namespace.Overlay.displayName;
1655
- var sheetVariants = classVarianceAuthority.cva(
1656
- "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",
1657
- {
1658
- variants: {
1659
- side: {
1660
- top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
1661
- bottom: "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
1807
+ };
1808
+ const renderContext = () => {
1809
+ switch (alert.contextType) {
1810
+ case "Ofac":
1811
+ return renderOFACContext();
1812
+ case "Transaction":
1813
+ return renderTransactionContext();
1814
+ case "File Record":
1815
+ return renderFileRecordContext();
1816
+ case "Product":
1817
+ return renderProductContext();
1818
+ default:
1819
+ return /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: "No additional context available" });
1820
+ }
1821
+ };
1822
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1823
+ /* @__PURE__ */ jsxRuntime.jsx(FormCard, { title: getContextTitle(), children: renderContext() }),
1824
+ /* @__PURE__ */ jsxRuntime.jsx(Dialog, { open: isDialogOpen, onOpenChange: setIsDialogOpen, children: /* @__PURE__ */ jsxRuntime.jsxs(DialogContent, { className: "max-w-4xl", children: [
1825
+ /* @__PURE__ */ jsxRuntime.jsx(DialogHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs(DialogTitle, { children: [
1826
+ getContextTitle(),
1827
+ " - Detail Result"
1828
+ ] }) }),
1829
+ /* @__PURE__ */ jsxRuntime.jsx(JsonViewer, { data: alert.contextData })
1830
+ ] }) })
1831
+ ] });
1832
+ };
1833
+ var FormProvider = ({
1834
+ form,
1835
+ children
1836
+ }) => {
1837
+ return /* @__PURE__ */ jsxRuntime.jsx(reactHookForm.FormProvider, { ...form, children });
1838
+ };
1839
+ var FormInput = ({
1840
+ name,
1841
+ ...props
1842
+ }) => {
1843
+ const { control, formState } = reactHookForm.useFormContext();
1844
+ const error = formState.errors[name]?.message;
1845
+ return /* @__PURE__ */ jsxRuntime.jsx(
1846
+ reactHookForm.Controller,
1847
+ {
1848
+ name,
1849
+ control,
1850
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsx(
1851
+ EnhancedInput,
1852
+ {
1853
+ ...props,
1854
+ ...field,
1855
+ error
1856
+ }
1857
+ )
1858
+ }
1859
+ );
1860
+ };
1861
+ var FormSelect = ({
1862
+ name,
1863
+ ...props
1864
+ }) => {
1865
+ const { control, formState } = reactHookForm.useFormContext();
1866
+ const error = formState.errors[name]?.message;
1867
+ return /* @__PURE__ */ jsxRuntime.jsx(
1868
+ reactHookForm.Controller,
1869
+ {
1870
+ name,
1871
+ control,
1872
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsx(
1873
+ EnhancedSelect,
1874
+ {
1875
+ ...props,
1876
+ value: field.value,
1877
+ onValueChange: field.onChange,
1878
+ error
1879
+ }
1880
+ )
1881
+ }
1882
+ );
1883
+ };
1884
+ var useFormWithEditState = ({
1885
+ schema,
1886
+ initialEditing = false,
1887
+ onToggleEdit,
1888
+ onSave,
1889
+ onCancel,
1890
+ ...formProps
1891
+ }) => {
1892
+ const [localEditing, setLocalEditing] = React15.useState(initialEditing);
1893
+ const [isLoading, setIsLoading] = React15.useState(false);
1894
+ const form = reactHookForm.useForm({
1895
+ ...formProps,
1896
+ resolver: schema ? zod$1.zodResolver(schema) : void 0
1897
+ });
1898
+ const { formState, reset, setError } = form;
1899
+ const { isValid, isDirty } = formState;
1900
+ React15.useEffect(() => {
1901
+ setLocalEditing(initialEditing);
1902
+ }, [initialEditing]);
1903
+ const isEditing = onToggleEdit !== void 0 ? initialEditing : localEditing;
1904
+ const handleToggleEdit = React15.useCallback(() => {
1905
+ if (onToggleEdit) {
1906
+ onToggleEdit();
1907
+ } else {
1908
+ setLocalEditing((prev) => !prev);
1909
+ }
1910
+ }, [onToggleEdit]);
1911
+ const handleSave = React15.useCallback(async () => {
1912
+ if (!isValid) return;
1913
+ setIsLoading(true);
1914
+ try {
1915
+ const data = form.getValues();
1916
+ if (onSave) {
1917
+ await onSave(data);
1918
+ }
1919
+ if (onToggleEdit) {
1920
+ onToggleEdit();
1921
+ } else {
1922
+ setLocalEditing(false);
1923
+ }
1924
+ } catch (error) {
1925
+ console.error("Form save error:", error);
1926
+ } finally {
1927
+ setIsLoading(false);
1928
+ }
1929
+ }, [form, isValid, onSave, onToggleEdit]);
1930
+ const handleCancel = React15.useCallback(() => {
1931
+ reset();
1932
+ if (onCancel) {
1933
+ onCancel();
1934
+ }
1935
+ if (onToggleEdit) {
1936
+ onToggleEdit();
1937
+ } else {
1938
+ setLocalEditing(false);
1939
+ }
1940
+ }, [reset, onCancel, onToggleEdit]);
1941
+ const setFieldError = React15.useCallback((field, error) => {
1942
+ setError(field, { type: "manual", message: error });
1943
+ }, [setError]);
1944
+ return {
1945
+ ...form,
1946
+ isEditing,
1947
+ isLoading,
1948
+ handleToggleEdit,
1949
+ handleSave,
1950
+ handleCancel,
1951
+ isFormValid: isValid,
1952
+ isDirty,
1953
+ setFieldError
1954
+ };
1955
+ };
1956
+ var resolveAlertSchema = zod.z.object({
1957
+ action: zod.z.enum(["APPROVE", "DECLINE", "CLOSE"], {
1958
+ required_error: "Please select an action"
1959
+ }),
1960
+ changeToAccount: zod.z.string().optional(),
1961
+ note: zod.z.string().min(1, "Note is required").max(1e3, "Note must be less than 1000 characters"),
1962
+ returnCode: zod.z.string().optional()
1963
+ }).refine((data) => {
1964
+ if (data.action === "DECLINE" && !data.returnCode) {
1965
+ return false;
1966
+ }
1967
+ return true;
1968
+ }, {
1969
+ message: "Return code is required when declining",
1970
+ path: ["returnCode"]
1971
+ });
1972
+ var RETURN_CODES = [
1973
+ { value: "R03_NO_ACCOUNT", label: "R03 - No Account/Unable to Locate Account" },
1974
+ { value: "R01_INSUFFICIENT_FUNDS", label: "R01 - Insufficient Funds" },
1975
+ { value: "R02_ACCOUNT_CLOSED", label: "R02 - Account Closed" },
1976
+ { value: "R04_INVALID_ACCOUNT", label: "R04 - Invalid Account Number" },
1977
+ { value: "R10_UNAUTHORIZED", label: "R10 - Customer Advises Unauthorized" },
1978
+ { value: "R07_AUTHORIZATION_REVOKED", label: "R07 - Authorization Revoked" },
1979
+ { value: "R08_PAYMENT_STOPPED", label: "R08 - Payment Stopped" },
1980
+ { value: "R09_UNCOLLECTED_FUNDS", label: "R09 - Uncollected Funds" }
1981
+ ];
1982
+ var ResolveAlertDialog = ({
1983
+ alertId,
1984
+ open,
1985
+ onOpenChange,
1986
+ onResolve
1987
+ }) => {
1988
+ const form = useFormWithEditState({
1989
+ schema: resolveAlertSchema,
1990
+ defaultValues: {
1991
+ action: "APPROVE",
1992
+ changeToAccount: "",
1993
+ note: "",
1994
+ returnCode: ""
1995
+ }
1996
+ });
1997
+ const { handleSubmit, watch, control, formState } = form;
1998
+ const action = watch("action");
1999
+ const onSubmit = async (data) => {
2000
+ try {
2001
+ await onResolve(data);
2002
+ toast({
2003
+ title: "Alert Resolved",
2004
+ description: `Alert #${alertId} has been ${data.action.toLowerCase()}d successfully.`
2005
+ });
2006
+ onOpenChange(false);
2007
+ form.reset();
2008
+ } catch (error) {
2009
+ toast({
2010
+ title: "Error",
2011
+ description: "Failed to resolve alert. Please try again.",
2012
+ variant: "destructive"
2013
+ });
2014
+ }
2015
+ };
2016
+ return /* @__PURE__ */ jsxRuntime.jsx(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxRuntime.jsxs(DialogContent, { className: "sm:max-w-[600px]", children: [
2017
+ /* @__PURE__ */ jsxRuntime.jsxs(DialogHeader, { children: [
2018
+ /* @__PURE__ */ jsxRuntime.jsxs(DialogTitle, { children: [
2019
+ "Resolve Alert #",
2020
+ alertId
2021
+ ] }),
2022
+ /* @__PURE__ */ jsxRuntime.jsx(DialogDescription, { children: "Select an action and provide details to resolve this alert." })
2023
+ ] }),
2024
+ /* @__PURE__ */ jsxRuntime.jsx(FormProvider, { form, children: /* @__PURE__ */ jsxRuntime.jsxs("form", { onSubmit: handleSubmit(onSubmit), className: "space-y-4", children: [
2025
+ /* @__PURE__ */ jsxRuntime.jsx(
2026
+ FormSelect,
2027
+ {
2028
+ name: "action",
2029
+ label: "Action",
2030
+ placeholder: "Select action",
2031
+ options: [
2032
+ { value: "APPROVE", label: "Approve" },
2033
+ { value: "DECLINE", label: "Decline" },
2034
+ { value: "CLOSE", label: "Close" }
2035
+ ]
2036
+ }
2037
+ ),
2038
+ /* @__PURE__ */ jsxRuntime.jsx(
2039
+ FormInput,
2040
+ {
2041
+ name: "changeToAccount",
2042
+ label: "Change to Account (Optional)",
2043
+ placeholder: "Enter account number"
2044
+ }
2045
+ ),
2046
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
2047
+ /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "text-sm font-medium text-foreground", children: [
2048
+ "Note ",
2049
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-destructive", children: "*" })
2050
+ ] }),
2051
+ /* @__PURE__ */ jsxRuntime.jsx(
2052
+ reactHookForm.Controller,
2053
+ {
2054
+ name: "note",
2055
+ control,
2056
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsx(
2057
+ EnhancedTextarea,
2058
+ {
2059
+ ...field,
2060
+ placeholder: "Enter resolution notes...",
2061
+ rows: 4,
2062
+ error: formState.errors.note?.message
2063
+ }
2064
+ )
2065
+ }
2066
+ )
2067
+ ] }),
2068
+ action === "DECLINE" && /* @__PURE__ */ jsxRuntime.jsx(
2069
+ FormSelect,
2070
+ {
2071
+ name: "returnCode",
2072
+ label: "Return Code",
2073
+ placeholder: "Select return code",
2074
+ options: RETURN_CODES.map((code) => ({
2075
+ value: code.value,
2076
+ label: code.label
2077
+ }))
2078
+ }
2079
+ ),
2080
+ /* @__PURE__ */ jsxRuntime.jsxs(DialogFooter, { children: [
2081
+ /* @__PURE__ */ jsxRuntime.jsx(
2082
+ Button,
2083
+ {
2084
+ type: "button",
2085
+ variant: "outline",
2086
+ onClick: () => {
2087
+ onOpenChange(false);
2088
+ form.reset();
2089
+ },
2090
+ children: "Cancel"
2091
+ }
2092
+ ),
2093
+ /* @__PURE__ */ jsxRuntime.jsx(
2094
+ Button,
2095
+ {
2096
+ type: "submit",
2097
+ disabled: !formState.isValid || formState.isSubmitting,
2098
+ children: formState.isSubmitting ? "Submitting..." : "Resolve"
2099
+ }
2100
+ )
2101
+ ] })
2102
+ ] }) })
2103
+ ] }) });
2104
+ };
2105
+
2106
+ // src/assets/braid-logo.png
2107
+ var braid_logo_default = "./braid-logo-343BOQZ2.png";
2108
+ var MOBILE_BREAKPOINT = 768;
2109
+ function useIsMobile() {
2110
+ const [isMobile, setIsMobile] = React15__namespace.useState(void 0);
2111
+ React15__namespace.useEffect(() => {
2112
+ const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
2113
+ const onChange = () => {
2114
+ setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
2115
+ };
2116
+ mql.addEventListener("change", onChange);
2117
+ setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
2118
+ return () => mql.removeEventListener("change", onChange);
2119
+ }, []);
2120
+ return !!isMobile;
2121
+ }
2122
+ var Separator = React15__namespace.forwardRef(
2123
+ ({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
2124
+ SeparatorPrimitive__namespace.Root,
2125
+ {
2126
+ ref,
2127
+ decorative,
2128
+ orientation,
2129
+ className: cn(
2130
+ "shrink-0 bg-border",
2131
+ orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
2132
+ className
2133
+ ),
2134
+ ...props
2135
+ }
2136
+ )
2137
+ );
2138
+ Separator.displayName = SeparatorPrimitive__namespace.Root.displayName;
2139
+ var Sheet = DialogPrimitive__namespace.Root;
2140
+ var SheetTrigger = DialogPrimitive__namespace.Trigger;
2141
+ var SheetClose = DialogPrimitive__namespace.Close;
2142
+ var SheetPortal = DialogPrimitive__namespace.Portal;
2143
+ var SheetOverlay = React15__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
2144
+ DialogPrimitive__namespace.Overlay,
2145
+ {
2146
+ className: cn(
2147
+ "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",
2148
+ className
2149
+ ),
2150
+ ...props,
2151
+ ref
2152
+ }
2153
+ ));
2154
+ SheetOverlay.displayName = DialogPrimitive__namespace.Overlay.displayName;
2155
+ var sheetVariants = classVarianceAuthority.cva(
2156
+ "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",
2157
+ {
2158
+ variants: {
2159
+ side: {
2160
+ top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
2161
+ bottom: "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
1662
2162
  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",
1663
2163
  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"
1664
2164
  }
@@ -1668,7 +2168,7 @@ var sheetVariants = classVarianceAuthority.cva(
1668
2168
  }
1669
2169
  }
1670
2170
  );
1671
- var SheetContent = React13__namespace.forwardRef(({ side = "right", className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(SheetPortal, { children: [
2171
+ var SheetContent = React15__namespace.forwardRef(({ side = "right", className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(SheetPortal, { children: [
1672
2172
  /* @__PURE__ */ jsxRuntime.jsx(SheetOverlay, {}),
1673
2173
  /* @__PURE__ */ jsxRuntime.jsxs(
1674
2174
  DialogPrimitive__namespace.Content,
@@ -1715,7 +2215,7 @@ var SheetFooter = ({
1715
2215
  }
1716
2216
  );
1717
2217
  SheetFooter.displayName = "SheetFooter";
1718
- var SheetTitle = React13__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
2218
+ var SheetTitle = React15__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
1719
2219
  DialogPrimitive__namespace.Title,
1720
2220
  {
1721
2221
  ref,
@@ -1724,7 +2224,7 @@ var SheetTitle = React13__namespace.forwardRef(({ className, ...props }, ref) =>
1724
2224
  }
1725
2225
  ));
1726
2226
  SheetTitle.displayName = DialogPrimitive__namespace.Title.displayName;
1727
- var SheetDescription = React13__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
2227
+ var SheetDescription = React15__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
1728
2228
  DialogPrimitive__namespace.Description,
1729
2229
  {
1730
2230
  ref,
@@ -1736,7 +2236,7 @@ SheetDescription.displayName = DialogPrimitive__namespace.Description.displayNam
1736
2236
  var TooltipProvider = TooltipPrimitive__namespace.Provider;
1737
2237
  var Tooltip = TooltipPrimitive__namespace.Root;
1738
2238
  var TooltipTrigger = TooltipPrimitive__namespace.Trigger;
1739
- var TooltipContent = React13__namespace.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
2239
+ var TooltipContent = React15__namespace.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
1740
2240
  TooltipPrimitive__namespace.Content,
1741
2241
  {
1742
2242
  ref,
@@ -1755,15 +2255,15 @@ var SIDEBAR_WIDTH = "15rem";
1755
2255
  var SIDEBAR_WIDTH_MOBILE = "18rem";
1756
2256
  var SIDEBAR_WIDTH_ICON = "3rem";
1757
2257
  var SIDEBAR_KEYBOARD_SHORTCUT = "b";
1758
- var SidebarContext = React13__namespace.createContext(null);
2258
+ var SidebarContext = React15__namespace.createContext(null);
1759
2259
  function useSidebar() {
1760
- const context = React13__namespace.useContext(SidebarContext);
2260
+ const context = React15__namespace.useContext(SidebarContext);
1761
2261
  if (!context) {
1762
2262
  throw new Error("useSidebar must be used within a SidebarProvider.");
1763
2263
  }
1764
2264
  return context;
1765
2265
  }
1766
- var SidebarProvider = React13__namespace.forwardRef(
2266
+ var SidebarProvider = React15__namespace.forwardRef(
1767
2267
  ({
1768
2268
  defaultOpen = true,
1769
2269
  open: openProp,
@@ -1774,10 +2274,10 @@ var SidebarProvider = React13__namespace.forwardRef(
1774
2274
  ...props
1775
2275
  }, ref) => {
1776
2276
  const isMobile = useIsMobile();
1777
- const [openMobile, setOpenMobile] = React13__namespace.useState(false);
1778
- const [_open, _setOpen] = React13__namespace.useState(defaultOpen);
2277
+ const [openMobile, setOpenMobile] = React15__namespace.useState(false);
2278
+ const [_open, _setOpen] = React15__namespace.useState(defaultOpen);
1779
2279
  const open = openProp ?? _open;
1780
- const setOpen = React13__namespace.useCallback(
2280
+ const setOpen = React15__namespace.useCallback(
1781
2281
  (value) => {
1782
2282
  const openState = typeof value === "function" ? value(open) : value;
1783
2283
  if (setOpenProp) {
@@ -1789,10 +2289,10 @@ var SidebarProvider = React13__namespace.forwardRef(
1789
2289
  },
1790
2290
  [setOpenProp, open]
1791
2291
  );
1792
- const toggleSidebar = React13__namespace.useCallback(() => {
2292
+ const toggleSidebar = React15__namespace.useCallback(() => {
1793
2293
  return isMobile ? setOpenMobile((open2) => !open2) : setOpen((open2) => !open2);
1794
2294
  }, [isMobile, setOpen, setOpenMobile]);
1795
- React13__namespace.useEffect(() => {
2295
+ React15__namespace.useEffect(() => {
1796
2296
  const handleKeyDown = (event) => {
1797
2297
  if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
1798
2298
  event.preventDefault();
@@ -1803,7 +2303,7 @@ var SidebarProvider = React13__namespace.forwardRef(
1803
2303
  return () => window.removeEventListener("keydown", handleKeyDown);
1804
2304
  }, [toggleSidebar]);
1805
2305
  const state = open ? "expanded" : "collapsed";
1806
- const contextValue = React13__namespace.useMemo(
2306
+ const contextValue = React15__namespace.useMemo(
1807
2307
  () => ({
1808
2308
  state,
1809
2309
  open,
@@ -1835,7 +2335,7 @@ var SidebarProvider = React13__namespace.forwardRef(
1835
2335
  }
1836
2336
  );
1837
2337
  SidebarProvider.displayName = "SidebarProvider";
1838
- var Sidebar = React13__namespace.forwardRef(
2338
+ var Sidebar = React15__namespace.forwardRef(
1839
2339
  ({
1840
2340
  side = "left",
1841
2341
  variant = "sidebar",
@@ -1922,7 +2422,7 @@ var Sidebar = React13__namespace.forwardRef(
1922
2422
  }
1923
2423
  );
1924
2424
  Sidebar.displayName = "Sidebar";
1925
- var SidebarTrigger = React13__namespace.forwardRef(({ className, onClick, ...props }, ref) => {
2425
+ var SidebarTrigger = React15__namespace.forwardRef(({ className, onClick, ...props }, ref) => {
1926
2426
  const { toggleSidebar } = useSidebar();
1927
2427
  return /* @__PURE__ */ jsxRuntime.jsxs(
1928
2428
  Button,
@@ -1945,7 +2445,7 @@ var SidebarTrigger = React13__namespace.forwardRef(({ className, onClick, ...pro
1945
2445
  );
1946
2446
  });
1947
2447
  SidebarTrigger.displayName = "SidebarTrigger";
1948
- var SidebarRail = React13__namespace.forwardRef(({ className, ...props }, ref) => {
2448
+ var SidebarRail = React15__namespace.forwardRef(({ className, ...props }, ref) => {
1949
2449
  const { toggleSidebar } = useSidebar();
1950
2450
  return /* @__PURE__ */ jsxRuntime.jsx(
1951
2451
  "button",
@@ -1970,7 +2470,7 @@ var SidebarRail = React13__namespace.forwardRef(({ className, ...props }, ref) =
1970
2470
  );
1971
2471
  });
1972
2472
  SidebarRail.displayName = "SidebarRail";
1973
- var SidebarInset = React13__namespace.forwardRef(({ className, ...props }, ref) => {
2473
+ var SidebarInset = React15__namespace.forwardRef(({ className, ...props }, ref) => {
1974
2474
  return /* @__PURE__ */ jsxRuntime.jsx(
1975
2475
  "main",
1976
2476
  {
@@ -1985,7 +2485,7 @@ var SidebarInset = React13__namespace.forwardRef(({ className, ...props }, ref)
1985
2485
  );
1986
2486
  });
1987
2487
  SidebarInset.displayName = "SidebarInset";
1988
- var SidebarInput = React13__namespace.forwardRef(({ className, ...props }, ref) => {
2488
+ var SidebarInput = React15__namespace.forwardRef(({ className, ...props }, ref) => {
1989
2489
  return /* @__PURE__ */ jsxRuntime.jsx(
1990
2490
  "input",
1991
2491
  {
@@ -2000,7 +2500,7 @@ var SidebarInput = React13__namespace.forwardRef(({ className, ...props }, ref)
2000
2500
  );
2001
2501
  });
2002
2502
  SidebarInput.displayName = "SidebarInput";
2003
- var SidebarHeader = React13__namespace.forwardRef(({ className, ...props }, ref) => {
2503
+ var SidebarHeader = React15__namespace.forwardRef(({ className, ...props }, ref) => {
2004
2504
  return /* @__PURE__ */ jsxRuntime.jsx(
2005
2505
  "div",
2006
2506
  {
@@ -2012,7 +2512,7 @@ var SidebarHeader = React13__namespace.forwardRef(({ className, ...props }, ref)
2012
2512
  );
2013
2513
  });
2014
2514
  SidebarHeader.displayName = "SidebarHeader";
2015
- var SidebarFooter = React13__namespace.forwardRef(({ className, ...props }, ref) => {
2515
+ var SidebarFooter = React15__namespace.forwardRef(({ className, ...props }, ref) => {
2016
2516
  return /* @__PURE__ */ jsxRuntime.jsx(
2017
2517
  "div",
2018
2518
  {
@@ -2024,7 +2524,7 @@ var SidebarFooter = React13__namespace.forwardRef(({ className, ...props }, ref)
2024
2524
  );
2025
2525
  });
2026
2526
  SidebarFooter.displayName = "SidebarFooter";
2027
- var SidebarSeparator = React13__namespace.forwardRef(({ className, ...props }, ref) => {
2527
+ var SidebarSeparator = React15__namespace.forwardRef(({ className, ...props }, ref) => {
2028
2528
  return /* @__PURE__ */ jsxRuntime.jsx(
2029
2529
  Separator,
2030
2530
  {
@@ -2036,7 +2536,7 @@ var SidebarSeparator = React13__namespace.forwardRef(({ className, ...props }, r
2036
2536
  );
2037
2537
  });
2038
2538
  SidebarSeparator.displayName = "SidebarSeparator";
2039
- var SidebarContent = React13__namespace.forwardRef(({ className, ...props }, ref) => {
2539
+ var SidebarContent = React15__namespace.forwardRef(({ className, ...props }, ref) => {
2040
2540
  return /* @__PURE__ */ jsxRuntime.jsx(
2041
2541
  "div",
2042
2542
  {
@@ -2051,7 +2551,7 @@ var SidebarContent = React13__namespace.forwardRef(({ className, ...props }, ref
2051
2551
  );
2052
2552
  });
2053
2553
  SidebarContent.displayName = "SidebarContent";
2054
- var SidebarGroup = React13__namespace.forwardRef(({ className, ...props }, ref) => {
2554
+ var SidebarGroup = React15__namespace.forwardRef(({ className, ...props }, ref) => {
2055
2555
  return /* @__PURE__ */ jsxRuntime.jsx(
2056
2556
  "div",
2057
2557
  {
@@ -2063,7 +2563,7 @@ var SidebarGroup = React13__namespace.forwardRef(({ className, ...props }, ref)
2063
2563
  );
2064
2564
  });
2065
2565
  SidebarGroup.displayName = "SidebarGroup";
2066
- var SidebarGroupLabel = React13__namespace.forwardRef(({ className, asChild = false, ...props }, ref) => {
2566
+ var SidebarGroupLabel = React15__namespace.forwardRef(({ className, asChild = false, ...props }, ref) => {
2067
2567
  const Comp = asChild ? reactSlot.Slot : "div";
2068
2568
  return /* @__PURE__ */ jsxRuntime.jsx(
2069
2569
  Comp,
@@ -2080,7 +2580,7 @@ var SidebarGroupLabel = React13__namespace.forwardRef(({ className, asChild = fa
2080
2580
  );
2081
2581
  });
2082
2582
  SidebarGroupLabel.displayName = "SidebarGroupLabel";
2083
- var SidebarGroupAction = React13__namespace.forwardRef(({ className, asChild = false, ...props }, ref) => {
2583
+ var SidebarGroupAction = React15__namespace.forwardRef(({ className, asChild = false, ...props }, ref) => {
2084
2584
  const Comp = asChild ? reactSlot.Slot : "button";
2085
2585
  return /* @__PURE__ */ jsxRuntime.jsx(
2086
2586
  Comp,
@@ -2099,7 +2599,7 @@ var SidebarGroupAction = React13__namespace.forwardRef(({ className, asChild = f
2099
2599
  );
2100
2600
  });
2101
2601
  SidebarGroupAction.displayName = "SidebarGroupAction";
2102
- var SidebarGroupContent = React13__namespace.forwardRef(({ className, ...props }, ref) => {
2602
+ var SidebarGroupContent = React15__namespace.forwardRef(({ className, ...props }, ref) => {
2103
2603
  return /* @__PURE__ */ jsxRuntime.jsx(
2104
2604
  "div",
2105
2605
  {
@@ -2111,7 +2611,7 @@ var SidebarGroupContent = React13__namespace.forwardRef(({ className, ...props }
2111
2611
  );
2112
2612
  });
2113
2613
  SidebarGroupContent.displayName = "SidebarGroupContent";
2114
- var SidebarMenu = React13__namespace.forwardRef(({ className, ...props }, ref) => {
2614
+ var SidebarMenu = React15__namespace.forwardRef(({ className, ...props }, ref) => {
2115
2615
  return /* @__PURE__ */ jsxRuntime.jsx(
2116
2616
  "ul",
2117
2617
  {
@@ -2123,7 +2623,7 @@ var SidebarMenu = React13__namespace.forwardRef(({ className, ...props }, ref) =
2123
2623
  );
2124
2624
  });
2125
2625
  SidebarMenu.displayName = "SidebarMenu";
2126
- var SidebarMenuItem = React13__namespace.forwardRef(({ className, ...props }, ref) => {
2626
+ var SidebarMenuItem = React15__namespace.forwardRef(({ className, ...props }, ref) => {
2127
2627
  return /* @__PURE__ */ jsxRuntime.jsx(
2128
2628
  "li",
2129
2629
  {
@@ -2155,7 +2655,7 @@ var sidebarMenuButtonVariants = classVarianceAuthority.cva(
2155
2655
  }
2156
2656
  }
2157
2657
  );
2158
- var SidebarMenuButton = React13__namespace.forwardRef(
2658
+ var SidebarMenuButton = React15__namespace.forwardRef(
2159
2659
  ({
2160
2660
  asChild = false,
2161
2661
  isActive = false,
@@ -2201,7 +2701,7 @@ var SidebarMenuButton = React13__namespace.forwardRef(
2201
2701
  }
2202
2702
  );
2203
2703
  SidebarMenuButton.displayName = "SidebarMenuButton";
2204
- var SidebarMenuAction = React13__namespace.forwardRef(({ className, asChild = false, showOnHover = false, ...props }, ref) => {
2704
+ var SidebarMenuAction = React15__namespace.forwardRef(({ className, asChild = false, showOnHover = false, ...props }, ref) => {
2205
2705
  const Comp = asChild ? reactSlot.Slot : "button";
2206
2706
  return /* @__PURE__ */ jsxRuntime.jsx(
2207
2707
  Comp,
@@ -2224,7 +2724,7 @@ var SidebarMenuAction = React13__namespace.forwardRef(({ className, asChild = fa
2224
2724
  );
2225
2725
  });
2226
2726
  SidebarMenuAction.displayName = "SidebarMenuAction";
2227
- var SidebarMenuBadge = React13__namespace.forwardRef(({ className, ...props }, ref) => {
2727
+ var SidebarMenuBadge = React15__namespace.forwardRef(({ className, ...props }, ref) => {
2228
2728
  return /* @__PURE__ */ jsxRuntime.jsx(
2229
2729
  "div",
2230
2730
  {
@@ -2244,8 +2744,8 @@ var SidebarMenuBadge = React13__namespace.forwardRef(({ className, ...props }, r
2244
2744
  );
2245
2745
  });
2246
2746
  SidebarMenuBadge.displayName = "SidebarMenuBadge";
2247
- var SidebarMenuSkeleton = React13__namespace.forwardRef(({ className, showIcon = false, ...props }, ref) => {
2248
- const width = React13__namespace.useMemo(() => {
2747
+ var SidebarMenuSkeleton = React15__namespace.forwardRef(({ className, showIcon = false, ...props }, ref) => {
2748
+ const width = React15__namespace.useMemo(() => {
2249
2749
  return `${Math.floor(Math.random() * 40) + 50}%`;
2250
2750
  }, []);
2251
2751
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -2271,7 +2771,7 @@ var SidebarMenuSkeleton = React13__namespace.forwardRef(({ className, showIcon =
2271
2771
  );
2272
2772
  });
2273
2773
  SidebarMenuSkeleton.displayName = "SidebarMenuSkeleton";
2274
- var SidebarMenuSub = React13__namespace.forwardRef(({ className, ...props }, ref) => {
2774
+ var SidebarMenuSub = React15__namespace.forwardRef(({ className, ...props }, ref) => {
2275
2775
  return /* @__PURE__ */ jsxRuntime.jsx(
2276
2776
  "ul",
2277
2777
  {
@@ -2287,11 +2787,11 @@ var SidebarMenuSub = React13__namespace.forwardRef(({ className, ...props }, ref
2287
2787
  );
2288
2788
  });
2289
2789
  SidebarMenuSub.displayName = "SidebarMenuSub";
2290
- var SidebarMenuSubItem = React13__namespace.forwardRef(({ ...props }, ref) => {
2790
+ var SidebarMenuSubItem = React15__namespace.forwardRef(({ ...props }, ref) => {
2291
2791
  return /* @__PURE__ */ jsxRuntime.jsx("li", { ref, ...props });
2292
2792
  });
2293
2793
  SidebarMenuSubItem.displayName = "SidebarMenuSubItem";
2294
- var SidebarMenuSubButton = React13__namespace.forwardRef(({ asChild = false, size = "md", isActive, className, ...props }, ref) => {
2794
+ var SidebarMenuSubButton = React15__namespace.forwardRef(({ asChild = false, size = "md", isActive, className, ...props }, ref) => {
2295
2795
  const Comp = asChild ? reactSlot.Slot : "a";
2296
2796
  return /* @__PURE__ */ jsxRuntime.jsx(
2297
2797
  Comp,
@@ -2524,7 +3024,7 @@ function AppSidebar() {
2524
3024
  const { state } = useSidebar();
2525
3025
  const location = reactRouterDom.useLocation();
2526
3026
  const currentPath = location.pathname;
2527
- const [openItems, setOpenItems] = React13.useState([]);
3027
+ const [openItems, setOpenItems] = React15.useState([]);
2528
3028
  const isActive = (path) => currentPath === path;
2529
3029
  const toggleItem = (title) => {
2530
3030
  setOpenItems(
@@ -2597,20 +3097,20 @@ var MainLayout = ({ children }) => {
2597
3097
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex min-h-screen w-full", children: /* @__PURE__ */ jsxRuntime.jsx("main", { className: "flex-1 pl-4", children }) });
2598
3098
  };
2599
3099
  var useEditState = ({ initialEditing = false, onToggleEdit, onSave, onCancel }) => {
2600
- const [localEditing, setLocalEditing] = React13.useState(initialEditing);
2601
- const [isLoading, setIsLoading] = React13.useState(false);
2602
- React13.useEffect(() => {
3100
+ const [localEditing, setLocalEditing] = React15.useState(initialEditing);
3101
+ const [isLoading, setIsLoading] = React15.useState(false);
3102
+ React15.useEffect(() => {
2603
3103
  setLocalEditing(initialEditing);
2604
3104
  }, [initialEditing]);
2605
3105
  const isEditing = onToggleEdit !== void 0 ? initialEditing : localEditing;
2606
- const handleToggleEdit = React13.useCallback(() => {
3106
+ const handleToggleEdit = React15.useCallback(() => {
2607
3107
  if (onToggleEdit) {
2608
3108
  onToggleEdit();
2609
3109
  } else {
2610
3110
  setLocalEditing((prev) => !prev);
2611
3111
  }
2612
3112
  }, [onToggleEdit]);
2613
- const handleSave = React13.useCallback(async () => {
3113
+ const handleSave = React15.useCallback(async () => {
2614
3114
  setIsLoading(true);
2615
3115
  try {
2616
3116
  if (onSave) {
@@ -2627,7 +3127,7 @@ var useEditState = ({ initialEditing = false, onToggleEdit, onSave, onCancel })
2627
3127
  setIsLoading(false);
2628
3128
  }
2629
3129
  }, [onSave, onToggleEdit]);
2630
- const handleCancel = React13.useCallback(() => {
3130
+ const handleCancel = React15.useCallback(() => {
2631
3131
  if (onCancel) {
2632
3132
  onCancel();
2633
3133
  }
@@ -2645,7 +3145,7 @@ var useEditState = ({ initialEditing = false, onToggleEdit, onSave, onCancel })
2645
3145
  handleCancel
2646
3146
  };
2647
3147
  };
2648
- var EditableFormCard = React13__namespace.forwardRef(
3148
+ var EditableFormCard = React15__namespace.forwardRef(
2649
3149
  ({
2650
3150
  title,
2651
3151
  description,
@@ -2711,110 +3211,10 @@ var EditableFormCard = React13__namespace.forwardRef(
2711
3211
  ...props,
2712
3212
  children: currentlyEditing ? editContent : viewContent
2713
3213
  }
2714
- );
2715
- }
2716
- );
2717
- EditableFormCard.displayName = "EditableFormCard";
2718
- var FormProvider = ({
2719
- form,
2720
- children
2721
- }) => {
2722
- return /* @__PURE__ */ jsxRuntime.jsx(reactHookForm.FormProvider, { ...form, children });
2723
- };
2724
- var FormInput = ({
2725
- name,
2726
- ...props
2727
- }) => {
2728
- const { control, formState } = reactHookForm.useFormContext();
2729
- const error = formState.errors[name]?.message;
2730
- return /* @__PURE__ */ jsxRuntime.jsx(
2731
- reactHookForm.Controller,
2732
- {
2733
- name,
2734
- control,
2735
- render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsx(
2736
- EnhancedInput,
2737
- {
2738
- ...props,
2739
- ...field,
2740
- error
2741
- }
2742
- )
2743
- }
2744
- );
2745
- };
2746
- var useFormWithEditState = ({
2747
- schema,
2748
- initialEditing = false,
2749
- onToggleEdit,
2750
- onSave,
2751
- onCancel,
2752
- ...formProps
2753
- }) => {
2754
- const [localEditing, setLocalEditing] = React13.useState(initialEditing);
2755
- const [isLoading, setIsLoading] = React13.useState(false);
2756
- const form = reactHookForm.useForm({
2757
- ...formProps,
2758
- resolver: schema ? zod$1.zodResolver(schema) : void 0
2759
- });
2760
- const { formState, reset, setError } = form;
2761
- const { isValid, isDirty } = formState;
2762
- React13.useEffect(() => {
2763
- setLocalEditing(initialEditing);
2764
- }, [initialEditing]);
2765
- const isEditing = onToggleEdit !== void 0 ? initialEditing : localEditing;
2766
- const handleToggleEdit = React13.useCallback(() => {
2767
- if (onToggleEdit) {
2768
- onToggleEdit();
2769
- } else {
2770
- setLocalEditing((prev) => !prev);
2771
- }
2772
- }, [onToggleEdit]);
2773
- const handleSave = React13.useCallback(async () => {
2774
- if (!isValid) return;
2775
- setIsLoading(true);
2776
- try {
2777
- const data = form.getValues();
2778
- if (onSave) {
2779
- await onSave(data);
2780
- }
2781
- if (onToggleEdit) {
2782
- onToggleEdit();
2783
- } else {
2784
- setLocalEditing(false);
2785
- }
2786
- } catch (error) {
2787
- console.error("Form save error:", error);
2788
- } finally {
2789
- setIsLoading(false);
2790
- }
2791
- }, [form, isValid, onSave, onToggleEdit]);
2792
- const handleCancel = React13.useCallback(() => {
2793
- reset();
2794
- if (onCancel) {
2795
- onCancel();
2796
- }
2797
- if (onToggleEdit) {
2798
- onToggleEdit();
2799
- } else {
2800
- setLocalEditing(false);
2801
- }
2802
- }, [reset, onCancel, onToggleEdit]);
2803
- const setFieldError = React13.useCallback((field, error) => {
2804
- setError(field, { type: "manual", message: error });
2805
- }, [setError]);
2806
- return {
2807
- ...form,
2808
- isEditing,
2809
- isLoading,
2810
- handleToggleEdit,
2811
- handleSave,
2812
- handleCancel,
2813
- isFormValid: isValid,
2814
- isDirty,
2815
- setFieldError
2816
- };
2817
- };
3214
+ );
3215
+ }
3216
+ );
3217
+ EditableFormCard.displayName = "EditableFormCard";
2818
3218
  var achBasicInfoSchema = zod.z.object({
2819
3219
  counterpartyName: zod.z.string().min(1, "Counterparty name is required"),
2820
3220
  shortName: zod.z.string().min(1, "Short name is required"),
@@ -2913,29 +3313,6 @@ var ACHBankCard = ({ data, onDataChange, isEditing, onToggleEdit, className, hid
2913
3313
  }
2914
3314
  );
2915
3315
  };
2916
- var FormSelect = ({
2917
- name,
2918
- ...props
2919
- }) => {
2920
- const { control, formState } = reactHookForm.useFormContext();
2921
- const error = formState.errors[name]?.message;
2922
- return /* @__PURE__ */ jsxRuntime.jsx(
2923
- reactHookForm.Controller,
2924
- {
2925
- name,
2926
- control,
2927
- render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsx(
2928
- EnhancedSelect,
2929
- {
2930
- ...props,
2931
- value: field.value,
2932
- onValueChange: field.onChange,
2933
- error
2934
- }
2935
- )
2936
- }
2937
- );
2938
- };
2939
3316
  var ACHBasicInfoCard = ({
2940
3317
  data,
2941
3318
  onDataChange,
@@ -3031,7 +3408,7 @@ var gapClasses = {
3031
3408
  lg: "gap-6",
3032
3409
  xl: "gap-8"
3033
3410
  };
3034
- var ResponsiveGrid = React13__namespace.forwardRef(
3411
+ var ResponsiveGrid = React15__namespace.forwardRef(
3035
3412
  ({ children, type = "cards", gap = "md", editMode = false, className }, ref) => {
3036
3413
  const gridClasses2 = editMode ? "grid-cols-1" : typeClasses[type];
3037
3414
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -3224,7 +3601,7 @@ var BankAddressCard = ({
3224
3601
  );
3225
3602
  };
3226
3603
  var ACHTransferSection = ({ isEditing, onToggleEdit, className, hideActions }) => {
3227
- const [achData, setAchData] = React13.useState(defaultACHTransfer);
3604
+ const [achData, setAchData] = React15.useState(defaultACHTransfer);
3228
3605
  const handleDataChange = (newData) => {
3229
3606
  setAchData(newData);
3230
3607
  };
@@ -3456,8 +3833,8 @@ var StatusBadge = ({ status, className }) => {
3456
3833
  ] });
3457
3834
  };
3458
3835
  var BasicInfoCard = ({ isEditing, onToggleEdit, className, hideActions }) => {
3459
- const [name, setName] = React13.useState("John wire hot");
3460
- const [status, setStatus] = React13.useState("ACTIVE");
3836
+ const [name, setName] = React15.useState("John wire hot");
3837
+ const [status, setStatus] = React15.useState("ACTIVE");
3461
3838
  const editContent = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
3462
3839
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
3463
3840
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -3711,8 +4088,8 @@ var columnClasses = {
3711
4088
  3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3",
3712
4089
  4: "grid-cols-1 md:grid-cols-2 lg:grid-cols-4"
3713
4090
  };
3714
- var DataGrid = React13__namespace.forwardRef(
3715
- ({ data, columns = 2, gap = "md", className }, ref) => {
4091
+ var DataGrid = React15__namespace.forwardRef(
4092
+ ({ data, columns: columns2 = 2, gap = "md", className }, ref) => {
3716
4093
  const isItemArray = data.length > 0 && "label" in data[0];
3717
4094
  if (isItemArray) {
3718
4095
  const items = data;
@@ -3722,7 +4099,7 @@ var DataGrid = React13__namespace.forwardRef(
3722
4099
  ref,
3723
4100
  className: cn(
3724
4101
  "grid",
3725
- columnClasses[columns],
4102
+ columnClasses[columns2],
3726
4103
  gapClasses2[gap],
3727
4104
  className
3728
4105
  ),
@@ -3743,7 +4120,7 @@ var DataGrid = React13__namespace.forwardRef(
3743
4120
  section.title && /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-sm font-medium text-foreground mb-2", children: section.title }),
3744
4121
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(
3745
4122
  "grid",
3746
- columnClasses[columns],
4123
+ columnClasses[columns2],
3747
4124
  gapClasses2[gap]
3748
4125
  ), children: section.items.map((item, itemIndex) => /* @__PURE__ */ jsxRuntime.jsx(
3749
4126
  InfoField,
@@ -4186,7 +4563,7 @@ var ContactInfoCard = ({ isEditing, onToggleEdit, className }) => {
4186
4563
  var labelVariants = classVarianceAuthority.cva(
4187
4564
  "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
4188
4565
  );
4189
- var Label = React13__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
4566
+ var Label = React15__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
4190
4567
  LabelPrimitive__namespace.Root,
4191
4568
  {
4192
4569
  ref,
@@ -4196,7 +4573,7 @@ var Label = React13__namespace.forwardRef(({ className, ...props }, ref) => /* @
4196
4573
  ));
4197
4574
  Label.displayName = LabelPrimitive__namespace.Root.displayName;
4198
4575
  var CounterpartyBasicInfo = ({ onDataChange }) => {
4199
- const [formData, setFormData] = React13.useState({
4576
+ const [formData, setFormData] = React15.useState({
4200
4577
  name: "",
4201
4578
  type: "business",
4202
4579
  email: "",
@@ -4307,7 +4684,7 @@ var gridClasses = {
4307
4684
  3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3",
4308
4685
  4: "grid-cols-1 md:grid-cols-2 lg:grid-cols-4"
4309
4686
  };
4310
- var FormSection = React13__namespace.forwardRef(
4687
+ var FormSection = React15__namespace.forwardRef(
4311
4688
  ({
4312
4689
  title,
4313
4690
  description,
@@ -4315,7 +4692,7 @@ var FormSection = React13__namespace.forwardRef(
4315
4692
  className,
4316
4693
  spacing: spacing2 = "md",
4317
4694
  layout = "vertical",
4318
- columns = 2
4695
+ columns: columns2 = 2
4319
4696
  }, ref) => {
4320
4697
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: cn("space-y-4", className), children: [
4321
4698
  (title || description) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
@@ -4323,7 +4700,7 @@ var FormSection = React13__namespace.forwardRef(
4323
4700
  description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: description })
4324
4701
  ] }),
4325
4702
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(
4326
- layout === "grid" ? `grid gap-4 ${gridClasses[columns]}` : spacingClasses[spacing2]
4703
+ layout === "grid" ? `grid gap-4 ${gridClasses[columns2]}` : spacingClasses[spacing2]
4327
4704
  ), children })
4328
4705
  ] });
4329
4706
  }
@@ -4611,9 +4988,9 @@ var ReceiverCard = ({
4611
4988
  );
4612
4989
  };
4613
4990
  var PaymentInformationSection = () => {
4614
- const [paymentMethods, setPaymentMethods] = React13.useState([]);
4615
- const [showAddMenu, setShowAddMenu] = React13.useState(false);
4616
- const [achData, setAchData] = React13.useState(defaultACHTransfer);
4991
+ const [paymentMethods, setPaymentMethods] = React15.useState([]);
4992
+ const [showAddMenu, setShowAddMenu] = React15.useState(false);
4993
+ const [achData, setAchData] = React15.useState(defaultACHTransfer);
4617
4994
  const addPaymentMethod = (type) => {
4618
4995
  const newMethod = {
4619
4996
  id: `${type}-${Date.now()}`,
@@ -4738,7 +5115,7 @@ var PaymentInformationSection = () => {
4738
5115
  ] });
4739
5116
  };
4740
5117
  var WireTransferSection = ({ isEditing, onToggleEdit, className, hideActions }) => {
4741
- const [wireTransferType, setWireTransferType] = React13.useState("INTERNATIONAL");
5118
+ const [wireTransferType, setWireTransferType] = React15.useState("INTERNATIONAL");
4742
5119
  const editContent = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
4743
5120
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-4", children: /* @__PURE__ */ jsxRuntime.jsx(
4744
5121
  EnhancedSelect,
@@ -4773,267 +5150,614 @@ var WireTransferSection = ({ isEditing, onToggleEdit, className, hideActions })
4773
5150
  ] })
4774
5151
  ] });
4775
5152
  return /* @__PURE__ */ jsxRuntime.jsx(
4776
- EditableFormCard,
5153
+ EditableFormCard,
5154
+ {
5155
+ title: "Wire Transfer Configuration",
5156
+ description: "Configure wire transfer settings and participants",
5157
+ variant: "subtle",
5158
+ className,
5159
+ isEditing,
5160
+ onToggleEdit,
5161
+ hideActions,
5162
+ editContent,
5163
+ viewContent
5164
+ }
5165
+ );
5166
+ };
5167
+ var sizeClasses = {
5168
+ sm: "max-w-2xl",
5169
+ md: "max-w-4xl",
5170
+ lg: "max-w-6xl",
5171
+ xl: "max-w-7xl",
5172
+ full: "max-w-full"
5173
+ };
5174
+ var paddingClasses = {
5175
+ none: "",
5176
+ sm: "px-4 py-4",
5177
+ md: "px-6 py-6",
5178
+ lg: "px-8 py-8"
5179
+ };
5180
+ var Container = React15__namespace.forwardRef(
5181
+ ({ children, size = "lg", padding = "md", center = true, className }, ref) => {
5182
+ return /* @__PURE__ */ jsxRuntime.jsx(
5183
+ "div",
5184
+ {
5185
+ ref,
5186
+ className: cn(
5187
+ sizeClasses[size],
5188
+ paddingClasses[padding],
5189
+ center && "mx-auto",
5190
+ className
5191
+ ),
5192
+ children
5193
+ }
5194
+ );
5195
+ }
5196
+ );
5197
+ Container.displayName = "Container";
5198
+ var spacingClasses2 = {
5199
+ vertical: {
5200
+ none: "",
5201
+ xs: "space-y-1",
5202
+ sm: "space-y-2",
5203
+ md: "space-y-4",
5204
+ lg: "space-y-6",
5205
+ xl: "space-y-8"
5206
+ },
5207
+ horizontal: {
5208
+ none: "",
5209
+ xs: "space-x-1",
5210
+ sm: "space-x-2",
5211
+ md: "space-x-4",
5212
+ lg: "space-x-6",
5213
+ xl: "space-x-8"
5214
+ }
5215
+ };
5216
+ var alignClasses = {
5217
+ vertical: {
5218
+ start: "",
5219
+ center: "items-center",
5220
+ end: "items-end",
5221
+ stretch: "items-stretch"
5222
+ },
5223
+ horizontal: {
5224
+ start: "",
5225
+ center: "items-center",
5226
+ end: "items-end",
5227
+ stretch: "items-stretch"
5228
+ }
5229
+ };
5230
+ var justifyClasses = {
5231
+ start: "",
5232
+ center: "justify-center",
5233
+ end: "justify-end",
5234
+ between: "justify-between",
5235
+ around: "justify-around"
5236
+ };
5237
+ var Stack = React15__namespace.forwardRef(
5238
+ ({ children, direction = "vertical", spacing: spacing2 = "md", align = "start", justify = "start", className }, ref) => {
5239
+ const isHorizontal = direction === "horizontal";
5240
+ return /* @__PURE__ */ jsxRuntime.jsx(
5241
+ "div",
5242
+ {
5243
+ ref,
5244
+ className: cn(
5245
+ "flex",
5246
+ isHorizontal ? "flex-row" : "flex-col",
5247
+ spacingClasses2[direction][spacing2],
5248
+ alignClasses[direction][align],
5249
+ justifyClasses[justify],
5250
+ className
5251
+ ),
5252
+ children
5253
+ }
5254
+ );
5255
+ }
5256
+ );
5257
+ Stack.displayName = "Stack";
5258
+ var Breadcrumb = React15__namespace.forwardRef(
5259
+ ({ items, showHome = true, separator, className }, ref) => {
5260
+ const defaultSeparator = /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "w-4 h-4 text-muted-foreground" });
5261
+ const separatorElement = separator || defaultSeparator;
5262
+ return /* @__PURE__ */ jsxRuntime.jsxs(
5263
+ "nav",
5264
+ {
5265
+ ref,
5266
+ "aria-label": "Breadcrumb",
5267
+ className: cn("flex items-center space-x-1 text-sm", className),
5268
+ children: [
5269
+ showHome && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
5270
+ /* @__PURE__ */ jsxRuntime.jsx(
5271
+ reactRouterDom.NavLink,
5272
+ {
5273
+ to: "/",
5274
+ className: "flex items-center text-muted-foreground hover:text-foreground transition-colors",
5275
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Home, { className: "w-4 h-4" })
5276
+ }
5277
+ ),
5278
+ items.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: separatorElement })
5279
+ ] }),
5280
+ items.map((item, index) => {
5281
+ const isLast = index === items.length - 1;
5282
+ return /* @__PURE__ */ jsxRuntime.jsxs(React15__namespace.Fragment, { children: [
5283
+ item.href && !isLast ? /* @__PURE__ */ jsxRuntime.jsxs(
5284
+ reactRouterDom.NavLink,
5285
+ {
5286
+ to: item.href,
5287
+ className: "flex items-center text-muted-foreground hover:text-foreground transition-colors",
5288
+ children: [
5289
+ item.icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mr-1", children: item.icon }),
5290
+ item.label
5291
+ ]
5292
+ }
5293
+ ) : /* @__PURE__ */ jsxRuntime.jsxs("span", { className: cn(
5294
+ "flex items-center",
5295
+ isLast ? "text-foreground font-medium" : "text-muted-foreground"
5296
+ ), children: [
5297
+ item.icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mr-1", children: item.icon }),
5298
+ item.label
5299
+ ] }),
5300
+ !isLast && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: separatorElement })
5301
+ ] }, index);
5302
+ })
5303
+ ]
5304
+ }
5305
+ );
5306
+ }
5307
+ );
5308
+ Breadcrumb.displayName = "Breadcrumb";
5309
+ var ListPage = React15__namespace.forwardRef(
5310
+ ({
5311
+ title,
5312
+ description,
5313
+ breadcrumbs,
5314
+ actions,
5315
+ children,
5316
+ maxWidth = "xl",
5317
+ loading = false,
5318
+ emptyState,
5319
+ className
5320
+ }, ref) => {
5321
+ const hasData = React15__namespace.Children.count(children) > 0;
5322
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("min-h-screen bg-gradient-subtle", className), children: /* @__PURE__ */ jsxRuntime.jsx(Container, { size: maxWidth, children: /* @__PURE__ */ jsxRuntime.jsxs(Stack, { spacing: "lg", children: [
5323
+ breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(Breadcrumb, { items: breadcrumbs }),
5324
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between", children: [
5325
+ /* @__PURE__ */ jsxRuntime.jsxs(Stack, { spacing: "sm", children: [
5326
+ /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-3xl font-bold text-foreground", children: title }),
5327
+ description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground max-w-2xl", children: description })
5328
+ ] }),
5329
+ actions && actions.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(Stack, { direction: "horizontal", spacing: "sm", children: actions.map((action, index) => /* @__PURE__ */ jsxRuntime.jsxs(
5330
+ Button,
5331
+ {
5332
+ variant: action.variant || "default",
5333
+ onClick: action.onClick,
5334
+ children: [
5335
+ action.icon,
5336
+ action.label
5337
+ ]
5338
+ },
5339
+ index
5340
+ )) })
5341
+ ] }),
5342
+ loading ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center py-12", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "animate-pulse text-muted-foreground", children: "Loading..." }) }) : hasData ? /* @__PURE__ */ jsxRuntime.jsx(ResponsiveGrid, { type: "cards", gap: "lg", children }) : emptyState ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center py-12", children: emptyState }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center py-12", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-center", children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground", children: "No items found" }) }) })
5343
+ ] }) }) });
5344
+ }
5345
+ );
5346
+ ListPage.displayName = "ListPage";
5347
+ var StatementHeader = ({ data, onEdit }) => {
5348
+ return /* @__PURE__ */ jsxRuntime.jsxs(Card, { children: [
5349
+ /* @__PURE__ */ jsxRuntime.jsxs(CardHeader, { direction: "row", children: [
5350
+ /* @__PURE__ */ jsxRuntime.jsx(CardTitle, { size: "md", children: "Statement Summary" }),
5351
+ /* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "outline", size: "sm", onClick: onEdit, children: [
5352
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Edit, { className: "h-4 w-4 mr-2" }),
5353
+ "Edit"
5354
+ ] })
5355
+ ] }),
5356
+ /* @__PURE__ */ jsxRuntime.jsx(CardContent, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6", children: [
5357
+ /* @__PURE__ */ jsxRuntime.jsx(
5358
+ InfoField,
5359
+ {
5360
+ label: "Account",
5361
+ value: data.account,
5362
+ layout: "horizontal"
5363
+ }
5364
+ ),
5365
+ /* @__PURE__ */ jsxRuntime.jsx(
5366
+ InfoField,
5367
+ {
5368
+ label: "Product ID",
5369
+ value: data.productId,
5370
+ layout: "horizontal"
5371
+ }
5372
+ ),
5373
+ /* @__PURE__ */ jsxRuntime.jsx(
5374
+ InfoField,
5375
+ {
5376
+ label: "Program ID",
5377
+ value: data.programId,
5378
+ layout: "horizontal"
5379
+ }
5380
+ ),
5381
+ /* @__PURE__ */ jsxRuntime.jsx(
5382
+ InfoField,
5383
+ {
5384
+ label: "Start Date",
5385
+ value: data.startDate,
5386
+ layout: "horizontal"
5387
+ }
5388
+ ),
5389
+ /* @__PURE__ */ jsxRuntime.jsx(
5390
+ InfoField,
5391
+ {
5392
+ label: "End Date",
5393
+ value: data.endDate,
5394
+ layout: "horizontal"
5395
+ }
5396
+ ),
5397
+ /* @__PURE__ */ jsxRuntime.jsx(
5398
+ InfoField,
5399
+ {
5400
+ label: "Starting Balance",
5401
+ value: data.startingBalance,
5402
+ layout: "horizontal"
5403
+ }
5404
+ ),
5405
+ /* @__PURE__ */ jsxRuntime.jsx(
5406
+ InfoField,
5407
+ {
5408
+ label: "Ending Balance",
5409
+ value: data.endingBalance,
5410
+ layout: "horizontal"
5411
+ }
5412
+ )
5413
+ ] }) })
5414
+ ] });
5415
+ };
5416
+ function Calendar({
5417
+ className,
5418
+ classNames,
5419
+ showOutsideDays = true,
5420
+ ...props
5421
+ }) {
5422
+ return /* @__PURE__ */ jsxRuntime.jsx(
5423
+ reactDayPicker.DayPicker,
4777
5424
  {
4778
- title: "Wire Transfer Configuration",
4779
- description: "Configure wire transfer settings and participants",
4780
- variant: "subtle",
4781
- className,
4782
- isEditing,
4783
- onToggleEdit,
4784
- hideActions,
4785
- editContent,
4786
- viewContent
5425
+ showOutsideDays,
5426
+ className: cn("p-3 pointer-events-auto", className),
5427
+ classNames: {
5428
+ months: "flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",
5429
+ month: "space-y-4",
5430
+ caption: "flex justify-center pt-1 relative items-center",
5431
+ caption_label: "text-sm font-medium",
5432
+ nav: "space-x-1 flex items-center",
5433
+ button_previous: "absolute left-1 h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100",
5434
+ button_next: "absolute right-1 h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100",
5435
+ month_grid: "w-full border-collapse space-y-1",
5436
+ weekdays: "flex",
5437
+ weekday: "text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",
5438
+ week: "flex w-full mt-2",
5439
+ day: "h-9 w-9 text-center text-sm p-0 relative hover:bg-accent hover:text-accent-foreground rounded-md",
5440
+ day_button: cn(
5441
+ buttonVariants({ variant: "ghost" }),
5442
+ "h-9 w-9 p-0 font-normal"
5443
+ ),
5444
+ selected: "bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground",
5445
+ today: "bg-accent text-accent-foreground",
5446
+ outside: "text-muted-foreground opacity-50",
5447
+ disabled: "text-muted-foreground opacity-50",
5448
+ hidden: "invisible",
5449
+ ...classNames
5450
+ },
5451
+ ...props
4787
5452
  }
4788
5453
  );
4789
- };
4790
- var sizeClasses = {
4791
- sm: "max-w-2xl",
4792
- md: "max-w-4xl",
4793
- lg: "max-w-6xl",
4794
- xl: "max-w-7xl",
4795
- full: "max-w-full"
4796
- };
4797
- var paddingClasses = {
4798
- none: "",
4799
- sm: "px-4 py-4",
4800
- md: "px-6 py-6",
4801
- lg: "px-8 py-8"
4802
- };
4803
- var Container = React13__namespace.forwardRef(
4804
- ({ children, size = "lg", padding = "md", center = true, className }, ref) => {
4805
- return /* @__PURE__ */ jsxRuntime.jsx(
4806
- "div",
4807
- {
4808
- ref,
4809
- className: cn(
4810
- sizeClasses[size],
4811
- paddingClasses[padding],
4812
- center && "mx-auto",
4813
- className
4814
- ),
4815
- children
4816
- }
4817
- );
4818
- }
4819
- );
4820
- Container.displayName = "Container";
4821
- var spacingClasses2 = {
4822
- vertical: {
4823
- none: "",
4824
- xs: "space-y-1",
4825
- sm: "space-y-2",
4826
- md: "space-y-4",
4827
- lg: "space-y-6",
4828
- xl: "space-y-8"
4829
- },
4830
- horizontal: {
4831
- none: "",
4832
- xs: "space-x-1",
4833
- sm: "space-x-2",
4834
- md: "space-x-4",
4835
- lg: "space-x-6",
4836
- xl: "space-x-8"
5454
+ }
5455
+ Calendar.displayName = "Calendar";
5456
+ var Popover = PopoverPrimitive__namespace.Root;
5457
+ var PopoverTrigger = PopoverPrimitive__namespace.Trigger;
5458
+ var PopoverContent = React15__namespace.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
5459
+ PopoverPrimitive__namespace.Content,
5460
+ {
5461
+ ref,
5462
+ align,
5463
+ sideOffset,
5464
+ className: cn(
5465
+ "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",
5466
+ className
5467
+ ),
5468
+ ...props
4837
5469
  }
4838
- };
4839
- var alignClasses = {
4840
- vertical: {
4841
- start: "",
4842
- center: "items-center",
4843
- end: "items-end",
4844
- stretch: "items-stretch"
4845
- },
4846
- horizontal: {
4847
- start: "",
4848
- center: "items-center",
4849
- end: "items-end",
4850
- stretch: "items-stretch"
5470
+ ) }));
5471
+ PopoverContent.displayName = PopoverPrimitive__namespace.Content.displayName;
5472
+ function DataTable({
5473
+ columns: columns2,
5474
+ data,
5475
+ sortBy,
5476
+ sortDirection,
5477
+ onSort,
5478
+ onRowClick,
5479
+ loading = false,
5480
+ emptyMessage = "No data available",
5481
+ className
5482
+ }) {
5483
+ const handleSort = (key) => {
5484
+ if (onSort) {
5485
+ onSort(key);
5486
+ }
5487
+ };
5488
+ const renderSortIcon = (column) => {
5489
+ if (!column.sortable || !onSort) return null;
5490
+ if (sortBy === column.key) {
5491
+ return sortDirection === "asc" ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronUp, { className: "w-4 h-4 ml-1" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "w-4 h-4 ml-1" });
5492
+ }
5493
+ return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronsUpDown, { className: "w-4 h-4 ml-1 opacity-50" });
5494
+ };
5495
+ const renderCell = (column, row) => {
5496
+ const value = row[column.key];
5497
+ if (column.render) {
5498
+ return column.render(value, row);
5499
+ }
5500
+ if (typeof value === "boolean") {
5501
+ return /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: value ? "success" : "secondary", children: value ? "Yes" : "No" });
5502
+ }
5503
+ if (Array.isArray(value)) {
5504
+ return value.join(", ");
5505
+ }
5506
+ return value?.toString() || "-";
5507
+ };
5508
+ if (loading) {
5509
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("rounded-md border", className), children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-8 text-center", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "animate-pulse text-muted-foreground", children: "Loading..." }) }) });
4851
5510
  }
4852
- };
4853
- var justifyClasses = {
4854
- start: "",
4855
- center: "justify-center",
4856
- end: "justify-end",
4857
- between: "justify-between",
4858
- around: "justify-around"
4859
- };
4860
- var Stack = React13__namespace.forwardRef(
4861
- ({ children, direction = "vertical", spacing: spacing2 = "md", align = "start", justify = "start", className }, ref) => {
4862
- const isHorizontal = direction === "horizontal";
4863
- return /* @__PURE__ */ jsxRuntime.jsx(
4864
- "div",
5511
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("rounded-md border", className), children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "overflow-x-auto", children: /* @__PURE__ */ jsxRuntime.jsxs("table", { className: "w-full", children: [
5512
+ /* @__PURE__ */ jsxRuntime.jsx("thead", { children: /* @__PURE__ */ jsxRuntime.jsx("tr", { className: "border-b bg-muted/50", children: columns2.map((column) => /* @__PURE__ */ jsxRuntime.jsx(
5513
+ "th",
4865
5514
  {
4866
- ref,
4867
5515
  className: cn(
4868
- "flex",
4869
- isHorizontal ? "flex-row" : "flex-col",
4870
- spacingClasses2[direction][spacing2],
4871
- alignClasses[direction][align],
4872
- justifyClasses[justify],
4873
- className
5516
+ "px-3 py-2 text-left align-middle text-sm font-medium bg-muted/50",
5517
+ column.align === "center" && "text-center",
5518
+ column.align === "right" && "text-right",
5519
+ column.width && `w-[${column.width}]`
4874
5520
  ),
4875
- children
4876
- }
4877
- );
4878
- }
4879
- );
4880
- Stack.displayName = "Stack";
4881
- var Breadcrumb = React13__namespace.forwardRef(
4882
- ({ items, showHome = true, separator, className }, ref) => {
4883
- const defaultSeparator = /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "w-4 h-4 text-muted-foreground" });
4884
- const separatorElement = separator || defaultSeparator;
4885
- return /* @__PURE__ */ jsxRuntime.jsxs(
4886
- "nav",
5521
+ children: column.sortable && onSort ? /* @__PURE__ */ jsxRuntime.jsx(
5522
+ Button,
5523
+ {
5524
+ variant: "ghost",
5525
+ size: "sm",
5526
+ className: "h-auto p-0 text-sm font-medium hover:bg-transparent",
5527
+ onClick: () => handleSort(column.key),
5528
+ children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center", children: [
5529
+ column.title,
5530
+ renderSortIcon(column)
5531
+ ] })
5532
+ }
5533
+ ) : column.title
5534
+ },
5535
+ column.key
5536
+ )) }) }),
5537
+ /* @__PURE__ */ jsxRuntime.jsx("tbody", { children: data.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("tr", { children: /* @__PURE__ */ jsxRuntime.jsx("td", { colSpan: columns2.length, className: "h-24 text-center text-muted-foreground", children: emptyMessage }) }) : data.map((row, index) => /* @__PURE__ */ jsxRuntime.jsx(
5538
+ "tr",
4887
5539
  {
4888
- ref,
4889
- "aria-label": "Breadcrumb",
4890
- className: cn("flex items-center space-x-1 text-sm", className),
4891
- children: [
4892
- showHome && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
4893
- /* @__PURE__ */ jsxRuntime.jsx(
4894
- reactRouterDom.NavLink,
4895
- {
4896
- to: "/",
4897
- className: "flex items-center text-muted-foreground hover:text-foreground transition-colors",
4898
- children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Home, { className: "w-4 h-4" })
4899
- }
5540
+ className: cn(
5541
+ "border-b transition-colors hover:bg-muted/50",
5542
+ onRowClick && "cursor-pointer"
5543
+ ),
5544
+ onClick: () => onRowClick?.(row),
5545
+ children: columns2.map((column) => /* @__PURE__ */ jsxRuntime.jsx(
5546
+ "td",
5547
+ {
5548
+ className: cn(
5549
+ "px-3 py-2 align-middle text-sm",
5550
+ column.align === "center" && "text-center",
5551
+ column.align === "right" && "text-right"
4900
5552
  ),
4901
- items.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: separatorElement })
5553
+ children: renderCell(column, row)
5554
+ },
5555
+ column.key
5556
+ ))
5557
+ },
5558
+ index
5559
+ )) })
5560
+ ] }) }) });
5561
+ }
5562
+ var statementTypes = [
5563
+ { value: "root", label: "Root" },
5564
+ { value: "program", label: "Program" },
5565
+ { value: "product", label: "Product" },
5566
+ { value: "account", label: "Account" }
5567
+ ];
5568
+ var columns = [
5569
+ {
5570
+ key: "transactionType",
5571
+ title: "Transaction Type",
5572
+ sortable: true,
5573
+ align: "left"
5574
+ },
5575
+ {
5576
+ key: "direction",
5577
+ title: "Direction",
5578
+ sortable: true,
5579
+ align: "left",
5580
+ render: (value) => /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: value === "CREDIT" ? "success" : "secondary", children: value })
5581
+ },
5582
+ {
5583
+ key: "amount",
5584
+ title: "Amount",
5585
+ sortable: true,
5586
+ align: "right",
5587
+ render: (value) => `$${value.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 })}`
5588
+ },
5589
+ {
5590
+ key: "count",
5591
+ title: "Count",
5592
+ sortable: true,
5593
+ align: "right"
5594
+ }
5595
+ ];
5596
+ var StatementView = ({
5597
+ statementType,
5598
+ selectedProgram,
5599
+ selectedProduct,
5600
+ accountNumber,
5601
+ startDate,
5602
+ endDate,
5603
+ statementGenerated,
5604
+ programs,
5605
+ products,
5606
+ statementHeader,
5607
+ statementTransactions,
5608
+ onStatementTypeChange,
5609
+ onProgramChange,
5610
+ onProductChange,
5611
+ onAccountNumberChange,
5612
+ onStartDateChange,
5613
+ onEndDateChange,
5614
+ onGenerateStatement,
5615
+ onEdit,
5616
+ onDownloadCSV,
5617
+ onPrintPDF,
5618
+ isGenerateDisabled
5619
+ }) => {
5620
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "container mx-auto p-6 space-y-6", children: [
5621
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
5622
+ /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-3xl font-bold tracking-tight", children: "Statement" }),
5623
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground mt-1", children: "Generate and view statement reports" })
5624
+ ] }),
5625
+ !statementGenerated && /* @__PURE__ */ jsxRuntime.jsxs(Card, { children: [
5626
+ /* @__PURE__ */ jsxRuntime.jsx(CardHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(CardTitle, { size: "md", children: "Statement Parameters" }) }),
5627
+ /* @__PURE__ */ jsxRuntime.jsxs(CardContent, { className: "space-y-4", children: [
5628
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4", children: [
5629
+ /* @__PURE__ */ jsxRuntime.jsx(
5630
+ EnhancedSelect,
5631
+ {
5632
+ label: "Statement Type",
5633
+ placeholder: "Select type",
5634
+ options: statementTypes,
5635
+ value: statementType,
5636
+ onValueChange: onStatementTypeChange
5637
+ }
5638
+ ),
5639
+ statementType === "program" && /* @__PURE__ */ jsxRuntime.jsx(
5640
+ EnhancedSelect,
5641
+ {
5642
+ label: "Program Name",
5643
+ placeholder: "Select program",
5644
+ options: programs,
5645
+ value: selectedProgram,
5646
+ onValueChange: onProgramChange
5647
+ }
5648
+ ),
5649
+ statementType === "product" && /* @__PURE__ */ jsxRuntime.jsx(
5650
+ EnhancedSelect,
5651
+ {
5652
+ label: "Product Name",
5653
+ placeholder: "Select product",
5654
+ options: products,
5655
+ value: selectedProduct,
5656
+ onValueChange: onProductChange
5657
+ }
5658
+ ),
5659
+ statementType === "account" && /* @__PURE__ */ jsxRuntime.jsx(
5660
+ EnhancedInput,
5661
+ {
5662
+ label: "Account Number",
5663
+ placeholder: "Enter account number",
5664
+ value: accountNumber,
5665
+ onChange: (e) => onAccountNumberChange(e.target.value)
5666
+ }
5667
+ ),
5668
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2", children: [
5669
+ /* @__PURE__ */ jsxRuntime.jsx("label", { className: "text-sm font-medium", children: "Start Date" }),
5670
+ /* @__PURE__ */ jsxRuntime.jsxs(Popover, { children: [
5671
+ /* @__PURE__ */ jsxRuntime.jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
5672
+ Button,
5673
+ {
5674
+ variant: "outline",
5675
+ className: cn(
5676
+ "justify-start text-left font-normal",
5677
+ !startDate && "text-muted-foreground"
5678
+ ),
5679
+ children: [
5680
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CalendarIcon, { className: "mr-2 h-4 w-4" }),
5681
+ startDate ? dateFns.format(startDate, "MM/dd/yyyy") : "Select date"
5682
+ ]
5683
+ }
5684
+ ) }),
5685
+ /* @__PURE__ */ jsxRuntime.jsx(PopoverContent, { className: "w-auto p-0", align: "start", children: /* @__PURE__ */ jsxRuntime.jsx(
5686
+ Calendar,
5687
+ {
5688
+ mode: "single",
5689
+ selected: startDate,
5690
+ onSelect: onStartDateChange,
5691
+ initialFocus: true
5692
+ }
5693
+ ) })
5694
+ ] })
4902
5695
  ] }),
4903
- items.map((item, index) => {
4904
- const isLast = index === items.length - 1;
4905
- return /* @__PURE__ */ jsxRuntime.jsxs(React13__namespace.Fragment, { children: [
4906
- item.href && !isLast ? /* @__PURE__ */ jsxRuntime.jsxs(
4907
- reactRouterDom.NavLink,
5696
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2", children: [
5697
+ /* @__PURE__ */ jsxRuntime.jsx("label", { className: "text-sm font-medium", children: "End Date" }),
5698
+ /* @__PURE__ */ jsxRuntime.jsxs(Popover, { children: [
5699
+ /* @__PURE__ */ jsxRuntime.jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
5700
+ Button,
4908
5701
  {
4909
- to: item.href,
4910
- className: "flex items-center text-muted-foreground hover:text-foreground transition-colors",
5702
+ variant: "outline",
5703
+ className: cn(
5704
+ "justify-start text-left font-normal",
5705
+ !endDate && "text-muted-foreground"
5706
+ ),
4911
5707
  children: [
4912
- item.icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mr-1", children: item.icon }),
4913
- item.label
5708
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CalendarIcon, { className: "mr-2 h-4 w-4" }),
5709
+ endDate ? dateFns.format(endDate, "MM/dd/yyyy") : "Select date"
4914
5710
  ]
4915
5711
  }
4916
- ) : /* @__PURE__ */ jsxRuntime.jsxs("span", { className: cn(
4917
- "flex items-center",
4918
- isLast ? "text-foreground font-medium" : "text-muted-foreground"
4919
- ), children: [
4920
- item.icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mr-1", children: item.icon }),
4921
- item.label
4922
- ] }),
4923
- !isLast && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: separatorElement })
4924
- ] }, index);
4925
- })
4926
- ]
4927
- }
4928
- );
4929
- }
4930
- );
4931
- Breadcrumb.displayName = "Breadcrumb";
4932
- var ListPage = React13__namespace.forwardRef(
4933
- ({
4934
- title,
4935
- description,
4936
- breadcrumbs,
4937
- actions,
4938
- children,
4939
- maxWidth = "xl",
4940
- loading = false,
4941
- emptyState,
4942
- className
4943
- }, ref) => {
4944
- const hasData = React13__namespace.Children.count(children) > 0;
4945
- return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("min-h-screen bg-gradient-subtle", className), children: /* @__PURE__ */ jsxRuntime.jsx(Container, { size: maxWidth, children: /* @__PURE__ */ jsxRuntime.jsxs(Stack, { spacing: "lg", children: [
4946
- breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(Breadcrumb, { items: breadcrumbs }),
4947
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between", children: [
4948
- /* @__PURE__ */ jsxRuntime.jsxs(Stack, { spacing: "sm", children: [
4949
- /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-3xl font-bold text-foreground", children: title }),
4950
- description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground max-w-2xl", children: description })
5712
+ ) }),
5713
+ /* @__PURE__ */ jsxRuntime.jsx(PopoverContent, { className: "w-auto p-0", align: "start", children: /* @__PURE__ */ jsxRuntime.jsx(
5714
+ Calendar,
5715
+ {
5716
+ mode: "single",
5717
+ selected: endDate,
5718
+ onSelect: onEndDateChange,
5719
+ initialFocus: true
5720
+ }
5721
+ ) })
5722
+ ] })
5723
+ ] })
4951
5724
  ] }),
4952
- actions && actions.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(Stack, { direction: "horizontal", spacing: "sm", children: actions.map((action, index) => /* @__PURE__ */ jsxRuntime.jsxs(
5725
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-end", children: /* @__PURE__ */ jsxRuntime.jsx(
4953
5726
  Button,
4954
5727
  {
4955
- variant: action.variant || "default",
4956
- onClick: action.onClick,
4957
- children: [
4958
- action.icon,
4959
- action.label
4960
- ]
4961
- },
4962
- index
4963
- )) })
4964
- ] }),
4965
- loading ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center py-12", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "animate-pulse text-muted-foreground", children: "Loading..." }) }) : hasData ? /* @__PURE__ */ jsxRuntime.jsx(ResponsiveGrid, { type: "cards", gap: "lg", children }) : emptyState ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center py-12", children: emptyState }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center py-12", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-center", children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground", children: "No items found" }) }) })
4966
- ] }) }) });
4967
- }
4968
- );
4969
- ListPage.displayName = "ListPage";
4970
- var StatementHeader = ({ data, onEdit }) => {
4971
- return /* @__PURE__ */ jsxRuntime.jsxs(Card, { children: [
4972
- /* @__PURE__ */ jsxRuntime.jsxs(CardHeader, { direction: "row", children: [
4973
- /* @__PURE__ */ jsxRuntime.jsx(CardTitle, { size: "md", children: "Statement Summary" }),
4974
- /* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "outline", size: "sm", onClick: onEdit, children: [
4975
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Edit, { className: "h-4 w-4 mr-2" }),
4976
- "Edit"
5728
+ onClick: onGenerateStatement,
5729
+ disabled: isGenerateDisabled,
5730
+ children: "Generate Statement"
5731
+ }
5732
+ ) })
4977
5733
  ] })
4978
5734
  ] }),
4979
- /* @__PURE__ */ jsxRuntime.jsx(CardContent, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6", children: [
4980
- /* @__PURE__ */ jsxRuntime.jsx(
4981
- InfoField,
4982
- {
4983
- label: "Account",
4984
- value: data.account,
4985
- layout: "horizontal"
4986
- }
4987
- ),
4988
- /* @__PURE__ */ jsxRuntime.jsx(
4989
- InfoField,
4990
- {
4991
- label: "Product ID",
4992
- value: data.productId,
4993
- layout: "horizontal"
4994
- }
4995
- ),
4996
- /* @__PURE__ */ jsxRuntime.jsx(
4997
- InfoField,
4998
- {
4999
- label: "Program ID",
5000
- value: data.programId,
5001
- layout: "horizontal"
5002
- }
5003
- ),
5004
- /* @__PURE__ */ jsxRuntime.jsx(
5005
- InfoField,
5006
- {
5007
- label: "Start Date",
5008
- value: data.startDate,
5009
- layout: "horizontal"
5010
- }
5011
- ),
5012
- /* @__PURE__ */ jsxRuntime.jsx(
5013
- InfoField,
5014
- {
5015
- label: "End Date",
5016
- value: data.endDate,
5017
- layout: "horizontal"
5018
- }
5019
- ),
5020
- /* @__PURE__ */ jsxRuntime.jsx(
5021
- InfoField,
5022
- {
5023
- label: "Starting Balance",
5024
- value: data.startingBalance,
5025
- layout: "horizontal"
5026
- }
5027
- ),
5028
- /* @__PURE__ */ jsxRuntime.jsx(
5029
- InfoField,
5030
- {
5031
- label: "Ending Balance",
5032
- value: data.endingBalance,
5033
- layout: "horizontal"
5034
- }
5035
- )
5036
- ] }) })
5735
+ statementGenerated && statementHeader && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
5736
+ /* @__PURE__ */ jsxRuntime.jsx(StatementHeader, { data: statementHeader, onEdit }),
5737
+ /* @__PURE__ */ jsxRuntime.jsxs(Card, { children: [
5738
+ /* @__PURE__ */ jsxRuntime.jsxs(CardHeader, { direction: "row", children: [
5739
+ /* @__PURE__ */ jsxRuntime.jsx(CardTitle, { size: "md", children: "Transaction Summary" }),
5740
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
5741
+ /* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "outline", onClick: onDownloadCSV, children: [
5742
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Download, { className: "h-4 w-4 mr-2" }),
5743
+ "Download CSV"
5744
+ ] }),
5745
+ /* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "outline", onClick: onPrintPDF, children: [
5746
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.FileText, { className: "h-4 w-4 mr-2" }),
5747
+ "Print PDF"
5748
+ ] })
5749
+ ] })
5750
+ ] }),
5751
+ /* @__PURE__ */ jsxRuntime.jsx(CardContent, { children: /* @__PURE__ */ jsxRuntime.jsx(
5752
+ DataTable,
5753
+ {
5754
+ columns,
5755
+ data: statementTransactions,
5756
+ emptyMessage: "No transactions found"
5757
+ }
5758
+ ) })
5759
+ ] })
5760
+ ] })
5037
5761
  ] });
5038
5762
  };
5039
5763
  var ACHDetailsSection = ({ data }) => {
@@ -5168,7 +5892,7 @@ var typeLabels = {
5168
5892
  credit: "Credit",
5169
5893
  investment: "Investment"
5170
5894
  };
5171
- var AccountCard = React13__namespace.forwardRef(
5895
+ var AccountCard = React15__namespace.forwardRef(
5172
5896
  ({ account, showBalance = true, className }, ref) => {
5173
5897
  const TypeIcon = typeIcons[account.type];
5174
5898
  const accountData = [
@@ -5230,136 +5954,25 @@ var BusinessTypeBadge = ({ type, className }) => {
5230
5954
  config.label
5231
5955
  ] });
5232
5956
  };
5233
- function Calendar({
5234
- className,
5235
- classNames,
5236
- showOutsideDays = true,
5237
- ...props
5238
- }) {
5239
- return /* @__PURE__ */ jsxRuntime.jsx(
5240
- reactDayPicker.DayPicker,
5241
- {
5242
- showOutsideDays,
5243
- className: cn("p-3 pointer-events-auto", className),
5244
- classNames: {
5245
- months: "flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",
5246
- month: "space-y-4",
5247
- caption: "flex justify-center pt-1 relative items-center",
5248
- caption_label: "text-sm font-medium",
5249
- nav: "space-x-1 flex items-center",
5250
- button_previous: "absolute left-1 h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100",
5251
- button_next: "absolute right-1 h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100",
5252
- month_grid: "w-full border-collapse space-y-1",
5253
- weekdays: "flex",
5254
- weekday: "text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",
5255
- week: "flex w-full mt-2",
5256
- day: "h-9 w-9 text-center text-sm p-0 relative hover:bg-accent hover:text-accent-foreground rounded-md",
5257
- day_button: cn(
5258
- buttonVariants({ variant: "ghost" }),
5259
- "h-9 w-9 p-0 font-normal"
5260
- ),
5261
- selected: "bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground",
5262
- today: "bg-accent text-accent-foreground",
5263
- outside: "text-muted-foreground opacity-50",
5264
- disabled: "text-muted-foreground opacity-50",
5265
- hidden: "invisible",
5266
- ...classNames
5267
- },
5268
- ...props
5269
- }
5270
- );
5271
- }
5272
- Calendar.displayName = "Calendar";
5273
- function DataTable({
5274
- columns,
5275
- data,
5276
- sortBy,
5277
- sortDirection,
5278
- onSort,
5279
- onRowClick,
5280
- loading = false,
5281
- emptyMessage = "No data available",
5282
- className
5283
- }) {
5284
- const handleSort = (key) => {
5285
- if (onSort) {
5286
- onSort(key);
5287
- }
5288
- };
5289
- const renderSortIcon = (column) => {
5290
- if (!column.sortable || !onSort) return null;
5291
- if (sortBy === column.key) {
5292
- return sortDirection === "asc" ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronUp, { className: "w-4 h-4 ml-1" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "w-4 h-4 ml-1" });
5293
- }
5294
- return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronsUpDown, { className: "w-4 h-4 ml-1 opacity-50" });
5295
- };
5296
- const renderCell = (column, row) => {
5297
- const value = row[column.key];
5298
- if (column.render) {
5299
- return column.render(value, row);
5300
- }
5301
- if (typeof value === "boolean") {
5302
- return /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: value ? "success" : "secondary", children: value ? "Yes" : "No" });
5303
- }
5304
- if (Array.isArray(value)) {
5305
- return value.join(", ");
5306
- }
5307
- return value?.toString() || "-";
5308
- };
5309
- if (loading) {
5310
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("rounded-md border", className), children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-8 text-center", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "animate-pulse text-muted-foreground", children: "Loading..." }) }) });
5311
- }
5312
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("rounded-md border", className), children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "overflow-x-auto", children: /* @__PURE__ */ jsxRuntime.jsxs("table", { className: "w-full", children: [
5313
- /* @__PURE__ */ jsxRuntime.jsx("thead", { children: /* @__PURE__ */ jsxRuntime.jsx("tr", { className: "border-b bg-muted/50", children: columns.map((column) => /* @__PURE__ */ jsxRuntime.jsx(
5314
- "th",
5315
- {
5316
- className: cn(
5317
- "px-3 py-2 text-left align-middle text-sm font-medium bg-muted/50",
5318
- column.align === "center" && "text-center",
5319
- column.align === "right" && "text-right",
5320
- column.width && `w-[${column.width}]`
5321
- ),
5322
- children: column.sortable && onSort ? /* @__PURE__ */ jsxRuntime.jsx(
5323
- Button,
5324
- {
5325
- variant: "ghost",
5326
- size: "sm",
5327
- className: "h-auto p-0 text-sm font-medium hover:bg-transparent",
5328
- onClick: () => handleSort(column.key),
5329
- children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center", children: [
5330
- column.title,
5331
- renderSortIcon(column)
5332
- ] })
5333
- }
5334
- ) : column.title
5335
- },
5336
- column.key
5337
- )) }) }),
5338
- /* @__PURE__ */ jsxRuntime.jsx("tbody", { children: data.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("tr", { children: /* @__PURE__ */ jsxRuntime.jsx("td", { colSpan: columns.length, className: "h-24 text-center text-muted-foreground", children: emptyMessage }) }) : data.map((row, index) => /* @__PURE__ */ jsxRuntime.jsx(
5339
- "tr",
5957
+ var Checkbox = React15__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
5958
+ CheckboxPrimitive__namespace.Root,
5959
+ {
5960
+ ref,
5961
+ className: cn(
5962
+ "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",
5963
+ className
5964
+ ),
5965
+ ...props,
5966
+ children: /* @__PURE__ */ jsxRuntime.jsx(
5967
+ CheckboxPrimitive__namespace.Indicator,
5340
5968
  {
5341
- className: cn(
5342
- "border-b transition-colors hover:bg-muted/50",
5343
- onRowClick && "cursor-pointer"
5344
- ),
5345
- onClick: () => onRowClick?.(row),
5346
- children: columns.map((column) => /* @__PURE__ */ jsxRuntime.jsx(
5347
- "td",
5348
- {
5349
- className: cn(
5350
- "px-3 py-2 align-middle text-sm",
5351
- column.align === "center" && "text-center",
5352
- column.align === "right" && "text-right"
5353
- ),
5354
- children: renderCell(column, row)
5355
- },
5356
- column.key
5357
- ))
5358
- },
5359
- index
5360
- )) })
5361
- ] }) }) });
5362
- }
5969
+ className: cn("flex items-center justify-center text-current"),
5970
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-4 w-4" })
5971
+ }
5972
+ )
5973
+ }
5974
+ ));
5975
+ Checkbox.displayName = CheckboxPrimitive__namespace.Root.displayName;
5363
5976
  var maxWidthClasses = {
5364
5977
  sm: "max-w-2xl",
5365
5978
  md: "max-w-4xl",
@@ -5391,7 +6004,7 @@ var getGridClasses = (gridCols, responsive) => {
5391
6004
  return "grid-cols-1 lg:grid-cols-2";
5392
6005
  }
5393
6006
  };
5394
- var PageLayout = React13__namespace.forwardRef(
6007
+ var PageLayout = React15__namespace.forwardRef(
5395
6008
  ({
5396
6009
  title,
5397
6010
  description,
@@ -5402,9 +6015,10 @@ var PageLayout = React13__namespace.forwardRef(
5402
6015
  maxWidth = "xl",
5403
6016
  gridCols = 2,
5404
6017
  responsive = true,
5405
- className
6018
+ className,
6019
+ headerContent
5406
6020
  }, ref) => {
5407
- const [editingCards, setEditingCards] = React13__namespace.useState(/* @__PURE__ */ new Set());
6021
+ const [editingCards, setEditingCards] = React15__namespace.useState(/* @__PURE__ */ new Set());
5408
6022
  const toggleEdit = (cardKey) => {
5409
6023
  setEditingCards((prev) => {
5410
6024
  const next = new Set(prev);
@@ -5421,11 +6035,12 @@ var PageLayout = React13__namespace.forwardRef(
5421
6035
  "sticky top-0 z-10 bg-gradient-subtle border-b border-border/40",
5422
6036
  "container mx-auto px-4 pt-8 pb-4",
5423
6037
  maxWidthClasses[maxWidth]
5424
- ), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between", children: [
5425
- /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
6038
+ ), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-4", children: [
6039
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1", children: [
5426
6040
  /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-3xl font-bold text-foreground mb-2", children: title }),
5427
6041
  description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground", children: description })
5428
6042
  ] }),
6043
+ headerContent && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center", children: headerContent }),
5429
6044
  actions.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-2", children: actions.map((action, index) => {
5430
6045
  const Icon2 = action.icon;
5431
6046
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -5488,7 +6103,7 @@ var DetailPageLayout = ({
5488
6103
  actions,
5489
6104
  initialEditingState = {}
5490
6105
  }) => {
5491
- const [editingCards, setEditingCards] = React13.useState(
6106
+ const [editingCards, setEditingCards] = React15.useState(
5492
6107
  initialEditingState
5493
6108
  );
5494
6109
  const toggleEdit = (cardKey) => {
@@ -5532,7 +6147,7 @@ var DetailPageLayout = ({
5532
6147
  };
5533
6148
  var DropdownMenu = DropdownMenuPrimitive__namespace.Root;
5534
6149
  var DropdownMenuTrigger = DropdownMenuPrimitive__namespace.Trigger;
5535
- var DropdownMenuContent = React13__namespace.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
6150
+ var DropdownMenuContent = React15__namespace.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
5536
6151
  DropdownMenuPrimitive__namespace.Content,
5537
6152
  {
5538
6153
  ref,
@@ -5545,7 +6160,7 @@ var DropdownMenuContent = React13__namespace.forwardRef(({ className, sideOffset
5545
6160
  }
5546
6161
  ) }));
5547
6162
  DropdownMenuContent.displayName = DropdownMenuPrimitive__namespace.Content.displayName;
5548
- var DropdownMenuItem = React13__namespace.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
6163
+ var DropdownMenuItem = React15__namespace.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
5549
6164
  DropdownMenuPrimitive__namespace.Item,
5550
6165
  {
5551
6166
  ref,
@@ -5558,7 +6173,7 @@ var DropdownMenuItem = React13__namespace.forwardRef(({ className, inset, ...pro
5558
6173
  }
5559
6174
  ));
5560
6175
  DropdownMenuItem.displayName = DropdownMenuPrimitive__namespace.Item.displayName;
5561
- var DropdownMenuLabel = React13__namespace.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
6176
+ var DropdownMenuLabel = React15__namespace.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
5562
6177
  DropdownMenuPrimitive__namespace.Label,
5563
6178
  {
5564
6179
  ref,
@@ -5571,7 +6186,7 @@ var DropdownMenuLabel = React13__namespace.forwardRef(({ className, inset, ...pr
5571
6186
  }
5572
6187
  ));
5573
6188
  DropdownMenuLabel.displayName = DropdownMenuPrimitive__namespace.Label.displayName;
5574
- var DropdownMenuSeparator = React13__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
6189
+ var DropdownMenuSeparator = React15__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
5575
6190
  DropdownMenuPrimitive__namespace.Separator,
5576
6191
  {
5577
6192
  ref,
@@ -5580,7 +6195,51 @@ var DropdownMenuSeparator = React13__namespace.forwardRef(({ className, ...props
5580
6195
  }
5581
6196
  ));
5582
6197
  DropdownMenuSeparator.displayName = DropdownMenuPrimitive__namespace.Separator.displayName;
5583
- var EntityCard = React13__namespace.forwardRef(
6198
+ var EditableInfoField = ({
6199
+ label,
6200
+ value,
6201
+ options,
6202
+ onChange,
6203
+ placeholder = "Select...",
6204
+ renderValue,
6205
+ className
6206
+ }) => {
6207
+ const [isEditing, setIsEditing] = React15.useState(false);
6208
+ const handleChange = (newValue) => {
6209
+ onChange(newValue);
6210
+ setIsEditing(false);
6211
+ };
6212
+ if (isEditing) {
6213
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className, children: /* @__PURE__ */ jsxRuntime.jsx(
6214
+ EnhancedSelect,
6215
+ {
6216
+ label,
6217
+ value: value || "",
6218
+ onValueChange: handleChange,
6219
+ options,
6220
+ placeholder
6221
+ }
6222
+ ) });
6223
+ }
6224
+ const displayValue = value ? renderValue ? renderValue(value) : value : placeholder;
6225
+ return /* @__PURE__ */ jsxRuntime.jsx(
6226
+ "div",
6227
+ {
6228
+ className: cn("cursor-pointer transition-colors hover:bg-muted/50 rounded-md -mx-2 px-2 -my-1 py-1", className),
6229
+ onClick: () => setIsEditing(true),
6230
+ role: "button",
6231
+ tabIndex: 0,
6232
+ onKeyDown: (e) => {
6233
+ if (e.key === "Enter" || e.key === " ") {
6234
+ e.preventDefault();
6235
+ setIsEditing(true);
6236
+ }
6237
+ },
6238
+ children: /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label, value: displayValue })
6239
+ }
6240
+ );
6241
+ };
6242
+ var EntityCard = React15__namespace.forwardRef(
5584
6243
  ({
5585
6244
  entity,
5586
6245
  actions,
@@ -5626,7 +6285,7 @@ var EntityCard = React13__namespace.forwardRef(
5626
6285
  ] }),
5627
6286
  allActions.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenu, { children: [
5628
6287
  /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "ghost", size: "icon", className: "h-8 w-8", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MoreVertical, { className: "w-4 h-4" }) }) }),
5629
- /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuContent, { align: "end", children: allActions.map((action, index) => /* @__PURE__ */ jsxRuntime.jsxs(React13__namespace.Fragment, { children: [
6288
+ /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuContent, { align: "end", children: allActions.map((action, index) => /* @__PURE__ */ jsxRuntime.jsxs(React15__namespace.Fragment, { children: [
5630
6289
  /* @__PURE__ */ jsxRuntime.jsxs(
5631
6290
  DropdownMenuItem,
5632
6291
  {
@@ -5652,7 +6311,7 @@ var EntityCard = React13__namespace.forwardRef(
5652
6311
  }
5653
6312
  );
5654
6313
  EntityCard.displayName = "EntityCard";
5655
- var FormField = React13__namespace.forwardRef(
6314
+ var FormField = React15__namespace.forwardRef(
5656
6315
  ({ label, description, error, required, children, className, layout = "vertical" }, ref) => {
5657
6316
  const isHorizontal = layout === "horizontal";
5658
6317
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -5698,7 +6357,7 @@ var trendColors = {
5698
6357
  down: "destructive",
5699
6358
  neutral: "secondary"
5700
6359
  };
5701
- var MetricCard = React13__namespace.forwardRef(
6360
+ var MetricCard = React15__namespace.forwardRef(
5702
6361
  ({ title, value, description, trend, icon, variant = "default", className }, ref) => {
5703
6362
  const TrendIcon = trend ? trendIcons[trend.direction] : null;
5704
6363
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -5730,22 +6389,6 @@ var MetricCard = React13__namespace.forwardRef(
5730
6389
  }
5731
6390
  );
5732
6391
  MetricCard.displayName = "MetricCard";
5733
- var Popover = PopoverPrimitive__namespace.Root;
5734
- var PopoverTrigger = PopoverPrimitive__namespace.Trigger;
5735
- var PopoverContent = React13__namespace.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
5736
- PopoverPrimitive__namespace.Content,
5737
- {
5738
- ref,
5739
- align,
5740
- sideOffset,
5741
- className: cn(
5742
- "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",
5743
- className
5744
- ),
5745
- ...props
5746
- }
5747
- ) }));
5748
- PopoverContent.displayName = PopoverPrimitive__namespace.Content.displayName;
5749
6392
  var Toaster = ({ ...props }) => {
5750
6393
  const { theme = "system" } = nextThemes.useTheme();
5751
6394
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -5766,7 +6409,7 @@ var Toaster = ({ ...props }) => {
5766
6409
  );
5767
6410
  };
5768
6411
  var Tabs = TabsPrimitive__namespace.Root;
5769
- var TabsList = React13__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
6412
+ var TabsList = React15__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
5770
6413
  TabsPrimitive__namespace.List,
5771
6414
  {
5772
6415
  ref,
@@ -5778,7 +6421,7 @@ var TabsList = React13__namespace.forwardRef(({ className, ...props }, ref) => /
5778
6421
  }
5779
6422
  ));
5780
6423
  TabsList.displayName = TabsPrimitive__namespace.List.displayName;
5781
- var TabsTrigger = React13__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
6424
+ var TabsTrigger = React15__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
5782
6425
  TabsPrimitive__namespace.Trigger,
5783
6426
  {
5784
6427
  ref,
@@ -5790,7 +6433,7 @@ var TabsTrigger = React13__namespace.forwardRef(({ className, ...props }, ref) =
5790
6433
  }
5791
6434
  ));
5792
6435
  TabsTrigger.displayName = TabsPrimitive__namespace.Trigger.displayName;
5793
- var TabsContent = React13__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
6436
+ var TabsContent = React15__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
5794
6437
  TabsPrimitive__namespace.Content,
5795
6438
  {
5796
6439
  ref,
@@ -5803,7 +6446,7 @@ var TabsContent = React13__namespace.forwardRef(({ className, ...props }, ref) =
5803
6446
  ));
5804
6447
  TabsContent.displayName = TabsPrimitive__namespace.Content.displayName;
5805
6448
  var ToastProvider = ToastPrimitives__namespace.Provider;
5806
- var ToastViewport = React13__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
6449
+ var ToastViewport = React15__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
5807
6450
  ToastPrimitives__namespace.Viewport,
5808
6451
  {
5809
6452
  ref,
@@ -5829,7 +6472,7 @@ var toastVariants = classVarianceAuthority.cva(
5829
6472
  }
5830
6473
  }
5831
6474
  );
5832
- var Toast = React13__namespace.forwardRef(({ className, variant, ...props }, ref) => {
6475
+ var Toast = React15__namespace.forwardRef(({ className, variant, ...props }, ref) => {
5833
6476
  return /* @__PURE__ */ jsxRuntime.jsx(
5834
6477
  ToastPrimitives__namespace.Root,
5835
6478
  {
@@ -5840,7 +6483,7 @@ var Toast = React13__namespace.forwardRef(({ className, variant, ...props }, ref
5840
6483
  );
5841
6484
  });
5842
6485
  Toast.displayName = ToastPrimitives__namespace.Root.displayName;
5843
- var ToastAction = React13__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
6486
+ var ToastAction = React15__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
5844
6487
  ToastPrimitives__namespace.Action,
5845
6488
  {
5846
6489
  ref,
@@ -5852,7 +6495,7 @@ var ToastAction = React13__namespace.forwardRef(({ className, ...props }, ref) =
5852
6495
  }
5853
6496
  ));
5854
6497
  ToastAction.displayName = ToastPrimitives__namespace.Action.displayName;
5855
- var ToastClose = React13__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
6498
+ var ToastClose = React15__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
5856
6499
  ToastPrimitives__namespace.Close,
5857
6500
  {
5858
6501
  ref,
@@ -5866,7 +6509,7 @@ var ToastClose = React13__namespace.forwardRef(({ className, ...props }, ref) =>
5866
6509
  }
5867
6510
  ));
5868
6511
  ToastClose.displayName = ToastPrimitives__namespace.Close.displayName;
5869
- var ToastTitle = React13__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
6512
+ var ToastTitle = React15__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
5870
6513
  ToastPrimitives__namespace.Title,
5871
6514
  {
5872
6515
  ref,
@@ -5875,7 +6518,7 @@ var ToastTitle = React13__namespace.forwardRef(({ className, ...props }, ref) =>
5875
6518
  }
5876
6519
  ));
5877
6520
  ToastTitle.displayName = ToastPrimitives__namespace.Title.displayName;
5878
- var ToastDescription = React13__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
6521
+ var ToastDescription = React15__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
5879
6522
  ToastPrimitives__namespace.Description,
5880
6523
  {
5881
6524
  ref,
@@ -5884,6 +6527,19 @@ var ToastDescription = React13__namespace.forwardRef(({ className, ...props }, r
5884
6527
  }
5885
6528
  ));
5886
6529
  ToastDescription.displayName = ToastPrimitives__namespace.Description.displayName;
6530
+ var TransactionTypeBadge = ({
6531
+ transactionType,
6532
+ isInbound,
6533
+ className
6534
+ }) => {
6535
+ const Icon2 = isInbound ? lucideReact.ArrowDownRight : lucideReact.ArrowUpRight;
6536
+ const variant = "outline";
6537
+ return /* @__PURE__ */ jsxRuntime.jsxs(Badge, { variant, className, children: [
6538
+ isInbound && /* @__PURE__ */ jsxRuntime.jsx(Icon2, { className: "w-3 h-3 mr-1" }),
6539
+ transactionType,
6540
+ !isInbound && /* @__PURE__ */ jsxRuntime.jsx(Icon2, { className: "w-3 h-3 ml-1" })
6541
+ ] });
6542
+ };
5887
6543
  var mockCounterparties = [
5888
6544
  {
5889
6545
  id: "1",
@@ -6098,8 +6754,8 @@ var transactionColumns = [
6098
6754
  { key: "date", title: "Date", sortable: true }
6099
6755
  ];
6100
6756
  function DashboardDemo() {
6101
- const [sortBy, setSortBy] = React13__namespace.useState();
6102
- const [sortDirection, setSortDirection] = React13__namespace.useState("asc");
6757
+ const [sortBy, setSortBy] = React15__namespace.useState();
6758
+ const [sortDirection, setSortDirection] = React15__namespace.useState("asc");
6103
6759
  const handleSort = (key) => {
6104
6760
  if (sortBy === key) {
6105
6761
  setSortDirection(sortDirection === "asc" ? "desc" : "asc");
@@ -6233,7 +6889,7 @@ var badgeVariants2 = [
6233
6889
  "suspended"
6234
6890
  ];
6235
6891
  function ColorSwatch({ color }) {
6236
- const [copied, setCopied] = React13__namespace.useState(false);
6892
+ const [copied, setCopied] = React15__namespace.useState(false);
6237
6893
  const copyToClipboard = () => {
6238
6894
  navigator.clipboard.writeText(color.value);
6239
6895
  setCopied(true);
@@ -6339,8 +6995,8 @@ var tableColumns = [
6339
6995
  { key: "verified", title: "Verified", sortable: true }
6340
6996
  ];
6341
6997
  function UIKitShowcase() {
6342
- const [sortBy, setSortBy] = React13__namespace.useState();
6343
- const [sortDirection, setSortDirection] = React13__namespace.useState("asc");
6998
+ const [sortBy, setSortBy] = React15__namespace.useState();
6999
+ const [sortDirection, setSortDirection] = React15__namespace.useState("asc");
6344
7000
  const handleSort = (key) => {
6345
7001
  if (sortBy === key) {
6346
7002
  setSortDirection(sortDirection === "asc" ? "desc" : "asc");
@@ -6477,10 +7133,15 @@ var mockAlerts = [
6477
7133
  type: "Ofac",
6478
7134
  status: "Unassigned",
6479
7135
  contextType: "Ofac",
6480
- description: "INDIVIDUAL: ali hassan is flagged for OFAC",
7136
+ description: "WIRE TRANSFER: Multiple OFAC matches detected for beneficiary bank",
6481
7137
  timeline: [
6482
7138
  { id: "1", timestamp: "2025-09-30 03:00:21", user: "System", action: "Alert Created", status: "Unassigned" },
6483
- { id: "2", timestamp: "2025-09-30 09:15:32", user: "John Smith", action: "Alert Assigned", details: "Assigned to compliance team", status: "In Progress" }
7139
+ { id: "2", timestamp: "2025-09-30 09:15:32", user: "John Smith", action: "Alert Assigned", details: "Assigned to compliance team", status: "In Progress" },
7140
+ { id: "3", timestamp: "2025-09-30 10:22:15", user: "John Smith", action: "Note added", details: "Added RFI note requesting documentation" },
7141
+ { id: "4", timestamp: "2025-09-30 10:25:00", user: "John Smith", action: "Document added", details: "Uploaded passport_scan.pdf" },
7142
+ { id: "5", timestamp: "2025-09-30 11:50:00", user: "Sarah Johnson", action: "Document added", details: "Uploaded proof_of_address.jpg" },
7143
+ { id: "6", timestamp: "2025-10-01 08:30:00", user: "System", action: "RFI Status change", details: "Status changed from Pending to Provided" },
7144
+ { id: "7", timestamp: "2025-10-01 14:20:00", user: "Michael Chen", action: "Alert Approved", details: "Approved after review - false positive confirmed" }
6484
7145
  ],
6485
7146
  notes: [
6486
7147
  { id: "1", timestamp: "2025-09-30 10:22:15", user: "John Smith", content: "Reviewing OFAC match. Need to verify identity documents.", type: "RFI Note" },
@@ -6511,111 +7172,45 @@ var mockAlerts = [
6511
7172
  }
6512
7173
  ],
6513
7174
  contextData: {
6514
- entityName: "Ali Hassan",
6515
- entityType: "Individual",
6516
- matchScore: "95%",
6517
- listName: "OFAC SDN List",
6518
- flaggedItems: [
6519
- { field: "Name", value: "Ali Hassan", matchScore: "95%" },
6520
- { field: "DOB", value: "1985-03-12", matchScore: "100%" }
6521
- ],
6522
- sdns: [
6523
- {
6524
- uid: 12345,
6525
- firstName: "Ali",
6526
- lastName: "Hassan",
6527
- sdnType: "Individual",
6528
- programs: ["SYRIA", "SDGT"],
6529
- title: "Military Commander",
6530
- remarks: "DOB 12 Mar 1985; POB Damascus, Syria; Passport D1234567 (Syria); alt. Passport E7654321 (Lebanon); Linked to Entity XYZ",
6531
- nationalities: ["Syria", "Lebanon"],
6532
- citizenships: ["Syria"],
6533
- dateOfBirthList: [
6534
- { dateOfBirth: "1985-03-12", mainEntry: true },
6535
- { dateOfBirth: "1985-03-15", mainEntry: false }
6536
- ],
6537
- placeOfBirthList: [
6538
- { placeOfBirth: "Damascus, Syria", mainEntry: true },
6539
- { placeOfBirth: "Aleppo, Syria", mainEntry: false }
6540
- ],
6541
- akaList: [
6542
- { category: "strong", firstName: "Ali", lastName: "Al-Hassan" },
6543
- { category: "weak", firstName: "Ali", lastName: "Hasan" },
6544
- { category: "strong", firstName: "Ali Hassan", lastName: "Mohamed" }
6545
- ],
6546
- idList: [
6547
- { idType: "Passport", idNumber: "D1234567", idCountry: "Syria", issueDate: "2010-01-15", expirationDate: "2020-01-15" },
6548
- { idType: "Passport", idNumber: "E7654321", idCountry: "Lebanon", issueDate: "2015-06-20", expirationDate: "2025-06-20" },
6549
- { idType: "National ID", idNumber: "SY123456789", idCountry: "Syria" }
6550
- ]
6551
- }
6552
- ],
6553
- addresses: [
6554
- {
6555
- uid: 67890,
6556
- address1: "Building 42, Al-Mazzeh",
6557
- city: "Damascus",
6558
- stateOrProvince: "Damascus Governorate",
6559
- postalCode: "12345",
6560
- country: "Syria",
6561
- addressRemarks: "Primary Residence"
6562
- },
7175
+ ofacId: 5043462,
7176
+ counterpartyName: null,
7177
+ counterpartyId: null,
7178
+ businessName: null,
7179
+ businessId: null,
7180
+ individualName: null,
7181
+ individualId: null,
7182
+ uboId: null,
7183
+ transactionPaymentId: "5c73200c-3ade-4ba5-b6e6-39ad4b519fab",
7184
+ tenantId: "JakeUAT",
7185
+ alertId: 4425,
7186
+ note: null,
7187
+ status: "REVIEW",
7188
+ createdAt: 1760162113,
7189
+ updatedAt: 176016211300416e-5,
7190
+ updatedBy: null,
7191
+ ofacCheckDetails: [
6563
7192
  {
6564
- uid: 67891,
6565
- address1: "Apartment 15, Hamra Street",
6566
- city: "Beirut",
6567
- country: "Lebanon",
6568
- addressRemarks: "Secondary Address"
7193
+ id: 24870,
7194
+ checkKey: "originatorName",
7195
+ checkValue: "Kim jung un"
6569
7196
  },
6570
7197
  {
6571
- uid: 67892,
6572
- address1: "Office 203, Business District",
6573
- city: "Aleppo",
6574
- stateOrProvince: "Aleppo Governorate",
6575
- country: "Syria",
6576
- addressRemarks: "Business Address - Suspected Front Company"
6577
- }
6578
- ],
6579
- alt_names: [
6580
- { uid: 54321, type: "aka", category: "strong", firstName: "Ali", lastName: "Al-Hassan" },
6581
- { uid: 54322, type: "aka", category: "weak", firstName: "Ali", lastName: "Hasan" },
6582
- { uid: 54323, type: "aka", category: "strong", firstName: "Ali Hassan", lastName: "Mohamed" },
6583
- { uid: 54324, type: "fka", category: "weak", firstName: "Ali", lastName: "Hassani" }
6584
- ],
6585
- sanctions_entries: [
6586
- {
6587
- program: "SYRIA",
6588
- effectiveDate: "2015-03-15",
6589
- authority: "Executive Order 13572",
6590
- legalBasis: "Involvement in human rights abuses in Syria"
7198
+ id: 24871,
7199
+ checkKey: "originatorBankName",
7200
+ checkValue: "TD bank"
6591
7201
  },
6592
7202
  {
6593
- program: "SDGT",
6594
- effectiveDate: "2016-08-22",
6595
- authority: "Executive Order 13224",
6596
- legalBasis: "Specially Designated Global Terrorist"
6597
- }
6598
- ],
6599
- associated_entities: [
6600
- {
6601
- entityName: "XYZ Trading Company",
6602
- relationship: "Director",
6603
- entityType: "Business"
7203
+ id: 24872,
7204
+ checkKey: "beneficiaryName",
7205
+ checkValue: "Jake from Braid LLC"
6604
7206
  },
6605
7207
  {
6606
- entityName: "Hassan Family Trust",
6607
- relationship: "Beneficiary",
6608
- entityType: "Trust"
7208
+ id: 24873,
7209
+ checkKey: "beneficiaryBankName",
7210
+ checkValue: "RUssian bank"
6609
7211
  }
6610
7212
  ],
6611
- screening_metadata: {
6612
- screenedAt: "2025-09-30T03:00:21Z",
6613
- screeningEngine: "OFAC Advanced Matcher v3.2",
6614
- datasetVersion: "2025-09-25",
6615
- totalRecordsScreened: 1,
6616
- matchAlgorithm: "Fuzzy + Phonetic",
6617
- confidenceThreshold: 0.85
6618
- }
7213
+ 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"}`
6619
7214
  }
6620
7215
  },
6621
7216
  {
@@ -6704,9 +7299,9 @@ var mockAlerts = [
6704
7299
 
6705
7300
  // src/hooks/useAlertDetail.ts
6706
7301
  var useAlertDetail = (id) => {
6707
- const alert = React13.useMemo(() => mockAlerts.find((a) => a.id === id), [id]);
6708
- const [rfiStatus, setRfiStatus] = React13.useState(alert?.rfiStatus || "");
6709
- const [assignee, setAssignee] = React13.useState(alert?.assignee || "Unassigned");
7302
+ const alert = React15.useMemo(() => mockAlerts.find((a) => a.id === id), [id]);
7303
+ const [rfiStatus, setRfiStatus] = React15.useState(alert?.rfiStatus || "");
7304
+ const [assignee, setAssignee] = React15.useState(alert?.assignee || "Unassigned");
6710
7305
  const handleRfiStatusChange = (newStatus) => {
6711
7306
  setRfiStatus(newStatus);
6712
7307
  console.log("RFI Status updated to:", newStatus);
@@ -6715,6 +7310,11 @@ var useAlertDetail = (id) => {
6715
7310
  setAssignee(newAssignee);
6716
7311
  console.log("Assignee updated to:", newAssignee);
6717
7312
  };
7313
+ const handleResolveAlert = async (data) => {
7314
+ console.log("Resolving alert with data:", data);
7315
+ await new Promise((resolve) => setTimeout(resolve, 1e3));
7316
+ console.log("Alert resolved successfully");
7317
+ };
6718
7318
  return {
6719
7319
  alert,
6720
7320
  isLoading: false,
@@ -6722,18 +7322,21 @@ var useAlertDetail = (id) => {
6722
7322
  rfiStatus,
6723
7323
  assignee,
6724
7324
  handleRfiStatusChange,
6725
- handleAssigneeChange
7325
+ handleAssigneeChange,
7326
+ handleResolveAlert
6726
7327
  };
6727
7328
  };
6728
7329
  var AlertDetail = () => {
6729
7330
  const { id } = reactRouterDom.useParams();
6730
7331
  const navigate = reactRouterDom.useNavigate();
7332
+ const [resolveDialogOpen, setResolveDialogOpen] = React15.useState(false);
6731
7333
  const {
6732
7334
  alert,
6733
7335
  rfiStatus,
6734
7336
  assignee,
6735
7337
  handleRfiStatusChange,
6736
- handleAssigneeChange
7338
+ handleAssigneeChange,
7339
+ handleResolveAlert
6737
7340
  } = useAlertDetail(id);
6738
7341
  if (!alert) {
6739
7342
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "container mx-auto px-4 py-8", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center", children: [
@@ -6746,46 +7349,53 @@ var AlertDetail = () => {
6746
7349
  /* @__PURE__ */ jsxRuntime.jsx(Button, { onClick: () => navigate("/alerts"), children: "Back to Alerts" })
6747
7350
  ] }) });
6748
7351
  }
6749
- return /* @__PURE__ */ jsxRuntime.jsx(
7352
+ return /* @__PURE__ */ jsxRuntime.jsxs(
6750
7353
  PageLayout,
6751
7354
  {
6752
- title: `Alert #${alert.id}`,
6753
- description: alert.description,
7355
+ title: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
7356
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
7357
+ "Alert #",
7358
+ alert.id
7359
+ ] }),
7360
+ /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: getTypeBadgeVariant(alert.type), children: alert.type })
7361
+ ] }),
6754
7362
  maxWidth: "full",
6755
- actions: [
7363
+ headerContent: /* @__PURE__ */ jsxRuntime.jsx(
7364
+ AlertHeaderControls,
6756
7365
  {
6757
- label: "Back to Alerts",
6758
- variant: "outline",
6759
- onClick: () => navigate("/alerts")
6760
- },
6761
- {
6762
- label: "Assign",
6763
- variant: "outline",
6764
- onClick: () => console.log("Assign alert")
6765
- },
7366
+ status: alert.status,
7367
+ assignee,
7368
+ rfiStatus,
7369
+ onAssigneeChange: handleAssigneeChange,
7370
+ onRfiStatusChange: handleRfiStatusChange
7371
+ }
7372
+ ),
7373
+ actions: [
6766
7374
  {
6767
- label: "Close Alert",
7375
+ label: "Resolve Alert",
6768
7376
  variant: "default",
6769
- onClick: () => console.log("Close alert")
7377
+ onClick: () => setResolveDialogOpen(true)
6770
7378
  }
6771
7379
  ],
6772
- children: /* @__PURE__ */ jsxRuntime.jsx(
6773
- AlertDetailView,
6774
- {
6775
- alert,
6776
- rfiStatus,
6777
- assignee,
6778
- onRfiStatusChange: handleRfiStatusChange,
6779
- onAssigneeChange: handleAssigneeChange
6780
- }
6781
- )
7380
+ children: [
7381
+ /* @__PURE__ */ jsxRuntime.jsx(AlertDetailRouter, { alert }),
7382
+ /* @__PURE__ */ jsxRuntime.jsx(
7383
+ ResolveAlertDialog,
7384
+ {
7385
+ alertId: alert.id,
7386
+ open: resolveDialogOpen,
7387
+ onOpenChange: setResolveDialogOpen,
7388
+ onResolve: handleResolveAlert
7389
+ }
7390
+ )
7391
+ ]
6782
7392
  }
6783
7393
  );
6784
7394
  };
6785
7395
  var AlertDetail_default = AlertDetail;
6786
7396
  var Alerts = () => {
6787
7397
  const navigate = reactRouterDom.useNavigate();
6788
- const [filters, setFilters] = React13.useState({
7398
+ const [filters, setFilters] = React15.useState({
6789
7399
  alertId: "",
6790
7400
  contextId: "",
6791
7401
  contextType: "",
@@ -6796,9 +7406,9 @@ var Alerts = () => {
6796
7406
  startDate: "",
6797
7407
  endDate: ""
6798
7408
  });
6799
- const [filteredAlerts, setFilteredAlerts] = React13.useState(mockAlerts);
6800
- const [currentPage, setCurrentPage] = React13.useState(1);
6801
- const [rowsPerPage, setRowsPerPage] = React13.useState(100);
7409
+ const [filteredAlerts, setFilteredAlerts] = React15.useState(mockAlerts);
7410
+ const [currentPage, setCurrentPage] = React15.useState(1);
7411
+ const [rowsPerPage, setRowsPerPage] = React15.useState(100);
6802
7412
  const handleFilterChange = (field, value) => {
6803
7413
  setFilters((prev) => ({ ...prev, [field]: value }));
6804
7414
  };
@@ -7141,11 +7751,11 @@ var mockBusinessesList = [
7141
7751
  ];
7142
7752
  var Businesses = () => {
7143
7753
  const navigate = reactRouterDom.useNavigate();
7144
- const [businesses, setBusinesses] = React13.useState(mockBusinessesList);
7145
- const [filteredBusinesses, setFilteredBusinesses] = React13.useState(mockBusinessesList);
7146
- const [sortBy, setSortBy] = React13.useState("created");
7147
- const [sortDirection, setSortDirection] = React13.useState("desc");
7148
- const [filters, setFilters] = React13.useState({
7754
+ const [businesses, setBusinesses] = React15.useState(mockBusinessesList);
7755
+ const [filteredBusinesses, setFilteredBusinesses] = React15.useState(mockBusinessesList);
7756
+ const [sortBy, setSortBy] = React15.useState("created");
7757
+ const [sortDirection, setSortDirection] = React15.useState("desc");
7758
+ const [filters, setFilters] = React15.useState({
7149
7759
  name: "",
7150
7760
  productName: "",
7151
7761
  status: "",
@@ -7203,7 +7813,7 @@ var Businesses = () => {
7203
7813
  const handleRowClick = (business) => {
7204
7814
  navigate(`/business/${business.id}`);
7205
7815
  };
7206
- const columns = [
7816
+ const columns2 = [
7207
7817
  {
7208
7818
  key: "id",
7209
7819
  title: "Business ID",
@@ -7380,7 +7990,7 @@ var Businesses = () => {
7380
7990
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "container mx-auto px-4 h-full max-w-none flex flex-col", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 mt-4 overflow-auto", children: /* @__PURE__ */ jsxRuntime.jsx(
7381
7991
  DataTable,
7382
7992
  {
7383
- columns,
7993
+ columns: columns2,
7384
7994
  data: sortedBusinesses,
7385
7995
  sortBy,
7386
7996
  sortDirection,
@@ -7464,6 +8074,9 @@ var businessCounterparties = [
7464
8074
  }
7465
8075
  ];
7466
8076
  var Business = () => {
8077
+ const { id } = reactRouterDom.useParams();
8078
+ const business = mockBusinessesList.find((b) => b.id === id);
8079
+ const [currentStatus, setCurrentStatus] = React15.useState(business?.status || "active");
7467
8080
  const accountColumns = [
7468
8081
  {
7469
8082
  key: "number",
@@ -7487,80 +8100,107 @@ var Business = () => {
7487
8100
  render: (value) => /* @__PURE__ */ jsxRuntime.jsx(StatusBadge, { status: value })
7488
8101
  }
7489
8102
  ];
7490
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "container mx-auto p-6 space-y-6", children: [
7491
- /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-3xl font-bold tracking-tight", children: "Business Management" }) }),
7492
- /* @__PURE__ */ jsxRuntime.jsxs(Tabs, { defaultValue: "profile", className: "space-y-6", children: [
7493
- /* @__PURE__ */ jsxRuntime.jsxs(TabsList, { className: "inline-flex gap-8 h-auto bg-transparent border-b border-border w-full p-0 rounded-none justify-start", children: [
7494
- /* @__PURE__ */ jsxRuntime.jsx(
7495
- TabsTrigger,
7496
- {
7497
- value: "profile",
7498
- 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",
7499
- children: "Profile"
7500
- }
7501
- ),
7502
- /* @__PURE__ */ jsxRuntime.jsx(
7503
- TabsTrigger,
7504
- {
7505
- value: "kyc",
7506
- 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",
7507
- children: "KYC"
7508
- }
7509
- ),
8103
+ if (!business) {
8104
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "container mx-auto px-4 py-8", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center", children: [
8105
+ /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-2xl font-bold mb-2", children: "Business Not Found" }),
8106
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground mb-4", children: "The business could not be found." })
8107
+ ] }) });
8108
+ }
8109
+ return /* @__PURE__ */ jsxRuntime.jsx(
8110
+ PageLayout,
8111
+ {
8112
+ title: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
8113
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: business.businessName }),
7510
8114
  /* @__PURE__ */ jsxRuntime.jsx(
7511
- TabsTrigger,
8115
+ EditableInfoField,
7512
8116
  {
7513
- value: "counterparty",
7514
- 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",
7515
- children: "Counterparty"
8117
+ label: "",
8118
+ value: currentStatus,
8119
+ options: [
8120
+ { value: "active", label: "Active" },
8121
+ { value: "inactive", label: "Inactive" },
8122
+ { value: "suspended", label: "Suspended" }
8123
+ ],
8124
+ onChange: (newStatus) => setCurrentStatus(newStatus),
8125
+ renderValue: (value) => /* @__PURE__ */ jsxRuntime.jsx(StatusBadge, { status: value.toUpperCase() }),
8126
+ className: "inline-block"
7516
8127
  }
7517
8128
  )
7518
8129
  ] }),
7519
- /* @__PURE__ */ jsxRuntime.jsx(TabsContent, { value: "profile", className: "space-y-0", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col lg:flex-row items-start gap-6", children: [
7520
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 space-y-6", children: [
7521
- /* @__PURE__ */ jsxRuntime.jsx(BusinessProfileCard, { isEditing: false, onToggleEdit: () => {
7522
- } }),
7523
- /* @__PURE__ */ jsxRuntime.jsxs(Card, { children: [
7524
- /* @__PURE__ */ jsxRuntime.jsxs(CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-4", children: [
7525
- /* @__PURE__ */ jsxRuntime.jsx(CardTitle, { children: "Accounts" }),
7526
- /* @__PURE__ */ jsxRuntime.jsx(Button, { size: "sm", children: "+ New Account" })
7527
- ] }),
7528
- /* @__PURE__ */ jsxRuntime.jsx(CardContent, { children: /* @__PURE__ */ jsxRuntime.jsx(
7529
- DataTable,
7530
- {
7531
- columns: accountColumns,
7532
- data: businessAccounts,
7533
- emptyMessage: "No accounts found"
7534
- }
7535
- ) })
7536
- ] })
8130
+ maxWidth: "full",
8131
+ children: /* @__PURE__ */ jsxRuntime.jsxs(Tabs, { defaultValue: "profile", className: "space-y-6", children: [
8132
+ /* @__PURE__ */ jsxRuntime.jsxs(TabsList, { className: "inline-flex gap-8 h-auto bg-transparent border-b border-border w-full p-0 rounded-none justify-start", children: [
8133
+ /* @__PURE__ */ jsxRuntime.jsx(
8134
+ TabsTrigger,
8135
+ {
8136
+ value: "profile",
8137
+ 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",
8138
+ children: "Profile"
8139
+ }
8140
+ ),
8141
+ /* @__PURE__ */ jsxRuntime.jsx(
8142
+ TabsTrigger,
8143
+ {
8144
+ value: "kyc",
8145
+ 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",
8146
+ children: "KYC"
8147
+ }
8148
+ ),
8149
+ /* @__PURE__ */ jsxRuntime.jsx(
8150
+ TabsTrigger,
8151
+ {
8152
+ value: "counterparty",
8153
+ 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",
8154
+ children: "Counterparty"
8155
+ }
8156
+ )
7537
8157
  ] }),
7538
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "lg:w-64", children: /* @__PURE__ */ jsxRuntime.jsx(BusinessStatusCard, { isEditing: false, onToggleEdit: () => {
7539
- } }) })
7540
- ] }) }),
7541
- /* @__PURE__ */ jsxRuntime.jsx(TabsContent, { value: "kyc", className: "space-y-0", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-8 text-center text-muted-foreground", children: "KYC content coming soon" }) }),
7542
- /* @__PURE__ */ jsxRuntime.jsx(TabsContent, { value: "counterparty", className: "space-y-0", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 gap-6", children: businessCounterparties.map((counterparty) => /* @__PURE__ */ jsxRuntime.jsxs(Card, { children: [
7543
- /* @__PURE__ */ jsxRuntime.jsxs(CardHeader, { children: [
7544
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
7545
- /* @__PURE__ */ jsxRuntime.jsx(CardTitle, { className: "text-lg", children: counterparty.name }),
7546
- /* @__PURE__ */ jsxRuntime.jsx(CounterpartyTypeBadge, { type: counterparty.type })
8158
+ /* @__PURE__ */ jsxRuntime.jsx(TabsContent, { value: "profile", className: "space-y-0", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col lg:flex-row items-start gap-6", children: [
8159
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 space-y-6", children: [
8160
+ /* @__PURE__ */ jsxRuntime.jsx(BusinessProfileCard, { isEditing: false, onToggleEdit: () => {
8161
+ } }),
8162
+ /* @__PURE__ */ jsxRuntime.jsxs(Card, { children: [
8163
+ /* @__PURE__ */ jsxRuntime.jsxs(CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-4", children: [
8164
+ /* @__PURE__ */ jsxRuntime.jsx(CardTitle, { children: "Accounts" }),
8165
+ /* @__PURE__ */ jsxRuntime.jsx(Button, { size: "sm", children: "+ New Account" })
8166
+ ] }),
8167
+ /* @__PURE__ */ jsxRuntime.jsx(CardContent, { children: /* @__PURE__ */ jsxRuntime.jsx(
8168
+ DataTable,
8169
+ {
8170
+ columns: accountColumns,
8171
+ data: businessAccounts,
8172
+ emptyMessage: "No accounts found"
8173
+ }
8174
+ ) })
8175
+ ] })
7547
8176
  ] }),
7548
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-2 mt-2", children: /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: counterparty.status === "active" ? "default" : "secondary", children: counterparty.status }) })
7549
- ] }),
7550
- /* @__PURE__ */ jsxRuntime.jsxs(CardContent, { className: "space-y-3", children: [
7551
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: counterparty.description }),
7552
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between items-center text-sm", children: [
7553
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: "Last Transaction" }),
7554
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium", children: counterparty.lastTransaction })
8177
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "lg:w-64", children: /* @__PURE__ */ jsxRuntime.jsx(BusinessStatusCard, { isEditing: false, onToggleEdit: () => {
8178
+ } }) })
8179
+ ] }) }),
8180
+ /* @__PURE__ */ jsxRuntime.jsx(TabsContent, { value: "kyc", className: "space-y-0", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-8 text-center text-muted-foreground", children: "KYC content coming soon" }) }),
8181
+ /* @__PURE__ */ jsxRuntime.jsx(TabsContent, { value: "counterparty", className: "space-y-0", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 gap-6", children: businessCounterparties.map((counterparty) => /* @__PURE__ */ jsxRuntime.jsxs(Card, { children: [
8182
+ /* @__PURE__ */ jsxRuntime.jsxs(CardHeader, { children: [
8183
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
8184
+ /* @__PURE__ */ jsxRuntime.jsx(CardTitle, { className: "text-lg", children: counterparty.name }),
8185
+ /* @__PURE__ */ jsxRuntime.jsx(CounterpartyTypeBadge, { type: counterparty.type })
8186
+ ] }),
8187
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-2 mt-2", children: /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: counterparty.status === "active" ? "default" : "secondary", children: counterparty.status }) })
8188
+ ] }),
8189
+ /* @__PURE__ */ jsxRuntime.jsxs(CardContent, { className: "space-y-3", children: [
8190
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: counterparty.description }),
8191
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between items-center text-sm", children: [
8192
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: "Last Transaction" }),
8193
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium", children: counterparty.lastTransaction })
8194
+ ] })
7555
8195
  ] })
7556
- ] })
7557
- ] }, counterparty.id)) }) })
7558
- ] })
7559
- ] });
8196
+ ] }, counterparty.id)) }) })
8197
+ ] })
8198
+ }
8199
+ );
7560
8200
  };
7561
8201
  var BusinessDetail_default = Business;
7562
8202
  var CreateBusiness = () => {
7563
- const [businessType, setBusinessType] = React13.useState("");
8203
+ const [businessType, setBusinessType] = React15.useState("");
7564
8204
  return /* @__PURE__ */ jsxRuntime.jsx(
7565
8205
  PageLayout,
7566
8206
  {
@@ -7759,7 +8399,7 @@ var Cases = () => {
7759
8399
  };
7760
8400
  var Cases_default = Cases;
7761
8401
  var CreateCounterparty = () => {
7762
- const [counterpartyData, setCounterpartyData] = React13.useState(null);
8402
+ const [counterpartyData, setCounterpartyData] = React15.useState(null);
7763
8403
  const handleBasicInfoChange = (data) => {
7764
8404
  setCounterpartyData(data);
7765
8405
  };
@@ -7786,7 +8426,7 @@ var CreateCounterparty = () => {
7786
8426
  var Create_default2 = CreateCounterparty;
7787
8427
  var CounterpartyDomesticWire = () => {
7788
8428
  const { isEditing, handleToggleEdit, handleSave, handleCancel } = useEditState({});
7789
- const [transferType, setTransferType] = React13.useState("DOMESTIC");
8429
+ const [transferType, setTransferType] = React15.useState("DOMESTIC");
7790
8430
  return /* @__PURE__ */ jsxRuntime.jsx(
7791
8431
  PageLayout,
7792
8432
  {
@@ -7916,7 +8556,7 @@ var Dashboard = () => {
7916
8556
  var Dashboard_default = Dashboard;
7917
8557
  var NotFound = () => {
7918
8558
  const location = reactRouterDom.useLocation();
7919
- React13.useEffect(() => {
8559
+ React15.useEffect(() => {
7920
8560
  console.error(
7921
8561
  "404 Error: User attempted to access non-existent route:",
7922
8562
  location.pathname
@@ -7967,20 +8607,18 @@ var mockProducts = [
7967
8607
  { value: "PROD-003", label: "Money Market Account" },
7968
8608
  { value: "PROD-004", label: "Business Checking" }
7969
8609
  ];
7970
- var statementTypes = [
7971
- { value: "root", label: "Root" },
7972
- { value: "program", label: "Program" },
7973
- { value: "product", label: "Product" },
7974
- { value: "account", label: "Account" }
7975
- ];
7976
8610
  function Statement() {
7977
- const [statementType, setStatementType] = React13.useState("");
7978
- const [selectedProgram, setSelectedProgram] = React13.useState("");
7979
- const [selectedProduct, setSelectedProduct] = React13.useState("");
7980
- const [accountNumber, setAccountNumber] = React13.useState("");
7981
- const [startDate, setStartDate] = React13.useState();
7982
- const [endDate, setEndDate] = React13.useState();
7983
- const [statementGenerated, setStatementGenerated] = React13.useState(false);
8611
+ const [statementType, setStatementType] = React15.useState("");
8612
+ const [selectedProgram, setSelectedProgram] = React15.useState("");
8613
+ const [selectedProduct, setSelectedProduct] = React15.useState("");
8614
+ const [accountNumber, setAccountNumber] = React15.useState("");
8615
+ const [startDate, setStartDate] = React15.useState();
8616
+ const [endDate, setEndDate] = React15.useState();
8617
+ const [statementGenerated, setStatementGenerated] = React15.useState(false);
8618
+ const [programs] = React15.useState(mockPrograms);
8619
+ const [products] = React15.useState(mockProducts);
8620
+ const [statementHeader, setStatementHeader] = React15.useState(null);
8621
+ const [statementTransactions, setStatementTransactions] = React15.useState([]);
7984
8622
  const handleStatementTypeChange = (value) => {
7985
8623
  setStatementType(value);
7986
8624
  setSelectedProgram("");
@@ -7992,6 +8630,16 @@ function Statement() {
7992
8630
  if (statementType === "program" && !selectedProgram) return;
7993
8631
  if (statementType === "product" && !selectedProduct) return;
7994
8632
  if (statementType === "account" && !accountNumber) return;
8633
+ console.log("Generating statement with:", {
8634
+ statementType,
8635
+ selectedProgram,
8636
+ selectedProduct,
8637
+ accountNumber,
8638
+ startDate,
8639
+ endDate
8640
+ });
8641
+ setStatementHeader(mockStatementHeader);
8642
+ setStatementTransactions(mockStatementTransactions);
7995
8643
  setStatementGenerated(true);
7996
8644
  };
7997
8645
  const isGenerateDisabled = () => {
@@ -8001,34 +8649,6 @@ function Statement() {
8001
8649
  if (statementType === "account" && !accountNumber) return true;
8002
8650
  return false;
8003
8651
  };
8004
- const columns = [
8005
- {
8006
- key: "transactionType",
8007
- title: "Transaction Type",
8008
- sortable: true,
8009
- align: "left"
8010
- },
8011
- {
8012
- key: "direction",
8013
- title: "Direction",
8014
- sortable: true,
8015
- align: "left",
8016
- render: (value) => /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: value === "CREDIT" ? "success" : "secondary", children: value })
8017
- },
8018
- {
8019
- key: "amount",
8020
- title: "Amount",
8021
- sortable: true,
8022
- align: "right",
8023
- render: (value) => `$${value.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 })}`
8024
- },
8025
- {
8026
- key: "count",
8027
- title: "Count",
8028
- sortable: true,
8029
- align: "right"
8030
- }
8031
- ];
8032
8652
  const handleDownloadCSV = () => {
8033
8653
  console.log("Downloading CSV...");
8034
8654
  };
@@ -8038,148 +8658,33 @@ function Statement() {
8038
8658
  const handleEdit = () => {
8039
8659
  setStatementGenerated(false);
8040
8660
  };
8041
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "container mx-auto p-6 space-y-6", children: [
8042
- /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
8043
- /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-3xl font-bold tracking-tight", children: "Statement" }),
8044
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground mt-1", children: "Generate and view statement reports" })
8045
- ] }),
8046
- !statementGenerated && /* @__PURE__ */ jsxRuntime.jsxs(Card, { children: [
8047
- /* @__PURE__ */ jsxRuntime.jsx(CardHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(CardTitle, { size: "md", children: "Statement Parameters" }) }),
8048
- /* @__PURE__ */ jsxRuntime.jsxs(CardContent, { className: "space-y-4", children: [
8049
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4", children: [
8050
- /* @__PURE__ */ jsxRuntime.jsx(
8051
- EnhancedSelect,
8052
- {
8053
- label: "Statement Type",
8054
- placeholder: "Select type",
8055
- options: statementTypes,
8056
- value: statementType,
8057
- onValueChange: handleStatementTypeChange
8058
- }
8059
- ),
8060
- statementType === "program" && /* @__PURE__ */ jsxRuntime.jsx(
8061
- EnhancedSelect,
8062
- {
8063
- label: "Program Name",
8064
- placeholder: "Select program",
8065
- options: mockPrograms,
8066
- value: selectedProgram,
8067
- onValueChange: setSelectedProgram
8068
- }
8069
- ),
8070
- statementType === "product" && /* @__PURE__ */ jsxRuntime.jsx(
8071
- EnhancedSelect,
8072
- {
8073
- label: "Product Name",
8074
- placeholder: "Select product",
8075
- options: mockProducts,
8076
- value: selectedProduct,
8077
- onValueChange: setSelectedProduct
8078
- }
8079
- ),
8080
- statementType === "account" && /* @__PURE__ */ jsxRuntime.jsx(
8081
- EnhancedInput,
8082
- {
8083
- label: "Account Number",
8084
- placeholder: "Enter account number",
8085
- value: accountNumber,
8086
- onChange: (e) => setAccountNumber(e.target.value)
8087
- }
8088
- ),
8089
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2", children: [
8090
- /* @__PURE__ */ jsxRuntime.jsx("label", { className: "text-sm font-medium", children: "Start Date" }),
8091
- /* @__PURE__ */ jsxRuntime.jsxs(Popover, { children: [
8092
- /* @__PURE__ */ jsxRuntime.jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
8093
- Button,
8094
- {
8095
- variant: "outline",
8096
- className: cn(
8097
- "justify-start text-left font-normal",
8098
- !startDate && "text-muted-foreground"
8099
- ),
8100
- children: [
8101
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CalendarIcon, { className: "mr-2 h-4 w-4" }),
8102
- startDate ? dateFns.format(startDate, "MM/dd/yyyy") : "Select date"
8103
- ]
8104
- }
8105
- ) }),
8106
- /* @__PURE__ */ jsxRuntime.jsx(PopoverContent, { className: "w-auto p-0", align: "start", children: /* @__PURE__ */ jsxRuntime.jsx(
8107
- Calendar,
8108
- {
8109
- mode: "single",
8110
- selected: startDate,
8111
- onSelect: setStartDate,
8112
- initialFocus: true
8113
- }
8114
- ) })
8115
- ] })
8116
- ] }),
8117
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2", children: [
8118
- /* @__PURE__ */ jsxRuntime.jsx("label", { className: "text-sm font-medium", children: "End Date" }),
8119
- /* @__PURE__ */ jsxRuntime.jsxs(Popover, { children: [
8120
- /* @__PURE__ */ jsxRuntime.jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
8121
- Button,
8122
- {
8123
- variant: "outline",
8124
- className: cn(
8125
- "justify-start text-left font-normal",
8126
- !endDate && "text-muted-foreground"
8127
- ),
8128
- children: [
8129
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CalendarIcon, { className: "mr-2 h-4 w-4" }),
8130
- endDate ? dateFns.format(endDate, "MM/dd/yyyy") : "Select date"
8131
- ]
8132
- }
8133
- ) }),
8134
- /* @__PURE__ */ jsxRuntime.jsx(PopoverContent, { className: "w-auto p-0", align: "start", children: /* @__PURE__ */ jsxRuntime.jsx(
8135
- Calendar,
8136
- {
8137
- mode: "single",
8138
- selected: endDate,
8139
- onSelect: setEndDate,
8140
- initialFocus: true
8141
- }
8142
- ) })
8143
- ] })
8144
- ] })
8145
- ] }),
8146
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-end", children: /* @__PURE__ */ jsxRuntime.jsx(
8147
- Button,
8148
- {
8149
- onClick: handleGenerateStatement,
8150
- disabled: isGenerateDisabled(),
8151
- children: "Generate Statement"
8152
- }
8153
- ) })
8154
- ] })
8155
- ] }),
8156
- statementGenerated && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
8157
- /* @__PURE__ */ jsxRuntime.jsx(StatementHeader, { data: mockStatementHeader, onEdit: handleEdit }),
8158
- /* @__PURE__ */ jsxRuntime.jsxs(Card, { children: [
8159
- /* @__PURE__ */ jsxRuntime.jsxs(CardHeader, { direction: "row", children: [
8160
- /* @__PURE__ */ jsxRuntime.jsx(CardTitle, { size: "md", children: "Transaction Summary" }),
8161
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
8162
- /* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "outline", onClick: handleDownloadCSV, children: [
8163
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Download, { className: "h-4 w-4 mr-2" }),
8164
- "Download CSV"
8165
- ] }),
8166
- /* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "outline", onClick: handlePrintPDF, children: [
8167
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.FileText, { className: "h-4 w-4 mr-2" }),
8168
- "Print PDF"
8169
- ] })
8170
- ] })
8171
- ] }),
8172
- /* @__PURE__ */ jsxRuntime.jsx(CardContent, { children: /* @__PURE__ */ jsxRuntime.jsx(
8173
- DataTable,
8174
- {
8175
- columns,
8176
- data: mockStatementTransactions,
8177
- emptyMessage: "No transactions found"
8178
- }
8179
- ) })
8180
- ] })
8181
- ] })
8182
- ] });
8661
+ return /* @__PURE__ */ jsxRuntime.jsx(
8662
+ StatementView,
8663
+ {
8664
+ statementType,
8665
+ selectedProgram,
8666
+ selectedProduct,
8667
+ accountNumber,
8668
+ startDate,
8669
+ endDate,
8670
+ statementGenerated,
8671
+ programs,
8672
+ products,
8673
+ statementHeader,
8674
+ statementTransactions,
8675
+ onStatementTypeChange: handleStatementTypeChange,
8676
+ onProgramChange: setSelectedProgram,
8677
+ onProductChange: setSelectedProduct,
8678
+ onAccountNumberChange: setAccountNumber,
8679
+ onStartDateChange: setStartDate,
8680
+ onEndDateChange: setEndDate,
8681
+ onGenerateStatement: handleGenerateStatement,
8682
+ onEdit: handleEdit,
8683
+ onDownloadCSV: handleDownloadCSV,
8684
+ onPrintPDF: handlePrintPDF,
8685
+ isGenerateDisabled: isGenerateDisabled()
8686
+ }
8687
+ );
8183
8688
  }
8184
8689
 
8185
8690
  // src/lib/mock-data/transaction-data.ts
@@ -8188,13 +8693,15 @@ var mockTransactions = [
8188
8693
  id: "1",
8189
8694
  created: "2025-10-01 00:16",
8190
8695
  accountNumber: "126713605718",
8191
- amount: -7293.32,
8696
+ amount: 34539.18,
8192
8697
  customer: "Rise Works Inc",
8193
8698
  counterparty: "VEDANT JAYESHKUMAR PATI",
8194
8699
  description: "4NnuJKyD9a8LUmkm",
8195
8700
  transactionType: "Ach Originator Credit",
8196
8701
  status: "PENDING",
8702
+ processingStatus: "SENT",
8197
8703
  updated: "2025-10-01 00:16",
8704
+ isInbound: true,
8198
8705
  achDetails: {
8199
8706
  type: "ACH Credit",
8200
8707
  originatorName: "Rise Works Inc",
@@ -8249,7 +8756,9 @@ var mockTransactions = [
8249
8756
  description: "ACH Fee",
8250
8757
  transactionType: "Fee Ach Transaction",
8251
8758
  status: "POSTED",
8252
- updated: "2025-10-01 00:09"
8759
+ processingStatus: "CONFIRMED",
8760
+ updated: "2025-10-01 00:09",
8761
+ isInbound: false
8253
8762
  },
8254
8763
  {
8255
8764
  id: "3",
@@ -8261,7 +8770,9 @@ var mockTransactions = [
8261
8770
  description: "Invoice Payment #INV-2024-089",
8262
8771
  transactionType: "Wire Domestic Credit",
8263
8772
  status: "POSTED",
8773
+ processingStatus: "CONFIRMED",
8264
8774
  updated: "2025-10-01 00:12",
8775
+ isInbound: false,
8265
8776
  wireDetails: {
8266
8777
  type: "Domestic Wire",
8267
8778
  originatorName: "Tech Solutions LLC",
@@ -8359,7 +8870,9 @@ var mockTransactions = [
8359
8870
  description: "Vendor Payment",
8360
8871
  transactionType: "Ach Originator Debit",
8361
8872
  status: "POSTED",
8362
- updated: "2025-09-30 23:01"
8873
+ processingStatus: "CONFIRMED",
8874
+ updated: "2025-09-30 23:01",
8875
+ isInbound: false
8363
8876
  },
8364
8877
  {
8365
8878
  id: "5",
@@ -8371,7 +8884,9 @@ var mockTransactions = [
8371
8884
  description: "Contractor Payment",
8372
8885
  transactionType: "Ach Originator Credit",
8373
8886
  status: "PENDING",
8374
- updated: "2025-09-30 21:05"
8887
+ processingStatus: "CUSTOMER_REVIEW",
8888
+ updated: "2025-09-30 21:05",
8889
+ isInbound: false
8375
8890
  },
8376
8891
  {
8377
8892
  id: "6",
@@ -8383,7 +8898,9 @@ var mockTransactions = [
8383
8898
  description: "Monthly Rent Payment",
8384
8899
  transactionType: "Wire Domestic Debit",
8385
8900
  status: "POSTED",
8386
- updated: "2025-09-30 20:15"
8901
+ processingStatus: "CONFIRMED",
8902
+ updated: "2025-09-30 20:15",
8903
+ isInbound: false
8387
8904
  },
8388
8905
  {
8389
8906
  id: "7",
@@ -8395,7 +8912,9 @@ var mockTransactions = [
8395
8912
  description: "Wire Transfer Fee",
8396
8913
  transactionType: "Fee Wire Transaction",
8397
8914
  status: "POSTED",
8398
- updated: "2025-09-30 17:22"
8915
+ processingStatus: "CONFIRMED",
8916
+ updated: "2025-09-30 17:22",
8917
+ isInbound: false
8399
8918
  },
8400
8919
  {
8401
8920
  id: "8",
@@ -8407,7 +8926,9 @@ var mockTransactions = [
8407
8926
  description: "R&D Funding Transfer",
8408
8927
  transactionType: "Ach Originator Credit",
8409
8928
  status: "FAILED",
8410
- updated: "2025-09-30 16:10"
8929
+ processingStatus: "MANUAL_REVIEW",
8930
+ updated: "2025-09-30 16:10",
8931
+ isInbound: false
8411
8932
  }
8412
8933
  ];
8413
8934
  var mockTransactionTimeline = [
@@ -8452,9 +8973,9 @@ var mockTransactionTimeline = [
8452
8973
  ];
8453
8974
  var TransactionHistory = () => {
8454
8975
  const navigate = reactRouterDom.useNavigate();
8455
- const [currentPage, setCurrentPage] = React13.useState(1);
8456
- const [rowsPerPage, setRowsPerPage] = React13.useState(100);
8457
- const [filters, setFilters] = React13.useState({
8976
+ const [currentPage, setCurrentPage] = React15.useState(1);
8977
+ const [rowsPerPage, setRowsPerPage] = React15.useState(100);
8978
+ const [filters, setFilters] = React15.useState({
8458
8979
  accountNumber: "",
8459
8980
  product: "",
8460
8981
  customerId: "",
@@ -8946,7 +9467,10 @@ var newTransactionSchema = zod.z.object({
8946
9467
  counterpartyName: zod.z.string().min(1, "Counterparty name is required"),
8947
9468
  amount: zod.z.string().min(1, "Amount is required"),
8948
9469
  currency: zod.z.string().min(1, "Currency is required"),
8949
- description: zod.z.string().optional()
9470
+ description: zod.z.string().optional(),
9471
+ certifyInformation: zod.z.boolean().refine((val) => val === true, {
9472
+ message: "You must certify the information is correct"
9473
+ })
8950
9474
  });
8951
9475
  var TRANSACTION_TYPES = [
8952
9476
  { value: "transfer", label: "Transfer", icon: lucideReact.ArrowLeftRight },
@@ -8986,14 +9510,14 @@ var mockCounterpartyData = {
8986
9510
  };
8987
9511
  function NewTransaction() {
8988
9512
  const navigate = reactRouterDom.useNavigate();
8989
- const [accountLookedUp, setAccountLookedUp] = React13.useState(false);
8990
- const [accountData, setAccountData] = React13.useState(null);
8991
- const [counterpartyLookedUp, setCounterpartyLookedUp] = React13.useState(false);
8992
- const [counterpartyData, setCounterpartyData] = React13.useState(null);
8993
- const [confirmationOpen, setConfirmationOpen] = React13.useState(false);
8994
- const [submissionStatus, setSubmissionStatus] = React13.useState(null);
8995
- const [errorMessage, setErrorMessage] = React13.useState("");
8996
- const [transactionId, setTransactionId] = React13.useState("");
9513
+ const [accountLookedUp, setAccountLookedUp] = React15.useState(false);
9514
+ const [accountData, setAccountData] = React15.useState(null);
9515
+ const [counterpartyLookedUp, setCounterpartyLookedUp] = React15.useState(false);
9516
+ const [counterpartyData, setCounterpartyData] = React15.useState(null);
9517
+ const [confirmationOpen, setConfirmationOpen] = React15.useState(false);
9518
+ const [submissionStatus, setSubmissionStatus] = React15.useState(null);
9519
+ const [errorMessage, setErrorMessage] = React15.useState("");
9520
+ const [transactionId, setTransactionId] = React15.useState("");
8997
9521
  const form = reactHookForm.useForm({
8998
9522
  resolver: zod$1.zodResolver(newTransactionSchema),
8999
9523
  defaultValues: {
@@ -9002,7 +9526,8 @@ function NewTransaction() {
9002
9526
  counterpartyName: "",
9003
9527
  amount: "",
9004
9528
  currency: "USD",
9005
- description: ""
9529
+ description: "",
9530
+ certifyInformation: false
9006
9531
  }
9007
9532
  });
9008
9533
  const transactionType = form.watch("transactionType");
@@ -9128,7 +9653,6 @@ function NewTransaction() {
9128
9653
  PageLayout,
9129
9654
  {
9130
9655
  title: "New Transaction",
9131
- description: "Complete the form below to initiate a new transaction",
9132
9656
  children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "max-w-4xl mx-auto space-y-6", children: [
9133
9657
  /* @__PURE__ */ jsxRuntime.jsx(FormProvider, { form, children: /* @__PURE__ */ jsxRuntime.jsxs("form", { onSubmit: (e) => e.preventDefault(), children: [
9134
9658
  !accountLookedUp ? /* @__PURE__ */ jsxRuntime.jsx(
@@ -9136,21 +9660,20 @@ function NewTransaction() {
9136
9660
  {
9137
9661
  title: "Account Lookup",
9138
9662
  variant: "default",
9139
- children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
9140
- /* @__PURE__ */ jsxRuntime.jsx(
9663
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-3 items-start w-full", children: [
9664
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1", children: /* @__PURE__ */ jsxRuntime.jsx(
9141
9665
  FormInput,
9142
9666
  {
9143
9667
  name: "accountNumber",
9144
- label: "Account Number",
9145
9668
  placeholder: "Enter account number"
9146
9669
  }
9147
- ),
9670
+ ) }),
9148
9671
  /* @__PURE__ */ jsxRuntime.jsxs(
9149
9672
  Button,
9150
9673
  {
9151
9674
  onClick: handleAccountLookup,
9152
- className: "w-full sm:w-auto",
9153
9675
  disabled: !accountNumber,
9676
+ className: "shrink-0 mt-0 w-48",
9154
9677
  children: [
9155
9678
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: "h-4 w-4 mr-2" }),
9156
9679
  "Lookup Account"
@@ -9227,22 +9750,21 @@ function NewTransaction() {
9227
9750
  title: "Counterparty Lookup",
9228
9751
  variant: "default",
9229
9752
  className: cn(!transactionType && "opacity-50 pointer-events-none"),
9230
- children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
9231
- /* @__PURE__ */ jsxRuntime.jsx(
9753
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-3 items-start w-full", children: [
9754
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1", children: /* @__PURE__ */ jsxRuntime.jsx(
9232
9755
  FormInput,
9233
9756
  {
9234
9757
  name: "counterpartyName",
9235
- label: "Counterparty Name",
9236
9758
  placeholder: "Enter counterparty name",
9237
9759
  disabled: !transactionType
9238
9760
  }
9239
- ),
9761
+ ) }),
9240
9762
  /* @__PURE__ */ jsxRuntime.jsxs(
9241
9763
  Button,
9242
9764
  {
9243
9765
  onClick: handleCounterpartyLookup,
9244
- className: "w-full sm:w-auto",
9245
9766
  disabled: !transactionType || !counterpartyName,
9767
+ className: "shrink-0 mt-0 w-48",
9246
9768
  children: [
9247
9769
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: "h-4 w-4 mr-2" }),
9248
9770
  "Lookup Counterparty"
@@ -9301,7 +9823,8 @@ function NewTransaction() {
9301
9823
  name: "currency",
9302
9824
  label: "Currency",
9303
9825
  options: CURRENCY_OPTIONS,
9304
- disabled: !counterpartyLookedUp
9826
+ disabled: !counterpartyLookedUp,
9827
+ className: "w-48"
9305
9828
  }
9306
9829
  )
9307
9830
  ] }),
@@ -9324,6 +9847,34 @@ function NewTransaction() {
9324
9847
  variant: "default",
9325
9848
  children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
9326
9849
  /* @__PURE__ */ jsxRuntime.jsx(DataGrid, { data: reviewData, columns: 2 }),
9850
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "bg-muted/30 rounded-lg p-4 border border-border/50", children: /* @__PURE__ */ jsxRuntime.jsx(
9851
+ reactHookForm.Controller,
9852
+ {
9853
+ name: "certifyInformation",
9854
+ control: form.control,
9855
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
9856
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-3", children: [
9857
+ /* @__PURE__ */ jsxRuntime.jsx(
9858
+ Checkbox,
9859
+ {
9860
+ id: "certifyInformation",
9861
+ checked: field.value,
9862
+ onCheckedChange: field.onChange
9863
+ }
9864
+ ),
9865
+ /* @__PURE__ */ jsxRuntime.jsx(
9866
+ "label",
9867
+ {
9868
+ htmlFor: "certifyInformation",
9869
+ className: "text-sm font-medium leading-relaxed cursor-pointer select-none",
9870
+ children: "I certify that all information entered is correct and accurate to the best of my knowledge"
9871
+ }
9872
+ )
9873
+ ] }),
9874
+ form.formState.errors.certifyInformation && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-destructive ml-7", children: form.formState.errors.certifyInformation.message })
9875
+ ] })
9876
+ }
9877
+ ) }),
9327
9878
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-3 justify-end pt-4 border-t border-border", children: [
9328
9879
  /* @__PURE__ */ jsxRuntime.jsx(
9329
9880
  Button,
@@ -9341,7 +9892,7 @@ function NewTransaction() {
9341
9892
  type: "button",
9342
9893
  onClick: handleSubmit,
9343
9894
  className: "w-48",
9344
- disabled: !transactionType || !accountNumber || !counterpartyName || !amount,
9895
+ disabled: !transactionType || !accountNumber || !counterpartyName || !amount || !form.watch("certifyInformation"),
9345
9896
  children: [
9346
9897
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckCircle2, { className: "h-4 w-4 mr-2" }),
9347
9898
  "Submit Transaction"
@@ -9451,6 +10002,24 @@ var TransactionDetail = () => {
9451
10002
  return "outline";
9452
10003
  }
9453
10004
  };
10005
+ const getProcessingStatusVariant = (status) => {
10006
+ switch (status) {
10007
+ case "CONFIRMED":
10008
+ return "success";
10009
+ case "SENT":
10010
+ return "success";
10011
+ case "SUBMITTED":
10012
+ return "warning";
10013
+ case "CUSTOMER_REVIEW":
10014
+ return "warning";
10015
+ case "MANUAL_REVIEW":
10016
+ return "warning";
10017
+ case "INITIATED":
10018
+ return "outline";
10019
+ default:
10020
+ return "outline";
10021
+ }
10022
+ };
9454
10023
  const formatCurrency = (value) => {
9455
10024
  return new Intl.NumberFormat("en-US", {
9456
10025
  style: "currency",
@@ -9463,7 +10032,21 @@ var TransactionDetail = () => {
9463
10032
  return /* @__PURE__ */ jsxRuntime.jsx(
9464
10033
  PageLayout,
9465
10034
  {
9466
- title: `Transaction #${transaction.id}`,
10035
+ title: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
10036
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(
10037
+ "font-semibold",
10038
+ transaction.amount < 0 ? "text-destructive" : "text-success"
10039
+ ), children: formatCurrency(transaction.amount) }),
10040
+ /* @__PURE__ */ jsxRuntime.jsx(
10041
+ TransactionTypeBadge,
10042
+ {
10043
+ transactionType: transaction.transactionType,
10044
+ isInbound: transaction.isInbound
10045
+ }
10046
+ ),
10047
+ /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: getStatusVariant(transaction.status), children: transaction.status }),
10048
+ /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: getProcessingStatusVariant(transaction.processingStatus), children: transaction.processingStatus })
10049
+ ] }),
9467
10050
  maxWidth: "full",
9468
10051
  actions: [
9469
10052
  {
@@ -9480,33 +10063,6 @@ var TransactionDetail = () => {
9480
10063
  children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col lg:flex-row items-start gap-6", children: [
9481
10064
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 space-y-6", children: [
9482
10065
  /* @__PURE__ */ jsxRuntime.jsx(FormCard, { title: "Details", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-x-8 gap-y-4", children: [
9483
- /* @__PURE__ */ jsxRuntime.jsx(
9484
- InfoField,
9485
- {
9486
- label: "Transaction Type",
9487
- value: /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "outline", children: transaction.transactionType }),
9488
- layout: "horizontal"
9489
- }
9490
- ),
9491
- /* @__PURE__ */ jsxRuntime.jsx(
9492
- InfoField,
9493
- {
9494
- label: "Status",
9495
- value: /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: getStatusVariant(transaction.status), children: transaction.status }),
9496
- layout: "horizontal"
9497
- }
9498
- ),
9499
- /* @__PURE__ */ jsxRuntime.jsx(
9500
- InfoField,
9501
- {
9502
- label: "Amount",
9503
- value: /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(
9504
- "font-semibold",
9505
- transaction.amount < 0 ? "text-destructive" : "text-success"
9506
- ), children: formatCurrency(transaction.amount) }),
9507
- layout: "horizontal"
9508
- }
9509
- ),
9510
10066
  /* @__PURE__ */ jsxRuntime.jsx(
9511
10067
  InfoField,
9512
10068
  {
@@ -9518,7 +10074,7 @@ var TransactionDetail = () => {
9518
10074
  /* @__PURE__ */ jsxRuntime.jsx(
9519
10075
  InfoField,
9520
10076
  {
9521
- label: "Customer Name",
10077
+ label: "Customer",
9522
10078
  value: /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "link", className: "h-auto p-0 text-sm", children: transaction.customer }),
9523
10079
  layout: "horizontal"
9524
10080
  }
@@ -9527,21 +10083,18 @@ var TransactionDetail = () => {
9527
10083
  /* @__PURE__ */ jsxRuntime.jsx(
9528
10084
  InfoField,
9529
10085
  {
9530
- label: "Direction",
9531
- value: transaction.amount < 0 ? "DEBIT" : "CREDIT",
10086
+ label: "Counterparty",
10087
+ value: /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "link", className: "h-auto p-0 text-sm", children: transaction.counterparty }),
9532
10088
  layout: "horizontal"
9533
10089
  }
9534
10090
  ),
9535
- /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Counterparty Name", value: transaction.counterparty, layout: "horizontal" }),
9536
10091
  /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Post Date", value: transaction.created.split(" ")[0], layout: "horizontal" }),
9537
10092
  /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "OFAC ID", value: /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "link", className: "h-auto p-0 text-sm", children: "18323208" }), layout: "horizontal" }),
9538
10093
  /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Original Filename", value: "-", layout: "horizontal" }),
9539
10094
  /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Loaded From File", value: "iso21130757012764355B7.xml.126534273Q299", layout: "horizontal" }),
9540
10095
  /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Payment ID", value: transaction.id, layout: "horizontal" }),
9541
10096
  /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Linked Payment ID", value: "-", layout: "horizontal" }),
9542
- /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Is Inbound", value: "True", layout: "horizontal" }),
9543
10097
  /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Pending until Date", value: "-", layout: "horizontal" }),
9544
- /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Processing Status", value: "Sent", layout: "horizontal" }),
9545
10098
  /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Further Credit To", value: "-", layout: "horizontal" }),
9546
10099
  /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Balance Available Date", value: "-", layout: "horizontal" }),
9547
10100
  /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Requester Username", value: "-", layout: "horizontal" }),
@@ -9598,8 +10151,9 @@ exports.ACHTransferSection = ACHTransferSection;
9598
10151
  exports.AccountCard = AccountCard;
9599
10152
  exports.AddressForm = AddressForm;
9600
10153
  exports.AlertDetail = AlertDetail_default;
9601
- exports.AlertDetailView = AlertDetailView;
10154
+ exports.AlertDetailRouter = AlertDetailRouter;
9602
10155
  exports.AlertDocuments = AlertDocuments;
10156
+ exports.AlertHeaderControls = AlertHeaderControls;
9603
10157
  exports.AlertNotes = AlertNotes;
9604
10158
  exports.AlertTimeline = AlertTimeline;
9605
10159
  exports.Alerts = Alerts_default;
@@ -9627,6 +10181,7 @@ exports.CardFooter = CardFooter;
9627
10181
  exports.CardHeader = CardHeader;
9628
10182
  exports.CardTitle = CardTitle;
9629
10183
  exports.Cases = Cases_default;
10184
+ exports.Checkbox = Checkbox;
9630
10185
  exports.ContactInfoCard = ContactInfoCard;
9631
10186
  exports.Container = Container;
9632
10187
  exports.ContextSection = ContextSection;
@@ -9682,6 +10237,7 @@ exports.MainLayout = MainLayout;
9682
10237
  exports.MetricCard = MetricCard;
9683
10238
  exports.NewTransaction = NewTransaction;
9684
10239
  exports.NotFound = NotFound_default;
10240
+ exports.OFACAlertView = OFACAlertView;
9685
10241
  exports.OriginatorCard = OriginatorCard;
9686
10242
  exports.OriginatorFI = OriginatorFI;
9687
10243
  exports.OriginatorFIAddress = OriginatorFIAddress;
@@ -9692,7 +10248,10 @@ exports.Popover = Popover;
9692
10248
  exports.PopoverContent = PopoverContent;
9693
10249
  exports.PopoverTrigger = PopoverTrigger;
9694
10250
  exports.ReceiverCard = ReceiverCard;
10251
+ exports.ResolveAlertDialog = ResolveAlertDialog;
9695
10252
  exports.ResponsiveGrid = ResponsiveGrid;
10253
+ exports.ScrollArea = ScrollArea;
10254
+ exports.ScrollBar = ScrollBar;
9696
10255
  exports.Separator = Separator;
9697
10256
  exports.Sheet = Sheet;
9698
10257
  exports.SheetClose = SheetClose;
@@ -9730,7 +10289,16 @@ exports.SidebarTrigger = SidebarTrigger;
9730
10289
  exports.Stack = Stack;
9731
10290
  exports.Statement = Statement;
9732
10291
  exports.StatementHeader = StatementHeader;
10292
+ exports.StatementView = StatementView;
9733
10293
  exports.StatusBadge = StatusBadge;
10294
+ exports.Table = Table;
10295
+ exports.TableBody = TableBody;
10296
+ exports.TableCaption = TableCaption;
10297
+ exports.TableCell = TableCell;
10298
+ exports.TableFooter = TableFooter;
10299
+ exports.TableHead = TableHead;
10300
+ exports.TableHeader = TableHeader;
10301
+ exports.TableRow = TableRow;
9734
10302
  exports.Tabs = Tabs;
9735
10303
  exports.TabsContent = TabsContent;
9736
10304
  exports.TabsList = TabsList;
@@ -9749,6 +10317,7 @@ exports.TooltipProvider = TooltipProvider;
9749
10317
  exports.TooltipTrigger = TooltipTrigger;
9750
10318
  exports.TransactionDetail = TransactionDetail_default;
9751
10319
  exports.TransactionHistory = TransactionHistory_default;
10320
+ exports.TransactionTypeBadge = TransactionTypeBadge;
9752
10321
  exports.UIKit = UIKit;
9753
10322
  exports.UIKitShowcase = UIKitShowcase;
9754
10323
  exports.WireDetailsSection = WireDetailsSection;