braid-ui 1.0.27 → 1.0.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -13,6 +13,7 @@ var reactRouterDom = require('react-router-dom');
13
13
  var ScrollAreaPrimitive = require('@radix-ui/react-scroll-area');
14
14
  var DialogPrimitive = require('@radix-ui/react-dialog');
15
15
  var reactHookForm = require('react-hook-form');
16
+ var lodash = require('lodash');
16
17
  var zod$1 = require('@hookform/resolvers/zod');
17
18
  var zod = require('zod');
18
19
  var reactCollapsible = require('@radix-ui/react-collapsible');
@@ -1858,7 +1859,7 @@ var FormInput = ({
1858
1859
  ...props
1859
1860
  }) => {
1860
1861
  const { control, formState } = reactHookForm.useFormContext();
1861
- const error = formState.errors[name]?.message;
1862
+ const error = lodash.get(formState.errors, name)?.message;
1862
1863
  return /* @__PURE__ */ jsxRuntime.jsx(
1863
1864
  reactHookForm.Controller,
1864
1865
  {
@@ -1880,7 +1881,7 @@ var FormSelect = ({
1880
1881
  ...props
1881
1882
  }) => {
1882
1883
  const { control, formState } = reactHookForm.useFormContext();
1883
- const error = formState.errors[name]?.message;
1884
+ const error = lodash.get(formState.errors, name)?.message;
1884
1885
  return /* @__PURE__ */ jsxRuntime.jsx(
1885
1886
  reactHookForm.Controller,
1886
1887
  {
@@ -3377,12 +3378,9 @@ var PageLayout = React15__namespace.forwardRef(
3377
3378
  });
3378
3379
  };
3379
3380
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: "flex flex-col h-screen bg-gradient-subtle", children: [
3380
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-none border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(
3381
- "container mx-auto px-4 py-6",
3382
- maxWidthClasses[maxWidth]
3383
- ), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-4", children: [
3381
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-none border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("container mx-auto px-4 py-6", maxWidthClasses[maxWidth]), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-4", children: [
3384
3382
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 min-h-[2.5rem]", children: [
3385
- /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-3xl font-bold text-foreground mb-2", children: title }),
3383
+ /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-3xl font-bold text-foreground", children: title }),
3386
3384
  description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground", children: description })
3387
3385
  ] }),
3388
3386
  headerContent && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center", children: headerContent }),
@@ -3411,11 +3409,7 @@ var PageLayout = React15__namespace.forwardRef(
3411
3409
  );
3412
3410
  }) })
3413
3411
  ] }) }) }),
3414
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 overflow-y-auto", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(
3415
- "container mx-auto px-4 py-6",
3416
- maxWidthClasses[maxWidth],
3417
- className
3418
- ), children: mode === "cards" && cards.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("grid gap-6", getGridClasses(gridCols, responsive)), children: cards.map((card) => {
3412
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 overflow-y-auto", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("container mx-auto px-4 py-6", maxWidthClasses[maxWidth], className), children: mode === "cards" && cards.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("grid gap-6", getGridClasses(gridCols, responsive)), children: cards.map((card) => {
3419
3413
  const isEditing = editingCards.has(card.key);
3420
3414
  const shouldExpand = card.expandOnEdit && isEditing;
3421
3415
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -3425,14 +3419,7 @@ var PageLayout = React15__namespace.forwardRef(
3425
3419
  "transition-all duration-300",
3426
3420
  shouldExpand && (gridCols > 1 ? "col-span-full" : "")
3427
3421
  ),
3428
- children: /* @__PURE__ */ jsxRuntime.jsx(
3429
- card.component,
3430
- {
3431
- ...card.props,
3432
- isEditing,
3433
- onToggleEdit: () => toggleEdit(card.key)
3434
- }
3435
- )
3422
+ children: /* @__PURE__ */ jsxRuntime.jsx(card.component, { ...card.props, isEditing, onToggleEdit: () => toggleEdit(card.key) })
3436
3423
  },
3437
3424
  card.key
3438
3425
  );
@@ -3441,180 +3428,144 @@ var PageLayout = React15__namespace.forwardRef(
3441
3428
  }
3442
3429
  );
3443
3430
  PageLayout.displayName = "PageLayout";
3444
- var typeConfig = {
3445
- corporation: {
3446
- variant: "corporation",
3447
- label: "Corporation",
3448
- icon: lucideReact.Building
3449
- },
3450
- llc: {
3451
- variant: "llc",
3452
- label: "LLC",
3453
- icon: lucideReact.Briefcase
3454
- },
3455
- partnership: {
3456
- variant: "partnership",
3457
- label: "Partnership",
3458
- icon: lucideReact.Users
3459
- },
3460
- sole_proprietorship: {
3461
- variant: "sole_proprietorship",
3462
- label: "Sole Proprietorship",
3463
- icon: lucideReact.User
3464
- }
3465
- };
3466
- var BusinessTypeBadge = ({ type, className }) => {
3467
- const config = typeConfig[type];
3468
- const Icon2 = config.icon;
3469
- return /* @__PURE__ */ jsxRuntime.jsxs(Badge, { variant: config.variant, className, children: [
3470
- /* @__PURE__ */ jsxRuntime.jsx(Icon2, { className: "w-3 h-3 mr-1" }),
3471
- config.label
3472
- ] });
3473
- };
3474
3431
  var BusinessForm = ({
3475
3432
  form,
3476
3433
  businessType,
3477
3434
  onBusinessTypeChange,
3478
3435
  onSubmit
3479
3436
  }) => {
3480
- return /* @__PURE__ */ jsxRuntime.jsxs("form", { onSubmit: form.handleSubmit(onSubmit), className: "space-y-6", children: [
3437
+ return /* @__PURE__ */ jsxRuntime.jsx(FormProvider, { form, children: /* @__PURE__ */ jsxRuntime.jsxs("form", { onSubmit: form.handleSubmit(onSubmit), className: "space-y-6", children: [
3481
3438
  /* @__PURE__ */ jsxRuntime.jsxs(Card, { className: "p-6", children: [
3482
3439
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-b border-border pb-4 mb-6", children: /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-lg font-semibold text-foreground", children: "Business Information" }) }),
3483
3440
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6", children: [
3484
3441
  /* @__PURE__ */ jsxRuntime.jsx(
3485
- EnhancedInput,
3442
+ FormInput,
3486
3443
  {
3487
- label: "Legal Name",
3488
- placeholder: "Enter legal business name",
3489
- required: true,
3490
- ...form.register("legalName")
3444
+ name: "name",
3445
+ label: "Business Name",
3446
+ placeholder: "Enter business name",
3447
+ required: true
3491
3448
  }
3492
3449
  ),
3493
3450
  /* @__PURE__ */ jsxRuntime.jsx(
3494
- EnhancedInput,
3451
+ FormInput,
3495
3452
  {
3496
- label: "DBA Name",
3497
- placeholder: "Enter DBA name",
3498
- hint: "Doing Business As name",
3499
- ...form.register("dbaName")
3453
+ name: "productId",
3454
+ label: "Product ID",
3455
+ placeholder: "Enter product ID",
3456
+ type: "number",
3457
+ required: true
3500
3458
  }
3501
3459
  ),
3502
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
3503
- /* @__PURE__ */ jsxRuntime.jsx(
3504
- EnhancedSelect,
3505
- {
3506
- label: "Business Type",
3507
- placeholder: "Select business type",
3508
- value: businessType,
3509
- onValueChange: onBusinessTypeChange,
3510
- options: [
3511
- { value: "corporation", label: "Corporation" },
3512
- { value: "llc", label: "LLC" },
3513
- { value: "partnership", label: "Partnership" },
3514
- { value: "sole_proprietorship", label: "Sole Proprietorship" }
3515
- ]
3516
- }
3517
- ),
3518
- businessType && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
3519
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-muted-foreground", children: "Preview:" }),
3520
- /* @__PURE__ */ jsxRuntime.jsx(BusinessTypeBadge, { type: businessType })
3521
- ] })
3522
- ] }),
3523
3460
  /* @__PURE__ */ jsxRuntime.jsx(
3524
- EnhancedInput,
3461
+ FormSelect,
3525
3462
  {
3526
- label: "Tax ID (EIN)",
3527
- placeholder: "12-3456789",
3528
- hint: "Employer Identification Number",
3529
- required: true,
3530
- ...form.register("taxId")
3463
+ name: "businessIdType",
3464
+ label: "ID Number Type",
3465
+ placeholder: "Select ID type",
3466
+ options: [
3467
+ { value: "EIN", label: "EIN" },
3468
+ { value: "SSN", label: "SSN" },
3469
+ { value: "TIN", label: "TIN" },
3470
+ { value: "OTHER_ID", label: "Other ID" }
3471
+ ]
3531
3472
  }
3532
3473
  ),
3533
3474
  /* @__PURE__ */ jsxRuntime.jsx(
3534
- EnhancedInput,
3475
+ FormInput,
3535
3476
  {
3536
- label: "Formation Date",
3537
- placeholder: "YYYY-MM-DD",
3538
- type: "date",
3539
- ...form.register("formationDate")
3477
+ name: "idNumber",
3478
+ label: "ID Number",
3479
+ placeholder: "Enter ID number",
3480
+ required: true
3540
3481
  }
3541
3482
  ),
3542
3483
  /* @__PURE__ */ jsxRuntime.jsx(
3543
- EnhancedInput,
3484
+ FormInput,
3544
3485
  {
3545
- label: "Incorporation State",
3546
- placeholder: "Enter state",
3547
- ...form.register("incorporationState")
3486
+ name: "dba",
3487
+ label: "DBA Name",
3488
+ placeholder: "Enter DBA name",
3489
+ hint: "Doing Business As name"
3548
3490
  }
3549
3491
  ),
3550
3492
  /* @__PURE__ */ jsxRuntime.jsx(
3551
- EnhancedInput,
3493
+ FormSelect,
3552
3494
  {
3553
- label: "Website",
3554
- placeholder: "https://www.business.com",
3555
- type: "url",
3556
- ...form.register("website")
3495
+ name: "businessEntityType",
3496
+ label: "Business Entity Type",
3497
+ placeholder: "Select business type",
3498
+ options: [
3499
+ { value: "SOLE_PROPRIETOR", label: "Sole Proprietor" },
3500
+ { value: "LIMITED_LIABILITY_COMPANY", label: "Limited Liability Company (LLC)" },
3501
+ { value: "CORPORATION", label: "S or C Corporation" },
3502
+ { value: "GENERAL_PARTNERSHIP", label: "General Partnership" },
3503
+ { value: "LIMITED_LIABILITY_PARTNERSHIP", label: "Limited Liability Partnership" },
3504
+ { value: "NON_PROFIT", label: "Non-Profit Corporation" },
3505
+ { value: "GOVERNMENT_ORGANIZATION", label: "Government Organization" },
3506
+ { value: "PUBLICLY_TRADED_COMPANY", label: "Publicly Traded Company" },
3507
+ { value: "TRUSTS", label: "Trusts" }
3508
+ ]
3557
3509
  }
3558
3510
  ),
3559
3511
  /* @__PURE__ */ jsxRuntime.jsx(
3560
- EnhancedInput,
3512
+ FormInput,
3561
3513
  {
3562
- label: "Email Address",
3563
- placeholder: "contact@business.com",
3564
- type: "email",
3565
- ...form.register("email")
3514
+ name: "incorporationState",
3515
+ label: "Incorporation State",
3516
+ placeholder: "Enter state"
3566
3517
  }
3567
3518
  ),
3568
3519
  /* @__PURE__ */ jsxRuntime.jsx(
3569
- EnhancedInput,
3520
+ FormInput,
3570
3521
  {
3571
- label: "Mobile Phone",
3572
- placeholder: "+1 (555) 123-4567",
3573
- ...form.register("mobilePhone")
3522
+ name: "formationDate",
3523
+ label: "Formation Date",
3524
+ placeholder: "YYYY-MM-DD",
3525
+ type: "date"
3574
3526
  }
3575
3527
  ),
3576
3528
  /* @__PURE__ */ jsxRuntime.jsx(
3577
- EnhancedInput,
3529
+ FormInput,
3578
3530
  {
3579
- label: "MCC",
3580
- placeholder: "1234",
3581
- hint: "4-digit Merchant Category Code",
3582
- ...form.register("mcc")
3531
+ name: "website",
3532
+ label: "Website",
3533
+ placeholder: "https://www.business.com"
3583
3534
  }
3584
3535
  ),
3585
3536
  /* @__PURE__ */ jsxRuntime.jsx(
3586
- EnhancedInput,
3537
+ FormInput,
3587
3538
  {
3588
- label: "NAICS",
3589
- placeholder: "123456",
3590
- hint: "6-digit industry classification",
3591
- ...form.register("naics")
3539
+ name: "mobilePhone",
3540
+ label: "Mobile Phone",
3541
+ placeholder: "+1 (555) 123-4567",
3542
+ hint: "Format: +1 (555) 123-4567"
3592
3543
  }
3593
3544
  ),
3594
3545
  /* @__PURE__ */ jsxRuntime.jsx(
3595
- EnhancedInput,
3546
+ FormInput,
3596
3547
  {
3597
- label: "ACH Company ID",
3598
- placeholder: "1234567890",
3599
- hint: "10-digit ACH identifier",
3600
- ...form.register("achCompanyId")
3548
+ name: "mcc",
3549
+ label: "MCC",
3550
+ placeholder: "1234",
3551
+ hint: "4-digit Merchant Category Code"
3601
3552
  }
3602
3553
  ),
3603
3554
  /* @__PURE__ */ jsxRuntime.jsx(
3604
- EnhancedInput,
3555
+ FormInput,
3605
3556
  {
3606
- label: "ACH Company Name",
3607
- placeholder: "Enter ACH company name",
3608
- ...form.register("achCompanyName")
3557
+ name: "naics",
3558
+ label: "NAICS",
3559
+ placeholder: "123456",
3560
+ hint: "6-digit industry classification"
3609
3561
  }
3610
3562
  ),
3611
3563
  /* @__PURE__ */ jsxRuntime.jsx(
3612
- EnhancedInput,
3564
+ FormInput,
3613
3565
  {
3614
- label: "External ID",
3615
- placeholder: "UUID format",
3616
- hint: "External system identifier",
3617
- ...form.register("externalId")
3566
+ name: "achCompanyId",
3567
+ label: "ACH Company ID",
3568
+ placeholder: "Enter ACH company ID"
3618
3569
  }
3619
3570
  )
3620
3571
  ] })
@@ -3623,62 +3574,60 @@ var BusinessForm = ({
3623
3574
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-b border-border pb-4 mb-6", children: /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-lg font-semibold text-foreground", children: "Business Address" }) }),
3624
3575
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6", children: [
3625
3576
  /* @__PURE__ */ jsxRuntime.jsx(
3626
- EnhancedInput,
3577
+ FormInput,
3627
3578
  {
3579
+ name: "address.line1",
3628
3580
  label: "Street Address",
3629
- placeholder: "Enter street address",
3630
- required: true,
3631
- ...form.register("address.streetAddress")
3581
+ placeholder: "Enter street address"
3632
3582
  }
3633
3583
  ),
3634
3584
  /* @__PURE__ */ jsxRuntime.jsx(
3635
- EnhancedInput,
3585
+ FormInput,
3636
3586
  {
3587
+ name: "address.line2",
3637
3588
  label: "Apartment/Suite",
3638
- placeholder: "Enter apartment or suite number",
3639
- ...form.register("address.apartment")
3589
+ placeholder: "Enter apartment or suite number"
3640
3590
  }
3641
3591
  ),
3642
3592
  /* @__PURE__ */ jsxRuntime.jsx(
3643
- EnhancedInput,
3593
+ FormInput,
3644
3594
  {
3595
+ name: "address.city",
3645
3596
  label: "City",
3646
- placeholder: "Enter city",
3647
- required: true,
3648
- ...form.register("address.city")
3597
+ placeholder: "Enter city"
3649
3598
  }
3650
3599
  ),
3651
3600
  /* @__PURE__ */ jsxRuntime.jsx(
3652
- EnhancedInput,
3601
+ FormInput,
3653
3602
  {
3603
+ name: "address.state",
3654
3604
  label: "State",
3655
- placeholder: "Enter state",
3656
- required: true,
3657
- ...form.register("address.state")
3605
+ placeholder: "Enter state"
3658
3606
  }
3659
3607
  ),
3660
3608
  /* @__PURE__ */ jsxRuntime.jsx(
3661
- EnhancedInput,
3609
+ FormInput,
3662
3610
  {
3611
+ name: "address.postalCode",
3663
3612
  label: "Postal Code",
3664
- placeholder: "12345",
3665
- required: true,
3666
- ...form.register("address.postalCode")
3613
+ placeholder: "12345"
3667
3614
  }
3668
3615
  ),
3669
3616
  /* @__PURE__ */ jsxRuntime.jsx(
3670
- EnhancedSelect,
3617
+ FormInput,
3671
3618
  {
3672
- label: "Country",
3673
- placeholder: "Select country",
3674
- value: form.watch("address.country"),
3675
- onValueChange: (value) => form.setValue("address.country", value),
3676
- options: [
3677
- { value: "US", label: "United States" },
3678
- { value: "CA", label: "Canada" },
3679
- { value: "GB", label: "United Kingdom" },
3680
- { value: "DE", label: "Germany" }
3681
- ]
3619
+ name: "address.countryCode",
3620
+ label: "Country Code",
3621
+ placeholder: "e.g., US",
3622
+ required: true
3623
+ }
3624
+ ),
3625
+ /* @__PURE__ */ jsxRuntime.jsx(
3626
+ FormInput,
3627
+ {
3628
+ name: "address.type",
3629
+ label: "Address Type",
3630
+ placeholder: "e.g., MAILING"
3682
3631
  }
3683
3632
  )
3684
3633
  ] })
@@ -3687,41 +3636,41 @@ var BusinessForm = ({
3687
3636
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-b border-border pb-4 mb-6", children: /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-lg font-semibold text-foreground", children: "Contact Information" }) }),
3688
3637
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6", children: [
3689
3638
  /* @__PURE__ */ jsxRuntime.jsx(
3690
- EnhancedInput,
3639
+ FormInput,
3691
3640
  {
3641
+ name: "contactPersonFirstName",
3692
3642
  label: "Contact First Name",
3693
- placeholder: "Enter first name",
3694
- ...form.register("contactFirstName")
3643
+ placeholder: "Enter first name"
3695
3644
  }
3696
3645
  ),
3697
3646
  /* @__PURE__ */ jsxRuntime.jsx(
3698
- EnhancedInput,
3647
+ FormInput,
3699
3648
  {
3649
+ name: "contactPersonLastName",
3700
3650
  label: "Contact Last Name",
3701
- placeholder: "Enter last name",
3702
- ...form.register("contactLastName")
3651
+ placeholder: "Enter last name"
3703
3652
  }
3704
3653
  ),
3705
3654
  /* @__PURE__ */ jsxRuntime.jsx(
3706
- EnhancedInput,
3655
+ FormInput,
3707
3656
  {
3657
+ name: "contactPersonEmail",
3708
3658
  label: "Contact Email",
3709
3659
  placeholder: "contact@business.com",
3710
- type: "email",
3711
- ...form.register("contactEmail")
3660
+ type: "email"
3712
3661
  }
3713
3662
  ),
3714
3663
  /* @__PURE__ */ jsxRuntime.jsx(
3715
- EnhancedInput,
3664
+ FormInput,
3716
3665
  {
3666
+ name: "contactPersonPhone",
3717
3667
  label: "Contact Phone",
3718
- placeholder: "+1 (555) 123-4567",
3719
- ...form.register("contactPhone")
3668
+ placeholder: "+1 (555) 123-4567"
3720
3669
  }
3721
3670
  )
3722
3671
  ] })
3723
3672
  ] })
3724
- ] });
3673
+ ] }) });
3725
3674
  };
3726
3675
  var CreateBusinessView = ({
3727
3676
  form,
@@ -4097,13 +4046,17 @@ zod.z.object({
4097
4046
  website: zod.z.string().url("Invalid URL format").optional().or(zod.z.literal(""))
4098
4047
  });
4099
4048
  var addressSchema = zod.z.object({
4100
- streetAddress: zod.z.string().min(1, "Street address is required"),
4101
- apartment: zod.z.string().optional(),
4102
- city: zod.z.string().min(1, "City is required"),
4103
- state: zod.z.string().min(1, "State is required"),
4104
- postalCode: zod.z.string().min(1, "Postal code is required"),
4105
- country: zod.z.string().min(1, "Country is required"),
4106
- addressType: zod.z.string().optional()
4049
+ line1: zod.z.string().optional(),
4050
+ // Street address
4051
+ line2: zod.z.string().optional(),
4052
+ // Apartment, suite, or floor
4053
+ city: zod.z.string().optional(),
4054
+ state: zod.z.string().optional(),
4055
+ postalCode: zod.z.string().optional(),
4056
+ countryCode: zod.z.string().min(1, "Country code is required"),
4057
+ // Required field
4058
+ type: zod.z.string().optional()
4059
+ // Address type (e.g., "MAILING")
4107
4060
  });
4108
4061
  zod.z.object({
4109
4062
  id: zod.z.string(),
@@ -4153,27 +4106,41 @@ zod.z.object({
4153
4106
  intermediaryFI: intermediaryFISchema.optional()
4154
4107
  });
4155
4108
  var businessProfileSchema = zod.z.object({
4156
- legalName: zod.z.string().min(1, "Legal name is required"),
4157
- dbaName: zod.z.string().optional(),
4158
- businessType: zod.z.string().min(1, "Business type is required"),
4159
- taxId: zod.z.string().min(1, "Tax ID is required"),
4160
- formationDate: zod.z.string().optional(),
4161
- idType: zod.z.string().optional(),
4109
+ // Required fields
4110
+ name: zod.z.string().min(1, "Business name is required"),
4111
+ productId: zod.z.number().min(1, "Product ID is required"),
4112
+ businessIdType: zod.z.string().min(1, "ID Number type is required"),
4113
+ // EIN, SSN, TIN, OTHER_ID
4114
+ idNumber: zod.z.string().min(1, "ID Number is required"),
4115
+ // Optional fields
4116
+ dba: zod.z.string().optional(),
4117
+ businessEntityType: zod.z.string().optional(),
4118
+ // Company type
4162
4119
  incorporationState: zod.z.string().optional(),
4163
- website: zod.z.string().url("Invalid URL format").optional().or(zod.z.literal("")),
4164
- email: zod.z.string().email("Invalid email format").optional().or(zod.z.literal("")),
4165
- mobilePhone: zod.z.string().optional(),
4120
+ formationDate: zod.z.string().optional(),
4121
+ website: zod.z.string().optional(),
4122
+ achCompanyId: zod.z.string().optional(),
4123
+ // Optional fields with pattern validation
4166
4124
  mcc: zod.z.string().regex(/^\d{4}$/, "MCC must be 4 digits").optional().or(zod.z.literal("")),
4167
4125
  naics: zod.z.string().regex(/^\d{6}$/, "NAICS must be 6 digits").optional().or(zod.z.literal("")),
4168
- achCompanyId: zod.z.string().regex(/^\d{10}$/, "ACH Company ID must be 10 digits").optional().or(zod.z.literal("")),
4169
- achCompanyName: zod.z.string().optional(),
4170
- externalId: zod.z.string().uuid("Invalid UUID format").optional().or(zod.z.literal("")),
4171
- productId: zod.z.coerce.number().optional(),
4172
- contactFirstName: zod.z.string().optional(),
4173
- contactLastName: zod.z.string().optional(),
4174
- contactEmail: zod.z.string().optional(),
4175
- contactPhone: zod.z.string().optional(),
4176
- address: addressSchema
4126
+ mobilePhone: zod.z.string().regex(
4127
+ /^[\+]?[(]?[0-9]{3}[)]?[-\s\.]?[0-9]{3}[-\s\.]?[0-9]{4,6}$/im,
4128
+ "Invalid phone number format"
4129
+ ).optional().or(zod.z.literal("")),
4130
+ // Contact person information (optional)
4131
+ contactPersonFirstName: zod.z.string().optional(),
4132
+ contactPersonLastName: zod.z.string().optional(),
4133
+ contactPersonEmail: zod.z.string().optional(),
4134
+ contactPersonPhone: zod.z.string().optional(),
4135
+ // Address (optional)
4136
+ address: addressSchema.optional(),
4137
+ // Submitted by object (optional)
4138
+ submittedBy: zod.z.object({
4139
+ contactPersonEmail: zod.z.string().optional(),
4140
+ contactPersonFirstName: zod.z.string().optional(),
4141
+ contactPersonLastName: zod.z.string().optional(),
4142
+ contactPersonPhone: zod.z.string().optional()
4143
+ }).optional()
4177
4144
  });
4178
4145
  zod.z.object({
4179
4146
  status: zod.z.string().min(1, "Status is required"),
@@ -4211,7 +4178,7 @@ var BankAddressCard = ({
4211
4178
  /* @__PURE__ */ jsxRuntime.jsx(
4212
4179
  FormInput,
4213
4180
  {
4214
- name: "streetAddress",
4181
+ name: "line1",
4215
4182
  label: "Street Address",
4216
4183
  placeholder: "Enter street address",
4217
4184
  required: true
@@ -4247,7 +4214,7 @@ var BankAddressCard = ({
4247
4214
  ] }) }) });
4248
4215
  const formValues = form.watch();
4249
4216
  const viewContent = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
4250
- /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Street Address", value: formValues?.streetAddress, layout: "horizontal" }),
4217
+ /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Street Address", value: formValues?.line1, layout: "horizontal" }),
4251
4218
  /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "City", value: formValues?.city, layout: "horizontal" }),
4252
4219
  /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "State", value: formValues?.state, layout: "horizontal" }),
4253
4220
  /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Postal Code", value: formValues?.postalCode, layout: "horizontal" })
@@ -4408,7 +4375,7 @@ var BankingDetailsCard = ({ isEditing, onToggleEdit, className }) => {
4408
4375
  }
4409
4376
  );
4410
4377
  };
4411
- var typeConfig2 = {
4378
+ var typeConfig = {
4412
4379
  BUSINESS: {
4413
4380
  variant: "business",
4414
4381
  label: "Business",
@@ -4431,7 +4398,7 @@ var typeConfig2 = {
4431
4398
  }
4432
4399
  };
4433
4400
  var CounterpartyTypeBadge = ({ type, className }) => {
4434
- const config = typeConfig2[type];
4401
+ const config = typeConfig[type];
4435
4402
  if (!config) {
4436
4403
  return /* @__PURE__ */ jsxRuntime.jsxs(Badge, { variant: "secondary", className, children: [
4437
4404
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Building2, { className: "w-3 h-3 mr-1" }),
@@ -4908,16 +4875,16 @@ var BusinessProfileCard = ({
4908
4875
  /* @__PURE__ */ jsxRuntime.jsx(
4909
4876
  FormInput,
4910
4877
  {
4911
- name: "legalName",
4912
- label: "Legal Name",
4913
- placeholder: "Enter legal business name",
4878
+ name: "name",
4879
+ label: "Business Name",
4880
+ placeholder: "Enter business name",
4914
4881
  required: true
4915
4882
  }
4916
4883
  ),
4917
4884
  /* @__PURE__ */ jsxRuntime.jsx(
4918
4885
  FormInput,
4919
4886
  {
4920
- name: "dbaName",
4887
+ name: "dba",
4921
4888
  label: "DBA Name",
4922
4889
  placeholder: "Enter doing business as name"
4923
4890
  }
@@ -4925,23 +4892,28 @@ var BusinessProfileCard = ({
4925
4892
  /* @__PURE__ */ jsxRuntime.jsx(
4926
4893
  FormSelect,
4927
4894
  {
4928
- name: "businessType",
4929
- label: "Business Type",
4895
+ name: "businessEntityType",
4896
+ label: "Business Entity Type",
4930
4897
  placeholder: "Select business type",
4931
4898
  options: [
4932
- { value: "corporation", label: "Corporation" },
4933
- { value: "llc", label: "LLC" },
4934
- { value: "partnership", label: "Partnership" },
4935
- { value: "sole_proprietorship", label: "Sole Proprietorship" }
4899
+ { value: "SOLE_PROPRIETOR", label: "Sole Proprietor" },
4900
+ { value: "LIMITED_LIABILITY_COMPANY", label: "Limited Liability Company (LLC)" },
4901
+ { value: "CORPORATION", label: "S or C Corporation" },
4902
+ { value: "GENERAL_PARTNERSHIP", label: "General Partnership" },
4903
+ { value: "LIMITED_LIABILITY_PARTNERSHIP", label: "Limited Liability Partnership" },
4904
+ { value: "NON_PROFIT", label: "Non-Profit Corporation" },
4905
+ { value: "GOVERNMENT_ORGANIZATION", label: "Government Organization" },
4906
+ { value: "PUBLICLY_TRADED_COMPANY", label: "Publicly Traded Company" },
4907
+ { value: "TRUSTS", label: "Trusts" }
4936
4908
  ]
4937
4909
  }
4938
4910
  ),
4939
4911
  /* @__PURE__ */ jsxRuntime.jsx(
4940
4912
  FormInput,
4941
4913
  {
4942
- name: "taxId",
4943
- label: "Tax ID",
4944
- placeholder: "Enter tax identification number",
4914
+ name: "idNumber",
4915
+ label: "ID Number",
4916
+ placeholder: "Enter ID number",
4945
4917
  required: true
4946
4918
  }
4947
4919
  ),
@@ -4957,13 +4929,14 @@ var BusinessProfileCard = ({
4957
4929
  /* @__PURE__ */ jsxRuntime.jsx(
4958
4930
  FormSelect,
4959
4931
  {
4960
- name: "idType",
4932
+ name: "businessIdType",
4961
4933
  label: "ID Type",
4962
4934
  placeholder: "Select ID type",
4963
4935
  options: [
4964
- { value: "ein", label: "EIN" },
4965
- { value: "ssn", label: "SSN" },
4966
- { value: "itin", label: "ITIN" }
4936
+ { value: "EIN", label: "EIN" },
4937
+ { value: "SSN", label: "SSN" },
4938
+ { value: "TIN", label: "TIN" },
4939
+ { value: "OTHER_ID", label: "Other ID" }
4967
4940
  ]
4968
4941
  }
4969
4942
  ),
@@ -4984,30 +4957,19 @@ var BusinessProfileCard = ({
4984
4957
  }
4985
4958
  )
4986
4959
  ] }),
4987
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
4988
- /* @__PURE__ */ jsxRuntime.jsx(
4989
- FormInput,
4990
- {
4991
- name: "email",
4992
- label: "Business Email",
4993
- type: "email",
4994
- placeholder: "Enter business email"
4995
- }
4996
- ),
4997
- /* @__PURE__ */ jsxRuntime.jsx(
4998
- FormInput,
4999
- {
5000
- name: "mobilePhone",
5001
- label: "Business Phone",
5002
- placeholder: "Enter business phone"
5003
- }
5004
- )
5005
- ] }),
4960
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: /* @__PURE__ */ jsxRuntime.jsx(
4961
+ FormInput,
4962
+ {
4963
+ name: "mobilePhone",
4964
+ label: "Business Phone",
4965
+ placeholder: "Enter business phone"
4966
+ }
4967
+ ) }),
5006
4968
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-4", children: [
5007
4969
  /* @__PURE__ */ jsxRuntime.jsx(
5008
4970
  FormInput,
5009
4971
  {
5010
- name: "address.streetAddress",
4972
+ name: "address.line1",
5011
4973
  label: "Street Address",
5012
4974
  placeholder: "Enter street address"
5013
4975
  }
@@ -5015,7 +4977,7 @@ var BusinessProfileCard = ({
5015
4977
  /* @__PURE__ */ jsxRuntime.jsx(
5016
4978
  FormInput,
5017
4979
  {
5018
- name: "address.apartment",
4980
+ name: "address.line2",
5019
4981
  label: "Apartment, suite, or floor",
5020
4982
  placeholder: "Enter apartment, suite, or floor"
5021
4983
  }
@@ -5049,9 +5011,9 @@ var BusinessProfileCard = ({
5049
5011
  /* @__PURE__ */ jsxRuntime.jsx(
5050
5012
  FormInput,
5051
5013
  {
5052
- name: "address.country",
5014
+ name: "address.countryCode",
5053
5015
  label: "Country Code",
5054
- placeholder: "Enter country code"
5016
+ placeholder: "e.g., US"
5055
5017
  }
5056
5018
  )
5057
5019
  ] }),
@@ -5075,51 +5037,30 @@ var BusinessProfileCard = ({
5075
5037
  }
5076
5038
  )
5077
5039
  ] }),
5078
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
5079
- /* @__PURE__ */ jsxRuntime.jsx(
5080
- FormInput,
5081
- {
5082
- name: "achCompanyId",
5083
- label: "ACH Company ID",
5084
- placeholder: "10-digit company ID"
5085
- }
5086
- ),
5087
- /* @__PURE__ */ jsxRuntime.jsx(
5088
- FormInput,
5089
- {
5090
- name: "achCompanyName",
5091
- label: "ACH Company Name",
5092
- placeholder: "Enter ACH company name"
5093
- }
5094
- )
5095
- ] }),
5096
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
5097
- /* @__PURE__ */ jsxRuntime.jsx(
5098
- FormInput,
5099
- {
5100
- name: "externalId",
5101
- label: "External ID",
5102
- placeholder: "UUID",
5103
- disabled: true
5104
- }
5105
- ),
5106
- /* @__PURE__ */ jsxRuntime.jsx(
5107
- FormInput,
5108
- {
5109
- name: "productId",
5110
- label: "Product ID",
5111
- type: "number",
5112
- placeholder: "Product ID",
5113
- disabled: true
5114
- }
5115
- )
5116
- ] }),
5040
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: /* @__PURE__ */ jsxRuntime.jsx(
5041
+ FormInput,
5042
+ {
5043
+ name: "achCompanyId",
5044
+ label: "ACH Company ID",
5045
+ placeholder: "10-digit company ID"
5046
+ }
5047
+ ) }),
5048
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: /* @__PURE__ */ jsxRuntime.jsx(
5049
+ FormInput,
5050
+ {
5051
+ name: "productId",
5052
+ label: "Product ID",
5053
+ type: "number",
5054
+ placeholder: "Product ID",
5055
+ disabled: true
5056
+ }
5057
+ ) }),
5117
5058
  /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-sm font-medium text-muted-foreground mt-6", children: "Contact Person" }),
5118
5059
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
5119
5060
  /* @__PURE__ */ jsxRuntime.jsx(
5120
5061
  FormInput,
5121
5062
  {
5122
- name: "contactFirstName",
5063
+ name: "contactPersonFirstName",
5123
5064
  label: "First Name",
5124
5065
  placeholder: "Enter first name"
5125
5066
  }
@@ -5127,7 +5068,7 @@ var BusinessProfileCard = ({
5127
5068
  /* @__PURE__ */ jsxRuntime.jsx(
5128
5069
  FormInput,
5129
5070
  {
5130
- name: "contactLastName",
5071
+ name: "contactPersonLastName",
5131
5072
  label: "Last Name",
5132
5073
  placeholder: "Enter last name"
5133
5074
  }
@@ -5135,7 +5076,7 @@ var BusinessProfileCard = ({
5135
5076
  /* @__PURE__ */ jsxRuntime.jsx(
5136
5077
  FormInput,
5137
5078
  {
5138
- name: "contactEmail",
5079
+ name: "contactPersonEmail",
5139
5080
  label: "Email",
5140
5081
  type: "email",
5141
5082
  placeholder: "Enter email"
@@ -5144,7 +5085,7 @@ var BusinessProfileCard = ({
5144
5085
  /* @__PURE__ */ jsxRuntime.jsx(
5145
5086
  FormInput,
5146
5087
  {
5147
- name: "contactPhone",
5088
+ name: "contactPersonPhone",
5148
5089
  label: "Phone Number",
5149
5090
  placeholder: "Enter phone number"
5150
5091
  }
@@ -5156,25 +5097,22 @@ var BusinessProfileCard = ({
5156
5097
  const viewContent = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
5157
5098
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3", children: [
5158
5099
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
5159
- /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Legal Name", value: formValues?.legalName || "-", layout: "horizontal" }),
5160
- /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "DBA Name", value: formValues?.dbaName || "-", layout: "horizontal" })
5100
+ /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Business Name", value: formValues?.name || "-", layout: "horizontal" }),
5101
+ /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "DBA Name", value: formValues?.dba || "-", layout: "horizontal" })
5161
5102
  ] }),
5162
5103
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
5163
- /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Business Type", value: formValues?.businessType || "-", layout: "horizontal" }),
5164
- /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Tax ID", value: formValues?.taxId || "-", layout: "horizontal" })
5104
+ /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Business Entity Type", value: formValues?.businessEntityType || "-", layout: "horizontal" }),
5105
+ /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "ID Number", value: formValues?.idNumber || "-", layout: "horizontal" })
5165
5106
  ] }),
5166
5107
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
5167
5108
  /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Formation Date", value: formValues?.formationDate || "-", layout: "horizontal" }),
5168
- /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "ID Type", value: formValues?.idType || "-", layout: "horizontal" })
5109
+ /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "ID Type", value: formValues?.businessIdType || "-", layout: "horizontal" })
5169
5110
  ] }),
5170
5111
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
5171
5112
  /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Incorporation State", value: formValues?.incorporationState || "-", layout: "horizontal" }),
5172
5113
  /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Website", value: formValues?.website || "-", layout: "horizontal" })
5173
5114
  ] }),
5174
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
5175
- /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Business Email", value: formValues?.email || "-", layout: "horizontal" }),
5176
- /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Business Phone", value: formValues?.mobilePhone || "-", layout: "horizontal" })
5177
- ] }),
5115
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-2 gap-4", children: /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Business Phone", value: formValues?.mobilePhone || "-", layout: "horizontal" }) }),
5178
5116
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
5179
5117
  /* @__PURE__ */ jsxRuntime.jsx(
5180
5118
  InfoField,
@@ -5204,7 +5142,7 @@ var BusinessProfileCard = ({
5204
5142
  InfoField,
5205
5143
  {
5206
5144
  label: "Address",
5207
- value: formValues?.address ? `${formValues.address.streetAddress}${formValues.address.apartment ? ", " + formValues.address.apartment : ""}, ${formValues.address.city}, ${formValues.address.state} ${formValues.address.postalCode}, ${formValues.address.country}` : "-",
5145
+ value: formValues?.address ? `${formValues.address.line1 || ""}${formValues.address.line2 ? ", " + formValues.address.line2 : ""}, ${formValues.address.city || ""}, ${formValues.address.state || ""} ${formValues.address.postalCode || ""}, ${formValues.address.countryCode || ""}` : "-",
5208
5146
  layout: "horizontal"
5209
5147
  }
5210
5148
  ),
@@ -5212,22 +5150,16 @@ var BusinessProfileCard = ({
5212
5150
  /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "MCC", value: formValues?.mcc || "-", layout: "horizontal" }),
5213
5151
  /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "NAICS", value: formValues?.naics || "-", layout: "horizontal" })
5214
5152
  ] }),
5215
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
5216
- /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "ACH Company ID", value: formValues?.achCompanyId || "-", layout: "horizontal" }),
5217
- /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "ACH Company Name", value: formValues?.achCompanyName || "-", layout: "horizontal" })
5218
- ] }),
5219
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
5220
- /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "External ID", value: formValues?.externalId || "-", layout: "horizontal" }),
5221
- /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Product ID", value: formValues?.productId?.toString() || "-", layout: "horizontal" })
5222
- ] }),
5153
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-2 gap-4", children: /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "ACH Company ID", value: formValues?.achCompanyId || "-", layout: "horizontal" }) }),
5154
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-2 gap-4", children: /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Product ID", value: formValues?.productId?.toString() || "-", layout: "horizontal" }) }),
5223
5155
  /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-sm font-medium text-muted-foreground mt-6", children: "Contact Person" }),
5224
5156
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
5225
- /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "First Name", value: formValues?.contactFirstName || "-", layout: "horizontal" }),
5226
- /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Last Name", value: formValues?.contactLastName || "-", layout: "horizontal" })
5157
+ /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "First Name", value: formValues?.contactPersonFirstName || "-", layout: "horizontal" }),
5158
+ /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Last Name", value: formValues?.contactPersonLastName || "-", layout: "horizontal" })
5227
5159
  ] }),
5228
5160
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
5229
- /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Email", value: formValues?.contactEmail || "-", layout: "horizontal" }),
5230
- /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Phone Number", value: formValues?.contactPhone || "-", layout: "horizontal" })
5161
+ /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Email", value: formValues?.contactPersonEmail || "-", layout: "horizontal" }),
5162
+ /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Phone Number", value: formValues?.contactPersonPhone || "-", layout: "horizontal" })
5231
5163
  ] })
5232
5164
  ] }),
5233
5165
  /* @__PURE__ */ jsxRuntime.jsx(Dialog, { open: showResultDialog, onOpenChange: setShowResultDialog, children: /* @__PURE__ */ jsxRuntime.jsxs(DialogContent, { className: "max-w-3xl max-h-[80vh] overflow-y-auto", children: [
@@ -5656,7 +5588,7 @@ var IntermediaryCard = ({
5656
5588
  ] }),
5657
5589
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pt-3 border-t border-border", children: [
5658
5590
  /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-sm font-medium text-foreground mb-2", children: "FI Address" }),
5659
- /* @__PURE__ */ jsxRuntime.jsx(InfoField, { value: formValues?.address ? `${formValues.address.streetAddress}, ${formValues.address.city}, ${formValues.address.postalCode}, ${formValues.address.country}` : "" })
5591
+ /* @__PURE__ */ jsxRuntime.jsx(InfoField, { value: formValues?.address ? `${formValues.address.line1}, ${formValues.address.city}, ${formValues.address.postalCode}, ${formValues.address.countryCode}` : "" })
5660
5592
  ] })
5661
5593
  ] });
5662
5594
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -6889,6 +6821,36 @@ var AccountCard = React15__namespace.forwardRef(
6889
6821
  }
6890
6822
  );
6891
6823
  AccountCard.displayName = "AccountCard";
6824
+ var typeConfig2 = {
6825
+ corporation: {
6826
+ variant: "corporation",
6827
+ label: "Corporation",
6828
+ icon: lucideReact.Building
6829
+ },
6830
+ llc: {
6831
+ variant: "llc",
6832
+ label: "LLC",
6833
+ icon: lucideReact.Briefcase
6834
+ },
6835
+ partnership: {
6836
+ variant: "partnership",
6837
+ label: "Partnership",
6838
+ icon: lucideReact.Users
6839
+ },
6840
+ sole_proprietorship: {
6841
+ variant: "sole_proprietorship",
6842
+ label: "Sole Proprietorship",
6843
+ icon: lucideReact.User
6844
+ }
6845
+ };
6846
+ var BusinessTypeBadge = ({ type, className }) => {
6847
+ const config = typeConfig2[type];
6848
+ const Icon2 = config.icon;
6849
+ return /* @__PURE__ */ jsxRuntime.jsxs(Badge, { variant: config.variant, className, children: [
6850
+ /* @__PURE__ */ jsxRuntime.jsx(Icon2, { className: "w-3 h-3 mr-1" }),
6851
+ config.label
6852
+ ] });
6853
+ };
6892
6854
  var Checkbox = React15__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
6893
6855
  CheckboxPrimitive__namespace.Root,
6894
6856
  {
@@ -9567,33 +9529,31 @@ var Business = () => {
9567
9529
  };
9568
9530
  var BusinessDetail_default = Business;
9569
9531
  var defaultBusinessFormValues = {
9570
- legalName: "",
9571
- dbaName: "",
9572
- businessType: "",
9573
- taxId: "",
9574
- formationDate: "",
9575
- idType: "EIN",
9532
+ name: "",
9533
+ productId: 0,
9534
+ businessIdType: "",
9535
+ idNumber: "",
9536
+ dba: "",
9537
+ businessEntityType: "",
9576
9538
  incorporationState: "",
9539
+ formationDate: "",
9577
9540
  website: "",
9578
- email: "",
9541
+ achCompanyId: "",
9579
9542
  mobilePhone: "",
9580
9543
  mcc: "",
9581
9544
  naics: "",
9582
- achCompanyId: "",
9583
- achCompanyName: "",
9584
- externalId: "",
9585
- contactFirstName: "",
9586
- contactLastName: "",
9587
- contactEmail: "",
9588
- contactPhone: "",
9545
+ contactPersonFirstName: "",
9546
+ contactPersonLastName: "",
9547
+ contactPersonEmail: "",
9548
+ contactPersonPhone: "",
9589
9549
  address: {
9590
- streetAddress: "",
9591
- apartment: "",
9550
+ line1: "",
9551
+ line2: "",
9592
9552
  city: "",
9593
9553
  state: "",
9594
9554
  postalCode: "",
9595
- country: "US",
9596
- addressType: "business"
9555
+ countryCode: "US",
9556
+ type: "MAILING"
9597
9557
  }
9598
9558
  };
9599
9559
  var CreateBusiness = () => {
@@ -9612,7 +9572,7 @@ var CreateBusiness = () => {
9612
9572
  }, [navigate]);
9613
9573
  const handleBusinessTypeChange = React15.useCallback((value) => {
9614
9574
  setBusinessType(value);
9615
- form.setValue("businessType", value);
9575
+ form.setValue("businessEntityType", value, { shouldValidate: true });
9616
9576
  }, [form]);
9617
9577
  return /* @__PURE__ */ jsxRuntime.jsx(
9618
9578
  CreateBusinessView,