braid-ui 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -6,10 +6,10 @@ import { cva } from 'class-variance-authority';
6
6
  import { clsx } from 'clsx';
7
7
  import { twMerge } from 'tailwind-merge';
8
8
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
9
- import { ChevronDown, ChevronUp, Check, X, PanelLeft, Edit, Home, Globe, CreditCard, Building, MoreVertical, Minus, TrendingDown, TrendingUp, ChevronRight, Eye, Trash2, Upload, FileText, Download, Plus, MessageSquare, Copy, LayoutDashboard, Bell, Briefcase, FileCheck, Receipt, ArrowLeftRight, Users, Building2, Zap, Shield, AlertCircle, RefreshCw, Landmark, Search, Repeat, Box, Settings, BarChart3, Key, Heart, User, AlertTriangle, XCircle, CheckCircle, Clock, Circle, UserPlus, ChevronsUpDown } from 'lucide-react';
9
+ import { ChevronDown, ChevronUp, Check, X, PanelLeft, Edit, Home, Globe, CreditCard, Building, MoreVertical, Minus, TrendingDown, TrendingUp, ChevronRight, Eye, Trash2, Upload, FileText, Download, Plus, MessageSquare, Copy, LayoutDashboard, Bell, Briefcase, FileCheck, Receipt, ArrowLeftRight, Users, Building2, Zap, Shield, AlertCircle, RefreshCw, Landmark, Search, Repeat, Box, Settings, BarChart3, Key, Heart, User, AlertTriangle, XCircle, CheckCircle, Clock, Filter, ChevronLeft, Calendar as Calendar$1, CheckCircle2, Circle, UserPlus, ChevronsUpDown } from 'lucide-react';
10
10
  import * as SelectPrimitive from '@radix-ui/react-select';
11
11
  import * as DialogPrimitive from '@radix-ui/react-dialog';
12
- import { NavLink, useLocation } from 'react-router-dom';
12
+ import { NavLink, useLocation, useParams, useNavigate } from 'react-router-dom';
13
13
  import { Collapsible, CollapsibleTrigger, CollapsibleContent } from '@radix-ui/react-collapsible';
14
14
  import * as SeparatorPrimitive from '@radix-ui/react-separator';
15
15
  import * as TooltipPrimitive from '@radix-ui/react-tooltip';
@@ -21,10 +21,10 @@ import { DayPicker } from 'react-day-picker';
21
21
  import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
22
22
  import * as PopoverPrimitive from '@radix-ui/react-popover';
23
23
  import { useTheme } from 'next-themes';
24
- import { Toaster as Toaster$1 } from 'sonner';
24
+ import { Toaster as Toaster$1, toast as toast$1 } from 'sonner';
25
25
  import * as TabsPrimitive from '@radix-ui/react-tabs';
26
26
  import * as ToastPrimitives from '@radix-ui/react-toast';
27
- import 'date-fns';
27
+ import { format } from 'date-fns';
28
28
 
29
29
  // src/components/alerts/AlertDocuments.tsx
30
30
  function cn(...inputs) {
@@ -6072,7 +6072,1871 @@ function UIKitShowcase() {
6072
6072
  ] })
6073
6073
  ] }) }) });
6074
6074
  }
6075
- z.object({
6075
+
6076
+ // src/lib/mock-data/alert-data.ts
6077
+ var mockAlerts = [
6078
+ {
6079
+ id: "4402",
6080
+ createdAt: "2025-09-30 03:00:21",
6081
+ type: "Ofac",
6082
+ status: "Unassigned",
6083
+ contextType: "Ofac",
6084
+ description: "INDIVIDUAL: ali hassan is flagged for OFAC",
6085
+ timeline: [
6086
+ { id: "1", timestamp: "2025-09-30 03:00:21", user: "System", action: "Alert Created", status: "Unassigned" },
6087
+ { id: "2", timestamp: "2025-09-30 09:15:32", user: "John Smith", action: "Alert Assigned", details: "Assigned to compliance team", status: "In Progress" }
6088
+ ],
6089
+ notes: [
6090
+ { id: "1", timestamp: "2025-09-30 10:22:15", user: "John Smith", content: "Reviewing OFAC match. Need to verify identity documents.", type: "RFI Note" },
6091
+ { id: "2", timestamp: "2025-09-30 11:45:30", user: "Sarah Johnson", content: "Requested additional documentation from customer. Passport and proof of address needed.", type: "RFI Note" },
6092
+ { id: "3", timestamp: "2025-09-30 14:20:45", user: "John Smith", content: "Customer responded with requested documents. Passport appears valid, reviewing address verification now.", type: "Internal Note" },
6093
+ { id: "4", timestamp: "2025-10-01 09:10:00", user: "Michael Chen", content: "Cross-referenced with internal records. Customer has been with us for 5 years with no prior issues. Match appears to be false positive due to common name.", type: "Internal Note" }
6094
+ ],
6095
+ documents: [
6096
+ {
6097
+ id: "1",
6098
+ name: "passport_scan.pdf",
6099
+ type: "ID Verification",
6100
+ description: "Customer passport for identity verification",
6101
+ size: "2.4 MB",
6102
+ uploadedBy: "John Smith",
6103
+ uploadedAt: "2025-09-30 10:25:00",
6104
+ url: "/placeholder.svg"
6105
+ },
6106
+ {
6107
+ id: "2",
6108
+ name: "proof_of_address.jpg",
6109
+ type: "Proof of Address",
6110
+ description: "Utility bill showing current residential address",
6111
+ size: "1.8 MB",
6112
+ uploadedBy: "Sarah Johnson",
6113
+ uploadedAt: "2025-09-30 11:50:00",
6114
+ url: "/placeholder.svg"
6115
+ }
6116
+ ],
6117
+ contextData: {
6118
+ entityName: "Ali Hassan",
6119
+ entityType: "Individual",
6120
+ matchScore: "95%",
6121
+ listName: "OFAC SDN List",
6122
+ flaggedItems: [
6123
+ { field: "Name", value: "Ali Hassan", matchScore: "95%" },
6124
+ { field: "DOB", value: "1985-03-12", matchScore: "100%" }
6125
+ ],
6126
+ sdns: [
6127
+ {
6128
+ uid: 12345,
6129
+ firstName: "Ali",
6130
+ lastName: "Hassan",
6131
+ sdnType: "Individual",
6132
+ programs: ["SYRIA", "SDGT"],
6133
+ title: "Military Commander",
6134
+ remarks: "DOB 12 Mar 1985; POB Damascus, Syria; Passport D1234567 (Syria); alt. Passport E7654321 (Lebanon); Linked to Entity XYZ",
6135
+ nationalities: ["Syria", "Lebanon"],
6136
+ citizenships: ["Syria"],
6137
+ dateOfBirthList: [
6138
+ { dateOfBirth: "1985-03-12", mainEntry: true },
6139
+ { dateOfBirth: "1985-03-15", mainEntry: false }
6140
+ ],
6141
+ placeOfBirthList: [
6142
+ { placeOfBirth: "Damascus, Syria", mainEntry: true },
6143
+ { placeOfBirth: "Aleppo, Syria", mainEntry: false }
6144
+ ],
6145
+ akaList: [
6146
+ { category: "strong", firstName: "Ali", lastName: "Al-Hassan" },
6147
+ { category: "weak", firstName: "Ali", lastName: "Hasan" },
6148
+ { category: "strong", firstName: "Ali Hassan", lastName: "Mohamed" }
6149
+ ],
6150
+ idList: [
6151
+ { idType: "Passport", idNumber: "D1234567", idCountry: "Syria", issueDate: "2010-01-15", expirationDate: "2020-01-15" },
6152
+ { idType: "Passport", idNumber: "E7654321", idCountry: "Lebanon", issueDate: "2015-06-20", expirationDate: "2025-06-20" },
6153
+ { idType: "National ID", idNumber: "SY123456789", idCountry: "Syria" }
6154
+ ]
6155
+ }
6156
+ ],
6157
+ addresses: [
6158
+ {
6159
+ uid: 67890,
6160
+ address1: "Building 42, Al-Mazzeh",
6161
+ city: "Damascus",
6162
+ stateOrProvince: "Damascus Governorate",
6163
+ postalCode: "12345",
6164
+ country: "Syria",
6165
+ addressRemarks: "Primary Residence"
6166
+ },
6167
+ {
6168
+ uid: 67891,
6169
+ address1: "Apartment 15, Hamra Street",
6170
+ city: "Beirut",
6171
+ country: "Lebanon",
6172
+ addressRemarks: "Secondary Address"
6173
+ },
6174
+ {
6175
+ uid: 67892,
6176
+ address1: "Office 203, Business District",
6177
+ city: "Aleppo",
6178
+ stateOrProvince: "Aleppo Governorate",
6179
+ country: "Syria",
6180
+ addressRemarks: "Business Address - Suspected Front Company"
6181
+ }
6182
+ ],
6183
+ alt_names: [
6184
+ { uid: 54321, type: "aka", category: "strong", firstName: "Ali", lastName: "Al-Hassan" },
6185
+ { uid: 54322, type: "aka", category: "weak", firstName: "Ali", lastName: "Hasan" },
6186
+ { uid: 54323, type: "aka", category: "strong", firstName: "Ali Hassan", lastName: "Mohamed" },
6187
+ { uid: 54324, type: "fka", category: "weak", firstName: "Ali", lastName: "Hassani" }
6188
+ ],
6189
+ sanctions_entries: [
6190
+ {
6191
+ program: "SYRIA",
6192
+ effectiveDate: "2015-03-15",
6193
+ authority: "Executive Order 13572",
6194
+ legalBasis: "Involvement in human rights abuses in Syria"
6195
+ },
6196
+ {
6197
+ program: "SDGT",
6198
+ effectiveDate: "2016-08-22",
6199
+ authority: "Executive Order 13224",
6200
+ legalBasis: "Specially Designated Global Terrorist"
6201
+ }
6202
+ ],
6203
+ associated_entities: [
6204
+ {
6205
+ entityName: "XYZ Trading Company",
6206
+ relationship: "Director",
6207
+ entityType: "Business"
6208
+ },
6209
+ {
6210
+ entityName: "Hassan Family Trust",
6211
+ relationship: "Beneficiary",
6212
+ entityType: "Trust"
6213
+ }
6214
+ ],
6215
+ screening_metadata: {
6216
+ screenedAt: "2025-09-30T03:00:21Z",
6217
+ screeningEngine: "OFAC Advanced Matcher v3.2",
6218
+ datasetVersion: "2025-09-25",
6219
+ totalRecordsScreened: 1,
6220
+ matchAlgorithm: "Fuzzy + Phonetic",
6221
+ confidenceThreshold: 0.85
6222
+ }
6223
+ }
6224
+ },
6225
+ {
6226
+ id: "4401",
6227
+ createdAt: "2025-09-29 15:00:45",
6228
+ type: "Ofac",
6229
+ status: "Closed",
6230
+ contextType: "Ofac",
6231
+ description: "INDIVIDUAL: ali hassan is flagged for OFAC"
6232
+ },
6233
+ {
6234
+ id: "4400",
6235
+ createdAt: "2025-09-27 03:02:34",
6236
+ type: "Ofac",
6237
+ status: "Unassigned",
6238
+ contextType: "Ofac",
6239
+ description: "BUSINESS: Randy is flagged for OFAC"
6240
+ },
6241
+ {
6242
+ id: "4399",
6243
+ createdAt: "2025-09-27 03:02:31",
6244
+ type: "Ofac",
6245
+ status: "Unassigned",
6246
+ contextType: "Ofac",
6247
+ description: "BUSINESS: test is flagged for OFAC"
6248
+ },
6249
+ {
6250
+ id: "4398",
6251
+ createdAt: "2025-09-24 10:01:58",
6252
+ type: "Transaction Processing Error",
6253
+ status: "Unassigned",
6254
+ contextType: "File Record",
6255
+ description: "Inbound WIRE for $100,000.00 can not be processed. Exception: incorrect account..."
6256
+ },
6257
+ {
6258
+ id: "4397",
6259
+ createdAt: "2025-09-22 20:33:59",
6260
+ type: "Dual Approval",
6261
+ status: "Unassigned",
6262
+ contextType: "Transaction",
6263
+ description: "Debit adjustment for $20.00 for account number 84804949"
6264
+ },
6265
+ {
6266
+ id: "4396",
6267
+ createdAt: "2025-09-22 20:33:12",
6268
+ type: "Transaction Monitoring",
6269
+ status: "Unassigned",
6270
+ contextType: "Transaction",
6271
+ description: "Transaction WIRE_INTERNATIONAL_DEBIT of $3,000.00 is flagged for velocity li..."
6272
+ },
6273
+ {
6274
+ id: "4395",
6275
+ createdAt: "2025-09-13 03:02:29",
6276
+ type: "Ofac",
6277
+ status: "Closed",
6278
+ contextType: "Ofac",
6279
+ rfiStatus: "Completed",
6280
+ description: "BUSINESS: test is flagged for OFAC"
6281
+ },
6282
+ {
6283
+ id: "4394",
6284
+ createdAt: "2025-09-11 07:46:28",
6285
+ type: "Dual Approval",
6286
+ status: "Closed",
6287
+ contextType: "Product",
6288
+ description: "Product 2787 is set for deactivation"
6289
+ },
6290
+ {
6291
+ id: "4393",
6292
+ createdAt: "2025-09-11 07:46:17",
6293
+ type: "Dual Approval",
6294
+ status: "Unassigned",
6295
+ contextType: "Product",
6296
+ description: "Product 2787 is set for deactivation"
6297
+ },
6298
+ {
6299
+ id: "4392",
6300
+ createdAt: "2025-09-10 14:44:46",
6301
+ type: "Transaction Monitoring",
6302
+ status: "Closed",
6303
+ contextType: "Transaction",
6304
+ rfiStatus: "Provided",
6305
+ description: "Transaction WIRE_DOMESTIC_CREDIT of $30,000.00 is flagged for velocity limit ..."
6306
+ }
6307
+ ];
6308
+ var RFI_STATUS_OPTIONS = [
6309
+ { value: "Completed", label: "Completed" },
6310
+ { value: "Provided", label: "Provided" },
6311
+ { value: "Pending", label: "Pending" }
6312
+ ];
6313
+ var ASSIGNEE_OPTIONS = [
6314
+ { value: "John Smith", label: "John Smith" },
6315
+ { value: "Sarah Johnson", label: "Sarah Johnson" },
6316
+ { value: "Michael Chen", label: "Michael Chen" },
6317
+ { value: "approverdev", label: "approverdev" },
6318
+ { value: "Unassigned", label: "Unassigned" }
6319
+ ];
6320
+ var AlertDetail = () => {
6321
+ const { id } = useParams();
6322
+ const navigate = useNavigate();
6323
+ const alert = mockAlerts.find((a) => a.id === id);
6324
+ const [rfiStatus, setRfiStatus] = useState(alert?.rfiStatus || "");
6325
+ const [assignee, setAssignee] = useState(alert?.assignee || "Unassigned");
6326
+ const handleRfiStatusChange = (newStatus) => {
6327
+ setRfiStatus(newStatus);
6328
+ console.log("RFI Status updated to:", newStatus);
6329
+ };
6330
+ const handleAssigneeChange = (newAssignee) => {
6331
+ setAssignee(newAssignee);
6332
+ console.log("Assignee updated to:", newAssignee);
6333
+ };
6334
+ if (!alert) {
6335
+ return /* @__PURE__ */ jsx("div", { className: "container mx-auto px-4 py-8", children: /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
6336
+ /* @__PURE__ */ jsx("h1", { className: "text-2xl font-bold mb-2", children: "Alert Not Found" }),
6337
+ /* @__PURE__ */ jsxs("p", { className: "text-muted-foreground mb-4", children: [
6338
+ "The alert #",
6339
+ id,
6340
+ " could not be found."
6341
+ ] }),
6342
+ /* @__PURE__ */ jsx(Button, { onClick: () => navigate("/alerts"), children: "Back to Alerts" })
6343
+ ] }) });
6344
+ }
6345
+ const getTypeBadgeVariant = (type) => {
6346
+ switch (type) {
6347
+ case "Ofac":
6348
+ return "alert-ofac";
6349
+ case "Dual Approval":
6350
+ return "alert-dual";
6351
+ case "Transaction Monitoring":
6352
+ return "alert-monitoring";
6353
+ case "Transaction Processing Error":
6354
+ return "alert-error";
6355
+ default:
6356
+ return "outline";
6357
+ }
6358
+ };
6359
+ const getStatusColor = (status) => {
6360
+ switch (status) {
6361
+ case "Unassigned":
6362
+ return "text-destructive";
6363
+ case "Closed":
6364
+ return "text-success";
6365
+ case "In Progress":
6366
+ return "text-warning";
6367
+ default:
6368
+ return "";
6369
+ }
6370
+ };
6371
+ return /* @__PURE__ */ jsx(
6372
+ PageLayout,
6373
+ {
6374
+ title: `Alert #${alert.id}`,
6375
+ description: alert.description,
6376
+ maxWidth: "full",
6377
+ actions: [
6378
+ {
6379
+ label: "Back to Alerts",
6380
+ variant: "outline",
6381
+ onClick: () => navigate("/alerts")
6382
+ },
6383
+ {
6384
+ label: "Assign",
6385
+ variant: "outline",
6386
+ onClick: () => console.log("Assign alert")
6387
+ },
6388
+ {
6389
+ label: "Close Alert",
6390
+ variant: "default",
6391
+ onClick: () => console.log("Close alert")
6392
+ }
6393
+ ],
6394
+ children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col lg:flex-row gap-6", children: [
6395
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 grid grid-cols-1 lg:grid-cols-2 gap-6", children: [
6396
+ /* @__PURE__ */ jsx(
6397
+ FormCard,
6398
+ {
6399
+ title: "Alert Information",
6400
+ headerActions: /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", children: /* @__PURE__ */ jsx(Edit, { className: "h-4 w-4" }) }),
6401
+ children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
6402
+ /* @__PURE__ */ jsx(InfoField, { label: "Alert ID", value: alert.id }),
6403
+ /* @__PURE__ */ jsx(
6404
+ InfoField,
6405
+ {
6406
+ label: "Type",
6407
+ value: /* @__PURE__ */ jsx(Badge, { variant: getTypeBadgeVariant(alert.type), children: alert.type })
6408
+ }
6409
+ ),
6410
+ /* @__PURE__ */ jsx(
6411
+ InfoField,
6412
+ {
6413
+ label: "Status",
6414
+ value: /* @__PURE__ */ jsx("span", { className: cn("font-medium", getStatusColor(alert.status)), children: alert.status })
6415
+ }
6416
+ ),
6417
+ /* @__PURE__ */ jsx(InfoField, { label: "Created At", value: alert.createdAt }),
6418
+ /* @__PURE__ */ jsx(
6419
+ InfoField,
6420
+ {
6421
+ label: "Context Type",
6422
+ value: /* @__PURE__ */ jsx(Badge, { variant: "outline", children: alert.contextType })
6423
+ }
6424
+ ),
6425
+ /* @__PURE__ */ jsx(InfoField, { label: "Context ID", value: alert.contextId || "N/A" }),
6426
+ /* @__PURE__ */ jsx(
6427
+ EditableInfoField,
6428
+ {
6429
+ label: "Assignee",
6430
+ value: assignee,
6431
+ options: ASSIGNEE_OPTIONS,
6432
+ onChange: handleAssigneeChange,
6433
+ placeholder: "Unassigned"
6434
+ }
6435
+ ),
6436
+ /* @__PURE__ */ jsx(
6437
+ EditableInfoField,
6438
+ {
6439
+ label: "RFI Status",
6440
+ value: rfiStatus,
6441
+ options: RFI_STATUS_OPTIONS,
6442
+ onChange: handleRfiStatusChange,
6443
+ placeholder: "Select status",
6444
+ renderValue: (value) => /* @__PURE__ */ jsx(Badge, { variant: "success", children: value })
6445
+ }
6446
+ ),
6447
+ /* @__PURE__ */ jsx("div", { className: "col-span-2", children: /* @__PURE__ */ jsx(InfoField, { label: "Description", value: alert.description }) })
6448
+ ] })
6449
+ }
6450
+ ),
6451
+ /* @__PURE__ */ jsx(ContextSection, { alert }),
6452
+ /* @__PURE__ */ jsx(FormCard, { title: "Notes", children: /* @__PURE__ */ jsx(AlertNotes, { alertId: alert.id, notes: alert.notes || [] }) }),
6453
+ /* @__PURE__ */ jsx(FormCard, { title: "Documents", children: /* @__PURE__ */ jsx(AlertDocuments, { alertId: alert.id, documents: alert.documents || [] }) })
6454
+ ] }),
6455
+ /* @__PURE__ */ jsx("div", { className: "lg:w-64", children: /* @__PURE__ */ jsx(FormCard, { title: "Status Timeline", className: "h-full", children: /* @__PURE__ */ jsx(AlertTimeline, { events: alert.timeline || [] }) }) })
6456
+ ] })
6457
+ }
6458
+ );
6459
+ };
6460
+ var AlertDetail_default = AlertDetail;
6461
+ var Alerts = () => {
6462
+ const navigate = useNavigate();
6463
+ const [filters, setFilters] = useState({
6464
+ alertId: "",
6465
+ contextId: "",
6466
+ contextType: "",
6467
+ alertType: "",
6468
+ alertStatus: "",
6469
+ assignee: "",
6470
+ rfiStatus: "",
6471
+ startDate: "",
6472
+ endDate: ""
6473
+ });
6474
+ const [filteredAlerts, setFilteredAlerts] = useState(mockAlerts);
6475
+ const [currentPage, setCurrentPage] = useState(1);
6476
+ const [rowsPerPage, setRowsPerPage] = useState(100);
6477
+ const handleFilterChange = (field, value) => {
6478
+ setFilters((prev) => ({ ...prev, [field]: value }));
6479
+ };
6480
+ const applyFilters = () => {
6481
+ let filtered = mockAlerts;
6482
+ if (filters.alertId) {
6483
+ filtered = filtered.filter((alert) => alert.id.includes(filters.alertId));
6484
+ }
6485
+ if (filters.alertStatus) {
6486
+ filtered = filtered.filter((alert) => alert.status === filters.alertStatus);
6487
+ }
6488
+ if (filters.alertType) {
6489
+ filtered = filtered.filter((alert) => alert.type === filters.alertType);
6490
+ }
6491
+ if (filters.contextType) {
6492
+ filtered = filtered.filter((alert) => alert.contextType === filters.contextType);
6493
+ }
6494
+ if (filters.rfiStatus) {
6495
+ filtered = filtered.filter((alert) => alert.rfiStatus === filters.rfiStatus);
6496
+ }
6497
+ setFilteredAlerts(filtered);
6498
+ setCurrentPage(1);
6499
+ };
6500
+ const resetFilters = () => {
6501
+ setFilters({
6502
+ alertId: "",
6503
+ contextId: "",
6504
+ contextType: "",
6505
+ alertType: "",
6506
+ alertStatus: "",
6507
+ assignee: "",
6508
+ rfiStatus: "",
6509
+ startDate: "",
6510
+ endDate: ""
6511
+ });
6512
+ setFilteredAlerts(mockAlerts);
6513
+ setCurrentPage(1);
6514
+ };
6515
+ const getTypeBadgeVariant = (type) => {
6516
+ switch (type) {
6517
+ case "Ofac":
6518
+ return "alert-ofac";
6519
+ case "Dual Approval":
6520
+ return "alert-dual";
6521
+ case "Transaction Monitoring":
6522
+ return "alert-monitoring";
6523
+ case "Transaction Processing Error":
6524
+ return "alert-error";
6525
+ default:
6526
+ return "outline";
6527
+ }
6528
+ };
6529
+ const getStatusColor = (status) => {
6530
+ switch (status) {
6531
+ case "Unassigned":
6532
+ return "text-destructive";
6533
+ case "Closed":
6534
+ return "text-success";
6535
+ case "In Progress":
6536
+ return "text-warning";
6537
+ default:
6538
+ return "";
6539
+ }
6540
+ };
6541
+ const totalPages = Math.ceil(filteredAlerts.length / rowsPerPage);
6542
+ const startIndex = (currentPage - 1) * rowsPerPage;
6543
+ const endIndex = startIndex + rowsPerPage;
6544
+ const paginatedAlerts = filteredAlerts.slice(startIndex, endIndex);
6545
+ const handlePageChange = (newPage) => {
6546
+ if (newPage >= 1 && newPage <= totalPages) {
6547
+ setCurrentPage(newPage);
6548
+ }
6549
+ };
6550
+ const handleRowsPerPageChange = (value) => {
6551
+ setRowsPerPage(value);
6552
+ setCurrentPage(1);
6553
+ };
6554
+ return /* @__PURE__ */ jsxs("div", { className: "flex flex-col h-screen bg-gradient-subtle", children: [
6555
+ /* @__PURE__ */ jsx("div", { className: "flex-none border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60", children: /* @__PURE__ */ jsx("div", { className: "container mx-auto px-4 py-4 max-w-none", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
6556
+ /* @__PURE__ */ jsx("h1", { className: "text-3xl font-bold text-foreground", children: "Alerts" }),
6557
+ /* @__PURE__ */ jsxs(Sheet, { children: [
6558
+ /* @__PURE__ */ jsx(SheetTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(Button, { variant: "outline", className: "gap-2", children: [
6559
+ /* @__PURE__ */ jsx(Filter, { className: "h-4 w-4" }),
6560
+ "Filters"
6561
+ ] }) }),
6562
+ /* @__PURE__ */ jsxs(SheetContent, { side: "right", className: "w-full sm:max-w-xl overflow-y-auto", children: [
6563
+ /* @__PURE__ */ jsx(SheetHeader, { children: /* @__PURE__ */ jsx(SheetTitle, { children: "Alert Filters" }) }),
6564
+ /* @__PURE__ */ jsxs("div", { className: "space-y-6 py-6", children: [
6565
+ /* @__PURE__ */ jsx(
6566
+ EnhancedInput,
6567
+ {
6568
+ label: "Alert ID",
6569
+ value: filters.alertId,
6570
+ onChange: (e) => handleFilterChange("alertId", e.target.value),
6571
+ placeholder: "Enter alert ID"
6572
+ }
6573
+ ),
6574
+ /* @__PURE__ */ jsx(
6575
+ EnhancedInput,
6576
+ {
6577
+ label: "Context ID",
6578
+ value: filters.contextId,
6579
+ onChange: (e) => handleFilterChange("contextId", e.target.value),
6580
+ placeholder: "Enter context ID"
6581
+ }
6582
+ ),
6583
+ /* @__PURE__ */ jsx(
6584
+ EnhancedSelect,
6585
+ {
6586
+ label: "Context Type",
6587
+ value: filters.contextType,
6588
+ onValueChange: (value) => handleFilterChange("contextType", value),
6589
+ placeholder: "Select context type",
6590
+ options: [
6591
+ { value: "Ofac", label: "Ofac" },
6592
+ { value: "Transaction", label: "Transaction" },
6593
+ { value: "Product", label: "Product" },
6594
+ { value: "File Record", label: "File Record" }
6595
+ ]
6596
+ }
6597
+ ),
6598
+ /* @__PURE__ */ jsx(
6599
+ EnhancedSelect,
6600
+ {
6601
+ label: "Alert Type",
6602
+ value: filters.alertType,
6603
+ onValueChange: (value) => handleFilterChange("alertType", value),
6604
+ placeholder: "Select alert type",
6605
+ options: [
6606
+ { value: "Ofac", label: "Ofac" },
6607
+ { value: "Dual Approval", label: "Dual Approval" },
6608
+ { value: "Transaction Monitoring", label: "Transaction Monitoring" },
6609
+ { value: "Transaction Processing Error", label: "Transaction Processing Error" }
6610
+ ]
6611
+ }
6612
+ ),
6613
+ /* @__PURE__ */ jsx(
6614
+ EnhancedSelect,
6615
+ {
6616
+ label: "Alert Status",
6617
+ value: filters.alertStatus,
6618
+ onValueChange: (value) => handleFilterChange("alertStatus", value),
6619
+ placeholder: "Select status",
6620
+ options: [
6621
+ { value: "Unassigned", label: "Unassigned" },
6622
+ { value: "Closed", label: "Closed" },
6623
+ { value: "In Progress", label: "In Progress" }
6624
+ ]
6625
+ }
6626
+ ),
6627
+ /* @__PURE__ */ jsx(
6628
+ EnhancedInput,
6629
+ {
6630
+ label: "Assignee",
6631
+ value: filters.assignee,
6632
+ onChange: (e) => handleFilterChange("assignee", e.target.value),
6633
+ placeholder: "Enter assignee name"
6634
+ }
6635
+ ),
6636
+ /* @__PURE__ */ jsx(
6637
+ EnhancedSelect,
6638
+ {
6639
+ label: "RFI Status",
6640
+ value: filters.rfiStatus,
6641
+ onValueChange: (value) => handleFilterChange("rfiStatus", value),
6642
+ placeholder: "Select RFI status",
6643
+ options: [
6644
+ { value: "Completed", label: "Completed" },
6645
+ { value: "Provided", label: "Provided" },
6646
+ { value: "Pending", label: "Pending" }
6647
+ ]
6648
+ }
6649
+ ),
6650
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
6651
+ /* @__PURE__ */ jsx(
6652
+ EnhancedInput,
6653
+ {
6654
+ label: "Start Date",
6655
+ type: "date",
6656
+ value: filters.startDate,
6657
+ onChange: (e) => handleFilterChange("startDate", e.target.value)
6658
+ }
6659
+ ),
6660
+ /* @__PURE__ */ jsx(
6661
+ EnhancedInput,
6662
+ {
6663
+ label: "End Date",
6664
+ type: "date",
6665
+ value: filters.endDate,
6666
+ onChange: (e) => handleFilterChange("endDate", e.target.value)
6667
+ }
6668
+ )
6669
+ ] })
6670
+ ] }),
6671
+ /* @__PURE__ */ jsxs(SheetFooter, { className: "gap-2", children: [
6672
+ /* @__PURE__ */ jsx(Button, { variant: "outline", onClick: resetFilters, children: "Reset Filters" }),
6673
+ /* @__PURE__ */ jsx(Button, { onClick: applyFilters, children: "Apply Filters" })
6674
+ ] })
6675
+ ] })
6676
+ ] })
6677
+ ] }) }) }),
6678
+ /* @__PURE__ */ jsx("div", { className: "flex-1 overflow-hidden", children: /* @__PURE__ */ jsx("div", { className: "container mx-auto px-4 h-full max-w-none flex flex-col", children: /* @__PURE__ */ jsxs("div", { className: "flex-1 mt-4 rounded-lg border bg-card overflow-hidden flex flex-col", children: [
6679
+ /* @__PURE__ */ jsx("div", { className: "flex-1 overflow-auto", children: /* @__PURE__ */ jsxs("table", { className: "w-full table-fixed", children: [
6680
+ /* @__PURE__ */ jsxs("colgroup", { children: [
6681
+ /* @__PURE__ */ jsx("col", { className: "w-28" }),
6682
+ /* @__PURE__ */ jsx("col", { className: "w-36" }),
6683
+ /* @__PURE__ */ jsx("col", { className: "w-52" }),
6684
+ /* @__PURE__ */ jsx("col", { className: "w-32" }),
6685
+ /* @__PURE__ */ jsx("col", { className: "w-36" }),
6686
+ /* @__PURE__ */ jsx("col", { className: "w-32" }),
6687
+ /* @__PURE__ */ jsx("col", { className: "w-auto" })
6688
+ ] }),
6689
+ /* @__PURE__ */ jsx("thead", { className: "sticky top-0 bg-card z-10 shadow-sm", children: /* @__PURE__ */ jsxs("tr", { className: "border-b", children: [
6690
+ /* @__PURE__ */ jsx("th", { className: "px-3 py-2 text-left text-xs font-medium bg-muted/50", children: "Alert ID" }),
6691
+ /* @__PURE__ */ jsx("th", { className: "px-3 py-2 text-left text-xs font-medium bg-muted/50", children: "Created At" }),
6692
+ /* @__PURE__ */ jsx("th", { className: "px-3 py-2 text-left text-xs font-medium bg-muted/50", children: "Type" }),
6693
+ /* @__PURE__ */ jsx("th", { className: "px-3 py-2 text-left text-xs font-medium bg-muted/50", children: "Status" }),
6694
+ /* @__PURE__ */ jsx("th", { className: "px-3 py-2 text-left text-xs font-medium bg-muted/50", children: "Context Type" }),
6695
+ /* @__PURE__ */ jsx("th", { className: "px-3 py-2 text-left text-xs font-medium bg-muted/50", children: "RFI Status" }),
6696
+ /* @__PURE__ */ jsx("th", { className: "px-3 py-2 text-left text-xs font-medium bg-muted/50", children: "Description" })
6697
+ ] }) }),
6698
+ /* @__PURE__ */ jsx("tbody", { children: paginatedAlerts.map((alert) => /* @__PURE__ */ jsxs(
6699
+ "tr",
6700
+ {
6701
+ className: "border-b hover:bg-muted/50 transition-colors cursor-pointer",
6702
+ onClick: () => navigate(`/alerts/${alert.id}`),
6703
+ children: [
6704
+ /* @__PURE__ */ jsx("td", { className: "px-3 py-2 text-xs", children: alert.id }),
6705
+ /* @__PURE__ */ jsx("td", { className: "px-3 py-2 text-xs", children: alert.createdAt }),
6706
+ /* @__PURE__ */ jsx("td", { className: "px-3 py-2", children: /* @__PURE__ */ jsx(Badge, { variant: getTypeBadgeVariant(alert.type), className: "whitespace-nowrap", children: alert.type }) }),
6707
+ /* @__PURE__ */ jsx("td", { className: "px-3 py-2", children: /* @__PURE__ */ jsx("span", { className: cn("text-xs font-medium", getStatusColor(alert.status)), children: alert.status }) }),
6708
+ /* @__PURE__ */ jsx("td", { className: "px-3 py-2", children: /* @__PURE__ */ jsx(Badge, { variant: "outline", className: "whitespace-nowrap", children: alert.contextType }) }),
6709
+ /* @__PURE__ */ jsx("td", { className: "px-3 py-2", children: alert.rfiStatus && /* @__PURE__ */ jsx(Badge, { variant: "success", className: "whitespace-nowrap", children: alert.rfiStatus }) }),
6710
+ /* @__PURE__ */ jsx("td", { className: "px-3 py-2 text-xs truncate", children: alert.description })
6711
+ ]
6712
+ },
6713
+ alert.id
6714
+ )) })
6715
+ ] }) }),
6716
+ /* @__PURE__ */ jsx("div", { className: "flex-none border-t bg-background py-3 px-4", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
6717
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
6718
+ /* @__PURE__ */ jsx("span", { className: "text-sm text-muted-foreground", children: "Rows per page:" }),
6719
+ /* @__PURE__ */ jsxs(DropdownMenu, { children: [
6720
+ /* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(Button, { variant: "outline", size: "sm", className: "h-8 gap-1", children: [
6721
+ rowsPerPage,
6722
+ /* @__PURE__ */ jsx(ChevronRight, { className: "h-4 w-4 rotate-90" })
6723
+ ] }) }),
6724
+ /* @__PURE__ */ jsxs(DropdownMenuContent, { align: "start", className: "bg-background z-50", children: [
6725
+ /* @__PURE__ */ jsx(DropdownMenuItem, { onClick: () => handleRowsPerPageChange(100), children: "100" }),
6726
+ /* @__PURE__ */ jsx(DropdownMenuItem, { onClick: () => handleRowsPerPageChange(200), children: "200" }),
6727
+ /* @__PURE__ */ jsx(DropdownMenuItem, { onClick: () => handleRowsPerPageChange(500), children: "500" })
6728
+ ] })
6729
+ ] })
6730
+ ] }),
6731
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-4", children: [
6732
+ /* @__PURE__ */ jsxs("span", { className: "text-sm text-muted-foreground", children: [
6733
+ "Page ",
6734
+ currentPage,
6735
+ " of ",
6736
+ totalPages
6737
+ ] }),
6738
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
6739
+ /* @__PURE__ */ jsx(
6740
+ Button,
6741
+ {
6742
+ variant: "outline",
6743
+ size: "sm",
6744
+ className: "h-8 w-8 p-0",
6745
+ onClick: () => handlePageChange(currentPage - 1),
6746
+ disabled: currentPage === 1,
6747
+ children: /* @__PURE__ */ jsx(ChevronLeft, { className: "h-4 w-4" })
6748
+ }
6749
+ ),
6750
+ /* @__PURE__ */ jsx(
6751
+ Button,
6752
+ {
6753
+ variant: "outline",
6754
+ size: "sm",
6755
+ className: "h-8 w-8 p-0",
6756
+ onClick: () => handlePageChange(currentPage + 1),
6757
+ disabled: currentPage === totalPages,
6758
+ children: /* @__PURE__ */ jsx(ChevronRight, { className: "h-4 w-4" })
6759
+ }
6760
+ )
6761
+ ] })
6762
+ ] })
6763
+ ] }) })
6764
+ ] }) }) })
6765
+ ] });
6766
+ };
6767
+ var Alerts_default = Alerts;
6768
+ var Business = () => {
6769
+ return /* @__PURE__ */ jsx(
6770
+ DetailPageLayout,
6771
+ {
6772
+ title: "Business Management",
6773
+ description: "Manage business entities and their configurations",
6774
+ cards: [
6775
+ {
6776
+ key: "profile",
6777
+ component: BusinessProfileCard,
6778
+ expandOnEdit: true
6779
+ },
6780
+ {
6781
+ key: "status",
6782
+ component: BusinessStatusCard,
6783
+ expandOnEdit: true
6784
+ },
6785
+ {
6786
+ key: "contact",
6787
+ component: ContactInfoCard,
6788
+ expandOnEdit: true
6789
+ },
6790
+ {
6791
+ key: "banking",
6792
+ component: BankingDetailsCard,
6793
+ expandOnEdit: true
6794
+ }
6795
+ ],
6796
+ actions: [
6797
+ {
6798
+ label: "Export Data",
6799
+ variant: "outline"
6800
+ },
6801
+ {
6802
+ label: "Edit Business",
6803
+ className: "bg-gradient-primary hover:opacity-90"
6804
+ }
6805
+ ]
6806
+ }
6807
+ );
6808
+ };
6809
+ var Business_default = Business;
6810
+ var CreateBusiness = () => {
6811
+ const [businessType, setBusinessType] = useState("");
6812
+ return /* @__PURE__ */ jsx(
6813
+ PageLayout,
6814
+ {
6815
+ title: "Create Business",
6816
+ description: "Create a new business entity with all required information",
6817
+ actions: [
6818
+ { label: "Cancel", variant: "outline", onClick: () => {
6819
+ } },
6820
+ { label: "Create Business", variant: "default", onClick: () => {
6821
+ } }
6822
+ ],
6823
+ children: /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
6824
+ /* @__PURE__ */ jsxs(Card, { className: "p-6", children: [
6825
+ /* @__PURE__ */ jsxs("div", { className: "border-b border-border pb-4 mb-6", children: [
6826
+ /* @__PURE__ */ jsx("h2", { className: "text-lg font-semibold text-foreground", children: "Business Information" }),
6827
+ /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: "Basic business details and identification" })
6828
+ ] }),
6829
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6", children: [
6830
+ /* @__PURE__ */ jsx(
6831
+ EnhancedInput,
6832
+ {
6833
+ label: "Business Name",
6834
+ placeholder: "Enter business name",
6835
+ required: true
6836
+ }
6837
+ ),
6838
+ /* @__PURE__ */ jsx(
6839
+ EnhancedInput,
6840
+ {
6841
+ label: "Legal Name",
6842
+ placeholder: "Enter legal business name",
6843
+ hint: "Official registered business name"
6844
+ }
6845
+ ),
6846
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
6847
+ /* @__PURE__ */ jsx(
6848
+ EnhancedSelect,
6849
+ {
6850
+ label: "Business Type",
6851
+ placeholder: "Select business type",
6852
+ value: businessType,
6853
+ onValueChange: setBusinessType,
6854
+ options: [
6855
+ { value: "corporation", label: "Corporation" },
6856
+ { value: "llc", label: "LLC" },
6857
+ { value: "partnership", label: "Partnership" },
6858
+ { value: "sole_proprietorship", label: "Sole Proprietorship" }
6859
+ ]
6860
+ }
6861
+ ),
6862
+ businessType && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
6863
+ /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: "Preview:" }),
6864
+ /* @__PURE__ */ jsx(BusinessTypeBadge, { type: businessType })
6865
+ ] })
6866
+ ] }),
6867
+ /* @__PURE__ */ jsx(
6868
+ EnhancedInput,
6869
+ {
6870
+ label: "Tax ID (EIN)",
6871
+ placeholder: "12-3456789",
6872
+ hint: "Employer Identification Number",
6873
+ required: true
6874
+ }
6875
+ ),
6876
+ /* @__PURE__ */ jsx(
6877
+ EnhancedInput,
6878
+ {
6879
+ label: "Registration Number",
6880
+ placeholder: "Enter registration number",
6881
+ hint: "State business registration number"
6882
+ }
6883
+ ),
6884
+ /* @__PURE__ */ jsx(
6885
+ EnhancedSelect,
6886
+ {
6887
+ label: "Industry",
6888
+ placeholder: "Select industry",
6889
+ options: [
6890
+ { value: "technology", label: "Technology" },
6891
+ { value: "finance", label: "Finance" },
6892
+ { value: "healthcare", label: "Healthcare" },
6893
+ { value: "manufacturing", label: "Manufacturing" },
6894
+ { value: "retail", label: "Retail" },
6895
+ { value: "other", label: "Other" }
6896
+ ]
6897
+ }
6898
+ )
6899
+ ] })
6900
+ ] }),
6901
+ /* @__PURE__ */ jsxs(Card, { className: "p-6", children: [
6902
+ /* @__PURE__ */ jsxs("div", { className: "border-b border-border pb-4 mb-6", children: [
6903
+ /* @__PURE__ */ jsx("h2", { className: "text-lg font-semibold text-foreground", children: "Contact Information" }),
6904
+ /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: "Business address and contact details" })
6905
+ ] }),
6906
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6", children: [
6907
+ /* @__PURE__ */ jsx(
6908
+ EnhancedInput,
6909
+ {
6910
+ label: "Street Address",
6911
+ placeholder: "Enter street address",
6912
+ required: true
6913
+ }
6914
+ ),
6915
+ /* @__PURE__ */ jsx(
6916
+ EnhancedInput,
6917
+ {
6918
+ label: "City",
6919
+ placeholder: "Enter city",
6920
+ required: true
6921
+ }
6922
+ ),
6923
+ /* @__PURE__ */ jsx(
6924
+ EnhancedInput,
6925
+ {
6926
+ label: "State",
6927
+ placeholder: "Enter state",
6928
+ required: true
6929
+ }
6930
+ ),
6931
+ /* @__PURE__ */ jsx(
6932
+ EnhancedInput,
6933
+ {
6934
+ label: "Postal Code",
6935
+ placeholder: "12345",
6936
+ required: true
6937
+ }
6938
+ ),
6939
+ /* @__PURE__ */ jsx(
6940
+ EnhancedSelect,
6941
+ {
6942
+ label: "Country",
6943
+ placeholder: "Select country",
6944
+ options: [
6945
+ { value: "US", label: "United States" },
6946
+ { value: "CA", label: "Canada" },
6947
+ { value: "GB", label: "United Kingdom" },
6948
+ { value: "DE", label: "Germany" }
6949
+ ]
6950
+ }
6951
+ ),
6952
+ /* @__PURE__ */ jsx(
6953
+ EnhancedInput,
6954
+ {
6955
+ label: "Phone Number",
6956
+ placeholder: "+1 (555) 123-4567",
6957
+ required: true
6958
+ }
6959
+ ),
6960
+ /* @__PURE__ */ jsx(
6961
+ EnhancedInput,
6962
+ {
6963
+ label: "Email Address",
6964
+ placeholder: "contact@business.com",
6965
+ type: "email",
6966
+ required: true
6967
+ }
6968
+ ),
6969
+ /* @__PURE__ */ jsx(
6970
+ EnhancedInput,
6971
+ {
6972
+ label: "Website",
6973
+ placeholder: "https://www.business.com",
6974
+ type: "url"
6975
+ }
6976
+ )
6977
+ ] })
6978
+ ] }),
6979
+ /* @__PURE__ */ jsxs(Card, { className: "p-6", children: [
6980
+ /* @__PURE__ */ jsxs("div", { className: "border-b border-border pb-4 mb-6", children: [
6981
+ /* @__PURE__ */ jsx("h2", { className: "text-lg font-semibold text-foreground", children: "Additional Information" }),
6982
+ /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: "Optional business description and notes" })
6983
+ ] }),
6984
+ /* @__PURE__ */ jsx("div", { className: "space-y-6", children: /* @__PURE__ */ jsx(
6985
+ EnhancedTextarea,
6986
+ {
6987
+ label: "Business Description",
6988
+ placeholder: "Describe your business activities and services",
6989
+ hint: "Brief description of what your business does"
6990
+ }
6991
+ ) })
6992
+ ] })
6993
+ ] })
6994
+ }
6995
+ );
6996
+ };
6997
+ var Create_default = CreateBusiness;
6998
+ var Cases = () => {
6999
+ return /* @__PURE__ */ jsx(
7000
+ PageLayout,
7001
+ {
7002
+ title: "Cases",
7003
+ description: "Manage and track investigation cases",
7004
+ children: /* @__PURE__ */ jsx("div", { className: "text-center py-12 text-muted-foreground", children: "Cases content coming soon" })
7005
+ }
7006
+ );
7007
+ };
7008
+ var Cases_default = Cases;
7009
+ var CreateCounterparty = () => {
7010
+ const [counterpartyData, setCounterpartyData] = useState(null);
7011
+ const handleBasicInfoChange = (data) => {
7012
+ setCounterpartyData(data);
7013
+ };
7014
+ const handleSubmit = () => {
7015
+ console.log("Creating counterparty with data:", counterpartyData);
7016
+ };
7017
+ return /* @__PURE__ */ jsx(
7018
+ PageLayout,
7019
+ {
7020
+ title: "Create Counterparty",
7021
+ description: "Create a new counterparty with all required information",
7022
+ actions: [
7023
+ { label: "Cancel", variant: "outline", onClick: () => {
7024
+ } },
7025
+ { label: "Create Counterparty", variant: "default", onClick: handleSubmit }
7026
+ ],
7027
+ children: /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
7028
+ /* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsx(CardContent, { className: "p-6", children: /* @__PURE__ */ jsx(CounterpartyBasicInfo, { onDataChange: handleBasicInfoChange }) }) }),
7029
+ /* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsx(CardContent, { className: "p-6", children: /* @__PURE__ */ jsx(PaymentInformationSection, {}) }) })
7030
+ ] })
7031
+ }
7032
+ );
7033
+ };
7034
+ var Create_default2 = CreateCounterparty;
7035
+ var CounterpartyDomesticWire = () => {
7036
+ const { isEditing, handleToggleEdit, handleSave, handleCancel } = useEditState({});
7037
+ const [transferType, setTransferType] = useState("DOMESTIC");
7038
+ return /* @__PURE__ */ jsx(
7039
+ PageLayout,
7040
+ {
7041
+ title: "Counterparty Domestic Wire",
7042
+ description: "Manage domestic wire transfer configurations and beneficiary information",
7043
+ actions: !isEditing ? [
7044
+ { label: "Cancel", variant: "outline", onClick: () => {
7045
+ } },
7046
+ { label: "Save Domestic Wire Configuration", variant: "default", onClick: () => {
7047
+ } }
7048
+ ] : void 0,
7049
+ children: /* @__PURE__ */ jsxs("div", { className: "space-y-8", children: [
7050
+ /* @__PURE__ */ jsx(BasicInfoCard, {}),
7051
+ /* @__PURE__ */ jsx(Separator, { className: "my-8" }),
7052
+ /* @__PURE__ */ jsx(
7053
+ FormCard,
7054
+ {
7055
+ title: "Domestic Wire Transfer Configuration",
7056
+ description: "Configure domestic wire transfer settings and beneficiary information",
7057
+ headerActions: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: isEditing ? /* @__PURE__ */ jsxs(Fragment, { children: [
7058
+ /* @__PURE__ */ jsx(
7059
+ EnhancedSelect,
7060
+ {
7061
+ value: transferType,
7062
+ onValueChange: setTransferType,
7063
+ options: [
7064
+ { value: "DOMESTIC", label: "DOMESTIC" },
7065
+ { value: "INTERNATIONAL", label: "INTERNATIONAL" }
7066
+ ],
7067
+ placeholder: "Select transfer type"
7068
+ }
7069
+ ),
7070
+ /* @__PURE__ */ jsx(Button, { variant: "outline", size: "sm", onClick: handleCancel, children: "Cancel" }),
7071
+ /* @__PURE__ */ jsx(Button, { size: "sm", onClick: handleSave, children: "Save" })
7072
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
7073
+ /* @__PURE__ */ jsx("span", { className: "inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-secondary text-secondary-foreground", children: transferType }),
7074
+ /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "icon", onClick: handleToggleEdit, className: "text-primary hover:text-primary/80 hover:bg-primary/10", children: /* @__PURE__ */ jsx(Edit, { className: "h-4 w-4" }) })
7075
+ ] }) }),
7076
+ children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-6", children: [
7077
+ /* @__PURE__ */ jsx(ReceiverCard, { isEditing, hideActions: true }),
7078
+ /* @__PURE__ */ jsx(BeneficiaryCard, { isEditing, hideActions: true })
7079
+ ] })
7080
+ }
7081
+ )
7082
+ ] })
7083
+ }
7084
+ );
7085
+ };
7086
+ var DomesticWire_default = CounterpartyDomesticWire;
7087
+ var CounterpartyManage = () => {
7088
+ const {
7089
+ isEditing: isBasicEditing,
7090
+ handleToggleEdit: handleBasicToggleEdit
7091
+ } = useEditState({});
7092
+ const {
7093
+ isEditing: isWireEditing,
7094
+ handleToggleEdit: handleWireToggleEdit
7095
+ } = useEditState({});
7096
+ const {
7097
+ isEditing: isACHEditing,
7098
+ handleToggleEdit: handleACHToggleEdit
7099
+ } = useEditState({});
7100
+ const pageCards = [
7101
+ {
7102
+ key: "basic-info",
7103
+ component: BasicInfoSection,
7104
+ props: {
7105
+ isEditing: isBasicEditing,
7106
+ onToggleEdit: handleBasicToggleEdit
7107
+ }
7108
+ },
7109
+ {
7110
+ key: "wire-transfer",
7111
+ component: WireTransferSection,
7112
+ props: {
7113
+ isEditing: isWireEditing,
7114
+ onToggleEdit: handleWireToggleEdit
7115
+ }
7116
+ },
7117
+ {
7118
+ key: "ach-transfer",
7119
+ component: ACHTransferSection,
7120
+ props: {
7121
+ isEditing: isACHEditing,
7122
+ onToggleEdit: handleACHToggleEdit
7123
+ }
7124
+ }
7125
+ ];
7126
+ const pageActions = !isBasicEditing && !isWireEditing && !isACHEditing ? [
7127
+ {
7128
+ label: "Cancel",
7129
+ variant: "outline",
7130
+ onClick: () => {
7131
+ }
7132
+ },
7133
+ {
7134
+ label: "Save Configuration",
7135
+ variant: "default",
7136
+ onClick: () => {
7137
+ }
7138
+ }
7139
+ ] : [];
7140
+ return /* @__PURE__ */ jsx(
7141
+ PageLayout,
7142
+ {
7143
+ title: "Counterparty Management",
7144
+ description: "Manage counterparty details and payment configurations",
7145
+ mode: "cards",
7146
+ cards: pageCards,
7147
+ actions: pageActions,
7148
+ maxWidth: "lg",
7149
+ gridCols: 1
7150
+ }
7151
+ );
7152
+ };
7153
+ var Manage_default = CounterpartyManage;
7154
+ var Dashboard = () => {
7155
+ return /* @__PURE__ */ jsx(
7156
+ PageLayout,
7157
+ {
7158
+ title: "Dashboard",
7159
+ description: "Overview of your system metrics and activity",
7160
+ children: /* @__PURE__ */ jsx("div", { className: "text-center py-12 text-muted-foreground", children: "Dashboard content coming soon" })
7161
+ }
7162
+ );
7163
+ };
7164
+ var Dashboard_default = Dashboard;
7165
+ var NotFound = () => {
7166
+ const location = useLocation();
7167
+ useEffect(() => {
7168
+ console.error(
7169
+ "404 Error: User attempted to access non-existent route:",
7170
+ location.pathname
7171
+ );
7172
+ }, [location.pathname]);
7173
+ return /* @__PURE__ */ jsx("div", { className: "min-h-screen flex items-center justify-center bg-gray-100", children: /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
7174
+ /* @__PURE__ */ jsx("h1", { className: "text-4xl font-bold mb-4", children: "404" }),
7175
+ /* @__PURE__ */ jsx("p", { className: "text-xl text-gray-600 mb-4", children: "Oops! Page not found" }),
7176
+ /* @__PURE__ */ jsx("a", { href: "/", className: "text-blue-500 hover:text-blue-700 underline", children: "Return to Home" })
7177
+ ] }) });
7178
+ };
7179
+ var NotFound_default = NotFound;
7180
+
7181
+ // src/lib/mock-data/transaction-data.ts
7182
+ var mockTransactions = [
7183
+ {
7184
+ id: "1",
7185
+ created: "2025-10-01 00:16",
7186
+ accountNumber: "126713605718",
7187
+ amount: -7293.32,
7188
+ customer: "Rise Works Inc",
7189
+ counterparty: "VEDANT JAYESHKUMAR PATI",
7190
+ description: "4NnuJKyD9a8LUmkm",
7191
+ transactionType: "Ach Originator Credit",
7192
+ status: "PENDING",
7193
+ updated: "2025-10-01 00:16",
7194
+ achDetails: {
7195
+ type: "ACH Credit",
7196
+ originatorName: "Rise Works Inc",
7197
+ originatorAccountNumber: "126713605718",
7198
+ receiverName: "VEDANT JAYESHKUMAR PATI",
7199
+ receiverAccountNumber: "9876543210",
7200
+ receiverRoutingNumber: "021000021",
7201
+ amount: 7293.32,
7202
+ secCode: "CCD",
7203
+ companyEntryDescription: "PAYROLL",
7204
+ companyDiscretionaryData: "4NnuJKyD9a8LUmkm",
7205
+ individualIdNumber: "1234567890",
7206
+ individualName: "VEDANT JAYESHKUMAR PATI",
7207
+ traceNumber: "021000021234567",
7208
+ raw: {
7209
+ recordType: "6",
7210
+ transactionCode: "22",
7211
+ receivingDFIIdentification: "02100002",
7212
+ checkDigit: "1",
7213
+ DFIAccountNumber: "9876543210",
7214
+ amount: "0000729332",
7215
+ individualIdentificationNumber: "1234567890",
7216
+ individualName: "VEDANT JAYESHKUMAR PA",
7217
+ discretionaryData: " ",
7218
+ addendaRecordIndicator: "0",
7219
+ traceNumber: "021000021234567",
7220
+ batchHeader: {
7221
+ recordType: "5",
7222
+ serviceClassCode: "200",
7223
+ companyName: "RISE WORKS INC",
7224
+ companyDiscretionaryData: "4NnuJKyD9a8LU",
7225
+ companyIdentification: "1234567890",
7226
+ standardEntryClassCode: "CCD",
7227
+ companyEntryDescription: "PAYROLL",
7228
+ companyDescriptiveDate: "251001",
7229
+ effectiveEntryDate: "251001",
7230
+ settlementDate: " ",
7231
+ originatorStatusCode: "1",
7232
+ originatingDFIIdentification: "02100002",
7233
+ batchNumber: "0000001"
7234
+ }
7235
+ }
7236
+ }
7237
+ },
7238
+ {
7239
+ id: "2",
7240
+ created: "2025-10-01 00:09",
7241
+ accountNumber: "899606565333",
7242
+ amount: 0.5,
7243
+ customer: "SSB Bank",
7244
+ counterparty: "Maung Lwin",
7245
+ description: "ACH Fee",
7246
+ transactionType: "Fee Ach Transaction",
7247
+ status: "POSTED",
7248
+ updated: "2025-10-01 00:09"
7249
+ },
7250
+ {
7251
+ id: "3",
7252
+ created: "2025-09-30 23:45",
7253
+ accountNumber: "445821903456",
7254
+ amount: 15e3,
7255
+ customer: "Tech Solutions LLC",
7256
+ counterparty: "Global Suppliers Inc",
7257
+ description: "Invoice Payment #INV-2024-089",
7258
+ transactionType: "Wire Domestic Credit",
7259
+ status: "POSTED",
7260
+ updated: "2025-10-01 00:12",
7261
+ wireDetails: {
7262
+ type: "Domestic Wire",
7263
+ originatorName: "Tech Solutions LLC",
7264
+ originatorAccountNumber: "445821903456",
7265
+ originatorAddress: "123 Tech Street, San Francisco, CA 94105",
7266
+ beneficiaryName: "Global Suppliers Inc",
7267
+ beneficiaryAccountNumber: "998877665544",
7268
+ beneficiaryAddress: "456 Supply Avenue, New York, NY 10001",
7269
+ beneficiaryFIName: "Chase Bank",
7270
+ beneficiaryFIRoutingNumber: "021000021",
7271
+ beneficiaryFIAddress: "270 Park Avenue, New York, NY 10017",
7272
+ originatorFIName: "Wells Fargo Bank",
7273
+ originatorFIRoutingNumber: "121000248",
7274
+ originatorFIAddress: "420 Montgomery Street, San Francisco, CA 94104",
7275
+ intermediaryFIName: "Bank of America",
7276
+ intermediaryFIRoutingNumber: "026009593",
7277
+ intermediaryFIAddress: "100 Federal Street, Boston, MA 02110",
7278
+ raw: {
7279
+ messageType: "MT103",
7280
+ sender: "WFBIUS6SXXX",
7281
+ receiver: "CHASUS33XXX",
7282
+ transactionReference: "INV-2024-089-TXN-001",
7283
+ relatedReference: "INV-2024-089",
7284
+ bankOperationCode: "CRED",
7285
+ instructionCode: "CHQB",
7286
+ valueDate: "2025-09-30",
7287
+ currency: "USD",
7288
+ amount: "15000.00",
7289
+ orderingCustomer: {
7290
+ account: "445821903456",
7291
+ name: "Tech Solutions LLC",
7292
+ address: [
7293
+ "123 Tech Street",
7294
+ "San Francisco, CA 94105",
7295
+ "United States"
7296
+ ]
7297
+ },
7298
+ orderingInstitution: {
7299
+ bic: "WFBIUS6SXXX",
7300
+ name: "Wells Fargo Bank N.A.",
7301
+ address: [
7302
+ "420 Montgomery Street",
7303
+ "San Francisco, CA 94104"
7304
+ ]
7305
+ },
7306
+ intermediaryInstitution: {
7307
+ bic: "BOFAUS3NXXX",
7308
+ name: "Bank of America N.A.",
7309
+ clearingCode: "026009593",
7310
+ address: [
7311
+ "100 Federal Street",
7312
+ "Boston, MA 02110"
7313
+ ]
7314
+ },
7315
+ beneficiaryInstitution: {
7316
+ bic: "CHASUS33XXX",
7317
+ name: "JPMorgan Chase Bank N.A.",
7318
+ clearingCode: "021000021",
7319
+ address: [
7320
+ "270 Park Avenue",
7321
+ "New York, NY 10017"
7322
+ ]
7323
+ },
7324
+ beneficiaryCustomer: {
7325
+ account: "998877665544",
7326
+ name: "Global Suppliers Inc",
7327
+ address: [
7328
+ "456 Supply Avenue",
7329
+ "New York, NY 10001",
7330
+ "United States"
7331
+ ]
7332
+ },
7333
+ remittanceInformation: "Invoice Payment for INV-2024-089 - Equipment Purchase",
7334
+ regulatoryReporting: {
7335
+ code: "BENEFRES",
7336
+ country: "US",
7337
+ narrative: "Payment for goods"
7338
+ },
7339
+ senderToReceiverInformation: [
7340
+ "Payment for invoice INV-2024-089",
7341
+ "Equipment and supplies purchase",
7342
+ "Net 30 terms - On time payment"
7343
+ ],
7344
+ chargeDetails: "OUR"
7345
+ }
7346
+ }
7347
+ },
7348
+ {
7349
+ id: "4",
7350
+ created: "2025-09-30 22:18",
7351
+ accountNumber: "778901234567",
7352
+ amount: -2500.75,
7353
+ customer: "Metro Business Group",
7354
+ counterparty: "Pacific Trading Co",
7355
+ description: "Vendor Payment",
7356
+ transactionType: "Ach Originator Debit",
7357
+ status: "POSTED",
7358
+ updated: "2025-09-30 23:01"
7359
+ },
7360
+ {
7361
+ id: "5",
7362
+ created: "2025-09-30 21:05",
7363
+ accountNumber: "334455667788",
7364
+ amount: 500,
7365
+ customer: "Sunrise Enterprises",
7366
+ counterparty: "John Mitchell",
7367
+ description: "Contractor Payment",
7368
+ transactionType: "Ach Originator Credit",
7369
+ status: "PENDING",
7370
+ updated: "2025-09-30 21:05"
7371
+ },
7372
+ {
7373
+ id: "6",
7374
+ created: "2025-09-30 19:30",
7375
+ accountNumber: "998877665544",
7376
+ amount: -125e3,
7377
+ customer: "Real Estate Holdings",
7378
+ counterparty: "Property Management LLC",
7379
+ description: "Monthly Rent Payment",
7380
+ transactionType: "Wire Domestic Debit",
7381
+ status: "POSTED",
7382
+ updated: "2025-09-30 20:15"
7383
+ },
7384
+ {
7385
+ id: "7",
7386
+ created: "2025-09-30 17:22",
7387
+ accountNumber: "556677889900",
7388
+ amount: 3,
7389
+ customer: "First National Bank",
7390
+ counterparty: "Sarah Johnson",
7391
+ description: "Wire Transfer Fee",
7392
+ transactionType: "Fee Wire Transaction",
7393
+ status: "POSTED",
7394
+ updated: "2025-09-30 17:22"
7395
+ },
7396
+ {
7397
+ id: "8",
7398
+ created: "2025-09-30 15:40",
7399
+ accountNumber: "223344556677",
7400
+ amount: 8750.5,
7401
+ customer: "Innovation Labs Inc",
7402
+ counterparty: "Research Partners",
7403
+ description: "R&D Funding Transfer",
7404
+ transactionType: "Ach Originator Credit",
7405
+ status: "FAILED",
7406
+ updated: "2025-09-30 16:10"
7407
+ }
7408
+ ];
7409
+ var mockTransactionTimeline = [
7410
+ {
7411
+ id: "1",
7412
+ action: "Transaction Created",
7413
+ user: "System",
7414
+ details: "Transaction initiated via API",
7415
+ status: "Pending",
7416
+ timestamp: "2025-10-01 00:16:23"
7417
+ },
7418
+ {
7419
+ id: "2",
7420
+ action: "Validation Completed",
7421
+ user: "System",
7422
+ details: "All validation checks passed",
7423
+ timestamp: "2025-10-01 00:16:45"
7424
+ },
7425
+ {
7426
+ id: "3",
7427
+ action: "Assigned for Review",
7428
+ user: "approverdev",
7429
+ details: "Transaction assigned to compliance team",
7430
+ status: "In Progress",
7431
+ timestamp: "2025-10-01 00:17:12"
7432
+ },
7433
+ {
7434
+ id: "4",
7435
+ action: "Compliance Review",
7436
+ user: "Sarah Johnson",
7437
+ details: "AML and sanctions screening completed",
7438
+ timestamp: "2025-10-01 00:18:30"
7439
+ },
7440
+ {
7441
+ id: "5",
7442
+ action: "Approved",
7443
+ user: "Michael Chen",
7444
+ details: "Transaction approved for processing",
7445
+ status: "Closed",
7446
+ timestamp: "2025-10-01 00:19:45"
7447
+ }
7448
+ ];
7449
+ var TransactionHistory = () => {
7450
+ const navigate = useNavigate();
7451
+ const [currentPage, setCurrentPage] = useState(1);
7452
+ const [rowsPerPage, setRowsPerPage] = useState(100);
7453
+ const [filters, setFilters] = useState({
7454
+ accountNumber: "",
7455
+ product: "",
7456
+ customerId: "",
7457
+ counterpartyId: "",
7458
+ settlementFileName: "",
7459
+ originalFileName: "",
7460
+ requesterIpAddress: "",
7461
+ requesterUsername: "",
7462
+ wireFileHandle: "",
7463
+ paymentId: "",
7464
+ transactionType: "",
7465
+ transactionStatus: "",
7466
+ processingStatus: "",
7467
+ direction: "",
7468
+ minAmount: "",
7469
+ maxAmount: "",
7470
+ creationDateStart: void 0,
7471
+ creationDateEnd: void 0,
7472
+ postDateStart: void 0,
7473
+ postDateEnd: void 0
7474
+ });
7475
+ const handleFilterChange = (field, value) => {
7476
+ setFilters((prev) => ({ ...prev, [field]: value }));
7477
+ };
7478
+ const applyFilters = () => {
7479
+ console.log("Applying filters:", filters);
7480
+ };
7481
+ const resetFilters = () => {
7482
+ setFilters({
7483
+ accountNumber: "",
7484
+ product: "",
7485
+ customerId: "",
7486
+ counterpartyId: "",
7487
+ settlementFileName: "",
7488
+ originalFileName: "",
7489
+ requesterIpAddress: "",
7490
+ requesterUsername: "",
7491
+ wireFileHandle: "",
7492
+ paymentId: "",
7493
+ transactionType: "",
7494
+ transactionStatus: "",
7495
+ processingStatus: "",
7496
+ direction: "",
7497
+ minAmount: "",
7498
+ maxAmount: "",
7499
+ creationDateStart: void 0,
7500
+ creationDateEnd: void 0,
7501
+ postDateStart: void 0,
7502
+ postDateEnd: void 0
7503
+ });
7504
+ };
7505
+ const totalPages = Math.ceil(mockTransactions.length / rowsPerPage);
7506
+ const startIndex = (currentPage - 1) * rowsPerPage;
7507
+ const endIndex = startIndex + rowsPerPage;
7508
+ const paginatedTransactions = mockTransactions.slice(startIndex, endIndex);
7509
+ const handlePageChange = (newPage) => {
7510
+ if (newPage >= 1 && newPage <= totalPages) {
7511
+ setCurrentPage(newPage);
7512
+ }
7513
+ };
7514
+ const handleRowsPerPageChange = (value) => {
7515
+ setRowsPerPage(value);
7516
+ setCurrentPage(1);
7517
+ };
7518
+ const formatCurrency = (value) => {
7519
+ const formatted = new Intl.NumberFormat("en-US", {
7520
+ style: "currency",
7521
+ currency: "USD",
7522
+ minimumFractionDigits: 2
7523
+ }).format(value);
7524
+ return formatted;
7525
+ };
7526
+ return /* @__PURE__ */ jsxs("div", { className: "flex flex-col h-screen bg-gradient-subtle", children: [
7527
+ /* @__PURE__ */ jsx("div", { className: "flex-none border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60", children: /* @__PURE__ */ jsx("div", { className: "container mx-auto px-4 py-4 max-w-none", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
7528
+ /* @__PURE__ */ jsx("h1", { className: "text-3xl font-bold text-foreground", children: "Transaction History" }),
7529
+ /* @__PURE__ */ jsxs(Sheet, { children: [
7530
+ /* @__PURE__ */ jsx(SheetTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(Button, { variant: "outline", className: "gap-2", children: [
7531
+ /* @__PURE__ */ jsx(Filter, { className: "h-4 w-4" }),
7532
+ "Filters"
7533
+ ] }) }),
7534
+ /* @__PURE__ */ jsxs(SheetContent, { side: "right", className: "w-full sm:max-w-xl overflow-y-auto", children: [
7535
+ /* @__PURE__ */ jsx(SheetHeader, { children: /* @__PURE__ */ jsx(SheetTitle, { children: "Transaction Filters" }) }),
7536
+ /* @__PURE__ */ jsxs("div", { className: "space-y-6 py-6", children: [
7537
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
7538
+ /* @__PURE__ */ jsx(
7539
+ EnhancedInput,
7540
+ {
7541
+ label: "Account Number",
7542
+ value: filters.accountNumber,
7543
+ onChange: (e) => handleFilterChange("accountNumber", e.target.value),
7544
+ placeholder: "Enter account number"
7545
+ }
7546
+ ),
7547
+ /* @__PURE__ */ jsx(
7548
+ EnhancedSelect,
7549
+ {
7550
+ label: "Product",
7551
+ value: filters.product,
7552
+ onValueChange: (value) => handleFilterChange("product", value),
7553
+ placeholder: "Select product",
7554
+ options: [
7555
+ { value: "wire", label: "Wire" },
7556
+ { value: "ach", label: "ACH" },
7557
+ { value: "check", label: "Check" }
7558
+ ]
7559
+ }
7560
+ )
7561
+ ] }),
7562
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
7563
+ /* @__PURE__ */ jsx(
7564
+ EnhancedInput,
7565
+ {
7566
+ label: "Customer ID",
7567
+ value: filters.customerId,
7568
+ onChange: (e) => handleFilterChange("customerId", e.target.value),
7569
+ placeholder: "Enter customer ID"
7570
+ }
7571
+ ),
7572
+ /* @__PURE__ */ jsx(
7573
+ EnhancedInput,
7574
+ {
7575
+ label: "Counterparty ID",
7576
+ value: filters.counterpartyId,
7577
+ onChange: (e) => handleFilterChange("counterpartyId", e.target.value),
7578
+ placeholder: "Enter counterparty ID"
7579
+ }
7580
+ )
7581
+ ] }),
7582
+ /* @__PURE__ */ jsx(
7583
+ EnhancedInput,
7584
+ {
7585
+ label: "Settlement File Name",
7586
+ value: filters.settlementFileName,
7587
+ onChange: (e) => handleFilterChange("settlementFileName", e.target.value),
7588
+ placeholder: "Enter settlement file name"
7589
+ }
7590
+ ),
7591
+ /* @__PURE__ */ jsx(
7592
+ EnhancedInput,
7593
+ {
7594
+ label: "Original File Name",
7595
+ value: filters.originalFileName,
7596
+ onChange: (e) => handleFilterChange("originalFileName", e.target.value),
7597
+ placeholder: "Enter original file name"
7598
+ }
7599
+ ),
7600
+ /* @__PURE__ */ jsx(
7601
+ EnhancedInput,
7602
+ {
7603
+ label: "Requester IP Address",
7604
+ value: filters.requesterIpAddress,
7605
+ onChange: (e) => handleFilterChange("requesterIpAddress", e.target.value),
7606
+ placeholder: "Enter IP address"
7607
+ }
7608
+ ),
7609
+ /* @__PURE__ */ jsx(
7610
+ EnhancedInput,
7611
+ {
7612
+ label: "Requester Username",
7613
+ value: filters.requesterUsername,
7614
+ onChange: (e) => handleFilterChange("requesterUsername", e.target.value),
7615
+ placeholder: "Enter username"
7616
+ }
7617
+ ),
7618
+ /* @__PURE__ */ jsx(
7619
+ EnhancedInput,
7620
+ {
7621
+ label: "Wire File Handle",
7622
+ value: filters.wireFileHandle,
7623
+ onChange: (e) => handleFilterChange("wireFileHandle", e.target.value),
7624
+ placeholder: "Enter wire file handle"
7625
+ }
7626
+ ),
7627
+ /* @__PURE__ */ jsx(
7628
+ EnhancedInput,
7629
+ {
7630
+ label: "Payment ID",
7631
+ value: filters.paymentId,
7632
+ onChange: (e) => handleFilterChange("paymentId", e.target.value),
7633
+ placeholder: "Enter payment ID"
7634
+ }
7635
+ ),
7636
+ /* @__PURE__ */ jsx(
7637
+ EnhancedSelect,
7638
+ {
7639
+ label: "Transaction Type",
7640
+ value: filters.transactionType,
7641
+ onValueChange: (value) => handleFilterChange("transactionType", value),
7642
+ placeholder: "Select transaction type",
7643
+ options: [
7644
+ { value: "ach_credit", label: "ACH Credit" },
7645
+ { value: "ach_debit", label: "ACH Debit" },
7646
+ { value: "wire_domestic", label: "Wire Domestic" },
7647
+ { value: "wire_international", label: "Wire International" }
7648
+ ]
7649
+ }
7650
+ ),
7651
+ /* @__PURE__ */ jsx(
7652
+ EnhancedSelect,
7653
+ {
7654
+ label: "Transaction Status",
7655
+ value: filters.transactionStatus,
7656
+ onValueChange: (value) => handleFilterChange("transactionStatus", value),
7657
+ placeholder: "Select transaction status",
7658
+ options: [
7659
+ { value: "PENDING", label: "Pending" },
7660
+ { value: "POSTED", label: "Posted" },
7661
+ { value: "FAILED", label: "Failed" },
7662
+ { value: "CANCELLED", label: "Cancelled" }
7663
+ ]
7664
+ }
7665
+ ),
7666
+ /* @__PURE__ */ jsx(
7667
+ EnhancedSelect,
7668
+ {
7669
+ label: "Processing Status",
7670
+ value: filters.processingStatus,
7671
+ onValueChange: (value) => handleFilterChange("processingStatus", value),
7672
+ placeholder: "Select processing status",
7673
+ options: [
7674
+ { value: "processing", label: "Processing" },
7675
+ { value: "completed", label: "Completed" },
7676
+ { value: "error", label: "Error" }
7677
+ ]
7678
+ }
7679
+ ),
7680
+ /* @__PURE__ */ jsx(
7681
+ EnhancedSelect,
7682
+ {
7683
+ label: "Direction",
7684
+ value: filters.direction,
7685
+ onValueChange: (value) => handleFilterChange("direction", value),
7686
+ placeholder: "Select direction",
7687
+ options: [
7688
+ { value: "credit", label: "Credit" },
7689
+ { value: "debit", label: "Debit" }
7690
+ ]
7691
+ }
7692
+ ),
7693
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
7694
+ /* @__PURE__ */ jsx(
7695
+ EnhancedInput,
7696
+ {
7697
+ label: "Min Amount",
7698
+ type: "number",
7699
+ value: filters.minAmount,
7700
+ onChange: (e) => handleFilterChange("minAmount", e.target.value),
7701
+ placeholder: "0.00"
7702
+ }
7703
+ ),
7704
+ /* @__PURE__ */ jsx(
7705
+ EnhancedInput,
7706
+ {
7707
+ label: "Max Amount",
7708
+ type: "number",
7709
+ value: filters.maxAmount,
7710
+ onChange: (e) => handleFilterChange("maxAmount", e.target.value),
7711
+ placeholder: "0.00"
7712
+ }
7713
+ )
7714
+ ] }),
7715
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
7716
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
7717
+ /* @__PURE__ */ jsx("label", { className: "text-sm font-medium", children: "Creation Date Start" }),
7718
+ /* @__PURE__ */ jsxs(Popover, { children: [
7719
+ /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
7720
+ Button,
7721
+ {
7722
+ variant: "outline",
7723
+ className: cn(
7724
+ "w-full justify-start text-left font-normal",
7725
+ !filters.creationDateStart && "text-muted-foreground"
7726
+ ),
7727
+ children: [
7728
+ /* @__PURE__ */ jsx(Calendar$1, { className: "mr-2 h-4 w-4" }),
7729
+ filters.creationDateStart ? format(filters.creationDateStart, "MM/dd/yyyy") : /* @__PURE__ */ jsx("span", { children: "MM/DD/YYYY" })
7730
+ ]
7731
+ }
7732
+ ) }),
7733
+ /* @__PURE__ */ jsx(PopoverContent, { className: "w-auto p-0 bg-background z-50", align: "start", children: /* @__PURE__ */ jsx(
7734
+ Calendar,
7735
+ {
7736
+ mode: "single",
7737
+ selected: filters.creationDateStart,
7738
+ onSelect: (date) => handleFilterChange("creationDateStart", date),
7739
+ initialFocus: true,
7740
+ className: "pointer-events-auto"
7741
+ }
7742
+ ) })
7743
+ ] })
7744
+ ] }),
7745
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
7746
+ /* @__PURE__ */ jsx("label", { className: "text-sm font-medium", children: "Creation Date End" }),
7747
+ /* @__PURE__ */ jsxs(Popover, { children: [
7748
+ /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
7749
+ Button,
7750
+ {
7751
+ variant: "outline",
7752
+ className: cn(
7753
+ "w-full justify-start text-left font-normal",
7754
+ !filters.creationDateEnd && "text-muted-foreground"
7755
+ ),
7756
+ children: [
7757
+ /* @__PURE__ */ jsx(Calendar$1, { className: "mr-2 h-4 w-4" }),
7758
+ filters.creationDateEnd ? format(filters.creationDateEnd, "MM/dd/yyyy") : /* @__PURE__ */ jsx("span", { children: "MM/DD/YYYY" })
7759
+ ]
7760
+ }
7761
+ ) }),
7762
+ /* @__PURE__ */ jsx(PopoverContent, { className: "w-auto p-0 bg-background z-50", align: "start", children: /* @__PURE__ */ jsx(
7763
+ Calendar,
7764
+ {
7765
+ mode: "single",
7766
+ selected: filters.creationDateEnd,
7767
+ onSelect: (date) => handleFilterChange("creationDateEnd", date),
7768
+ initialFocus: true,
7769
+ className: "pointer-events-auto"
7770
+ }
7771
+ ) })
7772
+ ] })
7773
+ ] })
7774
+ ] }),
7775
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
7776
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
7777
+ /* @__PURE__ */ jsx("label", { className: "text-sm font-medium", children: "Post Date Start" }),
7778
+ /* @__PURE__ */ jsxs(Popover, { children: [
7779
+ /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
7780
+ Button,
7781
+ {
7782
+ variant: "outline",
7783
+ className: cn(
7784
+ "w-full justify-start text-left font-normal",
7785
+ !filters.postDateStart && "text-muted-foreground"
7786
+ ),
7787
+ children: [
7788
+ /* @__PURE__ */ jsx(Calendar$1, { className: "mr-2 h-4 w-4" }),
7789
+ filters.postDateStart ? format(filters.postDateStart, "MM/dd/yyyy") : /* @__PURE__ */ jsx("span", { children: "MM/DD/YYYY" })
7790
+ ]
7791
+ }
7792
+ ) }),
7793
+ /* @__PURE__ */ jsx(PopoverContent, { className: "w-auto p-0 bg-background z-50", align: "start", children: /* @__PURE__ */ jsx(
7794
+ Calendar,
7795
+ {
7796
+ mode: "single",
7797
+ selected: filters.postDateStart,
7798
+ onSelect: (date) => handleFilterChange("postDateStart", date),
7799
+ initialFocus: true,
7800
+ className: "pointer-events-auto"
7801
+ }
7802
+ ) })
7803
+ ] })
7804
+ ] }),
7805
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
7806
+ /* @__PURE__ */ jsx("label", { className: "text-sm font-medium", children: "Post Date End" }),
7807
+ /* @__PURE__ */ jsxs(Popover, { children: [
7808
+ /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
7809
+ Button,
7810
+ {
7811
+ variant: "outline",
7812
+ className: cn(
7813
+ "w-full justify-start text-left font-normal",
7814
+ !filters.postDateEnd && "text-muted-foreground"
7815
+ ),
7816
+ children: [
7817
+ /* @__PURE__ */ jsx(Calendar$1, { className: "mr-2 h-4 w-4" }),
7818
+ filters.postDateEnd ? format(filters.postDateEnd, "MM/dd/yyyy") : /* @__PURE__ */ jsx("span", { children: "MM/DD/YYYY" })
7819
+ ]
7820
+ }
7821
+ ) }),
7822
+ /* @__PURE__ */ jsx(PopoverContent, { className: "w-auto p-0 bg-background z-50", align: "start", children: /* @__PURE__ */ jsx(
7823
+ Calendar,
7824
+ {
7825
+ mode: "single",
7826
+ selected: filters.postDateEnd,
7827
+ onSelect: (date) => handleFilterChange("postDateEnd", date),
7828
+ initialFocus: true,
7829
+ className: "pointer-events-auto"
7830
+ }
7831
+ ) })
7832
+ ] })
7833
+ ] })
7834
+ ] })
7835
+ ] }),
7836
+ /* @__PURE__ */ jsxs(SheetFooter, { className: "gap-2", children: [
7837
+ /* @__PURE__ */ jsx(Button, { variant: "outline", onClick: resetFilters, children: "Reset Filters" }),
7838
+ /* @__PURE__ */ jsx(Button, { onClick: applyFilters, children: "Apply Filters" })
7839
+ ] })
7840
+ ] })
7841
+ ] })
7842
+ ] }) }) }),
7843
+ /* @__PURE__ */ jsx("div", { className: "flex-1 overflow-hidden", children: /* @__PURE__ */ jsx("div", { className: "container mx-auto px-4 h-full max-w-none flex flex-col", children: /* @__PURE__ */ jsxs("div", { className: "flex-1 mt-4 rounded-lg border bg-card overflow-hidden flex flex-col", children: [
7844
+ /* @__PURE__ */ jsx("div", { className: "flex-1 overflow-auto", children: /* @__PURE__ */ jsxs("table", { className: "w-full table-fixed", children: [
7845
+ /* @__PURE__ */ jsxs("colgroup", { children: [
7846
+ /* @__PURE__ */ jsx("col", { className: "w-28" }),
7847
+ /* @__PURE__ */ jsx("col", { className: "w-28" }),
7848
+ /* @__PURE__ */ jsx("col", { className: "w-24" }),
7849
+ /* @__PURE__ */ jsx("col", { className: "w-36" }),
7850
+ /* @__PURE__ */ jsx("col", { className: "w-36" }),
7851
+ /* @__PURE__ */ jsx("col", { className: "w-auto" }),
7852
+ /* @__PURE__ */ jsx("col", { className: "w-36" }),
7853
+ /* @__PURE__ */ jsx("col", { className: "w-24" }),
7854
+ /* @__PURE__ */ jsx("col", { className: "w-28" })
7855
+ ] }),
7856
+ /* @__PURE__ */ jsx("thead", { className: "sticky top-0 bg-card z-10 shadow-sm", children: /* @__PURE__ */ jsxs("tr", { className: "border-b", children: [
7857
+ /* @__PURE__ */ jsx("th", { className: "px-3 py-2 text-left text-xs font-medium bg-muted/50", children: "Created" }),
7858
+ /* @__PURE__ */ jsx("th", { className: "px-3 py-2 text-left text-xs font-medium bg-muted/50", children: "Account Number" }),
7859
+ /* @__PURE__ */ jsx("th", { className: "px-3 py-2 text-right text-xs font-medium bg-muted/50", children: "Amount" }),
7860
+ /* @__PURE__ */ jsx("th", { className: "px-3 py-2 text-left text-xs font-medium bg-muted/50", children: "Customer" }),
7861
+ /* @__PURE__ */ jsx("th", { className: "px-3 py-2 text-left text-xs font-medium bg-muted/50", children: "Counterparty" }),
7862
+ /* @__PURE__ */ jsx("th", { className: "px-3 py-2 text-left text-xs font-medium bg-muted/50", children: "Description" }),
7863
+ /* @__PURE__ */ jsx("th", { className: "px-3 py-2 text-left text-xs font-medium bg-muted/50", children: "Transaction Type" }),
7864
+ /* @__PURE__ */ jsx("th", { className: "px-3 py-2 text-left text-xs font-medium bg-muted/50", children: "Status" }),
7865
+ /* @__PURE__ */ jsx("th", { className: "px-3 py-2 text-left text-xs font-medium bg-muted/50", children: "Updated" })
7866
+ ] }) }),
7867
+ /* @__PURE__ */ jsx("tbody", { children: paginatedTransactions.map((transaction) => /* @__PURE__ */ jsxs(
7868
+ "tr",
7869
+ {
7870
+ onClick: () => navigate(`/transactions/${transaction.id}`),
7871
+ className: "border-b hover:bg-muted/50 transition-colors cursor-pointer",
7872
+ children: [
7873
+ /* @__PURE__ */ jsx("td", { className: "px-3 py-2 text-xs", children: transaction.created }),
7874
+ /* @__PURE__ */ jsx("td", { className: "px-3 py-2 text-xs", children: transaction.accountNumber }),
7875
+ /* @__PURE__ */ jsx("td", { className: "px-3 py-2 text-xs text-right", children: /* @__PURE__ */ jsx("span", { className: transaction.amount < 0 ? "text-destructive" : "", children: formatCurrency(transaction.amount) }) }),
7876
+ /* @__PURE__ */ jsx("td", { className: "px-3 py-2", children: /* @__PURE__ */ jsx(Button, { variant: "link", className: "h-auto p-0 font-normal text-xs", children: transaction.customer }) }),
7877
+ /* @__PURE__ */ jsx("td", { className: "px-3 py-2", children: /* @__PURE__ */ jsx(Button, { variant: "link", className: "h-auto p-0 font-normal text-xs", children: transaction.counterparty }) }),
7878
+ /* @__PURE__ */ jsx("td", { className: "px-3 py-2 text-xs truncate", children: transaction.description }),
7879
+ /* @__PURE__ */ jsx("td", { className: "px-3 py-2", children: /* @__PURE__ */ jsx(Badge, { variant: "outline", className: "font-normal whitespace-nowrap text-xs", children: transaction.transactionType }) }),
7880
+ /* @__PURE__ */ jsx("td", { className: "px-3 py-2", children: /* @__PURE__ */ jsx(StatusBadge, { status: transaction.status }) }),
7881
+ /* @__PURE__ */ jsx("td", { className: "px-3 py-2 text-xs", children: transaction.updated })
7882
+ ]
7883
+ },
7884
+ transaction.id
7885
+ )) })
7886
+ ] }) }),
7887
+ /* @__PURE__ */ jsx("div", { className: "flex-none border-t bg-background py-3 px-4", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
7888
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
7889
+ /* @__PURE__ */ jsx("span", { className: "text-sm text-muted-foreground", children: "Rows per page:" }),
7890
+ /* @__PURE__ */ jsxs(DropdownMenu, { children: [
7891
+ /* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(Button, { variant: "outline", size: "sm", className: "h-8 gap-1", children: [
7892
+ rowsPerPage,
7893
+ /* @__PURE__ */ jsx(ChevronRight, { className: "h-4 w-4 rotate-90" })
7894
+ ] }) }),
7895
+ /* @__PURE__ */ jsxs(DropdownMenuContent, { align: "start", className: "bg-background z-50", children: [
7896
+ /* @__PURE__ */ jsx(DropdownMenuItem, { onClick: () => handleRowsPerPageChange(100), children: "100" }),
7897
+ /* @__PURE__ */ jsx(DropdownMenuItem, { onClick: () => handleRowsPerPageChange(200), children: "200" }),
7898
+ /* @__PURE__ */ jsx(DropdownMenuItem, { onClick: () => handleRowsPerPageChange(500), children: "500" })
7899
+ ] })
7900
+ ] })
7901
+ ] }),
7902
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-4", children: [
7903
+ /* @__PURE__ */ jsxs("span", { className: "text-sm text-muted-foreground", children: [
7904
+ "Page ",
7905
+ currentPage,
7906
+ " of ",
7907
+ totalPages
7908
+ ] }),
7909
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
7910
+ /* @__PURE__ */ jsx(
7911
+ Button,
7912
+ {
7913
+ variant: "outline",
7914
+ size: "sm",
7915
+ className: "h-8 w-8 p-0",
7916
+ onClick: () => handlePageChange(currentPage - 1),
7917
+ disabled: currentPage === 1,
7918
+ children: /* @__PURE__ */ jsx(ChevronLeft, { className: "h-4 w-4" })
7919
+ }
7920
+ ),
7921
+ /* @__PURE__ */ jsx(
7922
+ Button,
7923
+ {
7924
+ variant: "outline",
7925
+ size: "sm",
7926
+ className: "h-8 w-8 p-0",
7927
+ onClick: () => handlePageChange(currentPage + 1),
7928
+ disabled: currentPage === totalPages,
7929
+ children: /* @__PURE__ */ jsx(ChevronRight, { className: "h-4 w-4" })
7930
+ }
7931
+ )
7932
+ ] })
7933
+ ] })
7934
+ ] }) })
7935
+ ] }) }) })
7936
+ ] });
7937
+ };
7938
+ var TransactionHistory_default = TransactionHistory;
7939
+ var newTransactionSchema = z.object({
6076
7940
  transactionType: z.string().min(1, "Transaction type is required"),
6077
7941
  accountNumber: z.string().min(1, "Account number is required"),
6078
7942
  counterpartyName: z.string().min(1, "Counterparty name is required"),
@@ -6080,7 +7944,649 @@ z.object({
6080
7944
  currency: z.string().min(1, "Currency is required"),
6081
7945
  description: z.string().optional()
6082
7946
  });
7947
+ var TRANSACTION_TYPES = [
7948
+ { value: "transfer", label: "Transfer", icon: ArrowLeftRight },
7949
+ { value: "adjustment", label: "Adjustment", icon: Settings },
7950
+ { value: "ach", label: "ACH", icon: Building2 },
7951
+ { value: "wire", label: "Wire", icon: Zap }
7952
+ ];
7953
+ var CURRENCY_OPTIONS = [
7954
+ { value: "USD", label: "USD - US Dollar" },
7955
+ { value: "EUR", label: "EUR - Euro" },
7956
+ { value: "GBP", label: "GBP - British Pound" },
7957
+ { value: "JPY", label: "JPY - Japanese Yen" },
7958
+ { value: "CAD", label: "CAD - Canadian Dollar" },
7959
+ { value: "AUD", label: "AUD - Australian Dollar" },
7960
+ { value: "CHF", label: "CHF - Swiss Franc" },
7961
+ { value: "CNY", label: "CNY - Chinese Yuan" }
7962
+ ];
7963
+ var mockAccountData = {
7964
+ accountNumber: "****1234",
7965
+ accountName: "Business Checking",
7966
+ accountType: "Checking",
7967
+ balance: "$125,450.00",
7968
+ customerName: "Acme Corporation",
7969
+ customerId: "CUST-001",
7970
+ customerType: "Business"
7971
+ };
7972
+ var mockCounterpartyData = {
7973
+ counterpartyName: "Global Tech Solutions Inc.",
7974
+ counterpartyId: "CP-5678",
7975
+ counterpartyType: "Business",
7976
+ status: "Active",
7977
+ taxId: "98-7654321",
7978
+ primaryContact: "Sarah Johnson",
7979
+ contactEmail: "sarah.johnson@globaltech.com",
7980
+ contactPhone: "+1 (555) 987-6543",
7981
+ address: "456 Innovation Drive, San Francisco, CA 94105"
7982
+ };
7983
+ function NewTransaction() {
7984
+ const navigate = useNavigate();
7985
+ const [accountLookedUp, setAccountLookedUp] = useState(false);
7986
+ const [accountData, setAccountData] = useState(null);
7987
+ const [counterpartyLookedUp, setCounterpartyLookedUp] = useState(false);
7988
+ const [counterpartyData, setCounterpartyData] = useState(null);
7989
+ const [confirmationOpen, setConfirmationOpen] = useState(false);
7990
+ const [submissionStatus, setSubmissionStatus] = useState(null);
7991
+ const [errorMessage, setErrorMessage] = useState("");
7992
+ const [transactionId, setTransactionId] = useState("");
7993
+ const form = useForm({
7994
+ resolver: zodResolver(newTransactionSchema),
7995
+ defaultValues: {
7996
+ transactionType: "",
7997
+ accountNumber: "",
7998
+ counterpartyName: "",
7999
+ amount: "",
8000
+ currency: "USD",
8001
+ description: ""
8002
+ }
8003
+ });
8004
+ const transactionType = form.watch("transactionType");
8005
+ const accountNumber = form.watch("accountNumber");
8006
+ const counterpartyName = form.watch("counterpartyName");
8007
+ const amount = form.watch("amount");
8008
+ const handleAccountLookup = () => {
8009
+ const accNum = form.getValues("accountNumber");
8010
+ if (!accNum) {
8011
+ toast$1.error("Please enter an account number");
8012
+ return;
8013
+ }
8014
+ setAccountData(mockAccountData);
8015
+ setAccountLookedUp(true);
8016
+ toast$1.success("Account found");
8017
+ };
8018
+ const handleCounterpartyLookup = () => {
8019
+ const cpName = form.getValues("counterpartyName");
8020
+ if (!cpName) {
8021
+ toast$1.error("Please enter a counterparty name");
8022
+ return;
8023
+ }
8024
+ setCounterpartyData(mockCounterpartyData);
8025
+ setCounterpartyLookedUp(true);
8026
+ toast$1.success("Counterparty found");
8027
+ };
8028
+ const handleEditAccount = () => {
8029
+ setAccountLookedUp(false);
8030
+ setAccountData(null);
8031
+ form.setValue("transactionType", "");
8032
+ setCounterpartyLookedUp(false);
8033
+ setCounterpartyData(null);
8034
+ form.setValue("counterpartyName", "");
8035
+ form.setValue("amount", "");
8036
+ form.setValue("description", "");
8037
+ };
8038
+ const handleEditCounterparty = () => {
8039
+ setCounterpartyLookedUp(false);
8040
+ setCounterpartyData(null);
8041
+ form.setValue("amount", "");
8042
+ form.setValue("description", "");
8043
+ };
8044
+ const handleSubmit = () => {
8045
+ const data = form.getValues();
8046
+ if (!data.transactionType || !data.accountNumber || !data.counterpartyName || !data.amount) {
8047
+ toast$1.error("Please complete all required fields");
8048
+ return;
8049
+ }
8050
+ if (!accountLookedUp || !counterpartyLookedUp) {
8051
+ toast$1.error("Please lookup both account and counterparty");
8052
+ return;
8053
+ }
8054
+ const amount2 = parseFloat(data.amount);
8055
+ const hasError = Math.random() > 0.7;
8056
+ if (hasError) {
8057
+ const errorScenarios = [
8058
+ "Insufficient funds. Current balance: $125,450.00, Required: $" + amount2.toFixed(2),
8059
+ "Transaction limit exceeded. Daily limit: $50,000.00",
8060
+ "Counterparty account is temporarily unavailable. Please try again later.",
8061
+ "Invalid routing number for the selected transaction type."
8062
+ ];
8063
+ setSubmissionStatus("error");
8064
+ setErrorMessage(errorScenarios[Math.floor(Math.random() * errorScenarios.length)]);
8065
+ setConfirmationOpen(true);
8066
+ } else {
8067
+ const txId = "TXN-" + Math.random().toString(36).substr(2, 9).toUpperCase();
8068
+ setTransactionId(txId);
8069
+ setSubmissionStatus("success");
8070
+ setConfirmationOpen(true);
8071
+ }
8072
+ };
8073
+ const handleConfirmationClose = () => {
8074
+ setConfirmationOpen(false);
8075
+ if (submissionStatus === "success") {
8076
+ navigate("/transactions/history");
8077
+ }
8078
+ };
8079
+ const handleCancel = () => {
8080
+ navigate("/dashboard");
8081
+ };
8082
+ const accountDataGrid = accountData ? [
8083
+ {
8084
+ title: "Account Information",
8085
+ items: [
8086
+ { label: "Account Number", value: accountData.accountNumber },
8087
+ { label: "Account Name", value: accountData.accountName },
8088
+ { label: "Account Type", value: accountData.accountType },
8089
+ { label: "Balance", value: accountData.balance },
8090
+ { label: "Customer Name", value: accountData.customerName },
8091
+ { label: "Customer ID", value: accountData.customerId }
8092
+ ]
8093
+ }
8094
+ ] : [];
8095
+ const counterpartyDataGrid = counterpartyData ? [
8096
+ {
8097
+ title: "Counterparty Information",
8098
+ items: [
8099
+ { label: "Counterparty Name", value: counterpartyData.counterpartyName },
8100
+ { label: "Counterparty ID", value: counterpartyData.counterpartyId },
8101
+ { label: "Type", value: counterpartyData.counterpartyType },
8102
+ { label: "Status", value: counterpartyData.status },
8103
+ { label: "Tax ID", value: counterpartyData.taxId },
8104
+ { label: "Primary Contact", value: counterpartyData.primaryContact },
8105
+ { label: "Contact Email", value: counterpartyData.contactEmail },
8106
+ { label: "Contact Phone", value: counterpartyData.contactPhone },
8107
+ { label: "Address", value: counterpartyData.address }
8108
+ ]
8109
+ }
8110
+ ] : [];
8111
+ const reviewData = [
8112
+ {
8113
+ title: "Transaction Summary",
8114
+ items: [
8115
+ { label: "Transaction Type", value: TRANSACTION_TYPES.find((t) => t.value === transactionType)?.label || "-" },
8116
+ { label: "Account Number", value: accountNumber || "-" },
8117
+ { label: "Counterparty", value: counterpartyName || "-" },
8118
+ { label: "Amount", value: amount ? `$${amount}` : "-" },
8119
+ { label: "Description", value: form.watch("description") || "N/A" }
8120
+ ]
8121
+ }
8122
+ ];
8123
+ return /* @__PURE__ */ jsx(
8124
+ PageLayout,
8125
+ {
8126
+ title: "New Transaction",
8127
+ description: "Complete the form below to initiate a new transaction",
8128
+ children: /* @__PURE__ */ jsxs("div", { className: "max-w-4xl mx-auto space-y-6", children: [
8129
+ /* @__PURE__ */ jsx(FormProvider, { form, children: /* @__PURE__ */ jsxs("form", { onSubmit: (e) => e.preventDefault(), children: [
8130
+ !accountLookedUp ? /* @__PURE__ */ jsx(
8131
+ FormCard,
8132
+ {
8133
+ title: "Account Lookup",
8134
+ variant: "default",
8135
+ children: /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
8136
+ /* @__PURE__ */ jsx(
8137
+ FormInput,
8138
+ {
8139
+ name: "accountNumber",
8140
+ label: "Account Number",
8141
+ placeholder: "Enter account number"
8142
+ }
8143
+ ),
8144
+ /* @__PURE__ */ jsxs(
8145
+ Button,
8146
+ {
8147
+ onClick: handleAccountLookup,
8148
+ className: "w-full sm:w-auto",
8149
+ disabled: !accountNumber,
8150
+ children: [
8151
+ /* @__PURE__ */ jsx(Search, { className: "h-4 w-4 mr-2" }),
8152
+ "Lookup Account"
8153
+ ]
8154
+ }
8155
+ )
8156
+ ] })
8157
+ }
8158
+ ) : (
8159
+ /* Account Information (Read-only) */
8160
+ /* @__PURE__ */ jsx(
8161
+ FormCard,
8162
+ {
8163
+ title: "Account Information",
8164
+ variant: "subtle",
8165
+ headerActions: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
8166
+ /* @__PURE__ */ jsx(CheckCircle2, { className: "h-5 w-5 text-success" }),
8167
+ /* @__PURE__ */ jsxs(
8168
+ Button,
8169
+ {
8170
+ variant: "ghost",
8171
+ size: "sm",
8172
+ onClick: handleEditAccount,
8173
+ children: [
8174
+ /* @__PURE__ */ jsx(Edit, { className: "h-4 w-4 mr-1" }),
8175
+ "Edit"
8176
+ ]
8177
+ }
8178
+ )
8179
+ ] }),
8180
+ children: /* @__PURE__ */ jsx(DataGrid, { data: accountDataGrid, columns: 2 })
8181
+ }
8182
+ )
8183
+ ),
8184
+ /* @__PURE__ */ jsx(
8185
+ FormCard,
8186
+ {
8187
+ title: "Transaction Type",
8188
+ variant: "default",
8189
+ className: cn(!accountLookedUp && "opacity-50 pointer-events-none"),
8190
+ children: /* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 lg:grid-cols-4 gap-3 lg:gap-4", children: TRANSACTION_TYPES.map((type) => {
8191
+ const Icon2 = type.icon;
8192
+ const isSelected = transactionType === type.value;
8193
+ return /* @__PURE__ */ jsxs(
8194
+ "button",
8195
+ {
8196
+ type: "button",
8197
+ onClick: () => form.setValue("transactionType", type.value),
8198
+ disabled: !accountLookedUp,
8199
+ className: cn(
8200
+ "flex flex-col items-center justify-center p-4 lg:p-3 rounded-lg border-2 transition-all",
8201
+ "hover:border-primary/50 hover:shadow-md",
8202
+ isSelected ? "border-primary bg-primary/5 shadow-sm" : "border-border bg-card"
8203
+ ),
8204
+ children: [
8205
+ /* @__PURE__ */ jsx(Icon2, { className: cn(
8206
+ "h-6 w-6 lg:h-5 lg:w-5 mb-2",
8207
+ isSelected ? "text-primary" : "text-muted-foreground"
8208
+ ) }),
8209
+ /* @__PURE__ */ jsx("span", { className: cn(
8210
+ "text-sm font-medium",
8211
+ isSelected ? "text-primary" : "text-foreground"
8212
+ ), children: type.label })
8213
+ ]
8214
+ },
8215
+ type.value
8216
+ );
8217
+ }) })
8218
+ }
8219
+ ),
8220
+ !counterpartyLookedUp ? /* @__PURE__ */ jsx(
8221
+ FormCard,
8222
+ {
8223
+ title: "Counterparty Lookup",
8224
+ variant: "default",
8225
+ className: cn(!transactionType && "opacity-50 pointer-events-none"),
8226
+ children: /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
8227
+ /* @__PURE__ */ jsx(
8228
+ FormInput,
8229
+ {
8230
+ name: "counterpartyName",
8231
+ label: "Counterparty Name",
8232
+ placeholder: "Enter counterparty name",
8233
+ disabled: !transactionType
8234
+ }
8235
+ ),
8236
+ /* @__PURE__ */ jsxs(
8237
+ Button,
8238
+ {
8239
+ onClick: handleCounterpartyLookup,
8240
+ className: "w-full sm:w-auto",
8241
+ disabled: !transactionType || !counterpartyName,
8242
+ children: [
8243
+ /* @__PURE__ */ jsx(Search, { className: "h-4 w-4 mr-2" }),
8244
+ "Lookup Counterparty"
8245
+ ]
8246
+ }
8247
+ )
8248
+ ] })
8249
+ }
8250
+ ) : (
8251
+ /* Counterparty Information (Read-only) */
8252
+ /* @__PURE__ */ jsx(
8253
+ FormCard,
8254
+ {
8255
+ title: "Counterparty Information",
8256
+ variant: "subtle",
8257
+ headerActions: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
8258
+ /* @__PURE__ */ jsx(CheckCircle2, { className: "h-5 w-5 text-success" }),
8259
+ /* @__PURE__ */ jsxs(
8260
+ Button,
8261
+ {
8262
+ variant: "ghost",
8263
+ size: "sm",
8264
+ onClick: handleEditCounterparty,
8265
+ children: [
8266
+ /* @__PURE__ */ jsx(Edit, { className: "h-4 w-4 mr-1" }),
8267
+ "Edit"
8268
+ ]
8269
+ }
8270
+ )
8271
+ ] }),
8272
+ children: /* @__PURE__ */ jsx(DataGrid, { data: counterpartyDataGrid, columns: 2 })
8273
+ }
8274
+ )
8275
+ ),
8276
+ /* @__PURE__ */ jsx(
8277
+ FormCard,
8278
+ {
8279
+ title: "Transaction Details",
8280
+ variant: "default",
8281
+ className: cn(!counterpartyLookedUp && "opacity-50 pointer-events-none"),
8282
+ children: /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
8283
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 sm:grid-cols-[1fr_auto] gap-4", children: [
8284
+ /* @__PURE__ */ jsx(
8285
+ FormInput,
8286
+ {
8287
+ name: "amount",
8288
+ label: "Amount",
8289
+ placeholder: "0.00",
8290
+ type: "number",
8291
+ disabled: !counterpartyLookedUp
8292
+ }
8293
+ ),
8294
+ /* @__PURE__ */ jsx(
8295
+ FormSelect,
8296
+ {
8297
+ name: "currency",
8298
+ label: "Currency",
8299
+ options: CURRENCY_OPTIONS,
8300
+ disabled: !counterpartyLookedUp
8301
+ }
8302
+ )
8303
+ ] }),
8304
+ /* @__PURE__ */ jsx(
8305
+ FormInput,
8306
+ {
8307
+ name: "description",
8308
+ label: "Description (Optional)",
8309
+ placeholder: "Enter transaction description",
8310
+ disabled: !counterpartyLookedUp
8311
+ }
8312
+ )
8313
+ ] })
8314
+ }
8315
+ ),
8316
+ /* @__PURE__ */ jsx(
8317
+ FormCard,
8318
+ {
8319
+ title: "Review & Submit",
8320
+ variant: "default",
8321
+ children: /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
8322
+ /* @__PURE__ */ jsx(DataGrid, { data: reviewData, columns: 2 }),
8323
+ /* @__PURE__ */ jsxs("div", { className: "flex gap-3 justify-end pt-4 border-t border-border", children: [
8324
+ /* @__PURE__ */ jsx(
8325
+ Button,
8326
+ {
8327
+ type: "button",
8328
+ variant: "outline",
8329
+ onClick: handleCancel,
8330
+ className: "w-32",
8331
+ children: "Cancel"
8332
+ }
8333
+ ),
8334
+ /* @__PURE__ */ jsxs(
8335
+ Button,
8336
+ {
8337
+ type: "button",
8338
+ onClick: handleSubmit,
8339
+ className: "w-48",
8340
+ disabled: !transactionType || !accountNumber || !counterpartyName || !amount,
8341
+ children: [
8342
+ /* @__PURE__ */ jsx(CheckCircle2, { className: "h-4 w-4 mr-2" }),
8343
+ "Submit Transaction"
8344
+ ]
8345
+ }
8346
+ )
8347
+ ] })
8348
+ ] })
8349
+ }
8350
+ )
8351
+ ] }) }),
8352
+ /* @__PURE__ */ jsx(Dialog, { open: confirmationOpen, onOpenChange: setConfirmationOpen, children: /* @__PURE__ */ jsxs(DialogContent, { className: "sm:max-w-md", children: [
8353
+ /* @__PURE__ */ jsxs(DialogHeader, { children: [
8354
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 mb-2", children: [
8355
+ submissionStatus === "success" ? /* @__PURE__ */ jsx("div", { className: "h-12 w-12 rounded-full bg-success/10 flex items-center justify-center", children: /* @__PURE__ */ jsx(CheckCircle2, { className: "h-6 w-6 text-success" }) }) : /* @__PURE__ */ jsx("div", { className: "h-12 w-12 rounded-full bg-destructive/10 flex items-center justify-center", children: /* @__PURE__ */ jsx(XCircle, { className: "h-6 w-6 text-destructive" }) }),
8356
+ /* @__PURE__ */ jsx(DialogTitle, { className: "text-xl", children: submissionStatus === "success" ? "Transaction Successful" : "Transaction Failed" })
8357
+ ] }),
8358
+ /* @__PURE__ */ jsx(DialogDescription, { className: "text-left", children: submissionStatus === "success" ? /* @__PURE__ */ jsxs("div", { className: "space-y-4 pt-2", children: [
8359
+ /* @__PURE__ */ jsx("p", { className: "text-foreground", children: "Your transaction has been successfully submitted and is being processed." }),
8360
+ /* @__PURE__ */ jsxs("div", { className: "bg-muted/50 rounded-lg p-4 space-y-2", children: [
8361
+ /* @__PURE__ */ jsxs("div", { className: "flex justify-between text-sm", children: [
8362
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "Transaction ID:" }),
8363
+ /* @__PURE__ */ jsx("span", { className: "font-mono font-medium", children: transactionId })
8364
+ ] }),
8365
+ /* @__PURE__ */ jsxs("div", { className: "flex justify-between text-sm", children: [
8366
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "Amount:" }),
8367
+ /* @__PURE__ */ jsxs("span", { className: "font-medium", children: [
8368
+ "$",
8369
+ amount
8370
+ ] })
8371
+ ] }),
8372
+ /* @__PURE__ */ jsxs("div", { className: "flex justify-between text-sm", children: [
8373
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "Type:" }),
8374
+ /* @__PURE__ */ jsx("span", { className: "font-medium", children: TRANSACTION_TYPES.find((t) => t.value === transactionType)?.label })
8375
+ ] }),
8376
+ /* @__PURE__ */ jsxs("div", { className: "flex justify-between text-sm", children: [
8377
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "Counterparty:" }),
8378
+ /* @__PURE__ */ jsx("span", { className: "font-medium", children: counterpartyName })
8379
+ ] })
8380
+ ] }),
8381
+ /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-2 p-3 bg-blue-500/10 border border-blue-500/20 rounded-lg", children: [
8382
+ /* @__PURE__ */ jsx(AlertCircle, { className: "h-5 w-5 text-blue-500 mt-0.5 flex-shrink-0" }),
8383
+ /* @__PURE__ */ jsx("p", { className: "text-sm text-blue-700 dark:text-blue-300", children: "You will receive a confirmation email once the transaction is completed." })
8384
+ ] })
8385
+ ] }) : /* @__PURE__ */ jsxs("div", { className: "space-y-4 pt-2", children: [
8386
+ /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-2 p-4 bg-destructive/10 border border-destructive/20 rounded-lg", children: [
8387
+ /* @__PURE__ */ jsx(XCircle, { className: "h-5 w-5 text-destructive mt-0.5 flex-shrink-0" }),
8388
+ /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
8389
+ /* @__PURE__ */ jsx("p", { className: "text-sm font-medium text-destructive", children: "Error Processing Transaction" }),
8390
+ /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: errorMessage })
8391
+ ] })
8392
+ ] }),
8393
+ /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: "Please review the error message above and try again. If the problem persists, contact support." })
8394
+ ] }) })
8395
+ ] }),
8396
+ /* @__PURE__ */ jsxs(DialogFooter, { className: "sm:justify-end gap-2", children: [
8397
+ submissionStatus === "error" && /* @__PURE__ */ jsx(
8398
+ Button,
8399
+ {
8400
+ type: "button",
8401
+ variant: "outline",
8402
+ onClick: () => setConfirmationOpen(false),
8403
+ children: "Try Again"
8404
+ }
8405
+ ),
8406
+ /* @__PURE__ */ jsx(
8407
+ Button,
8408
+ {
8409
+ type: "button",
8410
+ onClick: handleConfirmationClose,
8411
+ variant: submissionStatus === "success" ? "default" : "outline",
8412
+ children: submissionStatus === "success" ? "View Transactions" : "Close"
8413
+ }
8414
+ )
8415
+ ] })
8416
+ ] }) })
8417
+ ] })
8418
+ }
8419
+ );
8420
+ }
8421
+ var TransactionDetail = () => {
8422
+ const { id } = useParams();
8423
+ const navigate = useNavigate();
8424
+ const transaction = mockTransactions.find((t) => t.id === id);
8425
+ if (!transaction) {
8426
+ return /* @__PURE__ */ jsx("div", { className: "container mx-auto px-4 py-8", children: /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
8427
+ /* @__PURE__ */ jsx("h1", { className: "text-2xl font-bold mb-2", children: "Transaction Not Found" }),
8428
+ /* @__PURE__ */ jsxs("p", { className: "text-muted-foreground mb-4", children: [
8429
+ "The transaction #",
8430
+ id,
8431
+ " could not be found."
8432
+ ] }),
8433
+ /* @__PURE__ */ jsx(Button, { onClick: () => navigate("/transactions/history"), children: "Back to Transaction History" })
8434
+ ] }) });
8435
+ }
8436
+ const getStatusVariant = (status) => {
8437
+ switch (status) {
8438
+ case "POSTED":
8439
+ return "success";
8440
+ case "PENDING":
8441
+ return "warning";
8442
+ case "FAILED":
8443
+ return "destructive";
8444
+ case "CANCELLED":
8445
+ return "outline";
8446
+ default:
8447
+ return "outline";
8448
+ }
8449
+ };
8450
+ const formatCurrency = (value) => {
8451
+ return new Intl.NumberFormat("en-US", {
8452
+ style: "currency",
8453
+ currency: "USD",
8454
+ minimumFractionDigits: 2
8455
+ }).format(value);
8456
+ };
8457
+ const isWireTransfer = transaction.transactionType.toLowerCase().includes("wire");
8458
+ const isACHTransfer = transaction.transactionType.toLowerCase().includes("ach");
8459
+ return /* @__PURE__ */ jsx(
8460
+ PageLayout,
8461
+ {
8462
+ title: `Transaction #${transaction.id}`,
8463
+ maxWidth: "full",
8464
+ actions: [
8465
+ {
8466
+ label: "Return",
8467
+ variant: "outline",
8468
+ onClick: () => console.log("Return transaction")
8469
+ },
8470
+ {
8471
+ label: "Cancel",
8472
+ variant: "default",
8473
+ onClick: () => console.log("Cancel transaction")
8474
+ }
8475
+ ],
8476
+ children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col lg:flex-row items-start gap-6", children: [
8477
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 space-y-6", children: [
8478
+ /* @__PURE__ */ jsx(FormCard, { title: "Details", children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-x-8 gap-y-4", children: [
8479
+ /* @__PURE__ */ jsx(
8480
+ InfoField,
8481
+ {
8482
+ label: "Transaction Type",
8483
+ value: /* @__PURE__ */ jsx(Badge, { variant: "outline", children: transaction.transactionType }),
8484
+ layout: "horizontal"
8485
+ }
8486
+ ),
8487
+ /* @__PURE__ */ jsx(
8488
+ InfoField,
8489
+ {
8490
+ label: "Status",
8491
+ value: /* @__PURE__ */ jsx(Badge, { variant: getStatusVariant(transaction.status), children: transaction.status }),
8492
+ layout: "horizontal"
8493
+ }
8494
+ ),
8495
+ /* @__PURE__ */ jsx(
8496
+ InfoField,
8497
+ {
8498
+ label: "Amount",
8499
+ value: /* @__PURE__ */ jsx("span", { className: cn(
8500
+ "font-semibold",
8501
+ transaction.amount < 0 ? "text-destructive" : "text-success"
8502
+ ), children: formatCurrency(transaction.amount) }),
8503
+ layout: "horizontal"
8504
+ }
8505
+ ),
8506
+ /* @__PURE__ */ jsx(
8507
+ InfoField,
8508
+ {
8509
+ label: "Account Number",
8510
+ value: /* @__PURE__ */ jsx(Button, { variant: "link", className: "h-auto p-0 text-sm", children: transaction.accountNumber }),
8511
+ layout: "horizontal"
8512
+ }
8513
+ ),
8514
+ /* @__PURE__ */ jsx(
8515
+ InfoField,
8516
+ {
8517
+ label: "Customer Name",
8518
+ value: /* @__PURE__ */ jsx(Button, { variant: "link", className: "h-auto p-0 text-sm", children: transaction.customer }),
8519
+ layout: "horizontal"
8520
+ }
8521
+ ),
8522
+ /* @__PURE__ */ jsx(InfoField, { label: "Description", value: transaction.description, layout: "horizontal" }),
8523
+ /* @__PURE__ */ jsx(
8524
+ InfoField,
8525
+ {
8526
+ label: "Direction",
8527
+ value: transaction.amount < 0 ? "DEBIT" : "CREDIT",
8528
+ layout: "horizontal"
8529
+ }
8530
+ ),
8531
+ /* @__PURE__ */ jsx(InfoField, { label: "Counterparty Name", value: transaction.counterparty, layout: "horizontal" }),
8532
+ /* @__PURE__ */ jsx(InfoField, { label: "Post Date", value: transaction.created.split(" ")[0], layout: "horizontal" }),
8533
+ /* @__PURE__ */ jsx(InfoField, { label: "OFAC ID", value: /* @__PURE__ */ jsx(Button, { variant: "link", className: "h-auto p-0 text-sm", children: "18323208" }), layout: "horizontal" }),
8534
+ /* @__PURE__ */ jsx(InfoField, { label: "Original Filename", value: "-", layout: "horizontal" }),
8535
+ /* @__PURE__ */ jsx(InfoField, { label: "Loaded From File", value: "iso21130757012764355B7.xml.126534273Q299", layout: "horizontal" }),
8536
+ /* @__PURE__ */ jsx(InfoField, { label: "Payment ID", value: transaction.id, layout: "horizontal" }),
8537
+ /* @__PURE__ */ jsx(InfoField, { label: "Linked Payment ID", value: "-", layout: "horizontal" }),
8538
+ /* @__PURE__ */ jsx(InfoField, { label: "Is Inbound", value: "True", layout: "horizontal" }),
8539
+ /* @__PURE__ */ jsx(InfoField, { label: "Pending until Date", value: "-", layout: "horizontal" }),
8540
+ /* @__PURE__ */ jsx(InfoField, { label: "Processing Status", value: "Sent", layout: "horizontal" }),
8541
+ /* @__PURE__ */ jsx(InfoField, { label: "Further Credit To", value: "-", layout: "horizontal" }),
8542
+ /* @__PURE__ */ jsx(InfoField, { label: "Balance Available Date", value: "-", layout: "horizontal" }),
8543
+ /* @__PURE__ */ jsx(InfoField, { label: "Requester Username", value: "-", layout: "horizontal" }),
8544
+ /* @__PURE__ */ jsx(InfoField, { label: "Requester IP Address", value: "-", layout: "horizontal" }),
8545
+ /* @__PURE__ */ jsx(InfoField, { label: "Settlement Filename", value: "-", layout: "horizontal" }),
8546
+ /* @__PURE__ */ jsx(InfoField, { label: "Duplicate of Payment ID", value: "-", layout: "horizontal" }),
8547
+ /* @__PURE__ */ jsx(
8548
+ InfoField,
8549
+ {
8550
+ label: "Product ID",
8551
+ value: /* @__PURE__ */ jsx(Button, { variant: "link", className: "h-auto p-0 text-sm", children: "130" }),
8552
+ layout: "horizontal"
8553
+ }
8554
+ ),
8555
+ /* @__PURE__ */ jsx(InfoField, { label: "Returned In File", value: "-", layout: "horizontal" }),
8556
+ /* @__PURE__ */ jsx(InfoField, { label: "Alerts", value: "-", layout: "horizontal" })
8557
+ ] }) }),
8558
+ isACHTransfer && transaction.achDetails && /* @__PURE__ */ jsx(ACHDetailsSection, { data: transaction.achDetails }),
8559
+ isWireTransfer && transaction.wireDetails && /* @__PURE__ */ jsx(WireDetailsSection, { data: transaction.wireDetails })
8560
+ ] }),
8561
+ /* @__PURE__ */ jsx("div", { className: "lg:w-64", children: /* @__PURE__ */ jsx(FormCard, { title: "Transaction Timeline", children: /* @__PURE__ */ jsx(AlertTimeline, { events: mockTransactionTimeline }) }) })
8562
+ ] })
8563
+ }
8564
+ );
8565
+ };
8566
+ var TransactionDetail_default = TransactionDetail;
8567
+ function UIKit() {
8568
+ const breadcrumbs = [
8569
+ { label: "UI Kit" }
8570
+ ];
8571
+ return /* @__PURE__ */ jsx("div", { className: "min-h-screen bg-gradient-subtle", children: /* @__PURE__ */ jsx(Container, { size: "xl", children: /* @__PURE__ */ jsxs(Stack, { spacing: "lg", children: [
8572
+ /* @__PURE__ */ jsx(Breadcrumb, { items: breadcrumbs }),
8573
+ /* @__PURE__ */ jsxs("div", { children: [
8574
+ /* @__PURE__ */ jsx("h1", { className: "text-3xl font-bold text-foreground", children: "UI Kit" }),
8575
+ /* @__PURE__ */ jsx("p", { className: "text-muted-foreground mt-2", children: "Complete collection of reusable components, layouts, and patterns" })
8576
+ ] }),
8577
+ /* @__PURE__ */ jsxs(Tabs, { defaultValue: "showcase", className: "w-full", children: [
8578
+ /* @__PURE__ */ jsxs(TabsList, { className: "grid w-full grid-cols-3", children: [
8579
+ /* @__PURE__ */ jsx(TabsTrigger, { value: "showcase", children: "Component Showcase" }),
8580
+ /* @__PURE__ */ jsx(TabsTrigger, { value: "patterns", children: "Pattern Library" }),
8581
+ /* @__PURE__ */ jsx(TabsTrigger, { value: "demo", children: "Dashboard Demo" })
8582
+ ] }),
8583
+ /* @__PURE__ */ jsx(TabsContent, { value: "showcase", className: "mt-6", children: /* @__PURE__ */ jsx(UIKitShowcase, {}) }),
8584
+ /* @__PURE__ */ jsx(TabsContent, { value: "patterns", className: "mt-6", children: /* @__PURE__ */ jsx(PatternLibrary, {}) }),
8585
+ /* @__PURE__ */ jsx(TabsContent, { value: "demo", className: "mt-6", children: /* @__PURE__ */ jsx(DashboardDemo, {}) })
8586
+ ] })
8587
+ ] }) }) });
8588
+ }
6083
8589
 
6084
- export { ACHBankCard, ACHBasicInfoCard, ACHDetailsSection, ACHTransferSection, AccountCard, AddressForm, AlertDocuments, AlertNotes, AlertTimeline, AppSidebar, Badge, BankAddressCard, BankingDetailsCard, BasicInfoCard, BasicInfoSection, BeneficiaryAddress, BeneficiaryCard, BeneficiaryDomesticWire, Breadcrumb, BusinessProfileCard, BusinessStatusCard, BusinessTypeBadge, Button, Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ContactInfoCard, Container, ContextSection, CounterpartyBasicInfo, CounterpartyProfileCard, CounterpartyRecordsCard, CounterpartyTypeBadge, DashboardDemo, DataGrid, DataTable, DetailPageLayout, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, EditableFormCard, EditableInfoField, EnhancedInput, EnhancedSelect, EnhancedTextarea, EntityCard, FormCard, FormField, FormInput, FormProvider, FormSection, FormSelect, InfoField, IntermediaryCard, IntermediaryFI, IntermediaryFIAddress, JsonViewer, Label, ListPage, MainLayout, MetricCard, OriginatorCard, OriginatorFI, OriginatorFIAddress, PageLayout, PatternLibrary, PaymentInformationSection, Popover, PopoverContent, PopoverTrigger, ReceiverCard, ResponsiveGrid, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Stack, StatusBadge, Tabs, TabsContent, TabsList, TabsTrigger, Toast, ToastAction, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UIKitShowcase, WireDetailsSection, WireTransferSection, badgeVariants, buttonVariants, cardVariants, inputVariants, reducer, textareaVariants, toast, useEditState, useFormWithEditState, useIsMobile, useSidebar, useToast };
8590
+ export { ACHBankCard, ACHBasicInfoCard, ACHDetailsSection, ACHTransferSection, AccountCard, AddressForm, AlertDetail_default as AlertDetail, AlertDocuments, AlertNotes, AlertTimeline, Alerts_default as Alerts, AppSidebar, Badge, BankAddressCard, BankingDetailsCard, BasicInfoCard, BasicInfoSection, BeneficiaryAddress, BeneficiaryCard, BeneficiaryDomesticWire, Breadcrumb, Business_default as Business, BusinessProfileCard, BusinessStatusCard, BusinessTypeBadge, Button, Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Cases_default as Cases, ContactInfoCard, Container, ContextSection, CounterpartyBasicInfo, DomesticWire_default as CounterpartyDomesticWire, Manage_default as CounterpartyManage, CounterpartyProfileCard, CounterpartyRecordsCard, CounterpartyTypeBadge, Create_default as CreateBusiness, Create_default2 as CreateCounterparty, Dashboard_default as Dashboard, DashboardDemo, DataGrid, DataTable, DetailPageLayout, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, EditableFormCard, EditableInfoField, EnhancedInput, EnhancedSelect, EnhancedTextarea, EntityCard, FormCard, FormField, FormInput, FormProvider, FormSection, FormSelect, InfoField, IntermediaryCard, IntermediaryFI, IntermediaryFIAddress, JsonViewer, Label, ListPage, MainLayout, MetricCard, NewTransaction, NotFound_default as NotFound, OriginatorCard, OriginatorFI, OriginatorFIAddress, PageLayout, PatternLibrary, PaymentInformationSection, Popover, PopoverContent, PopoverTrigger, ReceiverCard, ResponsiveGrid, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Stack, StatusBadge, Tabs, TabsContent, TabsList, TabsTrigger, Toast, ToastAction, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TransactionDetail_default as TransactionDetail, TransactionHistory_default as TransactionHistory, UIKit, UIKitShowcase, WireDetailsSection, WireTransferSection, badgeVariants, buttonVariants, cardVariants, inputVariants, reducer, textareaVariants, toast, useEditState, useFormWithEditState, useIsMobile, useSidebar, useToast };
6085
8591
  //# sourceMappingURL=index.js.map
6086
8592
  //# sourceMappingURL=index.js.map