@retinalabsllc/zairusjs 1.0.5 → 1.0.7
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 +22 -1
- package/dist/index.d.ts +22 -1
- package/dist/index.js +254 -202
- package/dist/index.mjs +231 -180
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -64,6 +64,7 @@ __export(index_exports, {
|
|
|
64
64
|
ThreeDButton: () => ThreeDButton,
|
|
65
65
|
UniversalAgentConsole: () => UniversalAgentConsole,
|
|
66
66
|
UniversalBillingPage: () => UniversalBillingPage,
|
|
67
|
+
UniversalCheckoutView: () => UniversalCheckoutView,
|
|
67
68
|
UniversalDashboardPage: () => UniversalDashboardPage,
|
|
68
69
|
UniversalDeveloperSettings: () => UniversalDeveloperSettings,
|
|
69
70
|
UniversalDirectoryPage: () => UniversalDirectoryPage,
|
|
@@ -2733,7 +2734,7 @@ var UniversalBillingPage = ({
|
|
|
2733
2734
|
},
|
|
2734
2735
|
selectedInvoice.status,
|
|
2735
2736
|
isUpdating ? /* @__PURE__ */ import_react46.default.createElement(ButtonSpinner4, null) : /* @__PURE__ */ import_react46.default.createElement(import_react47.HugeiconsIcon, { icon: import_core_free_icons13.ArrowDown01Icon, size: 14, className: "text-neutral-400" })
|
|
2736
|
-
) : /* @__PURE__ */ import_react46.default.createElement("span", { className: `text-[11px] tracking-widest px-3 py-1 mt-1 inline-block rounded-full ${selectedInvoice.status === "PAID" ? "bg-emerald-100 text-emerald-700" : "bg-neutral-100 text-neutral-700"}` }, selectedInvoice.status)), /* @__PURE__ */ import_react46.default.createElement("div", { className: "md:col-span-2 pt-4 border-t border-neutral-100/60 mt-2" }, /* @__PURE__ */ import_react46.default.createElement("span", { className: "text-[11px] tracking-[0.2em] text-neutral-400 block mb-1 uppercase" }, "Reference ID"), /* @__PURE__ */ import_react46.default.createElement("p", { className: "text-xs text-neutral-500
|
|
2737
|
+
) : /* @__PURE__ */ import_react46.default.createElement("span", { className: `text-[11px] tracking-widest px-3 py-1 mt-1 inline-block rounded-full ${selectedInvoice.status === "PAID" ? "bg-emerald-100 text-emerald-700" : "bg-neutral-100 text-neutral-700"}` }, selectedInvoice.status)), /* @__PURE__ */ import_react46.default.createElement("div", { className: "md:col-span-2 pt-4 border-t border-neutral-100/60 mt-2" }, /* @__PURE__ */ import_react46.default.createElement("span", { className: "text-[11px] tracking-[0.2em] text-neutral-400 block mb-1 uppercase" }, "Reference ID"), /* @__PURE__ */ import_react46.default.createElement("p", { className: "text-xs text-neutral-500 inline-block" }, selectedInvoice.id))), /* @__PURE__ */ import_react46.default.createElement("div", { className: "flex flex-col sm:flex-row sm:items-center justify-end gap-4 pt-4" }, !isModMode && (selectedInvoice.status === "ISSUED" || selectedInvoice.status === "OVERDUE") && onPayInvoice && /* @__PURE__ */ import_react46.default.createElement("div", { className: "flex flex-col items-end gap-2 w-full sm:w-auto" }, /* @__PURE__ */ import_react46.default.createElement(
|
|
2737
2738
|
ThreeDActionButton,
|
|
2738
2739
|
{
|
|
2739
2740
|
onClick: handlePayment,
|
|
@@ -2781,10 +2782,60 @@ var UniversalBillingPage = ({
|
|
|
2781
2782
|
))), /* @__PURE__ */ import_react46.default.createElement("div", { className: "w-full flex mt-2" }, /* @__PURE__ */ import_react46.default.createElement("button", { onClick: () => setIsActionModalOpen(false), disabled: isUpdating, className: "w-full py-2.5 text-[13px] text-neutral-600 hover:bg-neutral-50 transition-colors disabled:opacity-50 outline-none" }, "Cancel")))));
|
|
2782
2783
|
};
|
|
2783
2784
|
|
|
2784
|
-
// src/components/
|
|
2785
|
+
// src/components/UniversalCheckoutView.tsx
|
|
2785
2786
|
var import_react48 = __toESM(require("react"));
|
|
2786
2787
|
var import_react49 = require("@hugeicons/react");
|
|
2787
2788
|
var import_core_free_icons14 = require("@hugeicons/core-free-icons");
|
|
2789
|
+
var PageSpinner4 = () => /* @__PURE__ */ import_react48.default.createElement("div", { className: "flex justify-center items-center py-20" }, /* @__PURE__ */ import_react48.default.createElement(import_react49.HugeiconsIcon, { icon: import_core_free_icons14.Loading03Icon, size: 32, className: "animate-spin text-neutral-400" }));
|
|
2790
|
+
var formatDate2 = (dateString) => {
|
|
2791
|
+
if (!dateString) return "N/A";
|
|
2792
|
+
return new Date(dateString).toLocaleDateString("en-US", {
|
|
2793
|
+
month: "long",
|
|
2794
|
+
day: "numeric",
|
|
2795
|
+
year: "numeric"
|
|
2796
|
+
});
|
|
2797
|
+
};
|
|
2798
|
+
var formatUsd2 = (amount) => {
|
|
2799
|
+
return `$${(amount || 0).toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 })}`;
|
|
2800
|
+
};
|
|
2801
|
+
var UniversalCheckoutView = ({
|
|
2802
|
+
invoice,
|
|
2803
|
+
isLoading,
|
|
2804
|
+
isReadOnly = false,
|
|
2805
|
+
onPayInvoice,
|
|
2806
|
+
onBackClick
|
|
2807
|
+
}) => {
|
|
2808
|
+
const [isPaying, setIsPaying] = (0, import_react48.useState)(false);
|
|
2809
|
+
const [localStatus, setLocalStatus] = (0, import_react48.useState)(null);
|
|
2810
|
+
const handlePayment = async () => {
|
|
2811
|
+
if (!invoice || isReadOnly || isPaying) return;
|
|
2812
|
+
setIsPaying(true);
|
|
2813
|
+
try {
|
|
2814
|
+
const res = await onPayInvoice(invoice.id);
|
|
2815
|
+
if (res && res.success) {
|
|
2816
|
+
setLocalStatus("PAID");
|
|
2817
|
+
}
|
|
2818
|
+
} finally {
|
|
2819
|
+
setIsPaying(false);
|
|
2820
|
+
}
|
|
2821
|
+
};
|
|
2822
|
+
const displayStatus = localStatus || invoice?.status;
|
|
2823
|
+
return /* @__PURE__ */ import_react48.default.createElement("div", { className: "flex max-w-2xl rounded-2xl bg-white p-6 sm:p-8 flex-col gap-6 animate-in fade-in duration-300 mx-auto w-full border border-neutral-100" }, /* @__PURE__ */ import_react48.default.createElement(ManagedToaster, null), isLoading ? /* @__PURE__ */ import_react48.default.createElement(PageSpinner4, null) : !invoice ? /* @__PURE__ */ import_react48.default.createElement("div", { className: "py-12 text-center text-sm text-neutral-500" }, "Invoice not found or could not be loaded.") : /* @__PURE__ */ import_react48.default.createElement("div", { className: "flex flex-col gap-8 w-full animate-in fade-in duration-300" }, /* @__PURE__ */ import_react48.default.createElement("div", null, /* @__PURE__ */ import_react48.default.createElement("span", { className: "text-[11px] tracking-[0.2em] text-neutral-400 block mb-1 uppercase" }, "Checkout Summary"), /* @__PURE__ */ import_react48.default.createElement("h2", { className: "text-xl text-black mb-1" }, invoice.name), /* @__PURE__ */ import_react48.default.createElement("p", { className: "text-xs text-neutral-500" }, "Generated on ", formatDate2(invoice.createdAt))), /* @__PURE__ */ import_react48.default.createElement("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6 bg-neutral-50/50 p-6 rounded-xl border border-neutral-50" }, /* @__PURE__ */ import_react48.default.createElement("div", null, /* @__PURE__ */ import_react48.default.createElement("span", { className: "text-[11px] tracking-[0.2em] text-neutral-400 block mb-1 uppercase" }, "Amount Due"), /* @__PURE__ */ import_react48.default.createElement("p", { className: "text-xl text-black" }, formatUsd2(invoice.amountDue))), /* @__PURE__ */ import_react48.default.createElement("div", null, /* @__PURE__ */ import_react48.default.createElement("span", { className: "text-[11px] tracking-[0.2em] text-neutral-400 block mb-1 uppercase" }, "Status"), /* @__PURE__ */ import_react48.default.createElement("span", { className: `text-[11px] tracking-widest px-3 py-1 mt-1 inline-block rounded-full ${displayStatus === "PAID" ? "bg-emerald-100 text-emerald-700" : "bg-neutral-100 text-neutral-700"}` }, displayStatus)), /* @__PURE__ */ import_react48.default.createElement("div", { className: "md:col-span-2 pt-4 border-t border-neutral-200/60 mt-2" }, /* @__PURE__ */ import_react48.default.createElement("span", { className: "text-[11px] tracking-[0.2em] text-neutral-400 block mb-1 uppercase" }, "Reference ID"), /* @__PURE__ */ import_react48.default.createElement("p", { className: "text-xs text-neutral-500 inline-block" }, invoice.invoiceNumber))), /* @__PURE__ */ import_react48.default.createElement("div", { className: "flex flex-col sm:flex-row sm:items-center justify-end gap-4 pt-4" }, (displayStatus === "ISSUED" || displayStatus === "OVERDUE") && /* @__PURE__ */ import_react48.default.createElement("div", { className: "flex flex-col items-end gap-2 w-full sm:w-auto" }, /* @__PURE__ */ import_react48.default.createElement(
|
|
2824
|
+
ThreeDActionButton,
|
|
2825
|
+
{
|
|
2826
|
+
onClick: handlePayment,
|
|
2827
|
+
disabled: isReadOnly || isPaying,
|
|
2828
|
+
isLoading: isPaying,
|
|
2829
|
+
className: "w-full sm:w-auto"
|
|
2830
|
+
},
|
|
2831
|
+
"Pay Invoice"
|
|
2832
|
+
)), displayStatus === "PAID" && /* @__PURE__ */ import_react48.default.createElement("span", { className: "text-[12px] tracking-widest text-emerald-600 px-6 py-3 bg-emerald-50 rounded-full w-full sm:w-auto text-center" }, "Payment Successful"))));
|
|
2833
|
+
};
|
|
2834
|
+
|
|
2835
|
+
// src/components/UniversalDashboardPage.tsx
|
|
2836
|
+
var import_react50 = __toESM(require("react"));
|
|
2837
|
+
var import_react51 = require("@hugeicons/react");
|
|
2838
|
+
var import_core_free_icons15 = require("@hugeicons/core-free-icons");
|
|
2788
2839
|
var UniversalDashboardPage = ({
|
|
2789
2840
|
headerTitle,
|
|
2790
2841
|
headerDescription,
|
|
@@ -2795,20 +2846,20 @@ var UniversalDashboardPage = ({
|
|
|
2795
2846
|
lists,
|
|
2796
2847
|
isLoading = false
|
|
2797
2848
|
}) => {
|
|
2798
|
-
const [isTimeframeModalOpen, setIsTimeframeModalOpen] = (0,
|
|
2849
|
+
const [isTimeframeModalOpen, setIsTimeframeModalOpen] = (0, import_react50.useState)(false);
|
|
2799
2850
|
const selectedTimeframe = timeframes.find((t) => t.id === activeTimeframe) || timeframes[0];
|
|
2800
2851
|
if (isLoading) {
|
|
2801
|
-
return /* @__PURE__ */
|
|
2852
|
+
return /* @__PURE__ */ import_react50.default.createElement("div", { className: "flex justify-center items-center py-12" }, /* @__PURE__ */ import_react50.default.createElement(import_react51.HugeiconsIcon, { icon: import_core_free_icons15.Loading03Icon, size: 32, className: "animate-spin mb-4 text-black" }));
|
|
2802
2853
|
}
|
|
2803
|
-
return /* @__PURE__ */
|
|
2854
|
+
return /* @__PURE__ */ import_react50.default.createElement("div", { className: "flex flex-col gap-8 animate-in fade-in duration-300 pb-10" }, /* @__PURE__ */ import_react50.default.createElement(ManagedToaster, null), /* @__PURE__ */ import_react50.default.createElement("div", { className: "flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4" }, /* @__PURE__ */ import_react50.default.createElement("div", null, /* @__PURE__ */ import_react50.default.createElement("h1", { className: " text-xl text-black mb-1 tracking-tight" }, headerTitle), /* @__PURE__ */ import_react50.default.createElement("p", { className: "text-xs text-neutral-500" }, headerDescription)), timeframes.length > 0 && selectedTimeframe && onTimeframeChange && /* @__PURE__ */ import_react50.default.createElement(
|
|
2804
2855
|
"button",
|
|
2805
2856
|
{
|
|
2806
2857
|
onClick: () => setIsTimeframeModalOpen(true),
|
|
2807
2858
|
className: "flex items-center gap-3 px-4 py-2 text-xs bg-white text-black outline-none rounded-full transition-colors hover:bg-neutral-50 shrink-0"
|
|
2808
2859
|
},
|
|
2809
|
-
/* @__PURE__ */
|
|
2810
|
-
/* @__PURE__ */
|
|
2811
|
-
)), stats.length > 0 && /* @__PURE__ */
|
|
2860
|
+
/* @__PURE__ */ import_react50.default.createElement("span", null, selectedTimeframe.label),
|
|
2861
|
+
/* @__PURE__ */ import_react50.default.createElement(import_react51.HugeiconsIcon, { icon: import_core_free_icons15.ArrowDown01Icon, size: 14, className: "text-neutral-400" })
|
|
2862
|
+
)), stats.length > 0 && /* @__PURE__ */ import_react50.default.createElement("div", { className: "w-full rounded-2xl overflow-hidden bg-white" }, /* @__PURE__ */ import_react50.default.createElement("div", { className: "grid grid-cols-2 md:grid-cols-5 divide-y md:divide-y-0 md:divide-x divide-neutral-100" }, stats.map((stat, idx) => /* @__PURE__ */ import_react50.default.createElement("div", { key: idx, className: "p-6 flex flex-col gap-1 min-w-0" }, /* @__PURE__ */ import_react50.default.createElement("p", { className: "text-[11px] tracking-[0.2em] text-neutral-400 truncate uppercase" }, stat.label), /* @__PURE__ */ import_react50.default.createElement("p", { className: `text-xl tracking-tight truncate ${stat.valueClass || "text-black"}` }, stat.value))))), lists.length > 0 && /* @__PURE__ */ import_react50.default.createElement("div", { className: "flex flex-col gap-8 w-full max-w-4xl" }, lists.map((list, idx) => /* @__PURE__ */ import_react50.default.createElement("div", { key: idx, className: "bg-white rounded-2xl p-6 flex flex-col min-w-0" }, /* @__PURE__ */ import_react50.default.createElement("div", { className: "flex items-center gap-3 mb-6" }, /* @__PURE__ */ import_react50.default.createElement("div", { className: "text-neutral-400" }, list.icon), /* @__PURE__ */ import_react50.default.createElement("h2", { className: " text-[11px] text-black tracking-[0.2em] uppercase" }, list.title)), /* @__PURE__ */ import_react50.default.createElement("div", { className: "divide-y divide-neutral-100 flex-1 overflow-y-auto" }, list.items.length === 0 ? /* @__PURE__ */ import_react50.default.createElement("p", { className: "text-xs text-neutral-500 py-4" }, list.emptyMessage) : list.items.map((item) => /* @__PURE__ */ import_react50.default.createElement("div", { key: item.id, className: "flex flex-col sm:flex-row sm:items-center justify-between py-4 gap-2 min-w-0 group" }, /* @__PURE__ */ import_react50.default.createElement("div", { className: "min-w-0 flex-1" }, /* @__PURE__ */ import_react50.default.createElement("p", { className: "text-sm text-black truncate pr-4" }, item.primaryText), /* @__PURE__ */ import_react50.default.createElement("p", { className: "text-[11px] text-neutral-500 truncate tracking-widest mt-0.5" }, item.secondaryText)), /* @__PURE__ */ import_react50.default.createElement("div", { className: "flex items-center gap-4 shrink-0 pl-4" }, item.rightText && /* @__PURE__ */ import_react50.default.createElement("p", { className: "text-xs text-black" }, item.rightText), item.rightBadge && /* @__PURE__ */ import_react50.default.createElement("span", { className: `text-[9px] tracking-widest px-2.5 py-1 rounded-full ${item.rightBadgeClass || "bg-neutral-50 text-neutral-600"}` }, item.rightBadge)))))))), isTimeframeModalOpen && timeframes.length > 0 && onTimeframeChange && /* @__PURE__ */ import_react50.default.createElement("div", { className: "fixed inset-0 z-110 flex items-center justify-center p-4" }, /* @__PURE__ */ import_react50.default.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setIsTimeframeModalOpen(false) }), /* @__PURE__ */ import_react50.default.createElement("div", { className: "relative w-72 bg-white shadow-2xl rounded-2xl flex flex-col items-center overflow-hidden animate-in zoom-in-95 duration-200" }, /* @__PURE__ */ import_react50.default.createElement("div", { className: "p-6 text-center w-full" }, /* @__PURE__ */ import_react50.default.createElement("h3", { className: " text-[14px] text-black tracking-tight" }, "Select Timeframe")), /* @__PURE__ */ import_react50.default.createElement("div", { className: "w-full flex flex-col pl-2 pr-2 pb-2" }, timeframes.map((tf) => /* @__PURE__ */ import_react50.default.createElement(
|
|
2812
2863
|
"button",
|
|
2813
2864
|
{
|
|
2814
2865
|
key: tf.id,
|
|
@@ -2818,9 +2869,9 @@ var UniversalDashboardPage = ({
|
|
|
2818
2869
|
},
|
|
2819
2870
|
className: `text-left px-4 py-3 text-[11px] tracking-wide transition-colors rounded-full flex items-center justify-between outline-none ${activeTimeframe === tf.id ? "bg-neutral-100 text-black" : "text-neutral-500 hover:bg-neutral-50 hover:text-black"}`
|
|
2820
2871
|
},
|
|
2821
|
-
/* @__PURE__ */
|
|
2822
|
-
activeTimeframe === tf.id && /* @__PURE__ */
|
|
2823
|
-
))), /* @__PURE__ */
|
|
2872
|
+
/* @__PURE__ */ import_react50.default.createElement("span", { className: "truncate pr-2" }, tf.label),
|
|
2873
|
+
activeTimeframe === tf.id && /* @__PURE__ */ import_react50.default.createElement("div", null)
|
|
2874
|
+
))), /* @__PURE__ */ import_react50.default.createElement("div", { className: "w-full flex border-t border-neutral-50" }, /* @__PURE__ */ import_react50.default.createElement(
|
|
2824
2875
|
"button",
|
|
2825
2876
|
{
|
|
2826
2877
|
onClick: () => setIsTimeframeModalOpen(false),
|
|
@@ -2831,9 +2882,9 @@ var UniversalDashboardPage = ({
|
|
|
2831
2882
|
};
|
|
2832
2883
|
|
|
2833
2884
|
// src/components/UniversalAgentConsole.tsx
|
|
2834
|
-
var
|
|
2835
|
-
var
|
|
2836
|
-
var
|
|
2885
|
+
var import_react52 = __toESM(require("react"));
|
|
2886
|
+
var import_react53 = require("@hugeicons/react");
|
|
2887
|
+
var import_core_free_icons16 = require("@hugeicons/core-free-icons");
|
|
2837
2888
|
var formatKeyName = (key) => key.replace(/([A-Z])/g, " $1").replace(/^./, (str) => str.toUpperCase()).trim();
|
|
2838
2889
|
var toTitleCaseSafe = (str) => {
|
|
2839
2890
|
if (!str) return "";
|
|
@@ -2862,13 +2913,13 @@ var UniversalAgentConsole = ({
|
|
|
2862
2913
|
onUploadArchives,
|
|
2863
2914
|
onDeleteArchive
|
|
2864
2915
|
}) => {
|
|
2865
|
-
const archiveRef = (0,
|
|
2866
|
-
const [pendingFiles, setPendingFiles] = (0,
|
|
2867
|
-
const [isUploading, setIsUploading] = (0,
|
|
2868
|
-
const [isActioning, setIsActioning] = (0,
|
|
2869
|
-
const [actionModal, setActionModal] = (0,
|
|
2870
|
-
const [actionMessage, setActionMessage] = (0,
|
|
2871
|
-
const [archiveToDelete, setArchiveToDelete] = (0,
|
|
2916
|
+
const archiveRef = (0, import_react52.useRef)(null);
|
|
2917
|
+
const [pendingFiles, setPendingFiles] = (0, import_react52.useState)([]);
|
|
2918
|
+
const [isUploading, setIsUploading] = (0, import_react52.useState)(false);
|
|
2919
|
+
const [isActioning, setIsActioning] = (0, import_react52.useState)(false);
|
|
2920
|
+
const [actionModal, setActionModal] = (0, import_react52.useState)(null);
|
|
2921
|
+
const [actionMessage, setActionMessage] = (0, import_react52.useState)("");
|
|
2922
|
+
const [archiveToDelete, setArchiveToDelete] = (0, import_react52.useState)(null);
|
|
2872
2923
|
const handleFileSelect = (e) => {
|
|
2873
2924
|
if (e.target.files && e.target.files.length > 0) {
|
|
2874
2925
|
setPendingFiles((prev) => [...prev, ...Array.from(e.target.files)]);
|
|
@@ -2897,36 +2948,36 @@ var UniversalAgentConsole = ({
|
|
|
2897
2948
|
}
|
|
2898
2949
|
};
|
|
2899
2950
|
const DynamicArrayAccordion = ({ items, parentKey }) => {
|
|
2900
|
-
const [activeFAQ, setActiveFAQ] = (0,
|
|
2901
|
-
return /* @__PURE__ */
|
|
2951
|
+
const [activeFAQ, setActiveFAQ] = (0, import_react52.useState)(null);
|
|
2952
|
+
return /* @__PURE__ */ import_react52.default.createElement("div", { className: "flex flex-col relative z-10 bg-transparent w-full mt-2 border-t border-neutral-100" }, items.map((item, index) => {
|
|
2902
2953
|
const isOpen = activeFAQ === index;
|
|
2903
2954
|
let label = `${parentKey ? formatKeyName(parentKey) : "Item"} ${index + 1}`;
|
|
2904
2955
|
if (item.fullName) label = toTitleCaseSafe(item.fullName);
|
|
2905
2956
|
else if (item.role) label = item.role;
|
|
2906
2957
|
else if (item.proposedName) label = toTitleCaseSafe(item.proposedName);
|
|
2907
|
-
return /* @__PURE__ */
|
|
2958
|
+
return /* @__PURE__ */ import_react52.default.createElement("div", { key: index, className: `transition-all duration-300 ${index !== items.length - 1 ? "border-b border-neutral-100" : ""}` }, /* @__PURE__ */ import_react52.default.createElement("button", { className: "flex items-center justify-between w-full gap-4 text-left py-5 md:py-6 group outline-none bg-transparent", onClick: () => setActiveFAQ(isOpen ? null : index) }, /* @__PURE__ */ import_react52.default.createElement("span", { className: `text-[13px] md:text-[14px] transition-colors ${isOpen ? "text-black" : "text-neutral-700 group-hover:text-black"}` }, label), /* @__PURE__ */ import_react52.default.createElement("div", { className: `shrink-0 flex items-center justify-center w-8 h-8 rounded-full border transition-all duration-300 ${isOpen ? "rotate-180 border-black text-black" : "border-neutral-300 text-neutral-500"}` }, /* @__PURE__ */ import_react52.default.createElement(import_react53.HugeiconsIcon, { icon: import_core_free_icons16.ArrowDown01Icon, size: 16 }))), /* @__PURE__ */ import_react52.default.createElement("div", { className: `grid transition-all duration-300 ease-in-out ${isOpen ? "grid-rows-[1fr] pb-6 md:pb-8 opacity-100" : "grid-rows-[0fr] opacity-0"}` }, /* @__PURE__ */ import_react52.default.createElement("div", { className: "overflow-hidden" }, /* @__PURE__ */ import_react52.default.createElement("div", { className: "pt-2 flex flex-col gap-3 pr-4 md:pr-12" }, renderDynamicObject(item)))));
|
|
2908
2959
|
}));
|
|
2909
2960
|
};
|
|
2910
2961
|
const renderValue = (key, value) => {
|
|
2911
2962
|
if (value === null || value === void 0 || value === "") return null;
|
|
2912
2963
|
if (typeof value === "string") {
|
|
2913
|
-
if (value.startsWith("http") || value.startsWith("data:image")) return /* @__PURE__ */
|
|
2914
|
-
if (key.toLowerCase().includes("name") && !value.includes("@")) return /* @__PURE__ */
|
|
2915
|
-
return /* @__PURE__ */
|
|
2964
|
+
if (value.startsWith("http") || value.startsWith("data:image")) return /* @__PURE__ */ import_react52.default.createElement("a", { href: value, download: true, target: "_blank", rel: "noopener noreferrer", className: "flex items-center gap-2 px-5 py-2 bg-white border border-neutral-100 text-black text-[11px] tracking-widest rounded-full hover:bg-neutral-50 transition-colors w-fit outline-none mt-2" }, /* @__PURE__ */ import_react52.default.createElement(import_react53.HugeiconsIcon, { icon: import_core_free_icons16.Download01Icon, size: 14 }), " Download File");
|
|
2965
|
+
if (key.toLowerCase().includes("name") && !value.includes("@")) return /* @__PURE__ */ import_react52.default.createElement("p", { className: "text-[11px] md:text-[13px] leading-[1.8] text-neutral-600" }, toTitleCaseSafe(value));
|
|
2966
|
+
return /* @__PURE__ */ import_react52.default.createElement("p", { className: "text-[11px] md:text-[13px] leading-[1.8] text-neutral-600" }, value);
|
|
2916
2967
|
}
|
|
2917
2968
|
if (Array.isArray(value)) {
|
|
2918
2969
|
const validItems = value.filter((item) => item !== null && item !== void 0 && item !== "");
|
|
2919
2970
|
if (validItems.length === 0) return null;
|
|
2920
|
-
if (typeof validItems[0] === "string") return /* @__PURE__ */
|
|
2921
|
-
return /* @__PURE__ */
|
|
2971
|
+
if (typeof validItems[0] === "string") return /* @__PURE__ */ import_react52.default.createElement("ul", { className: "list-disc pl-4 mt-1" }, validItems.map((v, i) => /* @__PURE__ */ import_react52.default.createElement("li", { key: i, className: "text-[11px] md:text-[13px] leading-[1.8] text-neutral-600" }, toTitleCaseSafe(v))));
|
|
2972
|
+
return /* @__PURE__ */ import_react52.default.createElement(DynamicArrayAccordion, { items: validItems, parentKey: key });
|
|
2922
2973
|
}
|
|
2923
2974
|
if (typeof value === "object") {
|
|
2924
2975
|
if (Object.keys(value).length === 0) return null;
|
|
2925
2976
|
const renderedObj = renderDynamicObject(value);
|
|
2926
2977
|
if (!renderedObj || Array.isArray(renderedObj) && renderedObj.length === 0) return null;
|
|
2927
|
-
return /* @__PURE__ */
|
|
2978
|
+
return /* @__PURE__ */ import_react52.default.createElement("div", { className: "flex flex-col gap-3 mt-1 w-full border-l border-neutral-100 pl-4 py-2" }, renderedObj);
|
|
2928
2979
|
}
|
|
2929
|
-
return /* @__PURE__ */
|
|
2980
|
+
return /* @__PURE__ */ import_react52.default.createElement("span", { className: "text-sm text-black" }, String(value));
|
|
2930
2981
|
};
|
|
2931
2982
|
const renderDynamicObject = (obj) => {
|
|
2932
2983
|
if (!obj) return null;
|
|
@@ -2937,22 +2988,22 @@ var UniversalAgentConsole = ({
|
|
|
2937
2988
|
return true;
|
|
2938
2989
|
});
|
|
2939
2990
|
if (entries.length === 0) return null;
|
|
2940
|
-
return entries.map(([k, v]) => /* @__PURE__ */
|
|
2991
|
+
return entries.map(([k, v]) => /* @__PURE__ */ import_react52.default.createElement("div", { key: k, className: "flex flex-col items-start min-w-0 wrap-break-word w-full mb-3 last:mb-0" }, /* @__PURE__ */ import_react52.default.createElement("span", { className: "text-[11px] tracking-[0.2em] text-neutral-400 mb-1 uppercase" }, formatKeyName(k)), renderValue(k, v)));
|
|
2941
2992
|
};
|
|
2942
|
-
return /* @__PURE__ */
|
|
2993
|
+
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(ManagedToaster, null), currentView === "list" && /* @__PURE__ */ import_react52.default.createElement(import_react52.default.Fragment, null, /* @__PURE__ */ import_react52.default.createElement("div", { className: "flex flex-col items-start gap-1" }, /* @__PURE__ */ import_react52.default.createElement("h1", { className: " text-xl text-black tracking-tight" }, headerTitle), /* @__PURE__ */ import_react52.default.createElement("p", { className: "text-sm text-neutral-500" }, headerDescription)), stats.length > 0 && /* @__PURE__ */ import_react52.default.createElement("div", { className: "w-full rounded-2xl max-w-3xl overflow-hidden 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" }, stats.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-[11px] tracking-[0.2em] text-neutral-400 mb-1 truncate uppercase" }, stat.label), /* @__PURE__ */ import_react52.default.createElement("p", { className: "text-xl text-black tracking-tight truncate" }, stat.value)))))), tabs.length > 0 && /* @__PURE__ */ import_react52.default.createElement("div", { className: "flex items-center gap-6" }, tabs.map((tab) => /* @__PURE__ */ import_react52.default.createElement("button", { key: tab.id, onClick: () => onTabChange(tab.id), className: `pb-3 text-sm transition-colors outline-none ${activeTab === tab.id ? "text-black border-b border-black" : "text-neutral-400 hover:text-black"}` }, tab.label))), /* @__PURE__ */ import_react52.default.createElement("div", { className: "w-full bg-white rounded-2xl max-w-3xl overflow-hidden flex flex-col min-h-100" }, isLoadingList ? /* @__PURE__ */ import_react52.default.createElement("div", { className: "flex justify-center items-center py-12" }, /* @__PURE__ */ import_react52.default.createElement(import_react53.HugeiconsIcon, { icon: import_core_free_icons16.Loading03Icon, size: 32, className: "animate-spin text-black" })) : listData.length === 0 ? /* @__PURE__ */ import_react52.default.createElement(import_react52.default.Fragment, null, /* @__PURE__ */ import_react52.default.createElement("div", { className: "flex-1 flex justify-center items-center text-neutral-500 text-sm py-20" }, "No matching applications found.")) : /* @__PURE__ */ import_react52.default.createElement(import_react52.default.Fragment, null, /* @__PURE__ */ import_react52.default.createElement("div", { className: "divide-y divide-neutral-100 flex-1" }, listData.map((item) => /* @__PURE__ */ import_react52.default.createElement("div", { key: item.id, onClick: () => onRowClick(item.id), className: "flex items-center justify-between p-5 hover:bg-neutral-50/50 transition-colors cursor-pointer group min-w-0" }, /* @__PURE__ */ import_react52.default.createElement("div", { className: "min-w-0 flex-1" }, /* @__PURE__ */ import_react52.default.createElement("p", { className: "text-sm text-black truncate pr-4" }, item.title), /* @__PURE__ */ import_react52.default.createElement("p", { className: "text-xs text-neutral-500 truncate mt-1" }, item.subtitle)), /* @__PURE__ */ import_react52.default.createElement("div", { className: "flex flex-col items-end gap-1 shrink-0 pl-4" }, /* @__PURE__ */ import_react52.default.createElement("span", { className: `text-[11px] tracking-widest px-3 py-1 rounded-full uppercase ${item.status === "COMPLETED" ? "bg-emerald-50 text-emerald-600" : "bg-neutral-50 text-neutral-600"}` }, item.status.replace(/_/g, " ")), /* @__PURE__ */ import_react52.default.createElement("span", { className: "text-[11px] text-neutral-400 mt-1" }, item.date))))), totalPages > 1 && /* @__PURE__ */ import_react52.default.createElement("div", { className: "flex items-center justify-between p-5 bg-neutral-50/50" }, /* @__PURE__ */ import_react52.default.createElement("span", { className: "text-[11px] text-neutral-400 tracking-[0.2em]" }, "Page ", currentPage, " of ", totalPages), /* @__PURE__ */ import_react52.default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ import_react52.default.createElement("button", { onClick: () => onPageChange(currentPage - 1), disabled: currentPage === 1, className: "p-2 border border-neutral-100 rounded-full bg-white text-neutral-500 hover:text-black outline-none disabled:opacity-30" }, /* @__PURE__ */ import_react52.default.createElement(import_react53.HugeiconsIcon, { icon: import_core_free_icons16.ArrowLeft01Icon, size: 14 })), /* @__PURE__ */ import_react52.default.createElement("button", { onClick: () => onPageChange(currentPage + 1), disabled: currentPage >= totalPages, className: "p-2 border border-neutral-100 rounded-full bg-white text-neutral-500 hover:text-black outline-none disabled:opacity-30" }, /* @__PURE__ */ import_react52.default.createElement(import_react53.HugeiconsIcon, { icon: import_core_free_icons16.ArrowRight01Icon, size: 14 }))))))), currentView === "details" && selectedApp && /* @__PURE__ */ import_react52.default.createElement("div", { className: "w-full bg-white rounded-2xl p-6 sm:p-10 animate-in fade-in duration-300 max-w-3xl flex flex-col" }, /* @__PURE__ */ import_react52.default.createElement("div", { className: "flex items-center justify-between gap-4 pb-6" }, /* @__PURE__ */ import_react52.default.createElement("button", { onClick: () => {
|
|
2943
2994
|
onBackToList();
|
|
2944
2995
|
setPendingFiles([]);
|
|
2945
|
-
}, className: "flex items-center gap-2 text-[11px] text-neutral-400 hover:text-black tracking-widest transition-colors outline-none uppercase" }, /* @__PURE__ */
|
|
2996
|
+
}, className: "flex items-center gap-2 text-[11px] text-neutral-400 hover:text-black tracking-widest transition-colors outline-none uppercase" }, /* @__PURE__ */ import_react52.default.createElement(import_react53.HugeiconsIcon, { icon: import_core_free_icons16.ArrowLeft01Icon, size: 14 }), " Back to List"), /* @__PURE__ */ import_react52.default.createElement("span", { className: `text-[11px] tracking-widest px-4 py-1.5 rounded-full uppercase ${selectedApp.status === "COMPLETED" ? "bg-emerald-50 text-emerald-600" : "bg-neutral-50 text-neutral-600"}` }, selectedApp.status.replace(/_/g, " "))), /* @__PURE__ */ import_react52.default.createElement("div", { className: "flex flex-col gap-2 mb-8" }, /* @__PURE__ */ import_react52.default.createElement("h2", { className: " text-xl text-black tracking-tight" }, selectedApp.name || selectedApp.title), /* @__PURE__ */ import_react52.default.createElement("p", { className: "text-sm text-neutral-500" }, selectedApp.type ? selectedApp.type.replace(/_/g, " ").toLowerCase().replace(/\b\w/g, (c) => c.toUpperCase()) : selectedApp.subtitle)), selectedApp.agentId === currentAgentId && selectedApp.metadata && Object.keys(selectedApp.metadata).length > 0 ? /* @__PURE__ */ import_react52.default.createElement("div", { className: "flex flex-col gap-5" }, renderDynamicObject(selectedApp.metadata)) : selectedApp.agentId === currentAgentId ? /* @__PURE__ */ import_react52.default.createElement("div", { className: "flex flex-col gap-5" }, /* @__PURE__ */ import_react52.default.createElement("p", { className: "text-sm text-neutral-500" }, "No application data extracted.")) : null, selectedApp.agentId && /* @__PURE__ */ import_react52.default.createElement("div", { className: "flex flex-col gap-4 pt-8 mt-4 border-t border-neutral-100" }, /* @__PURE__ */ import_react52.default.createElement("div", { className: "flex flex-col gap-1 mb-4" }, /* @__PURE__ */ import_react52.default.createElement("h3", { className: " text-sm text-black" }, "Official Archives"), /* @__PURE__ */ import_react52.default.createElement("p", { className: "text-xs text-neutral-500 leading-relaxed" }, "Upload final certificates or documents. Once marked completed, the archive unlocks for the user.")), selectedApp.archives?.map((arch) => /* @__PURE__ */ import_react52.default.createElement("div", { key: arch.id, className: "flex items-center justify-between p-4 bg-emerald-50 rounded-full text-emerald-800 text-sm w-full" }, /* @__PURE__ */ import_react52.default.createElement("div", { className: "flex items-center gap-3 min-w-0" }, /* @__PURE__ */ import_react52.default.createElement(import_react53.HugeiconsIcon, { icon: import_core_free_icons16.File02Icon, size: 18, className: "shrink-0" }), /* @__PURE__ */ import_react52.default.createElement("span", { className: "truncate pr-2" }, arch.name)), /* @__PURE__ */ import_react52.default.createElement("button", { onClick: () => setArchiveToDelete(arch), className: "text-emerald-700 hover:text-red-500 transition-colors p-1 outline-none shrink-0" }, /* @__PURE__ */ import_react52.default.createElement(import_react53.HugeiconsIcon, { icon: import_core_free_icons16.Delete02Icon, size: 16 })))), pendingFiles.map((file, idx) => /* @__PURE__ */ import_react52.default.createElement("div", { key: idx, className: "flex items-center justify-between text-neutral-600 text-sm w-full" }, /* @__PURE__ */ import_react52.default.createElement("div", { className: "flex items-center gap-3 min-w-0" }, /* @__PURE__ */ import_react52.default.createElement(import_react53.HugeiconsIcon, { icon: import_core_free_icons16.AttachmentIcon, size: 18, className: "shrink-0" }), /* @__PURE__ */ import_react52.default.createElement("span", { className: "truncate pr-2" }, file.name)), /* @__PURE__ */ import_react52.default.createElement("button", { onClick: () => setPendingFiles((p) => p.filter((_, i) => i !== idx)), className: "text-neutral-400 hover:text-red-500 transition-colors p-1 outline-none shrink-0" }, /* @__PURE__ */ import_react52.default.createElement(import_react53.HugeiconsIcon, { icon: import_core_free_icons16.Cancel01Icon, size: 16 })))), /* @__PURE__ */ import_react52.default.createElement("input", { type: "file", multiple: true, ref: archiveRef, onChange: handleFileSelect, className: "hidden", accept: "application/pdf,image/*" }), /* @__PURE__ */ import_react52.default.createElement("div", { className: "flex flex-col sm:flex-row items-center gap-3 w-full" }, /* @__PURE__ */ import_react52.default.createElement("button", { onClick: () => archiveRef.current?.click(), disabled: selectedApp.status !== "COMPLETED" || isUploading, className: "flex items-center justify-center gap-3 p-4 border border-neutral-100 rounded-full hover:bg-neutral-50 transition-colors text-black text-sm w-full outline-none disabled:opacity-50" }, /* @__PURE__ */ import_react52.default.createElement(import_react53.HugeiconsIcon, { icon: import_core_free_icons16.Upload01Icon, size: 18, className: "text-neutral-400" }), " Select Files to Upload"), pendingFiles.length > 0 && /* @__PURE__ */ import_react52.default.createElement("div", { className: "flex flex-col sm:flex-row items-center gap-3 w-full sm:w-auto shrink-0" }, /* @__PURE__ */ import_react52.default.createElement("button", { onClick: () => setPendingFiles([]), disabled: isUploading, className: "px-6 py-2 text-neutral-600 text-[11px] tracking-widest rounded-full hover:bg-neutral-100 outline-none w-full sm:w-auto uppercase" }, "Clear All"), /* @__PURE__ */ import_react52.default.createElement(ThreeDActionButton, { onClick: executeUpload, disabled: isUploading, isLoading: isUploading, className: "w-full sm:w-auto" }, "Upload ", pendingFiles.length, " File(s)")))), /* @__PURE__ */ import_react52.default.createElement("div", { className: "flex flex-col sm:flex-row items-center justify-between gap-4 mt-8 pt-6" }, !selectedApp.agentId ? /* @__PURE__ */ import_react52.default.createElement(ThreeDActionButton, { onClick: async () => {
|
|
2946
2997
|
setIsActioning(true);
|
|
2947
2998
|
await onAcceptApplication(selectedApp.id);
|
|
2948
2999
|
setIsActioning(false);
|
|
2949
|
-
}, disabled: isActioning, isLoading: isActioning, className: "w-full sm:w-auto" }, "Accept Application") : selectedApp.agentId !== currentAgentId ? /* @__PURE__ */
|
|
3000
|
+
}, disabled: isActioning, isLoading: isActioning, className: "w-full sm:w-auto" }, "Accept Application") : selectedApp.agentId !== currentAgentId ? /* @__PURE__ */ import_react52.default.createElement("div", { className: "w-full p-4 border border-red-100 bg-red-50/30 rounded-xl flex items-start gap-3" }, /* @__PURE__ */ import_react52.default.createElement(import_react53.HugeiconsIcon, { icon: import_core_free_icons16.Cancel01Icon, size: 16, className: "text-red-500 shrink-0 mt-0.5" }), /* @__PURE__ */ import_react52.default.createElement("div", null, /* @__PURE__ */ import_react52.default.createElement("p", { className: "text-sm text-red-700" }, "Application Taken"), /* @__PURE__ */ import_react52.default.createElement("p", { className: "text-xs text-red-600 mt-1" }, "Currently handled by ", selectedApp.agentName || "another agent", "."))) : /* @__PURE__ */ import_react52.default.createElement("div", { className: "w-full flex flex-col sm:flex-row items-center gap-4 justify-between" }, /* @__PURE__ */ import_react52.default.createElement("p", { className: "text-xs text-neutral-500" }, "You are the assigned agent."), /* @__PURE__ */ import_react52.default.createElement("div", { className: "flex flex-col sm:flex-row items-center justify-end gap-3 w-full sm:w-auto" }, /* @__PURE__ */ import_react52.default.createElement("button", { onClick: () => setActionModal("query"), disabled: selectedApp.status === "COMPLETED", className: "w-full sm:w-auto px-6 py-2 bg-white border border-neutral-100 text-neutral-600 text-[11px] tracking-widest rounded-full hover:bg-neutral-50 transition-colors outline-none disabled:opacity-30 uppercase" }, "Query"), /* @__PURE__ */ import_react52.default.createElement("button", { onClick: () => setActionModal("reject"), disabled: selectedApp.status === "COMPLETED", className: "w-full sm:w-auto px-6 py-2 bg-white border border-neutral-100 text-neutral-600 text-[11px] tracking-widest rounded-full hover:bg-neutral-50 transition-colors outline-none disabled:opacity-30 uppercase" }, "Reject"), /* @__PURE__ */ import_react52.default.createElement(ThreeDActionButton, { onClick: () => setActionModal("success"), disabled: selectedApp.status === "COMPLETED", className: "w-full sm:w-auto" }, "Mark Success"))))), actionModal && /* @__PURE__ */ import_react52.default.createElement("div", { className: "fixed inset-0 z-110 flex items-center justify-center p-4" }, /* @__PURE__ */ import_react52.default.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => !isActioning && setActionModal(null) }), /* @__PURE__ */ import_react52.default.createElement("div", { className: "relative w-full max-w-md bg-white rounded-3xl flex flex-col overflow-hidden animate-in zoom-in-95 duration-200 text-left" }, /* @__PURE__ */ import_react52.default.createElement("div", { className: "p-6" }, /* @__PURE__ */ import_react52.default.createElement("h3", { className: " text-lg text-black tracking-tight capitalize mb-2" }, actionModal === "success" ? "Complete Application" : `${actionModal} Application`), /* @__PURE__ */ import_react52.default.createElement("p", { className: "text-xs text-neutral-500" }, actionModal === "success" ? "Are you sure you want to mark this application as successfully completed?" : `Please provide a clear reason for the user. They will see this message and be asked to fix their application.`)), (actionModal === "query" || actionModal === "reject") && /* @__PURE__ */ import_react52.default.createElement("div", { className: "p-6 pb-2" }, /* @__PURE__ */ import_react52.default.createElement(TextInput, { label: "Reason for Action", value: actionMessage, onChange: setActionMessage, placeholder: "Enter your reason here...", disabled: isActioning })), /* @__PURE__ */ import_react52.default.createElement("div", { className: "flex items-center p-6 pt-4 gap-3" }, /* @__PURE__ */ import_react52.default.createElement("button", { onClick: () => setActionModal(null), disabled: isActioning, className: "flex-1 py-3 text-[11px] tracking-widest uppercase text-neutral-600 rounded-full hover:bg-neutral-50 transition-colors outline-none disabled:opacity-50" }, "Cancel"), /* @__PURE__ */ import_react52.default.createElement(ThreeDActionButton, { onClick: async () => {
|
|
2950
3001
|
setIsActioning(true);
|
|
2951
3002
|
await onUpdateStatus(selectedApp.id, actionModal === "success" ? "COMPLETED" : actionModal === "reject" ? "REJECTED" : "QUEUED", actionMessage);
|
|
2952
3003
|
setIsActioning(false);
|
|
2953
3004
|
setActionModal(null);
|
|
2954
3005
|
setActionMessage("");
|
|
2955
|
-
}, disabled: isActioning || (actionModal === "query" || actionModal === "reject") && actionMessage.trim().length < 5, isLoading: isActioning, className: "flex-1" }, "Confirm ", actionModal)))), archiveToDelete && /* @__PURE__ */
|
|
3006
|
+
}, disabled: isActioning || (actionModal === "query" || actionModal === "reject") && actionMessage.trim().length < 5, isLoading: isActioning, className: "flex-1" }, "Confirm ", actionModal)))), archiveToDelete && /* @__PURE__ */ import_react52.default.createElement("div", { className: "fixed inset-0 z-110 flex items-center justify-center p-4" }, /* @__PURE__ */ import_react52.default.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => !isActioning && setArchiveToDelete(null) }), /* @__PURE__ */ import_react52.default.createElement("div", { className: "relative w-full max-w-md bg-white rounded-3xl flex flex-col overflow-hidden animate-in zoom-in-95 duration-200 text-left" }, /* @__PURE__ */ import_react52.default.createElement("div", { className: "p-6" }, /* @__PURE__ */ import_react52.default.createElement("h3", { className: " text-lg text-black tracking-tight mb-2" }, "Delete Document?"), /* @__PURE__ */ import_react52.default.createElement("p", { className: "text-xs text-neutral-500" }, 'Are you sure you want to permanently delete "', archiveToDelete.name, '"?')), /* @__PURE__ */ import_react52.default.createElement("div", { className: "flex items-center p-6 gap-3" }, /* @__PURE__ */ import_react52.default.createElement("button", { onClick: () => setArchiveToDelete(null), disabled: isActioning, className: "flex-1 py-3 text-[11px] tracking-widest uppercase text-neutral-600 rounded-full hover:bg-neutral-50 transition-colors outline-none disabled:opacity-50" }, "Cancel"), /* @__PURE__ */ import_react52.default.createElement(ThreeDActionButton, { onClick: async () => {
|
|
2956
3007
|
setIsActioning(true);
|
|
2957
3008
|
await onDeleteArchive(selectedApp.id, archiveToDelete.id);
|
|
2958
3009
|
setIsActioning(false);
|
|
@@ -2961,12 +3012,12 @@ var UniversalAgentConsole = ({
|
|
|
2961
3012
|
};
|
|
2962
3013
|
|
|
2963
3014
|
// src/components/UniversalOverviewPage.tsx
|
|
2964
|
-
var
|
|
3015
|
+
var import_react56 = __toESM(require("react"));
|
|
2965
3016
|
|
|
2966
3017
|
// src/components/Banner.tsx
|
|
2967
|
-
var
|
|
2968
|
-
var
|
|
2969
|
-
var
|
|
3018
|
+
var import_react54 = __toESM(require("react"));
|
|
3019
|
+
var import_react55 = require("@hugeicons/react");
|
|
3020
|
+
var import_core_free_icons17 = require("@hugeicons/core-free-icons");
|
|
2970
3021
|
var Banner = ({
|
|
2971
3022
|
title,
|
|
2972
3023
|
message,
|
|
@@ -2976,7 +3027,7 @@ var Banner = ({
|
|
|
2976
3027
|
onDismiss,
|
|
2977
3028
|
action
|
|
2978
3029
|
}) => {
|
|
2979
|
-
const [isVisible, setIsVisible] = (0,
|
|
3030
|
+
const [isVisible, setIsVisible] = (0, import_react54.useState)(true);
|
|
2980
3031
|
if (!isVisible) return null;
|
|
2981
3032
|
const handleDismiss = () => {
|
|
2982
3033
|
setIsVisible(false);
|
|
@@ -2988,7 +3039,7 @@ var Banner = ({
|
|
|
2988
3039
|
iconColor: "text-emerald-600",
|
|
2989
3040
|
titleColor: "text-emerald-900",
|
|
2990
3041
|
msgColor: "text-emerald-700",
|
|
2991
|
-
defaultIcon:
|
|
3042
|
+
defaultIcon: import_core_free_icons17.CheckmarkBadge01Icon,
|
|
2992
3043
|
closeHover: "hover:bg-emerald-100 text-emerald-500"
|
|
2993
3044
|
},
|
|
2994
3045
|
warning: {
|
|
@@ -2996,7 +3047,7 @@ var Banner = ({
|
|
|
2996
3047
|
iconColor: "text-amber-600",
|
|
2997
3048
|
titleColor: "text-amber-900",
|
|
2998
3049
|
msgColor: "text-amber-700",
|
|
2999
|
-
defaultIcon:
|
|
3050
|
+
defaultIcon: import_core_free_icons17.InformationCircleIcon,
|
|
3000
3051
|
closeHover: "hover:bg-amber-100 text-amber-500"
|
|
3001
3052
|
},
|
|
3002
3053
|
alert: {
|
|
@@ -3004,20 +3055,20 @@ var Banner = ({
|
|
|
3004
3055
|
iconColor: "text-red-600",
|
|
3005
3056
|
titleColor: "text-red-900",
|
|
3006
3057
|
msgColor: "text-red-700",
|
|
3007
|
-
defaultIcon:
|
|
3058
|
+
defaultIcon: import_core_free_icons17.Alert02Icon,
|
|
3008
3059
|
closeHover: "hover:bg-red-100 text-red-500"
|
|
3009
3060
|
}
|
|
3010
3061
|
};
|
|
3011
3062
|
const currentConfig = config[type];
|
|
3012
3063
|
const IconToUse = icon || currentConfig.defaultIcon;
|
|
3013
|
-
return /* @__PURE__ */
|
|
3064
|
+
return /* @__PURE__ */ import_react54.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_react54.default.createElement("div", { className: `shrink-0 mt-0.5 ${currentConfig.iconColor}` }, /* @__PURE__ */ import_react54.default.createElement(import_react55.HugeiconsIcon, { icon: IconToUse, size: 20 })), /* @__PURE__ */ import_react54.default.createElement("div", { className: "flex-1 flex flex-col min-w-0 pr-6" }, /* @__PURE__ */ import_react54.default.createElement("h4", { className: `text-sm tracking-tight mb-1 ${currentConfig.titleColor}` }, title), /* @__PURE__ */ import_react54.default.createElement("p", { className: `text-xs leading-relaxed ${currentConfig.msgColor}` }, message), action && /* @__PURE__ */ import_react54.default.createElement("div", { className: "mt-3" }, action)), isDismissible && /* @__PURE__ */ import_react54.default.createElement(
|
|
3014
3065
|
"button",
|
|
3015
3066
|
{
|
|
3016
3067
|
onClick: handleDismiss,
|
|
3017
3068
|
className: `absolute top-3 right-3 p-1.5 rounded-full transition-colors outline-none shrink-0 ${currentConfig.closeHover}`,
|
|
3018
3069
|
"aria-label": "Dismiss banner"
|
|
3019
3070
|
},
|
|
3020
|
-
/* @__PURE__ */
|
|
3071
|
+
/* @__PURE__ */ import_react54.default.createElement(import_react55.HugeiconsIcon, { icon: import_core_free_icons17.Cancel01Icon, size: 16 })
|
|
3021
3072
|
));
|
|
3022
3073
|
};
|
|
3023
3074
|
|
|
@@ -3032,7 +3083,7 @@ var UniversalOverviewPage = ({
|
|
|
3032
3083
|
alerts = [],
|
|
3033
3084
|
banner
|
|
3034
3085
|
}) => {
|
|
3035
|
-
return /* @__PURE__ */
|
|
3086
|
+
return /* @__PURE__ */ import_react56.default.createElement("div", { className: "flex flex-col gap-8 animate-in fade-in duration-300 pb-10" }, /* @__PURE__ */ import_react56.default.createElement("div", { className: "flex items-center justify-between gap-4" }, /* @__PURE__ */ import_react56.default.createElement("div", null, /* @__PURE__ */ import_react56.default.createElement("h1", { className: " text-xl text-black mb-1 tracking-tight" }, headerTitle), /* @__PURE__ */ import_react56.default.createElement("p", { className: "text-xs text-neutral-500" }, headerDescription))), quickStats.length > 0 && /* @__PURE__ */ import_react56.default.createElement("div", { className: "w-full rounded-2xl overflow-hidden max-w-3xl bg-white" }, /* @__PURE__ */ import_react56.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_react56.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_react56.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_react56.default.createElement("div", { className: "min-w-0 flex-1" }, /* @__PURE__ */ import_react56.default.createElement("p", { className: "text-[11px] tracking-[0.2em] text-neutral-400 mb-1 truncate uppercase" }, stat.label), /* @__PURE__ */ import_react56.default.createElement("p", { className: "text-lg md:text-xl text-black tracking-tight truncate" }, stat.value)))))), banner && banner.isVisible && /* @__PURE__ */ import_react56.default.createElement("div", { className: "w-full max-w-3xl" }, /* @__PURE__ */ import_react56.default.createElement(
|
|
3036
3087
|
Banner,
|
|
3037
3088
|
{
|
|
3038
3089
|
title: banner.title,
|
|
@@ -3043,7 +3094,7 @@ var UniversalOverviewPage = ({
|
|
|
3043
3094
|
onDismiss: banner.onDismiss,
|
|
3044
3095
|
action: banner.action
|
|
3045
3096
|
}
|
|
3046
|
-
)), /* @__PURE__ */
|
|
3097
|
+
)), /* @__PURE__ */ import_react56.default.createElement("div", { className: "w-full rounded-2xl max-w-3xl overflow-hidden bg-white min-w-0" }, /* @__PURE__ */ import_react56.default.createElement("div", { className: "p-6 sm:p-8 flex flex-col h-full min-w-0 gap-6" }, /* @__PURE__ */ import_react56.default.createElement("div", { className: "flex flex-wrap items-center justify-between gap-4 border-b border-neutral-100 pb-4" }, /* @__PURE__ */ import_react56.default.createElement("h3", { className: " text-[11px] text-black tracking-[0.2em] uppercase" }, detailsTitle), primaryAction && (primaryAction.href ? /* @__PURE__ */ import_react56.default.createElement(
|
|
3047
3098
|
ThreeDButton,
|
|
3048
3099
|
{
|
|
3049
3100
|
href: primaryAction.href,
|
|
@@ -3052,7 +3103,7 @@ var UniversalOverviewPage = ({
|
|
|
3052
3103
|
},
|
|
3053
3104
|
primaryAction.label,
|
|
3054
3105
|
primaryAction.icon
|
|
3055
|
-
) : /* @__PURE__ */
|
|
3106
|
+
) : /* @__PURE__ */ import_react56.default.createElement(
|
|
3056
3107
|
ThreeDActionButton,
|
|
3057
3108
|
{
|
|
3058
3109
|
onClick: primaryAction.onClick,
|
|
@@ -3061,19 +3112,19 @@ var UniversalOverviewPage = ({
|
|
|
3061
3112
|
},
|
|
3062
3113
|
primaryAction.label,
|
|
3063
3114
|
primaryAction.icon
|
|
3064
|
-
))), /* @__PURE__ */
|
|
3115
|
+
))), /* @__PURE__ */ import_react56.default.createElement("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-8" }, details.map((detail, idx) => /* @__PURE__ */ import_react56.default.createElement("div", { key: idx, className: "min-w-0" }, /* @__PURE__ */ import_react56.default.createElement("p", { className: "text-[11px] tracking-[0.2em] text-neutral-400 mb-1.5 uppercase" }, detail.label), /* @__PURE__ */ import_react56.default.createElement("p", { className: "text-[13px] text-black truncate" }, detail.value)))), alerts.map((alert, idx) => {
|
|
3065
3116
|
const bgClass = alert.type === "warning" ? "bg-amber-50/50" : alert.type === "info" ? "bg-blue-50/50" : "bg-red-50/50";
|
|
3066
3117
|
const textClass = alert.type === "warning" ? "text-amber-600" : alert.type === "info" ? "text-blue-600" : "text-red-600";
|
|
3067
3118
|
const valClass = alert.type === "warning" ? "text-amber-700" : alert.type === "info" ? "text-blue-700" : "text-red-700";
|
|
3068
3119
|
const lblClass = alert.type === "warning" ? "text-amber-400" : alert.type === "info" ? "text-blue-400" : "text-red-400";
|
|
3069
|
-
return /* @__PURE__ */
|
|
3120
|
+
return /* @__PURE__ */ import_react56.default.createElement("div", { key: idx, className: `mt-4 p-5 rounded-xl flex flex-col gap-4 ${bgClass}` }, /* @__PURE__ */ import_react56.default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ import_react56.default.createElement("span", { className: `text-[11px] tracking-widest uppercase ${textClass}` }, alert.title)), alert.items.map((item, itemIdx) => /* @__PURE__ */ import_react56.default.createElement("div", { key: itemIdx }, /* @__PURE__ */ import_react56.default.createElement("span", { className: `text-[11px] tracking-[0.2em] block mb-1 uppercase ${lblClass}` }, item.label), /* @__PURE__ */ import_react56.default.createElement("p", { className: `text-[13px] leading-relaxed ${valClass}` }, item.text))));
|
|
3070
3121
|
}))));
|
|
3071
3122
|
};
|
|
3072
3123
|
|
|
3073
3124
|
// src/components/UniversalErrorView.tsx
|
|
3074
|
-
var
|
|
3075
|
-
var
|
|
3076
|
-
var
|
|
3125
|
+
var import_react57 = __toESM(require("react"));
|
|
3126
|
+
var import_react58 = require("@hugeicons/react");
|
|
3127
|
+
var import_core_free_icons18 = require("@hugeicons/core-free-icons");
|
|
3077
3128
|
var UniversalErrorView = ({
|
|
3078
3129
|
isBooting,
|
|
3079
3130
|
isLoading,
|
|
@@ -3085,7 +3136,7 @@ var UniversalErrorView = ({
|
|
|
3085
3136
|
returnLabel = "Return to Workspace"
|
|
3086
3137
|
}) => {
|
|
3087
3138
|
if (isBooting || isLoading && !activeData) {
|
|
3088
|
-
return /* @__PURE__ */
|
|
3139
|
+
return /* @__PURE__ */ import_react57.default.createElement("div", { className: "flex items-center justify-center h-screen w-full bg-transparent" }, /* @__PURE__ */ import_react57.default.createElement(PageSpinner, null));
|
|
3089
3140
|
}
|
|
3090
3141
|
if (!isLoading && (!activeData || activeError)) {
|
|
3091
3142
|
const errorString = typeof activeError === "string" ? activeError : JSON.stringify(activeError || "");
|
|
@@ -3096,7 +3147,7 @@ var UniversalErrorView = ({
|
|
|
3096
3147
|
const apiMessage = typeof activeError === "string" && activeError.trim() !== "" ? activeError : null;
|
|
3097
3148
|
let title = "Oops Connection Error";
|
|
3098
3149
|
let description = apiMessage || `We could not load your request. Please check your connection and try again.`;
|
|
3099
|
-
let IconComponent =
|
|
3150
|
+
let IconComponent = import_core_free_icons18.ConfusedIcon;
|
|
3100
3151
|
if (isNotFoundError) {
|
|
3101
3152
|
title = "Oops its not your fault";
|
|
3102
3153
|
description = apiMessage || `We could not reach the ${envName} you just loaded. Our team has been notified.`;
|
|
@@ -3104,7 +3155,7 @@ var UniversalErrorView = ({
|
|
|
3104
3155
|
title = "Access Restricted";
|
|
3105
3156
|
description = apiMessage || `You have insufficient permissions to view this ${envName}. Please contact your administrator.`;
|
|
3106
3157
|
}
|
|
3107
|
-
return /* @__PURE__ */
|
|
3158
|
+
return /* @__PURE__ */ import_react57.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_react57.default.createElement("div", { className: "mb-4 flex justify-center" }, /* @__PURE__ */ import_react57.default.createElement(import_react58.HugeiconsIcon, { icon: IconComponent, size: 48, className: "text-neutral-300" })), /* @__PURE__ */ import_react57.default.createElement("h2", { className: " text-lg text-black tracking-tight " }, title), /* @__PURE__ */ import_react57.default.createElement("p", { className: "text-xs mt-2 mb-8 text-neutral-500 max-w-sm text-center leading-relaxed" }, description), /* @__PURE__ */ import_react57.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_react57.default.createElement(
|
|
3108
3159
|
"button",
|
|
3109
3160
|
{
|
|
3110
3161
|
onClick: () => window.location.href = returnUrl,
|
|
@@ -3113,14 +3164,14 @@ var UniversalErrorView = ({
|
|
|
3113
3164
|
returnLabel
|
|
3114
3165
|
) : (
|
|
3115
3166
|
// Soft errors (Network timeouts) allow them to retry or optionally retreat
|
|
3116
|
-
/* @__PURE__ */
|
|
3167
|
+
/* @__PURE__ */ import_react57.default.createElement(import_react57.default.Fragment, null, envName.toLowerCase().includes("application") && /* @__PURE__ */ import_react57.default.createElement(
|
|
3117
3168
|
"button",
|
|
3118
3169
|
{
|
|
3119
3170
|
onClick: () => window.location.href = returnUrl,
|
|
3120
3171
|
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"
|
|
3121
3172
|
},
|
|
3122
3173
|
"Back Home"
|
|
3123
|
-
), /* @__PURE__ */
|
|
3174
|
+
), /* @__PURE__ */ import_react57.default.createElement(
|
|
3124
3175
|
"button",
|
|
3125
3176
|
{
|
|
3126
3177
|
onClick: onRetry,
|
|
@@ -3135,9 +3186,9 @@ var UniversalErrorView = ({
|
|
|
3135
3186
|
};
|
|
3136
3187
|
|
|
3137
3188
|
// src/components/UniversalLookupPage.tsx
|
|
3138
|
-
var
|
|
3139
|
-
var
|
|
3140
|
-
var
|
|
3189
|
+
var import_react59 = __toESM(require("react"));
|
|
3190
|
+
var import_react60 = require("@hugeicons/react");
|
|
3191
|
+
var import_core_free_icons19 = require("@hugeicons/core-free-icons");
|
|
3141
3192
|
var UniversalLookupPage = ({
|
|
3142
3193
|
headerTitle,
|
|
3143
3194
|
headerDescription,
|
|
@@ -3151,9 +3202,9 @@ var UniversalLookupPage = ({
|
|
|
3151
3202
|
resultContent,
|
|
3152
3203
|
modals
|
|
3153
3204
|
}) => {
|
|
3154
|
-
const [isTypeModalOpen, setIsTypeModalOpen] = (0,
|
|
3205
|
+
const [isTypeModalOpen, setIsTypeModalOpen] = (0, import_react59.useState)(false);
|
|
3155
3206
|
const currentOptionLabel = searchOptions.find((opt) => opt.value === selectedSearchType)?.label || "Select Type";
|
|
3156
|
-
return /* @__PURE__ */
|
|
3207
|
+
return /* @__PURE__ */ import_react59.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_react59.default.createElement(ManagedToaster, null), /* @__PURE__ */ import_react59.default.createElement("div", { className: "flex flex-col sm:flex-row sm:items-start justify-between gap-3 sm:gap-4" }, /* @__PURE__ */ import_react59.default.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ import_react59.default.createElement("h1", { className: " text-xl text-black mb-1 truncate tracking-tight" }, headerTitle), /* @__PURE__ */ import_react59.default.createElement("p", { className: "text-xs text-neutral-500 truncate" }, headerDescription))), /* @__PURE__ */ import_react59.default.createElement("div", { className: "w-full max-w-2xl pb-8" }, /* @__PURE__ */ import_react59.default.createElement("form", { className: "flex flex-col gap-6", onSubmit: onSearch, autoComplete: "off" }, /* @__PURE__ */ import_react59.default.createElement("div", { className: "flex gap-4" }, /* @__PURE__ */ import_react59.default.createElement(
|
|
3157
3208
|
"button",
|
|
3158
3209
|
{
|
|
3159
3210
|
type: "button",
|
|
@@ -3161,7 +3212,7 @@ var UniversalLookupPage = ({
|
|
|
3161
3212
|
className: "mt-2 text-[11px] tracking-widest bg-transparent border-b border-neutral-100 text-black text-left outline-none focus:border-black shrink-0 uppercase"
|
|
3162
3213
|
},
|
|
3163
3214
|
currentOptionLabel
|
|
3164
|
-
), /* @__PURE__ */
|
|
3215
|
+
), /* @__PURE__ */ import_react59.default.createElement("div", { className: "flex-1" }, /* @__PURE__ */ import_react59.default.createElement(
|
|
3165
3216
|
TextInput,
|
|
3166
3217
|
{
|
|
3167
3218
|
placeholder: "Enter Exact ID, Email, or Slug...",
|
|
@@ -3169,7 +3220,7 @@ var UniversalLookupPage = ({
|
|
|
3169
3220
|
onChange: onSearchQueryChange,
|
|
3170
3221
|
disabled: isSearching
|
|
3171
3222
|
}
|
|
3172
|
-
))), /* @__PURE__ */
|
|
3223
|
+
))), /* @__PURE__ */ import_react59.default.createElement("div", { className: "flex justify-end" }, /* @__PURE__ */ import_react59.default.createElement(
|
|
3173
3224
|
ThreeDActionButton,
|
|
3174
3225
|
{
|
|
3175
3226
|
type: "submit",
|
|
@@ -3177,9 +3228,9 @@ var UniversalLookupPage = ({
|
|
|
3177
3228
|
isLoading: isSearching,
|
|
3178
3229
|
className: "min-w-32"
|
|
3179
3230
|
},
|
|
3180
|
-
/* @__PURE__ */
|
|
3231
|
+
/* @__PURE__ */ import_react59.default.createElement(import_react60.HugeiconsIcon, { icon: import_core_free_icons19.Search01Icon, size: 14, className: "mr-2" }),
|
|
3181
3232
|
" Lookup"
|
|
3182
|
-
)))), resultContent && /* @__PURE__ */
|
|
3233
|
+
)))), resultContent && /* @__PURE__ */ import_react59.default.createElement("div", { className: "w-full max-w-2xl bg-white text-left animate-in fade-in slide-in-from-bottom-4" }, /* @__PURE__ */ import_react59.default.createElement("h3", { className: " text-[11px] text-neutral-400 tracking-[0.2em] mb-6 uppercase" }, "Entity Record Found"), resultContent), isTypeModalOpen && /* @__PURE__ */ import_react59.default.createElement("div", { className: "fixed inset-0 z-110 flex items-center justify-center p-4" }, /* @__PURE__ */ import_react59.default.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setIsTypeModalOpen(false) }), /* @__PURE__ */ import_react59.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_react59.default.createElement("div", { className: "p-6 text-center w-full" }, /* @__PURE__ */ import_react59.default.createElement("h3", { className: " text-[14px] text-black tracking-tight mb-2" }, "Select Entity Type")), /* @__PURE__ */ import_react59.default.createElement("div", { className: "w-full flex flex-col pl-2 pr-2 pb-2" }, searchOptions.map((option) => /* @__PURE__ */ import_react59.default.createElement(
|
|
3183
3234
|
"button",
|
|
3184
3235
|
{
|
|
3185
3236
|
key: option.value,
|
|
@@ -3190,16 +3241,16 @@ var UniversalLookupPage = ({
|
|
|
3190
3241
|
},
|
|
3191
3242
|
className: `text-left px-4 py-3 text-[11px] 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"}`
|
|
3192
3243
|
},
|
|
3193
|
-
/* @__PURE__ */
|
|
3194
|
-
selectedSearchType === option.value && /* @__PURE__ */
|
|
3195
|
-
))), /* @__PURE__ */
|
|
3244
|
+
/* @__PURE__ */ import_react59.default.createElement("span", { className: "truncate pr-2" }, option.label),
|
|
3245
|
+
selectedSearchType === option.value && /* @__PURE__ */ import_react59.default.createElement("div", null)
|
|
3246
|
+
))), /* @__PURE__ */ import_react59.default.createElement("div", { className: "w-full flex" }, /* @__PURE__ */ import_react59.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);
|
|
3196
3247
|
};
|
|
3197
3248
|
|
|
3198
3249
|
// src/components/UniversalDirectoryPage.tsx
|
|
3199
|
-
var
|
|
3200
|
-
var
|
|
3201
|
-
var
|
|
3202
|
-
var
|
|
3250
|
+
var import_react61 = __toESM(require("react"));
|
|
3251
|
+
var import_react62 = require("@hugeicons/react");
|
|
3252
|
+
var import_core_free_icons20 = require("@hugeicons/core-free-icons");
|
|
3253
|
+
var PageSpinner5 = () => /* @__PURE__ */ import_react61.default.createElement("div", { className: "flex justify-center items-center py-12" }, /* @__PURE__ */ import_react61.default.createElement(import_react62.HugeiconsIcon, { icon: import_core_free_icons20.Loading03Icon, size: 32, className: "animate-spin mb-4 text-black" }));
|
|
3203
3254
|
var UniversalDirectoryPage = ({
|
|
3204
3255
|
headerTitle,
|
|
3205
3256
|
headerDescription,
|
|
@@ -3219,49 +3270,49 @@ var UniversalDirectoryPage = ({
|
|
|
3219
3270
|
detailsContent,
|
|
3220
3271
|
modals
|
|
3221
3272
|
}) => {
|
|
3222
|
-
return /* @__PURE__ */
|
|
3273
|
+
return /* @__PURE__ */ import_react61.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_react61.default.createElement(ManagedToaster, null), /* @__PURE__ */ import_react61.default.createElement("div", { className: "flex flex-col sm:flex-row sm:items-start justify-between gap-4" }, currentView === "list" ? /* @__PURE__ */ import_react61.default.createElement(import_react61.default.Fragment, null, /* @__PURE__ */ import_react61.default.createElement("div", { className: "w-full" }, /* @__PURE__ */ import_react61.default.createElement("h1", { className: " text-xl text-black mb-1 tracking-tight" }, headerTitle), /* @__PURE__ */ import_react61.default.createElement("p", { className: "text-xs text-neutral-500 mb-6" }, headerDescription), !hideSearch && /* @__PURE__ */ import_react61.default.createElement(
|
|
3223
3274
|
TextInput,
|
|
3224
3275
|
{
|
|
3225
3276
|
placeholder: searchPlaceholder,
|
|
3226
3277
|
value: searchQuery,
|
|
3227
3278
|
onChange: onSearchChange
|
|
3228
3279
|
}
|
|
3229
|
-
)), headerAction && /* @__PURE__ */
|
|
3280
|
+
)), headerAction && /* @__PURE__ */ import_react61.default.createElement("div", { className: "shrink-0 w-full sm:w-auto mt-4 sm:mt-0" }, headerAction)) : /* @__PURE__ */ import_react61.default.createElement("div", { className: "flex flex-col items-start gap-3" }, /* @__PURE__ */ import_react61.default.createElement("button", { onClick: onBackToList, className: "text-[11px] text-neutral-400 hover:text-black tracking-[0.2em] flex items-center gap-1.5 transition-colors outline-none uppercase" }, /* @__PURE__ */ import_react61.default.createElement(import_react62.HugeiconsIcon, { icon: import_core_free_icons20.ArrowLeft01Icon, size: 12 }), " Back"))), currentView === "list" && /* @__PURE__ */ import_react61.default.createElement("div", { className: "w-full overflow-hidden pt-2" }, isLoading ? /* @__PURE__ */ import_react61.default.createElement(PageSpinner5, null) : /* @__PURE__ */ import_react61.default.createElement("div", { className: "flex flex-col min-w-0" }, /* @__PURE__ */ import_react61.default.createElement("div", { className: "divide-y divide-neutral-100" }, items.length === 0 ? /* @__PURE__ */ import_react61.default.createElement("p", { className: "text-xs text-neutral-500 py-6 text-center" }, "No records found.") : items.map((item) => /* @__PURE__ */ import_react61.default.createElement(
|
|
3230
3281
|
"div",
|
|
3231
3282
|
{
|
|
3232
3283
|
key: item.id,
|
|
3233
3284
|
onClick: () => onRowClick(item.id),
|
|
3234
3285
|
className: "flex items-center justify-between p-4 sm:p-5 hover:bg-neutral-50/50 transition-colors cursor-pointer group min-w-0"
|
|
3235
3286
|
},
|
|
3236
|
-
/* @__PURE__ */
|
|
3237
|
-
item.rightBadge && /* @__PURE__ */
|
|
3238
|
-
))), /* @__PURE__ */
|
|
3287
|
+
/* @__PURE__ */ import_react61.default.createElement("div", { className: "flex items-center gap-3 sm:gap-4 min-w-0 flex-1" }, /* @__PURE__ */ import_react61.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_react61.default.createElement("div", { className: "min-w-0 flex-1" }, /* @__PURE__ */ import_react61.default.createElement("div", { className: "text-sm text-black truncate pr-2" }, item.primaryText), /* @__PURE__ */ import_react61.default.createElement("div", { className: "text-xs text-neutral-500 truncate pr-2 mt-0.5" }, item.secondaryText))),
|
|
3288
|
+
item.rightBadge && /* @__PURE__ */ import_react61.default.createElement("div", { className: "shrink-0 pl-2" }, /* @__PURE__ */ import_react61.default.createElement("span", { className: `text-[11px] 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))
|
|
3289
|
+
))), /* @__PURE__ */ import_react61.default.createElement("div", { className: "flex items-center justify-between p-4 sm:p-5" }, /* @__PURE__ */ import_react61.default.createElement("span", { className: "text-[11px] text-neutral-400 tracking-[0.2em] uppercase" }, "Page ", currentPage, " of ", Math.max(1, totalPages)), /* @__PURE__ */ import_react61.default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ import_react61.default.createElement(
|
|
3239
3290
|
"button",
|
|
3240
3291
|
{
|
|
3241
3292
|
onClick: () => onPageChange(currentPage - 1),
|
|
3242
3293
|
disabled: currentPage <= 1 || isLoading,
|
|
3243
3294
|
className: "p-2 border border-neutral-100 rounded-full bg-white text-neutral-500 hover:text-black outline-none disabled:opacity-30 transition-all"
|
|
3244
3295
|
},
|
|
3245
|
-
/* @__PURE__ */
|
|
3246
|
-
), /* @__PURE__ */
|
|
3296
|
+
/* @__PURE__ */ import_react61.default.createElement(import_react62.HugeiconsIcon, { icon: import_core_free_icons20.ArrowLeft01Icon, size: 14 })
|
|
3297
|
+
), /* @__PURE__ */ import_react61.default.createElement(
|
|
3247
3298
|
"button",
|
|
3248
3299
|
{
|
|
3249
3300
|
onClick: () => onPageChange(currentPage + 1),
|
|
3250
3301
|
disabled: currentPage >= totalPages || isLoading,
|
|
3251
3302
|
className: "p-2 border border-neutral-100 rounded-full bg-white text-neutral-500 hover:text-black outline-none disabled:opacity-30 transition-all"
|
|
3252
3303
|
},
|
|
3253
|
-
/* @__PURE__ */
|
|
3304
|
+
/* @__PURE__ */ import_react61.default.createElement(import_react62.HugeiconsIcon, { icon: import_core_free_icons20.ArrowRight01Icon, size: 14 })
|
|
3254
3305
|
))))), currentView === "details" && detailsContent, modals);
|
|
3255
3306
|
};
|
|
3256
3307
|
|
|
3257
3308
|
// src/components/AiApproveDecline.tsx
|
|
3258
|
-
var
|
|
3259
|
-
var
|
|
3260
|
-
var
|
|
3309
|
+
var import_react63 = __toESM(require("react"));
|
|
3310
|
+
var import_react64 = require("@hugeicons/react");
|
|
3311
|
+
var import_core_free_icons21 = require("@hugeicons/core-free-icons");
|
|
3261
3312
|
var AiApproveDecline = ({ suggestionTitle, suggestionValue, onApprove, onDecline, onEdit }) => {
|
|
3262
|
-
const [isEditing, setIsEditing] = (0,
|
|
3263
|
-
const [editVal, setEditVal] = (0,
|
|
3264
|
-
return /* @__PURE__ */
|
|
3313
|
+
const [isEditing, setIsEditing] = (0, import_react63.useState)(false);
|
|
3314
|
+
const [editVal, setEditVal] = (0, import_react63.useState)(typeof suggestionValue === "string" ? suggestionValue : "");
|
|
3315
|
+
return /* @__PURE__ */ import_react63.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_react63.default.createElement("div", null, /* @__PURE__ */ import_react63.default.createElement("span", { className: "text-[11px] tracking-widest text-purple-600 block mb-1 uppercase" }, "AI Suggestion: ", suggestionTitle), !isEditing ? /* @__PURE__ */ import_react63.default.createElement("div", { className: "text-sm text-black" }, suggestionValue) : /* @__PURE__ */ import_react63.default.createElement(
|
|
3265
3316
|
"input",
|
|
3266
3317
|
{
|
|
3267
3318
|
type: "text",
|
|
@@ -3270,45 +3321,45 @@ var AiApproveDecline = ({ suggestionTitle, suggestionValue, onApprove, onDecline
|
|
|
3270
3321
|
className: "w-full text-sm p-2 border-b border-purple-200 bg-transparent outline-none focus:border-purple-400 transition-colors",
|
|
3271
3322
|
autoFocus: true
|
|
3272
3323
|
}
|
|
3273
|
-
)), /* @__PURE__ */
|
|
3324
|
+
)), /* @__PURE__ */ import_react63.default.createElement("div", { className: "flex items-center gap-1 mt-2" }, !isEditing ? /* @__PURE__ */ import_react63.default.createElement(import_react63.default.Fragment, null, /* @__PURE__ */ import_react63.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_react63.default.createElement(import_react64.HugeiconsIcon, { icon: import_core_free_icons21.CheckmarkCircle01Icon, size: 28 })), /* @__PURE__ */ import_react63.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_react63.default.createElement(import_react64.HugeiconsIcon, { icon: import_core_free_icons21.CancelCircleIcon, size: 28 })), onEdit && /* @__PURE__ */ import_react63.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_react63.default.createElement(import_react64.HugeiconsIcon, { icon: import_core_free_icons21.PencilEdit01Icon, size: 18 }))) : /* @__PURE__ */ import_react63.default.createElement(import_react63.default.Fragment, null, /* @__PURE__ */ import_react63.default.createElement("button", { onClick: () => {
|
|
3274
3325
|
onEdit?.(editVal);
|
|
3275
3326
|
setIsEditing(false);
|
|
3276
|
-
}, 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__ */
|
|
3327
|
+
}, 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_react63.default.createElement(import_react64.HugeiconsIcon, { icon: import_core_free_icons21.CheckmarkCircle01Icon, size: 28 })), /* @__PURE__ */ import_react63.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_react63.default.createElement(import_react64.HugeiconsIcon, { icon: import_core_free_icons21.CancelCircleIcon, size: 28 })))));
|
|
3277
3328
|
};
|
|
3278
3329
|
|
|
3279
3330
|
// src/components/AiStageCheck.tsx
|
|
3280
|
-
var
|
|
3281
|
-
var
|
|
3282
|
-
var
|
|
3331
|
+
var import_react65 = __toESM(require("react"));
|
|
3332
|
+
var import_react66 = require("@hugeicons/react");
|
|
3333
|
+
var import_core_free_icons22 = require("@hugeicons/core-free-icons");
|
|
3283
3334
|
var AiStageCheck = ({ tasks }) => {
|
|
3284
|
-
return /* @__PURE__ */
|
|
3335
|
+
return /* @__PURE__ */ import_react65.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_react65.default.createElement("span", { className: "text-[11px] tracking-widest text-purple-600 mb-1 uppercase" }, "AI Processing"), tasks.map((task) => /* @__PURE__ */ import_react65.default.createElement("div", { key: task.id, className: "flex items-center gap-3" }, task.status === "pending" && /* @__PURE__ */ import_react65.default.createElement("div", { className: "w-4 h-4 rounded-full border border-purple-200" }), task.status === "loading" && /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons22.Loading03Icon, size: 16, className: "animate-spin text-purple-500" }), task.status === "success" && /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons22.CheckmarkCircle02Icon, size: 16, className: "text-emerald-500" }), task.status === "error" && /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons22.CancelCircleIcon, size: 16, className: "text-red-500" }), /* @__PURE__ */ import_react65.default.createElement("span", { className: `text-xs transition-colors ${task.status === "success" ? "text-black" : task.status === "loading" ? "text-purple-700" : "text-neutral-500"}` }, task.label))));
|
|
3285
3336
|
};
|
|
3286
3337
|
|
|
3287
3338
|
// src/components/Stagger.tsx
|
|
3288
|
-
var
|
|
3289
|
-
var
|
|
3290
|
-
var
|
|
3339
|
+
var import_react67 = __toESM(require("react"));
|
|
3340
|
+
var import_react68 = require("@hugeicons/react");
|
|
3341
|
+
var import_core_free_icons23 = require("@hugeicons/core-free-icons");
|
|
3291
3342
|
var Stagger = ({ steps, currentStep }) => {
|
|
3292
3343
|
const getIconForStep = (stepName) => {
|
|
3293
3344
|
const lowerName = stepName.toLowerCase();
|
|
3294
|
-
if (lowerName.includes("document")) return
|
|
3295
|
-
if (lowerName.includes("review")) return
|
|
3296
|
-
if (lowerName.includes("submit")) return
|
|
3297
|
-
return
|
|
3345
|
+
if (lowerName.includes("document")) return import_core_free_icons23.Upload01Icon;
|
|
3346
|
+
if (lowerName.includes("review")) return import_core_free_icons23.FileSyncIcon;
|
|
3347
|
+
if (lowerName.includes("submit")) return import_core_free_icons23.CloudUploadIcon;
|
|
3348
|
+
return import_core_free_icons23.Briefcase02Icon;
|
|
3298
3349
|
};
|
|
3299
|
-
return /* @__PURE__ */
|
|
3350
|
+
return /* @__PURE__ */ import_react67.default.createElement("div", { className: "w-full flex items-center justify-between relative z-0" }, /* @__PURE__ */ import_react67.default.createElement("div", { className: "absolute left-0 top-1/2 -translate-y-1/2 w-full h-px bg-neutral-100 -z-10" }), /* @__PURE__ */ import_react67.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) => {
|
|
3300
3351
|
const isActive = idx === currentStep;
|
|
3301
3352
|
const isPassed = idx < currentStep;
|
|
3302
3353
|
const colorClass = isPassed ? "bg-emerald-500 text-white" : isActive ? "bg-neutral-100 text-neutral-500" : "bg-neutral-100 text-neutral-500";
|
|
3303
|
-
return /* @__PURE__ */
|
|
3354
|
+
return /* @__PURE__ */ import_react67.default.createElement("div", { key: step, className: `w-6 h-6 rounded-full flex items-center justify-center transition-colors duration-300 ${colorClass}` }, /* @__PURE__ */ import_react67.default.createElement(import_react68.HugeiconsIcon, { icon: getIconForStep(step), size: 11 }));
|
|
3304
3355
|
}));
|
|
3305
3356
|
};
|
|
3306
3357
|
|
|
3307
3358
|
// src/components/UniversalRegistrationFlow.tsx
|
|
3308
|
-
var
|
|
3359
|
+
var import_react69 = __toESM(require("react"));
|
|
3309
3360
|
var import_react_hot_toast7 = __toESM(require("react-hot-toast"));
|
|
3310
|
-
var
|
|
3311
|
-
var
|
|
3361
|
+
var import_react70 = require("@hugeicons/react");
|
|
3362
|
+
var import_core_free_icons24 = require("@hugeicons/core-free-icons");
|
|
3312
3363
|
var MACRO_STEPS = ["Details", "Documents", "Review", "Submit"];
|
|
3313
3364
|
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"];
|
|
3314
3365
|
var MEMBER_ROLES = ["Director Only", "Shareholder Only", "Both Director & Shareholder"];
|
|
@@ -3321,12 +3372,12 @@ var UniversalRegistrationFlow = ({
|
|
|
3321
3372
|
onRedirectToBilling,
|
|
3322
3373
|
onRedirectToApplication
|
|
3323
3374
|
}) => {
|
|
3324
|
-
const [isBooting, setIsBooting] = (0,
|
|
3325
|
-
const [macroStep, setMacroStep] = (0,
|
|
3326
|
-
const [appStatus, setAppStatus] = (0,
|
|
3327
|
-
const [isAbortModalOpen, setIsAbortModalOpen] = (0,
|
|
3328
|
-
const [isAborting, setIsAborting] = (0,
|
|
3329
|
-
const [formState, setFormState] = (0,
|
|
3375
|
+
const [isBooting, setIsBooting] = (0, import_react69.useState)(true);
|
|
3376
|
+
const [macroStep, setMacroStep] = (0, import_react69.useState)(0);
|
|
3377
|
+
const [appStatus, setAppStatus] = (0, import_react69.useState)("");
|
|
3378
|
+
const [isAbortModalOpen, setIsAbortModalOpen] = (0, import_react69.useState)(false);
|
|
3379
|
+
const [isAborting, setIsAborting] = (0, import_react69.useState)(false);
|
|
3380
|
+
const [formState, setFormState] = (0, import_react69.useState)({
|
|
3330
3381
|
natureApproved: false,
|
|
3331
3382
|
nameApproved: false,
|
|
3332
3383
|
addressApproved: false,
|
|
@@ -3337,13 +3388,13 @@ var UniversalRegistrationFlow = ({
|
|
|
3337
3388
|
passportApproved: false,
|
|
3338
3389
|
signatureApproved: false
|
|
3339
3390
|
});
|
|
3340
|
-
const idRef = (0,
|
|
3341
|
-
const passportRef = (0,
|
|
3342
|
-
const signatureRef = (0,
|
|
3343
|
-
const other1Ref = (0,
|
|
3344
|
-
const other2Ref = (0,
|
|
3345
|
-
const other3Ref = (0,
|
|
3346
|
-
const [formData, setFormData] = (0,
|
|
3391
|
+
const idRef = (0, import_react69.useRef)(null);
|
|
3392
|
+
const passportRef = (0, import_react69.useRef)(null);
|
|
3393
|
+
const signatureRef = (0, import_react69.useRef)(null);
|
|
3394
|
+
const other1Ref = (0, import_react69.useRef)(null);
|
|
3395
|
+
const other2Ref = (0, import_react69.useRef)(null);
|
|
3396
|
+
const other3Ref = (0, import_react69.useRef)(null);
|
|
3397
|
+
const [formData, setFormData] = (0, import_react69.useState)({
|
|
3347
3398
|
businessDesc: "",
|
|
3348
3399
|
natureOfBusiness: null,
|
|
3349
3400
|
proposedName: "",
|
|
@@ -3370,22 +3421,22 @@ var UniversalRegistrationFlow = ({
|
|
|
3370
3421
|
otherDoc3Url: "",
|
|
3371
3422
|
otherDoc3Meta: null
|
|
3372
3423
|
});
|
|
3373
|
-
const [activeModal, setActiveModal] = (0,
|
|
3374
|
-
const [iAgree, setIAgree] = (0,
|
|
3375
|
-
const [isAnalyzingNature, setIsAnalyzingNature] = (0,
|
|
3376
|
-
const [suggestedNature, setSuggestedNature] = (0,
|
|
3377
|
-
const [isCheckingQualifier, setIsCheckingQualifier] = (0,
|
|
3378
|
-
const [qualifierCheckResult, setQualifierCheckResult] = (0,
|
|
3379
|
-
const [isCheckingName, setIsCheckingName] = (0,
|
|
3380
|
-
const [nameCheckResult, setNameCheckResult] = (0,
|
|
3381
|
-
const [globalExtractingId, setGlobalExtractingId] = (0,
|
|
3382
|
-
const [globalUploadingPassport, setGlobalUploadingPassport] = (0,
|
|
3383
|
-
const [globalUploadingSignature, setGlobalUploadingSignature] = (0,
|
|
3384
|
-
const [isUploadingOther1, setIsUploadingOther1] = (0,
|
|
3385
|
-
const [isUploadingOther2, setIsUploadingOther2] = (0,
|
|
3386
|
-
const [isUploadingOther3, setIsUploadingOther3] = (0,
|
|
3387
|
-
const [aiTasks, setAiTasks] = (0,
|
|
3388
|
-
const [isSubmitting, setIsSubmitting] = (0,
|
|
3424
|
+
const [activeModal, setActiveModal] = (0, import_react69.useState)({ isOpen: false, type: null, memberIndex: null });
|
|
3425
|
+
const [iAgree, setIAgree] = (0, import_react69.useState)(false);
|
|
3426
|
+
const [isAnalyzingNature, setIsAnalyzingNature] = (0, import_react69.useState)(false);
|
|
3427
|
+
const [suggestedNature, setSuggestedNature] = (0, import_react69.useState)(null);
|
|
3428
|
+
const [isCheckingQualifier, setIsCheckingQualifier] = (0, import_react69.useState)(false);
|
|
3429
|
+
const [qualifierCheckResult, setQualifierCheckResult] = (0, import_react69.useState)(null);
|
|
3430
|
+
const [isCheckingName, setIsCheckingName] = (0, import_react69.useState)(false);
|
|
3431
|
+
const [nameCheckResult, setNameCheckResult] = (0, import_react69.useState)(null);
|
|
3432
|
+
const [globalExtractingId, setGlobalExtractingId] = (0, import_react69.useState)(false);
|
|
3433
|
+
const [globalUploadingPassport, setGlobalUploadingPassport] = (0, import_react69.useState)(false);
|
|
3434
|
+
const [globalUploadingSignature, setGlobalUploadingSignature] = (0, import_react69.useState)(false);
|
|
3435
|
+
const [isUploadingOther1, setIsUploadingOther1] = (0, import_react69.useState)(false);
|
|
3436
|
+
const [isUploadingOther2, setIsUploadingOther2] = (0, import_react69.useState)(false);
|
|
3437
|
+
const [isUploadingOther3, setIsUploadingOther3] = (0, import_react69.useState)(false);
|
|
3438
|
+
const [aiTasks, setAiTasks] = (0, import_react69.useState)([]);
|
|
3439
|
+
const [isSubmitting, setIsSubmitting] = (0, import_react69.useState)(false);
|
|
3389
3440
|
const isReadOnly = ["PENDING", "AWAITING_PAYMENT", "COMPLETED"].includes(appStatus);
|
|
3390
3441
|
const isAnyUploading = globalExtractingId || globalUploadingPassport || globalUploadingSignature || isUploadingOther1 || isUploadingOther2 || isUploadingOther3;
|
|
3391
3442
|
const baseApi = async (action, payload = {}) => {
|
|
@@ -3400,7 +3451,7 @@ var UniversalRegistrationFlow = ({
|
|
|
3400
3451
|
return { success: false, error: "Network communication failed." };
|
|
3401
3452
|
}
|
|
3402
3453
|
};
|
|
3403
|
-
(0,
|
|
3454
|
+
(0, import_react69.useEffect)(() => {
|
|
3404
3455
|
baseApi("progress_load").then((data) => {
|
|
3405
3456
|
if (data.success && data.data) {
|
|
3406
3457
|
const meta = data.data;
|
|
@@ -3876,23 +3927,23 @@ var UniversalRegistrationFlow = ({
|
|
|
3876
3927
|
const isStep0Valid = type === "company" ? formState.natureApproved && formState.nameApproved && formState.addressApproved && formState.membersDetailsApproved : formState.natureApproved && formState.nameApproved && formState.addressApproved && formState.ownerApproved;
|
|
3877
3928
|
const isStep1Valid = type === "company" ? formState.membersDocsApproved : formState.idApproved && formState.passportApproved && formState.signatureApproved;
|
|
3878
3929
|
const titleText = type === "company" ? "Company Incorporation (LLC)" : "Business Name Registration";
|
|
3879
|
-
if (isBooting) return /* @__PURE__ */
|
|
3930
|
+
if (isBooting) return /* @__PURE__ */ import_react69.default.createElement("div", { className: "flex justify-center py-20" }, /* @__PURE__ */ import_react69.default.createElement(import_react70.HugeiconsIcon, { icon: import_core_free_icons24.Loading03Icon, size: 32, className: "animate-spin text-black" }));
|
|
3880
3931
|
if (!["DRAFT", "QUEUED", "REJECTED"].includes(appStatus) && appStatus !== "") {
|
|
3881
|
-
return /* @__PURE__ */
|
|
3932
|
+
return /* @__PURE__ */ import_react69.default.createElement("div", { className: "w-full max-w-3xl mx-auto bg-white rounded-2xl 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_react69.default.createElement(import_react69.default.Fragment, null, /* @__PURE__ */ import_react69.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_react69.default.createElement(import_react70.HugeiconsIcon, { icon: import_core_free_icons24.CheckmarkBadge01Icon, size: 35 })), /* @__PURE__ */ import_react69.default.createElement("h2", { className: "text-xl text-black" }, "Registration Completed"), /* @__PURE__ */ import_react69.default.createElement("p", { className: "text-sm text-neutral-500 max-w-md" }, "Your application has been successfully verified and registered.")) : appStatus === "PENDING" ? /* @__PURE__ */ import_react69.default.createElement(import_react69.default.Fragment, null, /* @__PURE__ */ import_react69.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_react69.default.createElement(import_react70.HugeiconsIcon, { icon: import_core_free_icons24.HourglassIcon, size: 35, className: "animate-spin" })), /* @__PURE__ */ import_react69.default.createElement("h2", { className: "text-xl text-black" }, "Application is Pending"), /* @__PURE__ */ import_react69.default.createElement("p", { className: "text-sm text-neutral-500 max-w-md" }, "Your application is currently pending review.")) : appStatus === "AWAITING_PAYMENT" ? /* @__PURE__ */ import_react69.default.createElement(import_react69.default.Fragment, null, /* @__PURE__ */ import_react69.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_react69.default.createElement(import_react70.HugeiconsIcon, { icon: import_core_free_icons24.HourglassIcon, size: 35, className: "animate-pulse" })), /* @__PURE__ */ import_react69.default.createElement("h2", { className: "text-xl text-black" }, "Awaiting Payment"), /* @__PURE__ */ import_react69.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_react69.default.createElement("div", { className: "mt-6 flex flex-col items-center gap-3" }, /* @__PURE__ */ import_react69.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_react69.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_react69.default.createElement(import_react69.default.Fragment, null, /* @__PURE__ */ import_react69.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_react69.default.createElement(import_react70.HugeiconsIcon, { icon: import_core_free_icons24.HourglassIcon, size: 35 })), /* @__PURE__ */ import_react69.default.createElement("h2", { className: "text-xl text-black" }, "Application Submitted"), /* @__PURE__ */ import_react69.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_react69.default.createElement("div", { className: "mt-6 flex flex-col items-center gap-3" }, /* @__PURE__ */ import_react69.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_react69.default.createElement("div", { className: "fixed inset-0 z-110 flex items-center justify-center p-4" }, /* @__PURE__ */ import_react69.default.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => !isAborting && setIsAbortModalOpen(false) }), /* @__PURE__ */ import_react69.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_react69.default.createElement("div", { className: "p-6 flex flex-col gap-4 text-center" }, /* @__PURE__ */ import_react69.default.createElement("h3", { className: "text-[17px] text-black tracking-tight" }, "Abort Application?"), /* @__PURE__ */ import_react69.default.createElement("p", { className: "text-[11px] 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_react69.default.createElement("div", { className: "w-full flex " }, /* @__PURE__ */ import_react69.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_react69.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")))));
|
|
3882
3933
|
}
|
|
3883
|
-
return /* @__PURE__ */
|
|
3934
|
+
return /* @__PURE__ */ import_react69.default.createElement("div", { className: "w-full max-w-3xl mx-auto bg-white rounded-2xl 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_react69.default.createElement("div", { className: "flex flex-col gap-8" }, /* @__PURE__ */ import_react69.default.createElement("div", null, /* @__PURE__ */ import_react69.default.createElement("h2", { className: "text-xl text-black tracking-tight mb-1" }, titleText), /* @__PURE__ */ import_react69.default.createElement("p", { className: "text-sm text-neutral-500" }, "Answer the questions below to build your official application.")), /* @__PURE__ */ import_react69.default.createElement("div", { className: "px-2" }, /* @__PURE__ */ import_react69.default.createElement(Stagger, { steps: MACRO_STEPS, currentStep: macroStep }))), /* @__PURE__ */ import_react69.default.createElement("div", { className: "flex flex-col gap-8" }, macroStep === 0 && /* @__PURE__ */ import_react69.default.createElement("div", { className: "flex flex-col gap-8 animate-in fade-in" }, /* @__PURE__ */ import_react69.default.createElement("div", { className: "flex flex-col gap-4" }, /* @__PURE__ */ import_react69.default.createElement("div", { className: "flex items-center text-black" }, /* @__PURE__ */ import_react69.default.createElement("h3", { className: "text-sm " }, "What does your ", type === "company" ? "company" : "business", " do?")), !formState.natureApproved ? /* @__PURE__ */ import_react69.default.createElement(import_react69.default.Fragment, null, /* @__PURE__ */ import_react69.default.createElement("div", { className: "flex flex-col gap-3 " }, /* @__PURE__ */ import_react69.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_react69.default.createElement(ThreeDActionButton, { onClick: handleAnalyzeNature, disabled: formData.businessDesc.length < 5 || isAnalyzingNature || isReadOnly, isLoading: isAnalyzingNature, className: "w-fit" }, "Analyze Nature")), isAnalyzingNature && /* @__PURE__ */ import_react69.default.createElement("div", { className: " mt-2" }, /* @__PURE__ */ import_react69.default.createElement(AiStageCheck, { tasks: [{ id: "1", label: "Matching with Official Categories...", status: "loading" }] })), suggestedNature && /* @__PURE__ */ import_react69.default.createElement("div", { className: " mt-2 animate-in fade-in" }, /* @__PURE__ */ import_react69.default.createElement(AiApproveDecline, { suggestionTitle: "Classification Found", suggestionValue: /* @__PURE__ */ import_react69.default.createElement("div", null, /* @__PURE__ */ import_react69.default.createElement("p", { className: " text-black" }, suggestedNature.specificLabel), /* @__PURE__ */ import_react69.default.createElement("p", { className: "text-xs text-neutral-400 mt-1" }, "Category: ", suggestedNature.categoryLabel)), onApprove: () => {
|
|
3884
3935
|
const newForm = { ...formData, natureOfBusiness: suggestedNature };
|
|
3885
3936
|
setFormData(newForm);
|
|
3886
3937
|
approveSection("natureApproved", newForm);
|
|
3887
|
-
}, onDecline: () => setSuggestedNature(null) }))) : /* @__PURE__ */
|
|
3938
|
+
}, onDecline: () => setSuggestedNature(null) }))) : /* @__PURE__ */ import_react69.default.createElement("div", { className: " flex items-center justify-between" }, /* @__PURE__ */ import_react69.default.createElement("div", { className: "pr-4" }, /* @__PURE__ */ import_react69.default.createElement("p", { className: "text-sm text-black" }, formData.natureOfBusiness?.specificLabel), /* @__PURE__ */ import_react69.default.createElement("p", { className: "text-xs text-neutral-400 mt-1" }, formData.businessDesc)), !isReadOnly && /* @__PURE__ */ import_react69.default.createElement("button", { onClick: () => editSection("natureApproved"), className: "p-2 text-neutral-400 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ import_react69.default.createElement(import_react70.HugeiconsIcon, { icon: import_core_free_icons24.PencilEdit01Icon, size: 16 })))), formState.natureApproved && /* @__PURE__ */ import_react69.default.createElement("div", { className: "flex flex-col gap-4 pt-6 animate-in slide-in-from-top-4 duration-500" }, /* @__PURE__ */ import_react69.default.createElement("div", { className: "flex items-center text-black" }, /* @__PURE__ */ import_react69.default.createElement("h3", { className: "text-sm " }, "What name would you like to register?")), /* @__PURE__ */ import_react69.default.createElement("p", { className: "text-xs text-neutral-400 -mt-2" }, "Provide two options. We will verify availability against the official registry."), !formState.nameApproved ? /* @__PURE__ */ import_react69.default.createElement(import_react69.default.Fragment, null, /* @__PURE__ */ import_react69.default.createElement("div", { className: "flex flex-col gap-4" }, /* @__PURE__ */ import_react69.default.createElement(TextInput, { label: "Proposed Name 1 (Preferred)", value: formData.proposedName, onChange: (v) => setFormData({ ...formData, proposedName: v }), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ import_react69.default.createElement(TextInput, { label: "Proposed Name 2 (Alternative)", value: formData.proposedName2, onChange: (v) => setFormData({ ...formData, proposedName2: v }), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ import_react69.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_react69.default.createElement("div", { className: " mt-2" }, /* @__PURE__ */ import_react69.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_react69.default.createElement("div", { className: "mt-2 animate-in fade-in" }, /* @__PURE__ */ import_react69.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_react69.default.createElement("div", null, /* @__PURE__ */ import_react69.default.createElement("span", { className: "text-[11px] tracking-widest text-purple-600 block mb-1" }, "AI Suggestion: Structural Qualifier Missing"), /* @__PURE__ */ import_react69.default.createElement("p", { className: "text-sm text-black mb-3" }, "Nigerian registrations require a structural qualifier to be approved."), /* @__PURE__ */ import_react69.default.createElement("div", { className: "flex flex-col gap-2" }, (qualifierCheckResult.suggestions || []).map((alt, i) => /* @__PURE__ */ import_react69.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_react69.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_react69.default.createElement("div", { className: " mt-2 animate-in fade-in" }, nameCheckResult.status === "APPROVED" || nameCheckResult.status === "APPROVED_WARNING" || nameCheckResult.status === "SKIPPED" ? /* @__PURE__ */ import_react69.default.createElement(AiApproveDecline, { suggestionTitle: nameCheckResult.status === "APPROVED" ? "Name Available!" : "Fallback Approval", suggestionValue: /* @__PURE__ */ import_react69.default.createElement("div", null, /* @__PURE__ */ import_react69.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_react69.default.createElement("p", { className: "text-xs text-neutral-600" }, nameCheckResult.message), /* @__PURE__ */ import_react69.default.createElement("p", { className: "text-xs text-neutral-600 mt-2 " }, "Proposed Option: ", nameCheckResult.approvedOption)), onApprove: () => {
|
|
3888
3939
|
const newForm = { ...formData, approvedName: nameCheckResult.approvedOption };
|
|
3889
3940
|
setFormData(newForm);
|
|
3890
3941
|
approveSection("nameApproved", newForm);
|
|
3891
|
-
}, onDecline: () => setNameCheckResult(null) }) : /* @__PURE__ */
|
|
3892
|
-
}, disabled: isReadOnly || isSubmitting })), /* @__PURE__ */
|
|
3893
|
-
}, disabled: isReadOnly || isSubmitting }), member.role !== "Director Only" && /* @__PURE__ */
|
|
3894
|
-
}, disabled: isReadOnly || isSubmitting }), /* @__PURE__ */
|
|
3895
|
-
}, disabled: isReadOnly || isSubmitting })))), /* @__PURE__ */ import_react67.default.createElement("div", { className: "flex items-center justify-between mt-2" }, !isReadOnly && /* @__PURE__ */ import_react67.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_react67.default.createElement(ThreeDActionButton, { onClick: () => approveSection("membersDetailsApproved"), disabled: !areCompanyMembersValid() || isReadOnly, className: "w-fit" }, "Confirm Members"))) : /* @__PURE__ */ import_react67.default.createElement("div", { className: " flex items-center justify-between" }, /* @__PURE__ */ import_react67.default.createElement("div", null, /* @__PURE__ */ import_react67.default.createElement("p", { className: "text-sm text-black" }, formData.members.length, " Member(s) Registered"), /* @__PURE__ */ import_react67.default.createElement("p", { className: "text-xs text-neutral-500 mt-1" }, "Total Shares: 100% Verified.")), !isReadOnly && /* @__PURE__ */ import_react67.default.createElement("button", { onClick: () => editSection("membersDetailsApproved"), className: "p-2 text-neutral-400 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ import_react67.default.createElement(import_react68.HugeiconsIcon, { icon: import_core_free_icons23.PencilEdit01Icon, size: 16 })))), formState.addressApproved && type === "business" && /* @__PURE__ */ import_react67.default.createElement("div", { className: "flex flex-col gap-4 pt-6 animate-in slide-in-from-top-4 duration-500" }, /* @__PURE__ */ import_react67.default.createElement("div", { className: "flex items-center text-black" }, /* @__PURE__ */ import_react67.default.createElement("h3", { className: "text-sm " }, "Who owns the business?")), /* @__PURE__ */ import_react67.default.createElement("p", { className: "text-xs text-neutral-400 -mt-2" }, "Provide basic contact info. We will extract your DOB and ID number automatically in the next step."), !formState.ownerApproved ? /* @__PURE__ */ import_react67.default.createElement("div", { className: "flex flex-col gap-4 " }, /* @__PURE__ */ import_react67.default.createElement(TextInput, { label: "Full Name", value: formData.ownerName, onChange: (v) => setFormData({ ...formData, ownerName: v }), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ import_react67.default.createElement("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-4" }, /* @__PURE__ */ import_react67.default.createElement(NumberInput, { label: "Phone Number", value: formData.ownerPhone, onChange: (v) => setFormData({ ...formData, ownerPhone: v }), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ import_react67.default.createElement(TextInput, { label: "Email Address", value: formData.ownerEmail, onChange: (v) => setFormData({ ...formData, ownerEmail: v }), disabled: isReadOnly || isSubmitting })), /* @__PURE__ */ import_react67.default.createElement(ThreeDActionButton, { onClick: () => approveSection("ownerApproved"), disabled: !formData.ownerName || !formData.ownerPhone || !formData.ownerEmail || isReadOnly, className: "w-fit mt-2" }, "Confirm Owner Details")) : /* @__PURE__ */ import_react67.default.createElement("div", { className: " flex items-center justify-between" }, /* @__PURE__ */ import_react67.default.createElement("div", null, /* @__PURE__ */ import_react67.default.createElement("p", { className: "text-sm text-black" }, formData.ownerName), /* @__PURE__ */ import_react67.default.createElement("p", { className: "text-xs text-neutral-500 mt-1" }, formData.ownerEmail, " \u2022 ", formData.ownerPhone)), !isReadOnly && /* @__PURE__ */ import_react67.default.createElement("button", { onClick: () => editSection("ownerApproved"), className: "p-2 text-neutral-400 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ import_react67.default.createElement(import_react68.HugeiconsIcon, { icon: import_core_free_icons23.PencilEdit01Icon, size: 16 })))), /* @__PURE__ */ import_react67.default.createElement("div", { className: "flex items-center justify-between mt-8 pt-6 " }, /* @__PURE__ */ import_react67.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_react67.default.createElement(import_react68.HugeiconsIcon, { icon: import_core_free_icons23.ArrowLeft01Icon, size: 14 }), " Close"), /* @__PURE__ */ import_react67.default.createElement(ThreeDActionButton, { onClick: handleNext, disabled: !isStep0Valid, className: "w-fit shrink-0" }, "Next Step"))), macroStep === 1 && /* @__PURE__ */ import_react67.default.createElement("div", { className: "flex flex-col gap-8 animate-in fade-in" }, type === "company" ? /* @__PURE__ */ import_react67.default.createElement(import_react67.default.Fragment, null, /* @__PURE__ */ import_react67.default.createElement("div", { className: "flex flex-col gap-2" }, /* @__PURE__ */ import_react67.default.createElement("h3", { className: "text-sm text-black" }, "Member Identity Documents"), /* @__PURE__ */ import_react67.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_react67.default.createElement("div", { className: "flex flex-col gap-6" }, formData.members.map((member, i) => /* @__PURE__ */ import_react67.default.createElement("div", { key: member.id, className: "flex flex-col gap-4" }, /* @__PURE__ */ import_react67.default.createElement("span", { className: "text-[11px] tracking-widest text-black mb-1" }, member.fullName || `Member ${i + 1}`, " ", /* @__PURE__ */ import_react67.default.createElement("span", { className: "text-neutral-400 ml-2" }, "(", member.role, ")")), /* @__PURE__ */ import_react67.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_react67.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_react67.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_react67.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_react67.default.createElement(import_react68.HugeiconsIcon, { icon: import_core_free_icons23.Upload01Icon, size: 18, className: "text-neutral-400" }), " Upload Valid ID (NIN, License, Voter's Card)") : globalExtractingId && !member.idExtractedData ? /* @__PURE__ */ import_react67.default.createElement("div", { className: " mt-2" }, /* @__PURE__ */ import_react67.default.createElement(AiStageCheck, { tasks: aiTasks })) : member.idExtractedData ? /* @__PURE__ */ import_react67.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_react67.default.createElement("div", null, /* @__PURE__ */ import_react67.default.createElement("span", { className: "text-[11px] tracking-widest text-purple-600 block mb-2" }, "Review Extracted ID"), /* @__PURE__ */ import_react67.default.createElement("div", { className: "flex flex-col gap-4" }, /* @__PURE__ */ import_react67.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_react67.default.createElement("div", { className: "grid grid-cols-2 gap-4" }, /* @__PURE__ */ import_react67.default.createElement(TextInput, { label: "ID Number", value: member.idExtractedData.idNumber, onChange: (v) => updateCompanyMemberInfo(i, "idExtractedData", { ...member.idExtractedData, idNumber: v }), disabled: isReadOnly || isAnyUploading }), /* @__PURE__ */ import_react67.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_react67.default.createElement("div", { className: "flex items-center gap-2 mt-2" }, !isReadOnly && /* @__PURE__ */ import_react67.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_react67.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_react67.default.createElement(import_react68.HugeiconsIcon, { icon: import_core_free_icons23.Upload01Icon, size: 18, className: "text-neutral-400" }), " Upload Passport Photo") : globalUploadingPassport && !member.passportFileUrl ? /* @__PURE__ */ import_react67.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_react67.default.createElement(import_react68.HugeiconsIcon, { icon: import_core_free_icons23.Loading03Icon, size: 18, className: "animate-spin text-black" }), " Uploading Passport...") : member.passportFileUrl ? /* @__PURE__ */ import_react67.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_react67.default.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ import_react67.default.createElement(import_react68.HugeiconsIcon, { icon: import_core_free_icons23.IdentificationIcon, size: 18 }), " Passport Uploaded"), !isReadOnly && /* @__PURE__ */ import_react67.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_react67.default.createElement(import_react68.HugeiconsIcon, { icon: import_core_free_icons23.Delete02Icon, size: 16 }))) : null, !member.signatureFileUrl && !globalUploadingSignature ? /* @__PURE__ */ import_react67.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_react67.default.createElement(import_react68.HugeiconsIcon, { icon: import_core_free_icons23.Upload01Icon, size: 18, className: "text-neutral-400" }), " Upload Signature") : globalUploadingSignature && !member.signatureFileUrl ? /* @__PURE__ */ import_react67.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_react67.default.createElement(import_react68.HugeiconsIcon, { icon: import_core_free_icons23.Loading03Icon, size: 18, className: "animate-spin text-black" }), " Uploading Signature...") : member.signatureFileUrl ? /* @__PURE__ */ import_react67.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_react67.default.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ import_react67.default.createElement(import_react68.HugeiconsIcon, { icon: import_core_free_icons23.SignatureIcon, size: 18 }), " Signature Uploaded"), !isReadOnly && /* @__PURE__ */ import_react67.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_react67.default.createElement(import_react68.HugeiconsIcon, { icon: import_core_free_icons23.Delete02Icon, size: 16 }))) : null)), /* @__PURE__ */ import_react67.default.createElement("div", { className: "flex justify-end" }, /* @__PURE__ */ import_react67.default.createElement(ThreeDActionButton, { onClick: () => approveSection("membersDocsApproved"), disabled: !areCompanyMemberDocsValid() || isReadOnly || isAnyUploading, className: "w-fit" }, "Confirm All Documents"))) : /* @__PURE__ */ import_react67.default.createElement("div", { className: " flex items-center justify-between bg-emerald-50 p-6 rounded-full" }, /* @__PURE__ */ import_react67.default.createElement("div", null, /* @__PURE__ */ import_react67.default.createElement("p", { className: "text-sm text-emerald-800" }, "Documents Uploaded"), /* @__PURE__ */ import_react67.default.createElement("p", { className: "text-xs text-emerald-600 mt-1" }, "Data safely extracted.")), !isReadOnly && /* @__PURE__ */ import_react67.default.createElement("button", { onClick: () => editSection("membersDocsApproved"), className: "p-2 text-emerald-700 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ import_react67.default.createElement(import_react68.HugeiconsIcon, { icon: import_core_free_icons23.PencilEdit01Icon, size: 16 })))) : /* @__PURE__ */ import_react67.default.createElement(import_react67.default.Fragment, null, /* @__PURE__ */ import_react67.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_react67.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_react67.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_react67.default.createElement("div", { className: "flex flex-col gap-4" }, /* @__PURE__ */ import_react67.default.createElement("div", { className: "flex items-center gap-2 text-black" }, /* @__PURE__ */ import_react67.default.createElement("h3", { className: "text-sm " }, "Upload Means of Identification")), /* @__PURE__ */ import_react67.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_react67.default.createElement(import_react67.default.Fragment, null, /* @__PURE__ */ import_react67.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_react67.default.createElement(import_react68.HugeiconsIcon, { icon: import_core_free_icons23.Upload01Icon, size: 24, className: "text-neutral-400" }), /* @__PURE__ */ import_react67.default.createElement("span", { className: "text-xs" }, "Select ID Image to Upload")), globalExtractingId && /* @__PURE__ */ import_react67.default.createElement("div", { className: " mt-2" }, /* @__PURE__ */ import_react67.default.createElement(AiStageCheck, { tasks: aiTasks })), formData.idExtractedData && /* @__PURE__ */ import_react67.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_react67.default.createElement("div", null, /* @__PURE__ */ import_react67.default.createElement("span", { className: "text-[11px] tracking-widest text-purple-600 block mb-2" }, "Review AI Extracted Data"), /* @__PURE__ */ import_react67.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_react67.default.createElement("div", { className: "flex flex-col gap-4" }, /* @__PURE__ */ import_react67.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_react67.default.createElement("div", { className: "grid grid-cols-2 gap-4" }, /* @__PURE__ */ import_react67.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_react67.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_react67.default.createElement("div", { className: "flex items-center gap-2 mt-2" }, /* @__PURE__ */ import_react67.default.createElement(ThreeDActionButton, { onClick: () => approveSection("idApproved"), disabled: isAnyUploading || isReadOnly, className: "w-fit shrink-0" }, "Approve Data"), !isReadOnly && /* @__PURE__ */ import_react67.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_react67.default.createElement("div", { className: " flex items-center justify-between bg-emerald-50 p-6 rounded-full" }, /* @__PURE__ */ import_react67.default.createElement("div", null, /* @__PURE__ */ import_react67.default.createElement("p", { className: "text-sm text-emerald-800" }, "ID Document Verified"), /* @__PURE__ */ import_react67.default.createElement("p", { className: "text-xs text-emerald-600 mt-1" }, "Data safely extracted and stored.")), !isReadOnly && /* @__PURE__ */ import_react67.default.createElement("button", { onClick: () => editSection("idApproved"), className: "p-2 text-emerald-700 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ import_react67.default.createElement(import_react68.HugeiconsIcon, { icon: import_core_free_icons23.PencilEdit01Icon, size: 16 })))), /* @__PURE__ */ import_react67.default.createElement("div", { className: "flex flex-col gap-4 pt-6 animate-in slide-in-from-top-4 duration-500" }, /* @__PURE__ */ import_react67.default.createElement("div", { className: "flex flex-col gap-3 " }, !formState.passportApproved && !globalUploadingPassport ? /* @__PURE__ */ import_react67.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_react67.default.createElement(import_react68.HugeiconsIcon, { icon: import_core_free_icons23.Upload01Icon, size: 18, className: "text-neutral-400" }), " Upload Passport Photo") : globalUploadingPassport && !formData.passportFileUrl ? /* @__PURE__ */ import_react67.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_react67.default.createElement(import_react68.HugeiconsIcon, { icon: import_core_free_icons23.Loading03Icon, size: 18, className: "animate-spin text-black" }), " Uploading Passport...") : /* @__PURE__ */ import_react67.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_react67.default.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ import_react67.default.createElement(import_react68.HugeiconsIcon, { icon: import_core_free_icons23.IdentificationIcon, size: 18 }), " Passport Uploaded"), !isReadOnly && /* @__PURE__ */ import_react67.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_react67.default.createElement(import_react68.HugeiconsIcon, { icon: import_core_free_icons23.Delete02Icon, size: 16 }))), !formState.signatureApproved && !globalUploadingSignature ? /* @__PURE__ */ import_react67.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_react67.default.createElement(import_react68.HugeiconsIcon, { icon: import_core_free_icons23.Upload01Icon, size: 18, className: "text-neutral-400" }), " Upload Signature") : globalUploadingSignature && !formData.signatureFileUrl ? /* @__PURE__ */ import_react67.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_react67.default.createElement(import_react68.HugeiconsIcon, { icon: import_core_free_icons23.Loading03Icon, size: 18, className: "animate-spin text-black" }), " Uploading Signature...") : /* @__PURE__ */ import_react67.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_react67.default.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ import_react67.default.createElement(import_react68.HugeiconsIcon, { icon: import_core_free_icons23.SignatureIcon, size: 18 }), " Signature Uploaded"), !isReadOnly && /* @__PURE__ */ import_react67.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_react67.default.createElement(import_react68.HugeiconsIcon, { icon: import_core_free_icons23.Delete02Icon, size: 16 })))))), /* @__PURE__ */ import_react67.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_react67.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_react67.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_react67.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_react67.default.createElement("div", { className: "flex flex-col gap-1 mb-2" }, /* @__PURE__ */ import_react67.default.createElement("h3", { className: "text-sm text-black" }, "Additional Documents (Optional)"), /* @__PURE__ */ import_react67.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_react67.default.createElement("div", { className: "flex flex-col gap-3" }, [1, 2, 3].map((num) => {
|
|
3942
|
+
}, onDecline: () => setNameCheckResult(null) }) : /* @__PURE__ */ import_react69.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_react69.default.createElement("div", null, /* @__PURE__ */ import_react69.default.createElement("span", { className: "text-[11px] tracking-widest text-red-600 block mb-1" }, "Registry Conflict Detected"), /* @__PURE__ */ import_react69.default.createElement("p", { className: "text-sm text-black mb-3" }, nameCheckResult.message), /* @__PURE__ */ import_react69.default.createElement("div", { className: "flex flex-col gap-2" }, (nameCheckResult.alternatives || []).map((alt, i) => /* @__PURE__ */ import_react69.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_react69.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_react69.default.createElement("div", { className: " flex items-center justify-between" }, /* @__PURE__ */ import_react69.default.createElement("div", null, /* @__PURE__ */ import_react69.default.createElement("p", { className: "text-sm text-black" }, formData.approvedName), /* @__PURE__ */ import_react69.default.createElement("p", { className: "text-xs text-emerald-600 mt-1" }, "Verified against registry")), !isReadOnly && /* @__PURE__ */ import_react69.default.createElement("button", { onClick: () => editSection("nameApproved"), className: "p-2 text-neutral-400 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ import_react69.default.createElement(import_react70.HugeiconsIcon, { icon: import_core_free_icons24.PencilEdit01Icon, size: 16 })))), formState.nameApproved && /* @__PURE__ */ import_react69.default.createElement("div", { className: "flex flex-col gap-4 pt-6 animate-in slide-in-from-top-4 duration-500" }, /* @__PURE__ */ import_react69.default.createElement("div", { className: "flex items-center text-black" }, /* @__PURE__ */ import_react69.default.createElement("h3", { className: "text-sm " }, "Where is your head office located?")), !formState.addressApproved ? /* @__PURE__ */ import_react69.default.createElement("div", { className: "flex flex-col gap-4 " }, /* @__PURE__ */ import_react69.default.createElement(TextInput, { label: "Street Address", value: formData.address, onChange: (v) => setFormData({ ...formData, address: v }), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ import_react69.default.createElement("div", { className: "grid grid-cols-2 gap-4" }, /* @__PURE__ */ import_react69.default.createElement(TextInput, { label: "City", value: formData.city, onChange: (v) => setFormData({ ...formData, city: v }), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ import_react69.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: () => {
|
|
3943
|
+
}, disabled: isReadOnly || isSubmitting })), /* @__PURE__ */ import_react69.default.createElement(ThreeDActionButton, { onClick: () => approveSection("addressApproved"), disabled: !formData.address || !formData.city || !formData.state || isReadOnly, className: "w-fit mt-2" }, "Confirm Address")) : /* @__PURE__ */ import_react69.default.createElement("div", { className: " flex items-center justify-between" }, /* @__PURE__ */ import_react69.default.createElement("p", { className: "text-sm text-neutral-500" }, formData.address, ", ", formData.city, ", ", formData.state), !isReadOnly && /* @__PURE__ */ import_react69.default.createElement("button", { onClick: () => editSection("addressApproved"), className: "p-2 text-neutral-400 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ import_react69.default.createElement(import_react70.HugeiconsIcon, { icon: import_core_free_icons24.PencilEdit01Icon, size: 16 })))), formState.addressApproved && type === "company" && /* @__PURE__ */ import_react69.default.createElement("div", { className: "flex flex-col gap-4 pt-6 animate-in slide-in-from-top-4 duration-500" }, /* @__PURE__ */ import_react69.default.createElement("div", { className: "flex items-center justify-between gap-2 text-black" }, /* @__PURE__ */ import_react69.default.createElement("div", { className: "flex items-center" }, /* @__PURE__ */ import_react69.default.createElement("h3", { className: "text-sm " }, "Directors & Shareholders")), !formState.membersDetailsApproved && /* @__PURE__ */ import_react69.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_react69.default.createElement("p", { className: "text-xs text-neutral-400 -mt-2" }, "Provide details for all individuals. Ensure total share percentage equals 100%."), !formState.membersDetailsApproved ? /* @__PURE__ */ import_react69.default.createElement("div", { className: "flex flex-col gap-6 " }, formData.members.map((member, i) => /* @__PURE__ */ import_react69.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_react69.default.createElement("div", { className: "flex justify-between items-center mb-1" }, /* @__PURE__ */ import_react69.default.createElement("span", { className: "text-[11px] tracking-widest text-neutral-400" }, "Member ", i + 1), formData.members.length > 1 && !isReadOnly && /* @__PURE__ */ import_react69.default.createElement("button", { onClick: () => removeCompanyMember(i), className: "text-red-500 text-xs hover:text-red-600" }, "Remove")), /* @__PURE__ */ import_react69.default.createElement("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-4" }, /* @__PURE__ */ import_react69.default.createElement(TextInput, { label: "Role", value: member.role, readOnly: true, onClick: () => !isReadOnly && setActiveModal({ isOpen: true, type: "role", memberIndex: i }), onChange: () => {
|
|
3944
|
+
}, disabled: isReadOnly || isSubmitting }), member.role !== "Director Only" && /* @__PURE__ */ import_react69.default.createElement(NumberInput, { label: "Share Percentage (%)", value: member.sharePercentage, onChange: (v) => updateCompanyMemberInfo(i, "sharePercentage", v), disabled: isReadOnly || isSubmitting })), /* @__PURE__ */ import_react69.default.createElement(TextInput, { label: "Full Name", value: member.fullName, onChange: (v) => updateCompanyMemberInfo(i, "fullName", v), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ import_react69.default.createElement("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-4" }, /* @__PURE__ */ import_react69.default.createElement(NumberInput, { label: "Phone Number", value: member.phone, onChange: (v) => updateCompanyMemberInfo(i, "phone", v), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ import_react69.default.createElement(TextInput, { label: "Email Address", value: member.email, onChange: (v) => updateCompanyMemberInfo(i, "email", v), disabled: isReadOnly || isSubmitting })), /* @__PURE__ */ import_react69.default.createElement(TextInput, { label: "Nationality", value: member.nationality, readOnly: true, onClick: () => !isReadOnly && setActiveModal({ isOpen: true, type: "nationality", memberIndex: i }), onChange: () => {
|
|
3945
|
+
}, disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ import_react69.default.createElement(TextInput, { label: "Residential Address", value: member.address, onChange: (v) => updateCompanyMemberInfo(i, "address", v), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ import_react69.default.createElement("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-4" }, /* @__PURE__ */ import_react69.default.createElement(TextInput, { label: "City", value: member.city, onChange: (v) => updateCompanyMemberInfo(i, "city", v), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ import_react69.default.createElement(TextInput, { label: "State", value: member.state, readOnly: true, onClick: () => !isReadOnly && setActiveModal({ isOpen: true, type: "state", memberIndex: i }), onChange: () => {
|
|
3946
|
+
}, disabled: isReadOnly || isSubmitting })))), /* @__PURE__ */ import_react69.default.createElement("div", { className: "flex items-center justify-between mt-2" }, !isReadOnly && /* @__PURE__ */ import_react69.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_react69.default.createElement(ThreeDActionButton, { onClick: () => approveSection("membersDetailsApproved"), disabled: !areCompanyMembersValid() || isReadOnly, className: "w-fit" }, "Confirm Members"))) : /* @__PURE__ */ import_react69.default.createElement("div", { className: " flex items-center justify-between" }, /* @__PURE__ */ import_react69.default.createElement("div", null, /* @__PURE__ */ import_react69.default.createElement("p", { className: "text-sm text-black" }, formData.members.length, " Member(s) Registered"), /* @__PURE__ */ import_react69.default.createElement("p", { className: "text-xs text-neutral-500 mt-1" }, "Total Shares: 100% Verified.")), !isReadOnly && /* @__PURE__ */ import_react69.default.createElement("button", { onClick: () => editSection("membersDetailsApproved"), className: "p-2 text-neutral-400 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ import_react69.default.createElement(import_react70.HugeiconsIcon, { icon: import_core_free_icons24.PencilEdit01Icon, size: 16 })))), formState.addressApproved && type === "business" && /* @__PURE__ */ import_react69.default.createElement("div", { className: "flex flex-col gap-4 pt-6 animate-in slide-in-from-top-4 duration-500" }, /* @__PURE__ */ import_react69.default.createElement("div", { className: "flex items-center text-black" }, /* @__PURE__ */ import_react69.default.createElement("h3", { className: "text-sm " }, "Who owns the business?")), /* @__PURE__ */ import_react69.default.createElement("p", { className: "text-xs text-neutral-400 -mt-2" }, "Provide basic contact info. We will extract your DOB and ID number automatically in the next step."), !formState.ownerApproved ? /* @__PURE__ */ import_react69.default.createElement("div", { className: "flex flex-col gap-4 " }, /* @__PURE__ */ import_react69.default.createElement(TextInput, { label: "Full Name", value: formData.ownerName, onChange: (v) => setFormData({ ...formData, ownerName: v }), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ import_react69.default.createElement("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-4" }, /* @__PURE__ */ import_react69.default.createElement(NumberInput, { label: "Phone Number", value: formData.ownerPhone, onChange: (v) => setFormData({ ...formData, ownerPhone: v }), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ import_react69.default.createElement(TextInput, { label: "Email Address", value: formData.ownerEmail, onChange: (v) => setFormData({ ...formData, ownerEmail: v }), disabled: isReadOnly || isSubmitting })), /* @__PURE__ */ import_react69.default.createElement(ThreeDActionButton, { onClick: () => approveSection("ownerApproved"), disabled: !formData.ownerName || !formData.ownerPhone || !formData.ownerEmail || isReadOnly, className: "w-fit mt-2" }, "Confirm Owner Details")) : /* @__PURE__ */ import_react69.default.createElement("div", { className: " flex items-center justify-between" }, /* @__PURE__ */ import_react69.default.createElement("div", null, /* @__PURE__ */ import_react69.default.createElement("p", { className: "text-sm text-black" }, formData.ownerName), /* @__PURE__ */ import_react69.default.createElement("p", { className: "text-xs text-neutral-500 mt-1" }, formData.ownerEmail, " \u2022 ", formData.ownerPhone)), !isReadOnly && /* @__PURE__ */ import_react69.default.createElement("button", { onClick: () => editSection("ownerApproved"), className: "p-2 text-neutral-400 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ import_react69.default.createElement(import_react70.HugeiconsIcon, { icon: import_core_free_icons24.PencilEdit01Icon, size: 16 })))), /* @__PURE__ */ import_react69.default.createElement("div", { className: "flex items-center justify-between mt-8 pt-6 " }, /* @__PURE__ */ import_react69.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_react69.default.createElement(import_react70.HugeiconsIcon, { icon: import_core_free_icons24.ArrowLeft01Icon, size: 14 }), " Close"), /* @__PURE__ */ import_react69.default.createElement(ThreeDActionButton, { onClick: handleNext, disabled: !isStep0Valid, className: "w-fit shrink-0" }, "Next Step"))), macroStep === 1 && /* @__PURE__ */ import_react69.default.createElement("div", { className: "flex flex-col gap-8 animate-in fade-in" }, type === "company" ? /* @__PURE__ */ import_react69.default.createElement(import_react69.default.Fragment, null, /* @__PURE__ */ import_react69.default.createElement("div", { className: "flex flex-col gap-2" }, /* @__PURE__ */ import_react69.default.createElement("h3", { className: "text-sm text-black" }, "Member Identity Documents"), /* @__PURE__ */ import_react69.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_react69.default.createElement("div", { className: "flex flex-col gap-6" }, formData.members.map((member, i) => /* @__PURE__ */ import_react69.default.createElement("div", { key: member.id, className: "flex flex-col gap-4" }, /* @__PURE__ */ import_react69.default.createElement("span", { className: "text-[11px] tracking-widest text-black mb-1" }, member.fullName || `Member ${i + 1}`, " ", /* @__PURE__ */ import_react69.default.createElement("span", { className: "text-neutral-400 ml-2" }, "(", member.role, ")")), /* @__PURE__ */ import_react69.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_react69.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_react69.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_react69.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_react69.default.createElement(import_react70.HugeiconsIcon, { icon: import_core_free_icons24.Upload01Icon, size: 18, className: "text-neutral-400" }), " Upload Valid ID (NIN, License, Voter's Card)") : globalExtractingId && !member.idExtractedData ? /* @__PURE__ */ import_react69.default.createElement("div", { className: " mt-2" }, /* @__PURE__ */ import_react69.default.createElement(AiStageCheck, { tasks: aiTasks })) : member.idExtractedData ? /* @__PURE__ */ import_react69.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_react69.default.createElement("div", null, /* @__PURE__ */ import_react69.default.createElement("span", { className: "text-[11px] tracking-widest text-purple-600 block mb-2" }, "Review Extracted ID"), /* @__PURE__ */ import_react69.default.createElement("div", { className: "flex flex-col gap-4" }, /* @__PURE__ */ import_react69.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_react69.default.createElement("div", { className: "grid grid-cols-2 gap-4" }, /* @__PURE__ */ import_react69.default.createElement(TextInput, { label: "ID Number", value: member.idExtractedData.idNumber, onChange: (v) => updateCompanyMemberInfo(i, "idExtractedData", { ...member.idExtractedData, idNumber: v }), disabled: isReadOnly || isAnyUploading }), /* @__PURE__ */ import_react69.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_react69.default.createElement("div", { className: "flex items-center gap-2 mt-2" }, !isReadOnly && /* @__PURE__ */ import_react69.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_react69.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_react69.default.createElement(import_react70.HugeiconsIcon, { icon: import_core_free_icons24.Upload01Icon, size: 18, className: "text-neutral-400" }), " Upload Passport Photo") : globalUploadingPassport && !member.passportFileUrl ? /* @__PURE__ */ import_react69.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_react69.default.createElement(import_react70.HugeiconsIcon, { icon: import_core_free_icons24.Loading03Icon, size: 18, className: "animate-spin text-black" }), " Uploading Passport...") : member.passportFileUrl ? /* @__PURE__ */ import_react69.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_react69.default.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ import_react69.default.createElement(import_react70.HugeiconsIcon, { icon: import_core_free_icons24.IdentificationIcon, size: 18 }), " Passport Uploaded"), !isReadOnly && /* @__PURE__ */ import_react69.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_react69.default.createElement(import_react70.HugeiconsIcon, { icon: import_core_free_icons24.Delete02Icon, size: 16 }))) : null, !member.signatureFileUrl && !globalUploadingSignature ? /* @__PURE__ */ import_react69.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_react69.default.createElement(import_react70.HugeiconsIcon, { icon: import_core_free_icons24.Upload01Icon, size: 18, className: "text-neutral-400" }), " Upload Signature") : globalUploadingSignature && !member.signatureFileUrl ? /* @__PURE__ */ import_react69.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_react69.default.createElement(import_react70.HugeiconsIcon, { icon: import_core_free_icons24.Loading03Icon, size: 18, className: "animate-spin text-black" }), " Uploading Signature...") : member.signatureFileUrl ? /* @__PURE__ */ import_react69.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_react69.default.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ import_react69.default.createElement(import_react70.HugeiconsIcon, { icon: import_core_free_icons24.SignatureIcon, size: 18 }), " Signature Uploaded"), !isReadOnly && /* @__PURE__ */ import_react69.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_react69.default.createElement(import_react70.HugeiconsIcon, { icon: import_core_free_icons24.Delete02Icon, size: 16 }))) : null)), /* @__PURE__ */ import_react69.default.createElement("div", { className: "flex justify-end" }, /* @__PURE__ */ import_react69.default.createElement(ThreeDActionButton, { onClick: () => approveSection("membersDocsApproved"), disabled: !areCompanyMemberDocsValid() || isReadOnly || isAnyUploading, className: "w-fit" }, "Confirm All Documents"))) : /* @__PURE__ */ import_react69.default.createElement("div", { className: " flex items-center justify-between bg-emerald-50 p-6 rounded-full" }, /* @__PURE__ */ import_react69.default.createElement("div", null, /* @__PURE__ */ import_react69.default.createElement("p", { className: "text-sm text-emerald-800" }, "Documents Uploaded"), /* @__PURE__ */ import_react69.default.createElement("p", { className: "text-xs text-emerald-600 mt-1" }, "Data safely extracted.")), !isReadOnly && /* @__PURE__ */ import_react69.default.createElement("button", { onClick: () => editSection("membersDocsApproved"), className: "p-2 text-emerald-700 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ import_react69.default.createElement(import_react70.HugeiconsIcon, { icon: import_core_free_icons24.PencilEdit01Icon, size: 16 })))) : /* @__PURE__ */ import_react69.default.createElement(import_react69.default.Fragment, null, /* @__PURE__ */ import_react69.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_react69.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_react69.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_react69.default.createElement("div", { className: "flex flex-col gap-4" }, /* @__PURE__ */ import_react69.default.createElement("div", { className: "flex items-center gap-2 text-black" }, /* @__PURE__ */ import_react69.default.createElement("h3", { className: "text-sm " }, "Upload Means of Identification")), /* @__PURE__ */ import_react69.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_react69.default.createElement(import_react69.default.Fragment, null, /* @__PURE__ */ import_react69.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_react69.default.createElement(import_react70.HugeiconsIcon, { icon: import_core_free_icons24.Upload01Icon, size: 24, className: "text-neutral-400" }), /* @__PURE__ */ import_react69.default.createElement("span", { className: "text-xs" }, "Select ID Image to Upload")), globalExtractingId && /* @__PURE__ */ import_react69.default.createElement("div", { className: " mt-2" }, /* @__PURE__ */ import_react69.default.createElement(AiStageCheck, { tasks: aiTasks })), formData.idExtractedData && /* @__PURE__ */ import_react69.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_react69.default.createElement("div", null, /* @__PURE__ */ import_react69.default.createElement("span", { className: "text-[11px] tracking-widest text-purple-600 block mb-2" }, "Review AI Extracted Data"), /* @__PURE__ */ import_react69.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_react69.default.createElement("div", { className: "flex flex-col gap-4" }, /* @__PURE__ */ import_react69.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_react69.default.createElement("div", { className: "grid grid-cols-2 gap-4" }, /* @__PURE__ */ import_react69.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_react69.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_react69.default.createElement("div", { className: "flex items-center gap-2 mt-2" }, /* @__PURE__ */ import_react69.default.createElement(ThreeDActionButton, { onClick: () => approveSection("idApproved"), disabled: isAnyUploading || isReadOnly, className: "w-fit shrink-0" }, "Approve Data"), !isReadOnly && /* @__PURE__ */ import_react69.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_react69.default.createElement("div", { className: " flex items-center justify-between bg-emerald-50 p-6 rounded-full" }, /* @__PURE__ */ import_react69.default.createElement("div", null, /* @__PURE__ */ import_react69.default.createElement("p", { className: "text-sm text-emerald-800" }, "ID Document Verified"), /* @__PURE__ */ import_react69.default.createElement("p", { className: "text-xs text-emerald-600 mt-1" }, "Data safely extracted and stored.")), !isReadOnly && /* @__PURE__ */ import_react69.default.createElement("button", { onClick: () => editSection("idApproved"), className: "p-2 text-emerald-700 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ import_react69.default.createElement(import_react70.HugeiconsIcon, { icon: import_core_free_icons24.PencilEdit01Icon, size: 16 })))), /* @__PURE__ */ import_react69.default.createElement("div", { className: "flex flex-col gap-4 pt-6 animate-in slide-in-from-top-4 duration-500" }, /* @__PURE__ */ import_react69.default.createElement("div", { className: "flex flex-col gap-3 " }, !formState.passportApproved && !globalUploadingPassport ? /* @__PURE__ */ import_react69.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_react69.default.createElement(import_react70.HugeiconsIcon, { icon: import_core_free_icons24.Upload01Icon, size: 18, className: "text-neutral-400" }), " Upload Passport Photo") : globalUploadingPassport && !formData.passportFileUrl ? /* @__PURE__ */ import_react69.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_react69.default.createElement(import_react70.HugeiconsIcon, { icon: import_core_free_icons24.Loading03Icon, size: 18, className: "animate-spin text-black" }), " Uploading Passport...") : /* @__PURE__ */ import_react69.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_react69.default.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ import_react69.default.createElement(import_react70.HugeiconsIcon, { icon: import_core_free_icons24.IdentificationIcon, size: 18 }), " Passport Uploaded"), !isReadOnly && /* @__PURE__ */ import_react69.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_react69.default.createElement(import_react70.HugeiconsIcon, { icon: import_core_free_icons24.Delete02Icon, size: 16 }))), !formState.signatureApproved && !globalUploadingSignature ? /* @__PURE__ */ import_react69.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_react69.default.createElement(import_react70.HugeiconsIcon, { icon: import_core_free_icons24.Upload01Icon, size: 18, className: "text-neutral-400" }), " Upload Signature") : globalUploadingSignature && !formData.signatureFileUrl ? /* @__PURE__ */ import_react69.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_react69.default.createElement(import_react70.HugeiconsIcon, { icon: import_core_free_icons24.Loading03Icon, size: 18, className: "animate-spin text-black" }), " Uploading Signature...") : /* @__PURE__ */ import_react69.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_react69.default.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ import_react69.default.createElement(import_react70.HugeiconsIcon, { icon: import_core_free_icons24.SignatureIcon, size: 18 }), " Signature Uploaded"), !isReadOnly && /* @__PURE__ */ import_react69.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_react69.default.createElement(import_react70.HugeiconsIcon, { icon: import_core_free_icons24.Delete02Icon, size: 16 })))))), /* @__PURE__ */ import_react69.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_react69.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_react69.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_react69.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_react69.default.createElement("div", { className: "flex flex-col gap-1 mb-2" }, /* @__PURE__ */ import_react69.default.createElement("h3", { className: "text-sm text-black" }, "Additional Documents (Optional)"), /* @__PURE__ */ import_react69.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_react69.default.createElement("div", { className: "flex flex-col gap-3" }, [1, 2, 3].map((num) => {
|
|
3896
3947
|
const docType = `other${num}`;
|
|
3897
3948
|
const ref = num === 1 ? other1Ref : num === 2 ? other2Ref : other3Ref;
|
|
3898
3949
|
const isUploading = num === 1 ? isUploadingOther1 : num === 2 ? isUploadingOther2 : isUploadingOther3;
|
|
@@ -3900,29 +3951,29 @@ var UniversalRegistrationFlow = ({
|
|
|
3900
3951
|
if (!fileUrl && !isUploading) {
|
|
3901
3952
|
const prevUrl = num > 1 ? formData[`otherDoc${num - 1}Url`] : true;
|
|
3902
3953
|
if (!prevUrl) return null;
|
|
3903
|
-
return /* @__PURE__ */
|
|
3954
|
+
return /* @__PURE__ */ import_react69.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_react69.default.createElement(import_react70.HugeiconsIcon, { icon: import_core_free_icons24.Upload01Icon, size: 18, className: "text-neutral-400" }), " Upload Optional Document ", num);
|
|
3904
3955
|
}
|
|
3905
3956
|
if (isUploading) {
|
|
3906
|
-
return /* @__PURE__ */
|
|
3957
|
+
return /* @__PURE__ */ import_react69.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_react69.default.createElement(import_react70.HugeiconsIcon, { icon: import_core_free_icons24.Loading03Icon, size: 18, className: "animate-spin text-black" }), " Uploading Document ", num, "...");
|
|
3907
3958
|
}
|
|
3908
|
-
return /* @__PURE__ */
|
|
3909
|
-
}))), /* @__PURE__ */
|
|
3959
|
+
return /* @__PURE__ */ import_react69.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_react69.default.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ import_react69.default.createElement(import_react70.HugeiconsIcon, { icon: import_core_free_icons24.CheckmarkBadge01Icon, size: 18 }), " Optional Document ", num, " Uploaded"), !isReadOnly && /* @__PURE__ */ import_react69.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_react69.default.createElement(import_react70.HugeiconsIcon, { icon: import_core_free_icons24.Delete02Icon, size: 16 })));
|
|
3960
|
+
}))), /* @__PURE__ */ import_react69.default.createElement("div", { className: "flex items-center justify-between mt-8 pt-6 " }, /* @__PURE__ */ import_react69.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_react69.default.createElement(import_react70.HugeiconsIcon, { icon: import_core_free_icons24.ArrowLeft01Icon, size: 14 }), " Back"), /* @__PURE__ */ import_react69.default.createElement(ThreeDActionButton, { onClick: handleNext, disabled: !isStep1Valid || isAnyUploading, className: "w-fit shrink-0" }, "Next Step"))), macroStep === 2 && /* @__PURE__ */ import_react69.default.createElement("div", { className: "flex flex-col gap-6 animate-in fade-in" }, /* @__PURE__ */ import_react69.default.createElement("div", null, /* @__PURE__ */ import_react69.default.createElement("h3", { className: "text-sm mb-5 text-black" }, "Application Summary"), /* @__PURE__ */ import_react69.default.createElement("div", { className: "flex flex-col gap-4 text-sm" }, /* @__PURE__ */ import_react69.default.createElement("div", { className: "flex flex-col sm:flex-row sm:justify-between border-b border-neutral-100 pb-3 gap-1" }, /* @__PURE__ */ import_react69.default.createElement("span", { className: "text-neutral-500 truncate text-[13px] " }, type === "company" ? "Company Name" : "Business Name"), /* @__PURE__ */ import_react69.default.createElement("span", { className: " text-black text-[13px]" }, formData.approvedName)), /* @__PURE__ */ import_react69.default.createElement("div", { className: "flex flex-col sm:flex-row sm:justify-between border-b border-neutral-100 pb-3 gap-1" }, /* @__PURE__ */ import_react69.default.createElement("span", { className: "text-neutral-500 text-[13px] " }, "Classification"), /* @__PURE__ */ import_react69.default.createElement("span", { className: " text-black truncate sm:text-right text-[13px] " }, formData.natureOfBusiness?.specificLabel || "Pending")), type === "company" ? /* @__PURE__ */ import_react69.default.createElement(import_react69.default.Fragment, null, /* @__PURE__ */ import_react69.default.createElement("div", { className: "flex flex-col sm:flex-row sm:justify-between border-b border-neutral-100 pb-3 gap-1" }, /* @__PURE__ */ import_react69.default.createElement("span", { className: "text-neutral-500 text-[13px] " }, "Total Members"), /* @__PURE__ */ import_react69.default.createElement("span", { className: " text-black truncate text-[13px] " }, formData.members.length, " Directors/Shareholders")), /* @__PURE__ */ import_react69.default.createElement("div", { className: "flex flex-col sm:flex-row sm:justify-between border-b border-neutral-100 pb-3 gap-1" }, /* @__PURE__ */ import_react69.default.createElement("span", { className: "text-neutral-500 text-[13px] " }, "Share Capital"), /* @__PURE__ */ import_react69.default.createElement("span", { className: " text-black truncate text-[13px] " }, "100% Allocated"))) : /* @__PURE__ */ import_react69.default.createElement("div", { className: "flex flex-col sm:flex-row sm:justify-between border-b border-neutral-100 pb-3 gap-1" }, /* @__PURE__ */ import_react69.default.createElement("span", { className: "text-neutral-500 text-[13px] " }, "Proprietor"), /* @__PURE__ */ import_react69.default.createElement("span", { className: " text-black truncate text-[13px] " }, formData.ownerName)), /* @__PURE__ */ import_react69.default.createElement("div", { className: "flex flex-col sm:flex-row sm:justify-between pb-2 gap-1" }, /* @__PURE__ */ import_react69.default.createElement("span", { className: "text-neutral-500 text-[13px] " }, "Documents Attached"), /* @__PURE__ */ import_react69.default.createElement("span", { className: " text-neutral-400 text-[13px] " }, "ID, Passport, Signature")), formData.otherDoc1Url && /* @__PURE__ */ import_react69.default.createElement("div", { className: "flex flex-col sm:flex-row sm:justify-between pb-2 gap-1" }, /* @__PURE__ */ import_react69.default.createElement("span", { className: "text-neutral-500 text-[13px] " }, "Optional Documents"), /* @__PURE__ */ import_react69.default.createElement("span", { className: " text-neutral-400 text-[13px] " }, [formData.otherDoc1Url, formData.otherDoc2Url, formData.otherDoc3Url].filter(Boolean).length, " Attached")))), /* @__PURE__ */ import_react69.default.createElement("div", { className: "flex items-center justify-between mt-4 pt-4 " }, /* @__PURE__ */ import_react69.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_react69.default.createElement(import_react70.HugeiconsIcon, { icon: import_core_free_icons24.ArrowLeft01Icon, size: 14 }), " Back"), /* @__PURE__ */ import_react69.default.createElement(ThreeDActionButton, { onClick: handleNext, className: "w-fit shrink-0" }, "Next Step"))), macroStep === 3 && /* @__PURE__ */ import_react69.default.createElement("div", { className: "flex flex-col gap-6 py-6 animate-in zoom-in-95 duration-500" }, /* @__PURE__ */ import_react69.default.createElement("h2", { className: "text-lg text-black tracking-tight mb-2" }, "Terms and Conditions of Application"), /* @__PURE__ */ import_react69.default.createElement("div", { className: "text-xs text-neutral-500 mb-4" }, /* @__PURE__ */ import_react69.default.createElement("p", { className: " mb-3" }, "Declaration and Consent"), /* @__PURE__ */ import_react69.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_react69.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_react69.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_react69.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_react69.default.createElement("label", { className: "flex items-start gap-3 mt-2 cursor-pointer group" }, /* @__PURE__ */ import_react69.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_react69.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_react69.default.createElement("div", { className: "flex flex-col sm:flex-row items-center gap-4 mt-8 w-full justify-end pt-6" }, /* @__PURE__ */ import_react69.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_react69.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_react69.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_react69.default.createElement("div", { className: "fixed inset-0 z-110 flex items-center justify-center p-4" }, /* @__PURE__ */ import_react69.default.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setActiveModal({ isOpen: false, type: null, memberIndex: null }) }), /* @__PURE__ */ import_react69.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_react69.default.createElement("div", { className: "p-4 text-center w-full shrink-0" }, /* @__PURE__ */ import_react69.default.createElement("h3", { className: "text-[14px] text-black tracking-tight capitalize" }, "Select ", activeModal.type)), /* @__PURE__ */ import_react69.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) => {
|
|
3910
3961
|
const isSelected = activeModal.isGlobalState ? formData.state === opt : formData.members[activeModal.memberIndex][activeModal.type] === opt;
|
|
3911
|
-
return /* @__PURE__ */
|
|
3962
|
+
return /* @__PURE__ */ import_react69.default.createElement("button", { key: opt, onClick: () => {
|
|
3912
3963
|
if (activeModal.isGlobalState) setFormData({ ...formData, state: opt });
|
|
3913
3964
|
else updateCompanyMemberInfo(activeModal.memberIndex, activeModal.type, opt);
|
|
3914
3965
|
setActiveModal({ isOpen: false, type: null, memberIndex: null });
|
|
3915
3966
|
}, 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);
|
|
3916
|
-
})), /* @__PURE__ */
|
|
3967
|
+
})), /* @__PURE__ */ import_react69.default.createElement("div", { className: "w-full flex mt-auto shrink-0 " }, /* @__PURE__ */ import_react69.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")))));
|
|
3917
3968
|
};
|
|
3918
3969
|
|
|
3919
3970
|
// src/components/UniversalDeveloperSettings.tsx
|
|
3920
|
-
var
|
|
3971
|
+
var import_react71 = __toESM(require("react"));
|
|
3921
3972
|
var import_react_hot_toast8 = require("react-hot-toast");
|
|
3922
|
-
var
|
|
3923
|
-
var
|
|
3924
|
-
var ButtonSpinner5 = () => /* @__PURE__ */
|
|
3925
|
-
var
|
|
3973
|
+
var import_react72 = require("@hugeicons/react");
|
|
3974
|
+
var import_core_free_icons25 = require("@hugeicons/core-free-icons");
|
|
3975
|
+
var ButtonSpinner5 = () => /* @__PURE__ */ import_react71.default.createElement(import_react72.HugeiconsIcon, { icon: import_core_free_icons25.Loading03Icon, size: 16, className: "animate-spin text-current" });
|
|
3976
|
+
var PageSpinner6 = () => /* @__PURE__ */ import_react71.default.createElement("div", { className: "flex justify-center items-center py-12 w-full" }, /* @__PURE__ */ import_react71.default.createElement(import_react72.HugeiconsIcon, { icon: import_core_free_icons25.Loading03Icon, size: 32, className: "animate-spin text-black" }));
|
|
3926
3977
|
var UniversalDeveloperSettings = ({
|
|
3927
3978
|
initialPublicKey,
|
|
3928
3979
|
initialWebhookUrl,
|
|
@@ -3931,12 +3982,12 @@ var UniversalDeveloperSettings = ({
|
|
|
3931
3982
|
onGenerateKeys,
|
|
3932
3983
|
onSaveWebhook
|
|
3933
3984
|
}) => {
|
|
3934
|
-
const [publicKey, setPublicKey] = (0,
|
|
3935
|
-
const [webhookUrl, setWebhookUrl] = (0,
|
|
3936
|
-
const [isGenerating, setIsGenerating] = (0,
|
|
3937
|
-
const [isSavingWebhook, setIsSavingWebhook] = (0,
|
|
3938
|
-
const [isRollModalOpen, setIsRollModalOpen] = (0,
|
|
3939
|
-
(0,
|
|
3985
|
+
const [publicKey, setPublicKey] = (0, import_react71.useState)(initialPublicKey);
|
|
3986
|
+
const [webhookUrl, setWebhookUrl] = (0, import_react71.useState)(initialWebhookUrl);
|
|
3987
|
+
const [isGenerating, setIsGenerating] = (0, import_react71.useState)(false);
|
|
3988
|
+
const [isSavingWebhook, setIsSavingWebhook] = (0, import_react71.useState)(false);
|
|
3989
|
+
const [isRollModalOpen, setIsRollModalOpen] = (0, import_react71.useState)(false);
|
|
3990
|
+
(0, import_react71.useEffect)(() => {
|
|
3940
3991
|
setPublicKey(initialPublicKey || "");
|
|
3941
3992
|
setWebhookUrl(initialWebhookUrl || "");
|
|
3942
3993
|
}, [initialPublicKey, initialWebhookUrl]);
|
|
@@ -3996,7 +4047,7 @@ SECRET_KEY="${secKey}"
|
|
|
3996
4047
|
};
|
|
3997
4048
|
const hasWebhookChanges = webhookUrl !== initialWebhookUrl;
|
|
3998
4049
|
const isWebhookSaveDisabled = isSavingWebhook || isReadOnly || !hasWebhookChanges;
|
|
3999
|
-
return /* @__PURE__ */
|
|
4050
|
+
return /* @__PURE__ */ import_react71.default.createElement("div", { className: "flex flex-col max-w-3xl rounded-2xl p-6 bg-white gap-8 animate-in fade-in duration-300 min-h-full" }, /* @__PURE__ */ import_react71.default.createElement(ManagedToaster, null), /* @__PURE__ */ import_react71.default.createElement("div", { className: "flex flex-col sm:flex-row sm:items-start justify-between gap-3 sm:gap-4" }, /* @__PURE__ */ import_react71.default.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ import_react71.default.createElement("h1", { className: " text-xl text-black mb-1 truncate tracking-tight" }, "Developer Settings"), /* @__PURE__ */ import_react71.default.createElement("p", { className: "text-xs text-neutral-500 truncate" }, "Manage your API credentials and webhook integrations.")), isReadOnly && /* @__PURE__ */ import_react71.default.createElement("span", { className: "p-2 w-9 h-9 bg-neutral-50 text-neutral-500 rounded-full flex items-center justify-center shrink-0" }, /* @__PURE__ */ import_react71.default.createElement(import_react72.HugeiconsIcon, { icon: import_core_free_icons25.CircleLock02Icon, size: 18, className: "text-current" }))), isLoading ? /* @__PURE__ */ import_react71.default.createElement(PageSpinner6, null) : /* @__PURE__ */ import_react71.default.createElement("div", { className: "w-full max-w-2xl flex flex-col gap-12" }, /* @__PURE__ */ import_react71.default.createElement("div", { className: "flex flex-col gap-6" }, /* @__PURE__ */ import_react71.default.createElement("div", { className: "space-y-2 min-w-0" }, /* @__PURE__ */ import_react71.default.createElement(
|
|
4000
4051
|
TextInput,
|
|
4001
4052
|
{
|
|
4002
4053
|
label: "Public Key",
|
|
@@ -4005,7 +4056,7 @@ SECRET_KEY="${secKey}"
|
|
|
4005
4056
|
},
|
|
4006
4057
|
disabled: true
|
|
4007
4058
|
}
|
|
4008
|
-
), /* @__PURE__ */
|
|
4059
|
+
), /* @__PURE__ */ import_react71.default.createElement("p", { className: "text-[11px] text-neutral-400 mt-1 leading-snug" }, "Your public key is used to identify your application. Your secret key will only be shown once upon generation.")), /* @__PURE__ */ import_react71.default.createElement("div", { className: "flex items-center gap-4" }, /* @__PURE__ */ import_react71.default.createElement(
|
|
4009
4060
|
ThreeDActionButton,
|
|
4010
4061
|
{
|
|
4011
4062
|
onClick: () => {
|
|
@@ -4017,7 +4068,7 @@ SECRET_KEY="${secKey}"
|
|
|
4017
4068
|
className: "w-fit"
|
|
4018
4069
|
},
|
|
4019
4070
|
publicKey ? "Roll API Keys" : "Generate Keys"
|
|
4020
|
-
))), /* @__PURE__ */
|
|
4071
|
+
))), /* @__PURE__ */ import_react71.default.createElement("form", { className: "flex flex-col gap-6 border-t border-neutral-100 pt-8", onSubmit: handleSaveWebhook, autoComplete: "off" }, /* @__PURE__ */ import_react71.default.createElement("div", { className: "space-y-2 min-w-0" }, /* @__PURE__ */ import_react71.default.createElement(
|
|
4021
4072
|
TextInput,
|
|
4022
4073
|
{
|
|
4023
4074
|
label: "Webhook URL",
|
|
@@ -4027,7 +4078,7 @@ SECRET_KEY="${secKey}"
|
|
|
4027
4078
|
placeholder: "https://your-domain.com/webhook",
|
|
4028
4079
|
type: "url"
|
|
4029
4080
|
}
|
|
4030
|
-
), /* @__PURE__ */
|
|
4081
|
+
), /* @__PURE__ */ import_react71.default.createElement("p", { className: "text-[11px] text-neutral-400 mt-1 leading-snug" }, "We will send secure POST requests to this endpoint when significant events occur. Must use HTTPS.")), /* @__PURE__ */ import_react71.default.createElement("div", { className: "flex flex-col sm:flex-row sm:items-center justify-between mt-2 gap-6 sm:gap-4" }, /* @__PURE__ */ import_react71.default.createElement("div", { className: "flex items-center gap-6 min-w-0" }, /* @__PURE__ */ import_react71.default.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ import_react71.default.createElement("span", { className: "text-[11px] text-neutral-400 tracking-[0.2em] block truncate uppercase" }, "Webhook Status"), /* @__PURE__ */ import_react71.default.createElement("span", { className: `text-xs block truncate ${webhookUrl ? "text-emerald-600" : "text-neutral-400"}` }, webhookUrl ? "Active" : "Inactive"))), /* @__PURE__ */ import_react71.default.createElement("div", { className: "flex flex-col-reverse sm:flex-row items-center gap-3 sm:gap-4 w-full sm:w-auto shrink-0" }, hasWebhookChanges && !isSavingWebhook && !isReadOnly && /* @__PURE__ */ import_react71.default.createElement(
|
|
4031
4082
|
"button",
|
|
4032
4083
|
{
|
|
4033
4084
|
type: "button",
|
|
@@ -4035,7 +4086,7 @@ SECRET_KEY="${secKey}"
|
|
|
4035
4086
|
className: "text-[11px] tracking-widest text-neutral-500 hover:text-black transition-colors w-full sm:w-auto py-2 sm:py-0 outline-none"
|
|
4036
4087
|
},
|
|
4037
4088
|
"Cancel"
|
|
4038
|
-
), /* @__PURE__ */
|
|
4089
|
+
), /* @__PURE__ */ import_react71.default.createElement(
|
|
4039
4090
|
ThreeDActionButton,
|
|
4040
4091
|
{
|
|
4041
4092
|
type: "submit",
|
|
@@ -4044,7 +4095,7 @@ SECRET_KEY="${secKey}"
|
|
|
4044
4095
|
className: "min-w-32 w-full sm:w-auto"
|
|
4045
4096
|
},
|
|
4046
4097
|
"Save Webhook"
|
|
4047
|
-
))))), isRollModalOpen && !isReadOnly && /* @__PURE__ */
|
|
4098
|
+
))))), isRollModalOpen && !isReadOnly && /* @__PURE__ */ import_react71.default.createElement("div", { className: "fixed inset-0 z-110 flex items-center justify-center p-4" }, /* @__PURE__ */ import_react71.default.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => !isGenerating && setIsRollModalOpen(false) }), /* @__PURE__ */ import_react71.default.createElement("div", { className: "relative w-72 bg-white shadow-2xl rounded-2xl flex flex-col items-center overflow-hidden animate-in zoom-in-95 duration-200" }, /* @__PURE__ */ import_react71.default.createElement("div", { className: "p-6 text-center w-full" }, /* @__PURE__ */ import_react71.default.createElement("h3", { className: " text-[17px] text-black tracking-tight mb-1" }, "Roll API Keys"), /* @__PURE__ */ import_react71.default.createElement("p", { className: "text-[11px] text-neutral-500 leading-snug mt-2" }, "Are you sure you want to roll your keys? This will permanently invalidate your current secret key and active MCP tokens.")), /* @__PURE__ */ import_react71.default.createElement("div", { className: "w-full flex" }, /* @__PURE__ */ import_react71.default.createElement(
|
|
4048
4099
|
"button",
|
|
4049
4100
|
{
|
|
4050
4101
|
onClick: () => setIsRollModalOpen(false),
|
|
@@ -4052,19 +4103,19 @@ SECRET_KEY="${secKey}"
|
|
|
4052
4103
|
className: "flex-1 py-3 text-[13px] text-neutral-600 hover:bg-neutral-50 transition-colors disabled:opacity-50 outline-none"
|
|
4053
4104
|
},
|
|
4054
4105
|
"Cancel"
|
|
4055
|
-
), /* @__PURE__ */
|
|
4106
|
+
), /* @__PURE__ */ import_react71.default.createElement(
|
|
4056
4107
|
"button",
|
|
4057
4108
|
{
|
|
4058
4109
|
onClick: handleGenerateKeys,
|
|
4059
4110
|
disabled: isGenerating,
|
|
4060
4111
|
className: "flex-1 py-3 text-[13px] text-red-600 hover:bg-neutral-50 transition-colors disabled:opacity-50 flex justify-center items-center outline-none"
|
|
4061
4112
|
},
|
|
4062
|
-
isGenerating ? /* @__PURE__ */
|
|
4113
|
+
isGenerating ? /* @__PURE__ */ import_react71.default.createElement(ButtonSpinner5, null) : "Roll Keys"
|
|
4063
4114
|
)))));
|
|
4064
4115
|
};
|
|
4065
4116
|
|
|
4066
4117
|
// src/components/MedicalFeatureStatsBlock.tsx
|
|
4067
|
-
var
|
|
4118
|
+
var import_react73 = __toESM(require("react"));
|
|
4068
4119
|
var import_image11 = __toESM(require("next/image"));
|
|
4069
4120
|
var MedicalFeatureStatsBlock = ({
|
|
4070
4121
|
bottomHeadline,
|
|
@@ -4073,9 +4124,9 @@ var MedicalFeatureStatsBlock = ({
|
|
|
4073
4124
|
trustText,
|
|
4074
4125
|
stats
|
|
4075
4126
|
}) => {
|
|
4076
|
-
const [isAnimating, setIsAnimating] = (0,
|
|
4077
|
-
const titleRef = (0,
|
|
4078
|
-
(0,
|
|
4127
|
+
const [isAnimating, setIsAnimating] = (0, import_react73.useState)(false);
|
|
4128
|
+
const titleRef = (0, import_react73.useRef)(null);
|
|
4129
|
+
(0, import_react73.useEffect)(() => {
|
|
4079
4130
|
const observer = new IntersectionObserver(
|
|
4080
4131
|
([entry]) => {
|
|
4081
4132
|
if (entry.isIntersecting) {
|
|
@@ -4093,7 +4144,7 @@ var MedicalFeatureStatsBlock = ({
|
|
|
4093
4144
|
}
|
|
4094
4145
|
return () => observer.disconnect();
|
|
4095
4146
|
}, []);
|
|
4096
|
-
return /* @__PURE__ */
|
|
4147
|
+
return /* @__PURE__ */ import_react73.default.createElement("section", { className: "py-24 w-full flex justify-center relative z-10" }, /* @__PURE__ */ import_react73.default.createElement("div", { className: "max-w-6xl w-full flex flex-col px-4 md:px-8" }, /* @__PURE__ */ import_react73.default.createElement("div", { className: "flex flex-col lg:flex-row justify-between items-start lg:items-end gap-10 mb-12" }, /* @__PURE__ */ import_react73.default.createElement("div", { className: "max-w-xl" }, /* @__PURE__ */ import_react73.default.createElement(
|
|
4097
4148
|
"h2",
|
|
4098
4149
|
{
|
|
4099
4150
|
ref: titleRef,
|
|
@@ -4101,7 +4152,7 @@ var MedicalFeatureStatsBlock = ({
|
|
|
4101
4152
|
style: isAnimating ? { animationIterationCount: 1 } : {}
|
|
4102
4153
|
},
|
|
4103
4154
|
bottomHeadline
|
|
4104
|
-
), /* @__PURE__ */
|
|
4155
|
+
), /* @__PURE__ */ import_react73.default.createElement("p", { className: "text-[14px] leading-relaxed text-neutral-500" }, bottomDescription)), /* @__PURE__ */ import_react73.default.createElement("div", { className: "flex items-center gap-4 shrink-0" }, /* @__PURE__ */ import_react73.default.createElement("div", { className: "flex -space-x-3" }, avatars.map((src, i) => /* @__PURE__ */ import_react73.default.createElement("div", { key: i, className: "relative w-12 h-12 rounded-full border-[3px] border-white overflow-hidden bg-neutral-100 z-1 hover:z-10 transition-all" }, /* @__PURE__ */ import_react73.default.createElement(
|
|
4105
4156
|
import_image11.default,
|
|
4106
4157
|
{
|
|
4107
4158
|
src,
|
|
@@ -4110,17 +4161,17 @@ var MedicalFeatureStatsBlock = ({
|
|
|
4110
4161
|
sizes: "48px",
|
|
4111
4162
|
className: "object-cover"
|
|
4112
4163
|
}
|
|
4113
|
-
)))), /* @__PURE__ */
|
|
4164
|
+
)))), /* @__PURE__ */ import_react73.default.createElement("p", { className: "text-[11px] text-neutral-800 leading-[1.4] max-w-55" }, trustText))), /* @__PURE__ */ import_react73.default.createElement("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6" }, stats.map((stat, idx) => /* @__PURE__ */ import_react73.default.createElement("div", { key: idx, className: "bg-white rounded-4xl p-8 md:p-10 flex flex-col h-70" }, /* @__PURE__ */ import_react73.default.createElement("div", { className: "flex pl-3 items-center border border-neutral-100 rounded-full p-0.5 mb-6" }, /* @__PURE__ */ import_react73.default.createElement("span", { className: "text-[14px] text-neutral-500 tracking-wide" }, stat.label)), /* @__PURE__ */ import_react73.default.createElement("div", { className: "text-6xl gradient-text md:text-[80px] font-light tracking-tighter text-black mt-auto leading-none" }, stat.value))))));
|
|
4114
4165
|
};
|
|
4115
4166
|
|
|
4116
4167
|
// src/components/ConsultantShowcase.tsx
|
|
4117
|
-
var
|
|
4168
|
+
var import_react74 = __toESM(require("react"));
|
|
4118
4169
|
var import_image12 = __toESM(require("next/image"));
|
|
4119
|
-
var
|
|
4120
|
-
var
|
|
4170
|
+
var import_react75 = require("@hugeicons/react");
|
|
4171
|
+
var import_core_free_icons26 = require("@hugeicons/core-free-icons");
|
|
4121
4172
|
var ImageWithLoader = ({ src, alt, className, sizes, priority = false }) => {
|
|
4122
|
-
const [isLoading, setIsLoading] = (0,
|
|
4123
|
-
return /* @__PURE__ */
|
|
4173
|
+
const [isLoading, setIsLoading] = (0, import_react74.useState)(true);
|
|
4174
|
+
return /* @__PURE__ */ import_react74.default.createElement("div", { className: `absolute inset-0 bg-neutral-800 ${className}` }, isLoading && /* @__PURE__ */ import_react74.default.createElement("div", { className: "absolute inset-0 flex items-center justify-center z-20 bg-neutral-800/50 backdrop-blur-md transition-opacity duration-300" }, /* @__PURE__ */ import_react74.default.createElement(import_react75.HugeiconsIcon, { icon: import_core_free_icons26.Loading03Icon, size: 24, className: "animate-spin text-white/50" })), /* @__PURE__ */ import_react74.default.createElement(
|
|
4124
4175
|
import_image12.default,
|
|
4125
4176
|
{
|
|
4126
4177
|
src,
|
|
@@ -4139,9 +4190,9 @@ var ImageWithLoader = ({ src, alt, className, sizes, priority = false }) => {
|
|
|
4139
4190
|
var ConsultantShowcase = ({
|
|
4140
4191
|
profiles
|
|
4141
4192
|
}) => {
|
|
4142
|
-
const [currentIndex, setCurrentIndex] = (0,
|
|
4143
|
-
const [touchStart, setTouchStart] = (0,
|
|
4144
|
-
const [touchEnd, setTouchEnd] = (0,
|
|
4193
|
+
const [currentIndex, setCurrentIndex] = (0, import_react74.useState)(0);
|
|
4194
|
+
const [touchStart, setTouchStart] = (0, import_react74.useState)(null);
|
|
4195
|
+
const [touchEnd, setTouchEnd] = (0, import_react74.useState)(null);
|
|
4145
4196
|
const nextSlide = () => {
|
|
4146
4197
|
setCurrentIndex((prev) => prev === profiles.length - 1 ? 0 : prev + 1);
|
|
4147
4198
|
};
|
|
@@ -4166,7 +4217,7 @@ var ConsultantShowcase = ({
|
|
|
4166
4217
|
}
|
|
4167
4218
|
};
|
|
4168
4219
|
if (!profiles || profiles.length === 0) return null;
|
|
4169
|
-
return /* @__PURE__ */
|
|
4220
|
+
return /* @__PURE__ */ import_react74.default.createElement("section", { className: "py-24 w-full flex justify-center px-4 md:px-8 z-10 relative" }, /* @__PURE__ */ import_react74.default.createElement("div", { className: "max-w-6xl w-full" }, /* @__PURE__ */ import_react74.default.createElement(
|
|
4170
4221
|
"div",
|
|
4171
4222
|
{
|
|
4172
4223
|
className: "relative w-full h-100 md:h-112.5 rounded-4xl overflow-hidden bg-neutral-900 group select-none",
|
|
@@ -4176,13 +4227,13 @@ var ConsultantShowcase = ({
|
|
|
4176
4227
|
},
|
|
4177
4228
|
profiles.map((profile, idx) => {
|
|
4178
4229
|
const isActive = idx === currentIndex;
|
|
4179
|
-
return /* @__PURE__ */
|
|
4230
|
+
return /* @__PURE__ */ import_react74.default.createElement(
|
|
4180
4231
|
"div",
|
|
4181
4232
|
{
|
|
4182
4233
|
key: profile.id,
|
|
4183
4234
|
className: `absolute inset-0 transition-opacity duration-700 ease-in-out ${isActive ? "opacity-100 z-10" : "opacity-0 z-0 pointer-events-none"}`
|
|
4184
4235
|
},
|
|
4185
|
-
/* @__PURE__ */
|
|
4236
|
+
/* @__PURE__ */ import_react74.default.createElement(
|
|
4186
4237
|
ImageWithLoader,
|
|
4187
4238
|
{
|
|
4188
4239
|
src: profile.imageSrc,
|
|
@@ -4190,14 +4241,14 @@ var ConsultantShowcase = ({
|
|
|
4190
4241
|
priority: idx === 0
|
|
4191
4242
|
}
|
|
4192
4243
|
),
|
|
4193
|
-
/* @__PURE__ */
|
|
4194
|
-
/* @__PURE__ */
|
|
4195
|
-
/* @__PURE__ */
|
|
4244
|
+
/* @__PURE__ */ import_react74.default.createElement("div", { className: "absolute inset-0 bg-black/20 z-10 pointer-events-none" }),
|
|
4245
|
+
/* @__PURE__ */ import_react74.default.createElement("div", { className: "absolute top-0 left-0 w-full h-[60%] bg-linear-to-b from-black/80 via-black/30 to-transparent z-20 pointer-events-none" }),
|
|
4246
|
+
/* @__PURE__ */ import_react74.default.createElement("div", { className: `absolute top-8 left-8 md:top-12 md:left-12 z-30 text-white max-w-lg transition-transform duration-700 ease-out ${isActive ? "translate-y-0" : "-translate-y-4"}` }, /* @__PURE__ */ import_react74.default.createElement("h2", { className: "text-[29px] tracking-tight mb-2 leading-none" }, profile.name), /* @__PURE__ */ import_react74.default.createElement("div", { className: "flex flex-col gap-0.5" }, /* @__PURE__ */ import_react74.default.createElement("p", { className: "text-[15px] text-white/80 font-light tracking-wide" }, profile.role), profile.description && /* @__PURE__ */ import_react74.default.createElement("p", { className: "text-[15px] text-white/80 font-light tracking-wide mt-1" }, profile.description)))
|
|
4196
4247
|
);
|
|
4197
4248
|
}),
|
|
4198
|
-
/* @__PURE__ */
|
|
4199
|
-
/* @__PURE__ */
|
|
4200
|
-
/* @__PURE__ */
|
|
4249
|
+
/* @__PURE__ */ import_react74.default.createElement("div", { className: "absolute top-0 left-0 w-[20%] h-full z-40 cursor-w-resize hidden md:block", onClick: prevSlide, "aria-label": "Previous image" }),
|
|
4250
|
+
/* @__PURE__ */ import_react74.default.createElement("div", { className: "absolute top-0 right-0 w-[20%] h-full z-40 cursor-e-resize hidden md:block", onClick: nextSlide, "aria-label": "Next image" }),
|
|
4251
|
+
/* @__PURE__ */ import_react74.default.createElement("div", { className: "absolute bottom-6 md:bottom-8 left-0 w-full px-4 z-30 flex justify-center items-center gap-2" }, profiles.map((_, idx) => /* @__PURE__ */ import_react74.default.createElement(
|
|
4201
4252
|
"button",
|
|
4202
4253
|
{
|
|
4203
4254
|
key: idx,
|
|
@@ -4210,13 +4261,13 @@ var ConsultantShowcase = ({
|
|
|
4210
4261
|
};
|
|
4211
4262
|
|
|
4212
4263
|
// src/components/ContentGridBlock.tsx
|
|
4213
|
-
var
|
|
4264
|
+
var import_react76 = __toESM(require("react"));
|
|
4214
4265
|
var import_image13 = __toESM(require("next/image"));
|
|
4215
|
-
var
|
|
4216
|
-
var
|
|
4266
|
+
var import_react77 = require("@hugeicons/react");
|
|
4267
|
+
var import_core_free_icons27 = require("@hugeicons/core-free-icons");
|
|
4217
4268
|
var ImageWithLoader2 = ({ src, alt, className, sizes }) => {
|
|
4218
|
-
const [isLoading, setIsLoading] = (0,
|
|
4219
|
-
return /* @__PURE__ */
|
|
4269
|
+
const [isLoading, setIsLoading] = (0, import_react76.useState)(true);
|
|
4270
|
+
return /* @__PURE__ */ import_react76.default.createElement("div", { className: `relative overflow-hidden bg-neutral-100 ${className}` }, isLoading && /* @__PURE__ */ import_react76.default.createElement("div", { className: "absolute inset-0 flex items-center justify-center z-20 bg-neutral-100/50 backdrop-blur-sm transition-opacity duration-300" }, /* @__PURE__ */ import_react76.default.createElement(import_react77.HugeiconsIcon, { icon: import_core_free_icons27.Loading03Icon, size: 24, className: "animate-spin text-neutral-400" })), /* @__PURE__ */ import_react76.default.createElement(
|
|
4220
4271
|
import_image13.default,
|
|
4221
4272
|
{
|
|
4222
4273
|
src,
|
|
@@ -4238,14 +4289,14 @@ var ContentGridBlock = ({
|
|
|
4238
4289
|
middleBottomCard,
|
|
4239
4290
|
rightCards
|
|
4240
4291
|
}) => {
|
|
4241
|
-
return /* @__PURE__ */
|
|
4292
|
+
return /* @__PURE__ */ import_react76.default.createElement("section", { className: " w-full flex justify-center z-10 relative" }, /* @__PURE__ */ import_react76.default.createElement("div", { className: "max-w-300 w-full px-4 md:px-8 flex flex-col gap-12" }, /* @__PURE__ */ import_react76.default.createElement("div", { className: "flex flex-col lg:flex-row justify-between items-start lg:items-end gap-6 w-full" }, /* @__PURE__ */ import_react76.default.createElement("h2", { className: "text-3xl tracking-tight text-black leading-[1.15] max-w-lg" }, header.titlePrefix, " ", /* @__PURE__ */ import_react76.default.createElement("span", { className: "gradient-text" }, header.highlightText))), /* @__PURE__ */ import_react76.default.createElement("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6" }, /* @__PURE__ */ import_react76.default.createElement("div", { className: "flex flex-col justify-end" }, /* @__PURE__ */ import_react76.default.createElement("div", { className: "border border-neutral-100 rounded-3xl p-8 flex flex-col h-80" }, /* @__PURE__ */ import_react76.default.createElement("p", { className: "text-[17px] text-black leading-snug mb-4" }, leftCard.mainText), leftCard.tag && /* @__PURE__ */ import_react76.default.createElement("span", { className: "mb-auto text-[11px] text-neutral-400 uppercase tracking-widest" }, leftCard.tag), /* @__PURE__ */ import_react76.default.createElement("div", { className: "flex items-center justify-between mt-8" }, /* @__PURE__ */ import_react76.default.createElement("div", null, /* @__PURE__ */ import_react76.default.createElement("h4", { className: "text-[15px] text-black" }, leftCard.title), /* @__PURE__ */ import_react76.default.createElement("p", { className: "text-[13px] text-neutral-400" }, leftCard.subtitle)), /* @__PURE__ */ import_react76.default.createElement("div", { className: "w-10 h-10 rounded-full overflow-hidden relative" }, /* @__PURE__ */ import_react76.default.createElement(import_image13.default, { src: leftCard.thumbnailSrc, alt: leftCard.title, fill: true, className: "object-cover" }))))), /* @__PURE__ */ import_react76.default.createElement("div", { className: "flex flex-col gap-6" }, /* @__PURE__ */ import_react76.default.createElement("div", { className: "border border-neutral-100 rounded-3xl p-8 flex flex-col relative h-75" }, /* @__PURE__ */ import_react76.default.createElement("div", { className: "absolute top-6 right-6 flex flex-col items-end gap-1" }, /* @__PURE__ */ import_react76.default.createElement("span", { className: "text-[11px] text-neutral-400 tracking-wide" }, middleTopCard.topRightLabel), /* @__PURE__ */ import_react76.default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ import_react76.default.createElement("div", { className: "flex -space-x-2" }, middleTopCard.topRightAvatars.map((src, i) => /* @__PURE__ */ import_react76.default.createElement("div", { key: i, className: "w-7 h-7 rounded-full border-2 border-white overflow-hidden relative z-10" }, /* @__PURE__ */ import_react76.default.createElement(import_image13.default, { src, alt: "Avatar", fill: true, className: "object-cover", sizes: "28px" })))), /* @__PURE__ */ import_react76.default.createElement("span", { className: "text-sm text-neutral-500" }, middleTopCard.topRightCount))), /* @__PURE__ */ import_react76.default.createElement("div", { className: "grow flex flex-col justify-center items-center py-6" }, /* @__PURE__ */ import_react76.default.createElement("div", { className: "px-5 py-2 rounded-full bg-neutral-50/50 border border-neutral-100 text-[13px] text-neutral-600" }, middleTopCard.badgePrefix, " ", /* @__PURE__ */ import_react76.default.createElement("span", { className: " text-black" }, middleTopCard.badgeHighlight), middleTopCard.badgeSuffix)), /* @__PURE__ */ import_react76.default.createElement("div", { className: "mt-auto" }, /* @__PURE__ */ import_react76.default.createElement("p", { className: "text-[11px] text-neutral-400 tracking-wide mb-1" }, middleTopCard.title), /* @__PURE__ */ import_react76.default.createElement("p", { className: "text-[14px] text-black leading-snug pr-4" }, middleTopCard.description))), /* @__PURE__ */ import_react76.default.createElement("div", { className: "border border-neutral-100 rounded-3xl p-8 flex flex-col h-80" }, /* @__PURE__ */ import_react76.default.createElement("div", { className: "flex justify-between items-start mb-6" }, /* @__PURE__ */ import_react76.default.createElement("div", null, /* @__PURE__ */ import_react76.default.createElement("h4", { className: "text-[15px] text-black leading-tight" }, middleBottomCard.title), /* @__PURE__ */ import_react76.default.createElement("p", { className: "text-[13px] text-neutral-400" }, middleBottomCard.subtitle)), /* @__PURE__ */ import_react76.default.createElement("div", { className: "w-10 h-10 rounded-full overflow-hidden relative" }, /* @__PURE__ */ import_react76.default.createElement(import_image13.default, { src: middleBottomCard.thumbnailSrc, alt: middleBottomCard.title, fill: true, className: "object-cover" }))), /* @__PURE__ */ import_react76.default.createElement("div", { className: "mt-auto" }, /* @__PURE__ */ import_react76.default.createElement("p", { className: "text-[16px] text-black leading-snug mb-4" }, middleBottomCard.mainText), middleBottomCard.tag && /* @__PURE__ */ import_react76.default.createElement("span", { className: "text-[11px] text-neutral-400 uppercase tracking-widest" }, middleBottomCard.tag)))), /* @__PURE__ */ import_react76.default.createElement("div", { className: "flex flex-col gap-6" }, rightCards.slice(0, 2).map((card, idx) => /* @__PURE__ */ import_react76.default.createElement("div", { key: idx, className: "relative w-full h-80 rounded-3xl overflow-hidden group" }, /* @__PURE__ */ import_react76.default.createElement(
|
|
4242
4293
|
ImageWithLoader2,
|
|
4243
4294
|
{
|
|
4244
4295
|
src: card.bgImageSrc,
|
|
4245
4296
|
alt: card.title,
|
|
4246
4297
|
className: "absolute inset-0 w-full h-full"
|
|
4247
4298
|
}
|
|
4248
|
-
), /* @__PURE__ */
|
|
4299
|
+
), /* @__PURE__ */ import_react76.default.createElement("div", { className: "absolute inset-0 bg-black/20 z-20 pointer-events-none" }), /* @__PURE__ */ import_react76.default.createElement("div", { className: "absolute inset-0 z-30 p-6 flex flex-col justify-end text-white" }, /* @__PURE__ */ import_react76.default.createElement("p", { className: "text-[14px] leading-snug mb-3 pr-2 text-white/90" }, card.mainText), card.tag && /* @__PURE__ */ import_react76.default.createElement("span", { className: "mb-4 text-[11px] text-white/50 uppercase tracking-widest" }, card.tag), /* @__PURE__ */ import_react76.default.createElement("div", { className: "pt-3" }, /* @__PURE__ */ import_react76.default.createElement("h4", { className: "text-[15px] tracking-wide" }, card.title), /* @__PURE__ */ import_react76.default.createElement("p", { className: "text-[13px] text-white/60" }, card.subtitle)))))))));
|
|
4249
4300
|
};
|
|
4250
4301
|
// Annotate the CommonJS export names for ESM import in node:
|
|
4251
4302
|
0 && (module.exports = {
|
|
@@ -4282,6 +4333,7 @@ var ContentGridBlock = ({
|
|
|
4282
4333
|
ThreeDButton,
|
|
4283
4334
|
UniversalAgentConsole,
|
|
4284
4335
|
UniversalBillingPage,
|
|
4336
|
+
UniversalCheckoutView,
|
|
4285
4337
|
UniversalDashboardPage,
|
|
4286
4338
|
UniversalDeveloperSettings,
|
|
4287
4339
|
UniversalDirectoryPage,
|