@retinalabsllc/zairusjs 0.5.7 → 0.5.8

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
@@ -1537,9 +1537,9 @@ var UniversalSidebar = ({
1537
1537
  "aside",
1538
1538
  {
1539
1539
  className: `
1540
- fixed md:relative m-4 rounded-4xl top-0 left-0 h-full bg-white
1540
+ fixed md:relative rounded-4xl top-4 md:top-0 md:my-4 left-4 md:left-0 md:ml-4 h-[calc(100dvh-2rem)] bg-white
1541
1541
  transition-all duration-300 ease-in-out shrink-0 flex flex-col z-100 md:z-10
1542
- ${isMobileOpen ? "translate-x-0" : "-translate-x-full md:translate-x-0"}
1542
+ ${isMobileOpen ? "translate-x-0" : "translate-x-[-120%] md:translate-x-0"}
1543
1543
  ${isCollapsed ? "md:w-16 w-64" : "w-64"}
1544
1544
  `
1545
1545
  },
@@ -1550,7 +1550,7 @@ var UniversalSidebar = ({
1550
1550
  className: "text-neutral-400 hover:text-black transition-colors outline-none",
1551
1551
  "aria-label": "Close Menu"
1552
1552
  },
1553
- /* @__PURE__ */ import_react37.default.createElement(import_react38.HugeiconsIcon, { icon: import_core_free_icons9.Cancel01Icon, size: 24 })
1553
+ /* @__PURE__ */ import_react37.default.createElement(import_react38.HugeiconsIcon, { icon: import_core_free_icons9.CancelCircleIcon, size: 27 })
1554
1554
  )),
1555
1555
  /* @__PURE__ */ import_react37.default.createElement("nav", { className: "flex-1 py-6 flex flex-col gap-1.5 px-3 overflow-y-auto custom-scrollbar" }, navItems.map((item) => {
1556
1556
  const isCurrentRoute = item.path === "/mod" || item.path === "/app" ? currentPath === item.path : currentPath === item.path || currentPath?.startsWith(`${item.path}/`);
@@ -1639,7 +1639,7 @@ var UniversalHeader = ({
1639
1639
  setShowLogoutDialog(false);
1640
1640
  }
1641
1641
  };
1642
- return /* @__PURE__ */ import_react39.default.createElement("div", { className: "w-full shrink-0 z-50 flex flex-col relative pointer-events-none" }, /* @__PURE__ */ import_react39.default.createElement("div", { className: "w-full pointer-events-auto relative z-20" }, /* @__PURE__ */ import_react39.default.createElement("header", { className: "w-full pt-3 pb-3" }, /* @__PURE__ */ import_react39.default.createElement("div", { className: "max-w-7xl mx-auto px-6 flex justify-between items-center" }, /* @__PURE__ */ import_react39.default.createElement("div", { className: "flex items-center gap-4" }, /* @__PURE__ */ import_react39.default.createElement(
1642
+ return /* @__PURE__ */ import_react39.default.createElement("div", { className: "w-full shrink-0 z-50 flex flex-col relative pointer-events-none" }, /* @__PURE__ */ import_react39.default.createElement("div", { className: "w-full pointer-events-auto relative z-20" }, /* @__PURE__ */ import_react39.default.createElement("header", { className: "w-full pt-6 pb-3" }, /* @__PURE__ */ import_react39.default.createElement("div", { className: "max-w-7xl mx-auto px-6 flex justify-between items-center" }, /* @__PURE__ */ import_react39.default.createElement("div", { className: "flex items-center gap-4" }, /* @__PURE__ */ import_react39.default.createElement(
1643
1643
  "button",
1644
1644
  {
1645
1645
  className: "md:hidden bg-white rounded-full w-8 h-8 text-neutral-500 hover:text-black transition-colors outline-none",
@@ -1654,7 +1654,7 @@ var UniversalHeader = ({
1654
1654
  className: "w-8 h-8 rounded-full bg-white flex items-center justify-center text-black transition-all group outline-none",
1655
1655
  "aria-label": "Switch Workspace"
1656
1656
  },
1657
- /* @__PURE__ */ import_react39.default.createElement(import_react40.HugeiconsIcon, { icon: import_core_free_icons10.UserIcon, size: 18, className: "transition-transform group-hover:-translate-x-0.5" })
1657
+ /* @__PURE__ */ import_react39.default.createElement(import_react40.HugeiconsIcon, { icon: import_core_free_icons10.UserIcon, size: 16, className: "transition-transform group-hover:-translate-x-0.5" })
1658
1658
  ), showLogoutAction && /* @__PURE__ */ import_react39.default.createElement(
1659
1659
  "button",
1660
1660
  {
@@ -1662,7 +1662,7 @@ var UniversalHeader = ({
1662
1662
  className: "w-8 h-8 rounded-full bg-white flex items-center justify-center text-black transition-all group outline-none",
1663
1663
  "aria-label": "Secure Logout"
1664
1664
  },
1665
- /* @__PURE__ */ import_react39.default.createElement(import_react40.HugeiconsIcon, { icon: import_core_free_icons10.LogoutCircle02Icon, size: 18, className: "transition-transform group-hover:-translate-x-0.5" })
1665
+ /* @__PURE__ */ import_react39.default.createElement(import_react40.HugeiconsIcon, { icon: import_core_free_icons10.LogoutCircle02Icon, size: 16, className: "transition-transform group-hover:-translate-x-0.5" })
1666
1666
  ), showBackButton && /* @__PURE__ */ import_react39.default.createElement(
1667
1667
  import_link10.default,
1668
1668
  {
@@ -1688,7 +1688,7 @@ var UniversalHeader = ({
1688
1688
  className: "w-full text-left px-5 py-4 flex items-center justify-between hover:bg-neutral-50 transition-colors group outline-none last:border-0"
1689
1689
  },
1690
1690
  /* @__PURE__ */ import_react39.default.createElement("div", { className: "flex flex-col truncate pr-4" }, /* @__PURE__ */ import_react39.default.createElement("span", { className: `text-[13px] truncate ${activeWorkspaceId === org.id ? "text-black" : "text-neutral-600 group-hover:text-black"}` }, org.name), /* @__PURE__ */ import_react39.default.createElement("span", { className: "text-[9px] text-neutral-400 tracking-[0.2em] mt-1" }, "Role: ", org.role)),
1691
- activeWorkspaceId === org.id && /* @__PURE__ */ import_react39.default.createElement(import_react40.HugeiconsIcon, { icon: import_core_free_icons10.CheckmarkCircle01Icon, size: 18, className: "text-black shrink-0" })
1691
+ activeWorkspaceId === org.id && /* @__PURE__ */ import_react39.default.createElement(import_react40.HugeiconsIcon, { icon: import_core_free_icons10.CheckmarkCircle01Icon, size: 16, className: "text-black shrink-0" })
1692
1692
  ))), /* @__PURE__ */ import_react39.default.createElement("div", { className: "w-full flex mt-auto" }, /* @__PURE__ */ import_react39.default.createElement(
1693
1693
  "button",
1694
1694
  {
@@ -3518,15 +3518,15 @@ var UniversalRegistrationFlow = ({
3518
3518
  const newForm = { ...formData, natureOfBusiness: suggestedNature };
3519
3519
  setFormData(newForm);
3520
3520
  approveSection("natureApproved", newForm);
3521
- }, onDecline: () => setSuggestedNature(null) }))) : /* @__PURE__ */ import_react65.default.createElement("div", { className: " flex items-center justify-between border border-neutral-100 p-4 rounded-full" }, /* @__PURE__ */ import_react65.default.createElement("div", { className: "pr-4" }, /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-sm text-black" }, formData.natureOfBusiness?.specificLabel), /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-xs text-neutral-500 mt-1" }, formData.businessDesc)), !isReadOnly && /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => editSection("natureApproved"), className: "p-2 text-neutral-400 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.PencilEdit01Icon, size: 16 })))), formState.natureApproved && /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col gap-4 pt-6 animate-in slide-in-from-top-4 duration-500" }, /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center gap-2 text-black" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.CheckmarkBadge01Icon, size: 18 }), /* @__PURE__ */ import_react65.default.createElement("h3", { className: "text-sm " }, "What name would you like to register?")), /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-xs text-neutral-500 -mt-2" }, "Provide two options. We will verify availability against the official registry."), !formState.nameApproved ? /* @__PURE__ */ import_react65.default.createElement(import_react65.default.Fragment, null, /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col gap-4" }, /* @__PURE__ */ import_react65.default.createElement(TextInput, { label: "Proposed Name 1 (Preferred)", value: formData.proposedName, onChange: (v) => setFormData({ ...formData, proposedName: v }), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ import_react65.default.createElement(TextInput, { label: "Proposed Name 2 (Alternative)", value: formData.proposedName2, onChange: (v) => setFormData({ ...formData, proposedName2: v }), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ import_react65.default.createElement(ThreeDActionButton, { onClick: () => handleCheckNames(formData.proposedName), disabled: !formData.proposedName || !formData.proposedName2 || isCheckingName || isCheckingQualifier || isReadOnly, isLoading: isCheckingQualifier || isCheckingName, className: "w-fit" }, "Check Availability")), (isCheckingQualifier || isCheckingName) && /* @__PURE__ */ import_react65.default.createElement("div", { className: " mt-2" }, /* @__PURE__ */ import_react65.default.createElement(AiStageCheck, { tasks: [{ id: "1", label: "AI Qualifier Pre-check...", status: isCheckingQualifier ? "loading" : "success" }, { id: "2", label: "Checking Official Registry Database...", status: isCheckingName ? "loading" : "pending" }, { id: "3", label: "Fallback Checking Public Database...", status: isCheckingName ? "loading" : "pending" }, { id: "4", label: "Validation Status...", status: isCheckingName ? "loading" : "pending" }] })), qualifierCheckResult && /* @__PURE__ */ import_react65.default.createElement("div", { className: "mt-2 animate-in fade-in" }, /* @__PURE__ */ import_react65.default.createElement("div", { className: "border border-purple-100 bg-linear-to-bl from-purple-50/80 via-white to-white p-5 rounded-2xl flex flex-col gap-4 relative overflow-hidden" }, /* @__PURE__ */ import_react65.default.createElement("div", null, /* @__PURE__ */ import_react65.default.createElement("span", { className: "text-[10px] tracking-widest text-purple-600 block mb-1" }, "AI Suggestion: Structural Qualifier Missing"), /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-sm text-black mb-3" }, "Nigerian registrations require a structural qualifier to be approved."), /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col gap-2" }, (qualifierCheckResult.suggestions || []).map((alt, i) => /* @__PURE__ */ import_react65.default.createElement("button", { key: i, onClick: () => setFormData({ ...formData, proposedName: alt }), className: "text-left px-4 py-2 border border-neutral-100 rounded-full hover:border-black text-sm transition-colors outline-none" }, alt)))), /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => setQualifierCheckResult(null), className: "w-fit text-[11px] tracking-widest text-neutral-500 hover:text-black transition-colors mt-2 outline-none" }, "Edit Name Manually"))), nameCheckResult && /* @__PURE__ */ import_react65.default.createElement("div", { className: " mt-2 animate-in fade-in" }, nameCheckResult.status === "APPROVED" || nameCheckResult.status === "APPROVED_WARNING" || nameCheckResult.status === "SKIPPED" ? /* @__PURE__ */ import_react65.default.createElement(AiApproveDecline, { suggestionTitle: nameCheckResult.status === "APPROVED" ? "Name Available!" : "Fallback Approval", suggestionValue: /* @__PURE__ */ import_react65.default.createElement("div", null, /* @__PURE__ */ import_react65.default.createElement("p", { className: `mb-1 ${nameCheckResult.status === "APPROVED" ? "text-emerald-600 " : "text-orange-500 "}` }, nameCheckResult.status === "APPROVED" ? "Excellent chance of approval." : "Validation Bypassed / Fallback."), /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-xs text-neutral-600" }, nameCheckResult.message), /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-xs text-neutral-600 mt-2 " }, "Proposed Option: ", nameCheckResult.approvedOption)), onApprove: () => {
3521
+ }, onDecline: () => setSuggestedNature(null) }))) : /* @__PURE__ */ import_react65.default.createElement("div", { className: " flex items-center justify-between" }, /* @__PURE__ */ import_react65.default.createElement("div", { className: "pr-4" }, /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-sm text-black" }, formData.natureOfBusiness?.specificLabel), /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-xs text-neutral-500 mt-1" }, formData.businessDesc)), !isReadOnly && /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => editSection("natureApproved"), className: "p-2 text-neutral-400 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.PencilEdit01Icon, size: 16 })))), formState.natureApproved && /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col gap-4 pt-6 animate-in slide-in-from-top-4 duration-500" }, /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center gap-2 text-black" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.CheckmarkBadge01Icon, size: 18 }), /* @__PURE__ */ import_react65.default.createElement("h3", { className: "text-sm " }, "What name would you like to register?")), /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-xs text-neutral-500 -mt-2" }, "Provide two options. We will verify availability against the official registry."), !formState.nameApproved ? /* @__PURE__ */ import_react65.default.createElement(import_react65.default.Fragment, null, /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col gap-4" }, /* @__PURE__ */ import_react65.default.createElement(TextInput, { label: "Proposed Name 1 (Preferred)", value: formData.proposedName, onChange: (v) => setFormData({ ...formData, proposedName: v }), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ import_react65.default.createElement(TextInput, { label: "Proposed Name 2 (Alternative)", value: formData.proposedName2, onChange: (v) => setFormData({ ...formData, proposedName2: v }), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ import_react65.default.createElement(ThreeDActionButton, { onClick: () => handleCheckNames(formData.proposedName), disabled: !formData.proposedName || !formData.proposedName2 || isCheckingName || isCheckingQualifier || isReadOnly, isLoading: isCheckingQualifier || isCheckingName, className: "w-fit" }, "Check Availability")), (isCheckingQualifier || isCheckingName) && /* @__PURE__ */ import_react65.default.createElement("div", { className: " mt-2" }, /* @__PURE__ */ import_react65.default.createElement(AiStageCheck, { tasks: [{ id: "1", label: "AI Qualifier Pre-check...", status: isCheckingQualifier ? "loading" : "success" }, { id: "2", label: "Checking Official Registry Database...", status: isCheckingName ? "loading" : "pending" }, { id: "3", label: "Fallback Checking Public Database...", status: isCheckingName ? "loading" : "pending" }, { id: "4", label: "Validation Status...", status: isCheckingName ? "loading" : "pending" }] })), qualifierCheckResult && /* @__PURE__ */ import_react65.default.createElement("div", { className: "mt-2 animate-in fade-in" }, /* @__PURE__ */ import_react65.default.createElement("div", { className: "border border-purple-100 bg-linear-to-bl from-purple-50/80 via-white to-white p-5 rounded-2xl flex flex-col gap-4 relative overflow-hidden" }, /* @__PURE__ */ import_react65.default.createElement("div", null, /* @__PURE__ */ import_react65.default.createElement("span", { className: "text-[10px] tracking-widest text-purple-600 block mb-1" }, "AI Suggestion: Structural Qualifier Missing"), /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-sm text-black mb-3" }, "Nigerian registrations require a structural qualifier to be approved."), /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col gap-2" }, (qualifierCheckResult.suggestions || []).map((alt, i) => /* @__PURE__ */ import_react65.default.createElement("button", { key: i, onClick: () => setFormData({ ...formData, proposedName: alt }), className: "text-left px-4 py-2 border border-neutral-100 rounded-full hover:border-black text-sm transition-colors outline-none" }, alt)))), /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => setQualifierCheckResult(null), className: "w-fit text-[11px] tracking-widest text-neutral-500 hover:text-black transition-colors mt-2 outline-none" }, "Edit Name Manually"))), nameCheckResult && /* @__PURE__ */ import_react65.default.createElement("div", { className: " mt-2 animate-in fade-in" }, nameCheckResult.status === "APPROVED" || nameCheckResult.status === "APPROVED_WARNING" || nameCheckResult.status === "SKIPPED" ? /* @__PURE__ */ import_react65.default.createElement(AiApproveDecline, { suggestionTitle: nameCheckResult.status === "APPROVED" ? "Name Available!" : "Fallback Approval", suggestionValue: /* @__PURE__ */ import_react65.default.createElement("div", null, /* @__PURE__ */ import_react65.default.createElement("p", { className: `mb-1 ${nameCheckResult.status === "APPROVED" ? "text-emerald-600 " : "text-orange-500 "}` }, nameCheckResult.status === "APPROVED" ? "Excellent chance of approval." : "Validation Bypassed / Fallback."), /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-xs text-neutral-600" }, nameCheckResult.message), /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-xs text-neutral-600 mt-2 " }, "Proposed Option: ", nameCheckResult.approvedOption)), onApprove: () => {
3522
3522
  const newForm = { ...formData, approvedName: nameCheckResult.approvedOption };
3523
3523
  setFormData(newForm);
3524
3524
  approveSection("nameApproved", newForm);
3525
- }, onDecline: () => setNameCheckResult(null) }) : /* @__PURE__ */ import_react65.default.createElement("div", { className: "border border-red-100 bg-linear-to-bl from-red-50/80 via-white to-white p-5 rounded-2xl flex flex-col gap-4 relative overflow-hidden" }, /* @__PURE__ */ import_react65.default.createElement("div", null, /* @__PURE__ */ import_react65.default.createElement("span", { className: "text-[10px] tracking-widest text-red-600 block mb-1" }, "Registry Conflict Detected"), /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-sm text-black mb-3" }, nameCheckResult.message), /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col gap-2" }, (nameCheckResult.alternatives || []).map((alt, i) => /* @__PURE__ */ import_react65.default.createElement("button", { key: i, onClick: () => setFormData({ ...formData, proposedName: alt }), className: "text-left px-4 py-2 border border-neutral-100 rounded-full hover:border-black text-sm transition-colors outline-none" }, alt)))), /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => setNameCheckResult(null), className: "w-fit text-[11px] tracking-widest text-neutral-500 hover:text-black transition-colors mt-2 outline-none" }, "Try New Name")))) : /* @__PURE__ */ import_react65.default.createElement("div", { className: " flex items-center justify-between border border-neutral-100 p-4 rounded-full" }, /* @__PURE__ */ import_react65.default.createElement("div", null, /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-sm text-black" }, formData.approvedName), /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-xs text-emerald-600 mt-1" }, "Verified against registry")), !isReadOnly && /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => editSection("nameApproved"), className: "p-2 text-neutral-400 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.PencilEdit01Icon, size: 16 })))), formState.nameApproved && /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col gap-4 pt-6 animate-in slide-in-from-top-4 duration-500" }, /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center gap-2 text-black" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.Location01Icon, size: 18 }), /* @__PURE__ */ import_react65.default.createElement("h3", { className: "text-sm " }, "Where is your head office located?")), !formState.addressApproved ? /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col gap-4 " }, /* @__PURE__ */ import_react65.default.createElement(TextInput, { label: "Street Address", value: formData.address, onChange: (v) => setFormData({ ...formData, address: v }), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ import_react65.default.createElement("div", { className: "grid grid-cols-2 gap-4" }, /* @__PURE__ */ import_react65.default.createElement(TextInput, { label: "City", value: formData.city, onChange: (v) => setFormData({ ...formData, city: v }), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ import_react65.default.createElement(TextInput, { label: "State", value: formData.state, readOnly: true, onClick: () => !isReadOnly && setActiveModal({ isOpen: true, type: "state", memberIndex: null, isGlobalState: true }), placeholder: "Select State", onChange: () => {
3526
- }, disabled: isReadOnly || isSubmitting })), /* @__PURE__ */ import_react65.default.createElement(ThreeDActionButton, { onClick: () => approveSection("addressApproved"), disabled: !formData.address || !formData.city || !formData.state || isReadOnly, className: "w-fit mt-2" }, "Confirm Address")) : /* @__PURE__ */ import_react65.default.createElement("div", { className: " flex items-center justify-between border border-neutral-100 p-4 rounded-full" }, /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-sm text-neutral-500" }, formData.address, ", ", formData.city, ", ", formData.state), !isReadOnly && /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => editSection("addressApproved"), className: "p-2 text-neutral-400 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.PencilEdit01Icon, size: 16 })))), formState.addressApproved && type === "company" && /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col gap-4 pt-6 animate-in slide-in-from-top-4 duration-500" }, /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center justify-between gap-2 text-black border-b border-neutral-100 pb-3" }, /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.UserIcon, size: 18 }), /* @__PURE__ */ import_react65.default.createElement("h3", { className: "text-sm " }, "Directors & Shareholders")), !formState.membersDetailsApproved && /* @__PURE__ */ import_react65.default.createElement("div", { className: `text-xs px-3 py-1 rounded-full ${getCompanyTotalShares() === 100 ? "bg-emerald-50 text-emerald-600" : "bg-red-50 text-red-500"}` }, "Total Shares: ", getCompanyTotalShares(), "%")), /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-xs text-neutral-500 -mt-2" }, "Provide details for all individuals. Ensure total share percentage equals 100%."), !formState.membersDetailsApproved ? /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col gap-6 " }, formData.members.map((member, i) => /* @__PURE__ */ import_react65.default.createElement("div", { key: member.id, className: "flex flex-col gap-4 border border-neutral-100 p-5 rounded-2xl bg-neutral-50/30" }, /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex justify-between items-center mb-1" }, /* @__PURE__ */ import_react65.default.createElement("span", { className: "text-[10px] tracking-widest text-neutral-400" }, "Member ", i + 1), formData.members.length > 1 && !isReadOnly && /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => removeCompanyMember(i), className: "text-red-500 text-xs hover:text-red-600" }, "Remove")), /* @__PURE__ */ import_react65.default.createElement("div", { className: "grid grid-cols-2 gap-4" }, /* @__PURE__ */ import_react65.default.createElement(TextInput, { label: "Role", value: member.role, readOnly: true, onClick: () => !isReadOnly && setActiveModal({ isOpen: true, type: "role", memberIndex: i }), onChange: () => {
3525
+ }, onDecline: () => setNameCheckResult(null) }) : /* @__PURE__ */ import_react65.default.createElement("div", { className: "border border-red-100 bg-linear-to-bl from-red-50/80 via-white to-white p-5 rounded-2xl flex flex-col gap-4 relative overflow-hidden" }, /* @__PURE__ */ import_react65.default.createElement("div", null, /* @__PURE__ */ import_react65.default.createElement("span", { className: "text-[10px] tracking-widest text-red-600 block mb-1" }, "Registry Conflict Detected"), /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-sm text-black mb-3" }, nameCheckResult.message), /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col gap-2" }, (nameCheckResult.alternatives || []).map((alt, i) => /* @__PURE__ */ import_react65.default.createElement("button", { key: i, onClick: () => setFormData({ ...formData, proposedName: alt }), className: "text-left px-4 py-2 border border-neutral-100 rounded-full hover:border-black text-sm transition-colors outline-none" }, alt)))), /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => setNameCheckResult(null), className: "w-fit text-[11px] tracking-widest text-neutral-500 hover:text-black transition-colors mt-2 outline-none" }, "Try New Name")))) : /* @__PURE__ */ import_react65.default.createElement("div", { className: " flex items-center justify-between" }, /* @__PURE__ */ import_react65.default.createElement("div", null, /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-sm text-black" }, formData.approvedName), /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-xs text-emerald-600 mt-1" }, "Verified against registry")), !isReadOnly && /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => editSection("nameApproved"), className: "p-2 text-neutral-400 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.PencilEdit01Icon, size: 16 })))), formState.nameApproved && /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col gap-4 pt-6 animate-in slide-in-from-top-4 duration-500" }, /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center gap-2 text-black" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.Location01Icon, size: 18 }), /* @__PURE__ */ import_react65.default.createElement("h3", { className: "text-sm " }, "Where is your head office located?")), !formState.addressApproved ? /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col gap-4 " }, /* @__PURE__ */ import_react65.default.createElement(TextInput, { label: "Street Address", value: formData.address, onChange: (v) => setFormData({ ...formData, address: v }), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ import_react65.default.createElement("div", { className: "grid grid-cols-2 gap-4" }, /* @__PURE__ */ import_react65.default.createElement(TextInput, { label: "City", value: formData.city, onChange: (v) => setFormData({ ...formData, city: v }), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ import_react65.default.createElement(TextInput, { label: "State", value: formData.state, readOnly: true, onClick: () => !isReadOnly && setActiveModal({ isOpen: true, type: "state", memberIndex: null, isGlobalState: true }), placeholder: "Select State", onChange: () => {
3526
+ }, disabled: isReadOnly || isSubmitting })), /* @__PURE__ */ import_react65.default.createElement(ThreeDActionButton, { onClick: () => approveSection("addressApproved"), disabled: !formData.address || !formData.city || !formData.state || isReadOnly, className: "w-fit mt-2" }, "Confirm Address")) : /* @__PURE__ */ import_react65.default.createElement("div", { className: " flex items-center justify-between" }, /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-sm text-neutral-500" }, formData.address, ", ", formData.city, ", ", formData.state), !isReadOnly && /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => editSection("addressApproved"), className: "p-2 text-neutral-400 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.PencilEdit01Icon, size: 16 })))), formState.addressApproved && type === "company" && /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col gap-4 pt-6 animate-in slide-in-from-top-4 duration-500" }, /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center justify-between gap-2 text-black border-b border-neutral-100 pb-3" }, /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.UserIcon, size: 18 }), /* @__PURE__ */ import_react65.default.createElement("h3", { className: "text-sm " }, "Directors & Shareholders")), !formState.membersDetailsApproved && /* @__PURE__ */ import_react65.default.createElement("div", { className: `text-xs px-3 py-1 rounded-full ${getCompanyTotalShares() === 100 ? "bg-emerald-50 text-emerald-600" : "bg-red-50 text-red-500"}` }, "Total Shares: ", getCompanyTotalShares(), "%")), /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-xs text-neutral-500 -mt-2" }, "Provide details for all individuals. Ensure total share percentage equals 100%."), !formState.membersDetailsApproved ? /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col gap-6 " }, formData.members.map((member, i) => /* @__PURE__ */ import_react65.default.createElement("div", { key: member.id, className: "flex flex-col gap-4 border border-neutral-100 p-5 rounded-2xl bg-neutral-50/30" }, /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex justify-between items-center mb-1" }, /* @__PURE__ */ import_react65.default.createElement("span", { className: "text-[10px] tracking-widest text-neutral-400" }, "Member ", i + 1), formData.members.length > 1 && !isReadOnly && /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => removeCompanyMember(i), className: "text-red-500 text-xs hover:text-red-600" }, "Remove")), /* @__PURE__ */ import_react65.default.createElement("div", { className: "grid grid-cols-2 gap-4" }, /* @__PURE__ */ import_react65.default.createElement(TextInput, { label: "Role", value: member.role, readOnly: true, onClick: () => !isReadOnly && setActiveModal({ isOpen: true, type: "role", memberIndex: i }), onChange: () => {
3527
3527
  }, disabled: isReadOnly || isSubmitting }), member.role !== "Director Only" && /* @__PURE__ */ import_react65.default.createElement(NumberInput, { label: "Share Percentage (%)", value: member.sharePercentage, onChange: (v) => updateCompanyMemberInfo(i, "sharePercentage", v), disabled: isReadOnly || isSubmitting })), /* @__PURE__ */ import_react65.default.createElement(TextInput, { label: "Full Name", value: member.fullName, onChange: (v) => updateCompanyMemberInfo(i, "fullName", v), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ import_react65.default.createElement("div", { className: "grid grid-cols-2 gap-4" }, /* @__PURE__ */ import_react65.default.createElement(NumberInput, { label: "Phone Number", value: member.phone, onChange: (v) => updateCompanyMemberInfo(i, "phone", v), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ import_react65.default.createElement(TextInput, { label: "Email Address", value: member.email, onChange: (v) => updateCompanyMemberInfo(i, "email", v), disabled: isReadOnly || isSubmitting })), /* @__PURE__ */ import_react65.default.createElement(TextInput, { label: "Nationality", value: member.nationality, readOnly: true, onClick: () => !isReadOnly && setActiveModal({ isOpen: true, type: "nationality", memberIndex: i }), onChange: () => {
3528
3528
  }, disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ import_react65.default.createElement(TextInput, { label: "Residential Address", value: member.address, onChange: (v) => updateCompanyMemberInfo(i, "address", v), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ import_react65.default.createElement("div", { className: "grid grid-cols-2 gap-4" }, /* @__PURE__ */ import_react65.default.createElement(TextInput, { label: "City", value: member.city, onChange: (v) => updateCompanyMemberInfo(i, "city", v), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ import_react65.default.createElement(TextInput, { label: "State", value: member.state, readOnly: true, onClick: () => !isReadOnly && setActiveModal({ isOpen: true, type: "state", memberIndex: i }), onChange: () => {
3529
- }, disabled: isReadOnly || isSubmitting })))), /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center justify-between mt-2" }, !isReadOnly && /* @__PURE__ */ import_react65.default.createElement("button", { onClick: addCompanyMember, className: "px-6 py-2 bg-white border border-neutral-100 text-black text-[11px] tracking-widest rounded-full hover:bg-neutral-50 transition-colors outline-none" }, "+ Add Member"), /* @__PURE__ */ import_react65.default.createElement(ThreeDActionButton, { onClick: () => approveSection("membersDetailsApproved"), disabled: !areCompanyMembersValid() || isReadOnly, className: "w-fit" }, "Confirm Members"))) : /* @__PURE__ */ import_react65.default.createElement("div", { className: " flex items-center justify-between border border-neutral-100 p-4 rounded-full" }, /* @__PURE__ */ import_react65.default.createElement("div", null, /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-sm text-black" }, formData.members.length, " Member(s) Registered"), /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-xs text-neutral-500 mt-1" }, "Total Shares: 100% Verified.")), !isReadOnly && /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => editSection("membersDetailsApproved"), className: "p-2 text-neutral-400 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.PencilEdit01Icon, size: 16 })))), formState.addressApproved && type === "business" && /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col gap-4 pt-6 animate-in slide-in-from-top-4 duration-500" }, /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center gap-2 text-black" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.UserIcon, size: 18 }), /* @__PURE__ */ import_react65.default.createElement("h3", { className: "text-sm " }, "Who owns the business?")), /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-xs text-neutral-500 -mt-2" }, "Provide basic contact info. We will extract your DOB and ID number automatically in the next step."), !formState.ownerApproved ? /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col gap-4 " }, /* @__PURE__ */ import_react65.default.createElement(TextInput, { label: "Full Name", value: formData.ownerName, onChange: (v) => setFormData({ ...formData, ownerName: v }), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ import_react65.default.createElement("div", { className: "grid grid-cols-2 gap-4" }, /* @__PURE__ */ import_react65.default.createElement(NumberInput, { label: "Phone Number", value: formData.ownerPhone, onChange: (v) => setFormData({ ...formData, ownerPhone: v }), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ import_react65.default.createElement(TextInput, { label: "Email Address", value: formData.ownerEmail, onChange: (v) => setFormData({ ...formData, ownerEmail: v }), disabled: isReadOnly || isSubmitting })), /* @__PURE__ */ import_react65.default.createElement(ThreeDActionButton, { onClick: () => approveSection("ownerApproved"), disabled: !formData.ownerName || !formData.ownerPhone || !formData.ownerEmail || isReadOnly, className: "w-fit mt-2" }, "Confirm Owner Details")) : /* @__PURE__ */ import_react65.default.createElement("div", { className: " flex items-center justify-between border border-neutral-100 p-4 rounded-full" }, /* @__PURE__ */ import_react65.default.createElement("div", null, /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-sm text-black" }, formData.ownerName), /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-xs text-neutral-500 mt-1" }, formData.ownerEmail, " \u2022 ", formData.ownerPhone)), !isReadOnly && /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => editSection("ownerApproved"), className: "p-2 text-neutral-400 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.PencilEdit01Icon, size: 16 })))), /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center justify-between mt-8 pt-6 " }, /* @__PURE__ */ import_react65.default.createElement("button", { onClick: handleBack, className: "flex items-center gap-2 px-6 py-2 text-[11px] tracking-widest text-neutral-500 hover:text-black hover:bg-neutral-50 rounded-full transition-colors outline-none" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.Cancel01Icon, size: 14 }), " Close"), /* @__PURE__ */ import_react65.default.createElement(ThreeDActionButton, { onClick: handleNext, disabled: !isStep0Valid, className: "w-fit shrink-0" }, "Next Step"))), macroStep === 1 && /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col gap-8 animate-in fade-in" }, type === "company" ? /* @__PURE__ */ import_react65.default.createElement(import_react65.default.Fragment, null, /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col gap-2" }, /* @__PURE__ */ import_react65.default.createElement("h3", { className: "text-sm text-black" }, "Member Identity Documents"), /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-xs text-neutral-500 leading-relaxed" }, "Upload valid means of identification, passport photographs, and signatures for every director and shareholder.")), !formState.membersDocsApproved ? /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col gap-6" }, formData.members.map((member, i) => /* @__PURE__ */ import_react65.default.createElement("div", { key: member.id, className: "flex flex-col gap-4" }, /* @__PURE__ */ import_react65.default.createElement("span", { className: "text-[11px] tracking-widest text-black mb-1" }, member.fullName || `Member ${i + 1}`, " ", /* @__PURE__ */ import_react65.default.createElement("span", { className: "text-neutral-400 ml-2" }, "(", member.role, ")")), /* @__PURE__ */ import_react65.default.createElement("input", { id: `id-upload-${i}`, type: "file", accept: "image/jpeg, image/png, image/webp, application/pdf", className: "hidden", onChange: (e) => handleCompanyMemberUpload(e, i, "id"), disabled: isReadOnly || isAnyUploading }), /* @__PURE__ */ import_react65.default.createElement("input", { id: `pass-upload-${i}`, type: "file", accept: "image/jpeg, image/png, image/webp, application/pdf", className: "hidden", onChange: (e) => handleCompanyMemberUpload(e, i, "passport"), disabled: isReadOnly || isAnyUploading }), /* @__PURE__ */ import_react65.default.createElement("input", { id: `sig-upload-${i}`, type: "file", accept: "image/jpeg, image/png, image/webp, application/pdf", className: "hidden", onChange: (e) => handleCompanyMemberUpload(e, i, "signature"), disabled: isReadOnly || isAnyUploading }), !member.idExtractedData && !globalExtractingId ? /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => !isReadOnly && !isAnyUploading && document.getElementById(`id-upload-${i}`)?.click(), className: `flex items-center gap-3 p-4 border border-neutral-100 rounded-full transition-colors text-sm w-full outline-none ${isAnyUploading ? "opacity-50 cursor-not-allowed bg-neutral-50 text-neutral-400" : "text-black hover:bg-neutral-50"}`, disabled: isReadOnly || isAnyUploading }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.Upload01Icon, size: 18, className: "text-neutral-400" }), " Upload Valid ID (NIN, License, Voter's Card)") : globalExtractingId && !member.idExtractedData ? /* @__PURE__ */ import_react65.default.createElement("div", { className: " mt-2" }, /* @__PURE__ */ import_react65.default.createElement(AiStageCheck, { tasks: aiTasks })) : member.idExtractedData ? /* @__PURE__ */ import_react65.default.createElement("div", { className: " mt-2 animate-in fade-in border border-purple-100 bg-linear-to-bl from-purple-50/80 via-white to-white p-5 rounded-xl flex flex-col gap-4 relative overflow-hidden" }, /* @__PURE__ */ import_react65.default.createElement("div", null, /* @__PURE__ */ import_react65.default.createElement("span", { className: "text-[10px] tracking-widest text-purple-600 block mb-2" }, "Review Extracted ID"), /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col gap-4" }, /* @__PURE__ */ import_react65.default.createElement(TextInput, { label: "Full Name on ID", value: member.idExtractedData.fullName, onChange: (v) => updateCompanyMemberInfo(i, "idExtractedData", { ...member.idExtractedData, fullName: v }), disabled: isReadOnly || isAnyUploading }), /* @__PURE__ */ import_react65.default.createElement("div", { className: "grid grid-cols-2 gap-4" }, /* @__PURE__ */ import_react65.default.createElement(TextInput, { label: "ID Number", value: member.idExtractedData.idNumber, onChange: (v) => updateCompanyMemberInfo(i, "idExtractedData", { ...member.idExtractedData, idNumber: v }), disabled: isReadOnly || isAnyUploading }), /* @__PURE__ */ import_react65.default.createElement(TextInput, { label: "Date of Birth", value: member.idExtractedData.dob, onChange: (v) => updateCompanyMemberInfo(i, "idExtractedData", { ...member.idExtractedData, dob: v }), disabled: isReadOnly || isAnyUploading })))), /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center gap-2 mt-2" }, !isReadOnly && /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => deleteCompanyMemberDocument(i, "id"), disabled: isAnyUploading, className: "px-6 py-2 bg-white border border-neutral-100 text-neutral-500 text-[11px] rounded-full tracking-widest hover:bg-neutral-50 transition-colors outline-none disabled:opacity-50 disabled:cursor-not-allowed" }, "Delete & Re-upload ID"))) : null, !member.passportFileUrl && !globalUploadingPassport ? /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => !isReadOnly && !isAnyUploading && document.getElementById(`pass-upload-${i}`)?.click(), className: `flex items-center gap-3 p-4 border border-neutral-100 rounded-full transition-colors text-sm w-full outline-none ${isAnyUploading ? "opacity-50 cursor-not-allowed bg-neutral-50 text-neutral-400" : "text-black hover:bg-neutral-50"}`, disabled: isReadOnly || isAnyUploading }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.Upload01Icon, size: 18, className: "text-neutral-400" }), " Upload Passport Photo") : globalUploadingPassport && !member.passportFileUrl ? /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center gap-3 p-4 border border-neutral-100 rounded-full bg-neutral-50 text-neutral-500 text-sm w-full" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.Loading03Icon, size: 18, className: "animate-spin text-black" }), " Uploading Passport...") : member.passportFileUrl ? /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center justify-between p-4 bg-emerald-50 rounded-full text-emerald-800 text-sm w-full" }, /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.IdentificationIcon, size: 18 }), " Passport Uploaded"), !isReadOnly && /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => deleteCompanyMemberDocument(i, "passport"), disabled: isAnyUploading, className: "text-emerald-700 hover:text-red-500 transition-colors p-1 outline-none shrink-0 disabled:opacity-50 disabled:cursor-not-allowed" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.Delete02Icon, size: 16 }))) : null, !member.signatureFileUrl && !globalUploadingSignature ? /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => !isReadOnly && !isAnyUploading && document.getElementById(`sig-upload-${i}`)?.click(), className: `flex items-center gap-3 p-4 border border-neutral-100 rounded-full transition-colors text-sm w-full outline-none ${isAnyUploading ? "opacity-50 cursor-not-allowed bg-neutral-50 text-neutral-400" : "text-black hover:bg-neutral-50"}`, disabled: isReadOnly || isAnyUploading }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.Upload01Icon, size: 18, className: "text-neutral-400" }), " Upload Signature") : globalUploadingSignature && !member.signatureFileUrl ? /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center gap-3 p-4 border border-neutral-100 rounded-full bg-neutral-50 text-neutral-500 text-sm w-full" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.Loading03Icon, size: 18, className: "animate-spin text-black" }), " Uploading Signature...") : member.signatureFileUrl ? /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center justify-between p-4 bg-emerald-50 rounded-full text-emerald-800 text-sm w-full" }, /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.SignatureIcon, size: 18 }), " Signature Uploaded"), !isReadOnly && /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => deleteCompanyMemberDocument(i, "signature"), disabled: isAnyUploading, className: "text-emerald-700 hover:text-red-500 transition-colors p-1 outline-none shrink-0 disabled:opacity-50 disabled:cursor-not-allowed" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.Delete02Icon, size: 16 }))) : null)), /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex justify-end" }, /* @__PURE__ */ import_react65.default.createElement(ThreeDActionButton, { onClick: () => approveSection("membersDocsApproved"), disabled: !areCompanyMemberDocsValid() || isReadOnly || isAnyUploading, className: "w-fit" }, "Confirm All Documents"))) : /* @__PURE__ */ import_react65.default.createElement("div", { className: " flex items-center justify-between bg-emerald-50 p-6 rounded-2xl" }, /* @__PURE__ */ import_react65.default.createElement("div", null, /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-sm text-emerald-800" }, "All Member Documents Verified"), /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-xs text-emerald-600 mt-1" }, "Data safely extracted and ready for submission.")), !isReadOnly && /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => editSection("membersDocsApproved"), className: "p-2 text-emerald-700 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.PencilEdit01Icon, size: 16 })))) : /* @__PURE__ */ import_react65.default.createElement(import_react65.default.Fragment, null, /* @__PURE__ */ import_react65.default.createElement("input", { type: "file", accept: "image/jpeg, image/png, image/webp, application/pdf", ref: idRef, onChange: (e) => handleBusinessUpload(e, "id"), disabled: isReadOnly || isAnyUploading, className: "hidden" }), /* @__PURE__ */ import_react65.default.createElement("input", { type: "file", accept: "image/jpeg, image/png, image/webp, application/pdf", ref: passportRef, onChange: (e) => handleBusinessUpload(e, "passport"), disabled: isReadOnly || isAnyUploading, className: "hidden" }), /* @__PURE__ */ import_react65.default.createElement("input", { type: "file", accept: "image/jpeg, image/png, image/webp, application/pdf", ref: signatureRef, onChange: (e) => handleBusinessUpload(e, "signature"), disabled: isReadOnly || isAnyUploading, className: "hidden" }), /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col gap-4" }, /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center gap-2 text-black" }, /* @__PURE__ */ import_react65.default.createElement("h3", { className: "text-sm " }, "Upload Means of Identification")), /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-xs text-neutral-500 -mt-2" }, "Upload your NIN, Driver's License, Voter's Card, or Int'l Passport (JPG/PNG/WEBP)."), !formState.idApproved ? /* @__PURE__ */ import_react65.default.createElement(import_react65.default.Fragment, null, /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => !isReadOnly && !isAnyUploading && idRef.current?.click(), disabled: isReadOnly || isAnyUploading, className: `w-full h-32 border border-neutral-100 rounded-2xl flex flex-col items-center justify-center gap-2 transition-colors outline-none ${isAnyUploading ? "opacity-50 cursor-not-allowed bg-neutral-50 text-neutral-400" : "hover:bg-neutral-50 text-black"}` }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.Upload01Icon, size: 24, className: "text-neutral-400" }), /* @__PURE__ */ import_react65.default.createElement("span", { className: "text-xs" }, "Select ID Image to Upload")), globalExtractingId && /* @__PURE__ */ import_react65.default.createElement("div", { className: " mt-2" }, /* @__PURE__ */ import_react65.default.createElement(AiStageCheck, { tasks: aiTasks })), formData.idExtractedData && /* @__PURE__ */ import_react65.default.createElement("div", { className: " mt-2 animate-in fade-in border border-purple-100 bg-linear-to-bl from-purple-50/80 via-white to-white p-5 rounded-2xl flex flex-col gap-4 relative overflow-hidden" }, /* @__PURE__ */ import_react65.default.createElement("div", null, /* @__PURE__ */ import_react65.default.createElement("span", { className: "text-[10px] tracking-widest text-purple-600 block mb-2" }, "Review AI Extracted Data"), /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-xs text-neutral-500 mb-4" }, "Please verify the extracted information and correct any OCR mistakes before approving."), /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col gap-4" }, /* @__PURE__ */ import_react65.default.createElement(TextInput, { label: "Full Name on ID", value: formData.idExtractedData.fullName, onChange: (v) => setFormData((f) => ({ ...f, idExtractedData: { ...f.idExtractedData, fullName: v } })), disabled: isReadOnly || isAnyUploading }), /* @__PURE__ */ import_react65.default.createElement("div", { className: "grid grid-cols-2 gap-4" }, /* @__PURE__ */ import_react65.default.createElement(TextInput, { label: "ID Number", value: formData.idExtractedData.idNumber, onChange: (v) => setFormData((f) => ({ ...f, idExtractedData: { ...f.idExtractedData, idNumber: v } })), disabled: isReadOnly || isAnyUploading }), /* @__PURE__ */ import_react65.default.createElement(TextInput, { label: "Date of Birth (YYYY-MM-DD)", value: formData.idExtractedData.dob, onChange: (v) => setFormData((f) => ({ ...f, idExtractedData: { ...f.idExtractedData, dob: v } })), disabled: isReadOnly || isAnyUploading })))), /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center gap-2 mt-2" }, /* @__PURE__ */ import_react65.default.createElement(ThreeDActionButton, { onClick: () => approveSection("idApproved"), disabled: isAnyUploading || isReadOnly, className: "w-fit shrink-0" }, "Approve Data"), !isReadOnly && /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => deleteBusinessDocument("id"), disabled: isAnyUploading, className: "px-6 py-2 bg-white border border-neutral-100 text-neutral-500 text-[11px] rounded-full tracking-widest hover:bg-neutral-50 transition-colors outline-none disabled:opacity-50 disabled:cursor-not-allowed" }, "Delete & Re-upload")))) : /* @__PURE__ */ import_react65.default.createElement("div", { className: " flex items-center justify-between bg-emerald-50 p-6 rounded-full" }, /* @__PURE__ */ import_react65.default.createElement("div", null, /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-sm text-emerald-800" }, "ID Document Verified"), /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-xs text-emerald-600 mt-1" }, "Data safely extracted and stored.")), !isReadOnly && /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => editSection("idApproved"), className: "p-2 text-emerald-700 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.PencilEdit01Icon, size: 16 })))), /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col gap-4 pt-6 animate-in slide-in-from-top-4 duration-500" }, /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col gap-3 " }, !formState.passportApproved && !globalUploadingPassport ? /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => !isReadOnly && !isAnyUploading && passportRef.current?.click(), disabled: isReadOnly || isAnyUploading, className: `flex items-center gap-3 p-4 border border-neutral-100 rounded-full transition-colors text-sm w-full outline-none ${isAnyUploading ? "opacity-50 cursor-not-allowed bg-neutral-50 text-neutral-400" : "text-black hover:bg-neutral-50"}` }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.Upload01Icon, size: 18, className: "text-neutral-400" }), " Upload Passport Photo") : globalUploadingPassport && !formData.passportFileUrl ? /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center gap-3 p-4 border border-neutral-100 rounded-full bg-neutral-50 text-neutral-500 text-sm w-full" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.Loading03Icon, size: 18, className: "animate-spin text-black" }), " Uploading Passport...") : /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center justify-between p-4 bg-emerald-50 rounded-full text-emerald-800 text-sm w-full" }, /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.IdentificationIcon, size: 18 }), " Passport Uploaded"), !isReadOnly && /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => deleteBusinessDocument("passport"), disabled: isAnyUploading, className: "text-emerald-700 hover:text-red-500 transition-colors p-1 outline-none shrink-0 disabled:opacity-50 disabled:cursor-not-allowed" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.Delete02Icon, size: 16 }))), !formState.signatureApproved && !globalUploadingSignature ? /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => !isReadOnly && !isAnyUploading && signatureRef.current?.click(), disabled: isReadOnly || isAnyUploading, className: `flex items-center gap-3 p-4 border border-neutral-100 rounded-full transition-colors text-sm w-full outline-none ${isAnyUploading ? "opacity-50 cursor-not-allowed bg-neutral-50 text-neutral-400" : "text-black hover:bg-neutral-50"}` }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.Upload01Icon, size: 18, className: "text-neutral-400" }), " Upload Signature") : globalUploadingSignature && !formData.signatureFileUrl ? /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center gap-3 p-4 border border-neutral-100 rounded-full bg-neutral-50 text-neutral-500 text-sm w-full" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.Loading03Icon, size: 18, className: "animate-spin text-black" }), " Uploading Signature...") : /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center justify-between p-4 bg-emerald-50 rounded-full text-emerald-800 text-sm w-full" }, /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.SignatureIcon, size: 18 }), " Signature Uploaded"), !isReadOnly && /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => deleteBusinessDocument("signature"), disabled: isAnyUploading, className: "text-emerald-700 hover:text-red-500 transition-colors p-1 outline-none shrink-0 disabled:opacity-50 disabled:cursor-not-allowed" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.Delete02Icon, size: 16 })))))), /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col gap-4 pt-6 border-t border-neutral-100 animate-in slide-in-from-top-4 duration-500" }, /* @__PURE__ */ import_react65.default.createElement("input", { type: "file", accept: "image/jpeg, image/png, image/webp, application/pdf", ref: other1Ref, onChange: (e) => handleOptionalUpload(e, "other1"), disabled: isAnyUploading || isReadOnly, className: "hidden" }), /* @__PURE__ */ import_react65.default.createElement("input", { type: "file", accept: "image/jpeg, image/png, image/webp, application/pdf", ref: other2Ref, onChange: (e) => handleOptionalUpload(e, "other2"), disabled: isAnyUploading || isReadOnly, className: "hidden" }), /* @__PURE__ */ import_react65.default.createElement("input", { type: "file", accept: "image/jpeg, image/png, image/webp, application/pdf", ref: other3Ref, onChange: (e) => handleOptionalUpload(e, "other3"), disabled: isAnyUploading || isReadOnly, className: "hidden" }), /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col gap-1 mb-2" }, /* @__PURE__ */ import_react65.default.createElement("h3", { className: "text-sm text-black" }, "Additional Documents (Optional)"), /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-xs text-neutral-500 leading-relaxed" }, "If your ", type === "company" ? "company" : "business", " involves regulated professional services, please upload relevant licenses, certificates, or permits here (up to 3 documents).")), /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col gap-3" }, [1, 2, 3].map((num) => {
3529
+ }, disabled: isReadOnly || isSubmitting })))), /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center justify-between mt-2" }, !isReadOnly && /* @__PURE__ */ import_react65.default.createElement("button", { onClick: addCompanyMember, className: "px-6 py-2 bg-white border border-neutral-100 text-black text-[11px] tracking-widest rounded-full hover:bg-neutral-50 transition-colors outline-none" }, "+ Add Member"), /* @__PURE__ */ import_react65.default.createElement(ThreeDActionButton, { onClick: () => approveSection("membersDetailsApproved"), disabled: !areCompanyMembersValid() || isReadOnly, className: "w-fit" }, "Confirm Members"))) : /* @__PURE__ */ import_react65.default.createElement("div", { className: " flex items-center justify-between" }, /* @__PURE__ */ import_react65.default.createElement("div", null, /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-sm text-black" }, formData.members.length, " Member(s) Registered"), /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-xs text-neutral-500 mt-1" }, "Total Shares: 100% Verified.")), !isReadOnly && /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => editSection("membersDetailsApproved"), className: "p-2 text-neutral-400 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.PencilEdit01Icon, size: 16 })))), formState.addressApproved && type === "business" && /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col gap-4 pt-6 animate-in slide-in-from-top-4 duration-500" }, /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center gap-2 text-black" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.UserIcon, size: 18 }), /* @__PURE__ */ import_react65.default.createElement("h3", { className: "text-sm " }, "Who owns the business?")), /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-xs text-neutral-500 -mt-2" }, "Provide basic contact info. We will extract your DOB and ID number automatically in the next step."), !formState.ownerApproved ? /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col gap-4 " }, /* @__PURE__ */ import_react65.default.createElement(TextInput, { label: "Full Name", value: formData.ownerName, onChange: (v) => setFormData({ ...formData, ownerName: v }), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ import_react65.default.createElement("div", { className: "grid grid-cols-2 gap-4" }, /* @__PURE__ */ import_react65.default.createElement(NumberInput, { label: "Phone Number", value: formData.ownerPhone, onChange: (v) => setFormData({ ...formData, ownerPhone: v }), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ import_react65.default.createElement(TextInput, { label: "Email Address", value: formData.ownerEmail, onChange: (v) => setFormData({ ...formData, ownerEmail: v }), disabled: isReadOnly || isSubmitting })), /* @__PURE__ */ import_react65.default.createElement(ThreeDActionButton, { onClick: () => approveSection("ownerApproved"), disabled: !formData.ownerName || !formData.ownerPhone || !formData.ownerEmail || isReadOnly, className: "w-fit mt-2" }, "Confirm Owner Details")) : /* @__PURE__ */ import_react65.default.createElement("div", { className: " flex items-center justify-between" }, /* @__PURE__ */ import_react65.default.createElement("div", null, /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-sm text-black" }, formData.ownerName), /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-xs text-neutral-500 mt-1" }, formData.ownerEmail, " \u2022 ", formData.ownerPhone)), !isReadOnly && /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => editSection("ownerApproved"), className: "p-2 text-neutral-400 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.PencilEdit01Icon, size: 16 })))), /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center justify-between mt-8 pt-6 " }, /* @__PURE__ */ import_react65.default.createElement("button", { onClick: handleBack, className: "flex items-center gap-2 px-6 py-2 text-[11px] tracking-widest text-neutral-500 hover:text-black hover:bg-neutral-50 rounded-full transition-colors outline-none" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.Cancel01Icon, size: 14 }), " Close"), /* @__PURE__ */ import_react65.default.createElement(ThreeDActionButton, { onClick: handleNext, disabled: !isStep0Valid, className: "w-fit shrink-0" }, "Next Step"))), macroStep === 1 && /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col gap-8 animate-in fade-in" }, type === "company" ? /* @__PURE__ */ import_react65.default.createElement(import_react65.default.Fragment, null, /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col gap-2" }, /* @__PURE__ */ import_react65.default.createElement("h3", { className: "text-sm text-black" }, "Member Identity Documents"), /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-xs text-neutral-500 leading-relaxed" }, "Upload valid means of identification, passport photographs, and signatures for every director and shareholder.")), !formState.membersDocsApproved ? /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col gap-6" }, formData.members.map((member, i) => /* @__PURE__ */ import_react65.default.createElement("div", { key: member.id, className: "flex flex-col gap-4" }, /* @__PURE__ */ import_react65.default.createElement("span", { className: "text-[11px] tracking-widest text-black mb-1" }, member.fullName || `Member ${i + 1}`, " ", /* @__PURE__ */ import_react65.default.createElement("span", { className: "text-neutral-400 ml-2" }, "(", member.role, ")")), /* @__PURE__ */ import_react65.default.createElement("input", { id: `id-upload-${i}`, type: "file", accept: "image/jpeg, image/png, image/webp, application/pdf", className: "hidden", onChange: (e) => handleCompanyMemberUpload(e, i, "id"), disabled: isReadOnly || isAnyUploading }), /* @__PURE__ */ import_react65.default.createElement("input", { id: `pass-upload-${i}`, type: "file", accept: "image/jpeg, image/png, image/webp, application/pdf", className: "hidden", onChange: (e) => handleCompanyMemberUpload(e, i, "passport"), disabled: isReadOnly || isAnyUploading }), /* @__PURE__ */ import_react65.default.createElement("input", { id: `sig-upload-${i}`, type: "file", accept: "image/jpeg, image/png, image/webp, application/pdf", className: "hidden", onChange: (e) => handleCompanyMemberUpload(e, i, "signature"), disabled: isReadOnly || isAnyUploading }), !member.idExtractedData && !globalExtractingId ? /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => !isReadOnly && !isAnyUploading && document.getElementById(`id-upload-${i}`)?.click(), className: `flex items-center gap-3 p-4 border border-neutral-100 rounded-full transition-colors text-sm w-full outline-none ${isAnyUploading ? "opacity-50 cursor-not-allowed bg-neutral-50 text-neutral-400" : "text-black hover:bg-neutral-50"}`, disabled: isReadOnly || isAnyUploading }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.Upload01Icon, size: 18, className: "text-neutral-400" }), " Upload Valid ID (NIN, License, Voter's Card)") : globalExtractingId && !member.idExtractedData ? /* @__PURE__ */ import_react65.default.createElement("div", { className: " mt-2" }, /* @__PURE__ */ import_react65.default.createElement(AiStageCheck, { tasks: aiTasks })) : member.idExtractedData ? /* @__PURE__ */ import_react65.default.createElement("div", { className: " mt-2 animate-in fade-in border border-purple-100 bg-linear-to-bl from-purple-50/80 via-white to-white p-5 rounded-xl flex flex-col gap-4 relative overflow-hidden" }, /* @__PURE__ */ import_react65.default.createElement("div", null, /* @__PURE__ */ import_react65.default.createElement("span", { className: "text-[10px] tracking-widest text-purple-600 block mb-2" }, "Review Extracted ID"), /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col gap-4" }, /* @__PURE__ */ import_react65.default.createElement(TextInput, { label: "Full Name on ID", value: member.idExtractedData.fullName, onChange: (v) => updateCompanyMemberInfo(i, "idExtractedData", { ...member.idExtractedData, fullName: v }), disabled: isReadOnly || isAnyUploading }), /* @__PURE__ */ import_react65.default.createElement("div", { className: "grid grid-cols-2 gap-4" }, /* @__PURE__ */ import_react65.default.createElement(TextInput, { label: "ID Number", value: member.idExtractedData.idNumber, onChange: (v) => updateCompanyMemberInfo(i, "idExtractedData", { ...member.idExtractedData, idNumber: v }), disabled: isReadOnly || isAnyUploading }), /* @__PURE__ */ import_react65.default.createElement(TextInput, { label: "Date of Birth", value: member.idExtractedData.dob, onChange: (v) => updateCompanyMemberInfo(i, "idExtractedData", { ...member.idExtractedData, dob: v }), disabled: isReadOnly || isAnyUploading })))), /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center gap-2 mt-2" }, !isReadOnly && /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => deleteCompanyMemberDocument(i, "id"), disabled: isAnyUploading, className: "px-6 py-2 bg-white border border-neutral-100 text-neutral-500 text-[11px] rounded-full tracking-widest hover:bg-neutral-50 transition-colors outline-none disabled:opacity-50 disabled:cursor-not-allowed" }, "Delete & Re-upload ID"))) : null, !member.passportFileUrl && !globalUploadingPassport ? /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => !isReadOnly && !isAnyUploading && document.getElementById(`pass-upload-${i}`)?.click(), className: `flex items-center gap-3 p-4 border border-neutral-100 rounded-full transition-colors text-sm w-full outline-none ${isAnyUploading ? "opacity-50 cursor-not-allowed bg-neutral-50 text-neutral-400" : "text-black hover:bg-neutral-50"}`, disabled: isReadOnly || isAnyUploading }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.Upload01Icon, size: 18, className: "text-neutral-400" }), " Upload Passport Photo") : globalUploadingPassport && !member.passportFileUrl ? /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center gap-3 p-4 border border-neutral-100 rounded-full bg-neutral-50 text-neutral-500 text-sm w-full" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.Loading03Icon, size: 18, className: "animate-spin text-black" }), " Uploading Passport...") : member.passportFileUrl ? /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center justify-between p-4 bg-emerald-50 rounded-full text-emerald-800 text-sm w-full" }, /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.IdentificationIcon, size: 18 }), " Passport Uploaded"), !isReadOnly && /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => deleteCompanyMemberDocument(i, "passport"), disabled: isAnyUploading, className: "text-emerald-700 hover:text-red-500 transition-colors p-1 outline-none shrink-0 disabled:opacity-50 disabled:cursor-not-allowed" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.Delete02Icon, size: 16 }))) : null, !member.signatureFileUrl && !globalUploadingSignature ? /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => !isReadOnly && !isAnyUploading && document.getElementById(`sig-upload-${i}`)?.click(), className: `flex items-center gap-3 p-4 border border-neutral-100 rounded-full transition-colors text-sm w-full outline-none ${isAnyUploading ? "opacity-50 cursor-not-allowed bg-neutral-50 text-neutral-400" : "text-black hover:bg-neutral-50"}`, disabled: isReadOnly || isAnyUploading }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.Upload01Icon, size: 18, className: "text-neutral-400" }), " Upload Signature") : globalUploadingSignature && !member.signatureFileUrl ? /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center gap-3 p-4 border border-neutral-100 rounded-full bg-neutral-50 text-neutral-500 text-sm w-full" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.Loading03Icon, size: 18, className: "animate-spin text-black" }), " Uploading Signature...") : member.signatureFileUrl ? /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center justify-between p-4 bg-emerald-50 rounded-full text-emerald-800 text-sm w-full" }, /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.SignatureIcon, size: 18 }), " Signature Uploaded"), !isReadOnly && /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => deleteCompanyMemberDocument(i, "signature"), disabled: isAnyUploading, className: "text-emerald-700 hover:text-red-500 transition-colors p-1 outline-none shrink-0 disabled:opacity-50 disabled:cursor-not-allowed" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.Delete02Icon, size: 16 }))) : null)), /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex justify-end" }, /* @__PURE__ */ import_react65.default.createElement(ThreeDActionButton, { onClick: () => approveSection("membersDocsApproved"), disabled: !areCompanyMemberDocsValid() || isReadOnly || isAnyUploading, className: "w-fit" }, "Confirm All Documents"))) : /* @__PURE__ */ import_react65.default.createElement("div", { className: " flex items-center justify-between bg-emerald-50 p-6 rounded-2xl" }, /* @__PURE__ */ import_react65.default.createElement("div", null, /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-sm text-emerald-800" }, "All Member Documents Verified"), /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-xs text-emerald-600 mt-1" }, "Data safely extracted and ready for submission.")), !isReadOnly && /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => editSection("membersDocsApproved"), className: "p-2 text-emerald-700 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.PencilEdit01Icon, size: 16 })))) : /* @__PURE__ */ import_react65.default.createElement(import_react65.default.Fragment, null, /* @__PURE__ */ import_react65.default.createElement("input", { type: "file", accept: "image/jpeg, image/png, image/webp, application/pdf", ref: idRef, onChange: (e) => handleBusinessUpload(e, "id"), disabled: isReadOnly || isAnyUploading, className: "hidden" }), /* @__PURE__ */ import_react65.default.createElement("input", { type: "file", accept: "image/jpeg, image/png, image/webp, application/pdf", ref: passportRef, onChange: (e) => handleBusinessUpload(e, "passport"), disabled: isReadOnly || isAnyUploading, className: "hidden" }), /* @__PURE__ */ import_react65.default.createElement("input", { type: "file", accept: "image/jpeg, image/png, image/webp, application/pdf", ref: signatureRef, onChange: (e) => handleBusinessUpload(e, "signature"), disabled: isReadOnly || isAnyUploading, className: "hidden" }), /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col gap-4" }, /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center gap-2 text-black" }, /* @__PURE__ */ import_react65.default.createElement("h3", { className: "text-sm " }, "Upload Means of Identification")), /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-xs text-neutral-500 -mt-2" }, "Upload your NIN, Driver's License, Voter's Card, or Int'l Passport (JPG/PNG/WEBP)."), !formState.idApproved ? /* @__PURE__ */ import_react65.default.createElement(import_react65.default.Fragment, null, /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => !isReadOnly && !isAnyUploading && idRef.current?.click(), disabled: isReadOnly || isAnyUploading, className: `w-full h-32 border border-neutral-100 rounded-2xl flex flex-col items-center justify-center gap-2 transition-colors outline-none ${isAnyUploading ? "opacity-50 cursor-not-allowed bg-neutral-50 text-neutral-400" : "hover:bg-neutral-50 text-black"}` }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.Upload01Icon, size: 24, className: "text-neutral-400" }), /* @__PURE__ */ import_react65.default.createElement("span", { className: "text-xs" }, "Select ID Image to Upload")), globalExtractingId && /* @__PURE__ */ import_react65.default.createElement("div", { className: " mt-2" }, /* @__PURE__ */ import_react65.default.createElement(AiStageCheck, { tasks: aiTasks })), formData.idExtractedData && /* @__PURE__ */ import_react65.default.createElement("div", { className: " mt-2 animate-in fade-in border border-purple-100 bg-linear-to-bl from-purple-50/80 via-white to-white p-5 rounded-2xl flex flex-col gap-4 relative overflow-hidden" }, /* @__PURE__ */ import_react65.default.createElement("div", null, /* @__PURE__ */ import_react65.default.createElement("span", { className: "text-[10px] tracking-widest text-purple-600 block mb-2" }, "Review AI Extracted Data"), /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-xs text-neutral-500 mb-4" }, "Please verify the extracted information and correct any OCR mistakes before approving."), /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col gap-4" }, /* @__PURE__ */ import_react65.default.createElement(TextInput, { label: "Full Name on ID", value: formData.idExtractedData.fullName, onChange: (v) => setFormData((f) => ({ ...f, idExtractedData: { ...f.idExtractedData, fullName: v } })), disabled: isReadOnly || isAnyUploading }), /* @__PURE__ */ import_react65.default.createElement("div", { className: "grid grid-cols-2 gap-4" }, /* @__PURE__ */ import_react65.default.createElement(TextInput, { label: "ID Number", value: formData.idExtractedData.idNumber, onChange: (v) => setFormData((f) => ({ ...f, idExtractedData: { ...f.idExtractedData, idNumber: v } })), disabled: isReadOnly || isAnyUploading }), /* @__PURE__ */ import_react65.default.createElement(TextInput, { label: "Date of Birth (YYYY-MM-DD)", value: formData.idExtractedData.dob, onChange: (v) => setFormData((f) => ({ ...f, idExtractedData: { ...f.idExtractedData, dob: v } })), disabled: isReadOnly || isAnyUploading })))), /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center gap-2 mt-2" }, /* @__PURE__ */ import_react65.default.createElement(ThreeDActionButton, { onClick: () => approveSection("idApproved"), disabled: isAnyUploading || isReadOnly, className: "w-fit shrink-0" }, "Approve Data"), !isReadOnly && /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => deleteBusinessDocument("id"), disabled: isAnyUploading, className: "px-6 py-2 bg-white border border-neutral-100 text-neutral-500 text-[11px] rounded-full tracking-widest hover:bg-neutral-50 transition-colors outline-none disabled:opacity-50 disabled:cursor-not-allowed" }, "Delete & Re-upload")))) : /* @__PURE__ */ import_react65.default.createElement("div", { className: " flex items-center justify-between bg-emerald-50 p-6 rounded-full" }, /* @__PURE__ */ import_react65.default.createElement("div", null, /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-sm text-emerald-800" }, "ID Document Verified"), /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-xs text-emerald-600 mt-1" }, "Data safely extracted and stored.")), !isReadOnly && /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => editSection("idApproved"), className: "p-2 text-emerald-700 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.PencilEdit01Icon, size: 16 })))), /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col gap-4 pt-6 animate-in slide-in-from-top-4 duration-500" }, /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col gap-3 " }, !formState.passportApproved && !globalUploadingPassport ? /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => !isReadOnly && !isAnyUploading && passportRef.current?.click(), disabled: isReadOnly || isAnyUploading, className: `flex items-center gap-3 p-4 border border-neutral-100 rounded-full transition-colors text-sm w-full outline-none ${isAnyUploading ? "opacity-50 cursor-not-allowed bg-neutral-50 text-neutral-400" : "text-black hover:bg-neutral-50"}` }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.Upload01Icon, size: 18, className: "text-neutral-400" }), " Upload Passport Photo") : globalUploadingPassport && !formData.passportFileUrl ? /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center gap-3 p-4 border border-neutral-100 rounded-full bg-neutral-50 text-neutral-500 text-sm w-full" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.Loading03Icon, size: 18, className: "animate-spin text-black" }), " Uploading Passport...") : /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center justify-between p-4 bg-emerald-50 rounded-full text-emerald-800 text-sm w-full" }, /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.IdentificationIcon, size: 18 }), " Passport Uploaded"), !isReadOnly && /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => deleteBusinessDocument("passport"), disabled: isAnyUploading, className: "text-emerald-700 hover:text-red-500 transition-colors p-1 outline-none shrink-0 disabled:opacity-50 disabled:cursor-not-allowed" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.Delete02Icon, size: 16 }))), !formState.signatureApproved && !globalUploadingSignature ? /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => !isReadOnly && !isAnyUploading && signatureRef.current?.click(), disabled: isReadOnly || isAnyUploading, className: `flex items-center gap-3 p-4 border border-neutral-100 rounded-full transition-colors text-sm w-full outline-none ${isAnyUploading ? "opacity-50 cursor-not-allowed bg-neutral-50 text-neutral-400" : "text-black hover:bg-neutral-50"}` }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.Upload01Icon, size: 18, className: "text-neutral-400" }), " Upload Signature") : globalUploadingSignature && !formData.signatureFileUrl ? /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center gap-3 p-4 border border-neutral-100 rounded-full bg-neutral-50 text-neutral-500 text-sm w-full" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.Loading03Icon, size: 18, className: "animate-spin text-black" }), " Uploading Signature...") : /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center justify-between p-4 bg-emerald-50 rounded-full text-emerald-800 text-sm w-full" }, /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.SignatureIcon, size: 18 }), " Signature Uploaded"), !isReadOnly && /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => deleteBusinessDocument("signature"), disabled: isAnyUploading, className: "text-emerald-700 hover:text-red-500 transition-colors p-1 outline-none shrink-0 disabled:opacity-50 disabled:cursor-not-allowed" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.Delete02Icon, size: 16 })))))), /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col gap-4 pt-6 border-t border-neutral-100 animate-in slide-in-from-top-4 duration-500" }, /* @__PURE__ */ import_react65.default.createElement("input", { type: "file", accept: "image/jpeg, image/png, image/webp, application/pdf", ref: other1Ref, onChange: (e) => handleOptionalUpload(e, "other1"), disabled: isAnyUploading || isReadOnly, className: "hidden" }), /* @__PURE__ */ import_react65.default.createElement("input", { type: "file", accept: "image/jpeg, image/png, image/webp, application/pdf", ref: other2Ref, onChange: (e) => handleOptionalUpload(e, "other2"), disabled: isAnyUploading || isReadOnly, className: "hidden" }), /* @__PURE__ */ import_react65.default.createElement("input", { type: "file", accept: "image/jpeg, image/png, image/webp, application/pdf", ref: other3Ref, onChange: (e) => handleOptionalUpload(e, "other3"), disabled: isAnyUploading || isReadOnly, className: "hidden" }), /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col gap-1 mb-2" }, /* @__PURE__ */ import_react65.default.createElement("h3", { className: "text-sm text-black" }, "Additional Documents (Optional)"), /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-xs text-neutral-500 leading-relaxed" }, "If your ", type === "company" ? "company" : "business", " involves regulated professional services, please upload relevant licenses, certificates, or permits here (up to 3 documents).")), /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col gap-3" }, [1, 2, 3].map((num) => {
3530
3530
  const docType = `other${num}`;
3531
3531
  const ref = num === 1 ? other1Ref : num === 2 ? other2Ref : other3Ref;
3532
3532
  const isUploading = num === 1 ? isUploadingOther1 : num === 2 ? isUploadingOther2 : isUploadingOther3;
package/dist/index.mjs CHANGED
@@ -1432,7 +1432,7 @@ var GifFeatureCard = ({
1432
1432
  import React25, { useState as useState9, useEffect as useEffect6 } from "react";
1433
1433
  import Link9 from "next/link";
1434
1434
  import { HugeiconsIcon as HugeiconsIcon13 } from "@hugeicons/react";
1435
- import { SidebarLeft01Icon, Cancel01Icon } from "@hugeicons/core-free-icons";
1435
+ import { SidebarLeft01Icon, CancelCircleIcon } from "@hugeicons/core-free-icons";
1436
1436
  var UniversalSidebar = ({
1437
1437
  navItems,
1438
1438
  currentPath,
@@ -1461,9 +1461,9 @@ var UniversalSidebar = ({
1461
1461
  "aside",
1462
1462
  {
1463
1463
  className: `
1464
- fixed md:relative m-4 rounded-4xl top-0 left-0 h-full bg-white
1464
+ fixed md:relative rounded-4xl top-4 md:top-0 md:my-4 left-4 md:left-0 md:ml-4 h-[calc(100dvh-2rem)] bg-white
1465
1465
  transition-all duration-300 ease-in-out shrink-0 flex flex-col z-100 md:z-10
1466
- ${isMobileOpen ? "translate-x-0" : "-translate-x-full md:translate-x-0"}
1466
+ ${isMobileOpen ? "translate-x-0" : "translate-x-[-120%] md:translate-x-0"}
1467
1467
  ${isCollapsed ? "md:w-16 w-64" : "w-64"}
1468
1468
  `
1469
1469
  },
@@ -1474,7 +1474,7 @@ var UniversalSidebar = ({
1474
1474
  className: "text-neutral-400 hover:text-black transition-colors outline-none",
1475
1475
  "aria-label": "Close Menu"
1476
1476
  },
1477
- /* @__PURE__ */ React25.createElement(HugeiconsIcon13, { icon: Cancel01Icon, size: 24 })
1477
+ /* @__PURE__ */ React25.createElement(HugeiconsIcon13, { icon: CancelCircleIcon, size: 27 })
1478
1478
  )),
1479
1479
  /* @__PURE__ */ React25.createElement("nav", { className: "flex-1 py-6 flex flex-col gap-1.5 px-3 overflow-y-auto custom-scrollbar" }, navItems.map((item) => {
1480
1480
  const isCurrentRoute = item.path === "/mod" || item.path === "/app" ? currentPath === item.path : currentPath === item.path || currentPath?.startsWith(`${item.path}/`);
@@ -1569,7 +1569,7 @@ var UniversalHeader = ({
1569
1569
  setShowLogoutDialog(false);
1570
1570
  }
1571
1571
  };
1572
- return /* @__PURE__ */ React26.createElement("div", { className: "w-full shrink-0 z-50 flex flex-col relative pointer-events-none" }, /* @__PURE__ */ React26.createElement("div", { className: "w-full pointer-events-auto relative z-20" }, /* @__PURE__ */ React26.createElement("header", { className: "w-full pt-3 pb-3" }, /* @__PURE__ */ React26.createElement("div", { className: "max-w-7xl mx-auto px-6 flex justify-between items-center" }, /* @__PURE__ */ React26.createElement("div", { className: "flex items-center gap-4" }, /* @__PURE__ */ React26.createElement(
1572
+ return /* @__PURE__ */ React26.createElement("div", { className: "w-full shrink-0 z-50 flex flex-col relative pointer-events-none" }, /* @__PURE__ */ React26.createElement("div", { className: "w-full pointer-events-auto relative z-20" }, /* @__PURE__ */ React26.createElement("header", { className: "w-full pt-6 pb-3" }, /* @__PURE__ */ React26.createElement("div", { className: "max-w-7xl mx-auto px-6 flex justify-between items-center" }, /* @__PURE__ */ React26.createElement("div", { className: "flex items-center gap-4" }, /* @__PURE__ */ React26.createElement(
1573
1573
  "button",
1574
1574
  {
1575
1575
  className: "md:hidden bg-white rounded-full w-8 h-8 text-neutral-500 hover:text-black transition-colors outline-none",
@@ -1584,7 +1584,7 @@ var UniversalHeader = ({
1584
1584
  className: "w-8 h-8 rounded-full bg-white flex items-center justify-center text-black transition-all group outline-none",
1585
1585
  "aria-label": "Switch Workspace"
1586
1586
  },
1587
- /* @__PURE__ */ React26.createElement(HugeiconsIcon14, { icon: UserIcon, size: 18, className: "transition-transform group-hover:-translate-x-0.5" })
1587
+ /* @__PURE__ */ React26.createElement(HugeiconsIcon14, { icon: UserIcon, size: 16, className: "transition-transform group-hover:-translate-x-0.5" })
1588
1588
  ), showLogoutAction && /* @__PURE__ */ React26.createElement(
1589
1589
  "button",
1590
1590
  {
@@ -1592,7 +1592,7 @@ var UniversalHeader = ({
1592
1592
  className: "w-8 h-8 rounded-full bg-white flex items-center justify-center text-black transition-all group outline-none",
1593
1593
  "aria-label": "Secure Logout"
1594
1594
  },
1595
- /* @__PURE__ */ React26.createElement(HugeiconsIcon14, { icon: LogoutCircle02Icon, size: 18, className: "transition-transform group-hover:-translate-x-0.5" })
1595
+ /* @__PURE__ */ React26.createElement(HugeiconsIcon14, { icon: LogoutCircle02Icon, size: 16, className: "transition-transform group-hover:-translate-x-0.5" })
1596
1596
  ), showBackButton && /* @__PURE__ */ React26.createElement(
1597
1597
  Link10,
1598
1598
  {
@@ -1618,7 +1618,7 @@ var UniversalHeader = ({
1618
1618
  className: "w-full text-left px-5 py-4 flex items-center justify-between hover:bg-neutral-50 transition-colors group outline-none last:border-0"
1619
1619
  },
1620
1620
  /* @__PURE__ */ React26.createElement("div", { className: "flex flex-col truncate pr-4" }, /* @__PURE__ */ React26.createElement("span", { className: `text-[13px] truncate ${activeWorkspaceId === org.id ? "text-black" : "text-neutral-600 group-hover:text-black"}` }, org.name), /* @__PURE__ */ React26.createElement("span", { className: "text-[9px] text-neutral-400 tracking-[0.2em] mt-1" }, "Role: ", org.role)),
1621
- activeWorkspaceId === org.id && /* @__PURE__ */ React26.createElement(HugeiconsIcon14, { icon: CheckmarkCircle01Icon, size: 18, className: "text-black shrink-0" })
1621
+ activeWorkspaceId === org.id && /* @__PURE__ */ React26.createElement(HugeiconsIcon14, { icon: CheckmarkCircle01Icon, size: 16, className: "text-black shrink-0" })
1622
1622
  ))), /* @__PURE__ */ React26.createElement("div", { className: "w-full flex mt-auto" }, /* @__PURE__ */ React26.createElement(
1623
1623
  "button",
1624
1624
  {
@@ -2500,7 +2500,7 @@ import {
2500
2500
  ArrowRight01Icon as ArrowRight01Icon5,
2501
2501
  Loading03Icon as Loading03Icon9,
2502
2502
  AttachmentIcon,
2503
- Cancel01Icon as Cancel01Icon2,
2503
+ Cancel01Icon,
2504
2504
  Upload01Icon,
2505
2505
  Download01Icon,
2506
2506
  ArrowDown01Icon as ArrowDown01Icon5,
@@ -2615,11 +2615,11 @@ var UniversalAgentConsole = ({
2615
2615
  return /* @__PURE__ */ React33.createElement("div", { className: "flex flex-col gap-8 animate-in fade-in duration-300 pb-10" }, /* @__PURE__ */ React33.createElement(ManagedToaster, null), currentView === "list" && /* @__PURE__ */ React33.createElement(React33.Fragment, null, /* @__PURE__ */ React33.createElement("div", { className: "flex flex-col items-start gap-1" }, /* @__PURE__ */ React33.createElement("h1", { className: " font-serif text-xl text-black tracking-tight" }, headerTitle), /* @__PURE__ */ React33.createElement("p", { className: "text-sm text-neutral-500" }, headerDescription)), stats.length > 0 && /* @__PURE__ */ React33.createElement("div", { className: "w-full rounded-2xl max-w-3xl overflow-hidden bg-white" }, /* @__PURE__ */ React33.createElement("div", { className: "grid grid-cols-1 md:grid-cols-3 divide-y md:divide-y-0 md:divide-x divide-neutral-100" }, stats.map((stat, idx) => /* @__PURE__ */ React33.createElement("div", { key: idx, className: "p-6 flex items-center gap-4 hover:bg-neutral-50/50 transition-colors min-w-0" }, /* @__PURE__ */ React33.createElement("div", { className: "w-12 h-12 rounded-full border border-neutral-100 bg-white flex items-center justify-center text-black shrink-0" }, stat.icon), /* @__PURE__ */ React33.createElement("div", { className: "min-w-0 flex-1" }, /* @__PURE__ */ React33.createElement("p", { className: "text-[10px] tracking-[0.2em] text-neutral-400 mb-1 truncate uppercase" }, stat.label), /* @__PURE__ */ React33.createElement("p", { className: "text-xl text-black tracking-tight truncate" }, stat.value)))))), tabs.length > 0 && /* @__PURE__ */ React33.createElement("div", { className: "flex items-center gap-6" }, tabs.map((tab) => /* @__PURE__ */ React33.createElement("button", { key: tab.id, onClick: () => onTabChange(tab.id), className: `pb-3 text-sm transition-colors outline-none ${activeTab === tab.id ? "text-black border-b border-black" : "text-neutral-400 hover:text-black"}` }, tab.label))), /* @__PURE__ */ React33.createElement("div", { className: "w-full bg-white rounded-2xl max-w-3xl overflow-hidden flex flex-col min-h-100" }, isLoadingList ? /* @__PURE__ */ React33.createElement("div", { className: "flex justify-center items-center py-12" }, /* @__PURE__ */ React33.createElement(HugeiconsIcon18, { icon: Loading03Icon9, size: 32, className: "animate-spin text-black" })) : listData.length === 0 ? /* @__PURE__ */ React33.createElement(React33.Fragment, null, /* @__PURE__ */ React33.createElement("div", { className: "flex-1 flex justify-center items-center text-neutral-500 text-sm py-20" }, "No matching applications found.")) : /* @__PURE__ */ React33.createElement(React33.Fragment, null, /* @__PURE__ */ React33.createElement("div", { className: "divide-y divide-neutral-100 flex-1" }, listData.map((item) => /* @__PURE__ */ React33.createElement("div", { key: item.id, onClick: () => onRowClick(item.id), className: "flex items-center justify-between p-5 hover:bg-neutral-50/50 transition-colors cursor-pointer group min-w-0" }, /* @__PURE__ */ React33.createElement("div", { className: "min-w-0 flex-1" }, /* @__PURE__ */ React33.createElement("p", { className: "text-sm text-black truncate pr-4" }, item.title), /* @__PURE__ */ React33.createElement("p", { className: "text-xs text-neutral-500 truncate mt-1" }, item.subtitle)), /* @__PURE__ */ React33.createElement("div", { className: "flex flex-col items-end gap-1 shrink-0 pl-4" }, /* @__PURE__ */ React33.createElement("span", { className: `text-[10px] tracking-widest px-3 py-1 rounded-full uppercase ${item.status === "COMPLETED" ? "bg-emerald-50 text-emerald-600" : "bg-neutral-50 text-neutral-600"}` }, item.status.replace(/_/g, " ")), /* @__PURE__ */ React33.createElement("span", { className: "text-[10px] text-neutral-400 mt-1" }, item.date))))), totalPages > 1 && /* @__PURE__ */ React33.createElement("div", { className: "flex items-center justify-between p-5 bg-neutral-50/50" }, /* @__PURE__ */ React33.createElement("span", { className: "text-[10px] text-neutral-400 tracking-[0.2em]" }, "Page ", currentPage, " of ", totalPages), /* @__PURE__ */ React33.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React33.createElement("button", { onClick: () => onPageChange(currentPage - 1), disabled: currentPage === 1, className: "p-2 border border-neutral-100 rounded-full bg-white text-neutral-500 hover:text-black outline-none disabled:opacity-30" }, /* @__PURE__ */ React33.createElement(HugeiconsIcon18, { icon: ArrowLeft01Icon5, size: 14 })), /* @__PURE__ */ React33.createElement("button", { onClick: () => onPageChange(currentPage + 1), disabled: currentPage >= totalPages, className: "p-2 border border-neutral-100 rounded-full bg-white text-neutral-500 hover:text-black outline-none disabled:opacity-30" }, /* @__PURE__ */ React33.createElement(HugeiconsIcon18, { icon: ArrowRight01Icon5, size: 14 }))))))), currentView === "details" && selectedApp && /* @__PURE__ */ React33.createElement("div", { className: "w-full bg-white rounded-2xl p-6 sm:p-10 animate-in fade-in duration-300 max-w-3xl flex flex-col" }, /* @__PURE__ */ React33.createElement("div", { className: "flex items-center justify-between gap-4 pb-6" }, /* @__PURE__ */ React33.createElement("button", { onClick: () => {
2616
2616
  onBackToList();
2617
2617
  setPendingFiles([]);
2618
- }, className: "flex items-center gap-2 text-[10px] text-neutral-400 hover:text-black tracking-widest transition-colors outline-none uppercase" }, /* @__PURE__ */ React33.createElement(HugeiconsIcon18, { icon: ArrowLeft01Icon5, size: 14 }), " Back to List"), /* @__PURE__ */ React33.createElement("span", { className: `text-[10px] tracking-widest px-4 py-1.5 rounded-full uppercase ${selectedApp.status === "COMPLETED" ? "bg-emerald-50 text-emerald-600" : "bg-neutral-50 text-neutral-600"}` }, selectedApp.status.replace(/_/g, " "))), /* @__PURE__ */ React33.createElement("div", { className: "flex flex-col gap-2 mb-8" }, /* @__PURE__ */ React33.createElement("h2", { className: " font-serif text-xl text-black tracking-tight" }, selectedApp.name || selectedApp.title), /* @__PURE__ */ React33.createElement("p", { className: "text-sm text-neutral-500" }, selectedApp.type ? selectedApp.type.replace(/_/g, " ").toLowerCase().replace(/\b\w/g, (c) => c.toUpperCase()) : selectedApp.subtitle)), selectedApp.agentId === currentAgentId && selectedApp.metadata && Object.keys(selectedApp.metadata).length > 0 ? /* @__PURE__ */ React33.createElement("div", { className: "flex flex-col gap-5" }, renderDynamicObject(selectedApp.metadata)) : selectedApp.agentId === currentAgentId ? /* @__PURE__ */ React33.createElement("div", { className: "flex flex-col gap-5" }, /* @__PURE__ */ React33.createElement("p", { className: "text-sm text-neutral-500" }, "No application data extracted.")) : null, selectedApp.agentId && /* @__PURE__ */ React33.createElement("div", { className: "flex flex-col gap-4 pt-8 mt-4 border-t border-neutral-100" }, /* @__PURE__ */ React33.createElement("div", { className: "flex flex-col gap-1 mb-4" }, /* @__PURE__ */ React33.createElement("h3", { className: " font-serif text-sm text-black" }, "Official Archives"), /* @__PURE__ */ React33.createElement("p", { className: "text-xs text-neutral-500 leading-relaxed" }, "Upload final certificates or documents. Once marked completed, the archive unlocks for the user.")), selectedApp.archives?.map((arch) => /* @__PURE__ */ React33.createElement("div", { key: arch.id, className: "flex items-center justify-between p-4 bg-emerald-50 rounded-full text-emerald-800 text-sm w-full" }, /* @__PURE__ */ React33.createElement("div", { className: "flex items-center gap-3 min-w-0" }, /* @__PURE__ */ React33.createElement(HugeiconsIcon18, { icon: File02Icon, size: 18, className: "shrink-0" }), /* @__PURE__ */ React33.createElement("span", { className: "truncate pr-2" }, arch.name)), /* @__PURE__ */ React33.createElement("button", { onClick: () => setArchiveToDelete(arch), className: "text-emerald-700 hover:text-red-500 transition-colors p-1 outline-none shrink-0" }, /* @__PURE__ */ React33.createElement(HugeiconsIcon18, { icon: Delete02Icon, size: 16 })))), pendingFiles.map((file, idx) => /* @__PURE__ */ React33.createElement("div", { key: idx, className: "flex items-center justify-between text-neutral-600 text-sm w-full" }, /* @__PURE__ */ React33.createElement("div", { className: "flex items-center gap-3 min-w-0" }, /* @__PURE__ */ React33.createElement(HugeiconsIcon18, { icon: AttachmentIcon, size: 18, className: "shrink-0" }), /* @__PURE__ */ React33.createElement("span", { className: "truncate pr-2" }, file.name)), /* @__PURE__ */ React33.createElement("button", { onClick: () => setPendingFiles((p) => p.filter((_, i) => i !== idx)), className: "text-neutral-400 hover:text-red-500 transition-colors p-1 outline-none shrink-0" }, /* @__PURE__ */ React33.createElement(HugeiconsIcon18, { icon: Cancel01Icon2, size: 16 })))), /* @__PURE__ */ React33.createElement("input", { type: "file", multiple: true, ref: archiveRef, onChange: handleFileSelect, className: "hidden", accept: "application/pdf,image/*" }), /* @__PURE__ */ React33.createElement("div", { className: "flex flex-col sm:flex-row items-center gap-3 w-full" }, /* @__PURE__ */ React33.createElement("button", { onClick: () => archiveRef.current?.click(), disabled: selectedApp.status !== "COMPLETED" || isUploading, className: "flex items-center justify-center gap-3 p-4 border border-neutral-100 rounded-full hover:bg-neutral-50 transition-colors text-black text-sm w-full outline-none disabled:opacity-50" }, /* @__PURE__ */ React33.createElement(HugeiconsIcon18, { icon: Upload01Icon, size: 18, className: "text-neutral-400" }), " Select Files to Upload"), pendingFiles.length > 0 && /* @__PURE__ */ React33.createElement("div", { className: "flex flex-col sm:flex-row items-center gap-3 w-full sm:w-auto shrink-0" }, /* @__PURE__ */ React33.createElement("button", { onClick: () => setPendingFiles([]), disabled: isUploading, className: "px-6 py-2 text-neutral-600 text-[11px] tracking-widest rounded-full hover:bg-neutral-200 outline-none w-full sm:w-auto uppercase" }, "Clear All"), /* @__PURE__ */ React33.createElement(ThreeDActionButton, { onClick: executeUpload, disabled: isUploading, isLoading: isUploading, className: "w-full sm:w-auto" }, "Upload ", pendingFiles.length, " File(s)")))), /* @__PURE__ */ React33.createElement("div", { className: "flex flex-col sm:flex-row items-center justify-between gap-4 mt-8 pt-6" }, !selectedApp.agentId ? /* @__PURE__ */ React33.createElement(ThreeDActionButton, { onClick: async () => {
2618
+ }, className: "flex items-center gap-2 text-[10px] text-neutral-400 hover:text-black tracking-widest transition-colors outline-none uppercase" }, /* @__PURE__ */ React33.createElement(HugeiconsIcon18, { icon: ArrowLeft01Icon5, size: 14 }), " Back to List"), /* @__PURE__ */ React33.createElement("span", { className: `text-[10px] tracking-widest px-4 py-1.5 rounded-full uppercase ${selectedApp.status === "COMPLETED" ? "bg-emerald-50 text-emerald-600" : "bg-neutral-50 text-neutral-600"}` }, selectedApp.status.replace(/_/g, " "))), /* @__PURE__ */ React33.createElement("div", { className: "flex flex-col gap-2 mb-8" }, /* @__PURE__ */ React33.createElement("h2", { className: " font-serif text-xl text-black tracking-tight" }, selectedApp.name || selectedApp.title), /* @__PURE__ */ React33.createElement("p", { className: "text-sm text-neutral-500" }, selectedApp.type ? selectedApp.type.replace(/_/g, " ").toLowerCase().replace(/\b\w/g, (c) => c.toUpperCase()) : selectedApp.subtitle)), selectedApp.agentId === currentAgentId && selectedApp.metadata && Object.keys(selectedApp.metadata).length > 0 ? /* @__PURE__ */ React33.createElement("div", { className: "flex flex-col gap-5" }, renderDynamicObject(selectedApp.metadata)) : selectedApp.agentId === currentAgentId ? /* @__PURE__ */ React33.createElement("div", { className: "flex flex-col gap-5" }, /* @__PURE__ */ React33.createElement("p", { className: "text-sm text-neutral-500" }, "No application data extracted.")) : null, selectedApp.agentId && /* @__PURE__ */ React33.createElement("div", { className: "flex flex-col gap-4 pt-8 mt-4 border-t border-neutral-100" }, /* @__PURE__ */ React33.createElement("div", { className: "flex flex-col gap-1 mb-4" }, /* @__PURE__ */ React33.createElement("h3", { className: " font-serif text-sm text-black" }, "Official Archives"), /* @__PURE__ */ React33.createElement("p", { className: "text-xs text-neutral-500 leading-relaxed" }, "Upload final certificates or documents. Once marked completed, the archive unlocks for the user.")), selectedApp.archives?.map((arch) => /* @__PURE__ */ React33.createElement("div", { key: arch.id, className: "flex items-center justify-between p-4 bg-emerald-50 rounded-full text-emerald-800 text-sm w-full" }, /* @__PURE__ */ React33.createElement("div", { className: "flex items-center gap-3 min-w-0" }, /* @__PURE__ */ React33.createElement(HugeiconsIcon18, { icon: File02Icon, size: 18, className: "shrink-0" }), /* @__PURE__ */ React33.createElement("span", { className: "truncate pr-2" }, arch.name)), /* @__PURE__ */ React33.createElement("button", { onClick: () => setArchiveToDelete(arch), className: "text-emerald-700 hover:text-red-500 transition-colors p-1 outline-none shrink-0" }, /* @__PURE__ */ React33.createElement(HugeiconsIcon18, { icon: Delete02Icon, size: 16 })))), pendingFiles.map((file, idx) => /* @__PURE__ */ React33.createElement("div", { key: idx, className: "flex items-center justify-between text-neutral-600 text-sm w-full" }, /* @__PURE__ */ React33.createElement("div", { className: "flex items-center gap-3 min-w-0" }, /* @__PURE__ */ React33.createElement(HugeiconsIcon18, { icon: AttachmentIcon, size: 18, className: "shrink-0" }), /* @__PURE__ */ React33.createElement("span", { className: "truncate pr-2" }, file.name)), /* @__PURE__ */ React33.createElement("button", { onClick: () => setPendingFiles((p) => p.filter((_, i) => i !== idx)), className: "text-neutral-400 hover:text-red-500 transition-colors p-1 outline-none shrink-0" }, /* @__PURE__ */ React33.createElement(HugeiconsIcon18, { icon: Cancel01Icon, size: 16 })))), /* @__PURE__ */ React33.createElement("input", { type: "file", multiple: true, ref: archiveRef, onChange: handleFileSelect, className: "hidden", accept: "application/pdf,image/*" }), /* @__PURE__ */ React33.createElement("div", { className: "flex flex-col sm:flex-row items-center gap-3 w-full" }, /* @__PURE__ */ React33.createElement("button", { onClick: () => archiveRef.current?.click(), disabled: selectedApp.status !== "COMPLETED" || isUploading, className: "flex items-center justify-center gap-3 p-4 border border-neutral-100 rounded-full hover:bg-neutral-50 transition-colors text-black text-sm w-full outline-none disabled:opacity-50" }, /* @__PURE__ */ React33.createElement(HugeiconsIcon18, { icon: Upload01Icon, size: 18, className: "text-neutral-400" }), " Select Files to Upload"), pendingFiles.length > 0 && /* @__PURE__ */ React33.createElement("div", { className: "flex flex-col sm:flex-row items-center gap-3 w-full sm:w-auto shrink-0" }, /* @__PURE__ */ React33.createElement("button", { onClick: () => setPendingFiles([]), disabled: isUploading, className: "px-6 py-2 text-neutral-600 text-[11px] tracking-widest rounded-full hover:bg-neutral-200 outline-none w-full sm:w-auto uppercase" }, "Clear All"), /* @__PURE__ */ React33.createElement(ThreeDActionButton, { onClick: executeUpload, disabled: isUploading, isLoading: isUploading, className: "w-full sm:w-auto" }, "Upload ", pendingFiles.length, " File(s)")))), /* @__PURE__ */ React33.createElement("div", { className: "flex flex-col sm:flex-row items-center justify-between gap-4 mt-8 pt-6" }, !selectedApp.agentId ? /* @__PURE__ */ React33.createElement(ThreeDActionButton, { onClick: async () => {
2619
2619
  setIsActioning(true);
2620
2620
  await onAcceptApplication(selectedApp.id);
2621
2621
  setIsActioning(false);
2622
- }, disabled: isActioning, isLoading: isActioning, className: "w-full sm:w-auto" }, "Accept Application") : selectedApp.agentId !== currentAgentId ? /* @__PURE__ */ React33.createElement("div", { className: "w-full p-4 border border-red-100 bg-red-50/30 rounded-xl flex items-start gap-3" }, /* @__PURE__ */ React33.createElement(HugeiconsIcon18, { icon: Cancel01Icon2, size: 16, className: "text-red-500 shrink-0 mt-0.5" }), /* @__PURE__ */ React33.createElement("div", null, /* @__PURE__ */ React33.createElement("p", { className: "text-sm text-red-700" }, "Application Taken"), /* @__PURE__ */ React33.createElement("p", { className: "text-xs text-red-600 mt-1" }, "Currently handled by ", selectedApp.agentName || "another agent", "."))) : /* @__PURE__ */ React33.createElement("div", { className: "w-full flex flex-col sm:flex-row items-center gap-4 justify-between" }, /* @__PURE__ */ React33.createElement("p", { className: "text-xs text-neutral-500" }, "You are the assigned agent."), /* @__PURE__ */ React33.createElement("div", { className: "flex flex-col sm:flex-row items-center justify-end gap-3 w-full sm:w-auto" }, /* @__PURE__ */ React33.createElement("button", { onClick: () => setActionModal("query"), disabled: selectedApp.status === "COMPLETED", className: "w-full sm:w-auto px-6 py-2 bg-white border border-neutral-100 text-neutral-600 text-[11px] tracking-widest rounded-full hover:bg-neutral-50 transition-colors outline-none disabled:opacity-30 uppercase" }, "Query"), /* @__PURE__ */ React33.createElement("button", { onClick: () => setActionModal("reject"), disabled: selectedApp.status === "COMPLETED", className: "w-full sm:w-auto px-6 py-2 bg-white border border-neutral-100 text-neutral-600 text-[11px] tracking-widest rounded-full hover:bg-neutral-50 transition-colors outline-none disabled:opacity-30 uppercase" }, "Reject"), /* @__PURE__ */ React33.createElement(ThreeDActionButton, { onClick: () => setActionModal("success"), disabled: selectedApp.status === "COMPLETED", className: "w-full sm:w-auto" }, "Mark Success"))))), actionModal && /* @__PURE__ */ React33.createElement("div", { className: "fixed inset-0 z-110 flex items-center justify-center p-4" }, /* @__PURE__ */ React33.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => !isActioning && setActionModal(null) }), /* @__PURE__ */ React33.createElement("div", { className: "relative w-full max-w-md bg-white rounded-3xl flex flex-col overflow-hidden animate-in zoom-in-95 duration-200 text-left" }, /* @__PURE__ */ React33.createElement("div", { className: "p-6" }, /* @__PURE__ */ React33.createElement("h3", { className: " font-serif text-lg text-black tracking-tight capitalize mb-2" }, actionModal === "success" ? "Complete Application" : `${actionModal} Application`), /* @__PURE__ */ React33.createElement("p", { className: "text-xs text-neutral-500" }, actionModal === "success" ? "Are you sure you want to mark this application as successfully completed?" : `Please provide a clear reason for the user. They will see this message and be asked to fix their application.`)), (actionModal === "query" || actionModal === "reject") && /* @__PURE__ */ React33.createElement("div", { className: "p-6 pb-2" }, /* @__PURE__ */ React33.createElement(TextInput, { label: "Reason for Action", value: actionMessage, onChange: setActionMessage, placeholder: "Enter your reason here...", disabled: isActioning })), /* @__PURE__ */ React33.createElement("div", { className: "flex items-center p-6 pt-4 gap-3" }, /* @__PURE__ */ React33.createElement("button", { onClick: () => setActionModal(null), disabled: isActioning, className: "flex-1 py-3 text-[11px] tracking-widest uppercase text-neutral-600 rounded-full hover:bg-neutral-50 transition-colors outline-none disabled:opacity-50" }, "Cancel"), /* @__PURE__ */ React33.createElement(ThreeDActionButton, { onClick: async () => {
2622
+ }, disabled: isActioning, isLoading: isActioning, className: "w-full sm:w-auto" }, "Accept Application") : selectedApp.agentId !== currentAgentId ? /* @__PURE__ */ React33.createElement("div", { className: "w-full p-4 border border-red-100 bg-red-50/30 rounded-xl flex items-start gap-3" }, /* @__PURE__ */ React33.createElement(HugeiconsIcon18, { icon: Cancel01Icon, size: 16, className: "text-red-500 shrink-0 mt-0.5" }), /* @__PURE__ */ React33.createElement("div", null, /* @__PURE__ */ React33.createElement("p", { className: "text-sm text-red-700" }, "Application Taken"), /* @__PURE__ */ React33.createElement("p", { className: "text-xs text-red-600 mt-1" }, "Currently handled by ", selectedApp.agentName || "another agent", "."))) : /* @__PURE__ */ React33.createElement("div", { className: "w-full flex flex-col sm:flex-row items-center gap-4 justify-between" }, /* @__PURE__ */ React33.createElement("p", { className: "text-xs text-neutral-500" }, "You are the assigned agent."), /* @__PURE__ */ React33.createElement("div", { className: "flex flex-col sm:flex-row items-center justify-end gap-3 w-full sm:w-auto" }, /* @__PURE__ */ React33.createElement("button", { onClick: () => setActionModal("query"), disabled: selectedApp.status === "COMPLETED", className: "w-full sm:w-auto px-6 py-2 bg-white border border-neutral-100 text-neutral-600 text-[11px] tracking-widest rounded-full hover:bg-neutral-50 transition-colors outline-none disabled:opacity-30 uppercase" }, "Query"), /* @__PURE__ */ React33.createElement("button", { onClick: () => setActionModal("reject"), disabled: selectedApp.status === "COMPLETED", className: "w-full sm:w-auto px-6 py-2 bg-white border border-neutral-100 text-neutral-600 text-[11px] tracking-widest rounded-full hover:bg-neutral-50 transition-colors outline-none disabled:opacity-30 uppercase" }, "Reject"), /* @__PURE__ */ React33.createElement(ThreeDActionButton, { onClick: () => setActionModal("success"), disabled: selectedApp.status === "COMPLETED", className: "w-full sm:w-auto" }, "Mark Success"))))), actionModal && /* @__PURE__ */ React33.createElement("div", { className: "fixed inset-0 z-110 flex items-center justify-center p-4" }, /* @__PURE__ */ React33.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => !isActioning && setActionModal(null) }), /* @__PURE__ */ React33.createElement("div", { className: "relative w-full max-w-md bg-white rounded-3xl flex flex-col overflow-hidden animate-in zoom-in-95 duration-200 text-left" }, /* @__PURE__ */ React33.createElement("div", { className: "p-6" }, /* @__PURE__ */ React33.createElement("h3", { className: " font-serif text-lg text-black tracking-tight capitalize mb-2" }, actionModal === "success" ? "Complete Application" : `${actionModal} Application`), /* @__PURE__ */ React33.createElement("p", { className: "text-xs text-neutral-500" }, actionModal === "success" ? "Are you sure you want to mark this application as successfully completed?" : `Please provide a clear reason for the user. They will see this message and be asked to fix their application.`)), (actionModal === "query" || actionModal === "reject") && /* @__PURE__ */ React33.createElement("div", { className: "p-6 pb-2" }, /* @__PURE__ */ React33.createElement(TextInput, { label: "Reason for Action", value: actionMessage, onChange: setActionMessage, placeholder: "Enter your reason here...", disabled: isActioning })), /* @__PURE__ */ React33.createElement("div", { className: "flex items-center p-6 pt-4 gap-3" }, /* @__PURE__ */ React33.createElement("button", { onClick: () => setActionModal(null), disabled: isActioning, className: "flex-1 py-3 text-[11px] tracking-widest uppercase text-neutral-600 rounded-full hover:bg-neutral-50 transition-colors outline-none disabled:opacity-50" }, "Cancel"), /* @__PURE__ */ React33.createElement(ThreeDActionButton, { onClick: async () => {
2623
2623
  setIsActioning(true);
2624
2624
  await onUpdateStatus(selectedApp.id, actionModal === "success" ? "COMPLETED" : actionModal === "reject" ? "REJECTED" : "QUEUED", actionMessage);
2625
2625
  setIsActioning(false);
@@ -2844,7 +2844,7 @@ var UniversalDirectoryPage = ({
2844
2844
  // src/components/AiApproveDecline.tsx
2845
2845
  import React38, { useState as useState19 } from "react";
2846
2846
  import { HugeiconsIcon as HugeiconsIcon22 } from "@hugeicons/react";
2847
- import { CheckmarkCircle01Icon as CheckmarkCircle01Icon2, CancelCircleIcon, PencilEdit01Icon } from "@hugeicons/core-free-icons";
2847
+ import { CheckmarkCircle01Icon as CheckmarkCircle01Icon2, CancelCircleIcon as CancelCircleIcon2, PencilEdit01Icon } from "@hugeicons/core-free-icons";
2848
2848
  var AiApproveDecline = ({ suggestionTitle, suggestionValue, onApprove, onDecline, onEdit }) => {
2849
2849
  const [isEditing, setIsEditing] = useState19(false);
2850
2850
  const [editVal, setEditVal] = useState19(typeof suggestionValue === "string" ? suggestionValue : "");
@@ -2857,18 +2857,18 @@ var AiApproveDecline = ({ suggestionTitle, suggestionValue, onApprove, onDecline
2857
2857
  className: "w-full text-sm p-2 border-b border-purple-200 bg-transparent outline-none focus:border-purple-400 transition-colors",
2858
2858
  autoFocus: true
2859
2859
  }
2860
- )), /* @__PURE__ */ React38.createElement("div", { className: "flex items-center gap-1 mt-2" }, !isEditing ? /* @__PURE__ */ React38.createElement(React38.Fragment, null, /* @__PURE__ */ React38.createElement("button", { onClick: onApprove, title: "Approve", className: "p-1.5 text-black hover:text-black hover:bg-neutral-50 rounded-full transition-colors outline-none" }, /* @__PURE__ */ React38.createElement(HugeiconsIcon22, { icon: CheckmarkCircle01Icon2, size: 28 })), /* @__PURE__ */ React38.createElement("button", { onClick: onDecline, title: "Decline", className: "p-1.5 text-neutral-400 hover:text-neutral-400 hover:bg-neutral-50 rounded-full transition-colors outline-none" }, /* @__PURE__ */ React38.createElement(HugeiconsIcon22, { icon: CancelCircleIcon, size: 28 })), onEdit && /* @__PURE__ */ React38.createElement("button", { onClick: () => setIsEditing(true), title: "Edit", className: "ml-auto p-1.5 text-neutral-400 hover:text-black hover:bg-neutral-100 rounded-full transition-colors outline-none" }, /* @__PURE__ */ React38.createElement(HugeiconsIcon22, { icon: PencilEdit01Icon, size: 18 }))) : /* @__PURE__ */ React38.createElement(React38.Fragment, null, /* @__PURE__ */ React38.createElement("button", { onClick: () => {
2860
+ )), /* @__PURE__ */ React38.createElement("div", { className: "flex items-center gap-1 mt-2" }, !isEditing ? /* @__PURE__ */ React38.createElement(React38.Fragment, null, /* @__PURE__ */ React38.createElement("button", { onClick: onApprove, title: "Approve", className: "p-1.5 text-black hover:text-black hover:bg-neutral-50 rounded-full transition-colors outline-none" }, /* @__PURE__ */ React38.createElement(HugeiconsIcon22, { icon: CheckmarkCircle01Icon2, size: 28 })), /* @__PURE__ */ React38.createElement("button", { onClick: onDecline, title: "Decline", className: "p-1.5 text-neutral-400 hover:text-neutral-400 hover:bg-neutral-50 rounded-full transition-colors outline-none" }, /* @__PURE__ */ React38.createElement(HugeiconsIcon22, { icon: CancelCircleIcon2, size: 28 })), onEdit && /* @__PURE__ */ React38.createElement("button", { onClick: () => setIsEditing(true), title: "Edit", className: "ml-auto p-1.5 text-neutral-400 hover:text-black hover:bg-neutral-100 rounded-full transition-colors outline-none" }, /* @__PURE__ */ React38.createElement(HugeiconsIcon22, { icon: PencilEdit01Icon, size: 18 }))) : /* @__PURE__ */ React38.createElement(React38.Fragment, null, /* @__PURE__ */ React38.createElement("button", { onClick: () => {
2861
2861
  onEdit?.(editVal);
2862
2862
  setIsEditing(false);
2863
- }, title: "Save Edit", className: "p-1.5 text-emerald-500 hover:text-emerald-600 hover:bg-emerald-50 rounded-full transition-colors outline-none" }, /* @__PURE__ */ React38.createElement(HugeiconsIcon22, { icon: CheckmarkCircle01Icon2, size: 28 })), /* @__PURE__ */ React38.createElement("button", { onClick: () => setIsEditing(false), title: "Cancel Edit", className: "p-1.5 text-neutral-400 hover:text-black hover:bg-neutral-100 rounded-full transition-colors outline-none" }, /* @__PURE__ */ React38.createElement(HugeiconsIcon22, { icon: CancelCircleIcon, size: 28 })))));
2863
+ }, title: "Save Edit", className: "p-1.5 text-emerald-500 hover:text-emerald-600 hover:bg-emerald-50 rounded-full transition-colors outline-none" }, /* @__PURE__ */ React38.createElement(HugeiconsIcon22, { icon: CheckmarkCircle01Icon2, size: 28 })), /* @__PURE__ */ React38.createElement("button", { onClick: () => setIsEditing(false), title: "Cancel Edit", className: "p-1.5 text-neutral-400 hover:text-black hover:bg-neutral-100 rounded-full transition-colors outline-none" }, /* @__PURE__ */ React38.createElement(HugeiconsIcon22, { icon: CancelCircleIcon2, size: 28 })))));
2864
2864
  };
2865
2865
 
2866
2866
  // src/components/AiStageCheck.tsx
2867
2867
  import React39 from "react";
2868
2868
  import { HugeiconsIcon as HugeiconsIcon23 } from "@hugeicons/react";
2869
- import { Loading03Icon as Loading03Icon11, CheckmarkCircle02Icon, CancelCircleIcon as CancelCircleIcon2 } from "@hugeicons/core-free-icons";
2869
+ import { Loading03Icon as Loading03Icon11, CheckmarkCircle02Icon, CancelCircleIcon as CancelCircleIcon3 } from "@hugeicons/core-free-icons";
2870
2870
  var AiStageCheck = ({ tasks }) => {
2871
- return /* @__PURE__ */ React39.createElement("div", { className: "flex flex-col gap-3 p-5 rounded-2xl border border-purple-100 bg-linear-to-bl from-purple-50/80 via-white to-white relative overflow-hidden" }, /* @__PURE__ */ React39.createElement("span", { className: "text-[10px] tracking-widest text-purple-600 mb-1 uppercase" }, "AI Processing"), tasks.map((task) => /* @__PURE__ */ React39.createElement("div", { key: task.id, className: "flex items-center gap-3" }, task.status === "pending" && /* @__PURE__ */ React39.createElement("div", { className: "w-4 h-4 rounded-full border border-purple-200" }), task.status === "loading" && /* @__PURE__ */ React39.createElement(HugeiconsIcon23, { icon: Loading03Icon11, size: 16, className: "animate-spin text-purple-500" }), task.status === "success" && /* @__PURE__ */ React39.createElement(HugeiconsIcon23, { icon: CheckmarkCircle02Icon, size: 16, className: "text-emerald-500" }), task.status === "error" && /* @__PURE__ */ React39.createElement(HugeiconsIcon23, { icon: CancelCircleIcon2, size: 16, className: "text-red-500" }), /* @__PURE__ */ React39.createElement("span", { className: `text-xs transition-colors ${task.status === "success" ? "text-black" : task.status === "loading" ? "text-purple-700" : "text-neutral-500"}` }, task.label))));
2871
+ return /* @__PURE__ */ React39.createElement("div", { className: "flex flex-col gap-3 p-5 rounded-2xl border border-purple-100 bg-linear-to-bl from-purple-50/80 via-white to-white relative overflow-hidden" }, /* @__PURE__ */ React39.createElement("span", { className: "text-[10px] tracking-widest text-purple-600 mb-1 uppercase" }, "AI Processing"), tasks.map((task) => /* @__PURE__ */ React39.createElement("div", { key: task.id, className: "flex items-center gap-3" }, task.status === "pending" && /* @__PURE__ */ React39.createElement("div", { className: "w-4 h-4 rounded-full border border-purple-200" }), task.status === "loading" && /* @__PURE__ */ React39.createElement(HugeiconsIcon23, { icon: Loading03Icon11, size: 16, className: "animate-spin text-purple-500" }), task.status === "success" && /* @__PURE__ */ React39.createElement(HugeiconsIcon23, { icon: CheckmarkCircle02Icon, size: 16, className: "text-emerald-500" }), task.status === "error" && /* @__PURE__ */ React39.createElement(HugeiconsIcon23, { icon: CancelCircleIcon3, size: 16, className: "text-red-500" }), /* @__PURE__ */ React39.createElement("span", { className: `text-xs transition-colors ${task.status === "success" ? "text-black" : task.status === "loading" ? "text-purple-700" : "text-neutral-500"}` }, task.label))));
2872
2872
  };
2873
2873
 
2874
2874
  // src/components/Stagger.tsx
@@ -2895,7 +2895,7 @@ var Stagger = ({ steps, currentStep }) => {
2895
2895
  import React41, { useState as useState20, useEffect as useEffect12, useRef as useRef6 } from "react";
2896
2896
  import toast6 from "react-hot-toast";
2897
2897
  import { HugeiconsIcon as HugeiconsIcon25 } from "@hugeicons/react";
2898
- import { CheckmarkBadge01Icon, Upload01Icon as Upload01Icon3, UserIcon as UserIcon2, Location01Icon, Briefcase02Icon as Briefcase02Icon2, Loading03Icon as Loading03Icon12, PencilEdit01Icon as PencilEdit01Icon2, Delete02Icon as Delete02Icon2, SignatureIcon, IdentificationIcon, ArrowLeft01Icon as ArrowLeft01Icon7, HourglassIcon, Cancel01Icon as Cancel01Icon3 } from "@hugeicons/core-free-icons";
2898
+ import { CheckmarkBadge01Icon, Upload01Icon as Upload01Icon3, UserIcon as UserIcon2, Location01Icon, Briefcase02Icon as Briefcase02Icon2, Loading03Icon as Loading03Icon12, PencilEdit01Icon as PencilEdit01Icon2, Delete02Icon as Delete02Icon2, SignatureIcon, IdentificationIcon, ArrowLeft01Icon as ArrowLeft01Icon7, HourglassIcon, Cancel01Icon as Cancel01Icon2 } from "@hugeicons/core-free-icons";
2899
2899
  var MACRO_STEPS = ["Details", "Documents", "Review", "Submit"];
2900
2900
  var NIGERIAN_STATES = ["Abia", "Adamawa", "Akwa Ibom", "Anambra", "Bauchi", "Bayelsa", "Benue", "Borno", "Cross River", "Delta", "Ebonyi", "Edo", "Ekiti", "Enugu", "FCT - Abuja", "Gombe", "Imo", "Jigawa", "Kaduna", "Kano", "Katsina", "Kebbi", "Kogi", "Kwara", "Lagos", "Nasarawa", "Niger", "Ogun", "Ondo", "Osun", "Oyo", "Plateau", "Rivers", "Sokoto", "Taraba", "Yobe", "Zamfara"];
2901
2901
  var MEMBER_ROLES = ["Director Only", "Shareholder Only", "Both Director & Shareholder"];
@@ -3471,15 +3471,15 @@ var UniversalRegistrationFlow = ({
3471
3471
  const newForm = { ...formData, natureOfBusiness: suggestedNature };
3472
3472
  setFormData(newForm);
3473
3473
  approveSection("natureApproved", newForm);
3474
- }, onDecline: () => setSuggestedNature(null) }))) : /* @__PURE__ */ React41.createElement("div", { className: " flex items-center justify-between border border-neutral-100 p-4 rounded-full" }, /* @__PURE__ */ React41.createElement("div", { className: "pr-4" }, /* @__PURE__ */ React41.createElement("p", { className: "text-sm text-black" }, formData.natureOfBusiness?.specificLabel), /* @__PURE__ */ React41.createElement("p", { className: "text-xs text-neutral-500 mt-1" }, formData.businessDesc)), !isReadOnly && /* @__PURE__ */ React41.createElement("button", { onClick: () => editSection("natureApproved"), className: "p-2 text-neutral-400 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ React41.createElement(HugeiconsIcon25, { icon: PencilEdit01Icon2, size: 16 })))), formState.natureApproved && /* @__PURE__ */ React41.createElement("div", { className: "flex flex-col gap-4 pt-6 animate-in slide-in-from-top-4 duration-500" }, /* @__PURE__ */ React41.createElement("div", { className: "flex items-center gap-2 text-black" }, /* @__PURE__ */ React41.createElement(HugeiconsIcon25, { icon: CheckmarkBadge01Icon, size: 18 }), /* @__PURE__ */ React41.createElement("h3", { className: "text-sm " }, "What name would you like to register?")), /* @__PURE__ */ React41.createElement("p", { className: "text-xs text-neutral-500 -mt-2" }, "Provide two options. We will verify availability against the official registry."), !formState.nameApproved ? /* @__PURE__ */ React41.createElement(React41.Fragment, null, /* @__PURE__ */ React41.createElement("div", { className: "flex flex-col gap-4" }, /* @__PURE__ */ React41.createElement(TextInput, { label: "Proposed Name 1 (Preferred)", value: formData.proposedName, onChange: (v) => setFormData({ ...formData, proposedName: v }), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ React41.createElement(TextInput, { label: "Proposed Name 2 (Alternative)", value: formData.proposedName2, onChange: (v) => setFormData({ ...formData, proposedName2: v }), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ React41.createElement(ThreeDActionButton, { onClick: () => handleCheckNames(formData.proposedName), disabled: !formData.proposedName || !formData.proposedName2 || isCheckingName || isCheckingQualifier || isReadOnly, isLoading: isCheckingQualifier || isCheckingName, className: "w-fit" }, "Check Availability")), (isCheckingQualifier || isCheckingName) && /* @__PURE__ */ React41.createElement("div", { className: " mt-2" }, /* @__PURE__ */ React41.createElement(AiStageCheck, { tasks: [{ id: "1", label: "AI Qualifier Pre-check...", status: isCheckingQualifier ? "loading" : "success" }, { id: "2", label: "Checking Official Registry Database...", status: isCheckingName ? "loading" : "pending" }, { id: "3", label: "Fallback Checking Public Database...", status: isCheckingName ? "loading" : "pending" }, { id: "4", label: "Validation Status...", status: isCheckingName ? "loading" : "pending" }] })), qualifierCheckResult && /* @__PURE__ */ React41.createElement("div", { className: "mt-2 animate-in fade-in" }, /* @__PURE__ */ React41.createElement("div", { className: "border border-purple-100 bg-linear-to-bl from-purple-50/80 via-white to-white p-5 rounded-2xl flex flex-col gap-4 relative overflow-hidden" }, /* @__PURE__ */ React41.createElement("div", null, /* @__PURE__ */ React41.createElement("span", { className: "text-[10px] tracking-widest text-purple-600 block mb-1" }, "AI Suggestion: Structural Qualifier Missing"), /* @__PURE__ */ React41.createElement("p", { className: "text-sm text-black mb-3" }, "Nigerian registrations require a structural qualifier to be approved."), /* @__PURE__ */ React41.createElement("div", { className: "flex flex-col gap-2" }, (qualifierCheckResult.suggestions || []).map((alt, i) => /* @__PURE__ */ React41.createElement("button", { key: i, onClick: () => setFormData({ ...formData, proposedName: alt }), className: "text-left px-4 py-2 border border-neutral-100 rounded-full hover:border-black text-sm transition-colors outline-none" }, alt)))), /* @__PURE__ */ React41.createElement("button", { onClick: () => setQualifierCheckResult(null), className: "w-fit text-[11px] tracking-widest text-neutral-500 hover:text-black transition-colors mt-2 outline-none" }, "Edit Name Manually"))), nameCheckResult && /* @__PURE__ */ React41.createElement("div", { className: " mt-2 animate-in fade-in" }, nameCheckResult.status === "APPROVED" || nameCheckResult.status === "APPROVED_WARNING" || nameCheckResult.status === "SKIPPED" ? /* @__PURE__ */ React41.createElement(AiApproveDecline, { suggestionTitle: nameCheckResult.status === "APPROVED" ? "Name Available!" : "Fallback Approval", suggestionValue: /* @__PURE__ */ React41.createElement("div", null, /* @__PURE__ */ React41.createElement("p", { className: `mb-1 ${nameCheckResult.status === "APPROVED" ? "text-emerald-600 " : "text-orange-500 "}` }, nameCheckResult.status === "APPROVED" ? "Excellent chance of approval." : "Validation Bypassed / Fallback."), /* @__PURE__ */ React41.createElement("p", { className: "text-xs text-neutral-600" }, nameCheckResult.message), /* @__PURE__ */ React41.createElement("p", { className: "text-xs text-neutral-600 mt-2 " }, "Proposed Option: ", nameCheckResult.approvedOption)), onApprove: () => {
3474
+ }, onDecline: () => setSuggestedNature(null) }))) : /* @__PURE__ */ React41.createElement("div", { className: " flex items-center justify-between" }, /* @__PURE__ */ React41.createElement("div", { className: "pr-4" }, /* @__PURE__ */ React41.createElement("p", { className: "text-sm text-black" }, formData.natureOfBusiness?.specificLabel), /* @__PURE__ */ React41.createElement("p", { className: "text-xs text-neutral-500 mt-1" }, formData.businessDesc)), !isReadOnly && /* @__PURE__ */ React41.createElement("button", { onClick: () => editSection("natureApproved"), className: "p-2 text-neutral-400 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ React41.createElement(HugeiconsIcon25, { icon: PencilEdit01Icon2, size: 16 })))), formState.natureApproved && /* @__PURE__ */ React41.createElement("div", { className: "flex flex-col gap-4 pt-6 animate-in slide-in-from-top-4 duration-500" }, /* @__PURE__ */ React41.createElement("div", { className: "flex items-center gap-2 text-black" }, /* @__PURE__ */ React41.createElement(HugeiconsIcon25, { icon: CheckmarkBadge01Icon, size: 18 }), /* @__PURE__ */ React41.createElement("h3", { className: "text-sm " }, "What name would you like to register?")), /* @__PURE__ */ React41.createElement("p", { className: "text-xs text-neutral-500 -mt-2" }, "Provide two options. We will verify availability against the official registry."), !formState.nameApproved ? /* @__PURE__ */ React41.createElement(React41.Fragment, null, /* @__PURE__ */ React41.createElement("div", { className: "flex flex-col gap-4" }, /* @__PURE__ */ React41.createElement(TextInput, { label: "Proposed Name 1 (Preferred)", value: formData.proposedName, onChange: (v) => setFormData({ ...formData, proposedName: v }), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ React41.createElement(TextInput, { label: "Proposed Name 2 (Alternative)", value: formData.proposedName2, onChange: (v) => setFormData({ ...formData, proposedName2: v }), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ React41.createElement(ThreeDActionButton, { onClick: () => handleCheckNames(formData.proposedName), disabled: !formData.proposedName || !formData.proposedName2 || isCheckingName || isCheckingQualifier || isReadOnly, isLoading: isCheckingQualifier || isCheckingName, className: "w-fit" }, "Check Availability")), (isCheckingQualifier || isCheckingName) && /* @__PURE__ */ React41.createElement("div", { className: " mt-2" }, /* @__PURE__ */ React41.createElement(AiStageCheck, { tasks: [{ id: "1", label: "AI Qualifier Pre-check...", status: isCheckingQualifier ? "loading" : "success" }, { id: "2", label: "Checking Official Registry Database...", status: isCheckingName ? "loading" : "pending" }, { id: "3", label: "Fallback Checking Public Database...", status: isCheckingName ? "loading" : "pending" }, { id: "4", label: "Validation Status...", status: isCheckingName ? "loading" : "pending" }] })), qualifierCheckResult && /* @__PURE__ */ React41.createElement("div", { className: "mt-2 animate-in fade-in" }, /* @__PURE__ */ React41.createElement("div", { className: "border border-purple-100 bg-linear-to-bl from-purple-50/80 via-white to-white p-5 rounded-2xl flex flex-col gap-4 relative overflow-hidden" }, /* @__PURE__ */ React41.createElement("div", null, /* @__PURE__ */ React41.createElement("span", { className: "text-[10px] tracking-widest text-purple-600 block mb-1" }, "AI Suggestion: Structural Qualifier Missing"), /* @__PURE__ */ React41.createElement("p", { className: "text-sm text-black mb-3" }, "Nigerian registrations require a structural qualifier to be approved."), /* @__PURE__ */ React41.createElement("div", { className: "flex flex-col gap-2" }, (qualifierCheckResult.suggestions || []).map((alt, i) => /* @__PURE__ */ React41.createElement("button", { key: i, onClick: () => setFormData({ ...formData, proposedName: alt }), className: "text-left px-4 py-2 border border-neutral-100 rounded-full hover:border-black text-sm transition-colors outline-none" }, alt)))), /* @__PURE__ */ React41.createElement("button", { onClick: () => setQualifierCheckResult(null), className: "w-fit text-[11px] tracking-widest text-neutral-500 hover:text-black transition-colors mt-2 outline-none" }, "Edit Name Manually"))), nameCheckResult && /* @__PURE__ */ React41.createElement("div", { className: " mt-2 animate-in fade-in" }, nameCheckResult.status === "APPROVED" || nameCheckResult.status === "APPROVED_WARNING" || nameCheckResult.status === "SKIPPED" ? /* @__PURE__ */ React41.createElement(AiApproveDecline, { suggestionTitle: nameCheckResult.status === "APPROVED" ? "Name Available!" : "Fallback Approval", suggestionValue: /* @__PURE__ */ React41.createElement("div", null, /* @__PURE__ */ React41.createElement("p", { className: `mb-1 ${nameCheckResult.status === "APPROVED" ? "text-emerald-600 " : "text-orange-500 "}` }, nameCheckResult.status === "APPROVED" ? "Excellent chance of approval." : "Validation Bypassed / Fallback."), /* @__PURE__ */ React41.createElement("p", { className: "text-xs text-neutral-600" }, nameCheckResult.message), /* @__PURE__ */ React41.createElement("p", { className: "text-xs text-neutral-600 mt-2 " }, "Proposed Option: ", nameCheckResult.approvedOption)), onApprove: () => {
3475
3475
  const newForm = { ...formData, approvedName: nameCheckResult.approvedOption };
3476
3476
  setFormData(newForm);
3477
3477
  approveSection("nameApproved", newForm);
3478
- }, onDecline: () => setNameCheckResult(null) }) : /* @__PURE__ */ React41.createElement("div", { className: "border border-red-100 bg-linear-to-bl from-red-50/80 via-white to-white p-5 rounded-2xl flex flex-col gap-4 relative overflow-hidden" }, /* @__PURE__ */ React41.createElement("div", null, /* @__PURE__ */ React41.createElement("span", { className: "text-[10px] tracking-widest text-red-600 block mb-1" }, "Registry Conflict Detected"), /* @__PURE__ */ React41.createElement("p", { className: "text-sm text-black mb-3" }, nameCheckResult.message), /* @__PURE__ */ React41.createElement("div", { className: "flex flex-col gap-2" }, (nameCheckResult.alternatives || []).map((alt, i) => /* @__PURE__ */ React41.createElement("button", { key: i, onClick: () => setFormData({ ...formData, proposedName: alt }), className: "text-left px-4 py-2 border border-neutral-100 rounded-full hover:border-black text-sm transition-colors outline-none" }, alt)))), /* @__PURE__ */ React41.createElement("button", { onClick: () => setNameCheckResult(null), className: "w-fit text-[11px] tracking-widest text-neutral-500 hover:text-black transition-colors mt-2 outline-none" }, "Try New Name")))) : /* @__PURE__ */ React41.createElement("div", { className: " flex items-center justify-between border border-neutral-100 p-4 rounded-full" }, /* @__PURE__ */ React41.createElement("div", null, /* @__PURE__ */ React41.createElement("p", { className: "text-sm text-black" }, formData.approvedName), /* @__PURE__ */ React41.createElement("p", { className: "text-xs text-emerald-600 mt-1" }, "Verified against registry")), !isReadOnly && /* @__PURE__ */ React41.createElement("button", { onClick: () => editSection("nameApproved"), className: "p-2 text-neutral-400 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ React41.createElement(HugeiconsIcon25, { icon: PencilEdit01Icon2, size: 16 })))), formState.nameApproved && /* @__PURE__ */ React41.createElement("div", { className: "flex flex-col gap-4 pt-6 animate-in slide-in-from-top-4 duration-500" }, /* @__PURE__ */ React41.createElement("div", { className: "flex items-center gap-2 text-black" }, /* @__PURE__ */ React41.createElement(HugeiconsIcon25, { icon: Location01Icon, size: 18 }), /* @__PURE__ */ React41.createElement("h3", { className: "text-sm " }, "Where is your head office located?")), !formState.addressApproved ? /* @__PURE__ */ React41.createElement("div", { className: "flex flex-col gap-4 " }, /* @__PURE__ */ React41.createElement(TextInput, { label: "Street Address", value: formData.address, onChange: (v) => setFormData({ ...formData, address: v }), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ React41.createElement("div", { className: "grid grid-cols-2 gap-4" }, /* @__PURE__ */ React41.createElement(TextInput, { label: "City", value: formData.city, onChange: (v) => setFormData({ ...formData, city: v }), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ React41.createElement(TextInput, { label: "State", value: formData.state, readOnly: true, onClick: () => !isReadOnly && setActiveModal({ isOpen: true, type: "state", memberIndex: null, isGlobalState: true }), placeholder: "Select State", onChange: () => {
3479
- }, disabled: isReadOnly || isSubmitting })), /* @__PURE__ */ React41.createElement(ThreeDActionButton, { onClick: () => approveSection("addressApproved"), disabled: !formData.address || !formData.city || !formData.state || isReadOnly, className: "w-fit mt-2" }, "Confirm Address")) : /* @__PURE__ */ React41.createElement("div", { className: " flex items-center justify-between border border-neutral-100 p-4 rounded-full" }, /* @__PURE__ */ React41.createElement("p", { className: "text-sm text-neutral-500" }, formData.address, ", ", formData.city, ", ", formData.state), !isReadOnly && /* @__PURE__ */ React41.createElement("button", { onClick: () => editSection("addressApproved"), className: "p-2 text-neutral-400 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ React41.createElement(HugeiconsIcon25, { icon: PencilEdit01Icon2, size: 16 })))), formState.addressApproved && type === "company" && /* @__PURE__ */ React41.createElement("div", { className: "flex flex-col gap-4 pt-6 animate-in slide-in-from-top-4 duration-500" }, /* @__PURE__ */ React41.createElement("div", { className: "flex items-center justify-between gap-2 text-black border-b border-neutral-100 pb-3" }, /* @__PURE__ */ React41.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React41.createElement(HugeiconsIcon25, { icon: UserIcon2, size: 18 }), /* @__PURE__ */ React41.createElement("h3", { className: "text-sm " }, "Directors & Shareholders")), !formState.membersDetailsApproved && /* @__PURE__ */ React41.createElement("div", { className: `text-xs px-3 py-1 rounded-full ${getCompanyTotalShares() === 100 ? "bg-emerald-50 text-emerald-600" : "bg-red-50 text-red-500"}` }, "Total Shares: ", getCompanyTotalShares(), "%")), /* @__PURE__ */ React41.createElement("p", { className: "text-xs text-neutral-500 -mt-2" }, "Provide details for all individuals. Ensure total share percentage equals 100%."), !formState.membersDetailsApproved ? /* @__PURE__ */ React41.createElement("div", { className: "flex flex-col gap-6 " }, formData.members.map((member, i) => /* @__PURE__ */ React41.createElement("div", { key: member.id, className: "flex flex-col gap-4 border border-neutral-100 p-5 rounded-2xl bg-neutral-50/30" }, /* @__PURE__ */ React41.createElement("div", { className: "flex justify-between items-center mb-1" }, /* @__PURE__ */ React41.createElement("span", { className: "text-[10px] tracking-widest text-neutral-400" }, "Member ", i + 1), formData.members.length > 1 && !isReadOnly && /* @__PURE__ */ React41.createElement("button", { onClick: () => removeCompanyMember(i), className: "text-red-500 text-xs hover:text-red-600" }, "Remove")), /* @__PURE__ */ React41.createElement("div", { className: "grid grid-cols-2 gap-4" }, /* @__PURE__ */ React41.createElement(TextInput, { label: "Role", value: member.role, readOnly: true, onClick: () => !isReadOnly && setActiveModal({ isOpen: true, type: "role", memberIndex: i }), onChange: () => {
3478
+ }, onDecline: () => setNameCheckResult(null) }) : /* @__PURE__ */ React41.createElement("div", { className: "border border-red-100 bg-linear-to-bl from-red-50/80 via-white to-white p-5 rounded-2xl flex flex-col gap-4 relative overflow-hidden" }, /* @__PURE__ */ React41.createElement("div", null, /* @__PURE__ */ React41.createElement("span", { className: "text-[10px] tracking-widest text-red-600 block mb-1" }, "Registry Conflict Detected"), /* @__PURE__ */ React41.createElement("p", { className: "text-sm text-black mb-3" }, nameCheckResult.message), /* @__PURE__ */ React41.createElement("div", { className: "flex flex-col gap-2" }, (nameCheckResult.alternatives || []).map((alt, i) => /* @__PURE__ */ React41.createElement("button", { key: i, onClick: () => setFormData({ ...formData, proposedName: alt }), className: "text-left px-4 py-2 border border-neutral-100 rounded-full hover:border-black text-sm transition-colors outline-none" }, alt)))), /* @__PURE__ */ React41.createElement("button", { onClick: () => setNameCheckResult(null), className: "w-fit text-[11px] tracking-widest text-neutral-500 hover:text-black transition-colors mt-2 outline-none" }, "Try New Name")))) : /* @__PURE__ */ React41.createElement("div", { className: " flex items-center justify-between" }, /* @__PURE__ */ React41.createElement("div", null, /* @__PURE__ */ React41.createElement("p", { className: "text-sm text-black" }, formData.approvedName), /* @__PURE__ */ React41.createElement("p", { className: "text-xs text-emerald-600 mt-1" }, "Verified against registry")), !isReadOnly && /* @__PURE__ */ React41.createElement("button", { onClick: () => editSection("nameApproved"), className: "p-2 text-neutral-400 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ React41.createElement(HugeiconsIcon25, { icon: PencilEdit01Icon2, size: 16 })))), formState.nameApproved && /* @__PURE__ */ React41.createElement("div", { className: "flex flex-col gap-4 pt-6 animate-in slide-in-from-top-4 duration-500" }, /* @__PURE__ */ React41.createElement("div", { className: "flex items-center gap-2 text-black" }, /* @__PURE__ */ React41.createElement(HugeiconsIcon25, { icon: Location01Icon, size: 18 }), /* @__PURE__ */ React41.createElement("h3", { className: "text-sm " }, "Where is your head office located?")), !formState.addressApproved ? /* @__PURE__ */ React41.createElement("div", { className: "flex flex-col gap-4 " }, /* @__PURE__ */ React41.createElement(TextInput, { label: "Street Address", value: formData.address, onChange: (v) => setFormData({ ...formData, address: v }), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ React41.createElement("div", { className: "grid grid-cols-2 gap-4" }, /* @__PURE__ */ React41.createElement(TextInput, { label: "City", value: formData.city, onChange: (v) => setFormData({ ...formData, city: v }), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ React41.createElement(TextInput, { label: "State", value: formData.state, readOnly: true, onClick: () => !isReadOnly && setActiveModal({ isOpen: true, type: "state", memberIndex: null, isGlobalState: true }), placeholder: "Select State", onChange: () => {
3479
+ }, disabled: isReadOnly || isSubmitting })), /* @__PURE__ */ React41.createElement(ThreeDActionButton, { onClick: () => approveSection("addressApproved"), disabled: !formData.address || !formData.city || !formData.state || isReadOnly, className: "w-fit mt-2" }, "Confirm Address")) : /* @__PURE__ */ React41.createElement("div", { className: " flex items-center justify-between" }, /* @__PURE__ */ React41.createElement("p", { className: "text-sm text-neutral-500" }, formData.address, ", ", formData.city, ", ", formData.state), !isReadOnly && /* @__PURE__ */ React41.createElement("button", { onClick: () => editSection("addressApproved"), className: "p-2 text-neutral-400 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ React41.createElement(HugeiconsIcon25, { icon: PencilEdit01Icon2, size: 16 })))), formState.addressApproved && type === "company" && /* @__PURE__ */ React41.createElement("div", { className: "flex flex-col gap-4 pt-6 animate-in slide-in-from-top-4 duration-500" }, /* @__PURE__ */ React41.createElement("div", { className: "flex items-center justify-between gap-2 text-black border-b border-neutral-100 pb-3" }, /* @__PURE__ */ React41.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React41.createElement(HugeiconsIcon25, { icon: UserIcon2, size: 18 }), /* @__PURE__ */ React41.createElement("h3", { className: "text-sm " }, "Directors & Shareholders")), !formState.membersDetailsApproved && /* @__PURE__ */ React41.createElement("div", { className: `text-xs px-3 py-1 rounded-full ${getCompanyTotalShares() === 100 ? "bg-emerald-50 text-emerald-600" : "bg-red-50 text-red-500"}` }, "Total Shares: ", getCompanyTotalShares(), "%")), /* @__PURE__ */ React41.createElement("p", { className: "text-xs text-neutral-500 -mt-2" }, "Provide details for all individuals. Ensure total share percentage equals 100%."), !formState.membersDetailsApproved ? /* @__PURE__ */ React41.createElement("div", { className: "flex flex-col gap-6 " }, formData.members.map((member, i) => /* @__PURE__ */ React41.createElement("div", { key: member.id, className: "flex flex-col gap-4 border border-neutral-100 p-5 rounded-2xl bg-neutral-50/30" }, /* @__PURE__ */ React41.createElement("div", { className: "flex justify-between items-center mb-1" }, /* @__PURE__ */ React41.createElement("span", { className: "text-[10px] tracking-widest text-neutral-400" }, "Member ", i + 1), formData.members.length > 1 && !isReadOnly && /* @__PURE__ */ React41.createElement("button", { onClick: () => removeCompanyMember(i), className: "text-red-500 text-xs hover:text-red-600" }, "Remove")), /* @__PURE__ */ React41.createElement("div", { className: "grid grid-cols-2 gap-4" }, /* @__PURE__ */ React41.createElement(TextInput, { label: "Role", value: member.role, readOnly: true, onClick: () => !isReadOnly && setActiveModal({ isOpen: true, type: "role", memberIndex: i }), onChange: () => {
3480
3480
  }, disabled: isReadOnly || isSubmitting }), member.role !== "Director Only" && /* @__PURE__ */ React41.createElement(NumberInput, { label: "Share Percentage (%)", value: member.sharePercentage, onChange: (v) => updateCompanyMemberInfo(i, "sharePercentage", v), disabled: isReadOnly || isSubmitting })), /* @__PURE__ */ React41.createElement(TextInput, { label: "Full Name", value: member.fullName, onChange: (v) => updateCompanyMemberInfo(i, "fullName", v), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ React41.createElement("div", { className: "grid grid-cols-2 gap-4" }, /* @__PURE__ */ React41.createElement(NumberInput, { label: "Phone Number", value: member.phone, onChange: (v) => updateCompanyMemberInfo(i, "phone", v), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ React41.createElement(TextInput, { label: "Email Address", value: member.email, onChange: (v) => updateCompanyMemberInfo(i, "email", v), disabled: isReadOnly || isSubmitting })), /* @__PURE__ */ React41.createElement(TextInput, { label: "Nationality", value: member.nationality, readOnly: true, onClick: () => !isReadOnly && setActiveModal({ isOpen: true, type: "nationality", memberIndex: i }), onChange: () => {
3481
3481
  }, disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ React41.createElement(TextInput, { label: "Residential Address", value: member.address, onChange: (v) => updateCompanyMemberInfo(i, "address", v), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ React41.createElement("div", { className: "grid grid-cols-2 gap-4" }, /* @__PURE__ */ React41.createElement(TextInput, { label: "City", value: member.city, onChange: (v) => updateCompanyMemberInfo(i, "city", v), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ React41.createElement(TextInput, { label: "State", value: member.state, readOnly: true, onClick: () => !isReadOnly && setActiveModal({ isOpen: true, type: "state", memberIndex: i }), onChange: () => {
3482
- }, disabled: isReadOnly || isSubmitting })))), /* @__PURE__ */ React41.createElement("div", { className: "flex items-center justify-between mt-2" }, !isReadOnly && /* @__PURE__ */ React41.createElement("button", { onClick: addCompanyMember, className: "px-6 py-2 bg-white border border-neutral-100 text-black text-[11px] tracking-widest rounded-full hover:bg-neutral-50 transition-colors outline-none" }, "+ Add Member"), /* @__PURE__ */ React41.createElement(ThreeDActionButton, { onClick: () => approveSection("membersDetailsApproved"), disabled: !areCompanyMembersValid() || isReadOnly, className: "w-fit" }, "Confirm Members"))) : /* @__PURE__ */ React41.createElement("div", { className: " flex items-center justify-between border border-neutral-100 p-4 rounded-full" }, /* @__PURE__ */ React41.createElement("div", null, /* @__PURE__ */ React41.createElement("p", { className: "text-sm text-black" }, formData.members.length, " Member(s) Registered"), /* @__PURE__ */ React41.createElement("p", { className: "text-xs text-neutral-500 mt-1" }, "Total Shares: 100% Verified.")), !isReadOnly && /* @__PURE__ */ React41.createElement("button", { onClick: () => editSection("membersDetailsApproved"), className: "p-2 text-neutral-400 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ React41.createElement(HugeiconsIcon25, { icon: PencilEdit01Icon2, size: 16 })))), formState.addressApproved && type === "business" && /* @__PURE__ */ React41.createElement("div", { className: "flex flex-col gap-4 pt-6 animate-in slide-in-from-top-4 duration-500" }, /* @__PURE__ */ React41.createElement("div", { className: "flex items-center gap-2 text-black" }, /* @__PURE__ */ React41.createElement(HugeiconsIcon25, { icon: UserIcon2, size: 18 }), /* @__PURE__ */ React41.createElement("h3", { className: "text-sm " }, "Who owns the business?")), /* @__PURE__ */ React41.createElement("p", { className: "text-xs text-neutral-500 -mt-2" }, "Provide basic contact info. We will extract your DOB and ID number automatically in the next step."), !formState.ownerApproved ? /* @__PURE__ */ React41.createElement("div", { className: "flex flex-col gap-4 " }, /* @__PURE__ */ React41.createElement(TextInput, { label: "Full Name", value: formData.ownerName, onChange: (v) => setFormData({ ...formData, ownerName: v }), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ React41.createElement("div", { className: "grid grid-cols-2 gap-4" }, /* @__PURE__ */ React41.createElement(NumberInput, { label: "Phone Number", value: formData.ownerPhone, onChange: (v) => setFormData({ ...formData, ownerPhone: v }), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ React41.createElement(TextInput, { label: "Email Address", value: formData.ownerEmail, onChange: (v) => setFormData({ ...formData, ownerEmail: v }), disabled: isReadOnly || isSubmitting })), /* @__PURE__ */ React41.createElement(ThreeDActionButton, { onClick: () => approveSection("ownerApproved"), disabled: !formData.ownerName || !formData.ownerPhone || !formData.ownerEmail || isReadOnly, className: "w-fit mt-2" }, "Confirm Owner Details")) : /* @__PURE__ */ React41.createElement("div", { className: " flex items-center justify-between border border-neutral-100 p-4 rounded-full" }, /* @__PURE__ */ React41.createElement("div", null, /* @__PURE__ */ React41.createElement("p", { className: "text-sm text-black" }, formData.ownerName), /* @__PURE__ */ React41.createElement("p", { className: "text-xs text-neutral-500 mt-1" }, formData.ownerEmail, " \u2022 ", formData.ownerPhone)), !isReadOnly && /* @__PURE__ */ React41.createElement("button", { onClick: () => editSection("ownerApproved"), className: "p-2 text-neutral-400 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ React41.createElement(HugeiconsIcon25, { icon: PencilEdit01Icon2, size: 16 })))), /* @__PURE__ */ React41.createElement("div", { className: "flex items-center justify-between mt-8 pt-6 " }, /* @__PURE__ */ React41.createElement("button", { onClick: handleBack, className: "flex items-center gap-2 px-6 py-2 text-[11px] tracking-widest text-neutral-500 hover:text-black hover:bg-neutral-50 rounded-full transition-colors outline-none" }, /* @__PURE__ */ React41.createElement(HugeiconsIcon25, { icon: Cancel01Icon3, size: 14 }), " Close"), /* @__PURE__ */ React41.createElement(ThreeDActionButton, { onClick: handleNext, disabled: !isStep0Valid, className: "w-fit shrink-0" }, "Next Step"))), macroStep === 1 && /* @__PURE__ */ React41.createElement("div", { className: "flex flex-col gap-8 animate-in fade-in" }, type === "company" ? /* @__PURE__ */ React41.createElement(React41.Fragment, null, /* @__PURE__ */ React41.createElement("div", { className: "flex flex-col gap-2" }, /* @__PURE__ */ React41.createElement("h3", { className: "text-sm text-black" }, "Member Identity Documents"), /* @__PURE__ */ React41.createElement("p", { className: "text-xs text-neutral-500 leading-relaxed" }, "Upload valid means of identification, passport photographs, and signatures for every director and shareholder.")), !formState.membersDocsApproved ? /* @__PURE__ */ React41.createElement("div", { className: "flex flex-col gap-6" }, formData.members.map((member, i) => /* @__PURE__ */ React41.createElement("div", { key: member.id, className: "flex flex-col gap-4" }, /* @__PURE__ */ React41.createElement("span", { className: "text-[11px] tracking-widest text-black mb-1" }, member.fullName || `Member ${i + 1}`, " ", /* @__PURE__ */ React41.createElement("span", { className: "text-neutral-400 ml-2" }, "(", member.role, ")")), /* @__PURE__ */ React41.createElement("input", { id: `id-upload-${i}`, type: "file", accept: "image/jpeg, image/png, image/webp, application/pdf", className: "hidden", onChange: (e) => handleCompanyMemberUpload(e, i, "id"), disabled: isReadOnly || isAnyUploading }), /* @__PURE__ */ React41.createElement("input", { id: `pass-upload-${i}`, type: "file", accept: "image/jpeg, image/png, image/webp, application/pdf", className: "hidden", onChange: (e) => handleCompanyMemberUpload(e, i, "passport"), disabled: isReadOnly || isAnyUploading }), /* @__PURE__ */ React41.createElement("input", { id: `sig-upload-${i}`, type: "file", accept: "image/jpeg, image/png, image/webp, application/pdf", className: "hidden", onChange: (e) => handleCompanyMemberUpload(e, i, "signature"), disabled: isReadOnly || isAnyUploading }), !member.idExtractedData && !globalExtractingId ? /* @__PURE__ */ React41.createElement("button", { onClick: () => !isReadOnly && !isAnyUploading && document.getElementById(`id-upload-${i}`)?.click(), className: `flex items-center gap-3 p-4 border border-neutral-100 rounded-full transition-colors text-sm w-full outline-none ${isAnyUploading ? "opacity-50 cursor-not-allowed bg-neutral-50 text-neutral-400" : "text-black hover:bg-neutral-50"}`, disabled: isReadOnly || isAnyUploading }, /* @__PURE__ */ React41.createElement(HugeiconsIcon25, { icon: Upload01Icon3, size: 18, className: "text-neutral-400" }), " Upload Valid ID (NIN, License, Voter's Card)") : globalExtractingId && !member.idExtractedData ? /* @__PURE__ */ React41.createElement("div", { className: " mt-2" }, /* @__PURE__ */ React41.createElement(AiStageCheck, { tasks: aiTasks })) : member.idExtractedData ? /* @__PURE__ */ React41.createElement("div", { className: " mt-2 animate-in fade-in border border-purple-100 bg-linear-to-bl from-purple-50/80 via-white to-white p-5 rounded-xl flex flex-col gap-4 relative overflow-hidden" }, /* @__PURE__ */ React41.createElement("div", null, /* @__PURE__ */ React41.createElement("span", { className: "text-[10px] tracking-widest text-purple-600 block mb-2" }, "Review Extracted ID"), /* @__PURE__ */ React41.createElement("div", { className: "flex flex-col gap-4" }, /* @__PURE__ */ React41.createElement(TextInput, { label: "Full Name on ID", value: member.idExtractedData.fullName, onChange: (v) => updateCompanyMemberInfo(i, "idExtractedData", { ...member.idExtractedData, fullName: v }), disabled: isReadOnly || isAnyUploading }), /* @__PURE__ */ React41.createElement("div", { className: "grid grid-cols-2 gap-4" }, /* @__PURE__ */ React41.createElement(TextInput, { label: "ID Number", value: member.idExtractedData.idNumber, onChange: (v) => updateCompanyMemberInfo(i, "idExtractedData", { ...member.idExtractedData, idNumber: v }), disabled: isReadOnly || isAnyUploading }), /* @__PURE__ */ React41.createElement(TextInput, { label: "Date of Birth", value: member.idExtractedData.dob, onChange: (v) => updateCompanyMemberInfo(i, "idExtractedData", { ...member.idExtractedData, dob: v }), disabled: isReadOnly || isAnyUploading })))), /* @__PURE__ */ React41.createElement("div", { className: "flex items-center gap-2 mt-2" }, !isReadOnly && /* @__PURE__ */ React41.createElement("button", { onClick: () => deleteCompanyMemberDocument(i, "id"), disabled: isAnyUploading, className: "px-6 py-2 bg-white border border-neutral-100 text-neutral-500 text-[11px] rounded-full tracking-widest hover:bg-neutral-50 transition-colors outline-none disabled:opacity-50 disabled:cursor-not-allowed" }, "Delete & Re-upload ID"))) : null, !member.passportFileUrl && !globalUploadingPassport ? /* @__PURE__ */ React41.createElement("button", { onClick: () => !isReadOnly && !isAnyUploading && document.getElementById(`pass-upload-${i}`)?.click(), className: `flex items-center gap-3 p-4 border border-neutral-100 rounded-full transition-colors text-sm w-full outline-none ${isAnyUploading ? "opacity-50 cursor-not-allowed bg-neutral-50 text-neutral-400" : "text-black hover:bg-neutral-50"}`, disabled: isReadOnly || isAnyUploading }, /* @__PURE__ */ React41.createElement(HugeiconsIcon25, { icon: Upload01Icon3, size: 18, className: "text-neutral-400" }), " Upload Passport Photo") : globalUploadingPassport && !member.passportFileUrl ? /* @__PURE__ */ React41.createElement("div", { className: "flex items-center gap-3 p-4 border border-neutral-100 rounded-full bg-neutral-50 text-neutral-500 text-sm w-full" }, /* @__PURE__ */ React41.createElement(HugeiconsIcon25, { icon: Loading03Icon12, size: 18, className: "animate-spin text-black" }), " Uploading Passport...") : member.passportFileUrl ? /* @__PURE__ */ React41.createElement("div", { className: "flex items-center justify-between p-4 bg-emerald-50 rounded-full text-emerald-800 text-sm w-full" }, /* @__PURE__ */ React41.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ React41.createElement(HugeiconsIcon25, { icon: IdentificationIcon, size: 18 }), " Passport Uploaded"), !isReadOnly && /* @__PURE__ */ React41.createElement("button", { onClick: () => deleteCompanyMemberDocument(i, "passport"), disabled: isAnyUploading, className: "text-emerald-700 hover:text-red-500 transition-colors p-1 outline-none shrink-0 disabled:opacity-50 disabled:cursor-not-allowed" }, /* @__PURE__ */ React41.createElement(HugeiconsIcon25, { icon: Delete02Icon2, size: 16 }))) : null, !member.signatureFileUrl && !globalUploadingSignature ? /* @__PURE__ */ React41.createElement("button", { onClick: () => !isReadOnly && !isAnyUploading && document.getElementById(`sig-upload-${i}`)?.click(), className: `flex items-center gap-3 p-4 border border-neutral-100 rounded-full transition-colors text-sm w-full outline-none ${isAnyUploading ? "opacity-50 cursor-not-allowed bg-neutral-50 text-neutral-400" : "text-black hover:bg-neutral-50"}`, disabled: isReadOnly || isAnyUploading }, /* @__PURE__ */ React41.createElement(HugeiconsIcon25, { icon: Upload01Icon3, size: 18, className: "text-neutral-400" }), " Upload Signature") : globalUploadingSignature && !member.signatureFileUrl ? /* @__PURE__ */ React41.createElement("div", { className: "flex items-center gap-3 p-4 border border-neutral-100 rounded-full bg-neutral-50 text-neutral-500 text-sm w-full" }, /* @__PURE__ */ React41.createElement(HugeiconsIcon25, { icon: Loading03Icon12, size: 18, className: "animate-spin text-black" }), " Uploading Signature...") : member.signatureFileUrl ? /* @__PURE__ */ React41.createElement("div", { className: "flex items-center justify-between p-4 bg-emerald-50 rounded-full text-emerald-800 text-sm w-full" }, /* @__PURE__ */ React41.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ React41.createElement(HugeiconsIcon25, { icon: SignatureIcon, size: 18 }), " Signature Uploaded"), !isReadOnly && /* @__PURE__ */ React41.createElement("button", { onClick: () => deleteCompanyMemberDocument(i, "signature"), disabled: isAnyUploading, className: "text-emerald-700 hover:text-red-500 transition-colors p-1 outline-none shrink-0 disabled:opacity-50 disabled:cursor-not-allowed" }, /* @__PURE__ */ React41.createElement(HugeiconsIcon25, { icon: Delete02Icon2, size: 16 }))) : null)), /* @__PURE__ */ React41.createElement("div", { className: "flex justify-end" }, /* @__PURE__ */ React41.createElement(ThreeDActionButton, { onClick: () => approveSection("membersDocsApproved"), disabled: !areCompanyMemberDocsValid() || isReadOnly || isAnyUploading, className: "w-fit" }, "Confirm All Documents"))) : /* @__PURE__ */ React41.createElement("div", { className: " flex items-center justify-between bg-emerald-50 p-6 rounded-2xl" }, /* @__PURE__ */ React41.createElement("div", null, /* @__PURE__ */ React41.createElement("p", { className: "text-sm text-emerald-800" }, "All Member Documents Verified"), /* @__PURE__ */ React41.createElement("p", { className: "text-xs text-emerald-600 mt-1" }, "Data safely extracted and ready for submission.")), !isReadOnly && /* @__PURE__ */ React41.createElement("button", { onClick: () => editSection("membersDocsApproved"), className: "p-2 text-emerald-700 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ React41.createElement(HugeiconsIcon25, { icon: PencilEdit01Icon2, size: 16 })))) : /* @__PURE__ */ React41.createElement(React41.Fragment, null, /* @__PURE__ */ React41.createElement("input", { type: "file", accept: "image/jpeg, image/png, image/webp, application/pdf", ref: idRef, onChange: (e) => handleBusinessUpload(e, "id"), disabled: isReadOnly || isAnyUploading, className: "hidden" }), /* @__PURE__ */ React41.createElement("input", { type: "file", accept: "image/jpeg, image/png, image/webp, application/pdf", ref: passportRef, onChange: (e) => handleBusinessUpload(e, "passport"), disabled: isReadOnly || isAnyUploading, className: "hidden" }), /* @__PURE__ */ React41.createElement("input", { type: "file", accept: "image/jpeg, image/png, image/webp, application/pdf", ref: signatureRef, onChange: (e) => handleBusinessUpload(e, "signature"), disabled: isReadOnly || isAnyUploading, className: "hidden" }), /* @__PURE__ */ React41.createElement("div", { className: "flex flex-col gap-4" }, /* @__PURE__ */ React41.createElement("div", { className: "flex items-center gap-2 text-black" }, /* @__PURE__ */ React41.createElement("h3", { className: "text-sm " }, "Upload Means of Identification")), /* @__PURE__ */ React41.createElement("p", { className: "text-xs text-neutral-500 -mt-2" }, "Upload your NIN, Driver's License, Voter's Card, or Int'l Passport (JPG/PNG/WEBP)."), !formState.idApproved ? /* @__PURE__ */ React41.createElement(React41.Fragment, null, /* @__PURE__ */ React41.createElement("button", { onClick: () => !isReadOnly && !isAnyUploading && idRef.current?.click(), disabled: isReadOnly || isAnyUploading, className: `w-full h-32 border border-neutral-100 rounded-2xl flex flex-col items-center justify-center gap-2 transition-colors outline-none ${isAnyUploading ? "opacity-50 cursor-not-allowed bg-neutral-50 text-neutral-400" : "hover:bg-neutral-50 text-black"}` }, /* @__PURE__ */ React41.createElement(HugeiconsIcon25, { icon: Upload01Icon3, size: 24, className: "text-neutral-400" }), /* @__PURE__ */ React41.createElement("span", { className: "text-xs" }, "Select ID Image to Upload")), globalExtractingId && /* @__PURE__ */ React41.createElement("div", { className: " mt-2" }, /* @__PURE__ */ React41.createElement(AiStageCheck, { tasks: aiTasks })), formData.idExtractedData && /* @__PURE__ */ React41.createElement("div", { className: " mt-2 animate-in fade-in border border-purple-100 bg-linear-to-bl from-purple-50/80 via-white to-white p-5 rounded-2xl flex flex-col gap-4 relative overflow-hidden" }, /* @__PURE__ */ React41.createElement("div", null, /* @__PURE__ */ React41.createElement("span", { className: "text-[10px] tracking-widest text-purple-600 block mb-2" }, "Review AI Extracted Data"), /* @__PURE__ */ React41.createElement("p", { className: "text-xs text-neutral-500 mb-4" }, "Please verify the extracted information and correct any OCR mistakes before approving."), /* @__PURE__ */ React41.createElement("div", { className: "flex flex-col gap-4" }, /* @__PURE__ */ React41.createElement(TextInput, { label: "Full Name on ID", value: formData.idExtractedData.fullName, onChange: (v) => setFormData((f) => ({ ...f, idExtractedData: { ...f.idExtractedData, fullName: v } })), disabled: isReadOnly || isAnyUploading }), /* @__PURE__ */ React41.createElement("div", { className: "grid grid-cols-2 gap-4" }, /* @__PURE__ */ React41.createElement(TextInput, { label: "ID Number", value: formData.idExtractedData.idNumber, onChange: (v) => setFormData((f) => ({ ...f, idExtractedData: { ...f.idExtractedData, idNumber: v } })), disabled: isReadOnly || isAnyUploading }), /* @__PURE__ */ React41.createElement(TextInput, { label: "Date of Birth (YYYY-MM-DD)", value: formData.idExtractedData.dob, onChange: (v) => setFormData((f) => ({ ...f, idExtractedData: { ...f.idExtractedData, dob: v } })), disabled: isReadOnly || isAnyUploading })))), /* @__PURE__ */ React41.createElement("div", { className: "flex items-center gap-2 mt-2" }, /* @__PURE__ */ React41.createElement(ThreeDActionButton, { onClick: () => approveSection("idApproved"), disabled: isAnyUploading || isReadOnly, className: "w-fit shrink-0" }, "Approve Data"), !isReadOnly && /* @__PURE__ */ React41.createElement("button", { onClick: () => deleteBusinessDocument("id"), disabled: isAnyUploading, className: "px-6 py-2 bg-white border border-neutral-100 text-neutral-500 text-[11px] rounded-full tracking-widest hover:bg-neutral-50 transition-colors outline-none disabled:opacity-50 disabled:cursor-not-allowed" }, "Delete & Re-upload")))) : /* @__PURE__ */ React41.createElement("div", { className: " flex items-center justify-between bg-emerald-50 p-6 rounded-full" }, /* @__PURE__ */ React41.createElement("div", null, /* @__PURE__ */ React41.createElement("p", { className: "text-sm text-emerald-800" }, "ID Document Verified"), /* @__PURE__ */ React41.createElement("p", { className: "text-xs text-emerald-600 mt-1" }, "Data safely extracted and stored.")), !isReadOnly && /* @__PURE__ */ React41.createElement("button", { onClick: () => editSection("idApproved"), className: "p-2 text-emerald-700 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ React41.createElement(HugeiconsIcon25, { icon: PencilEdit01Icon2, size: 16 })))), /* @__PURE__ */ React41.createElement("div", { className: "flex flex-col gap-4 pt-6 animate-in slide-in-from-top-4 duration-500" }, /* @__PURE__ */ React41.createElement("div", { className: "flex flex-col gap-3 " }, !formState.passportApproved && !globalUploadingPassport ? /* @__PURE__ */ React41.createElement("button", { onClick: () => !isReadOnly && !isAnyUploading && passportRef.current?.click(), disabled: isReadOnly || isAnyUploading, className: `flex items-center gap-3 p-4 border border-neutral-100 rounded-full transition-colors text-sm w-full outline-none ${isAnyUploading ? "opacity-50 cursor-not-allowed bg-neutral-50 text-neutral-400" : "text-black hover:bg-neutral-50"}` }, /* @__PURE__ */ React41.createElement(HugeiconsIcon25, { icon: Upload01Icon3, size: 18, className: "text-neutral-400" }), " Upload Passport Photo") : globalUploadingPassport && !formData.passportFileUrl ? /* @__PURE__ */ React41.createElement("div", { className: "flex items-center gap-3 p-4 border border-neutral-100 rounded-full bg-neutral-50 text-neutral-500 text-sm w-full" }, /* @__PURE__ */ React41.createElement(HugeiconsIcon25, { icon: Loading03Icon12, size: 18, className: "animate-spin text-black" }), " Uploading Passport...") : /* @__PURE__ */ React41.createElement("div", { className: "flex items-center justify-between p-4 bg-emerald-50 rounded-full text-emerald-800 text-sm w-full" }, /* @__PURE__ */ React41.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ React41.createElement(HugeiconsIcon25, { icon: IdentificationIcon, size: 18 }), " Passport Uploaded"), !isReadOnly && /* @__PURE__ */ React41.createElement("button", { onClick: () => deleteBusinessDocument("passport"), disabled: isAnyUploading, className: "text-emerald-700 hover:text-red-500 transition-colors p-1 outline-none shrink-0 disabled:opacity-50 disabled:cursor-not-allowed" }, /* @__PURE__ */ React41.createElement(HugeiconsIcon25, { icon: Delete02Icon2, size: 16 }))), !formState.signatureApproved && !globalUploadingSignature ? /* @__PURE__ */ React41.createElement("button", { onClick: () => !isReadOnly && !isAnyUploading && signatureRef.current?.click(), disabled: isReadOnly || isAnyUploading, className: `flex items-center gap-3 p-4 border border-neutral-100 rounded-full transition-colors text-sm w-full outline-none ${isAnyUploading ? "opacity-50 cursor-not-allowed bg-neutral-50 text-neutral-400" : "text-black hover:bg-neutral-50"}` }, /* @__PURE__ */ React41.createElement(HugeiconsIcon25, { icon: Upload01Icon3, size: 18, className: "text-neutral-400" }), " Upload Signature") : globalUploadingSignature && !formData.signatureFileUrl ? /* @__PURE__ */ React41.createElement("div", { className: "flex items-center gap-3 p-4 border border-neutral-100 rounded-full bg-neutral-50 text-neutral-500 text-sm w-full" }, /* @__PURE__ */ React41.createElement(HugeiconsIcon25, { icon: Loading03Icon12, size: 18, className: "animate-spin text-black" }), " Uploading Signature...") : /* @__PURE__ */ React41.createElement("div", { className: "flex items-center justify-between p-4 bg-emerald-50 rounded-full text-emerald-800 text-sm w-full" }, /* @__PURE__ */ React41.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ React41.createElement(HugeiconsIcon25, { icon: SignatureIcon, size: 18 }), " Signature Uploaded"), !isReadOnly && /* @__PURE__ */ React41.createElement("button", { onClick: () => deleteBusinessDocument("signature"), disabled: isAnyUploading, className: "text-emerald-700 hover:text-red-500 transition-colors p-1 outline-none shrink-0 disabled:opacity-50 disabled:cursor-not-allowed" }, /* @__PURE__ */ React41.createElement(HugeiconsIcon25, { icon: Delete02Icon2, size: 16 })))))), /* @__PURE__ */ React41.createElement("div", { className: "flex flex-col gap-4 pt-6 border-t border-neutral-100 animate-in slide-in-from-top-4 duration-500" }, /* @__PURE__ */ React41.createElement("input", { type: "file", accept: "image/jpeg, image/png, image/webp, application/pdf", ref: other1Ref, onChange: (e) => handleOptionalUpload(e, "other1"), disabled: isAnyUploading || isReadOnly, className: "hidden" }), /* @__PURE__ */ React41.createElement("input", { type: "file", accept: "image/jpeg, image/png, image/webp, application/pdf", ref: other2Ref, onChange: (e) => handleOptionalUpload(e, "other2"), disabled: isAnyUploading || isReadOnly, className: "hidden" }), /* @__PURE__ */ React41.createElement("input", { type: "file", accept: "image/jpeg, image/png, image/webp, application/pdf", ref: other3Ref, onChange: (e) => handleOptionalUpload(e, "other3"), disabled: isAnyUploading || isReadOnly, className: "hidden" }), /* @__PURE__ */ React41.createElement("div", { className: "flex flex-col gap-1 mb-2" }, /* @__PURE__ */ React41.createElement("h3", { className: "text-sm text-black" }, "Additional Documents (Optional)"), /* @__PURE__ */ React41.createElement("p", { className: "text-xs text-neutral-500 leading-relaxed" }, "If your ", type === "company" ? "company" : "business", " involves regulated professional services, please upload relevant licenses, certificates, or permits here (up to 3 documents).")), /* @__PURE__ */ React41.createElement("div", { className: "flex flex-col gap-3" }, [1, 2, 3].map((num) => {
3482
+ }, disabled: isReadOnly || isSubmitting })))), /* @__PURE__ */ React41.createElement("div", { className: "flex items-center justify-between mt-2" }, !isReadOnly && /* @__PURE__ */ React41.createElement("button", { onClick: addCompanyMember, className: "px-6 py-2 bg-white border border-neutral-100 text-black text-[11px] tracking-widest rounded-full hover:bg-neutral-50 transition-colors outline-none" }, "+ Add Member"), /* @__PURE__ */ React41.createElement(ThreeDActionButton, { onClick: () => approveSection("membersDetailsApproved"), disabled: !areCompanyMembersValid() || isReadOnly, className: "w-fit" }, "Confirm Members"))) : /* @__PURE__ */ React41.createElement("div", { className: " flex items-center justify-between" }, /* @__PURE__ */ React41.createElement("div", null, /* @__PURE__ */ React41.createElement("p", { className: "text-sm text-black" }, formData.members.length, " Member(s) Registered"), /* @__PURE__ */ React41.createElement("p", { className: "text-xs text-neutral-500 mt-1" }, "Total Shares: 100% Verified.")), !isReadOnly && /* @__PURE__ */ React41.createElement("button", { onClick: () => editSection("membersDetailsApproved"), className: "p-2 text-neutral-400 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ React41.createElement(HugeiconsIcon25, { icon: PencilEdit01Icon2, size: 16 })))), formState.addressApproved && type === "business" && /* @__PURE__ */ React41.createElement("div", { className: "flex flex-col gap-4 pt-6 animate-in slide-in-from-top-4 duration-500" }, /* @__PURE__ */ React41.createElement("div", { className: "flex items-center gap-2 text-black" }, /* @__PURE__ */ React41.createElement(HugeiconsIcon25, { icon: UserIcon2, size: 18 }), /* @__PURE__ */ React41.createElement("h3", { className: "text-sm " }, "Who owns the business?")), /* @__PURE__ */ React41.createElement("p", { className: "text-xs text-neutral-500 -mt-2" }, "Provide basic contact info. We will extract your DOB and ID number automatically in the next step."), !formState.ownerApproved ? /* @__PURE__ */ React41.createElement("div", { className: "flex flex-col gap-4 " }, /* @__PURE__ */ React41.createElement(TextInput, { label: "Full Name", value: formData.ownerName, onChange: (v) => setFormData({ ...formData, ownerName: v }), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ React41.createElement("div", { className: "grid grid-cols-2 gap-4" }, /* @__PURE__ */ React41.createElement(NumberInput, { label: "Phone Number", value: formData.ownerPhone, onChange: (v) => setFormData({ ...formData, ownerPhone: v }), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ React41.createElement(TextInput, { label: "Email Address", value: formData.ownerEmail, onChange: (v) => setFormData({ ...formData, ownerEmail: v }), disabled: isReadOnly || isSubmitting })), /* @__PURE__ */ React41.createElement(ThreeDActionButton, { onClick: () => approveSection("ownerApproved"), disabled: !formData.ownerName || !formData.ownerPhone || !formData.ownerEmail || isReadOnly, className: "w-fit mt-2" }, "Confirm Owner Details")) : /* @__PURE__ */ React41.createElement("div", { className: " flex items-center justify-between" }, /* @__PURE__ */ React41.createElement("div", null, /* @__PURE__ */ React41.createElement("p", { className: "text-sm text-black" }, formData.ownerName), /* @__PURE__ */ React41.createElement("p", { className: "text-xs text-neutral-500 mt-1" }, formData.ownerEmail, " \u2022 ", formData.ownerPhone)), !isReadOnly && /* @__PURE__ */ React41.createElement("button", { onClick: () => editSection("ownerApproved"), className: "p-2 text-neutral-400 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ React41.createElement(HugeiconsIcon25, { icon: PencilEdit01Icon2, size: 16 })))), /* @__PURE__ */ React41.createElement("div", { className: "flex items-center justify-between mt-8 pt-6 " }, /* @__PURE__ */ React41.createElement("button", { onClick: handleBack, className: "flex items-center gap-2 px-6 py-2 text-[11px] tracking-widest text-neutral-500 hover:text-black hover:bg-neutral-50 rounded-full transition-colors outline-none" }, /* @__PURE__ */ React41.createElement(HugeiconsIcon25, { icon: Cancel01Icon2, size: 14 }), " Close"), /* @__PURE__ */ React41.createElement(ThreeDActionButton, { onClick: handleNext, disabled: !isStep0Valid, className: "w-fit shrink-0" }, "Next Step"))), macroStep === 1 && /* @__PURE__ */ React41.createElement("div", { className: "flex flex-col gap-8 animate-in fade-in" }, type === "company" ? /* @__PURE__ */ React41.createElement(React41.Fragment, null, /* @__PURE__ */ React41.createElement("div", { className: "flex flex-col gap-2" }, /* @__PURE__ */ React41.createElement("h3", { className: "text-sm text-black" }, "Member Identity Documents"), /* @__PURE__ */ React41.createElement("p", { className: "text-xs text-neutral-500 leading-relaxed" }, "Upload valid means of identification, passport photographs, and signatures for every director and shareholder.")), !formState.membersDocsApproved ? /* @__PURE__ */ React41.createElement("div", { className: "flex flex-col gap-6" }, formData.members.map((member, i) => /* @__PURE__ */ React41.createElement("div", { key: member.id, className: "flex flex-col gap-4" }, /* @__PURE__ */ React41.createElement("span", { className: "text-[11px] tracking-widest text-black mb-1" }, member.fullName || `Member ${i + 1}`, " ", /* @__PURE__ */ React41.createElement("span", { className: "text-neutral-400 ml-2" }, "(", member.role, ")")), /* @__PURE__ */ React41.createElement("input", { id: `id-upload-${i}`, type: "file", accept: "image/jpeg, image/png, image/webp, application/pdf", className: "hidden", onChange: (e) => handleCompanyMemberUpload(e, i, "id"), disabled: isReadOnly || isAnyUploading }), /* @__PURE__ */ React41.createElement("input", { id: `pass-upload-${i}`, type: "file", accept: "image/jpeg, image/png, image/webp, application/pdf", className: "hidden", onChange: (e) => handleCompanyMemberUpload(e, i, "passport"), disabled: isReadOnly || isAnyUploading }), /* @__PURE__ */ React41.createElement("input", { id: `sig-upload-${i}`, type: "file", accept: "image/jpeg, image/png, image/webp, application/pdf", className: "hidden", onChange: (e) => handleCompanyMemberUpload(e, i, "signature"), disabled: isReadOnly || isAnyUploading }), !member.idExtractedData && !globalExtractingId ? /* @__PURE__ */ React41.createElement("button", { onClick: () => !isReadOnly && !isAnyUploading && document.getElementById(`id-upload-${i}`)?.click(), className: `flex items-center gap-3 p-4 border border-neutral-100 rounded-full transition-colors text-sm w-full outline-none ${isAnyUploading ? "opacity-50 cursor-not-allowed bg-neutral-50 text-neutral-400" : "text-black hover:bg-neutral-50"}`, disabled: isReadOnly || isAnyUploading }, /* @__PURE__ */ React41.createElement(HugeiconsIcon25, { icon: Upload01Icon3, size: 18, className: "text-neutral-400" }), " Upload Valid ID (NIN, License, Voter's Card)") : globalExtractingId && !member.idExtractedData ? /* @__PURE__ */ React41.createElement("div", { className: " mt-2" }, /* @__PURE__ */ React41.createElement(AiStageCheck, { tasks: aiTasks })) : member.idExtractedData ? /* @__PURE__ */ React41.createElement("div", { className: " mt-2 animate-in fade-in border border-purple-100 bg-linear-to-bl from-purple-50/80 via-white to-white p-5 rounded-xl flex flex-col gap-4 relative overflow-hidden" }, /* @__PURE__ */ React41.createElement("div", null, /* @__PURE__ */ React41.createElement("span", { className: "text-[10px] tracking-widest text-purple-600 block mb-2" }, "Review Extracted ID"), /* @__PURE__ */ React41.createElement("div", { className: "flex flex-col gap-4" }, /* @__PURE__ */ React41.createElement(TextInput, { label: "Full Name on ID", value: member.idExtractedData.fullName, onChange: (v) => updateCompanyMemberInfo(i, "idExtractedData", { ...member.idExtractedData, fullName: v }), disabled: isReadOnly || isAnyUploading }), /* @__PURE__ */ React41.createElement("div", { className: "grid grid-cols-2 gap-4" }, /* @__PURE__ */ React41.createElement(TextInput, { label: "ID Number", value: member.idExtractedData.idNumber, onChange: (v) => updateCompanyMemberInfo(i, "idExtractedData", { ...member.idExtractedData, idNumber: v }), disabled: isReadOnly || isAnyUploading }), /* @__PURE__ */ React41.createElement(TextInput, { label: "Date of Birth", value: member.idExtractedData.dob, onChange: (v) => updateCompanyMemberInfo(i, "idExtractedData", { ...member.idExtractedData, dob: v }), disabled: isReadOnly || isAnyUploading })))), /* @__PURE__ */ React41.createElement("div", { className: "flex items-center gap-2 mt-2" }, !isReadOnly && /* @__PURE__ */ React41.createElement("button", { onClick: () => deleteCompanyMemberDocument(i, "id"), disabled: isAnyUploading, className: "px-6 py-2 bg-white border border-neutral-100 text-neutral-500 text-[11px] rounded-full tracking-widest hover:bg-neutral-50 transition-colors outline-none disabled:opacity-50 disabled:cursor-not-allowed" }, "Delete & Re-upload ID"))) : null, !member.passportFileUrl && !globalUploadingPassport ? /* @__PURE__ */ React41.createElement("button", { onClick: () => !isReadOnly && !isAnyUploading && document.getElementById(`pass-upload-${i}`)?.click(), className: `flex items-center gap-3 p-4 border border-neutral-100 rounded-full transition-colors text-sm w-full outline-none ${isAnyUploading ? "opacity-50 cursor-not-allowed bg-neutral-50 text-neutral-400" : "text-black hover:bg-neutral-50"}`, disabled: isReadOnly || isAnyUploading }, /* @__PURE__ */ React41.createElement(HugeiconsIcon25, { icon: Upload01Icon3, size: 18, className: "text-neutral-400" }), " Upload Passport Photo") : globalUploadingPassport && !member.passportFileUrl ? /* @__PURE__ */ React41.createElement("div", { className: "flex items-center gap-3 p-4 border border-neutral-100 rounded-full bg-neutral-50 text-neutral-500 text-sm w-full" }, /* @__PURE__ */ React41.createElement(HugeiconsIcon25, { icon: Loading03Icon12, size: 18, className: "animate-spin text-black" }), " Uploading Passport...") : member.passportFileUrl ? /* @__PURE__ */ React41.createElement("div", { className: "flex items-center justify-between p-4 bg-emerald-50 rounded-full text-emerald-800 text-sm w-full" }, /* @__PURE__ */ React41.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ React41.createElement(HugeiconsIcon25, { icon: IdentificationIcon, size: 18 }), " Passport Uploaded"), !isReadOnly && /* @__PURE__ */ React41.createElement("button", { onClick: () => deleteCompanyMemberDocument(i, "passport"), disabled: isAnyUploading, className: "text-emerald-700 hover:text-red-500 transition-colors p-1 outline-none shrink-0 disabled:opacity-50 disabled:cursor-not-allowed" }, /* @__PURE__ */ React41.createElement(HugeiconsIcon25, { icon: Delete02Icon2, size: 16 }))) : null, !member.signatureFileUrl && !globalUploadingSignature ? /* @__PURE__ */ React41.createElement("button", { onClick: () => !isReadOnly && !isAnyUploading && document.getElementById(`sig-upload-${i}`)?.click(), className: `flex items-center gap-3 p-4 border border-neutral-100 rounded-full transition-colors text-sm w-full outline-none ${isAnyUploading ? "opacity-50 cursor-not-allowed bg-neutral-50 text-neutral-400" : "text-black hover:bg-neutral-50"}`, disabled: isReadOnly || isAnyUploading }, /* @__PURE__ */ React41.createElement(HugeiconsIcon25, { icon: Upload01Icon3, size: 18, className: "text-neutral-400" }), " Upload Signature") : globalUploadingSignature && !member.signatureFileUrl ? /* @__PURE__ */ React41.createElement("div", { className: "flex items-center gap-3 p-4 border border-neutral-100 rounded-full bg-neutral-50 text-neutral-500 text-sm w-full" }, /* @__PURE__ */ React41.createElement(HugeiconsIcon25, { icon: Loading03Icon12, size: 18, className: "animate-spin text-black" }), " Uploading Signature...") : member.signatureFileUrl ? /* @__PURE__ */ React41.createElement("div", { className: "flex items-center justify-between p-4 bg-emerald-50 rounded-full text-emerald-800 text-sm w-full" }, /* @__PURE__ */ React41.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ React41.createElement(HugeiconsIcon25, { icon: SignatureIcon, size: 18 }), " Signature Uploaded"), !isReadOnly && /* @__PURE__ */ React41.createElement("button", { onClick: () => deleteCompanyMemberDocument(i, "signature"), disabled: isAnyUploading, className: "text-emerald-700 hover:text-red-500 transition-colors p-1 outline-none shrink-0 disabled:opacity-50 disabled:cursor-not-allowed" }, /* @__PURE__ */ React41.createElement(HugeiconsIcon25, { icon: Delete02Icon2, size: 16 }))) : null)), /* @__PURE__ */ React41.createElement("div", { className: "flex justify-end" }, /* @__PURE__ */ React41.createElement(ThreeDActionButton, { onClick: () => approveSection("membersDocsApproved"), disabled: !areCompanyMemberDocsValid() || isReadOnly || isAnyUploading, className: "w-fit" }, "Confirm All Documents"))) : /* @__PURE__ */ React41.createElement("div", { className: " flex items-center justify-between bg-emerald-50 p-6 rounded-2xl" }, /* @__PURE__ */ React41.createElement("div", null, /* @__PURE__ */ React41.createElement("p", { className: "text-sm text-emerald-800" }, "All Member Documents Verified"), /* @__PURE__ */ React41.createElement("p", { className: "text-xs text-emerald-600 mt-1" }, "Data safely extracted and ready for submission.")), !isReadOnly && /* @__PURE__ */ React41.createElement("button", { onClick: () => editSection("membersDocsApproved"), className: "p-2 text-emerald-700 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ React41.createElement(HugeiconsIcon25, { icon: PencilEdit01Icon2, size: 16 })))) : /* @__PURE__ */ React41.createElement(React41.Fragment, null, /* @__PURE__ */ React41.createElement("input", { type: "file", accept: "image/jpeg, image/png, image/webp, application/pdf", ref: idRef, onChange: (e) => handleBusinessUpload(e, "id"), disabled: isReadOnly || isAnyUploading, className: "hidden" }), /* @__PURE__ */ React41.createElement("input", { type: "file", accept: "image/jpeg, image/png, image/webp, application/pdf", ref: passportRef, onChange: (e) => handleBusinessUpload(e, "passport"), disabled: isReadOnly || isAnyUploading, className: "hidden" }), /* @__PURE__ */ React41.createElement("input", { type: "file", accept: "image/jpeg, image/png, image/webp, application/pdf", ref: signatureRef, onChange: (e) => handleBusinessUpload(e, "signature"), disabled: isReadOnly || isAnyUploading, className: "hidden" }), /* @__PURE__ */ React41.createElement("div", { className: "flex flex-col gap-4" }, /* @__PURE__ */ React41.createElement("div", { className: "flex items-center gap-2 text-black" }, /* @__PURE__ */ React41.createElement("h3", { className: "text-sm " }, "Upload Means of Identification")), /* @__PURE__ */ React41.createElement("p", { className: "text-xs text-neutral-500 -mt-2" }, "Upload your NIN, Driver's License, Voter's Card, or Int'l Passport (JPG/PNG/WEBP)."), !formState.idApproved ? /* @__PURE__ */ React41.createElement(React41.Fragment, null, /* @__PURE__ */ React41.createElement("button", { onClick: () => !isReadOnly && !isAnyUploading && idRef.current?.click(), disabled: isReadOnly || isAnyUploading, className: `w-full h-32 border border-neutral-100 rounded-2xl flex flex-col items-center justify-center gap-2 transition-colors outline-none ${isAnyUploading ? "opacity-50 cursor-not-allowed bg-neutral-50 text-neutral-400" : "hover:bg-neutral-50 text-black"}` }, /* @__PURE__ */ React41.createElement(HugeiconsIcon25, { icon: Upload01Icon3, size: 24, className: "text-neutral-400" }), /* @__PURE__ */ React41.createElement("span", { className: "text-xs" }, "Select ID Image to Upload")), globalExtractingId && /* @__PURE__ */ React41.createElement("div", { className: " mt-2" }, /* @__PURE__ */ React41.createElement(AiStageCheck, { tasks: aiTasks })), formData.idExtractedData && /* @__PURE__ */ React41.createElement("div", { className: " mt-2 animate-in fade-in border border-purple-100 bg-linear-to-bl from-purple-50/80 via-white to-white p-5 rounded-2xl flex flex-col gap-4 relative overflow-hidden" }, /* @__PURE__ */ React41.createElement("div", null, /* @__PURE__ */ React41.createElement("span", { className: "text-[10px] tracking-widest text-purple-600 block mb-2" }, "Review AI Extracted Data"), /* @__PURE__ */ React41.createElement("p", { className: "text-xs text-neutral-500 mb-4" }, "Please verify the extracted information and correct any OCR mistakes before approving."), /* @__PURE__ */ React41.createElement("div", { className: "flex flex-col gap-4" }, /* @__PURE__ */ React41.createElement(TextInput, { label: "Full Name on ID", value: formData.idExtractedData.fullName, onChange: (v) => setFormData((f) => ({ ...f, idExtractedData: { ...f.idExtractedData, fullName: v } })), disabled: isReadOnly || isAnyUploading }), /* @__PURE__ */ React41.createElement("div", { className: "grid grid-cols-2 gap-4" }, /* @__PURE__ */ React41.createElement(TextInput, { label: "ID Number", value: formData.idExtractedData.idNumber, onChange: (v) => setFormData((f) => ({ ...f, idExtractedData: { ...f.idExtractedData, idNumber: v } })), disabled: isReadOnly || isAnyUploading }), /* @__PURE__ */ React41.createElement(TextInput, { label: "Date of Birth (YYYY-MM-DD)", value: formData.idExtractedData.dob, onChange: (v) => setFormData((f) => ({ ...f, idExtractedData: { ...f.idExtractedData, dob: v } })), disabled: isReadOnly || isAnyUploading })))), /* @__PURE__ */ React41.createElement("div", { className: "flex items-center gap-2 mt-2" }, /* @__PURE__ */ React41.createElement(ThreeDActionButton, { onClick: () => approveSection("idApproved"), disabled: isAnyUploading || isReadOnly, className: "w-fit shrink-0" }, "Approve Data"), !isReadOnly && /* @__PURE__ */ React41.createElement("button", { onClick: () => deleteBusinessDocument("id"), disabled: isAnyUploading, className: "px-6 py-2 bg-white border border-neutral-100 text-neutral-500 text-[11px] rounded-full tracking-widest hover:bg-neutral-50 transition-colors outline-none disabled:opacity-50 disabled:cursor-not-allowed" }, "Delete & Re-upload")))) : /* @__PURE__ */ React41.createElement("div", { className: " flex items-center justify-between bg-emerald-50 p-6 rounded-full" }, /* @__PURE__ */ React41.createElement("div", null, /* @__PURE__ */ React41.createElement("p", { className: "text-sm text-emerald-800" }, "ID Document Verified"), /* @__PURE__ */ React41.createElement("p", { className: "text-xs text-emerald-600 mt-1" }, "Data safely extracted and stored.")), !isReadOnly && /* @__PURE__ */ React41.createElement("button", { onClick: () => editSection("idApproved"), className: "p-2 text-emerald-700 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ React41.createElement(HugeiconsIcon25, { icon: PencilEdit01Icon2, size: 16 })))), /* @__PURE__ */ React41.createElement("div", { className: "flex flex-col gap-4 pt-6 animate-in slide-in-from-top-4 duration-500" }, /* @__PURE__ */ React41.createElement("div", { className: "flex flex-col gap-3 " }, !formState.passportApproved && !globalUploadingPassport ? /* @__PURE__ */ React41.createElement("button", { onClick: () => !isReadOnly && !isAnyUploading && passportRef.current?.click(), disabled: isReadOnly || isAnyUploading, className: `flex items-center gap-3 p-4 border border-neutral-100 rounded-full transition-colors text-sm w-full outline-none ${isAnyUploading ? "opacity-50 cursor-not-allowed bg-neutral-50 text-neutral-400" : "text-black hover:bg-neutral-50"}` }, /* @__PURE__ */ React41.createElement(HugeiconsIcon25, { icon: Upload01Icon3, size: 18, className: "text-neutral-400" }), " Upload Passport Photo") : globalUploadingPassport && !formData.passportFileUrl ? /* @__PURE__ */ React41.createElement("div", { className: "flex items-center gap-3 p-4 border border-neutral-100 rounded-full bg-neutral-50 text-neutral-500 text-sm w-full" }, /* @__PURE__ */ React41.createElement(HugeiconsIcon25, { icon: Loading03Icon12, size: 18, className: "animate-spin text-black" }), " Uploading Passport...") : /* @__PURE__ */ React41.createElement("div", { className: "flex items-center justify-between p-4 bg-emerald-50 rounded-full text-emerald-800 text-sm w-full" }, /* @__PURE__ */ React41.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ React41.createElement(HugeiconsIcon25, { icon: IdentificationIcon, size: 18 }), " Passport Uploaded"), !isReadOnly && /* @__PURE__ */ React41.createElement("button", { onClick: () => deleteBusinessDocument("passport"), disabled: isAnyUploading, className: "text-emerald-700 hover:text-red-500 transition-colors p-1 outline-none shrink-0 disabled:opacity-50 disabled:cursor-not-allowed" }, /* @__PURE__ */ React41.createElement(HugeiconsIcon25, { icon: Delete02Icon2, size: 16 }))), !formState.signatureApproved && !globalUploadingSignature ? /* @__PURE__ */ React41.createElement("button", { onClick: () => !isReadOnly && !isAnyUploading && signatureRef.current?.click(), disabled: isReadOnly || isAnyUploading, className: `flex items-center gap-3 p-4 border border-neutral-100 rounded-full transition-colors text-sm w-full outline-none ${isAnyUploading ? "opacity-50 cursor-not-allowed bg-neutral-50 text-neutral-400" : "text-black hover:bg-neutral-50"}` }, /* @__PURE__ */ React41.createElement(HugeiconsIcon25, { icon: Upload01Icon3, size: 18, className: "text-neutral-400" }), " Upload Signature") : globalUploadingSignature && !formData.signatureFileUrl ? /* @__PURE__ */ React41.createElement("div", { className: "flex items-center gap-3 p-4 border border-neutral-100 rounded-full bg-neutral-50 text-neutral-500 text-sm w-full" }, /* @__PURE__ */ React41.createElement(HugeiconsIcon25, { icon: Loading03Icon12, size: 18, className: "animate-spin text-black" }), " Uploading Signature...") : /* @__PURE__ */ React41.createElement("div", { className: "flex items-center justify-between p-4 bg-emerald-50 rounded-full text-emerald-800 text-sm w-full" }, /* @__PURE__ */ React41.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ React41.createElement(HugeiconsIcon25, { icon: SignatureIcon, size: 18 }), " Signature Uploaded"), !isReadOnly && /* @__PURE__ */ React41.createElement("button", { onClick: () => deleteBusinessDocument("signature"), disabled: isAnyUploading, className: "text-emerald-700 hover:text-red-500 transition-colors p-1 outline-none shrink-0 disabled:opacity-50 disabled:cursor-not-allowed" }, /* @__PURE__ */ React41.createElement(HugeiconsIcon25, { icon: Delete02Icon2, size: 16 })))))), /* @__PURE__ */ React41.createElement("div", { className: "flex flex-col gap-4 pt-6 border-t border-neutral-100 animate-in slide-in-from-top-4 duration-500" }, /* @__PURE__ */ React41.createElement("input", { type: "file", accept: "image/jpeg, image/png, image/webp, application/pdf", ref: other1Ref, onChange: (e) => handleOptionalUpload(e, "other1"), disabled: isAnyUploading || isReadOnly, className: "hidden" }), /* @__PURE__ */ React41.createElement("input", { type: "file", accept: "image/jpeg, image/png, image/webp, application/pdf", ref: other2Ref, onChange: (e) => handleOptionalUpload(e, "other2"), disabled: isAnyUploading || isReadOnly, className: "hidden" }), /* @__PURE__ */ React41.createElement("input", { type: "file", accept: "image/jpeg, image/png, image/webp, application/pdf", ref: other3Ref, onChange: (e) => handleOptionalUpload(e, "other3"), disabled: isAnyUploading || isReadOnly, className: "hidden" }), /* @__PURE__ */ React41.createElement("div", { className: "flex flex-col gap-1 mb-2" }, /* @__PURE__ */ React41.createElement("h3", { className: "text-sm text-black" }, "Additional Documents (Optional)"), /* @__PURE__ */ React41.createElement("p", { className: "text-xs text-neutral-500 leading-relaxed" }, "If your ", type === "company" ? "company" : "business", " involves regulated professional services, please upload relevant licenses, certificates, or permits here (up to 3 documents).")), /* @__PURE__ */ React41.createElement("div", { className: "flex flex-col gap-3" }, [1, 2, 3].map((num) => {
3483
3483
  const docType = `other${num}`;
3484
3484
  const ref = num === 1 ? other1Ref : num === 2 ? other2Ref : other3Ref;
3485
3485
  const isUploading = num === 1 ? isUploadingOther1 : num === 2 ? isUploadingOther2 : isUploadingOther3;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@retinalabsllc/zairusjs",
3
- "version": "0.5.7",
3
+ "version": "0.5.8",
4
4
  "description": "A perceptive, Ai data driven Next.js UI component library.",
5
5
  "author": "Retina Labs Company",
6
6
  "license": "MIT",