@retinalabsllc/zairusjs 0.6.1 → 0.6.3
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.d.mts +29 -1
- package/dist/index.d.ts +29 -1
- package/dist/index.js +188 -114
- package/dist/index.mjs +175 -97
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -35,6 +35,7 @@ __export(index_exports, {
|
|
|
35
35
|
AiApproveDecline: () => AiApproveDecline,
|
|
36
36
|
AiStageCheck: () => AiStageCheck,
|
|
37
37
|
AppBento2: () => AppBento2,
|
|
38
|
+
Banner: () => Banner,
|
|
38
39
|
Faq: () => Faq,
|
|
39
40
|
FeatureScroll: () => FeatureScroll,
|
|
40
41
|
Footer: () => Footer,
|
|
@@ -667,7 +668,7 @@ var HeroSection = ({
|
|
|
667
668
|
backgroundImage: `url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E")`
|
|
668
669
|
}
|
|
669
670
|
}
|
|
670
|
-
), /* @__PURE__ */ import_react10.default.createElement("div", { className: "relative max-w-5xl mx-auto px-4 sm:px-6 w-full flex flex-col items-center text-center z-10" }, badgeText && /* @__PURE__ */ import_react10.default.createElement("div", { className: "inline-flex items-center gap-1.5 mb-6 px-4 py-1.5 rounded-full bg-white/10 backdrop-blur-md shadow-xs" }, /* @__PURE__ */ import_react10.default.createElement("span", { className: "text-[10px] tracking-[0.4em] text-white uppercase" }, badgeText)), /* @__PURE__ */ import_react10.default.createElement("h1", { className: " text-[40px] font-
|
|
671
|
+
), /* @__PURE__ */ import_react10.default.createElement("div", { className: "relative max-w-5xl mx-auto px-4 sm:px-6 w-full flex flex-col items-center text-center z-10" }, badgeText && /* @__PURE__ */ import_react10.default.createElement("div", { className: "inline-flex items-center gap-1.5 mb-6 px-4 py-1.5 rounded-full bg-white/10 backdrop-blur-md shadow-xs" }, /* @__PURE__ */ import_react10.default.createElement("span", { className: "text-[10px] tracking-[0.4em] text-white uppercase" }, badgeText)), /* @__PURE__ */ import_react10.default.createElement("h1", { className: " text-[40px] font-light md:text-5xl lg:text-7xl text-white tracking-tight leading-[1.05] max-w-4xl mb-4" }, titlePrefix), /* @__PURE__ */ import_react10.default.createElement("div", { className: "flex justify-center mt-2 mb-10 md:mb-14" }, /* @__PURE__ */ import_react10.default.createElement("span", { className: "relative font-serif inline-block mx-1.5 px-4 py-2 md:py-3 bg-[#21a473]/25 border border-[#3ae9a8] rounded-sm text-white select-none text-4xl lg:text-6xl tracking-tight" }, /* @__PURE__ */ import_react10.default.createElement("span", { className: "absolute top-[-3.5px] left-[-3.5px] w-2 h-2 bg-white border border-[#21a473] rounded-[1px] z-10" }), /* @__PURE__ */ import_react10.default.createElement("span", { className: "absolute top-[-3.5px] right-[-3.5px] w-2 h-2 bg-white border border-[#21a473] rounded-[1px] z-10" }), /* @__PURE__ */ import_react10.default.createElement("span", { className: "absolute bottom-[-3.5px] left-[-3.5px] w-2 h-2 bg-white border border-[#21a473] rounded-[1px] z-10" }), /* @__PURE__ */ import_react10.default.createElement("span", { className: "absolute bottom-[-3.5px] right-[-3.5px] w-2 h-2 bg-white border border-[#21a473] rounded-[1px] z-10" }), highlightText, /* @__PURE__ */ import_react10.default.createElement("span", { className: "absolute -bottom-5 -right-5 flex items-center z-20 pointer-events-none select-none filter drop-shadow-[0_2px_4px_rgba(0,0,0,0.25)]" }, /* @__PURE__ */ import_react10.default.createElement("svg", { width: "18", height: "22", viewBox: "0 0 16 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: "transform -rotate-12" }, /* @__PURE__ */ import_react10.default.createElement("path", { d: "M1 1V17.8L5.8 13.1H12.8L1 1Z", fill: "#21a473", stroke: "white", strokeWidth: "1.8", strokeLinejoin: "round" })), /* @__PURE__ */ import_react10.default.createElement("span", { className: "ml-1 bg-[#21a473] text-[10px] text-white px-2 py-0.5 rounded-full border border-white tracking-wide" }, cursorLabel)))), subtitle && /* @__PURE__ */ import_react10.default.createElement("p", { className: "text-[13px] md:text-[15px] text-[#bbf7df]/90 max-w-xl mx-auto mb-10 font-light leading-relaxed" }, subtitle), /* @__PURE__ */ import_react10.default.createElement("div", { className: "flex flex-col sm:flex-row gap-4 justify-center items-center w-full px-2 sm:px-0 mx-auto mb-10" }, ctaText && ctaHref && /* @__PURE__ */ import_react10.default.createElement("div", { className: "w-full sm:w-60 flex justify-center *:w-full" }, /* @__PURE__ */ import_react10.default.createElement(ThreeDButton, { href: ctaHref }, ctaText)), secondaryCtaText && secondaryCtaHref && /* @__PURE__ */ import_react10.default.createElement(
|
|
671
672
|
import_link4.default,
|
|
672
673
|
{
|
|
673
674
|
href: secondaryCtaHref,
|
|
@@ -1582,6 +1583,14 @@ var UniversalSidebar = ({
|
|
|
1582
1583
|
"aria-label": "Open Menu"
|
|
1583
1584
|
},
|
|
1584
1585
|
/* @__PURE__ */ import_react37.default.createElement(import_react38.HugeiconsIcon, { icon: import_core_free_icons9.SidebarLeft01Icon, size: 18 })
|
|
1586
|
+
), showBackButton && /* @__PURE__ */ import_react37.default.createElement(
|
|
1587
|
+
import_link9.default,
|
|
1588
|
+
{
|
|
1589
|
+
href: backUrl,
|
|
1590
|
+
className: "fixed top-4 right-4 md:top-6 md:right-8 z-40 w-10 h-10 bg-white rounded-full flex items-center justify-center shadow-[0_4px_20px_rgba(0,0,0,0.08)] border border-neutral-100 text-black hover:bg-neutral-50 transition-all duration-300 outline-none",
|
|
1591
|
+
"aria-label": "Go Back"
|
|
1592
|
+
},
|
|
1593
|
+
/* @__PURE__ */ import_react37.default.createElement(import_react38.HugeiconsIcon, { icon: import_core_free_icons9.ArrowLeft01Icon, size: 18 })
|
|
1585
1594
|
), /* @__PURE__ */ import_react37.default.createElement(
|
|
1586
1595
|
"div",
|
|
1587
1596
|
{
|
|
@@ -1598,7 +1607,7 @@ var UniversalSidebar = ({
|
|
|
1598
1607
|
${isCollapsed ? "md:w-16 w-64" : "w-64"}
|
|
1599
1608
|
`
|
|
1600
1609
|
},
|
|
1601
|
-
/* @__PURE__ */ import_react37.default.createElement("div", { className: `flex items-center shrink-0 p-5 ${isCollapsed && !isMobileOpen ? "justify-center" : "justify-between"}` }, !isCollapsed || isMobileOpen
|
|
1610
|
+
/* @__PURE__ */ import_react37.default.createElement("div", { className: `flex items-center shrink-0 p-5 ${isCollapsed && !isMobileOpen ? "justify-center min-h-18" : "justify-between"}` }, (!isCollapsed || isMobileOpen) && /* @__PURE__ */ import_react37.default.createElement(import_link9.default, { href: homeUrl, className: "flex flex-col justify-center outline-none group min-w-0 pr-2" }, /* @__PURE__ */ import_react37.default.createElement("span", { className: "text-[13px] font-serif text-black leading-none truncate tracking-wide mb-1 group-hover:opacity-70 transition-opacity" }, title), subtitle && /* @__PURE__ */ import_react37.default.createElement("span", { className: "text-[9px] text-neutral-500 truncate tracking-[0.2em] leading-none" }, subtitle)), /* @__PURE__ */ import_react37.default.createElement("div", { className: "md:hidden flex shrink-0" }, /* @__PURE__ */ import_react37.default.createElement(
|
|
1602
1611
|
"button",
|
|
1603
1612
|
{
|
|
1604
1613
|
onClick: closeMobile,
|
|
@@ -1630,15 +1639,7 @@ var UniversalSidebar = ({
|
|
|
1630
1639
|
(!isCollapsed || isMobileOpen) && /* @__PURE__ */ import_react37.default.createElement("span", { className: "text-xs tracking-wide truncate" }, item.name)
|
|
1631
1640
|
);
|
|
1632
1641
|
})),
|
|
1633
|
-
/* @__PURE__ */ import_react37.default.createElement("div", { className: "p-4 shrink-0 flex flex-col gap-2
|
|
1634
|
-
import_link9.default,
|
|
1635
|
-
{
|
|
1636
|
-
href: backUrl,
|
|
1637
|
-
className: "w-8 h-8 shrink-0 rounded-full bg-neutral-50 flex items-center justify-center text-neutral-500 hover:text-black hover:bg-neutral-100 transition-all outline-none group",
|
|
1638
|
-
title: "Go Back"
|
|
1639
|
-
},
|
|
1640
|
-
/* @__PURE__ */ import_react37.default.createElement(import_react38.HugeiconsIcon, { icon: import_core_free_icons9.ArrowLeft01Icon, size: 16, className: "transition-transform group-hover:-translate-x-0.5" })
|
|
1641
|
-
), showWorkspaceSwitcher && workspaces && workspaces.length > 0 && /* @__PURE__ */ import_react37.default.createElement(
|
|
1642
|
+
/* @__PURE__ */ import_react37.default.createElement("div", { className: "p-4 shrink-0 flex flex-col gap-2 " }, (showWorkspaceSwitcher || showLogoutAction) && /* @__PURE__ */ import_react37.default.createElement("div", { className: `flex gap-2 px-1 pb-2 ${isCollapsed && !isMobileOpen ? "flex-col items-center" : "items-center"}` }, showWorkspaceSwitcher && workspaces && workspaces.length > 0 && /* @__PURE__ */ import_react37.default.createElement(
|
|
1642
1643
|
"button",
|
|
1643
1644
|
{
|
|
1644
1645
|
onClick: () => setShowSwitcherDialog(true),
|
|
@@ -2693,7 +2694,67 @@ var UniversalAgentConsole = ({
|
|
|
2693
2694
|
};
|
|
2694
2695
|
|
|
2695
2696
|
// src/components/UniversalOverviewPage.tsx
|
|
2697
|
+
var import_react52 = __toESM(require("react"));
|
|
2698
|
+
|
|
2699
|
+
// src/components/Banner.tsx
|
|
2696
2700
|
var import_react50 = __toESM(require("react"));
|
|
2701
|
+
var import_react51 = require("@hugeicons/react");
|
|
2702
|
+
var import_core_free_icons14 = require("@hugeicons/core-free-icons");
|
|
2703
|
+
var Banner = ({
|
|
2704
|
+
title,
|
|
2705
|
+
message,
|
|
2706
|
+
type,
|
|
2707
|
+
icon,
|
|
2708
|
+
isDismissible = true,
|
|
2709
|
+
onDismiss,
|
|
2710
|
+
action
|
|
2711
|
+
}) => {
|
|
2712
|
+
const [isVisible, setIsVisible] = (0, import_react50.useState)(true);
|
|
2713
|
+
if (!isVisible) return null;
|
|
2714
|
+
const handleDismiss = () => {
|
|
2715
|
+
setIsVisible(false);
|
|
2716
|
+
if (onDismiss) onDismiss();
|
|
2717
|
+
};
|
|
2718
|
+
const config = {
|
|
2719
|
+
success: {
|
|
2720
|
+
bg: "bg-emerald-50",
|
|
2721
|
+
iconColor: "text-emerald-600",
|
|
2722
|
+
titleColor: "text-emerald-900",
|
|
2723
|
+
msgColor: "text-emerald-700",
|
|
2724
|
+
defaultIcon: import_core_free_icons14.CheckmarkBadge01Icon,
|
|
2725
|
+
closeHover: "hover:bg-emerald-100 text-emerald-500"
|
|
2726
|
+
},
|
|
2727
|
+
warning: {
|
|
2728
|
+
bg: "bg-amber-50",
|
|
2729
|
+
iconColor: "text-amber-600",
|
|
2730
|
+
titleColor: "text-amber-900",
|
|
2731
|
+
msgColor: "text-amber-700",
|
|
2732
|
+
defaultIcon: import_core_free_icons14.InformationCircleIcon,
|
|
2733
|
+
closeHover: "hover:bg-amber-100 text-amber-500"
|
|
2734
|
+
},
|
|
2735
|
+
alert: {
|
|
2736
|
+
bg: "bg-red-50",
|
|
2737
|
+
iconColor: "text-red-600",
|
|
2738
|
+
titleColor: "text-red-900",
|
|
2739
|
+
msgColor: "text-red-700",
|
|
2740
|
+
defaultIcon: import_core_free_icons14.Alert02Icon,
|
|
2741
|
+
closeHover: "hover:bg-red-100 text-red-500"
|
|
2742
|
+
}
|
|
2743
|
+
};
|
|
2744
|
+
const currentConfig = config[type];
|
|
2745
|
+
const IconToUse = icon || currentConfig.defaultIcon;
|
|
2746
|
+
return /* @__PURE__ */ import_react50.default.createElement("div", { className: `relative w-full rounded-2xl p-4 flex items-start gap-4 transition-all duration-300 animate-in fade-in slide-in-from-top-2 ${currentConfig.bg}` }, /* @__PURE__ */ import_react50.default.createElement("div", { className: `shrink-0 mt-0.5 ${currentConfig.iconColor}` }, /* @__PURE__ */ import_react50.default.createElement(import_react51.HugeiconsIcon, { icon: IconToUse, size: 20 })), /* @__PURE__ */ import_react50.default.createElement("div", { className: "flex-1 flex flex-col min-w-0 pr-6" }, /* @__PURE__ */ import_react50.default.createElement("h4", { className: `text-sm font-medium tracking-tight mb-1 ${currentConfig.titleColor}` }, title), /* @__PURE__ */ import_react50.default.createElement("p", { className: `text-xs leading-relaxed ${currentConfig.msgColor}` }, message), action && /* @__PURE__ */ import_react50.default.createElement("div", { className: "mt-3" }, action)), isDismissible && /* @__PURE__ */ import_react50.default.createElement(
|
|
2747
|
+
"button",
|
|
2748
|
+
{
|
|
2749
|
+
onClick: handleDismiss,
|
|
2750
|
+
className: `absolute top-3 right-3 p-1.5 rounded-full transition-colors outline-none shrink-0 ${currentConfig.closeHover}`,
|
|
2751
|
+
"aria-label": "Dismiss banner"
|
|
2752
|
+
},
|
|
2753
|
+
/* @__PURE__ */ import_react50.default.createElement(import_react51.HugeiconsIcon, { icon: import_core_free_icons14.Cancel01Icon, size: 16 })
|
|
2754
|
+
));
|
|
2755
|
+
};
|
|
2756
|
+
|
|
2757
|
+
// src/components/UniversalOverviewPage.tsx
|
|
2697
2758
|
var UniversalOverviewPage = ({
|
|
2698
2759
|
headerTitle,
|
|
2699
2760
|
headerDescription,
|
|
@@ -2701,9 +2762,21 @@ var UniversalOverviewPage = ({
|
|
|
2701
2762
|
detailsTitle = "Details",
|
|
2702
2763
|
details,
|
|
2703
2764
|
primaryAction,
|
|
2704
|
-
alerts = []
|
|
2765
|
+
alerts = [],
|
|
2766
|
+
banner
|
|
2705
2767
|
}) => {
|
|
2706
|
-
return /* @__PURE__ */
|
|
2768
|
+
return /* @__PURE__ */ import_react52.default.createElement("div", { className: "flex flex-col gap-8 animate-in fade-in duration-300 pb-10" }, /* @__PURE__ */ import_react52.default.createElement("div", { className: "flex items-center justify-between gap-4" }, /* @__PURE__ */ import_react52.default.createElement("div", null, /* @__PURE__ */ import_react52.default.createElement("h1", { className: " font-serif text-xl text-black mb-1 tracking-tight" }, headerTitle), /* @__PURE__ */ import_react52.default.createElement("p", { className: "text-xs text-neutral-500" }, headerDescription))), quickStats.length > 0 && /* @__PURE__ */ import_react52.default.createElement("div", { className: "w-full rounded-2xl overflow-hidden max-w-3xl bg-white" }, /* @__PURE__ */ import_react52.default.createElement("div", { className: "grid grid-cols-1 md:grid-cols-3 divide-y md:divide-y-0 md:divide-x divide-neutral-100" }, quickStats.map((stat, idx) => /* @__PURE__ */ import_react52.default.createElement("div", { key: idx, className: "p-6 flex items-center gap-4 hover:bg-neutral-50/50 transition-colors min-w-0" }, /* @__PURE__ */ import_react52.default.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__ */ import_react52.default.createElement("div", { className: "min-w-0 flex-1" }, /* @__PURE__ */ import_react52.default.createElement("p", { className: "text-[10px] tracking-[0.2em] text-neutral-400 mb-1 truncate uppercase" }, stat.label), /* @__PURE__ */ import_react52.default.createElement("p", { className: "text-lg md:text-xl text-black tracking-tight truncate" }, stat.value)))))), banner && banner.isVisible && /* @__PURE__ */ import_react52.default.createElement("div", { className: "w-full max-w-3xl" }, /* @__PURE__ */ import_react52.default.createElement(
|
|
2769
|
+
Banner,
|
|
2770
|
+
{
|
|
2771
|
+
title: banner.title,
|
|
2772
|
+
message: banner.message,
|
|
2773
|
+
type: banner.type,
|
|
2774
|
+
icon: banner.icon,
|
|
2775
|
+
isDismissible: banner.isDismissible,
|
|
2776
|
+
onDismiss: banner.onDismiss,
|
|
2777
|
+
action: banner.action
|
|
2778
|
+
}
|
|
2779
|
+
)), /* @__PURE__ */ import_react52.default.createElement("div", { className: "w-full rounded-2xl max-w-3xl overflow-hidden bg-white min-w-0" }, /* @__PURE__ */ import_react52.default.createElement("div", { className: "p-6 sm:p-8 flex flex-col h-full min-w-0 gap-6" }, /* @__PURE__ */ import_react52.default.createElement("div", { className: "flex flex-wrap items-center justify-between gap-4 border-b border-neutral-100 pb-4" }, /* @__PURE__ */ import_react52.default.createElement("h3", { className: " font-serif text-[11px] text-black tracking-[0.2em] uppercase" }, detailsTitle), primaryAction && (primaryAction.href ? /* @__PURE__ */ import_react52.default.createElement(
|
|
2707
2780
|
ThreeDButton,
|
|
2708
2781
|
{
|
|
2709
2782
|
href: primaryAction.href,
|
|
@@ -2712,7 +2785,7 @@ var UniversalOverviewPage = ({
|
|
|
2712
2785
|
},
|
|
2713
2786
|
primaryAction.label,
|
|
2714
2787
|
primaryAction.icon
|
|
2715
|
-
) : /* @__PURE__ */
|
|
2788
|
+
) : /* @__PURE__ */ import_react52.default.createElement(
|
|
2716
2789
|
ThreeDActionButton,
|
|
2717
2790
|
{
|
|
2718
2791
|
onClick: primaryAction.onClick,
|
|
@@ -2721,19 +2794,19 @@ var UniversalOverviewPage = ({
|
|
|
2721
2794
|
},
|
|
2722
2795
|
primaryAction.label,
|
|
2723
2796
|
primaryAction.icon
|
|
2724
|
-
))), /* @__PURE__ */
|
|
2797
|
+
))), /* @__PURE__ */ import_react52.default.createElement("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-8" }, details.map((detail, idx) => /* @__PURE__ */ import_react52.default.createElement("div", { key: idx, className: "min-w-0" }, /* @__PURE__ */ import_react52.default.createElement("p", { className: "text-[10px] tracking-[0.2em] text-neutral-400 mb-1.5 uppercase" }, detail.label), /* @__PURE__ */ import_react52.default.createElement("p", { className: "text-[13px] text-black truncate" }, detail.value)))), alerts.map((alert, idx) => {
|
|
2725
2798
|
const bgClass = alert.type === "warning" ? "bg-amber-50/50" : alert.type === "info" ? "bg-blue-50/50" : "bg-red-50/50";
|
|
2726
2799
|
const textClass = alert.type === "warning" ? "text-amber-600" : alert.type === "info" ? "text-blue-600" : "text-red-600";
|
|
2727
2800
|
const valClass = alert.type === "warning" ? "text-amber-700" : alert.type === "info" ? "text-blue-700" : "text-red-700";
|
|
2728
2801
|
const lblClass = alert.type === "warning" ? "text-amber-400" : alert.type === "info" ? "text-blue-400" : "text-red-400";
|
|
2729
|
-
return /* @__PURE__ */
|
|
2802
|
+
return /* @__PURE__ */ import_react52.default.createElement("div", { key: idx, className: `mt-4 p-5 rounded-xl flex flex-col gap-4 ${bgClass}` }, /* @__PURE__ */ import_react52.default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ import_react52.default.createElement("span", { className: `text-[11px] tracking-widest uppercase ${textClass}` }, alert.title)), alert.items.map((item, itemIdx) => /* @__PURE__ */ import_react52.default.createElement("div", { key: itemIdx }, /* @__PURE__ */ import_react52.default.createElement("span", { className: `text-[10px] tracking-[0.2em] block mb-1 uppercase ${lblClass}` }, item.label), /* @__PURE__ */ import_react52.default.createElement("p", { className: `text-[13px] leading-relaxed ${valClass}` }, item.text))));
|
|
2730
2803
|
}))));
|
|
2731
2804
|
};
|
|
2732
2805
|
|
|
2733
2806
|
// src/components/UniversalErrorView.tsx
|
|
2734
|
-
var
|
|
2735
|
-
var
|
|
2736
|
-
var
|
|
2807
|
+
var import_react53 = __toESM(require("react"));
|
|
2808
|
+
var import_react54 = require("@hugeicons/react");
|
|
2809
|
+
var import_core_free_icons15 = require("@hugeicons/core-free-icons");
|
|
2737
2810
|
var UniversalErrorView = ({
|
|
2738
2811
|
isBooting,
|
|
2739
2812
|
isLoading,
|
|
@@ -2745,7 +2818,7 @@ var UniversalErrorView = ({
|
|
|
2745
2818
|
returnLabel = "Return to Workspace"
|
|
2746
2819
|
}) => {
|
|
2747
2820
|
if (isBooting || isLoading && !activeData) {
|
|
2748
|
-
return /* @__PURE__ */
|
|
2821
|
+
return /* @__PURE__ */ import_react53.default.createElement("div", { className: "flex items-center justify-center h-screen w-full bg-transparent" }, /* @__PURE__ */ import_react53.default.createElement(PageSpinner, null));
|
|
2749
2822
|
}
|
|
2750
2823
|
if (!isLoading && (!activeData || activeError)) {
|
|
2751
2824
|
const errorString = typeof activeError === "string" ? activeError : JSON.stringify(activeError || "");
|
|
@@ -2756,7 +2829,7 @@ var UniversalErrorView = ({
|
|
|
2756
2829
|
const apiMessage = typeof activeError === "string" && activeError.trim() !== "" ? activeError : null;
|
|
2757
2830
|
let title = "Oops Connection Error";
|
|
2758
2831
|
let description = apiMessage || `We could not load your request. Please check your connection and try again.`;
|
|
2759
|
-
let IconComponent =
|
|
2832
|
+
let IconComponent = import_core_free_icons15.ConfusedIcon;
|
|
2760
2833
|
if (isNotFoundError) {
|
|
2761
2834
|
title = "Oops its not your fault";
|
|
2762
2835
|
description = apiMessage || `We could not reach the ${envName} you just loaded. Our team has been notified.`;
|
|
@@ -2764,7 +2837,7 @@ var UniversalErrorView = ({
|
|
|
2764
2837
|
title = "Access Restricted";
|
|
2765
2838
|
description = apiMessage || `You have insufficient permissions to view this ${envName}. Please contact your administrator.`;
|
|
2766
2839
|
}
|
|
2767
|
-
return /* @__PURE__ */
|
|
2840
|
+
return /* @__PURE__ */ import_react53.default.createElement("div", { className: "flex flex-col items-center justify-center h-screen w-full px-4 animate-in fade-in duration-500" }, /* @__PURE__ */ import_react53.default.createElement("div", { className: "mb-4 flex justify-center" }, /* @__PURE__ */ import_react53.default.createElement(import_react54.HugeiconsIcon, { icon: IconComponent, size: 48, className: "text-neutral-300" })), /* @__PURE__ */ import_react53.default.createElement("h2", { className: " font-serif text-lg text-black tracking-tight " }, title), /* @__PURE__ */ import_react53.default.createElement("p", { className: "text-xs mt-2 mb-8 text-neutral-500 max-w-sm text-center leading-relaxed" }, description), /* @__PURE__ */ import_react53.default.createElement("div", { className: "flex flex-col sm:flex-row items-center gap-3 w-full justify-center sm:w-auto" }, isNotFoundError || isPermissionError ? /* @__PURE__ */ import_react53.default.createElement(
|
|
2768
2841
|
"button",
|
|
2769
2842
|
{
|
|
2770
2843
|
onClick: () => window.location.href = returnUrl,
|
|
@@ -2773,14 +2846,14 @@ var UniversalErrorView = ({
|
|
|
2773
2846
|
returnLabel
|
|
2774
2847
|
) : (
|
|
2775
2848
|
// Soft errors (Network timeouts) allow them to retry or optionally retreat
|
|
2776
|
-
/* @__PURE__ */
|
|
2849
|
+
/* @__PURE__ */ import_react53.default.createElement(import_react53.default.Fragment, null, envName.toLowerCase().includes("application") && /* @__PURE__ */ import_react53.default.createElement(
|
|
2777
2850
|
"button",
|
|
2778
2851
|
{
|
|
2779
2852
|
onClick: () => window.location.href = returnUrl,
|
|
2780
2853
|
className: "px-6 py-2 bg-transparent border border-neutral-100 hover:bg-neutral-50 text-neutral-600 hover:text-black rounded-full text-[11px] tracking-widest transition-colors w-full sm:w-auto outline-none"
|
|
2781
2854
|
},
|
|
2782
2855
|
"Back Home"
|
|
2783
|
-
), /* @__PURE__ */
|
|
2856
|
+
), /* @__PURE__ */ import_react53.default.createElement(
|
|
2784
2857
|
"button",
|
|
2785
2858
|
{
|
|
2786
2859
|
onClick: onRetry,
|
|
@@ -2795,9 +2868,9 @@ var UniversalErrorView = ({
|
|
|
2795
2868
|
};
|
|
2796
2869
|
|
|
2797
2870
|
// src/components/UniversalLookupPage.tsx
|
|
2798
|
-
var
|
|
2799
|
-
var
|
|
2800
|
-
var
|
|
2871
|
+
var import_react55 = __toESM(require("react"));
|
|
2872
|
+
var import_react56 = require("@hugeicons/react");
|
|
2873
|
+
var import_core_free_icons16 = require("@hugeicons/core-free-icons");
|
|
2801
2874
|
var UniversalLookupPage = ({
|
|
2802
2875
|
headerTitle,
|
|
2803
2876
|
headerDescription,
|
|
@@ -2811,9 +2884,9 @@ var UniversalLookupPage = ({
|
|
|
2811
2884
|
resultContent,
|
|
2812
2885
|
modals
|
|
2813
2886
|
}) => {
|
|
2814
|
-
const [isTypeModalOpen, setIsTypeModalOpen] = (0,
|
|
2887
|
+
const [isTypeModalOpen, setIsTypeModalOpen] = (0, import_react55.useState)(false);
|
|
2815
2888
|
const currentOptionLabel = searchOptions.find((opt) => opt.value === selectedSearchType)?.label || "Select Type";
|
|
2816
|
-
return /* @__PURE__ */
|
|
2889
|
+
return /* @__PURE__ */ import_react55.default.createElement("div", { className: "flex flex-col max-w-3xl rounded-2xl p-6 bg-white gap-8 animate-in fade-in duration-300 pb-20" }, /* @__PURE__ */ import_react55.default.createElement(ManagedToaster, null), /* @__PURE__ */ import_react55.default.createElement("div", { className: "flex flex-col sm:flex-row sm:items-start justify-between gap-3 sm:gap-4" }, /* @__PURE__ */ import_react55.default.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ import_react55.default.createElement("h1", { className: " font-serif text-xl text-black mb-1 truncate tracking-tight" }, headerTitle), /* @__PURE__ */ import_react55.default.createElement("p", { className: "text-xs text-neutral-500 truncate" }, headerDescription))), /* @__PURE__ */ import_react55.default.createElement("div", { className: "w-full max-w-2xl pb-8" }, /* @__PURE__ */ import_react55.default.createElement("form", { className: "flex flex-col gap-6", onSubmit: onSearch, autoComplete: "off" }, /* @__PURE__ */ import_react55.default.createElement("div", { className: "flex gap-4" }, /* @__PURE__ */ import_react55.default.createElement(
|
|
2817
2890
|
"button",
|
|
2818
2891
|
{
|
|
2819
2892
|
type: "button",
|
|
@@ -2821,7 +2894,7 @@ var UniversalLookupPage = ({
|
|
|
2821
2894
|
className: "mt-2 text-[12px] tracking-widest bg-transparent border-b border-neutral-100 text-black text-left outline-none focus:border-black shrink-0 uppercase"
|
|
2822
2895
|
},
|
|
2823
2896
|
currentOptionLabel
|
|
2824
|
-
), /* @__PURE__ */
|
|
2897
|
+
), /* @__PURE__ */ import_react55.default.createElement("div", { className: "flex-1" }, /* @__PURE__ */ import_react55.default.createElement(
|
|
2825
2898
|
TextInput,
|
|
2826
2899
|
{
|
|
2827
2900
|
placeholder: "Enter Exact ID, Email, or Slug...",
|
|
@@ -2829,7 +2902,7 @@ var UniversalLookupPage = ({
|
|
|
2829
2902
|
onChange: onSearchQueryChange,
|
|
2830
2903
|
disabled: isSearching
|
|
2831
2904
|
}
|
|
2832
|
-
))), /* @__PURE__ */
|
|
2905
|
+
))), /* @__PURE__ */ import_react55.default.createElement("div", { className: "flex justify-end" }, /* @__PURE__ */ import_react55.default.createElement(
|
|
2833
2906
|
ThreeDActionButton,
|
|
2834
2907
|
{
|
|
2835
2908
|
type: "submit",
|
|
@@ -2837,9 +2910,9 @@ var UniversalLookupPage = ({
|
|
|
2837
2910
|
isLoading: isSearching,
|
|
2838
2911
|
className: "min-w-32"
|
|
2839
2912
|
},
|
|
2840
|
-
/* @__PURE__ */
|
|
2913
|
+
/* @__PURE__ */ import_react55.default.createElement(import_react56.HugeiconsIcon, { icon: import_core_free_icons16.Search01Icon, size: 14, className: "mr-2" }),
|
|
2841
2914
|
" Lookup"
|
|
2842
|
-
)))), resultContent && /* @__PURE__ */
|
|
2915
|
+
)))), resultContent && /* @__PURE__ */ import_react55.default.createElement("div", { className: "w-full max-w-2xl bg-white text-left animate-in fade-in slide-in-from-bottom-4" }, /* @__PURE__ */ import_react55.default.createElement("h3", { className: " font-serif text-[10px] text-neutral-400 tracking-[0.2em] mb-6 uppercase" }, "Entity Record Found"), resultContent), isTypeModalOpen && /* @__PURE__ */ import_react55.default.createElement("div", { className: "fixed inset-0 z-110 flex items-center justify-center p-4" }, /* @__PURE__ */ import_react55.default.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setIsTypeModalOpen(false) }), /* @__PURE__ */ import_react55.default.createElement("div", { className: "relative w-80 bg-white shadow-2xl rounded-2xl flex flex-col items-center overflow-hidden animate-in zoom-in-95 duration-200" }, /* @__PURE__ */ import_react55.default.createElement("div", { className: "p-6 text-center w-full" }, /* @__PURE__ */ import_react55.default.createElement("h3", { className: " font-serif text-[14px] text-black tracking-tight mb-2" }, "Select Entity Type")), /* @__PURE__ */ import_react55.default.createElement("div", { className: "w-full flex flex-col pl-2 pr-2 pb-2" }, searchOptions.map((option) => /* @__PURE__ */ import_react55.default.createElement(
|
|
2843
2916
|
"button",
|
|
2844
2917
|
{
|
|
2845
2918
|
key: option.value,
|
|
@@ -2850,16 +2923,16 @@ var UniversalLookupPage = ({
|
|
|
2850
2923
|
},
|
|
2851
2924
|
className: `text-left px-4 py-3 text-[12px] tracking-wide transition-colors rounded-full flex items-center justify-between outline-none ${selectedSearchType === option.value ? "bg-neutral-100 text-black" : "text-neutral-500 hover:bg-neutral-50 hover:text-black"}`
|
|
2852
2925
|
},
|
|
2853
|
-
/* @__PURE__ */
|
|
2854
|
-
selectedSearchType === option.value && /* @__PURE__ */
|
|
2855
|
-
))), /* @__PURE__ */
|
|
2926
|
+
/* @__PURE__ */ import_react55.default.createElement("span", { className: "truncate pr-2" }, option.label),
|
|
2927
|
+
selectedSearchType === option.value && /* @__PURE__ */ import_react55.default.createElement("div", { className: "w-1.5 h-1.5 bg-black rounded-full shrink-0" })
|
|
2928
|
+
))), /* @__PURE__ */ import_react55.default.createElement("div", { className: "w-full flex" }, /* @__PURE__ */ import_react55.default.createElement("button", { type: "button", onClick: () => setIsTypeModalOpen(false), className: "w-full py-2.5 text-[13px] text-neutral-600 hover:bg-neutral-50 transition-colors outline-none" }, "Cancel")))), modals);
|
|
2856
2929
|
};
|
|
2857
2930
|
|
|
2858
2931
|
// src/components/UniversalDirectoryPage.tsx
|
|
2859
|
-
var
|
|
2860
|
-
var
|
|
2861
|
-
var
|
|
2862
|
-
var PageSpinner4 = () => /* @__PURE__ */
|
|
2932
|
+
var import_react57 = __toESM(require("react"));
|
|
2933
|
+
var import_react58 = require("@hugeicons/react");
|
|
2934
|
+
var import_core_free_icons17 = require("@hugeicons/core-free-icons");
|
|
2935
|
+
var PageSpinner4 = () => /* @__PURE__ */ import_react57.default.createElement("div", { className: "flex justify-center items-center py-12" }, /* @__PURE__ */ import_react57.default.createElement(import_react58.HugeiconsIcon, { icon: import_core_free_icons17.Loading03Icon, size: 32, className: "animate-spin mb-4 text-black" }));
|
|
2863
2936
|
var UniversalDirectoryPage = ({
|
|
2864
2937
|
headerTitle,
|
|
2865
2938
|
headerDescription,
|
|
@@ -2881,33 +2954,33 @@ var UniversalDirectoryPage = ({
|
|
|
2881
2954
|
detailsContent,
|
|
2882
2955
|
modals
|
|
2883
2956
|
}) => {
|
|
2884
|
-
return /* @__PURE__ */
|
|
2957
|
+
return /* @__PURE__ */ import_react57.default.createElement("div", { className: "flex flex-col gap-8 animate-in max-w-3xl fade-in duration-300 p-6 rounded-2xl bg-white" }, /* @__PURE__ */ import_react57.default.createElement(ManagedToaster, null), /* @__PURE__ */ import_react57.default.createElement("div", { className: "flex flex-col sm:flex-row sm:items-start justify-between gap-4" }, currentView === "list" ? /* @__PURE__ */ import_react57.default.createElement(import_react57.default.Fragment, null, /* @__PURE__ */ import_react57.default.createElement("div", { className: "w-full" }, /* @__PURE__ */ import_react57.default.createElement("h1", { className: " font-serif text-xl text-black mb-1 tracking-tight" }, headerTitle), /* @__PURE__ */ import_react57.default.createElement("p", { className: "text-xs text-neutral-500 mb-6" }, headerDescription), !hideSearch && /* @__PURE__ */ import_react57.default.createElement(
|
|
2885
2958
|
TextInput,
|
|
2886
2959
|
{
|
|
2887
2960
|
placeholder: searchPlaceholder,
|
|
2888
2961
|
value: searchQuery,
|
|
2889
2962
|
onChange: onSearchChange
|
|
2890
2963
|
}
|
|
2891
|
-
)), headerAction && /* @__PURE__ */
|
|
2964
|
+
)), headerAction && /* @__PURE__ */ import_react57.default.createElement("div", { className: "shrink-0 w-full sm:w-auto mt-4 sm:mt-0" }, headerAction)) : /* @__PURE__ */ import_react57.default.createElement("div", { className: "flex flex-col items-start gap-3" }, /* @__PURE__ */ import_react57.default.createElement("button", { onClick: onBackToList, className: "text-[10px] text-neutral-400 hover:text-black tracking-[0.2em] flex items-center gap-1.5 transition-colors outline-none uppercase" }, /* @__PURE__ */ import_react57.default.createElement(import_react58.HugeiconsIcon, { icon: import_core_free_icons17.ArrowLeft01Icon, size: 12 }), " Back"))), currentView === "list" && /* @__PURE__ */ import_react57.default.createElement("div", { className: "w-full overflow-hidden pt-2" }, isLoading ? /* @__PURE__ */ import_react57.default.createElement(PageSpinner4, null) : /* @__PURE__ */ import_react57.default.createElement("div", { className: "flex flex-col min-w-0" }, /* @__PURE__ */ import_react57.default.createElement("div", { className: "divide-y divide-neutral-100" }, items.length === 0 ? /* @__PURE__ */ import_react57.default.createElement(import_react57.default.Fragment, null, /* @__PURE__ */ import_react57.default.createElement("p", { className: "text-xs text-neutral-500 py-6 text-center" }, "No records found.")) : items.map((item) => /* @__PURE__ */ import_react57.default.createElement(
|
|
2892
2965
|
"div",
|
|
2893
2966
|
{
|
|
2894
2967
|
key: item.id,
|
|
2895
2968
|
onClick: () => onRowClick(item.id),
|
|
2896
2969
|
className: "flex items-center justify-between p-4 sm:p-5 hover:bg-neutral-50/50 transition-colors cursor-pointer group min-w-0"
|
|
2897
2970
|
},
|
|
2898
|
-
/* @__PURE__ */
|
|
2899
|
-
item.rightBadge && /* @__PURE__ */
|
|
2900
|
-
))), totalPages > 1 && /* @__PURE__ */
|
|
2971
|
+
/* @__PURE__ */ import_react57.default.createElement("div", { className: "flex items-center gap-3 sm:gap-4 min-w-0 flex-1" }, /* @__PURE__ */ import_react57.default.createElement("div", { className: "w-10 h-10 shrink-0 rounded-full flex items-center justify-center bg-neutral-100 text-black text-xs" }, item.icon), /* @__PURE__ */ import_react57.default.createElement("div", { className: "min-w-0 flex-1" }, /* @__PURE__ */ import_react57.default.createElement("div", { className: "text-sm text-black truncate pr-2" }, item.primaryText), /* @__PURE__ */ import_react57.default.createElement("div", { className: "text-xs text-neutral-500 truncate pr-2 mt-0.5" }, item.secondaryText))),
|
|
2972
|
+
item.rightBadge && /* @__PURE__ */ import_react57.default.createElement("div", { className: "shrink-0 pl-2" }, /* @__PURE__ */ import_react57.default.createElement("span", { className: `text-[10px] tracking-[0.2em] px-3 py-1 rounded-full whitespace-nowrap uppercase ${item.rightBadgeClass || "text-neutral-500 border border-neutral-100 bg-white"}` }, item.rightBadge))
|
|
2973
|
+
))), totalPages > 1 && /* @__PURE__ */ import_react57.default.createElement("div", { className: "flex items-center justify-between p-4 sm:p-5" }, /* @__PURE__ */ import_react57.default.createElement("span", { className: "text-[10px] text-neutral-400 tracking-[0.2em] uppercase" }, "Page ", currentPage, " of ", totalPages), /* @__PURE__ */ import_react57.default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ import_react57.default.createElement("button", { onClick: () => onPageChange(currentPage - 1), disabled: currentPage === 1 || isLoading, className: "p-2 border border-neutral-100 rounded-full bg-white text-neutral-500 hover:text-black outline-none disabled:opacity-30" }, /* @__PURE__ */ import_react57.default.createElement(import_react58.HugeiconsIcon, { icon: import_core_free_icons17.ArrowLeft01Icon, size: 14 })), /* @__PURE__ */ import_react57.default.createElement("button", { onClick: () => onPageChange(currentPage + 1), disabled: currentPage >= totalPages || isLoading, className: "p-2 border border-neutral-100 rounded-full bg-white text-neutral-500 hover:text-black outline-none disabled:opacity-30" }, /* @__PURE__ */ import_react57.default.createElement(import_react58.HugeiconsIcon, { icon: import_core_free_icons17.ArrowRight01Icon, size: 14 })))))), currentView === "details" && detailsContent, modals);
|
|
2901
2974
|
};
|
|
2902
2975
|
|
|
2903
2976
|
// src/components/AiApproveDecline.tsx
|
|
2904
|
-
var
|
|
2905
|
-
var
|
|
2906
|
-
var
|
|
2977
|
+
var import_react59 = __toESM(require("react"));
|
|
2978
|
+
var import_react60 = require("@hugeicons/react");
|
|
2979
|
+
var import_core_free_icons18 = require("@hugeicons/core-free-icons");
|
|
2907
2980
|
var AiApproveDecline = ({ suggestionTitle, suggestionValue, onApprove, onDecline, onEdit }) => {
|
|
2908
|
-
const [isEditing, setIsEditing] = (0,
|
|
2909
|
-
const [editVal, setEditVal] = (0,
|
|
2910
|
-
return /* @__PURE__ */
|
|
2981
|
+
const [isEditing, setIsEditing] = (0, import_react59.useState)(false);
|
|
2982
|
+
const [editVal, setEditVal] = (0, import_react59.useState)(typeof suggestionValue === "string" ? suggestionValue : "");
|
|
2983
|
+
return /* @__PURE__ */ import_react59.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_react59.default.createElement("div", null, /* @__PURE__ */ import_react59.default.createElement("span", { className: "text-[10px] tracking-widest text-purple-600 block mb-1 uppercase" }, "AI Suggestion: ", suggestionTitle), !isEditing ? /* @__PURE__ */ import_react59.default.createElement("div", { className: "text-sm text-black" }, suggestionValue) : /* @__PURE__ */ import_react59.default.createElement(
|
|
2911
2984
|
"input",
|
|
2912
2985
|
{
|
|
2913
2986
|
type: "text",
|
|
@@ -2916,45 +2989,45 @@ var AiApproveDecline = ({ suggestionTitle, suggestionValue, onApprove, onDecline
|
|
|
2916
2989
|
className: "w-full text-sm p-2 border-b border-purple-200 bg-transparent outline-none focus:border-purple-400 transition-colors",
|
|
2917
2990
|
autoFocus: true
|
|
2918
2991
|
}
|
|
2919
|
-
)), /* @__PURE__ */
|
|
2992
|
+
)), /* @__PURE__ */ import_react59.default.createElement("div", { className: "flex items-center gap-1 mt-2" }, !isEditing ? /* @__PURE__ */ import_react59.default.createElement(import_react59.default.Fragment, null, /* @__PURE__ */ import_react59.default.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__ */ import_react59.default.createElement(import_react60.HugeiconsIcon, { icon: import_core_free_icons18.CheckmarkCircle01Icon, size: 28 })), /* @__PURE__ */ import_react59.default.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__ */ import_react59.default.createElement(import_react60.HugeiconsIcon, { icon: import_core_free_icons18.CancelCircleIcon, size: 28 })), onEdit && /* @__PURE__ */ import_react59.default.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__ */ import_react59.default.createElement(import_react60.HugeiconsIcon, { icon: import_core_free_icons18.PencilEdit01Icon, size: 18 }))) : /* @__PURE__ */ import_react59.default.createElement(import_react59.default.Fragment, null, /* @__PURE__ */ import_react59.default.createElement("button", { onClick: () => {
|
|
2920
2993
|
onEdit?.(editVal);
|
|
2921
2994
|
setIsEditing(false);
|
|
2922
|
-
}, 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__ */
|
|
2995
|
+
}, 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__ */ import_react59.default.createElement(import_react60.HugeiconsIcon, { icon: import_core_free_icons18.CheckmarkCircle01Icon, size: 28 })), /* @__PURE__ */ import_react59.default.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__ */ import_react59.default.createElement(import_react60.HugeiconsIcon, { icon: import_core_free_icons18.CancelCircleIcon, size: 28 })))));
|
|
2923
2996
|
};
|
|
2924
2997
|
|
|
2925
2998
|
// src/components/AiStageCheck.tsx
|
|
2926
|
-
var
|
|
2927
|
-
var
|
|
2928
|
-
var
|
|
2999
|
+
var import_react61 = __toESM(require("react"));
|
|
3000
|
+
var import_react62 = require("@hugeicons/react");
|
|
3001
|
+
var import_core_free_icons19 = require("@hugeicons/core-free-icons");
|
|
2929
3002
|
var AiStageCheck = ({ tasks }) => {
|
|
2930
|
-
return /* @__PURE__ */
|
|
3003
|
+
return /* @__PURE__ */ import_react61.default.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__ */ import_react61.default.createElement("span", { className: "text-[10px] tracking-widest text-purple-600 mb-1 uppercase" }, "AI Processing"), tasks.map((task) => /* @__PURE__ */ import_react61.default.createElement("div", { key: task.id, className: "flex items-center gap-3" }, task.status === "pending" && /* @__PURE__ */ import_react61.default.createElement("div", { className: "w-4 h-4 rounded-full border border-purple-200" }), task.status === "loading" && /* @__PURE__ */ import_react61.default.createElement(import_react62.HugeiconsIcon, { icon: import_core_free_icons19.Loading03Icon, size: 16, className: "animate-spin text-purple-500" }), task.status === "success" && /* @__PURE__ */ import_react61.default.createElement(import_react62.HugeiconsIcon, { icon: import_core_free_icons19.CheckmarkCircle02Icon, size: 16, className: "text-emerald-500" }), task.status === "error" && /* @__PURE__ */ import_react61.default.createElement(import_react62.HugeiconsIcon, { icon: import_core_free_icons19.CancelCircleIcon, size: 16, className: "text-red-500" }), /* @__PURE__ */ import_react61.default.createElement("span", { className: `text-xs transition-colors ${task.status === "success" ? "text-black" : task.status === "loading" ? "text-purple-700" : "text-neutral-500"}` }, task.label))));
|
|
2931
3004
|
};
|
|
2932
3005
|
|
|
2933
3006
|
// src/components/Stagger.tsx
|
|
2934
|
-
var
|
|
2935
|
-
var
|
|
2936
|
-
var
|
|
3007
|
+
var import_react63 = __toESM(require("react"));
|
|
3008
|
+
var import_react64 = require("@hugeicons/react");
|
|
3009
|
+
var import_core_free_icons20 = require("@hugeicons/core-free-icons");
|
|
2937
3010
|
var Stagger = ({ steps, currentStep }) => {
|
|
2938
3011
|
const getIconForStep = (stepName) => {
|
|
2939
3012
|
const lowerName = stepName.toLowerCase();
|
|
2940
|
-
if (lowerName.includes("document")) return
|
|
2941
|
-
if (lowerName.includes("review")) return
|
|
2942
|
-
if (lowerName.includes("submit")) return
|
|
2943
|
-
return
|
|
3013
|
+
if (lowerName.includes("document")) return import_core_free_icons20.Upload01Icon;
|
|
3014
|
+
if (lowerName.includes("review")) return import_core_free_icons20.FileSyncIcon;
|
|
3015
|
+
if (lowerName.includes("submit")) return import_core_free_icons20.CloudUploadIcon;
|
|
3016
|
+
return import_core_free_icons20.Briefcase02Icon;
|
|
2944
3017
|
};
|
|
2945
|
-
return /* @__PURE__ */
|
|
3018
|
+
return /* @__PURE__ */ import_react63.default.createElement("div", { className: "w-full flex items-center justify-between relative z-0" }, /* @__PURE__ */ import_react63.default.createElement("div", { className: "absolute left-0 top-1/2 -translate-y-1/2 w-full h-px bg-neutral-200 -z-10" }), /* @__PURE__ */ import_react63.default.createElement("div", { className: "absolute left-0 top-1/2 -translate-y-1/2 h-px bg-emerald-500 -z-10 transition-all duration-500", style: { width: `${currentStep / (steps.length - 1) * 100}%` } }), steps.map((step, idx) => {
|
|
2946
3019
|
const isActive = idx === currentStep;
|
|
2947
3020
|
const isPassed = idx < currentStep;
|
|
2948
3021
|
const colorClass = isPassed ? "bg-emerald-500 text-white" : isActive ? "bg-neutral-200 text-neutral-500" : "bg-neutral-200 text-neutral-500";
|
|
2949
|
-
return /* @__PURE__ */
|
|
3022
|
+
return /* @__PURE__ */ import_react63.default.createElement("div", { key: step, className: `w-6 h-6 rounded-full flex items-center justify-center transition-colors duration-300 ${colorClass}` }, /* @__PURE__ */ import_react63.default.createElement(import_react64.HugeiconsIcon, { icon: getIconForStep(step), size: 11 }));
|
|
2950
3023
|
}));
|
|
2951
3024
|
};
|
|
2952
3025
|
|
|
2953
3026
|
// src/components/UniversalRegistrationFlow.tsx
|
|
2954
|
-
var
|
|
3027
|
+
var import_react65 = __toESM(require("react"));
|
|
2955
3028
|
var import_react_hot_toast7 = __toESM(require("react-hot-toast"));
|
|
2956
|
-
var
|
|
2957
|
-
var
|
|
3029
|
+
var import_react66 = require("@hugeicons/react");
|
|
3030
|
+
var import_core_free_icons21 = require("@hugeicons/core-free-icons");
|
|
2958
3031
|
var MACRO_STEPS = ["Details", "Documents", "Review", "Submit"];
|
|
2959
3032
|
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"];
|
|
2960
3033
|
var MEMBER_ROLES = ["Director Only", "Shareholder Only", "Both Director & Shareholder"];
|
|
@@ -2967,12 +3040,12 @@ var UniversalRegistrationFlow = ({
|
|
|
2967
3040
|
onRedirectToBilling,
|
|
2968
3041
|
onRedirectToApplication
|
|
2969
3042
|
}) => {
|
|
2970
|
-
const [isBooting, setIsBooting] = (0,
|
|
2971
|
-
const [macroStep, setMacroStep] = (0,
|
|
2972
|
-
const [appStatus, setAppStatus] = (0,
|
|
2973
|
-
const [isAbortModalOpen, setIsAbortModalOpen] = (0,
|
|
2974
|
-
const [isAborting, setIsAborting] = (0,
|
|
2975
|
-
const [formState, setFormState] = (0,
|
|
3043
|
+
const [isBooting, setIsBooting] = (0, import_react65.useState)(true);
|
|
3044
|
+
const [macroStep, setMacroStep] = (0, import_react65.useState)(0);
|
|
3045
|
+
const [appStatus, setAppStatus] = (0, import_react65.useState)("");
|
|
3046
|
+
const [isAbortModalOpen, setIsAbortModalOpen] = (0, import_react65.useState)(false);
|
|
3047
|
+
const [isAborting, setIsAborting] = (0, import_react65.useState)(false);
|
|
3048
|
+
const [formState, setFormState] = (0, import_react65.useState)({
|
|
2976
3049
|
natureApproved: false,
|
|
2977
3050
|
nameApproved: false,
|
|
2978
3051
|
addressApproved: false,
|
|
@@ -2983,13 +3056,13 @@ var UniversalRegistrationFlow = ({
|
|
|
2983
3056
|
passportApproved: false,
|
|
2984
3057
|
signatureApproved: false
|
|
2985
3058
|
});
|
|
2986
|
-
const idRef = (0,
|
|
2987
|
-
const passportRef = (0,
|
|
2988
|
-
const signatureRef = (0,
|
|
2989
|
-
const other1Ref = (0,
|
|
2990
|
-
const other2Ref = (0,
|
|
2991
|
-
const other3Ref = (0,
|
|
2992
|
-
const [formData, setFormData] = (0,
|
|
3059
|
+
const idRef = (0, import_react65.useRef)(null);
|
|
3060
|
+
const passportRef = (0, import_react65.useRef)(null);
|
|
3061
|
+
const signatureRef = (0, import_react65.useRef)(null);
|
|
3062
|
+
const other1Ref = (0, import_react65.useRef)(null);
|
|
3063
|
+
const other2Ref = (0, import_react65.useRef)(null);
|
|
3064
|
+
const other3Ref = (0, import_react65.useRef)(null);
|
|
3065
|
+
const [formData, setFormData] = (0, import_react65.useState)({
|
|
2993
3066
|
businessDesc: "",
|
|
2994
3067
|
natureOfBusiness: null,
|
|
2995
3068
|
proposedName: "",
|
|
@@ -3016,22 +3089,22 @@ var UniversalRegistrationFlow = ({
|
|
|
3016
3089
|
otherDoc3Url: "",
|
|
3017
3090
|
otherDoc3Meta: null
|
|
3018
3091
|
});
|
|
3019
|
-
const [activeModal, setActiveModal] = (0,
|
|
3020
|
-
const [iAgree, setIAgree] = (0,
|
|
3021
|
-
const [isAnalyzingNature, setIsAnalyzingNature] = (0,
|
|
3022
|
-
const [suggestedNature, setSuggestedNature] = (0,
|
|
3023
|
-
const [isCheckingQualifier, setIsCheckingQualifier] = (0,
|
|
3024
|
-
const [qualifierCheckResult, setQualifierCheckResult] = (0,
|
|
3025
|
-
const [isCheckingName, setIsCheckingName] = (0,
|
|
3026
|
-
const [nameCheckResult, setNameCheckResult] = (0,
|
|
3027
|
-
const [globalExtractingId, setGlobalExtractingId] = (0,
|
|
3028
|
-
const [globalUploadingPassport, setGlobalUploadingPassport] = (0,
|
|
3029
|
-
const [globalUploadingSignature, setGlobalUploadingSignature] = (0,
|
|
3030
|
-
const [isUploadingOther1, setIsUploadingOther1] = (0,
|
|
3031
|
-
const [isUploadingOther2, setIsUploadingOther2] = (0,
|
|
3032
|
-
const [isUploadingOther3, setIsUploadingOther3] = (0,
|
|
3033
|
-
const [aiTasks, setAiTasks] = (0,
|
|
3034
|
-
const [isSubmitting, setIsSubmitting] = (0,
|
|
3092
|
+
const [activeModal, setActiveModal] = (0, import_react65.useState)({ isOpen: false, type: null, memberIndex: null });
|
|
3093
|
+
const [iAgree, setIAgree] = (0, import_react65.useState)(false);
|
|
3094
|
+
const [isAnalyzingNature, setIsAnalyzingNature] = (0, import_react65.useState)(false);
|
|
3095
|
+
const [suggestedNature, setSuggestedNature] = (0, import_react65.useState)(null);
|
|
3096
|
+
const [isCheckingQualifier, setIsCheckingQualifier] = (0, import_react65.useState)(false);
|
|
3097
|
+
const [qualifierCheckResult, setQualifierCheckResult] = (0, import_react65.useState)(null);
|
|
3098
|
+
const [isCheckingName, setIsCheckingName] = (0, import_react65.useState)(false);
|
|
3099
|
+
const [nameCheckResult, setNameCheckResult] = (0, import_react65.useState)(null);
|
|
3100
|
+
const [globalExtractingId, setGlobalExtractingId] = (0, import_react65.useState)(false);
|
|
3101
|
+
const [globalUploadingPassport, setGlobalUploadingPassport] = (0, import_react65.useState)(false);
|
|
3102
|
+
const [globalUploadingSignature, setGlobalUploadingSignature] = (0, import_react65.useState)(false);
|
|
3103
|
+
const [isUploadingOther1, setIsUploadingOther1] = (0, import_react65.useState)(false);
|
|
3104
|
+
const [isUploadingOther2, setIsUploadingOther2] = (0, import_react65.useState)(false);
|
|
3105
|
+
const [isUploadingOther3, setIsUploadingOther3] = (0, import_react65.useState)(false);
|
|
3106
|
+
const [aiTasks, setAiTasks] = (0, import_react65.useState)([]);
|
|
3107
|
+
const [isSubmitting, setIsSubmitting] = (0, import_react65.useState)(false);
|
|
3035
3108
|
const isReadOnly = ["PENDING", "AWAITING_PAYMENT", "COMPLETED"].includes(appStatus);
|
|
3036
3109
|
const isAnyUploading = globalExtractingId || globalUploadingPassport || globalUploadingSignature || isUploadingOther1 || isUploadingOther2 || isUploadingOther3;
|
|
3037
3110
|
const baseApi = async (action, payload = {}) => {
|
|
@@ -3046,7 +3119,7 @@ var UniversalRegistrationFlow = ({
|
|
|
3046
3119
|
return { success: false, error: "Network communication failed." };
|
|
3047
3120
|
}
|
|
3048
3121
|
};
|
|
3049
|
-
(0,
|
|
3122
|
+
(0, import_react65.useEffect)(() => {
|
|
3050
3123
|
baseApi("progress_load").then((data) => {
|
|
3051
3124
|
if (data.success && data.data) {
|
|
3052
3125
|
const meta = data.data;
|
|
@@ -3522,23 +3595,23 @@ var UniversalRegistrationFlow = ({
|
|
|
3522
3595
|
const isStep0Valid = type === "company" ? formState.natureApproved && formState.nameApproved && formState.addressApproved && formState.membersDetailsApproved : formState.natureApproved && formState.nameApproved && formState.addressApproved && formState.ownerApproved;
|
|
3523
3596
|
const isStep1Valid = type === "company" ? formState.membersDocsApproved : formState.idApproved && formState.passportApproved && formState.signatureApproved;
|
|
3524
3597
|
const titleText = type === "company" ? "Company Incorporation (LLC)" : "Business Name Registration";
|
|
3525
|
-
if (isBooting) return /* @__PURE__ */
|
|
3598
|
+
if (isBooting) return /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex justify-center py-20" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.Loading03Icon, size: 32, className: "animate-spin text-black" }));
|
|
3526
3599
|
if (!["DRAFT", "QUEUED", "REJECTED"].includes(appStatus) && appStatus !== "") {
|
|
3527
|
-
return /* @__PURE__ */
|
|
3600
|
+
return /* @__PURE__ */ import_react65.default.createElement("div", { className: "w-full max-w-3xl mx-auto bg-white rounded-4xl p-6 sm:p-10 flex flex-col items-center justify-center text-center gap-5 animate-in fade-in slide-in-from-bottom-2 duration-500 mb-20 py-24" }, appStatus === "COMPLETED" ? /* @__PURE__ */ import_react65.default.createElement(import_react65.default.Fragment, null, /* @__PURE__ */ import_react65.default.createElement("div", { className: "w-20 h-20 bg-neutral-50 text-neutral-500 rounded-full flex items-center justify-center mb-2" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.CheckmarkBadge01Icon, size: 35 })), /* @__PURE__ */ import_react65.default.createElement("h2", { className: "text-xl font-serif text-black" }, "Registration Completed"), /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-sm text-neutral-500 max-w-md" }, "Your application has been successfully verified and registered.")) : appStatus === "PENDING" ? /* @__PURE__ */ import_react65.default.createElement(import_react65.default.Fragment, null, /* @__PURE__ */ import_react65.default.createElement("div", { className: "w-20 h-20 bg-neutral-50 text-neutral-500 rounded-full flex items-center justify-center mb-2" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.HourglassIcon, size: 35, className: "animate-spin" })), /* @__PURE__ */ import_react65.default.createElement("h2", { className: "text-xl font-serif text-black" }, "Application is Pending"), /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-sm text-neutral-500 max-w-md" }, "Your application is currently pending review.")) : appStatus === "AWAITING_PAYMENT" ? /* @__PURE__ */ import_react65.default.createElement(import_react65.default.Fragment, null, /* @__PURE__ */ import_react65.default.createElement("div", { className: "w-20 h-20 bg-amber-50 text-amber-500 rounded-full flex items-center justify-center mb-2" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.HourglassIcon, size: 35, className: "animate-pulse" })), /* @__PURE__ */ import_react65.default.createElement("h2", { className: "text-xl font-serif text-black" }, "Awaiting Payment"), /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-sm text-neutral-500 max-w-md" }, "Your application is complete and awaiting government fee settlement. Please go to the Billing tab to authorize payment."), /* @__PURE__ */ import_react65.default.createElement("div", { className: "mt-6 flex flex-col items-center gap-3" }, /* @__PURE__ */ import_react65.default.createElement("button", { onClick: onRedirectToBilling, className: "px-8 py-3 bg-black text-white text-[11px] tracking-widest rounded-full hover:bg-neutral-800 outline-none" }, "Go to Billing & Invoices"), /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => setIsAbortModalOpen(true), className: "px-8 py-3 border border-neutral-100 text-neutral-600 text-[11px] tracking-widest rounded-full hover:bg-neutral-50 outline-none" }, "Abort & Edit Application"))) : /* @__PURE__ */ import_react65.default.createElement(import_react65.default.Fragment, null, /* @__PURE__ */ import_react65.default.createElement("div", { className: "w-20 h-20 bg-neutral-50 text-neutral-500 rounded-full flex items-center justify-center mb-2" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.HourglassIcon, size: 35 })), /* @__PURE__ */ import_react65.default.createElement("h2", { className: "text-xl font-serif text-black" }, "Application Submitted"), /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-sm text-neutral-500 max-w-md" }, "Your application is currently ", appStatus.replace(/_/g, " ").toLowerCase(), "."), ["AWAITING_PAYMENT", "READY_FOR_SUBMISSION", "AWAITING_CONFIRMATION"].includes(appStatus) && /* @__PURE__ */ import_react65.default.createElement("div", { className: "mt-6 flex flex-col items-center gap-3" }, /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => setIsAbortModalOpen(true), className: "px-8 py-3 border border-neutral-100 text-neutral-600 text-[11px] tracking-widest rounded-full hover:bg-neutral-50 outline-none" }, "Abort Application"))), isAbortModalOpen && /* @__PURE__ */ import_react65.default.createElement("div", { className: "fixed inset-0 z-110 flex items-center justify-center p-4" }, /* @__PURE__ */ import_react65.default.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => !isAborting && setIsAbortModalOpen(false) }), /* @__PURE__ */ import_react65.default.createElement("div", { className: "relative w-100 bg-white shadow-2xl rounded-3xl flex flex-col overflow-hidden animate-in zoom-in-95 duration-200 text-left" }, /* @__PURE__ */ import_react65.default.createElement("div", { className: "p-6 flex flex-col gap-4 text-center" }, /* @__PURE__ */ import_react65.default.createElement("h3", { className: "text-[17px] font-serif text-black tracking-tight" }, "Abort Application?"), /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-[12px] text-neutral-500 leading-relaxed" }, "Are you sure you want to abort? If you have already made a payment, returning to draft may cause issues. Your invoice will be deleted.")), /* @__PURE__ */ import_react65.default.createElement("div", { className: "w-full flex " }, /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => setIsAbortModalOpen(false), disabled: isAborting, className: "flex-1 py-4 text-[13px] text-neutral-500 hover:bg-neutral-50 transition-colors outline-none disabled:opacity-50" }, "Cancel"), /* @__PURE__ */ import_react65.default.createElement("button", { onClick: handleAbort, disabled: isAborting, className: "flex-1 py-4 text-[13px] text-red-500 hover:bg-neutral-50 transition-colors outline-none disabled:opacity-50" }, isAborting ? "Aborting..." : "Yes, Abort")))));
|
|
3528
3601
|
}
|
|
3529
|
-
return /* @__PURE__ */
|
|
3602
|
+
return /* @__PURE__ */ import_react65.default.createElement("div", { className: "w-full max-w-3xl mx-auto bg-white rounded-4xl p-6 sm:p-10 flex flex-col gap-10 animate-in fade-in slide-in-from-bottom-2 duration-500 mb-20" }, /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col gap-8" }, /* @__PURE__ */ import_react65.default.createElement("div", null, /* @__PURE__ */ import_react65.default.createElement("h2", { className: "text-xl font-serif text-black tracking-tight mb-1" }, titleText), /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-sm text-neutral-500" }, "Answer the questions below to build your official application.")), /* @__PURE__ */ import_react65.default.createElement("div", { className: "px-2" }, /* @__PURE__ */ import_react65.default.createElement(Stagger, { steps: MACRO_STEPS, currentStep: macroStep }))), /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col gap-8" }, macroStep === 0 && /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col gap-8 animate-in fade-in" }, /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col gap-4" }, /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center text-black" }, /* @__PURE__ */ import_react65.default.createElement("h3", { className: "text-sm " }, "What does your ", type === "company" ? "company" : "business", " do?")), !formState.natureApproved ? /* @__PURE__ */ import_react65.default.createElement(import_react65.default.Fragment, null, /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col gap-3 " }, /* @__PURE__ */ import_react65.default.createElement(TextInput, { label: type === "company" ? "Company Description" : "Business Description", placeholder: "e.g. We provide professional services to clients.", value: formData.businessDesc, onChange: (v) => setFormData({ ...formData, businessDesc: v }), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ import_react65.default.createElement(ThreeDActionButton, { onClick: handleAnalyzeNature, disabled: formData.businessDesc.length < 5 || isAnalyzingNature || isReadOnly, isLoading: isAnalyzingNature, className: "w-fit" }, "Analyze Nature")), isAnalyzingNature && /* @__PURE__ */ import_react65.default.createElement("div", { className: " mt-2" }, /* @__PURE__ */ import_react65.default.createElement(AiStageCheck, { tasks: [{ id: "1", label: "Matching with Official Categories...", status: "loading" }] })), suggestedNature && /* @__PURE__ */ import_react65.default.createElement("div", { className: " mt-2 animate-in fade-in" }, /* @__PURE__ */ import_react65.default.createElement(AiApproveDecline, { suggestionTitle: "Classification Found", suggestionValue: /* @__PURE__ */ import_react65.default.createElement("div", null, /* @__PURE__ */ import_react65.default.createElement("p", { className: " text-black" }, suggestedNature.specificLabel), /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-xs text-neutral-500 mt-1" }, "Category: ", suggestedNature.categoryLabel)), onApprove: () => {
|
|
3530
3603
|
const newForm = { ...formData, natureOfBusiness: suggestedNature };
|
|
3531
3604
|
setFormData(newForm);
|
|
3532
3605
|
approveSection("natureApproved", newForm);
|
|
3533
|
-
}, onDecline: () => setSuggestedNature(null) }))) : /* @__PURE__ */
|
|
3606
|
+
}, 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 text-black" }, /* @__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: () => {
|
|
3534
3607
|
const newForm = { ...formData, approvedName: nameCheckResult.approvedOption };
|
|
3535
3608
|
setFormData(newForm);
|
|
3536
3609
|
approveSection("nameApproved", newForm);
|
|
3537
|
-
}, onDecline: () => setNameCheckResult(null) }) : /* @__PURE__ */
|
|
3538
|
-
}, disabled: isReadOnly || isSubmitting })), /* @__PURE__ */
|
|
3539
|
-
}, disabled: isReadOnly || isSubmitting }), member.role !== "Director Only" && /* @__PURE__ */
|
|
3540
|
-
}, disabled: isReadOnly || isSubmitting }), /* @__PURE__ */
|
|
3541
|
-
}, disabled: isReadOnly || isSubmitting })))), /* @__PURE__ */ import_react63.default.createElement("div", { className: "flex border-b border-neutral-100 items-center justify-between mt-2" }, !isReadOnly && /* @__PURE__ */ import_react63.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_react63.default.createElement(ThreeDActionButton, { onClick: () => approveSection("membersDetailsApproved"), disabled: !areCompanyMembersValid() || isReadOnly, className: "w-fit" }, "Confirm Members"))) : /* @__PURE__ */ import_react63.default.createElement("div", { className: " flex border-b border-neutral-100 items-center justify-between" }, /* @__PURE__ */ import_react63.default.createElement("div", null, /* @__PURE__ */ import_react63.default.createElement("p", { className: "text-sm text-black" }, formData.members.length, " Member(s) Registered"), /* @__PURE__ */ import_react63.default.createElement("p", { className: "text-xs text-neutral-500 mt-1" }, "Total Shares: 100% Verified.")), !isReadOnly && /* @__PURE__ */ import_react63.default.createElement("button", { onClick: () => editSection("membersDetailsApproved"), className: "p-2 text-neutral-400 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ import_react63.default.createElement(import_react64.HugeiconsIcon, { icon: import_core_free_icons20.PencilEdit01Icon, size: 16 })))), formState.addressApproved && type === "business" && /* @__PURE__ */ import_react63.default.createElement("div", { className: "flex flex-col gap-4 pt-6 animate-in slide-in-from-top-4 duration-500" }, /* @__PURE__ */ import_react63.default.createElement("div", { className: "flex items-center text-black" }, /* @__PURE__ */ import_react63.default.createElement("h3", { className: "text-sm " }, "Who owns the business?")), /* @__PURE__ */ import_react63.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_react63.default.createElement("div", { className: "flex flex-col gap-4 " }, /* @__PURE__ */ import_react63.default.createElement(TextInput, { label: "Full Name", value: formData.ownerName, onChange: (v) => setFormData({ ...formData, ownerName: v }), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ import_react63.default.createElement("div", { className: "grid grid-cols-2 gap-4" }, /* @__PURE__ */ import_react63.default.createElement(NumberInput, { label: "Phone Number", value: formData.ownerPhone, onChange: (v) => setFormData({ ...formData, ownerPhone: v }), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ import_react63.default.createElement(TextInput, { label: "Email Address", value: formData.ownerEmail, onChange: (v) => setFormData({ ...formData, ownerEmail: v }), disabled: isReadOnly || isSubmitting })), /* @__PURE__ */ import_react63.default.createElement(ThreeDActionButton, { onClick: () => approveSection("ownerApproved"), disabled: !formData.ownerName || !formData.ownerPhone || !formData.ownerEmail || isReadOnly, className: "w-fit mt-2" }, "Confirm Owner Details")) : /* @__PURE__ */ import_react63.default.createElement("div", { className: " border-b border-neutral-100 flex items-center justify-between" }, /* @__PURE__ */ import_react63.default.createElement("div", null, /* @__PURE__ */ import_react63.default.createElement("p", { className: "text-sm text-black" }, formData.ownerName), /* @__PURE__ */ import_react63.default.createElement("p", { className: "text-xs text-neutral-500 mt-1" }, formData.ownerEmail, " \u2022 ", formData.ownerPhone)), !isReadOnly && /* @__PURE__ */ import_react63.default.createElement("button", { onClick: () => editSection("ownerApproved"), className: "p-2 text-neutral-400 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ import_react63.default.createElement(import_react64.HugeiconsIcon, { icon: import_core_free_icons20.PencilEdit01Icon, size: 16 })))), /* @__PURE__ */ import_react63.default.createElement("div", { className: "flex items-center justify-between mt-8 pt-6 " }, /* @__PURE__ */ import_react63.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_react63.default.createElement(import_react64.HugeiconsIcon, { icon: import_core_free_icons20.ArrowLeft01Icon, size: 14 }), " Close"), /* @__PURE__ */ import_react63.default.createElement(ThreeDActionButton, { onClick: handleNext, disabled: !isStep0Valid, className: "w-fit shrink-0" }, "Next Step"))), macroStep === 1 && /* @__PURE__ */ import_react63.default.createElement("div", { className: "flex flex-col gap-8 animate-in fade-in" }, type === "company" ? /* @__PURE__ */ import_react63.default.createElement(import_react63.default.Fragment, null, /* @__PURE__ */ import_react63.default.createElement("div", { className: "flex flex-col gap-2" }, /* @__PURE__ */ import_react63.default.createElement("h3", { className: "text-sm text-black" }, "Member Identity Documents"), /* @__PURE__ */ import_react63.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_react63.default.createElement("div", { className: "flex flex-col gap-6" }, formData.members.map((member, i) => /* @__PURE__ */ import_react63.default.createElement("div", { key: member.id, className: "flex flex-col gap-4" }, /* @__PURE__ */ import_react63.default.createElement("span", { className: "text-[11px] tracking-widest text-black mb-1" }, member.fullName || `Member ${i + 1}`, " ", /* @__PURE__ */ import_react63.default.createElement("span", { className: "text-neutral-400 ml-2" }, "(", member.role, ")")), /* @__PURE__ */ import_react63.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_react63.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_react63.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_react63.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_react63.default.createElement(import_react64.HugeiconsIcon, { icon: import_core_free_icons20.Upload01Icon, size: 18, className: "text-neutral-400" }), " Upload Valid ID (NIN, License, Voter's Card)") : globalExtractingId && !member.idExtractedData ? /* @__PURE__ */ import_react63.default.createElement("div", { className: " mt-2" }, /* @__PURE__ */ import_react63.default.createElement(AiStageCheck, { tasks: aiTasks })) : member.idExtractedData ? /* @__PURE__ */ import_react63.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_react63.default.createElement("div", null, /* @__PURE__ */ import_react63.default.createElement("span", { className: "text-[10px] tracking-widest text-purple-600 block mb-2" }, "Review Extracted ID"), /* @__PURE__ */ import_react63.default.createElement("div", { className: "flex flex-col gap-4" }, /* @__PURE__ */ import_react63.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_react63.default.createElement("div", { className: "grid grid-cols-2 gap-4" }, /* @__PURE__ */ import_react63.default.createElement(TextInput, { label: "ID Number", value: member.idExtractedData.idNumber, onChange: (v) => updateCompanyMemberInfo(i, "idExtractedData", { ...member.idExtractedData, idNumber: v }), disabled: isReadOnly || isAnyUploading }), /* @__PURE__ */ import_react63.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_react63.default.createElement("div", { className: "flex items-center gap-2 mt-2" }, !isReadOnly && /* @__PURE__ */ import_react63.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_react63.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_react63.default.createElement(import_react64.HugeiconsIcon, { icon: import_core_free_icons20.Upload01Icon, size: 18, className: "text-neutral-400" }), " Upload Passport Photo") : globalUploadingPassport && !member.passportFileUrl ? /* @__PURE__ */ import_react63.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_react63.default.createElement(import_react64.HugeiconsIcon, { icon: import_core_free_icons20.Loading03Icon, size: 18, className: "animate-spin text-black" }), " Uploading Passport...") : member.passportFileUrl ? /* @__PURE__ */ import_react63.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_react63.default.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ import_react63.default.createElement(import_react64.HugeiconsIcon, { icon: import_core_free_icons20.IdentificationIcon, size: 18 }), " Passport Uploaded"), !isReadOnly && /* @__PURE__ */ import_react63.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_react63.default.createElement(import_react64.HugeiconsIcon, { icon: import_core_free_icons20.Delete02Icon, size: 16 }))) : null, !member.signatureFileUrl && !globalUploadingSignature ? /* @__PURE__ */ import_react63.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_react63.default.createElement(import_react64.HugeiconsIcon, { icon: import_core_free_icons20.Upload01Icon, size: 18, className: "text-neutral-400" }), " Upload Signature") : globalUploadingSignature && !member.signatureFileUrl ? /* @__PURE__ */ import_react63.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_react63.default.createElement(import_react64.HugeiconsIcon, { icon: import_core_free_icons20.Loading03Icon, size: 18, className: "animate-spin text-black" }), " Uploading Signature...") : member.signatureFileUrl ? /* @__PURE__ */ import_react63.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_react63.default.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ import_react63.default.createElement(import_react64.HugeiconsIcon, { icon: import_core_free_icons20.SignatureIcon, size: 18 }), " Signature Uploaded"), !isReadOnly && /* @__PURE__ */ import_react63.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_react63.default.createElement(import_react64.HugeiconsIcon, { icon: import_core_free_icons20.Delete02Icon, size: 16 }))) : null)), /* @__PURE__ */ import_react63.default.createElement("div", { className: "flex justify-end" }, /* @__PURE__ */ import_react63.default.createElement(ThreeDActionButton, { onClick: () => approveSection("membersDocsApproved"), disabled: !areCompanyMemberDocsValid() || isReadOnly || isAnyUploading, className: "w-fit" }, "Confirm All Documents"))) : /* @__PURE__ */ import_react63.default.createElement("div", { className: " flex items-center justify-between bg-emerald-50 p-6 rounded-2xl" }, /* @__PURE__ */ import_react63.default.createElement("div", null, /* @__PURE__ */ import_react63.default.createElement("p", { className: "text-sm text-emerald-800" }, "All Member Documents Verified"), /* @__PURE__ */ import_react63.default.createElement("p", { className: "text-xs text-emerald-600 mt-1" }, "Data safely extracted and ready for submission.")), !isReadOnly && /* @__PURE__ */ import_react63.default.createElement("button", { onClick: () => editSection("membersDocsApproved"), className: "p-2 text-emerald-700 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ import_react63.default.createElement(import_react64.HugeiconsIcon, { icon: import_core_free_icons20.PencilEdit01Icon, size: 16 })))) : /* @__PURE__ */ import_react63.default.createElement(import_react63.default.Fragment, null, /* @__PURE__ */ import_react63.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_react63.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_react63.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_react63.default.createElement("div", { className: "flex flex-col gap-4" }, /* @__PURE__ */ import_react63.default.createElement("div", { className: "flex items-center gap-2 text-black" }, /* @__PURE__ */ import_react63.default.createElement("h3", { className: "text-sm " }, "Upload Means of Identification")), /* @__PURE__ */ import_react63.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_react63.default.createElement(import_react63.default.Fragment, null, /* @__PURE__ */ import_react63.default.createElement("button", { onClick: () => !isReadOnly && !isAnyUploading && idRef.current?.click(), disabled: isReadOnly || isAnyUploading, className: `w-full h-32 border border-neutral-100 rounded-full 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_react63.default.createElement(import_react64.HugeiconsIcon, { icon: import_core_free_icons20.Upload01Icon, size: 24, className: "text-neutral-400" }), /* @__PURE__ */ import_react63.default.createElement("span", { className: "text-xs" }, "Select ID Image to Upload")), globalExtractingId && /* @__PURE__ */ import_react63.default.createElement("div", { className: " mt-2" }, /* @__PURE__ */ import_react63.default.createElement(AiStageCheck, { tasks: aiTasks })), formData.idExtractedData && /* @__PURE__ */ import_react63.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_react63.default.createElement("div", null, /* @__PURE__ */ import_react63.default.createElement("span", { className: "text-[10px] tracking-widest text-purple-600 block mb-2" }, "Review AI Extracted Data"), /* @__PURE__ */ import_react63.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_react63.default.createElement("div", { className: "flex flex-col gap-4" }, /* @__PURE__ */ import_react63.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_react63.default.createElement("div", { className: "grid grid-cols-2 gap-4" }, /* @__PURE__ */ import_react63.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_react63.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_react63.default.createElement("div", { className: "flex items-center gap-2 mt-2" }, /* @__PURE__ */ import_react63.default.createElement(ThreeDActionButton, { onClick: () => approveSection("idApproved"), disabled: isAnyUploading || isReadOnly, className: "w-fit shrink-0" }, "Approve Data"), !isReadOnly && /* @__PURE__ */ import_react63.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_react63.default.createElement("div", { className: " flex items-center justify-between bg-emerald-50 p-6 rounded-full" }, /* @__PURE__ */ import_react63.default.createElement("div", null, /* @__PURE__ */ import_react63.default.createElement("p", { className: "text-sm text-emerald-800" }, "ID Document Verified"), /* @__PURE__ */ import_react63.default.createElement("p", { className: "text-xs text-emerald-600 mt-1" }, "Data safely extracted and stored.")), !isReadOnly && /* @__PURE__ */ import_react63.default.createElement("button", { onClick: () => editSection("idApproved"), className: "p-2 text-emerald-700 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ import_react63.default.createElement(import_react64.HugeiconsIcon, { icon: import_core_free_icons20.PencilEdit01Icon, size: 16 })))), /* @__PURE__ */ import_react63.default.createElement("div", { className: "flex flex-col gap-4 pt-6 animate-in slide-in-from-top-4 duration-500" }, /* @__PURE__ */ import_react63.default.createElement("div", { className: "flex flex-col gap-3 " }, !formState.passportApproved && !globalUploadingPassport ? /* @__PURE__ */ import_react63.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_react63.default.createElement(import_react64.HugeiconsIcon, { icon: import_core_free_icons20.Upload01Icon, size: 18, className: "text-neutral-400" }), " Upload Passport Photo") : globalUploadingPassport && !formData.passportFileUrl ? /* @__PURE__ */ import_react63.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_react63.default.createElement(import_react64.HugeiconsIcon, { icon: import_core_free_icons20.Loading03Icon, size: 18, className: "animate-spin text-black" }), " Uploading Passport...") : /* @__PURE__ */ import_react63.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_react63.default.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ import_react63.default.createElement(import_react64.HugeiconsIcon, { icon: import_core_free_icons20.IdentificationIcon, size: 18 }), " Passport Uploaded"), !isReadOnly && /* @__PURE__ */ import_react63.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_react63.default.createElement(import_react64.HugeiconsIcon, { icon: import_core_free_icons20.Delete02Icon, size: 16 }))), !formState.signatureApproved && !globalUploadingSignature ? /* @__PURE__ */ import_react63.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_react63.default.createElement(import_react64.HugeiconsIcon, { icon: import_core_free_icons20.Upload01Icon, size: 18, className: "text-neutral-400" }), " Upload Signature") : globalUploadingSignature && !formData.signatureFileUrl ? /* @__PURE__ */ import_react63.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_react63.default.createElement(import_react64.HugeiconsIcon, { icon: import_core_free_icons20.Loading03Icon, size: 18, className: "animate-spin text-black" }), " Uploading Signature...") : /* @__PURE__ */ import_react63.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_react63.default.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ import_react63.default.createElement(import_react64.HugeiconsIcon, { icon: import_core_free_icons20.SignatureIcon, size: 18 }), " Signature Uploaded"), !isReadOnly && /* @__PURE__ */ import_react63.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_react63.default.createElement(import_react64.HugeiconsIcon, { icon: import_core_free_icons20.Delete02Icon, size: 16 })))))), /* @__PURE__ */ import_react63.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_react63.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_react63.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_react63.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_react63.default.createElement("div", { className: "flex flex-col gap-1 mb-2" }, /* @__PURE__ */ import_react63.default.createElement("h3", { className: "text-sm text-black" }, "Additional Documents (Optional)"), /* @__PURE__ */ import_react63.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_react63.default.createElement("div", { className: "flex flex-col gap-3" }, [1, 2, 3].map((num) => {
|
|
3610
|
+
}, 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 border-b border-neutral-100 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 text-black" }, /* @__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: () => {
|
|
3611
|
+
}, 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 border-b border-neutral-100 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" }, /* @__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: () => {
|
|
3612
|
+
}, 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: () => {
|
|
3613
|
+
}, 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: () => {
|
|
3614
|
+
}, disabled: isReadOnly || isSubmitting })))), /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex border-b border-neutral-100 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 border-b border-neutral-100 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 text-black" }, /* @__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: " border-b border-neutral-100 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.ArrowLeft01Icon, 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-full 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) => {
|
|
3542
3615
|
const docType = `other${num}`;
|
|
3543
3616
|
const ref = num === 1 ? other1Ref : num === 2 ? other2Ref : other3Ref;
|
|
3544
3617
|
const isUploading = num === 1 ? isUploadingOther1 : num === 2 ? isUploadingOther2 : isUploadingOther3;
|
|
@@ -3546,20 +3619,20 @@ var UniversalRegistrationFlow = ({
|
|
|
3546
3619
|
if (!fileUrl && !isUploading) {
|
|
3547
3620
|
const prevUrl = num > 1 ? formData[`otherDoc${num - 1}Url`] : true;
|
|
3548
3621
|
if (!prevUrl) return null;
|
|
3549
|
-
return /* @__PURE__ */
|
|
3622
|
+
return /* @__PURE__ */ import_react65.default.createElement("button", { key: num, onClick: () => !isReadOnly && !isAnyUploading && ref.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 Optional Document ", num);
|
|
3550
3623
|
}
|
|
3551
3624
|
if (isUploading) {
|
|
3552
|
-
return /* @__PURE__ */
|
|
3625
|
+
return /* @__PURE__ */ import_react65.default.createElement("div", { key: num, 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 Document ", num, "...");
|
|
3553
3626
|
}
|
|
3554
|
-
return /* @__PURE__ */
|
|
3555
|
-
}))), /* @__PURE__ */
|
|
3627
|
+
return /* @__PURE__ */ import_react65.default.createElement("div", { key: num, 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.CheckmarkBadge01Icon, size: 18 }), " Optional Document ", num, " Uploaded"), !isReadOnly && /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => deleteOptionalDocument(docType), 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 })));
|
|
3628
|
+
}))), /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center justify-between mt-8 pt-6 " }, /* @__PURE__ */ import_react65.default.createElement("button", { onClick: handleBack, disabled: isAnyUploading, 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 disabled:opacity-50 disabled:cursor-not-allowed" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.ArrowLeft01Icon, size: 14 }), " Back"), /* @__PURE__ */ import_react65.default.createElement(ThreeDActionButton, { onClick: handleNext, disabled: !isStep1Valid || isAnyUploading, className: "w-fit shrink-0" }, "Next Step"))), macroStep === 2 && /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col gap-6 animate-in fade-in" }, /* @__PURE__ */ import_react65.default.createElement("div", null, /* @__PURE__ */ import_react65.default.createElement("h3", { className: "text-sm mb-5 text-black" }, "Application Summary"), /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col gap-4 text-sm" }, /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col sm:flex-row sm:justify-between border-b border-neutral-100 pb-3 gap-1" }, /* @__PURE__ */ import_react65.default.createElement("span", { className: "text-neutral-500 truncate text-[13px] " }, type === "company" ? "Company Name" : "Business Name"), /* @__PURE__ */ import_react65.default.createElement("span", { className: " text-black text-[13px]" }, formData.approvedName)), /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col sm:flex-row sm:justify-between border-b border-neutral-100 pb-3 gap-1" }, /* @__PURE__ */ import_react65.default.createElement("span", { className: "text-neutral-500 text-[13px] " }, "Classification"), /* @__PURE__ */ import_react65.default.createElement("span", { className: " text-black truncate sm:text-right text-[13px] " }, formData.natureOfBusiness?.specificLabel || "Pending")), type === "company" ? /* @__PURE__ */ import_react65.default.createElement(import_react65.default.Fragment, null, /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col sm:flex-row sm:justify-between border-b border-neutral-100 pb-3 gap-1" }, /* @__PURE__ */ import_react65.default.createElement("span", { className: "text-neutral-500 text-[13px] " }, "Total Members"), /* @__PURE__ */ import_react65.default.createElement("span", { className: " text-black truncate text-[13px] " }, formData.members.length, " Directors/Shareholders")), /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col sm:flex-row sm:justify-between border-b border-neutral-100 pb-3 gap-1" }, /* @__PURE__ */ import_react65.default.createElement("span", { className: "text-neutral-500 text-[13px] " }, "Share Capital"), /* @__PURE__ */ import_react65.default.createElement("span", { className: " text-black truncate text-[13px] " }, "100% Allocated"))) : /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col sm:flex-row sm:justify-between border-b border-neutral-100 pb-3 gap-1" }, /* @__PURE__ */ import_react65.default.createElement("span", { className: "text-neutral-500 text-[13px] " }, "Proprietor"), /* @__PURE__ */ import_react65.default.createElement("span", { className: " text-black truncate text-[13px] " }, formData.ownerName)), /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col sm:flex-row sm:justify-between pb-2 gap-1" }, /* @__PURE__ */ import_react65.default.createElement("span", { className: "text-neutral-500 text-[13px] " }, "Documents Attached"), /* @__PURE__ */ import_react65.default.createElement("span", { className: " text-neutral-400 text-[13px] " }, "ID, Passport, Signature")), formData.otherDoc1Url && /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col sm:flex-row sm:justify-between pb-2 gap-1" }, /* @__PURE__ */ import_react65.default.createElement("span", { className: "text-neutral-500 text-[13px] " }, "Optional Documents"), /* @__PURE__ */ import_react65.default.createElement("span", { className: " text-neutral-400 text-[13px] " }, [formData.otherDoc1Url, formData.otherDoc2Url, formData.otherDoc3Url].filter(Boolean).length, " Attached")))), /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center justify-between mt-4 pt-4 " }, /* @__PURE__ */ import_react65.default.createElement("button", { onClick: handleBack, className: "flex items-center gap-2 px-6 py-2 rounded-full text-[11px] tracking-widest text-neutral-500 hover:text-black hover:bg-neutral-50 transition-colors outline-none" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.ArrowLeft01Icon, size: 14 }), " Back"), /* @__PURE__ */ import_react65.default.createElement(ThreeDActionButton, { onClick: handleNext, className: "w-fit shrink-0" }, "Confirm & Proceed"))), macroStep === 3 && /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col gap-6 py-6 animate-in zoom-in-95 duration-500" }, /* @__PURE__ */ import_react65.default.createElement("h2", { className: "text-lg font-serif text-black tracking-tight mb-2" }, "Terms and Conditions of Application"), /* @__PURE__ */ import_react65.default.createElement("div", { className: "text-xs text-neutral-500 mb-4" }, /* @__PURE__ */ import_react65.default.createElement("p", { className: " mb-3" }, "Declaration and Consent"), /* @__PURE__ */ import_react65.default.createElement("p", { className: "mb-3 leading-relaxed" }, "By proceeding with this application, you acknowledge and agree that all data, documents, and identification materials provided herein will be securely transmitted to the relevant official registries and authorized agents for the purpose of ", type === "company" ? "company" : "business", " incorporation and compliance verification."), /* @__PURE__ */ import_react65.default.createElement("p", { className: "mb-3 leading-relaxed" }, "You confirm that all information provided is accurate and authentic. Any falsification of identity or corporate data may result in immediate rejection, and you may be held liable under applicable laws and regulations."), /* @__PURE__ */ import_react65.default.createElement("p", { className: "mb-3 leading-relaxed" }, "This service operates strictly as a digital intermediary connecting you with official registries. The final approval of the ", type === "company" ? "company" : "business", " name and registration rests solely with the regulatory authorities. We are not liable for rejections arising from pre existing conflicts, non compliance, or regulatory policy changes not flagged during the AI pre check stages."), /* @__PURE__ */ import_react65.default.createElement("p", { className: "leading-relaxed" }, "Proceeding to generate the invoice confirms your acceptance of these terms and initiates the formal filing process.")), /* @__PURE__ */ import_react65.default.createElement("label", { className: "flex items-start gap-3 mt-2 cursor-pointer group" }, /* @__PURE__ */ import_react65.default.createElement("input", { type: "checkbox", checked: iAgree, onChange: (e) => setIAgree(e.target.checked), disabled: isReadOnly, className: "mt-0.5 w-4 h-4 accent-black rounded cursor-pointer" }), /* @__PURE__ */ import_react65.default.createElement("span", { className: "text-[13px] text-red-500 group-hover:text-red-600 transition-colors" }, "I have read, understood, and agree to the terms of data transfer and processing.")), /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col sm:flex-row items-center gap-4 mt-8 w-full justify-end pt-6" }, /* @__PURE__ */ import_react65.default.createElement("button", { onClick: onCancelOrClose, disabled: isSubmitting, className: "px-8 py-2 text-[11px] tracking-widest text-neutral-500 hover:text-black hover:bg-neutral-50 rounded-full transition-colors outline-none w-full sm:w-auto" }, "Cancel"), /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => setMacroStep(0), disabled: isSubmitting || isReadOnly, className: "px-8 py-2 text-[11px] tracking-widest text-neutral-500 hover:text-black hover:bg-neutral-50 rounded-full transition-colors outline-none w-full sm:w-auto" }, "Edit Application"), /* @__PURE__ */ import_react65.default.createElement(ThreeDActionButton, { onClick: handleFinalSubmit, disabled: isSubmitting || !iAgree || isReadOnly, isLoading: isSubmitting, className: "min-w-40 w-full sm:w-auto" }, "Submit")))), activeModal.isOpen && /* @__PURE__ */ import_react65.default.createElement("div", { className: "fixed inset-0 z-110 flex items-center justify-center p-4" }, /* @__PURE__ */ import_react65.default.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setActiveModal({ isOpen: false, type: null, memberIndex: null }) }), /* @__PURE__ */ import_react65.default.createElement("div", { className: "relative w-80 bg-white shadow-2xl rounded-3xl flex flex-col overflow-hidden animate-in zoom-in-95 duration-200 max-h-[80vh]" }, /* @__PURE__ */ import_react65.default.createElement("div", { className: "p-4 text-center w-full shrink-0" }, /* @__PURE__ */ import_react65.default.createElement("h3", { className: "text-[14px] text-black tracking-tight capitalize" }, "Select ", activeModal.type)), /* @__PURE__ */ import_react65.default.createElement("div", { className: "p-4 flex flex-col gap-2 overflow-y-auto custom-scrollbar" }, (activeModal.type === "state" ? NIGERIAN_STATES : activeModal.type === "role" ? MEMBER_ROLES : NATIONALITIES).map((opt) => {
|
|
3556
3629
|
const isSelected = activeModal.isGlobalState ? formData.state === opt : formData.members[activeModal.memberIndex][activeModal.type] === opt;
|
|
3557
|
-
return /* @__PURE__ */
|
|
3630
|
+
return /* @__PURE__ */ import_react65.default.createElement("button", { key: opt, onClick: () => {
|
|
3558
3631
|
if (activeModal.isGlobalState) setFormData({ ...formData, state: opt });
|
|
3559
3632
|
else updateCompanyMemberInfo(activeModal.memberIndex, activeModal.type, opt);
|
|
3560
3633
|
setActiveModal({ isOpen: false, type: null, memberIndex: null });
|
|
3561
3634
|
}, className: `text-left px-4 py-3 rounded-full text-[13px] transition-colors outline-none ${isSelected ? "bg-neutral-100 text-black" : "text-neutral-500 hover:bg-neutral-50 hover:text-black"}` }, opt);
|
|
3562
|
-
})), /* @__PURE__ */
|
|
3635
|
+
})), /* @__PURE__ */ import_react65.default.createElement("div", { className: "w-full flex mt-auto shrink-0 " }, /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => setActiveModal({ isOpen: false, type: null, memberIndex: null }), className: "w-full py-4 text-[13px] text-neutral-500 hover:bg-neutral-50 transition-colors outline-none" }, "Close")))));
|
|
3563
3636
|
};
|
|
3564
3637
|
// Annotate the CommonJS export names for ESM import in node:
|
|
3565
3638
|
0 && (module.exports = {
|
|
@@ -3567,6 +3640,7 @@ var UniversalRegistrationFlow = ({
|
|
|
3567
3640
|
AiApproveDecline,
|
|
3568
3641
|
AiStageCheck,
|
|
3569
3642
|
AppBento2,
|
|
3643
|
+
Banner,
|
|
3570
3644
|
Faq,
|
|
3571
3645
|
FeatureScroll,
|
|
3572
3646
|
Footer,
|