@retinalabsllc/zairusjs 0.7.3 → 0.7.4
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 +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +269 -263
- package/dist/index.mjs +74 -61
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1738,6 +1738,8 @@ var UniversalSidebar = ({
|
|
|
1738
1738
|
// src/components/UniversalOrganizationPage.tsx
|
|
1739
1739
|
var import_react39 = __toESM(require("react"));
|
|
1740
1740
|
var import_react_hot_toast3 = __toESM(require("react-hot-toast"));
|
|
1741
|
+
var import_react40 = require("@hugeicons/react");
|
|
1742
|
+
var import_core_free_icons10 = require("@hugeicons/core-free-icons");
|
|
1741
1743
|
var InputSpinner2 = () => /* @__PURE__ */ import_react39.default.createElement("svg", { className: "animate-spin h-4 w-4 text-neutral-400", xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24" }, /* @__PURE__ */ import_react39.default.createElement("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }), /* @__PURE__ */ import_react39.default.createElement("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" }));
|
|
1742
1744
|
var UniversalOrganizationPage = ({
|
|
1743
1745
|
initialOrgName,
|
|
@@ -1817,7 +1819,7 @@ var UniversalOrganizationPage = ({
|
|
|
1817
1819
|
};
|
|
1818
1820
|
const hasChanges = orgName !== initialOrgName || slug !== initialSlug;
|
|
1819
1821
|
const isSaveDisabled = isSubmitting || isReadOnly || isCheckingSlug || !hasChanges || orgName.length < 3 || slug.length < 3 || slug !== initialSlug && slugAvailable === false;
|
|
1820
|
-
return /* @__PURE__ */ import_react39.default.createElement("div", { className: "flex flex-col gap-8 animate-in max-w-3xl rounded-2xl p-6 bg-white fade-in duration-300 " }, /* @__PURE__ */ import_react39.default.createElement(ManagedToaster, null), /* @__PURE__ */ import_react39.default.createElement("div", { className: "flex items-start justify-between gap-4" }, /* @__PURE__ */ import_react39.default.createElement("div", null, /* @__PURE__ */ import_react39.default.createElement("h1", { className: " font-serif text-xl text-black mb-1 tracking-tight" }, "Organization"), /* @__PURE__ */ import_react39.default.createElement("p", { className: "text-xs text-neutral-500" }, "Manage your tenant workspace details and identity.")), isReadOnly && /* @__PURE__ */ import_react39.default.createElement("span", { className: "
|
|
1822
|
+
return /* @__PURE__ */ import_react39.default.createElement("div", { className: "flex flex-col gap-8 animate-in max-w-3xl rounded-2xl p-6 bg-white fade-in duration-300 " }, /* @__PURE__ */ import_react39.default.createElement(ManagedToaster, null), /* @__PURE__ */ import_react39.default.createElement("div", { className: "flex items-start justify-between gap-4" }, /* @__PURE__ */ import_react39.default.createElement("div", null, /* @__PURE__ */ import_react39.default.createElement("h1", { className: " font-serif text-xl text-black mb-1 tracking-tight" }, "Organization"), /* @__PURE__ */ import_react39.default.createElement("p", { className: "text-xs text-neutral-500" }, "Manage your tenant workspace details and identity.")), isReadOnly && /* @__PURE__ */ import_react39.default.createElement("span", { className: "p-2 w-9 h-9 bg-neutral-50 text-neutral-500 rounded-full " }, /* @__PURE__ */ import_react39.default.createElement(import_react40.HugeiconsIcon, { icon: import_core_free_icons10.LockKeyIcon, size: 18, className: "text-current" }))), /* @__PURE__ */ import_react39.default.createElement("div", { className: "w-full max-w-2xl" }, /* @__PURE__ */ import_react39.default.createElement("form", { className: "flex flex-col gap-8", onSubmit: handleSave, autoComplete: "off" }, /* @__PURE__ */ import_react39.default.createElement(
|
|
1821
1823
|
TextInput,
|
|
1822
1824
|
{
|
|
1823
1825
|
label: "Organization Name",
|
|
@@ -1863,9 +1865,11 @@ var UniversalOrganizationPage = ({
|
|
|
1863
1865
|
};
|
|
1864
1866
|
|
|
1865
1867
|
// src/components/UniversalIdentityPage.tsx
|
|
1866
|
-
var
|
|
1868
|
+
var import_react41 = __toESM(require("react"));
|
|
1867
1869
|
var import_react_hot_toast4 = __toESM(require("react-hot-toast"));
|
|
1868
|
-
var
|
|
1870
|
+
var import_react42 = require("@hugeicons/react");
|
|
1871
|
+
var import_core_free_icons11 = require("@hugeicons/core-free-icons");
|
|
1872
|
+
var ButtonSpinner2 = () => /* @__PURE__ */ import_react41.default.createElement("svg", { className: "animate-spin h-4 w-4 text-neutral-400", xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24" }, /* @__PURE__ */ import_react41.default.createElement("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }), /* @__PURE__ */ import_react41.default.createElement("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" }));
|
|
1869
1873
|
var UniversalIdentityPage = ({
|
|
1870
1874
|
headerTitle,
|
|
1871
1875
|
headerDescription,
|
|
@@ -1881,12 +1885,12 @@ var UniversalIdentityPage = ({
|
|
|
1881
1885
|
onDeleteResource,
|
|
1882
1886
|
onSuccessfulDeleteRedirect = "/app"
|
|
1883
1887
|
}) => {
|
|
1884
|
-
const [primaryValue, setPrimaryValue] = (0,
|
|
1885
|
-
const [secondaryValue, setSecondaryValue] = (0,
|
|
1886
|
-
const [isSubmitting, setIsSubmitting] = (0,
|
|
1887
|
-
const [isDeleteModalOpen, setIsDeleteModalOpen] = (0,
|
|
1888
|
-
const [isDeleting, setIsDeleting] = (0,
|
|
1889
|
-
(0,
|
|
1888
|
+
const [primaryValue, setPrimaryValue] = (0, import_react41.useState)(initialPrimaryValue);
|
|
1889
|
+
const [secondaryValue, setSecondaryValue] = (0, import_react41.useState)(initialSecondaryValue);
|
|
1890
|
+
const [isSubmitting, setIsSubmitting] = (0, import_react41.useState)(false);
|
|
1891
|
+
const [isDeleteModalOpen, setIsDeleteModalOpen] = (0, import_react41.useState)(false);
|
|
1892
|
+
const [isDeleting, setIsDeleting] = (0, import_react41.useState)(false);
|
|
1893
|
+
(0, import_react41.useEffect)(() => {
|
|
1890
1894
|
setPrimaryValue(initialPrimaryValue || "");
|
|
1891
1895
|
setSecondaryValue(initialSecondaryValue || "");
|
|
1892
1896
|
}, [initialPrimaryValue, initialSecondaryValue]);
|
|
@@ -1937,7 +1941,7 @@ var UniversalIdentityPage = ({
|
|
|
1937
1941
|
};
|
|
1938
1942
|
const hasChanges = primaryValue !== initialPrimaryValue || secondaryValue !== initialSecondaryValue;
|
|
1939
1943
|
const isSaveDisabled = isSubmitting || isReadOnly || !hasChanges || primaryValue.trim().length < 3;
|
|
1940
|
-
return /* @__PURE__ */
|
|
1944
|
+
return /* @__PURE__ */ import_react41.default.createElement("div", { className: "flex flex-col gap-8 animate-in max-w-3xl rounded-2xl p-6 bg-white fade-in duration-300 " }, /* @__PURE__ */ import_react41.default.createElement(ManagedToaster, null), /* @__PURE__ */ import_react41.default.createElement("div", { className: "flex items-start justify-between gap-4" }, /* @__PURE__ */ import_react41.default.createElement("div", null, /* @__PURE__ */ import_react41.default.createElement("h1", { className: " font-serif text-xl text-black mb-1 tracking-tight" }, headerTitle), /* @__PURE__ */ import_react41.default.createElement("p", { className: "text-xs text-neutral-500" }, headerDescription)), isReadOnly && /* @__PURE__ */ import_react41.default.createElement("span", { className: "p-2 w-9 h-9 bg-neutral-50 text-neutral-500 rounded-full " }, /* @__PURE__ */ import_react41.default.createElement(import_react42.HugeiconsIcon, { icon: import_core_free_icons11.LockKeyIcon, size: 18, className: "text-current" }))), /* @__PURE__ */ import_react41.default.createElement("div", { className: "w-full max-w-2xl" }, /* @__PURE__ */ import_react41.default.createElement("form", { className: "flex flex-col gap-8", onSubmit: handleSave, autoComplete: "off" }, /* @__PURE__ */ import_react41.default.createElement(
|
|
1941
1945
|
TextInput,
|
|
1942
1946
|
{
|
|
1943
1947
|
label: primaryInputLabel,
|
|
@@ -1946,7 +1950,7 @@ var UniversalIdentityPage = ({
|
|
|
1946
1950
|
disabled: isReadOnly || isSubmitting,
|
|
1947
1951
|
maxLength: 50
|
|
1948
1952
|
}
|
|
1949
|
-
), secondaryInputLabel && /* @__PURE__ */
|
|
1953
|
+
), secondaryInputLabel && /* @__PURE__ */ import_react41.default.createElement(
|
|
1950
1954
|
TextInput,
|
|
1951
1955
|
{
|
|
1952
1956
|
label: secondaryInputLabel,
|
|
@@ -1955,7 +1959,7 @@ var UniversalIdentityPage = ({
|
|
|
1955
1959
|
disabled: isReadOnly || isSubmitting,
|
|
1956
1960
|
maxLength: 150
|
|
1957
1961
|
}
|
|
1958
|
-
), !isReadOnly && /* @__PURE__ */
|
|
1962
|
+
), !isReadOnly && /* @__PURE__ */ import_react41.default.createElement("div", { className: "pt-8 mt-2 flex flex-col sm:flex-row sm:items-center justify-between gap-6" }, /* @__PURE__ */ import_react41.default.createElement("div", { className: "flex items-center gap-4 w-full sm:w-auto" }, /* @__PURE__ */ import_react41.default.createElement(
|
|
1959
1963
|
ThreeDActionButton,
|
|
1960
1964
|
{
|
|
1961
1965
|
type: "submit",
|
|
@@ -1964,7 +1968,7 @@ var UniversalIdentityPage = ({
|
|
|
1964
1968
|
className: "min-w-32 w-full sm:w-auto"
|
|
1965
1969
|
},
|
|
1966
1970
|
"Save Changes"
|
|
1967
|
-
), hasChanges && !isSubmitting && /* @__PURE__ */
|
|
1971
|
+
), hasChanges && !isSubmitting && /* @__PURE__ */ import_react41.default.createElement(
|
|
1968
1972
|
"button",
|
|
1969
1973
|
{
|
|
1970
1974
|
type: "button",
|
|
@@ -1975,7 +1979,7 @@ var UniversalIdentityPage = ({
|
|
|
1975
1979
|
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"
|
|
1976
1980
|
},
|
|
1977
1981
|
"Cancel"
|
|
1978
|
-
)), allowDeletion && /* @__PURE__ */
|
|
1982
|
+
)), allowDeletion && /* @__PURE__ */ import_react41.default.createElement(
|
|
1979
1983
|
"button",
|
|
1980
1984
|
{
|
|
1981
1985
|
type: "button",
|
|
@@ -1984,7 +1988,7 @@ var UniversalIdentityPage = ({
|
|
|
1984
1988
|
},
|
|
1985
1989
|
"Delete ",
|
|
1986
1990
|
headerTitle.split(" ")[0]
|
|
1987
|
-
)))), isDeleteModalOpen && !isReadOnly && allowDeletion && /* @__PURE__ */
|
|
1991
|
+
)))), isDeleteModalOpen && !isReadOnly && allowDeletion && /* @__PURE__ */ import_react41.default.createElement("div", { className: "fixed inset-0 z-110 flex items-center justify-center p-4" }, /* @__PURE__ */ import_react41.default.createElement("div", { className: "absolute inset-0 bg-black/30 shadow-2xl", onClick: () => !isDeleting && setIsDeleteModalOpen(false) }), /* @__PURE__ */ import_react41.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_react41.default.createElement("div", { className: "p-6 text-center w-full" }, /* @__PURE__ */ import_react41.default.createElement("h3", { className: " font-serif text-[17px] text-black tracking-tight mb-1" }, "Confirm Deletion"), /* @__PURE__ */ import_react41.default.createElement("p", { className: "text-[12px] text-neutral-500 leading-snug mt-2" }, deleteWarningText)), /* @__PURE__ */ import_react41.default.createElement("div", { className: "w-full flex" }, /* @__PURE__ */ import_react41.default.createElement(
|
|
1988
1992
|
"button",
|
|
1989
1993
|
{
|
|
1990
1994
|
type: "button",
|
|
@@ -1993,7 +1997,7 @@ var UniversalIdentityPage = ({
|
|
|
1993
1997
|
className: "flex-1 py-2 text-[13px] text-neutral-600 hover:bg-neutral-50 transition-colors disabled:opacity-50 outline-none"
|
|
1994
1998
|
},
|
|
1995
1999
|
"Cancel"
|
|
1996
|
-
), /* @__PURE__ */
|
|
2000
|
+
), /* @__PURE__ */ import_react41.default.createElement(
|
|
1997
2001
|
"button",
|
|
1998
2002
|
{
|
|
1999
2003
|
type: "button",
|
|
@@ -2001,17 +2005,17 @@ var UniversalIdentityPage = ({
|
|
|
2001
2005
|
disabled: isDeleting,
|
|
2002
2006
|
className: "flex-1 py-2 text-[13px] text-red-600 hover:bg-neutral-50 transition-colors disabled:opacity-50 flex justify-center items-center outline-none"
|
|
2003
2007
|
},
|
|
2004
|
-
isDeleting ? /* @__PURE__ */
|
|
2008
|
+
isDeleting ? /* @__PURE__ */ import_react41.default.createElement(ButtonSpinner2, null) : "Delete"
|
|
2005
2009
|
)))));
|
|
2006
2010
|
};
|
|
2007
2011
|
|
|
2008
2012
|
// src/components/UniversalMembersPage.tsx
|
|
2009
|
-
var
|
|
2013
|
+
var import_react43 = __toESM(require("react"));
|
|
2010
2014
|
var import_react_hot_toast5 = __toESM(require("react-hot-toast"));
|
|
2011
|
-
var
|
|
2012
|
-
var
|
|
2013
|
-
var ButtonSpinner3 = () => /* @__PURE__ */
|
|
2014
|
-
var PageSpinner2 = () => /* @__PURE__ */
|
|
2015
|
+
var import_react44 = require("@hugeicons/react");
|
|
2016
|
+
var import_core_free_icons12 = require("@hugeicons/core-free-icons");
|
|
2017
|
+
var ButtonSpinner3 = () => /* @__PURE__ */ import_react43.default.createElement(import_react44.HugeiconsIcon, { icon: import_core_free_icons12.Loading03Icon, size: 16, className: "animate-spin text-white" });
|
|
2018
|
+
var PageSpinner2 = () => /* @__PURE__ */ import_react43.default.createElement("div", { className: "flex justify-center items-center py-12" }, /* @__PURE__ */ import_react43.default.createElement(import_react44.HugeiconsIcon, { icon: import_core_free_icons12.Loading03Icon, size: 32, className: "animate-spin mb-4 text-black" }));
|
|
2015
2019
|
var getInitials = (name) => {
|
|
2016
2020
|
if (!name) return "U";
|
|
2017
2021
|
const parts = name.trim().split(" ");
|
|
@@ -2054,18 +2058,18 @@ var UniversalMembersPage = ({
|
|
|
2054
2058
|
onRemoveMember,
|
|
2055
2059
|
onUpdateRole
|
|
2056
2060
|
}) => {
|
|
2057
|
-
const [currentView, setCurrentView] = (0,
|
|
2058
|
-
const [selectedMember, setSelectedMember] = (0,
|
|
2059
|
-
const [inviteEmail, setInviteEmail] = (0,
|
|
2060
|
-
const [inviteFirst, setInviteFirst] = (0,
|
|
2061
|
-
const [inviteLast, setInviteLast] = (0,
|
|
2062
|
-
const [isInviting, setIsInviting] = (0,
|
|
2063
|
-
const [isRoleModalOpen, setIsRoleModalOpen] = (0,
|
|
2064
|
-
const [isUpdatingRole, setIsUpdatingRole] = (0,
|
|
2065
|
-
const [memberToDelete, setMemberToDelete] = (0,
|
|
2066
|
-
const [isDeleting, setIsDeleting] = (0,
|
|
2067
|
-
const dropdownRef = (0,
|
|
2068
|
-
(0,
|
|
2061
|
+
const [currentView, setCurrentView] = (0, import_react43.useState)("list");
|
|
2062
|
+
const [selectedMember, setSelectedMember] = (0, import_react43.useState)(null);
|
|
2063
|
+
const [inviteEmail, setInviteEmail] = (0, import_react43.useState)("");
|
|
2064
|
+
const [inviteFirst, setInviteFirst] = (0, import_react43.useState)("");
|
|
2065
|
+
const [inviteLast, setInviteLast] = (0, import_react43.useState)("");
|
|
2066
|
+
const [isInviting, setIsInviting] = (0, import_react43.useState)(false);
|
|
2067
|
+
const [isRoleModalOpen, setIsRoleModalOpen] = (0, import_react43.useState)(false);
|
|
2068
|
+
const [isUpdatingRole, setIsUpdatingRole] = (0, import_react43.useState)(false);
|
|
2069
|
+
const [memberToDelete, setMemberToDelete] = (0, import_react43.useState)(null);
|
|
2070
|
+
const [isDeleting, setIsDeleting] = (0, import_react43.useState)(false);
|
|
2071
|
+
const dropdownRef = (0, import_react43.useRef)(null);
|
|
2072
|
+
(0, import_react43.useEffect)(() => {
|
|
2069
2073
|
function handleClickOutside(event) {
|
|
2070
2074
|
if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
|
|
2071
2075
|
setIsRoleModalOpen(false);
|
|
@@ -2139,15 +2143,15 @@ var UniversalMembersPage = ({
|
|
|
2139
2143
|
setSelectedMember(null);
|
|
2140
2144
|
setIsRoleModalOpen(false);
|
|
2141
2145
|
};
|
|
2142
|
-
return /* @__PURE__ */
|
|
2146
|
+
return /* @__PURE__ */ import_react43.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_react43.default.createElement(ManagedToaster, null), /* @__PURE__ */ import_react43.default.createElement("div", { className: "flex flex-col sm:flex-row sm:items-start justify-between gap-4" }, currentView === "list" && /* @__PURE__ */ import_react43.default.createElement(import_react43.default.Fragment, null, /* @__PURE__ */ import_react43.default.createElement("div", null, /* @__PURE__ */ import_react43.default.createElement("h1", { className: " font-serif text-xl text-black mb-1 tracking-tight" }, headerTitle), /* @__PURE__ */ import_react43.default.createElement("p", { className: "text-xs text-neutral-500" }, headerDescription)), canManage && /* @__PURE__ */ import_react43.default.createElement(
|
|
2143
2147
|
ThreeDActionButton,
|
|
2144
2148
|
{
|
|
2145
2149
|
onClick: () => setCurrentView("invite"),
|
|
2146
2150
|
className: "w-fit shrink-0 gap-2"
|
|
2147
2151
|
},
|
|
2148
|
-
/* @__PURE__ */
|
|
2152
|
+
/* @__PURE__ */ import_react43.default.createElement(import_react44.HugeiconsIcon, { icon: import_core_free_icons12.UserAdd01Icon, size: 12 }),
|
|
2149
2153
|
"Add Member"
|
|
2150
|
-
)), currentView !== "list" && /* @__PURE__ */
|
|
2154
|
+
)), currentView !== "list" && /* @__PURE__ */ import_react43.default.createElement("div", { className: "flex flex-col items-start gap-3" }, /* @__PURE__ */ import_react43.default.createElement("button", { onClick: goBack, className: "text-[10px] text-neutral-400 hover:text-black tracking-[0.2em] flex items-center gap-1.5 transition-colors outline-none" }, /* @__PURE__ */ import_react43.default.createElement(import_react44.HugeiconsIcon, { icon: import_core_free_icons12.ArrowLeft01Icon, size: 12 }), " Back"), /* @__PURE__ */ import_react43.default.createElement("h1", { className: " font-serif text-lg text-black tracking-tight" }, currentView === "invite" ? "Add New Member" : "Member Profile"))), currentView === "list" && /* @__PURE__ */ import_react43.default.createElement("div", { className: "w-full overflow-hidden" }, isLoading ? /* @__PURE__ */ import_react43.default.createElement(PageSpinner2, null) : /* @__PURE__ */ import_react43.default.createElement("div", { className: "flex flex-col min-w-0" }, /* @__PURE__ */ import_react43.default.createElement("div", { className: "divide-y divide-neutral-100" }, members.map((member) => /* @__PURE__ */ import_react43.default.createElement(
|
|
2151
2155
|
"div",
|
|
2152
2156
|
{
|
|
2153
2157
|
key: member.id,
|
|
@@ -2157,7 +2161,7 @@ var UniversalMembersPage = ({
|
|
|
2157
2161
|
},
|
|
2158
2162
|
className: "flex items-center justify-between p-4 sm:p-5 hover:bg-neutral-50/50 transition-colors cursor-pointer group min-w-0"
|
|
2159
2163
|
},
|
|
2160
|
-
/* @__PURE__ */
|
|
2164
|
+
/* @__PURE__ */ import_react43.default.createElement("div", { className: "flex items-center gap-3 sm:gap-4 min-w-0 flex-1" }, member.displayImage && member.displayImage !== "NO_IMAGE" ? /* @__PURE__ */ import_react43.default.createElement("div", { className: "w-10 h-10 shrink-0 rounded-full overflow-hidden bg-neutral-100" }, /* @__PURE__ */ import_react43.default.createElement(
|
|
2161
2165
|
"img",
|
|
2162
2166
|
{
|
|
2163
2167
|
src: member.displayImage,
|
|
@@ -2165,25 +2169,25 @@ var UniversalMembersPage = ({
|
|
|
2165
2169
|
className: "w-full h-full object-cover blur-sm transition-all duration-300",
|
|
2166
2170
|
onLoad: (e) => e.currentTarget.classList.remove("blur-sm")
|
|
2167
2171
|
}
|
|
2168
|
-
)) : /* @__PURE__ */
|
|
2169
|
-
/* @__PURE__ */
|
|
2170
|
-
))), /* @__PURE__ */
|
|
2172
|
+
)) : /* @__PURE__ */ import_react43.default.createElement("div", { className: `w-10 h-10 shrink-0 rounded-full flex items-center justify-center text-black text-xs ${resolveThemeColor(member.profileColor)}` }, getInitials(member.fullName)), /* @__PURE__ */ import_react43.default.createElement("div", { className: "min-w-0 flex-1" }, /* @__PURE__ */ import_react43.default.createElement("p", { className: "text-sm text-black truncate pr-2 sm:pr-4" }, member.fullName, " ", member.userId === currentUserId && /* @__PURE__ */ import_react43.default.createElement("span", { className: "text-neutral-400 ml-1 sm:ml-2" }, "(You)")), /* @__PURE__ */ import_react43.default.createElement("p", { className: "text-xs text-neutral-500 truncate pr-2 sm:pr-4 mt-0.5" }, member.email))),
|
|
2173
|
+
/* @__PURE__ */ import_react43.default.createElement("div", { className: `shrink-0 pl-2 sm:pl-4 transition-opacity hidden sm:block ${canManage ? "opacity-0 group-hover:opacity-100" : "opacity-100"}` }, /* @__PURE__ */ import_react43.default.createElement("span", { className: "text-[10px] tracking-[0.2em] text-black border border-neutral-200 px-4 py-2 rounded-full bg-white whitespace-nowrap" }, canManage ? "Manage" : "View"))
|
|
2174
|
+
))), /* @__PURE__ */ import_react43.default.createElement("div", { className: "flex items-center justify-between p-4 sm:p-5" }, /* @__PURE__ */ import_react43.default.createElement("span", { className: "text-[10px] text-neutral-400 tracking-[0.2em]" }, "Page ", currentPage, " of ", totalPages), /* @__PURE__ */ import_react43.default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ import_react43.default.createElement(
|
|
2171
2175
|
"button",
|
|
2172
2176
|
{
|
|
2173
2177
|
onClick: () => onPageChange(currentPage - 1),
|
|
2174
2178
|
disabled: currentPage === 1 || isLoading,
|
|
2175
2179
|
className: "p-2 border border-neutral-200 rounded-full bg-white text-neutral-500 hover:text-black hover:border-black disabled:opacity-30 disabled:cursor-not-allowed transition-all outline-none"
|
|
2176
2180
|
},
|
|
2177
|
-
/* @__PURE__ */
|
|
2178
|
-
), /* @__PURE__ */
|
|
2181
|
+
/* @__PURE__ */ import_react43.default.createElement(import_react44.HugeiconsIcon, { icon: import_core_free_icons12.ArrowLeft01Icon, size: 14 })
|
|
2182
|
+
), /* @__PURE__ */ import_react43.default.createElement(
|
|
2179
2183
|
"button",
|
|
2180
2184
|
{
|
|
2181
2185
|
onClick: () => onPageChange(currentPage + 1),
|
|
2182
2186
|
disabled: currentPage >= totalPages || isLoading,
|
|
2183
2187
|
className: "p-2 border border-neutral-200 rounded-full bg-white text-neutral-500 hover:text-black hover:border-black disabled:opacity-30 disabled:cursor-not-allowed transition-all outline-none"
|
|
2184
2188
|
},
|
|
2185
|
-
/* @__PURE__ */
|
|
2186
|
-
))))), currentView === "details" && selectedMember && /* @__PURE__ */
|
|
2189
|
+
/* @__PURE__ */ import_react43.default.createElement(import_react44.HugeiconsIcon, { icon: import_core_free_icons12.ArrowRight01Icon, size: 14 })
|
|
2190
|
+
))))), currentView === "details" && selectedMember && /* @__PURE__ */ import_react43.default.createElement("div", { className: "w-full max-w-2xl text-left" }, /* @__PURE__ */ import_react43.default.createElement("div", { className: "flex flex-col gap-8" }, /* @__PURE__ */ import_react43.default.createElement("div", { className: "flex items-center gap-5" }, selectedMember.displayImage && selectedMember.displayImage !== "NO_IMAGE" ? /* @__PURE__ */ import_react43.default.createElement("div", { className: "w-16 h-16 shrink-0 rounded-full overflow-hidden bg-neutral-100" }, /* @__PURE__ */ import_react43.default.createElement(
|
|
2187
2191
|
"img",
|
|
2188
2192
|
{
|
|
2189
2193
|
src: selectedMember.displayImage,
|
|
@@ -2191,7 +2195,7 @@ var UniversalMembersPage = ({
|
|
|
2191
2195
|
className: "w-full h-full object-cover blur-sm transition-all duration-300",
|
|
2192
2196
|
onLoad: (e) => e.currentTarget.classList.remove("blur-sm")
|
|
2193
2197
|
}
|
|
2194
|
-
)) : /* @__PURE__ */
|
|
2198
|
+
)) : /* @__PURE__ */ import_react43.default.createElement("div", { className: `w-16 h-16 shrink-0 rounded-full flex items-center justify-center text-black text-sm ${resolveThemeColor(selectedMember.profileColor)}` }, getInitials(selectedMember.fullName)), /* @__PURE__ */ import_react43.default.createElement("div", null, /* @__PURE__ */ import_react43.default.createElement("h2", { className: " font-serif text-lg text-black" }, selectedMember.fullName), /* @__PURE__ */ import_react43.default.createElement("p", { className: "text-sm text-neutral-500 mt-1" }, selectedMember.email))), /* @__PURE__ */ import_react43.default.createElement("div", { className: "grid grid-cols-2 gap-6 border-t border-neutral-200 pt-8" }, /* @__PURE__ */ import_react43.default.createElement("div", null, /* @__PURE__ */ import_react43.default.createElement("span", { className: "text-[10px] tracking-[0.2em] text-neutral-400 block mb-3" }, "Role"), canChangeRoles && selectedMember.userId !== currentUserId ? /* @__PURE__ */ import_react43.default.createElement(
|
|
2195
2199
|
"button",
|
|
2196
2200
|
{
|
|
2197
2201
|
onClick: () => !isUpdatingRole && setIsRoleModalOpen(true),
|
|
@@ -2199,16 +2203,16 @@ var UniversalMembersPage = ({
|
|
|
2199
2203
|
className: `flex items-center gap-3 text-xs text-black pl-4 pr-3 py-2 border rounded-full transition-colors disabled:opacity-50 outline-none ${isRoleModalOpen ? "bg-neutral-50 border-neutral-300" : "bg-white border-neutral-200 hover:bg-neutral-50"}`
|
|
2200
2204
|
},
|
|
2201
2205
|
selectedMember.role,
|
|
2202
|
-
isUpdatingRole ? /* @__PURE__ */
|
|
2203
|
-
) : /* @__PURE__ */
|
|
2206
|
+
isUpdatingRole ? /* @__PURE__ */ import_react43.default.createElement(ButtonSpinner3, null) : /* @__PURE__ */ import_react43.default.createElement(import_react44.HugeiconsIcon, { icon: import_core_free_icons12.ArrowDown01Icon, size: 14, className: "text-neutral-400" })
|
|
2207
|
+
) : /* @__PURE__ */ import_react43.default.createElement("span", { className: "text-xs text-black bg-neutral-50 px-4 py-2 rounded-full inline-block" }, selectedMember.role)), /* @__PURE__ */ import_react43.default.createElement("div", null, /* @__PURE__ */ import_react43.default.createElement("span", { className: "text-[10px] tracking-[0.2em] text-neutral-400 block mb-3" }, "Joined Date"), /* @__PURE__ */ import_react43.default.createElement("span", { className: "text-sm text-black" }, new Date(selectedMember.joinedAt).toLocaleDateString()))), canManage && selectedMember.userId !== currentUserId && /* @__PURE__ */ import_react43.default.createElement("div", { className: "pt-8 mt-2 border-t border-neutral-200" }, /* @__PURE__ */ import_react43.default.createElement(
|
|
2204
2208
|
"button",
|
|
2205
2209
|
{
|
|
2206
2210
|
onClick: () => setMemberToDelete(selectedMember),
|
|
2207
2211
|
className: "flex items-center gap-2 text-[11px] tracking-widest text-red-600 hover:text-red-700 transition-colors w-fit outline-none"
|
|
2208
2212
|
},
|
|
2209
|
-
/* @__PURE__ */
|
|
2213
|
+
/* @__PURE__ */ import_react43.default.createElement(import_react44.HugeiconsIcon, { icon: import_core_free_icons12.Delete01Icon, size: 14 }),
|
|
2210
2214
|
" Remove Member"
|
|
2211
|
-
)))), currentView === "invite" && canManage && /* @__PURE__ */
|
|
2215
|
+
)))), currentView === "invite" && canManage && /* @__PURE__ */ import_react43.default.createElement("div", { className: "w-full max-w-2xl text-left" }, /* @__PURE__ */ import_react43.default.createElement("form", { onSubmit: handleInvite, className: "space-y-8", autoComplete: "off" }, /* @__PURE__ */ import_react43.default.createElement(
|
|
2212
2216
|
TextInput,
|
|
2213
2217
|
{
|
|
2214
2218
|
label: "Email Address",
|
|
@@ -2217,7 +2221,7 @@ var UniversalMembersPage = ({
|
|
|
2217
2221
|
disabled: isInviting,
|
|
2218
2222
|
placeholder: "developer@acme.com"
|
|
2219
2223
|
}
|
|
2220
|
-
), requireNamesForInvite && /* @__PURE__ */
|
|
2224
|
+
), requireNamesForInvite && /* @__PURE__ */ import_react43.default.createElement("div", { className: "flex flex-col sm:flex-row gap-6" }, /* @__PURE__ */ import_react43.default.createElement(
|
|
2221
2225
|
TextInput,
|
|
2222
2226
|
{
|
|
2223
2227
|
label: "First Name",
|
|
@@ -2226,7 +2230,7 @@ var UniversalMembersPage = ({
|
|
|
2226
2230
|
disabled: isInviting,
|
|
2227
2231
|
placeholder: "Jane"
|
|
2228
2232
|
}
|
|
2229
|
-
), /* @__PURE__ */
|
|
2233
|
+
), /* @__PURE__ */ import_react43.default.createElement(
|
|
2230
2234
|
TextInput,
|
|
2231
2235
|
{
|
|
2232
2236
|
label: "Last Name",
|
|
@@ -2235,7 +2239,7 @@ var UniversalMembersPage = ({
|
|
|
2235
2239
|
disabled: isInviting,
|
|
2236
2240
|
placeholder: "Doe"
|
|
2237
2241
|
}
|
|
2238
|
-
)), /* @__PURE__ */
|
|
2242
|
+
)), /* @__PURE__ */ import_react43.default.createElement("div", { className: "pt-8 mt-2" }, /* @__PURE__ */ import_react43.default.createElement(
|
|
2239
2243
|
ThreeDActionButton,
|
|
2240
2244
|
{
|
|
2241
2245
|
type: "submit",
|
|
@@ -2244,7 +2248,7 @@ var UniversalMembersPage = ({
|
|
|
2244
2248
|
className: "min-w-40"
|
|
2245
2249
|
},
|
|
2246
2250
|
"Send Invitation"
|
|
2247
|
-
)))), isRoleModalOpen && canChangeRoles && /* @__PURE__ */
|
|
2251
|
+
)))), isRoleModalOpen && canChangeRoles && /* @__PURE__ */ import_react43.default.createElement("div", { className: "fixed inset-0 z-110 flex items-center justify-center p-4" }, /* @__PURE__ */ import_react43.default.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => !isUpdatingRole && setIsRoleModalOpen(false) }), /* @__PURE__ */ import_react43.default.createElement("div", { ref: dropdownRef, 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_react43.default.createElement("div", { className: "p-6 text-center w-full" }, /* @__PURE__ */ import_react43.default.createElement("h3", { className: " font-serif text-[14px] text-black tracking-tight" }, "Update Role")), /* @__PURE__ */ import_react43.default.createElement("div", { className: "w-full flex flex-col pl-2 pr-2" }, availableRoles.map((roleOption) => /* @__PURE__ */ import_react43.default.createElement(
|
|
2248
2252
|
"button",
|
|
2249
2253
|
{
|
|
2250
2254
|
key: roleOption,
|
|
@@ -2252,9 +2256,9 @@ var UniversalMembersPage = ({
|
|
|
2252
2256
|
disabled: isUpdatingRole,
|
|
2253
2257
|
className: `text-left px-4 py-3 text-[12px] tracking-wide transition-colors rounded-full flex items-center justify-between outline-none ${selectedMember?.role === roleOption ? "bg-neutral-100 text-black" : "text-neutral-500 hover:bg-neutral-50 hover:text-black"}`
|
|
2254
2258
|
},
|
|
2255
|
-
/* @__PURE__ */
|
|
2256
|
-
selectedMember?.role === roleOption && /* @__PURE__ */
|
|
2257
|
-
))), /* @__PURE__ */
|
|
2259
|
+
/* @__PURE__ */ import_react43.default.createElement("span", { className: "truncate pr-2" }, roleOption),
|
|
2260
|
+
selectedMember?.role === roleOption && /* @__PURE__ */ import_react43.default.createElement("div", null)
|
|
2261
|
+
))), /* @__PURE__ */ import_react43.default.createElement("div", { className: "w-full flex" }, /* @__PURE__ */ import_react43.default.createElement(
|
|
2258
2262
|
"button",
|
|
2259
2263
|
{
|
|
2260
2264
|
onClick: () => setIsRoleModalOpen(false),
|
|
@@ -2262,12 +2266,14 @@ var UniversalMembersPage = ({
|
|
|
2262
2266
|
className: "w-full py-2.5 text-[13px] text-neutral-600 hover:bg-neutral-50 transition-colors disabled:opacity-50 outline-none"
|
|
2263
2267
|
},
|
|
2264
2268
|
"Cancel"
|
|
2265
|
-
)))), memberToDelete && canManage && /* @__PURE__ */
|
|
2269
|
+
)))), memberToDelete && canManage && /* @__PURE__ */ import_react43.default.createElement("div", { className: "fixed inset-0 z-110 flex items-center justify-center p-4" }, /* @__PURE__ */ import_react43.default.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => !isDeleting && setMemberToDelete(null) }), /* @__PURE__ */ import_react43.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_react43.default.createElement("div", { className: "p-6 text-center w-full" }, /* @__PURE__ */ import_react43.default.createElement("h3", { className: " font-serif text-[17px] text-black tracking-tight mb-1" }, "Remove Member"), /* @__PURE__ */ import_react43.default.createElement("p", { className: "text-[12px] text-neutral-500 leading-snug mt-2" }, "Are you sure you want to remove this member? They will lose access instantly.")), /* @__PURE__ */ import_react43.default.createElement("div", { className: "w-full flex" }, /* @__PURE__ */ import_react43.default.createElement("button", { onClick: () => setMemberToDelete(null), disabled: isDeleting, className: "flex-1 py-2 text-[13px] text-neutral-600 hover:bg-neutral-50 transition-colors disabled:opacity-50 outline-none" }, "Cancel"), /* @__PURE__ */ import_react43.default.createElement("button", { onClick: handleDelete, disabled: isDeleting, className: "flex-1 py-2 text-[13px] text-red-600 hover:bg-neutral-50 transition-colors disabled:opacity-50 flex justify-center outline-none" }, isDeleting ? /* @__PURE__ */ import_react43.default.createElement(ButtonSpinner3, null) : "Remove")))));
|
|
2266
2270
|
};
|
|
2267
2271
|
|
|
2268
2272
|
// src/components/UniversalProfileSettings.tsx
|
|
2269
|
-
var
|
|
2273
|
+
var import_react45 = __toESM(require("react"));
|
|
2270
2274
|
var import_react_hot_toast6 = __toESM(require("react-hot-toast"));
|
|
2275
|
+
var import_react46 = require("@hugeicons/react");
|
|
2276
|
+
var import_core_free_icons13 = require("@hugeicons/core-free-icons");
|
|
2271
2277
|
var UniversalProfileSettings = ({
|
|
2272
2278
|
initialFirstName,
|
|
2273
2279
|
initialLastName,
|
|
@@ -2277,10 +2283,10 @@ var UniversalProfileSettings = ({
|
|
|
2277
2283
|
isReadOnly = false,
|
|
2278
2284
|
onSaveProfile
|
|
2279
2285
|
}) => {
|
|
2280
|
-
const [firstName, setFirstName] = (0,
|
|
2281
|
-
const [lastName, setLastName] = (0,
|
|
2282
|
-
const [isSubmitting, setIsSubmitting] = (0,
|
|
2283
|
-
(0,
|
|
2286
|
+
const [firstName, setFirstName] = (0, import_react45.useState)(initialFirstName);
|
|
2287
|
+
const [lastName, setLastName] = (0, import_react45.useState)(initialLastName);
|
|
2288
|
+
const [isSubmitting, setIsSubmitting] = (0, import_react45.useState)(false);
|
|
2289
|
+
(0, import_react45.useEffect)(() => {
|
|
2284
2290
|
setFirstName(initialFirstName || "");
|
|
2285
2291
|
setLastName(initialLastName || "");
|
|
2286
2292
|
}, [initialFirstName, initialLastName]);
|
|
@@ -2310,7 +2316,7 @@ var UniversalProfileSettings = ({
|
|
|
2310
2316
|
};
|
|
2311
2317
|
const hasChanges = firstName !== initialFirstName || lastName !== initialLastName;
|
|
2312
2318
|
const isSaveDisabled = isSubmitting || isReadOnly || !hasChanges || firstName.trim().length === 0 || lastName.trim().length === 0;
|
|
2313
|
-
return /* @__PURE__ */
|
|
2319
|
+
return /* @__PURE__ */ import_react45.default.createElement("div", { className: "flex flex-col max-w-3xl rounded-2xl p-6 bg-white gap-8 animate-in fade-in duration-300 " }, /* @__PURE__ */ import_react45.default.createElement(ManagedToaster, null), /* @__PURE__ */ import_react45.default.createElement("div", { className: "flex flex-col sm:flex-row sm:items-start justify-between gap-3 sm:gap-4" }, /* @__PURE__ */ import_react45.default.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ import_react45.default.createElement("h1", { className: " font-serif text-xl text-black mb-1 truncate tracking-tight" }, "Personal Settings"), /* @__PURE__ */ import_react45.default.createElement("p", { className: "text-xs text-neutral-500 truncate" }, "Manage your personal account profile.")), isReadOnly && /* @__PURE__ */ import_react45.default.createElement("span", { className: "p-2 w-9 h-9 bg-neutral-50 text-neutral-500 rounded-full " }, /* @__PURE__ */ import_react45.default.createElement(import_react46.HugeiconsIcon, { icon: import_core_free_icons13.LockKeyIcon, size: 18, className: "text-current" }))), /* @__PURE__ */ import_react45.default.createElement("div", { className: "w-full max-w-2xl" }, /* @__PURE__ */ import_react45.default.createElement("form", { className: "flex flex-col gap-8", onSubmit: handleSave, autoComplete: "off" }, /* @__PURE__ */ import_react45.default.createElement("div", { className: "flex flex-col sm:flex-row gap-6" }, /* @__PURE__ */ import_react45.default.createElement("div", { className: "flex-1 min-w-0" }, /* @__PURE__ */ import_react45.default.createElement(
|
|
2314
2320
|
TextInput,
|
|
2315
2321
|
{
|
|
2316
2322
|
label: "First Name",
|
|
@@ -2319,7 +2325,7 @@ var UniversalProfileSettings = ({
|
|
|
2319
2325
|
disabled: isReadOnly || isSubmitting,
|
|
2320
2326
|
placeholder: "System"
|
|
2321
2327
|
}
|
|
2322
|
-
)), /* @__PURE__ */
|
|
2328
|
+
)), /* @__PURE__ */ import_react45.default.createElement("div", { className: "flex-1 min-w-0" }, /* @__PURE__ */ import_react45.default.createElement(
|
|
2323
2329
|
TextInput,
|
|
2324
2330
|
{
|
|
2325
2331
|
label: "Last Name",
|
|
@@ -2328,7 +2334,7 @@ var UniversalProfileSettings = ({
|
|
|
2328
2334
|
disabled: isReadOnly || isSubmitting,
|
|
2329
2335
|
placeholder: "Admin"
|
|
2330
2336
|
}
|
|
2331
|
-
))), /* @__PURE__ */
|
|
2337
|
+
))), /* @__PURE__ */ import_react45.default.createElement("div", { className: "space-y-2 min-w-0" }, /* @__PURE__ */ import_react45.default.createElement(
|
|
2332
2338
|
TextInput,
|
|
2333
2339
|
{
|
|
2334
2340
|
label: "Email ID",
|
|
@@ -2337,7 +2343,7 @@ var UniversalProfileSettings = ({
|
|
|
2337
2343
|
},
|
|
2338
2344
|
disabled: true
|
|
2339
2345
|
}
|
|
2340
|
-
), /* @__PURE__ */
|
|
2346
|
+
), /* @__PURE__ */ import_react45.default.createElement("p", { className: "text-[10px] text-neutral-400 mt-1 truncate" }, "To change your email address, please contact support.")), /* @__PURE__ */ import_react45.default.createElement("div", { className: "flex flex-col sm:flex-row sm:items-center justify-between pt-8 mt-2 gap-6 sm:gap-4 border-t border-neutral-200" }, /* @__PURE__ */ import_react45.default.createElement("div", { className: "flex items-center gap-6 min-w-0" }, /* @__PURE__ */ import_react45.default.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ import_react45.default.createElement("span", { className: "text-[10px] text-neutral-400 tracking-[0.2em] block truncate uppercase" }, "Account Status"), /* @__PURE__ */ import_react45.default.createElement("span", { className: "text-xs text-black block truncate" }, accountStatus)), /* @__PURE__ */ import_react45.default.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ import_react45.default.createElement("span", { className: "text-[10px] text-neutral-400 tracking-[0.2em] block truncate uppercase" }, "Member Since"), /* @__PURE__ */ import_react45.default.createElement("span", { className: "text-xs text-black block truncate" }, memberSince ? new Date(memberSince).toLocaleDateString("en-US", { month: "long", day: "numeric", year: "numeric" }) : "N/A"))), /* @__PURE__ */ import_react45.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" }, hasChanges && !isSubmitting && !isReadOnly && /* @__PURE__ */ import_react45.default.createElement(
|
|
2341
2347
|
"button",
|
|
2342
2348
|
{
|
|
2343
2349
|
type: "button",
|
|
@@ -2348,7 +2354,7 @@ var UniversalProfileSettings = ({
|
|
|
2348
2354
|
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"
|
|
2349
2355
|
},
|
|
2350
2356
|
"Cancel"
|
|
2351
|
-
), /* @__PURE__ */
|
|
2357
|
+
), /* @__PURE__ */ import_react45.default.createElement(
|
|
2352
2358
|
ThreeDActionButton,
|
|
2353
2359
|
{
|
|
2354
2360
|
type: "submit",
|
|
@@ -2361,11 +2367,11 @@ var UniversalProfileSettings = ({
|
|
|
2361
2367
|
};
|
|
2362
2368
|
|
|
2363
2369
|
// src/components/UniversalBillingPage.tsx
|
|
2364
|
-
var
|
|
2365
|
-
var
|
|
2366
|
-
var
|
|
2367
|
-
var PageSpinner3 = () => /* @__PURE__ */
|
|
2368
|
-
var ButtonSpinner4 = () => /* @__PURE__ */
|
|
2370
|
+
var import_react47 = __toESM(require("react"));
|
|
2371
|
+
var import_react48 = require("@hugeicons/react");
|
|
2372
|
+
var import_core_free_icons14 = require("@hugeicons/core-free-icons");
|
|
2373
|
+
var PageSpinner3 = () => /* @__PURE__ */ import_react47.default.createElement("div", { className: "flex justify-center items-center py-12" }, /* @__PURE__ */ import_react47.default.createElement(import_react48.HugeiconsIcon, { icon: import_core_free_icons14.Loading03Icon, size: 32, className: "animate-spin mb-4 text-neutral-400" }));
|
|
2374
|
+
var ButtonSpinner4 = () => /* @__PURE__ */ import_react47.default.createElement(import_react48.HugeiconsIcon, { icon: import_core_free_icons14.Loading03Icon, size: 16, className: "animate-spin text-neutral-500" });
|
|
2369
2375
|
var formatDate = (dateString) => {
|
|
2370
2376
|
if (!dateString) return "N/A";
|
|
2371
2377
|
return new Date(dateString).toLocaleDateString("en-US", {
|
|
@@ -2407,13 +2413,13 @@ var UniversalBillingPage = ({
|
|
|
2407
2413
|
onPayInvoice,
|
|
2408
2414
|
onUpdateInvoiceStatus
|
|
2409
2415
|
}) => {
|
|
2410
|
-
const [currentView, setCurrentView] = (0,
|
|
2411
|
-
const [selectedInvoice, setSelectedInvoice] = (0,
|
|
2412
|
-
const [isTimeframeModalOpen, setIsTimeframeModalOpen] = (0,
|
|
2413
|
-
const [isPaying, setIsPaying] = (0,
|
|
2414
|
-
const [isActionModalOpen, setIsActionModalOpen] = (0,
|
|
2415
|
-
const [isUpdating, setIsUpdating] = (0,
|
|
2416
|
-
const [twoFactorCode, setTwoFactorCode] = (0,
|
|
2416
|
+
const [currentView, setCurrentView] = (0, import_react47.useState)("list");
|
|
2417
|
+
const [selectedInvoice, setSelectedInvoice] = (0, import_react47.useState)(null);
|
|
2418
|
+
const [isTimeframeModalOpen, setIsTimeframeModalOpen] = (0, import_react47.useState)(false);
|
|
2419
|
+
const [isPaying, setIsPaying] = (0, import_react47.useState)(false);
|
|
2420
|
+
const [isActionModalOpen, setIsActionModalOpen] = (0, import_react47.useState)(false);
|
|
2421
|
+
const [isUpdating, setIsUpdating] = (0, import_react47.useState)(false);
|
|
2422
|
+
const [twoFactorCode, setTwoFactorCode] = (0, import_react47.useState)("");
|
|
2417
2423
|
const handlePayment = async () => {
|
|
2418
2424
|
if (!selectedInvoice || isReadOnly || !onPayInvoice || isPaying) return;
|
|
2419
2425
|
setIsPaying(true);
|
|
@@ -2440,14 +2446,14 @@ var UniversalBillingPage = ({
|
|
|
2440
2446
|
setIsUpdating(false);
|
|
2441
2447
|
}
|
|
2442
2448
|
};
|
|
2443
|
-
return /* @__PURE__ */
|
|
2449
|
+
return /* @__PURE__ */ import_react47.default.createElement("div", { className: "flex max-w-3xl rounded-2xl bg-white p-6 flex-col gap-8 animate-in fade-in duration-300 " }, /* @__PURE__ */ import_react47.default.createElement(ManagedToaster, null), /* @__PURE__ */ import_react47.default.createElement("div", { className: "flex flex-col sm:flex-row sm:items-start justify-between gap-3 sm:gap-4" }, currentView === "list" ? /* @__PURE__ */ import_react47.default.createElement("div", { className: "min-w-0 w-full" }, /* @__PURE__ */ import_react47.default.createElement("h1", { className: " font-serif text-xl text-black mb-1 truncate tracking-tight" }, headerTitle), /* @__PURE__ */ import_react47.default.createElement("p", { className: "text-xs text-neutral-500 truncate mb-6" }, headerDescription), showSearchAndFilter && onSearchChange && onTimeframeChange && /* @__PURE__ */ import_react47.default.createElement("div", { className: "flex flex-col sm:flex-row gap-4 mb-4" }, /* @__PURE__ */ import_react47.default.createElement(
|
|
2444
2450
|
TextInput,
|
|
2445
2451
|
{
|
|
2446
2452
|
placeholder: "Search by ID or Name...",
|
|
2447
2453
|
value: searchQuery,
|
|
2448
2454
|
onChange: onSearchChange
|
|
2449
2455
|
}
|
|
2450
|
-
), /* @__PURE__ */
|
|
2456
|
+
), /* @__PURE__ */ import_react47.default.createElement(
|
|
2451
2457
|
"button",
|
|
2452
2458
|
{
|
|
2453
2459
|
type: "button",
|
|
@@ -2455,10 +2461,10 @@ var UniversalBillingPage = ({
|
|
|
2455
2461
|
className: "px-4 py-3 text-sm bg-transparent border-b border-neutral-200 text-black outline-none focus:border-black shrink-0 text-left"
|
|
2456
2462
|
},
|
|
2457
2463
|
timeframe === "ALL" ? "All Time" : timeframe === "24H" ? "Past 24 Hours" : timeframe === "7D" ? "Past 7 Days" : "Past 30 Days"
|
|
2458
|
-
))) : /* @__PURE__ */
|
|
2464
|
+
))) : /* @__PURE__ */ import_react47.default.createElement("div", { className: "flex flex-col items-start gap-3" }, /* @__PURE__ */ import_react47.default.createElement("button", { onClick: () => setCurrentView("list"), className: "text-[10px] text-neutral-400 hover:text-black tracking-[0.2em] flex items-center gap-1.5 transition-colors outline-none" }, /* @__PURE__ */ import_react47.default.createElement(import_react48.HugeiconsIcon, { icon: import_core_free_icons14.ArrowLeft01Icon, size: 12 }), " Back")), isReadOnly && currentView === "list" && /* @__PURE__ */ import_react47.default.createElement("span", { className: "p-2 w-9 h-9 bg-neutral-50 text-neutral-500 rounded-full " }, /* @__PURE__ */ import_react47.default.createElement(import_react48.HugeiconsIcon, { icon: import_core_free_icons14.LockKeyIcon, size: 18, className: "text-current" }))), currentView === "list" && /* @__PURE__ */ import_react47.default.createElement("div", { className: "w-full max-w-2xl" }, /* @__PURE__ */ import_react47.default.createElement("div", { className: "flex flex-col gap-8 w-full" }, (metricPrimaryLabel || metricSecondaryLabel) && /* @__PURE__ */ import_react47.default.createElement("div", { className: "flex flex-col sm:flex-row sm:justify-between sm:items-start pb-8 border-b border-neutral-200 gap-6 sm:gap-0" }, metricPrimaryLabel && /* @__PURE__ */ import_react47.default.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ import_react47.default.createElement("h3", { className: " font-serif text-[10px] text-neutral-400 tracking-[0.2em] mb-2 truncate block uppercase" }, metricPrimaryLabel), /* @__PURE__ */ import_react47.default.createElement("div", { className: "text-xl text-black tracking-tight truncate" }, formatNaira(metricPrimaryValue)), metricPrimarySubtext && /* @__PURE__ */ import_react47.default.createElement("p", { className: "text-[10px] text-neutral-500 mt-1 tracking-widest uppercase" }, metricPrimarySubtext)), metricSecondaryLabel && /* @__PURE__ */ import_react47.default.createElement("div", { className: "min-w-0 sm:text-right" }, /* @__PURE__ */ import_react47.default.createElement("h3", { className: " font-serif text-[10px] text-neutral-400 tracking-[0.2em] mb-2 truncate block uppercase" }, metricSecondaryLabel), /* @__PURE__ */ import_react47.default.createElement("div", { className: "text-xl text-emerald-600 tracking-tight truncate" }, formatNaira(metricSecondaryValue)), metricSecondarySubtext && /* @__PURE__ */ import_react47.default.createElement("p", { className: "text-[10px] text-neutral-500 mt-1 tracking-widest uppercase" }, metricSecondarySubtext))), !isReadOnly && showBillingOverview && /* @__PURE__ */ import_react47.default.createElement("div", { className: "grid grid-cols-1 sm:grid-cols-3 gap-8 sm:gap-4" }, /* @__PURE__ */ import_react47.default.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ import_react47.default.createElement("h3", { className: " font-serif text-[10px] text-neutral-400 tracking-[0.2em] mb-3 truncate block uppercase" }, "Billing Status"), /* @__PURE__ */ import_react47.default.createElement("div", { className: "flex items-center gap-2 min-w-0" }, /* @__PURE__ */ import_react47.default.createElement("div", { className: `w-2 h-2 rounded-full shrink-0 ${billingStatus === "ACTIVE" ? "bg-green-500" : "bg-neutral-300"}` }), /* @__PURE__ */ import_react47.default.createElement("p", { className: "text-xs text-black tracking-widest truncate" }, billingStatus || "UNKNOWN"))), /* @__PURE__ */ import_react47.default.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ import_react47.default.createElement("h3", { className: " font-serif text-[10px] text-neutral-400 tracking-[0.2em] mb-3 truncate block uppercase" }, "Next Billing Date"), /* @__PURE__ */ import_react47.default.createElement("p", { className: "text-sm text-black truncate" }, formatDate(nextBillingDate))), lastPaidDate && /* @__PURE__ */ import_react47.default.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ import_react47.default.createElement("h3", { className: " font-serif text-[10px] text-neutral-400 tracking-[0.2em] mb-3 truncate block uppercase" }, "Last Paid Date"), /* @__PURE__ */ import_react47.default.createElement("p", { className: "text-sm text-neutral-600 truncate" }, formatDate(lastPaidDate)))), !isReadOnly && showUsageMetrics && usageMetrics.length > 0 && /* @__PURE__ */ import_react47.default.createElement("div", { className: "pt-8 border-t border-neutral-200" }, /* @__PURE__ */ import_react47.default.createElement("h3", { className: " font-serif text-[10px] text-neutral-400 tracking-[0.2em] mb-6 truncate block uppercase" }, "Usage & Limits"), /* @__PURE__ */ import_react47.default.createElement("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-x-8 gap-y-4 text-sm text-black" }, usageMetrics.map((metric, idx) => /* @__PURE__ */ import_react47.default.createElement("div", { key: idx, className: "flex justify-between border-b border-neutral-50 pb-2" }, /* @__PURE__ */ import_react47.default.createElement("span", { className: "text-neutral-500 text-xs" }, metric.label), /* @__PURE__ */ import_react47.default.createElement("span", { className: "text-xs text-black" }, metric.value))))), /* @__PURE__ */ import_react47.default.createElement("div", { className: "pt-8 border-t border-neutral-200" }, /* @__PURE__ */ import_react47.default.createElement("h3", { className: " font-serif text-[10px] text-neutral-400 tracking-[0.2em] mb-4 truncate block uppercase" }, "Transaction History"), isLoading ? /* @__PURE__ */ import_react47.default.createElement(PageSpinner3, null) : invoices.length === 0 ? /* @__PURE__ */ import_react47.default.createElement(import_react47.default.Fragment, null, /* @__PURE__ */ import_react47.default.createElement("p", { className: "text-xs text-neutral-500 py-4" }, "No records found.")) : /* @__PURE__ */ import_react47.default.createElement("div", { className: "flex flex-col min-w-0" }, /* @__PURE__ */ import_react47.default.createElement("div", { className: "divide-y divide-neutral-100" }, invoices.map((inv) => /* @__PURE__ */ import_react47.default.createElement("div", { key: inv.id, onClick: () => {
|
|
2459
2465
|
setSelectedInvoice(inv);
|
|
2460
2466
|
setCurrentView("details");
|
|
2461
|
-
}, className: "flex items-center justify-between py-4 hover:bg-neutral-50/50 cursor-pointer group min-w-0 px-2 transition-colors" }, /* @__PURE__ */
|
|
2467
|
+
}, className: "flex items-center justify-between py-4 hover:bg-neutral-50/50 cursor-pointer group min-w-0 px-2 transition-colors" }, /* @__PURE__ */ import_react47.default.createElement("div", { className: "flex flex-col gap-1 min-w-0 flex-1" }, /* @__PURE__ */ import_react47.default.createElement("p", { className: "text-sm text-black truncate pr-4" }, inv.name), /* @__PURE__ */ import_react47.default.createElement("p", { className: "text-xs text-neutral-500 truncate" }, inv.subtext)), /* @__PURE__ */ import_react47.default.createElement("div", { className: "flex flex-col items-end gap-1 shrink-0 pl-4" }, /* @__PURE__ */ import_react47.default.createElement("p", { className: "text-sm text-black" }, formatNaira(inv.amountDue)), /* @__PURE__ */ import_react47.default.createElement("span", { className: `text-[9px] tracking-widest px-2 py-0.5 rounded-full ${inv.status === "PAID" ? "bg-emerald-50 text-emerald-600" : "bg-neutral-50 text-neutral-600"}` }, inv.status))))), totalPages > 1 && /* @__PURE__ */ import_react47.default.createElement("div", { className: "flex items-center justify-between pt-4 mt-2" }, /* @__PURE__ */ import_react47.default.createElement("span", { className: "text-[10px] text-neutral-400 tracking-[0.2em]" }, "Page ", currentPage, " of ", totalPages), /* @__PURE__ */ import_react47.default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ import_react47.default.createElement("button", { onClick: () => onPageChange(currentPage - 1), disabled: currentPage === 1 || isLoading, className: "p-2 border border-neutral-200 rounded-full bg-white text-neutral-500 hover:text-black outline-none disabled:opacity-30" }, /* @__PURE__ */ import_react47.default.createElement(import_react48.HugeiconsIcon, { icon: import_core_free_icons14.ArrowLeft01Icon, size: 14 })), /* @__PURE__ */ import_react47.default.createElement("button", { onClick: () => onPageChange(currentPage + 1), disabled: currentPage >= totalPages || isLoading, className: "p-2 border border-neutral-200 rounded-full bg-white text-neutral-500 hover:text-black outline-none disabled:opacity-30" }, /* @__PURE__ */ import_react47.default.createElement(import_react48.HugeiconsIcon, { icon: import_core_free_icons14.ArrowRight01Icon, size: 14 })))))))), currentView === "details" && selectedInvoice && /* @__PURE__ */ import_react47.default.createElement("div", { className: "w-full max-w-2xl animate-in fade-in duration-300" }, /* @__PURE__ */ import_react47.default.createElement("div", { className: "flex flex-col gap-6 w-full" }, /* @__PURE__ */ import_react47.default.createElement("div", null, /* @__PURE__ */ import_react47.default.createElement("span", { className: "text-[10px] tracking-[0.2em] text-neutral-400 block mb-1 uppercase" }, "Breakdown"), /* @__PURE__ */ import_react47.default.createElement("h2", { className: " font-serif text-xl text-black mb-1" }, selectedInvoice.name), /* @__PURE__ */ import_react47.default.createElement("p", { className: "text-xs text-neutral-500" }, "Generated on ", formatDate(selectedInvoice.createdAt))), /* @__PURE__ */ import_react47.default.createElement("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6 p-6 sm:p-8 rounded-2xl border border-neutral-200" }, /* @__PURE__ */ import_react47.default.createElement("div", null, /* @__PURE__ */ import_react47.default.createElement("span", { className: "text-[10px] tracking-[0.2em] text-neutral-400 block mb-1 uppercase" }, "Amount"), /* @__PURE__ */ import_react47.default.createElement("p", { className: "text-xl text-black" }, formatNaira(selectedInvoice.amountDue))), /* @__PURE__ */ import_react47.default.createElement("div", null, /* @__PURE__ */ import_react47.default.createElement("span", { className: "text-[10px] tracking-[0.2em] text-neutral-400 block mb-1 uppercase" }, "Status"), isModMode ? /* @__PURE__ */ import_react47.default.createElement(
|
|
2462
2468
|
"button",
|
|
2463
2469
|
{
|
|
2464
2470
|
onClick: () => !isUpdating && setIsActionModalOpen(true),
|
|
@@ -2466,8 +2472,8 @@ var UniversalBillingPage = ({
|
|
|
2466
2472
|
className: `flex items-center gap-3 text-xs text-black px-3 py-1.5 mt-1 border rounded-full transition-colors disabled:opacity-50 outline-none ${isActionModalOpen ? "bg-neutral-50 border-neutral-300" : "bg-white border-neutral-200 hover:bg-neutral-50"}`
|
|
2467
2473
|
},
|
|
2468
2474
|
selectedInvoice.status,
|
|
2469
|
-
isUpdating ? /* @__PURE__ */
|
|
2470
|
-
) : /* @__PURE__ */
|
|
2475
|
+
isUpdating ? /* @__PURE__ */ import_react47.default.createElement(ButtonSpinner4, null) : /* @__PURE__ */ import_react47.default.createElement(import_react48.HugeiconsIcon, { icon: import_core_free_icons14.ArrowDown01Icon, size: 14, className: "text-neutral-400" })
|
|
2476
|
+
) : /* @__PURE__ */ import_react47.default.createElement("span", { className: `text-[10px] 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_react47.default.createElement("div", { className: "md:col-span-2 pt-4 border-t border-neutral-200/60 mt-2" }, /* @__PURE__ */ import_react47.default.createElement("span", { className: "text-[10px] tracking-[0.2em] text-neutral-400 block mb-1 uppercase" }, "Reference ID"), /* @__PURE__ */ import_react47.default.createElement("p", { className: "text-xs text-neutral-500 bg-white px-3 py-2 rounded-full border border-neutral-200 inline-block" }, selectedInvoice.id))), /* @__PURE__ */ import_react47.default.createElement("div", { className: "flex flex-col sm:flex-row sm:items-center justify-end gap-4 pt-4" }, !isModMode && selectedInvoice.status === "SCHEDULED" && onPayInvoice && /* @__PURE__ */ import_react47.default.createElement("div", { className: "flex flex-col items-end gap-2 w-full sm:w-auto" }, /* @__PURE__ */ import_react47.default.createElement(
|
|
2471
2477
|
ThreeDActionButton,
|
|
2472
2478
|
{
|
|
2473
2479
|
onClick: handlePayment,
|
|
@@ -2476,12 +2482,12 @@ var UniversalBillingPage = ({
|
|
|
2476
2482
|
className: "w-full sm:w-auto"
|
|
2477
2483
|
},
|
|
2478
2484
|
"Pay Invoice"
|
|
2479
|
-
)), !isModMode && selectedInvoice.status === "PAID" && /* @__PURE__ */
|
|
2485
|
+
)), !isModMode && selectedInvoice.status === "PAID" && /* @__PURE__ */ import_react47.default.createElement("span", { className: "text-[11px] tracking-widest text-emerald-600 px-6 py-3 bg-emerald-50 rounded-full" }, "Invoice Completed")))), isTimeframeModalOpen && showSearchAndFilter && onTimeframeChange && /* @__PURE__ */ import_react47.default.createElement("div", { className: "fixed inset-0 z-110 flex items-center justify-center p-4" }, /* @__PURE__ */ import_react47.default.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setIsTimeframeModalOpen(false) }), /* @__PURE__ */ import_react47.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_react47.default.createElement("div", { className: "p-6 text-center w-full" }, /* @__PURE__ */ import_react47.default.createElement("h3", { className: " font-serif text-[14px] text-black tracking-tight mb-2" }, "Select Timeframe"), /* @__PURE__ */ import_react47.default.createElement("p", { className: "text-[12px] text-neutral-500" }, "Choose the range of transactions to display.")), /* @__PURE__ */ import_react47.default.createElement("div", { className: "w-full flex flex-col pl-2 pr-2" }, [
|
|
2480
2486
|
{ value: "ALL", label: "All Time" },
|
|
2481
2487
|
{ value: "24H", label: "Past 24 Hours" },
|
|
2482
2488
|
{ value: "7D", label: "Past 7 Days" },
|
|
2483
2489
|
{ value: "30D", label: "Past 30 Days" }
|
|
2484
|
-
].map((option) => /* @__PURE__ */
|
|
2490
|
+
].map((option) => /* @__PURE__ */ import_react47.default.createElement(
|
|
2485
2491
|
"button",
|
|
2486
2492
|
{
|
|
2487
2493
|
key: option.value,
|
|
@@ -2492,9 +2498,9 @@ var UniversalBillingPage = ({
|
|
|
2492
2498
|
},
|
|
2493
2499
|
className: `text-left px-4 py-3 text-[12px] tracking-wide transition-colors rounded-full flex items-center justify-between outline-none ${timeframe === option.value ? "bg-neutral-100 text-black" : "text-neutral-500 hover:bg-neutral-50 hover:text-black"}`
|
|
2494
2500
|
},
|
|
2495
|
-
/* @__PURE__ */
|
|
2496
|
-
timeframe === option.value && /* @__PURE__ */
|
|
2497
|
-
))), /* @__PURE__ */
|
|
2501
|
+
/* @__PURE__ */ import_react47.default.createElement("span", { className: "truncate pr-2" }, option.label),
|
|
2502
|
+
timeframe === option.value && /* @__PURE__ */ import_react47.default.createElement("div", null)
|
|
2503
|
+
))), /* @__PURE__ */ import_react47.default.createElement("div", { className: "w-full flex mt-2" }, /* @__PURE__ */ import_react47.default.createElement("button", { onClick: () => setIsTimeframeModalOpen(false), className: "w-full py-2.5 text-[13px] text-neutral-600 hover:bg-neutral-50 transition-colors outline-none" }, "Cancel")))), isActionModalOpen && isModMode && /* @__PURE__ */ import_react47.default.createElement("div", { className: "fixed inset-0 z-110 flex items-center justify-center p-4" }, /* @__PURE__ */ import_react47.default.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => !isUpdating && setIsActionModalOpen(false) }), /* @__PURE__ */ import_react47.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_react47.default.createElement("div", { className: "p-6 text-center w-full" }, /* @__PURE__ */ import_react47.default.createElement("h3", { className: " font-serif text-[14px] text-black tracking-tight mb-2" }, "Update Invoice Status"), /* @__PURE__ */ import_react47.default.createElement(
|
|
2498
2504
|
TextInput,
|
|
2499
2505
|
{
|
|
2500
2506
|
placeholder: "Enter 2FA Code...",
|
|
@@ -2502,7 +2508,7 @@ var UniversalBillingPage = ({
|
|
|
2502
2508
|
onChange: setTwoFactorCode,
|
|
2503
2509
|
type: "password"
|
|
2504
2510
|
}
|
|
2505
|
-
)), /* @__PURE__ */
|
|
2511
|
+
)), /* @__PURE__ */ import_react47.default.createElement("div", { className: "w-full flex flex-col pl-2 pr-2" }, ["SCHEDULED", "PAID", "FAILED", "CANCELED"].map((statusOption) => /* @__PURE__ */ import_react47.default.createElement(
|
|
2506
2512
|
"button",
|
|
2507
2513
|
{
|
|
2508
2514
|
key: statusOption,
|
|
@@ -2510,15 +2516,15 @@ var UniversalBillingPage = ({
|
|
|
2510
2516
|
disabled: isUpdating || !twoFactorCode,
|
|
2511
2517
|
className: `text-left px-4 py-3 text-[12px] tracking-wide transition-colors rounded-full flex items-center justify-between outline-none ${selectedInvoice?.status === statusOption ? "bg-neutral-100 text-black" : "text-neutral-500 hover:bg-neutral-50 hover:text-black"}`
|
|
2512
2518
|
},
|
|
2513
|
-
/* @__PURE__ */
|
|
2514
|
-
selectedInvoice?.status === statusOption && /* @__PURE__ */
|
|
2515
|
-
))), /* @__PURE__ */
|
|
2519
|
+
/* @__PURE__ */ import_react47.default.createElement("span", { className: "truncate pr-2" }, statusOption),
|
|
2520
|
+
selectedInvoice?.status === statusOption && /* @__PURE__ */ import_react47.default.createElement("div", null)
|
|
2521
|
+
))), /* @__PURE__ */ import_react47.default.createElement("div", { className: "w-full flex mt-2" }, /* @__PURE__ */ import_react47.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")))));
|
|
2516
2522
|
};
|
|
2517
2523
|
|
|
2518
2524
|
// src/components/UniversalDashboardPage.tsx
|
|
2519
|
-
var
|
|
2520
|
-
var
|
|
2521
|
-
var
|
|
2525
|
+
var import_react49 = __toESM(require("react"));
|
|
2526
|
+
var import_react50 = require("@hugeicons/react");
|
|
2527
|
+
var import_core_free_icons15 = require("@hugeicons/core-free-icons");
|
|
2522
2528
|
var UniversalDashboardPage = ({
|
|
2523
2529
|
headerTitle,
|
|
2524
2530
|
headerDescription,
|
|
@@ -2529,20 +2535,20 @@ var UniversalDashboardPage = ({
|
|
|
2529
2535
|
lists,
|
|
2530
2536
|
isLoading = false
|
|
2531
2537
|
}) => {
|
|
2532
|
-
const [isTimeframeModalOpen, setIsTimeframeModalOpen] = (0,
|
|
2538
|
+
const [isTimeframeModalOpen, setIsTimeframeModalOpen] = (0, import_react49.useState)(false);
|
|
2533
2539
|
const selectedTimeframe = timeframes.find((t) => t.id === activeTimeframe) || timeframes[0];
|
|
2534
2540
|
if (isLoading) {
|
|
2535
|
-
return /* @__PURE__ */
|
|
2541
|
+
return /* @__PURE__ */ import_react49.default.createElement("div", { className: "flex justify-center items-center py-12" }, /* @__PURE__ */ import_react49.default.createElement(import_react50.HugeiconsIcon, { icon: import_core_free_icons15.Loading03Icon, size: 32, className: "animate-spin mb-4 text-black" }));
|
|
2536
2542
|
}
|
|
2537
|
-
return /* @__PURE__ */
|
|
2543
|
+
return /* @__PURE__ */ import_react49.default.createElement("div", { className: "flex flex-col gap-8 animate-in fade-in duration-300 pb-10" }, /* @__PURE__ */ import_react49.default.createElement(ManagedToaster, null), /* @__PURE__ */ import_react49.default.createElement("div", { className: "flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4" }, /* @__PURE__ */ import_react49.default.createElement("div", null, /* @__PURE__ */ import_react49.default.createElement("h1", { className: " font-serif text-xl text-black mb-1 tracking-tight" }, headerTitle), /* @__PURE__ */ import_react49.default.createElement("p", { className: "text-xs text-neutral-500" }, headerDescription)), timeframes.length > 0 && selectedTimeframe && onTimeframeChange && /* @__PURE__ */ import_react49.default.createElement(
|
|
2538
2544
|
"button",
|
|
2539
2545
|
{
|
|
2540
2546
|
onClick: () => setIsTimeframeModalOpen(true),
|
|
2541
2547
|
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"
|
|
2542
2548
|
},
|
|
2543
|
-
/* @__PURE__ */
|
|
2544
|
-
/* @__PURE__ */
|
|
2545
|
-
)), stats.length > 0 && /* @__PURE__ */
|
|
2549
|
+
/* @__PURE__ */ import_react49.default.createElement("span", null, selectedTimeframe.label),
|
|
2550
|
+
/* @__PURE__ */ import_react49.default.createElement(import_react50.HugeiconsIcon, { icon: import_core_free_icons15.ArrowDown01Icon, size: 14, className: "text-neutral-400" })
|
|
2551
|
+
)), stats.length > 0 && /* @__PURE__ */ import_react49.default.createElement("div", { className: "w-full rounded-2xl overflow-hidden bg-white" }, /* @__PURE__ */ import_react49.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_react49.default.createElement("div", { key: idx, className: "p-6 flex flex-col gap-1 min-w-0" }, /* @__PURE__ */ import_react49.default.createElement("p", { className: "text-[10px] tracking-[0.2em] text-neutral-400 truncate uppercase" }, stat.label), /* @__PURE__ */ import_react49.default.createElement("p", { className: `text-xl tracking-tight truncate ${stat.valueClass || "text-black"}` }, stat.value))))), lists.length > 0 && /* @__PURE__ */ import_react49.default.createElement("div", { className: "flex flex-col gap-8 w-full max-w-4xl" }, lists.map((list, idx) => /* @__PURE__ */ import_react49.default.createElement("div", { key: idx, className: "bg-white rounded-2xl p-6 flex flex-col min-w-0" }, /* @__PURE__ */ import_react49.default.createElement("div", { className: "flex items-center gap-3 mb-6" }, /* @__PURE__ */ import_react49.default.createElement("div", { className: "text-neutral-400" }, list.icon), /* @__PURE__ */ import_react49.default.createElement("h2", { className: " font-serif text-[11px] text-black tracking-[0.2em] uppercase" }, list.title)), /* @__PURE__ */ import_react49.default.createElement("div", { className: "divide-y divide-neutral-100 flex-1 overflow-y-auto" }, list.items.length === 0 ? /* @__PURE__ */ import_react49.default.createElement("p", { className: "text-xs text-neutral-500 py-4" }, list.emptyMessage) : list.items.map((item) => /* @__PURE__ */ import_react49.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_react49.default.createElement("div", { className: "min-w-0 flex-1" }, /* @__PURE__ */ import_react49.default.createElement("p", { className: "text-sm text-black truncate pr-4" }, item.primaryText), /* @__PURE__ */ import_react49.default.createElement("p", { className: "text-[10px] text-neutral-500 truncate tracking-widest mt-0.5" }, item.secondaryText)), /* @__PURE__ */ import_react49.default.createElement("div", { className: "flex items-center gap-4 shrink-0 pl-4" }, item.rightText && /* @__PURE__ */ import_react49.default.createElement("p", { className: "text-xs text-black" }, item.rightText), item.rightBadge && /* @__PURE__ */ import_react49.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_react49.default.createElement("div", { className: "fixed inset-0 z-110 flex items-center justify-center p-4" }, /* @__PURE__ */ import_react49.default.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setIsTimeframeModalOpen(false) }), /* @__PURE__ */ import_react49.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_react49.default.createElement("div", { className: "p-6 text-center w-full" }, /* @__PURE__ */ import_react49.default.createElement("h3", { className: " font-serif text-[14px] text-black tracking-tight" }, "Select Timeframe")), /* @__PURE__ */ import_react49.default.createElement("div", { className: "w-full flex flex-col pl-2 pr-2 pb-2" }, timeframes.map((tf) => /* @__PURE__ */ import_react49.default.createElement(
|
|
2546
2552
|
"button",
|
|
2547
2553
|
{
|
|
2548
2554
|
key: tf.id,
|
|
@@ -2552,9 +2558,9 @@ var UniversalDashboardPage = ({
|
|
|
2552
2558
|
},
|
|
2553
2559
|
className: `text-left px-4 py-3 text-[12px] 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"}`
|
|
2554
2560
|
},
|
|
2555
|
-
/* @__PURE__ */
|
|
2556
|
-
activeTimeframe === tf.id && /* @__PURE__ */
|
|
2557
|
-
))), /* @__PURE__ */
|
|
2561
|
+
/* @__PURE__ */ import_react49.default.createElement("span", { className: "truncate pr-2" }, tf.label),
|
|
2562
|
+
activeTimeframe === tf.id && /* @__PURE__ */ import_react49.default.createElement("div", null)
|
|
2563
|
+
))), /* @__PURE__ */ import_react49.default.createElement("div", { className: "w-full flex border-t border-neutral-50" }, /* @__PURE__ */ import_react49.default.createElement(
|
|
2558
2564
|
"button",
|
|
2559
2565
|
{
|
|
2560
2566
|
onClick: () => setIsTimeframeModalOpen(false),
|
|
@@ -2565,9 +2571,9 @@ var UniversalDashboardPage = ({
|
|
|
2565
2571
|
};
|
|
2566
2572
|
|
|
2567
2573
|
// src/components/UniversalAgentConsole.tsx
|
|
2568
|
-
var
|
|
2569
|
-
var
|
|
2570
|
-
var
|
|
2574
|
+
var import_react51 = __toESM(require("react"));
|
|
2575
|
+
var import_react52 = require("@hugeicons/react");
|
|
2576
|
+
var import_core_free_icons16 = require("@hugeicons/core-free-icons");
|
|
2571
2577
|
var formatKeyName = (key) => key.replace(/([A-Z])/g, " $1").replace(/^./, (str) => str.toUpperCase()).trim();
|
|
2572
2578
|
var toTitleCaseSafe = (str) => {
|
|
2573
2579
|
if (!str) return "";
|
|
@@ -2596,13 +2602,13 @@ var UniversalAgentConsole = ({
|
|
|
2596
2602
|
onUploadArchives,
|
|
2597
2603
|
onDeleteArchive
|
|
2598
2604
|
}) => {
|
|
2599
|
-
const archiveRef = (0,
|
|
2600
|
-
const [pendingFiles, setPendingFiles] = (0,
|
|
2601
|
-
const [isUploading, setIsUploading] = (0,
|
|
2602
|
-
const [isActioning, setIsActioning] = (0,
|
|
2603
|
-
const [actionModal, setActionModal] = (0,
|
|
2604
|
-
const [actionMessage, setActionMessage] = (0,
|
|
2605
|
-
const [archiveToDelete, setArchiveToDelete] = (0,
|
|
2605
|
+
const archiveRef = (0, import_react51.useRef)(null);
|
|
2606
|
+
const [pendingFiles, setPendingFiles] = (0, import_react51.useState)([]);
|
|
2607
|
+
const [isUploading, setIsUploading] = (0, import_react51.useState)(false);
|
|
2608
|
+
const [isActioning, setIsActioning] = (0, import_react51.useState)(false);
|
|
2609
|
+
const [actionModal, setActionModal] = (0, import_react51.useState)(null);
|
|
2610
|
+
const [actionMessage, setActionMessage] = (0, import_react51.useState)("");
|
|
2611
|
+
const [archiveToDelete, setArchiveToDelete] = (0, import_react51.useState)(null);
|
|
2606
2612
|
const handleFileSelect = (e) => {
|
|
2607
2613
|
if (e.target.files && e.target.files.length > 0) {
|
|
2608
2614
|
setPendingFiles((prev) => [...prev, ...Array.from(e.target.files)]);
|
|
@@ -2631,36 +2637,36 @@ var UniversalAgentConsole = ({
|
|
|
2631
2637
|
}
|
|
2632
2638
|
};
|
|
2633
2639
|
const DynamicArrayAccordion = ({ items, parentKey }) => {
|
|
2634
|
-
const [activeFAQ, setActiveFAQ] = (0,
|
|
2635
|
-
return /* @__PURE__ */
|
|
2640
|
+
const [activeFAQ, setActiveFAQ] = (0, import_react51.useState)(null);
|
|
2641
|
+
return /* @__PURE__ */ import_react51.default.createElement("div", { className: "flex flex-col relative z-10 bg-transparent w-full mt-2 border-t border-neutral-200" }, items.map((item, index) => {
|
|
2636
2642
|
const isOpen = activeFAQ === index;
|
|
2637
2643
|
let label = `${parentKey ? formatKeyName(parentKey) : "Item"} ${index + 1}`;
|
|
2638
2644
|
if (item.fullName) label = toTitleCaseSafe(item.fullName);
|
|
2639
2645
|
else if (item.role) label = item.role;
|
|
2640
2646
|
else if (item.proposedName) label = toTitleCaseSafe(item.proposedName);
|
|
2641
|
-
return /* @__PURE__ */
|
|
2647
|
+
return /* @__PURE__ */ import_react51.default.createElement("div", { key: index, className: `transition-all duration-300 ${index !== items.length - 1 ? "border-b border-neutral-200" : ""}` }, /* @__PURE__ */ import_react51.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_react51.default.createElement("span", { className: `text-[13px] md:text-[14px] transition-colors ${isOpen ? "text-black" : "text-neutral-700 group-hover:text-black"}` }, label), /* @__PURE__ */ import_react51.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_react51.default.createElement(import_react52.HugeiconsIcon, { icon: import_core_free_icons16.ArrowDown01Icon, size: 16 }))), /* @__PURE__ */ import_react51.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_react51.default.createElement("div", { className: "overflow-hidden" }, /* @__PURE__ */ import_react51.default.createElement("div", { className: "pt-2 flex flex-col gap-3 pr-4 md:pr-12" }, renderDynamicObject(item)))));
|
|
2642
2648
|
}));
|
|
2643
2649
|
};
|
|
2644
2650
|
const renderValue = (key, value) => {
|
|
2645
2651
|
if (value === null || value === void 0 || value === "") return null;
|
|
2646
2652
|
if (typeof value === "string") {
|
|
2647
|
-
if (value.startsWith("http") || value.startsWith("data:image")) return /* @__PURE__ */
|
|
2648
|
-
if (key.toLowerCase().includes("name") && !value.includes("@")) return /* @__PURE__ */
|
|
2649
|
-
return /* @__PURE__ */
|
|
2653
|
+
if (value.startsWith("http") || value.startsWith("data:image")) return /* @__PURE__ */ import_react51.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-200 text-black text-[11px] tracking-widest rounded-full hover:bg-neutral-50 transition-colors w-fit outline-none mt-2" }, /* @__PURE__ */ import_react51.default.createElement(import_react52.HugeiconsIcon, { icon: import_core_free_icons16.Download01Icon, size: 14 }), " Download File");
|
|
2654
|
+
if (key.toLowerCase().includes("name") && !value.includes("@")) return /* @__PURE__ */ import_react51.default.createElement("p", { className: "text-[12px] md:text-[13px] leading-[1.8] text-neutral-600" }, toTitleCaseSafe(value));
|
|
2655
|
+
return /* @__PURE__ */ import_react51.default.createElement("p", { className: "text-[12px] md:text-[13px] leading-[1.8] text-neutral-600" }, value);
|
|
2650
2656
|
}
|
|
2651
2657
|
if (Array.isArray(value)) {
|
|
2652
2658
|
const validItems = value.filter((item) => item !== null && item !== void 0 && item !== "");
|
|
2653
2659
|
if (validItems.length === 0) return null;
|
|
2654
|
-
if (typeof validItems[0] === "string") return /* @__PURE__ */
|
|
2655
|
-
return /* @__PURE__ */
|
|
2660
|
+
if (typeof validItems[0] === "string") return /* @__PURE__ */ import_react51.default.createElement("ul", { className: "list-disc pl-4 mt-1" }, validItems.map((v, i) => /* @__PURE__ */ import_react51.default.createElement("li", { key: i, className: "text-[12px] md:text-[13px] leading-[1.8] text-neutral-600" }, toTitleCaseSafe(v))));
|
|
2661
|
+
return /* @__PURE__ */ import_react51.default.createElement(DynamicArrayAccordion, { items: validItems, parentKey: key });
|
|
2656
2662
|
}
|
|
2657
2663
|
if (typeof value === "object") {
|
|
2658
2664
|
if (Object.keys(value).length === 0) return null;
|
|
2659
2665
|
const renderedObj = renderDynamicObject(value);
|
|
2660
2666
|
if (!renderedObj || Array.isArray(renderedObj) && renderedObj.length === 0) return null;
|
|
2661
|
-
return /* @__PURE__ */
|
|
2667
|
+
return /* @__PURE__ */ import_react51.default.createElement("div", { className: "flex flex-col gap-3 mt-1 w-full border-l border-neutral-200 pl-4 py-2" }, renderedObj);
|
|
2662
2668
|
}
|
|
2663
|
-
return /* @__PURE__ */
|
|
2669
|
+
return /* @__PURE__ */ import_react51.default.createElement("span", { className: "text-sm text-black" }, String(value));
|
|
2664
2670
|
};
|
|
2665
2671
|
const renderDynamicObject = (obj) => {
|
|
2666
2672
|
if (!obj) return null;
|
|
@@ -2671,22 +2677,22 @@ var UniversalAgentConsole = ({
|
|
|
2671
2677
|
return true;
|
|
2672
2678
|
});
|
|
2673
2679
|
if (entries.length === 0) return null;
|
|
2674
|
-
return entries.map(([k, v]) => /* @__PURE__ */
|
|
2680
|
+
return entries.map(([k, v]) => /* @__PURE__ */ import_react51.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_react51.default.createElement("span", { className: "text-[10px] tracking-[0.2em] text-neutral-400 mb-1 uppercase" }, formatKeyName(k)), renderValue(k, v)));
|
|
2675
2681
|
};
|
|
2676
|
-
return /* @__PURE__ */
|
|
2682
|
+
return /* @__PURE__ */ import_react51.default.createElement("div", { className: "flex flex-col gap-8 animate-in fade-in duration-300 pb-10" }, /* @__PURE__ */ import_react51.default.createElement(ManagedToaster, null), currentView === "list" && /* @__PURE__ */ import_react51.default.createElement(import_react51.default.Fragment, null, /* @__PURE__ */ import_react51.default.createElement("div", { className: "flex flex-col items-start gap-1" }, /* @__PURE__ */ import_react51.default.createElement("h1", { className: " font-serif text-xl text-black tracking-tight" }, headerTitle), /* @__PURE__ */ import_react51.default.createElement("p", { className: "text-sm text-neutral-500" }, headerDescription)), stats.length > 0 && /* @__PURE__ */ import_react51.default.createElement("div", { className: "w-full rounded-2xl max-w-3xl overflow-hidden bg-white" }, /* @__PURE__ */ import_react51.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_react51.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_react51.default.createElement("div", { className: "w-12 h-12 rounded-full border border-neutral-200 bg-white flex items-center justify-center text-black shrink-0" }, stat.icon), /* @__PURE__ */ import_react51.default.createElement("div", { className: "min-w-0 flex-1" }, /* @__PURE__ */ import_react51.default.createElement("p", { className: "text-[10px] tracking-[0.2em] text-neutral-400 mb-1 truncate uppercase" }, stat.label), /* @__PURE__ */ import_react51.default.createElement("p", { className: "text-xl text-black tracking-tight truncate" }, stat.value)))))), tabs.length > 0 && /* @__PURE__ */ import_react51.default.createElement("div", { className: "flex items-center gap-6" }, tabs.map((tab) => /* @__PURE__ */ import_react51.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_react51.default.createElement("div", { className: "w-full bg-white rounded-2xl max-w-3xl overflow-hidden flex flex-col min-h-100" }, isLoadingList ? /* @__PURE__ */ import_react51.default.createElement("div", { className: "flex justify-center items-center py-12" }, /* @__PURE__ */ import_react51.default.createElement(import_react52.HugeiconsIcon, { icon: import_core_free_icons16.Loading03Icon, size: 32, className: "animate-spin text-black" })) : listData.length === 0 ? /* @__PURE__ */ import_react51.default.createElement(import_react51.default.Fragment, null, /* @__PURE__ */ import_react51.default.createElement("div", { className: "flex-1 flex justify-center items-center text-neutral-500 text-sm py-20" }, "No matching applications found.")) : /* @__PURE__ */ import_react51.default.createElement(import_react51.default.Fragment, null, /* @__PURE__ */ import_react51.default.createElement("div", { className: "divide-y divide-neutral-100 flex-1" }, listData.map((item) => /* @__PURE__ */ import_react51.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_react51.default.createElement("div", { className: "min-w-0 flex-1" }, /* @__PURE__ */ import_react51.default.createElement("p", { className: "text-sm text-black truncate pr-4" }, item.title), /* @__PURE__ */ import_react51.default.createElement("p", { className: "text-xs text-neutral-500 truncate mt-1" }, item.subtitle)), /* @__PURE__ */ import_react51.default.createElement("div", { className: "flex flex-col items-end gap-1 shrink-0 pl-4" }, /* @__PURE__ */ import_react51.default.createElement("span", { className: `text-[10px] tracking-widest px-3 py-1 rounded-full uppercase ${item.status === "COMPLETED" ? "bg-emerald-50 text-emerald-600" : "bg-neutral-50 text-neutral-600"}` }, item.status.replace(/_/g, " ")), /* @__PURE__ */ import_react51.default.createElement("span", { className: "text-[10px] text-neutral-400 mt-1" }, item.date))))), totalPages > 1 && /* @__PURE__ */ import_react51.default.createElement("div", { className: "flex items-center justify-between p-5 bg-neutral-50/50" }, /* @__PURE__ */ import_react51.default.createElement("span", { className: "text-[10px] text-neutral-400 tracking-[0.2em]" }, "Page ", currentPage, " of ", totalPages), /* @__PURE__ */ import_react51.default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ import_react51.default.createElement("button", { onClick: () => onPageChange(currentPage - 1), disabled: currentPage === 1, className: "p-2 border border-neutral-200 rounded-full bg-white text-neutral-500 hover:text-black outline-none disabled:opacity-30" }, /* @__PURE__ */ import_react51.default.createElement(import_react52.HugeiconsIcon, { icon: import_core_free_icons16.ArrowLeft01Icon, size: 14 })), /* @__PURE__ */ import_react51.default.createElement("button", { onClick: () => onPageChange(currentPage + 1), disabled: currentPage >= totalPages, className: "p-2 border border-neutral-200 rounded-full bg-white text-neutral-500 hover:text-black outline-none disabled:opacity-30" }, /* @__PURE__ */ import_react51.default.createElement(import_react52.HugeiconsIcon, { icon: import_core_free_icons16.ArrowRight01Icon, size: 14 }))))))), currentView === "details" && selectedApp && /* @__PURE__ */ import_react51.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_react51.default.createElement("div", { className: "flex items-center justify-between gap-4 pb-6" }, /* @__PURE__ */ import_react51.default.createElement("button", { onClick: () => {
|
|
2677
2683
|
onBackToList();
|
|
2678
2684
|
setPendingFiles([]);
|
|
2679
|
-
}, className: "flex items-center gap-2 text-[10px] text-neutral-400 hover:text-black tracking-widest transition-colors outline-none uppercase" }, /* @__PURE__ */
|
|
2685
|
+
}, className: "flex items-center gap-2 text-[10px] text-neutral-400 hover:text-black tracking-widest transition-colors outline-none uppercase" }, /* @__PURE__ */ import_react51.default.createElement(import_react52.HugeiconsIcon, { icon: import_core_free_icons16.ArrowLeft01Icon, size: 14 }), " Back to List"), /* @__PURE__ */ import_react51.default.createElement("span", { className: `text-[10px] tracking-widest px-4 py-1.5 rounded-full uppercase ${selectedApp.status === "COMPLETED" ? "bg-emerald-50 text-emerald-600" : "bg-neutral-50 text-neutral-600"}` }, selectedApp.status.replace(/_/g, " "))), /* @__PURE__ */ import_react51.default.createElement("div", { className: "flex flex-col gap-2 mb-8" }, /* @__PURE__ */ import_react51.default.createElement("h2", { className: " font-serif text-xl text-black tracking-tight" }, selectedApp.name || selectedApp.title), /* @__PURE__ */ import_react51.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_react51.default.createElement("div", { className: "flex flex-col gap-5" }, renderDynamicObject(selectedApp.metadata)) : selectedApp.agentId === currentAgentId ? /* @__PURE__ */ import_react51.default.createElement("div", { className: "flex flex-col gap-5" }, /* @__PURE__ */ import_react51.default.createElement("p", { className: "text-sm text-neutral-500" }, "No application data extracted.")) : null, selectedApp.agentId && /* @__PURE__ */ import_react51.default.createElement("div", { className: "flex flex-col gap-4 pt-8 mt-4 border-t border-neutral-200" }, /* @__PURE__ */ import_react51.default.createElement("div", { className: "flex flex-col gap-1 mb-4" }, /* @__PURE__ */ import_react51.default.createElement("h3", { className: " font-serif text-sm text-black" }, "Official Archives"), /* @__PURE__ */ import_react51.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_react51.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_react51.default.createElement("div", { className: "flex items-center gap-3 min-w-0" }, /* @__PURE__ */ import_react51.default.createElement(import_react52.HugeiconsIcon, { icon: import_core_free_icons16.File02Icon, size: 18, className: "shrink-0" }), /* @__PURE__ */ import_react51.default.createElement("span", { className: "truncate pr-2" }, arch.name)), /* @__PURE__ */ import_react51.default.createElement("button", { onClick: () => setArchiveToDelete(arch), className: "text-emerald-700 hover:text-red-500 transition-colors p-1 outline-none shrink-0" }, /* @__PURE__ */ import_react51.default.createElement(import_react52.HugeiconsIcon, { icon: import_core_free_icons16.Delete02Icon, size: 16 })))), pendingFiles.map((file, idx) => /* @__PURE__ */ import_react51.default.createElement("div", { key: idx, className: "flex items-center justify-between text-neutral-600 text-sm w-full" }, /* @__PURE__ */ import_react51.default.createElement("div", { className: "flex items-center gap-3 min-w-0" }, /* @__PURE__ */ import_react51.default.createElement(import_react52.HugeiconsIcon, { icon: import_core_free_icons16.AttachmentIcon, size: 18, className: "shrink-0" }), /* @__PURE__ */ import_react51.default.createElement("span", { className: "truncate pr-2" }, file.name)), /* @__PURE__ */ import_react51.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_react51.default.createElement(import_react52.HugeiconsIcon, { icon: import_core_free_icons16.Cancel01Icon, size: 16 })))), /* @__PURE__ */ import_react51.default.createElement("input", { type: "file", multiple: true, ref: archiveRef, onChange: handleFileSelect, className: "hidden", accept: "application/pdf,image/*" }), /* @__PURE__ */ import_react51.default.createElement("div", { className: "flex flex-col sm:flex-row items-center gap-3 w-full" }, /* @__PURE__ */ import_react51.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-200 rounded-full hover:bg-neutral-50 transition-colors text-black text-sm w-full outline-none disabled:opacity-50" }, /* @__PURE__ */ import_react51.default.createElement(import_react52.HugeiconsIcon, { icon: import_core_free_icons16.Upload01Icon, size: 18, className: "text-neutral-400" }), " Select Files to Upload"), pendingFiles.length > 0 && /* @__PURE__ */ import_react51.default.createElement("div", { className: "flex flex-col sm:flex-row items-center gap-3 w-full sm:w-auto shrink-0" }, /* @__PURE__ */ import_react51.default.createElement("button", { onClick: () => setPendingFiles([]), disabled: isUploading, className: "px-6 py-2 text-neutral-600 text-[11px] tracking-widest rounded-full hover:bg-neutral-200 outline-none w-full sm:w-auto uppercase" }, "Clear All"), /* @__PURE__ */ import_react51.default.createElement(ThreeDActionButton, { onClick: executeUpload, disabled: isUploading, isLoading: isUploading, className: "w-full sm:w-auto" }, "Upload ", pendingFiles.length, " File(s)")))), /* @__PURE__ */ import_react51.default.createElement("div", { className: "flex flex-col sm:flex-row items-center justify-between gap-4 mt-8 pt-6" }, !selectedApp.agentId ? /* @__PURE__ */ import_react51.default.createElement(ThreeDActionButton, { onClick: async () => {
|
|
2680
2686
|
setIsActioning(true);
|
|
2681
2687
|
await onAcceptApplication(selectedApp.id);
|
|
2682
2688
|
setIsActioning(false);
|
|
2683
|
-
}, disabled: isActioning, isLoading: isActioning, className: "w-full sm:w-auto" }, "Accept Application") : selectedApp.agentId !== currentAgentId ? /* @__PURE__ */
|
|
2689
|
+
}, disabled: isActioning, isLoading: isActioning, className: "w-full sm:w-auto" }, "Accept Application") : selectedApp.agentId !== currentAgentId ? /* @__PURE__ */ import_react51.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_react51.default.createElement(import_react52.HugeiconsIcon, { icon: import_core_free_icons16.Cancel01Icon, size: 16, className: "text-red-500 shrink-0 mt-0.5" }), /* @__PURE__ */ import_react51.default.createElement("div", null, /* @__PURE__ */ import_react51.default.createElement("p", { className: "text-sm text-red-700" }, "Application Taken"), /* @__PURE__ */ import_react51.default.createElement("p", { className: "text-xs text-red-600 mt-1" }, "Currently handled by ", selectedApp.agentName || "another agent", "."))) : /* @__PURE__ */ import_react51.default.createElement("div", { className: "w-full flex flex-col sm:flex-row items-center gap-4 justify-between" }, /* @__PURE__ */ import_react51.default.createElement("p", { className: "text-xs text-neutral-500" }, "You are the assigned agent."), /* @__PURE__ */ import_react51.default.createElement("div", { className: "flex flex-col sm:flex-row items-center justify-end gap-3 w-full sm:w-auto" }, /* @__PURE__ */ import_react51.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-200 text-neutral-600 text-[11px] tracking-widest rounded-full hover:bg-neutral-50 transition-colors outline-none disabled:opacity-30 uppercase" }, "Query"), /* @__PURE__ */ import_react51.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-200 text-neutral-600 text-[11px] tracking-widest rounded-full hover:bg-neutral-50 transition-colors outline-none disabled:opacity-30 uppercase" }, "Reject"), /* @__PURE__ */ import_react51.default.createElement(ThreeDActionButton, { onClick: () => setActionModal("success"), disabled: selectedApp.status === "COMPLETED", className: "w-full sm:w-auto" }, "Mark Success"))))), actionModal && /* @__PURE__ */ import_react51.default.createElement("div", { className: "fixed inset-0 z-110 flex items-center justify-center p-4" }, /* @__PURE__ */ import_react51.default.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => !isActioning && setActionModal(null) }), /* @__PURE__ */ import_react51.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_react51.default.createElement("div", { className: "p-6" }, /* @__PURE__ */ import_react51.default.createElement("h3", { className: " font-serif text-lg text-black tracking-tight capitalize mb-2" }, actionModal === "success" ? "Complete Application" : `${actionModal} Application`), /* @__PURE__ */ import_react51.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_react51.default.createElement("div", { className: "p-6 pb-2" }, /* @__PURE__ */ import_react51.default.createElement(TextInput, { label: "Reason for Action", value: actionMessage, onChange: setActionMessage, placeholder: "Enter your reason here...", disabled: isActioning })), /* @__PURE__ */ import_react51.default.createElement("div", { className: "flex items-center p-6 pt-4 gap-3" }, /* @__PURE__ */ import_react51.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_react51.default.createElement(ThreeDActionButton, { onClick: async () => {
|
|
2684
2690
|
setIsActioning(true);
|
|
2685
2691
|
await onUpdateStatus(selectedApp.id, actionModal === "success" ? "COMPLETED" : actionModal === "reject" ? "REJECTED" : "QUEUED", actionMessage);
|
|
2686
2692
|
setIsActioning(false);
|
|
2687
2693
|
setActionModal(null);
|
|
2688
2694
|
setActionMessage("");
|
|
2689
|
-
}, disabled: isActioning || (actionModal === "query" || actionModal === "reject") && actionMessage.trim().length < 5, isLoading: isActioning, className: "flex-1" }, "Confirm ", actionModal)))), archiveToDelete && /* @__PURE__ */
|
|
2695
|
+
}, disabled: isActioning || (actionModal === "query" || actionModal === "reject") && actionMessage.trim().length < 5, isLoading: isActioning, className: "flex-1" }, "Confirm ", actionModal)))), archiveToDelete && /* @__PURE__ */ import_react51.default.createElement("div", { className: "fixed inset-0 z-110 flex items-center justify-center p-4" }, /* @__PURE__ */ import_react51.default.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => !isActioning && setArchiveToDelete(null) }), /* @__PURE__ */ import_react51.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_react51.default.createElement("div", { className: "p-6" }, /* @__PURE__ */ import_react51.default.createElement("h3", { className: " font-serif text-lg text-black tracking-tight mb-2" }, "Delete Document?"), /* @__PURE__ */ import_react51.default.createElement("p", { className: "text-xs text-neutral-500" }, 'Are you sure you want to permanently delete "', archiveToDelete.name, '"?')), /* @__PURE__ */ import_react51.default.createElement("div", { className: "flex items-center p-6 gap-3" }, /* @__PURE__ */ import_react51.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_react51.default.createElement(ThreeDActionButton, { onClick: async () => {
|
|
2690
2696
|
setIsActioning(true);
|
|
2691
2697
|
await onDeleteArchive(selectedApp.id, archiveToDelete.id);
|
|
2692
2698
|
setIsActioning(false);
|
|
@@ -2695,12 +2701,12 @@ var UniversalAgentConsole = ({
|
|
|
2695
2701
|
};
|
|
2696
2702
|
|
|
2697
2703
|
// src/components/UniversalOverviewPage.tsx
|
|
2698
|
-
var
|
|
2704
|
+
var import_react55 = __toESM(require("react"));
|
|
2699
2705
|
|
|
2700
2706
|
// src/components/Banner.tsx
|
|
2701
|
-
var
|
|
2702
|
-
var
|
|
2703
|
-
var
|
|
2707
|
+
var import_react53 = __toESM(require("react"));
|
|
2708
|
+
var import_react54 = require("@hugeicons/react");
|
|
2709
|
+
var import_core_free_icons17 = require("@hugeicons/core-free-icons");
|
|
2704
2710
|
var Banner = ({
|
|
2705
2711
|
title,
|
|
2706
2712
|
message,
|
|
@@ -2710,7 +2716,7 @@ var Banner = ({
|
|
|
2710
2716
|
onDismiss,
|
|
2711
2717
|
action
|
|
2712
2718
|
}) => {
|
|
2713
|
-
const [isVisible, setIsVisible] = (0,
|
|
2719
|
+
const [isVisible, setIsVisible] = (0, import_react53.useState)(true);
|
|
2714
2720
|
if (!isVisible) return null;
|
|
2715
2721
|
const handleDismiss = () => {
|
|
2716
2722
|
setIsVisible(false);
|
|
@@ -2722,7 +2728,7 @@ var Banner = ({
|
|
|
2722
2728
|
iconColor: "text-emerald-600",
|
|
2723
2729
|
titleColor: "text-emerald-900",
|
|
2724
2730
|
msgColor: "text-emerald-700",
|
|
2725
|
-
defaultIcon:
|
|
2731
|
+
defaultIcon: import_core_free_icons17.CheckmarkBadge01Icon,
|
|
2726
2732
|
closeHover: "hover:bg-emerald-100 text-emerald-500"
|
|
2727
2733
|
},
|
|
2728
2734
|
warning: {
|
|
@@ -2730,7 +2736,7 @@ var Banner = ({
|
|
|
2730
2736
|
iconColor: "text-amber-600",
|
|
2731
2737
|
titleColor: "text-amber-900",
|
|
2732
2738
|
msgColor: "text-amber-700",
|
|
2733
|
-
defaultIcon:
|
|
2739
|
+
defaultIcon: import_core_free_icons17.InformationCircleIcon,
|
|
2734
2740
|
closeHover: "hover:bg-amber-100 text-amber-500"
|
|
2735
2741
|
},
|
|
2736
2742
|
alert: {
|
|
@@ -2738,20 +2744,20 @@ var Banner = ({
|
|
|
2738
2744
|
iconColor: "text-red-600",
|
|
2739
2745
|
titleColor: "text-red-900",
|
|
2740
2746
|
msgColor: "text-red-700",
|
|
2741
|
-
defaultIcon:
|
|
2747
|
+
defaultIcon: import_core_free_icons17.Alert02Icon,
|
|
2742
2748
|
closeHover: "hover:bg-red-100 text-red-500"
|
|
2743
2749
|
}
|
|
2744
2750
|
};
|
|
2745
2751
|
const currentConfig = config[type];
|
|
2746
2752
|
const IconToUse = icon || currentConfig.defaultIcon;
|
|
2747
|
-
return /* @__PURE__ */
|
|
2753
|
+
return /* @__PURE__ */ import_react53.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_react53.default.createElement("div", { className: `shrink-0 mt-0.5 ${currentConfig.iconColor}` }, /* @__PURE__ */ import_react53.default.createElement(import_react54.HugeiconsIcon, { icon: IconToUse, size: 20 })), /* @__PURE__ */ import_react53.default.createElement("div", { className: "flex-1 flex flex-col min-w-0 pr-6" }, /* @__PURE__ */ import_react53.default.createElement("h4", { className: `text-sm font-medium tracking-tight mb-1 ${currentConfig.titleColor}` }, title), /* @__PURE__ */ import_react53.default.createElement("p", { className: `text-xs leading-relaxed ${currentConfig.msgColor}` }, message), action && /* @__PURE__ */ import_react53.default.createElement("div", { className: "mt-3" }, action)), isDismissible && /* @__PURE__ */ import_react53.default.createElement(
|
|
2748
2754
|
"button",
|
|
2749
2755
|
{
|
|
2750
2756
|
onClick: handleDismiss,
|
|
2751
2757
|
className: `absolute top-3 right-3 p-1.5 rounded-full transition-colors outline-none shrink-0 ${currentConfig.closeHover}`,
|
|
2752
2758
|
"aria-label": "Dismiss banner"
|
|
2753
2759
|
},
|
|
2754
|
-
/* @__PURE__ */
|
|
2760
|
+
/* @__PURE__ */ import_react53.default.createElement(import_react54.HugeiconsIcon, { icon: import_core_free_icons17.Cancel01Icon, size: 16 })
|
|
2755
2761
|
));
|
|
2756
2762
|
};
|
|
2757
2763
|
|
|
@@ -2766,7 +2772,7 @@ var UniversalOverviewPage = ({
|
|
|
2766
2772
|
alerts = [],
|
|
2767
2773
|
banner
|
|
2768
2774
|
}) => {
|
|
2769
|
-
return /* @__PURE__ */
|
|
2775
|
+
return /* @__PURE__ */ import_react55.default.createElement("div", { className: "flex flex-col gap-8 animate-in fade-in duration-300 pb-10" }, /* @__PURE__ */ import_react55.default.createElement("div", { className: "flex items-center justify-between gap-4" }, /* @__PURE__ */ import_react55.default.createElement("div", null, /* @__PURE__ */ import_react55.default.createElement("h1", { className: " font-serif text-xl text-black mb-1 tracking-tight" }, headerTitle), /* @__PURE__ */ import_react55.default.createElement("p", { className: "text-xs text-neutral-500" }, headerDescription))), quickStats.length > 0 && /* @__PURE__ */ import_react55.default.createElement("div", { className: "w-full rounded-2xl overflow-hidden max-w-3xl bg-white" }, /* @__PURE__ */ import_react55.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_react55.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_react55.default.createElement("div", { className: "w-12 h-12 rounded-full border border-neutral-200 bg-white flex items-center justify-center text-black shrink-0" }, stat.icon), /* @__PURE__ */ import_react55.default.createElement("div", { className: "min-w-0 flex-1" }, /* @__PURE__ */ import_react55.default.createElement("p", { className: "text-[10px] tracking-[0.2em] text-neutral-400 mb-1 truncate uppercase" }, stat.label), /* @__PURE__ */ import_react55.default.createElement("p", { className: "text-lg md:text-xl text-black tracking-tight truncate" }, stat.value)))))), banner && banner.isVisible && /* @__PURE__ */ import_react55.default.createElement("div", { className: "w-full max-w-3xl" }, /* @__PURE__ */ import_react55.default.createElement(
|
|
2770
2776
|
Banner,
|
|
2771
2777
|
{
|
|
2772
2778
|
title: banner.title,
|
|
@@ -2777,7 +2783,7 @@ var UniversalOverviewPage = ({
|
|
|
2777
2783
|
onDismiss: banner.onDismiss,
|
|
2778
2784
|
action: banner.action
|
|
2779
2785
|
}
|
|
2780
|
-
)), /* @__PURE__ */
|
|
2786
|
+
)), /* @__PURE__ */ import_react55.default.createElement("div", { className: "w-full rounded-2xl max-w-3xl overflow-hidden bg-white min-w-0" }, /* @__PURE__ */ import_react55.default.createElement("div", { className: "p-6 sm:p-8 flex flex-col h-full min-w-0 gap-6" }, /* @__PURE__ */ import_react55.default.createElement("div", { className: "flex flex-wrap items-center justify-between gap-4 border-b border-neutral-200 pb-4" }, /* @__PURE__ */ import_react55.default.createElement("h3", { className: " font-serif text-[11px] text-black tracking-[0.2em] uppercase" }, detailsTitle), primaryAction && (primaryAction.href ? /* @__PURE__ */ import_react55.default.createElement(
|
|
2781
2787
|
ThreeDButton,
|
|
2782
2788
|
{
|
|
2783
2789
|
href: primaryAction.href,
|
|
@@ -2786,7 +2792,7 @@ var UniversalOverviewPage = ({
|
|
|
2786
2792
|
},
|
|
2787
2793
|
primaryAction.label,
|
|
2788
2794
|
primaryAction.icon
|
|
2789
|
-
) : /* @__PURE__ */
|
|
2795
|
+
) : /* @__PURE__ */ import_react55.default.createElement(
|
|
2790
2796
|
ThreeDActionButton,
|
|
2791
2797
|
{
|
|
2792
2798
|
onClick: primaryAction.onClick,
|
|
@@ -2795,19 +2801,19 @@ var UniversalOverviewPage = ({
|
|
|
2795
2801
|
},
|
|
2796
2802
|
primaryAction.label,
|
|
2797
2803
|
primaryAction.icon
|
|
2798
|
-
))), /* @__PURE__ */
|
|
2804
|
+
))), /* @__PURE__ */ import_react55.default.createElement("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-8" }, details.map((detail, idx) => /* @__PURE__ */ import_react55.default.createElement("div", { key: idx, className: "min-w-0" }, /* @__PURE__ */ import_react55.default.createElement("p", { className: "text-[10px] tracking-[0.2em] text-neutral-400 mb-1.5 uppercase" }, detail.label), /* @__PURE__ */ import_react55.default.createElement("p", { className: "text-[13px] text-black truncate" }, detail.value)))), alerts.map((alert, idx) => {
|
|
2799
2805
|
const bgClass = alert.type === "warning" ? "bg-amber-50/50" : alert.type === "info" ? "bg-blue-50/50" : "bg-red-50/50";
|
|
2800
2806
|
const textClass = alert.type === "warning" ? "text-amber-600" : alert.type === "info" ? "text-blue-600" : "text-red-600";
|
|
2801
2807
|
const valClass = alert.type === "warning" ? "text-amber-700" : alert.type === "info" ? "text-blue-700" : "text-red-700";
|
|
2802
2808
|
const lblClass = alert.type === "warning" ? "text-amber-400" : alert.type === "info" ? "text-blue-400" : "text-red-400";
|
|
2803
|
-
return /* @__PURE__ */
|
|
2809
|
+
return /* @__PURE__ */ import_react55.default.createElement("div", { key: idx, className: `mt-4 p-5 rounded-xl flex flex-col gap-4 ${bgClass}` }, /* @__PURE__ */ import_react55.default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ import_react55.default.createElement("span", { className: `text-[11px] tracking-widest uppercase ${textClass}` }, alert.title)), alert.items.map((item, itemIdx) => /* @__PURE__ */ import_react55.default.createElement("div", { key: itemIdx }, /* @__PURE__ */ import_react55.default.createElement("span", { className: `text-[10px] tracking-[0.2em] block mb-1 uppercase ${lblClass}` }, item.label), /* @__PURE__ */ import_react55.default.createElement("p", { className: `text-[13px] leading-relaxed ${valClass}` }, item.text))));
|
|
2804
2810
|
}))));
|
|
2805
2811
|
};
|
|
2806
2812
|
|
|
2807
2813
|
// src/components/UniversalErrorView.tsx
|
|
2808
|
-
var
|
|
2809
|
-
var
|
|
2810
|
-
var
|
|
2814
|
+
var import_react56 = __toESM(require("react"));
|
|
2815
|
+
var import_react57 = require("@hugeicons/react");
|
|
2816
|
+
var import_core_free_icons18 = require("@hugeicons/core-free-icons");
|
|
2811
2817
|
var UniversalErrorView = ({
|
|
2812
2818
|
isBooting,
|
|
2813
2819
|
isLoading,
|
|
@@ -2819,7 +2825,7 @@ var UniversalErrorView = ({
|
|
|
2819
2825
|
returnLabel = "Return to Workspace"
|
|
2820
2826
|
}) => {
|
|
2821
2827
|
if (isBooting || isLoading && !activeData) {
|
|
2822
|
-
return /* @__PURE__ */
|
|
2828
|
+
return /* @__PURE__ */ import_react56.default.createElement("div", { className: "flex items-center justify-center h-screen w-full bg-transparent" }, /* @__PURE__ */ import_react56.default.createElement(PageSpinner, null));
|
|
2823
2829
|
}
|
|
2824
2830
|
if (!isLoading && (!activeData || activeError)) {
|
|
2825
2831
|
const errorString = typeof activeError === "string" ? activeError : JSON.stringify(activeError || "");
|
|
@@ -2830,7 +2836,7 @@ var UniversalErrorView = ({
|
|
|
2830
2836
|
const apiMessage = typeof activeError === "string" && activeError.trim() !== "" ? activeError : null;
|
|
2831
2837
|
let title = "Oops Connection Error";
|
|
2832
2838
|
let description = apiMessage || `We could not load your request. Please check your connection and try again.`;
|
|
2833
|
-
let IconComponent =
|
|
2839
|
+
let IconComponent = import_core_free_icons18.ConfusedIcon;
|
|
2834
2840
|
if (isNotFoundError) {
|
|
2835
2841
|
title = "Oops its not your fault";
|
|
2836
2842
|
description = apiMessage || `We could not reach the ${envName} you just loaded. Our team has been notified.`;
|
|
@@ -2838,7 +2844,7 @@ var UniversalErrorView = ({
|
|
|
2838
2844
|
title = "Access Restricted";
|
|
2839
2845
|
description = apiMessage || `You have insufficient permissions to view this ${envName}. Please contact your administrator.`;
|
|
2840
2846
|
}
|
|
2841
|
-
return /* @__PURE__ */
|
|
2847
|
+
return /* @__PURE__ */ import_react56.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_react56.default.createElement("div", { className: "mb-4 flex justify-center" }, /* @__PURE__ */ import_react56.default.createElement(import_react57.HugeiconsIcon, { icon: IconComponent, size: 48, className: "text-neutral-300" })), /* @__PURE__ */ import_react56.default.createElement("h2", { className: " font-serif text-lg text-black tracking-tight " }, title), /* @__PURE__ */ import_react56.default.createElement("p", { className: "text-xs mt-2 mb-8 text-neutral-500 max-w-sm text-center leading-relaxed" }, description), /* @__PURE__ */ import_react56.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_react56.default.createElement(
|
|
2842
2848
|
"button",
|
|
2843
2849
|
{
|
|
2844
2850
|
onClick: () => window.location.href = returnUrl,
|
|
@@ -2847,14 +2853,14 @@ var UniversalErrorView = ({
|
|
|
2847
2853
|
returnLabel
|
|
2848
2854
|
) : (
|
|
2849
2855
|
// Soft errors (Network timeouts) allow them to retry or optionally retreat
|
|
2850
|
-
/* @__PURE__ */
|
|
2856
|
+
/* @__PURE__ */ import_react56.default.createElement(import_react56.default.Fragment, null, envName.toLowerCase().includes("application") && /* @__PURE__ */ import_react56.default.createElement(
|
|
2851
2857
|
"button",
|
|
2852
2858
|
{
|
|
2853
2859
|
onClick: () => window.location.href = returnUrl,
|
|
2854
2860
|
className: "px-6 py-2 bg-transparent border border-neutral-200 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"
|
|
2855
2861
|
},
|
|
2856
2862
|
"Back Home"
|
|
2857
|
-
), /* @__PURE__ */
|
|
2863
|
+
), /* @__PURE__ */ import_react56.default.createElement(
|
|
2858
2864
|
"button",
|
|
2859
2865
|
{
|
|
2860
2866
|
onClick: onRetry,
|
|
@@ -2869,9 +2875,9 @@ var UniversalErrorView = ({
|
|
|
2869
2875
|
};
|
|
2870
2876
|
|
|
2871
2877
|
// src/components/UniversalLookupPage.tsx
|
|
2872
|
-
var
|
|
2873
|
-
var
|
|
2874
|
-
var
|
|
2878
|
+
var import_react58 = __toESM(require("react"));
|
|
2879
|
+
var import_react59 = require("@hugeicons/react");
|
|
2880
|
+
var import_core_free_icons19 = require("@hugeicons/core-free-icons");
|
|
2875
2881
|
var UniversalLookupPage = ({
|
|
2876
2882
|
headerTitle,
|
|
2877
2883
|
headerDescription,
|
|
@@ -2885,9 +2891,9 @@ var UniversalLookupPage = ({
|
|
|
2885
2891
|
resultContent,
|
|
2886
2892
|
modals
|
|
2887
2893
|
}) => {
|
|
2888
|
-
const [isTypeModalOpen, setIsTypeModalOpen] = (0,
|
|
2894
|
+
const [isTypeModalOpen, setIsTypeModalOpen] = (0, import_react58.useState)(false);
|
|
2889
2895
|
const currentOptionLabel = searchOptions.find((opt) => opt.value === selectedSearchType)?.label || "Select Type";
|
|
2890
|
-
return /* @__PURE__ */
|
|
2896
|
+
return /* @__PURE__ */ import_react58.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_react58.default.createElement(ManagedToaster, null), /* @__PURE__ */ import_react58.default.createElement("div", { className: "flex flex-col sm:flex-row sm:items-start justify-between gap-3 sm:gap-4" }, /* @__PURE__ */ import_react58.default.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ import_react58.default.createElement("h1", { className: " font-serif text-xl text-black mb-1 truncate tracking-tight" }, headerTitle), /* @__PURE__ */ import_react58.default.createElement("p", { className: "text-xs text-neutral-500 truncate" }, headerDescription))), /* @__PURE__ */ import_react58.default.createElement("div", { className: "w-full max-w-2xl pb-8" }, /* @__PURE__ */ import_react58.default.createElement("form", { className: "flex flex-col gap-6", onSubmit: onSearch, autoComplete: "off" }, /* @__PURE__ */ import_react58.default.createElement("div", { className: "flex gap-4" }, /* @__PURE__ */ import_react58.default.createElement(
|
|
2891
2897
|
"button",
|
|
2892
2898
|
{
|
|
2893
2899
|
type: "button",
|
|
@@ -2895,7 +2901,7 @@ var UniversalLookupPage = ({
|
|
|
2895
2901
|
className: "mt-2 text-[12px] tracking-widest bg-transparent border-b border-neutral-200 text-black text-left outline-none focus:border-black shrink-0 uppercase"
|
|
2896
2902
|
},
|
|
2897
2903
|
currentOptionLabel
|
|
2898
|
-
), /* @__PURE__ */
|
|
2904
|
+
), /* @__PURE__ */ import_react58.default.createElement("div", { className: "flex-1" }, /* @__PURE__ */ import_react58.default.createElement(
|
|
2899
2905
|
TextInput,
|
|
2900
2906
|
{
|
|
2901
2907
|
placeholder: "Enter Exact ID, Email, or Slug...",
|
|
@@ -2903,7 +2909,7 @@ var UniversalLookupPage = ({
|
|
|
2903
2909
|
onChange: onSearchQueryChange,
|
|
2904
2910
|
disabled: isSearching
|
|
2905
2911
|
}
|
|
2906
|
-
))), /* @__PURE__ */
|
|
2912
|
+
))), /* @__PURE__ */ import_react58.default.createElement("div", { className: "flex justify-end" }, /* @__PURE__ */ import_react58.default.createElement(
|
|
2907
2913
|
ThreeDActionButton,
|
|
2908
2914
|
{
|
|
2909
2915
|
type: "submit",
|
|
@@ -2911,9 +2917,9 @@ var UniversalLookupPage = ({
|
|
|
2911
2917
|
isLoading: isSearching,
|
|
2912
2918
|
className: "min-w-32"
|
|
2913
2919
|
},
|
|
2914
|
-
/* @__PURE__ */
|
|
2920
|
+
/* @__PURE__ */ import_react58.default.createElement(import_react59.HugeiconsIcon, { icon: import_core_free_icons19.Search01Icon, size: 14, className: "mr-2" }),
|
|
2915
2921
|
" Lookup"
|
|
2916
|
-
)))), resultContent && /* @__PURE__ */
|
|
2922
|
+
)))), resultContent && /* @__PURE__ */ import_react58.default.createElement("div", { className: "w-full max-w-2xl bg-white text-left animate-in fade-in slide-in-from-bottom-4" }, /* @__PURE__ */ import_react58.default.createElement("h3", { className: " font-serif text-[10px] text-neutral-400 tracking-[0.2em] mb-6 uppercase" }, "Entity Record Found"), resultContent), isTypeModalOpen && /* @__PURE__ */ import_react58.default.createElement("div", { className: "fixed inset-0 z-110 flex items-center justify-center p-4" }, /* @__PURE__ */ import_react58.default.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setIsTypeModalOpen(false) }), /* @__PURE__ */ import_react58.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_react58.default.createElement("div", { className: "p-6 text-center w-full" }, /* @__PURE__ */ import_react58.default.createElement("h3", { className: " font-serif text-[14px] text-black tracking-tight mb-2" }, "Select Entity Type")), /* @__PURE__ */ import_react58.default.createElement("div", { className: "w-full flex flex-col pl-2 pr-2 pb-2" }, searchOptions.map((option) => /* @__PURE__ */ import_react58.default.createElement(
|
|
2917
2923
|
"button",
|
|
2918
2924
|
{
|
|
2919
2925
|
key: option.value,
|
|
@@ -2924,16 +2930,16 @@ var UniversalLookupPage = ({
|
|
|
2924
2930
|
},
|
|
2925
2931
|
className: `text-left px-4 py-3 text-[12px] tracking-wide transition-colors rounded-full flex items-center justify-between outline-none ${selectedSearchType === option.value ? "bg-neutral-100 text-black" : "text-neutral-500 hover:bg-neutral-50 hover:text-black"}`
|
|
2926
2932
|
},
|
|
2927
|
-
/* @__PURE__ */
|
|
2928
|
-
selectedSearchType === option.value && /* @__PURE__ */
|
|
2929
|
-
))), /* @__PURE__ */
|
|
2933
|
+
/* @__PURE__ */ import_react58.default.createElement("span", { className: "truncate pr-2" }, option.label),
|
|
2934
|
+
selectedSearchType === option.value && /* @__PURE__ */ import_react58.default.createElement("div", null)
|
|
2935
|
+
))), /* @__PURE__ */ import_react58.default.createElement("div", { className: "w-full flex" }, /* @__PURE__ */ import_react58.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);
|
|
2930
2936
|
};
|
|
2931
2937
|
|
|
2932
2938
|
// src/components/UniversalDirectoryPage.tsx
|
|
2933
|
-
var
|
|
2934
|
-
var
|
|
2935
|
-
var
|
|
2936
|
-
var PageSpinner4 = () => /* @__PURE__ */
|
|
2939
|
+
var import_react60 = __toESM(require("react"));
|
|
2940
|
+
var import_react61 = require("@hugeicons/react");
|
|
2941
|
+
var import_core_free_icons20 = require("@hugeicons/core-free-icons");
|
|
2942
|
+
var PageSpinner4 = () => /* @__PURE__ */ import_react60.default.createElement("div", { className: "flex justify-center items-center py-12" }, /* @__PURE__ */ import_react60.default.createElement(import_react61.HugeiconsIcon, { icon: import_core_free_icons20.Loading03Icon, size: 32, className: "animate-spin mb-4 text-black" }));
|
|
2937
2943
|
var UniversalDirectoryPage = ({
|
|
2938
2944
|
headerTitle,
|
|
2939
2945
|
headerDescription,
|
|
@@ -2955,33 +2961,33 @@ var UniversalDirectoryPage = ({
|
|
|
2955
2961
|
detailsContent,
|
|
2956
2962
|
modals
|
|
2957
2963
|
}) => {
|
|
2958
|
-
return /* @__PURE__ */
|
|
2964
|
+
return /* @__PURE__ */ import_react60.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_react60.default.createElement(ManagedToaster, null), /* @__PURE__ */ import_react60.default.createElement("div", { className: "flex flex-col sm:flex-row sm:items-start justify-between gap-4" }, currentView === "list" ? /* @__PURE__ */ import_react60.default.createElement(import_react60.default.Fragment, null, /* @__PURE__ */ import_react60.default.createElement("div", { className: "w-full" }, /* @__PURE__ */ import_react60.default.createElement("h1", { className: " font-serif text-xl text-black mb-1 tracking-tight" }, headerTitle), /* @__PURE__ */ import_react60.default.createElement("p", { className: "text-xs text-neutral-500 mb-6" }, headerDescription), !hideSearch && /* @__PURE__ */ import_react60.default.createElement(
|
|
2959
2965
|
TextInput,
|
|
2960
2966
|
{
|
|
2961
2967
|
placeholder: searchPlaceholder,
|
|
2962
2968
|
value: searchQuery,
|
|
2963
2969
|
onChange: onSearchChange
|
|
2964
2970
|
}
|
|
2965
|
-
)), headerAction && /* @__PURE__ */
|
|
2971
|
+
)), headerAction && /* @__PURE__ */ import_react60.default.createElement("div", { className: "shrink-0 w-full sm:w-auto mt-4 sm:mt-0" }, headerAction)) : /* @__PURE__ */ import_react60.default.createElement("div", { className: "flex flex-col items-start gap-3" }, /* @__PURE__ */ import_react60.default.createElement("button", { onClick: onBackToList, className: "text-[10px] text-neutral-400 hover:text-black tracking-[0.2em] flex items-center gap-1.5 transition-colors outline-none uppercase" }, /* @__PURE__ */ import_react60.default.createElement(import_react61.HugeiconsIcon, { icon: import_core_free_icons20.ArrowLeft01Icon, size: 12 }), " Back"))), currentView === "list" && /* @__PURE__ */ import_react60.default.createElement("div", { className: "w-full overflow-hidden pt-2" }, isLoading ? /* @__PURE__ */ import_react60.default.createElement(PageSpinner4, null) : /* @__PURE__ */ import_react60.default.createElement("div", { className: "flex flex-col min-w-0" }, /* @__PURE__ */ import_react60.default.createElement("div", { className: "divide-y divide-neutral-100" }, items.length === 0 ? /* @__PURE__ */ import_react60.default.createElement(import_react60.default.Fragment, null, /* @__PURE__ */ import_react60.default.createElement("p", { className: "text-xs text-neutral-500 py-6 text-center" }, "No records found.")) : items.map((item) => /* @__PURE__ */ import_react60.default.createElement(
|
|
2966
2972
|
"div",
|
|
2967
2973
|
{
|
|
2968
2974
|
key: item.id,
|
|
2969
2975
|
onClick: () => onRowClick(item.id),
|
|
2970
2976
|
className: "flex items-center justify-between p-4 sm:p-5 hover:bg-neutral-50/50 transition-colors cursor-pointer group min-w-0"
|
|
2971
2977
|
},
|
|
2972
|
-
/* @__PURE__ */
|
|
2973
|
-
item.rightBadge && /* @__PURE__ */
|
|
2974
|
-
))), totalPages > 1 && /* @__PURE__ */
|
|
2978
|
+
/* @__PURE__ */ import_react60.default.createElement("div", { className: "flex items-center gap-3 sm:gap-4 min-w-0 flex-1" }, /* @__PURE__ */ import_react60.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_react60.default.createElement("div", { className: "min-w-0 flex-1" }, /* @__PURE__ */ import_react60.default.createElement("div", { className: "text-sm text-black truncate pr-2" }, item.primaryText), /* @__PURE__ */ import_react60.default.createElement("div", { className: "text-xs text-neutral-500 truncate pr-2 mt-0.5" }, item.secondaryText))),
|
|
2979
|
+
item.rightBadge && /* @__PURE__ */ import_react60.default.createElement("div", { className: "shrink-0 pl-2" }, /* @__PURE__ */ import_react60.default.createElement("span", { className: `text-[10px] tracking-[0.2em] px-3 py-1 rounded-full whitespace-nowrap uppercase ${item.rightBadgeClass || "text-neutral-500 border border-neutral-200 bg-white"}` }, item.rightBadge))
|
|
2980
|
+
))), totalPages > 1 && /* @__PURE__ */ import_react60.default.createElement("div", { className: "flex items-center justify-between p-4 sm:p-5" }, /* @__PURE__ */ import_react60.default.createElement("span", { className: "text-[10px] text-neutral-400 tracking-[0.2em] uppercase" }, "Page ", currentPage, " of ", totalPages), /* @__PURE__ */ import_react60.default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ import_react60.default.createElement("button", { onClick: () => onPageChange(currentPage - 1), disabled: currentPage === 1 || isLoading, className: "p-2 border border-neutral-200 rounded-full bg-white text-neutral-500 hover:text-black outline-none disabled:opacity-30" }, /* @__PURE__ */ import_react60.default.createElement(import_react61.HugeiconsIcon, { icon: import_core_free_icons20.ArrowLeft01Icon, size: 14 })), /* @__PURE__ */ import_react60.default.createElement("button", { onClick: () => onPageChange(currentPage + 1), disabled: currentPage >= totalPages || isLoading, className: "p-2 border border-neutral-200 rounded-full bg-white text-neutral-500 hover:text-black outline-none disabled:opacity-30" }, /* @__PURE__ */ import_react60.default.createElement(import_react61.HugeiconsIcon, { icon: import_core_free_icons20.ArrowRight01Icon, size: 14 })))))), currentView === "details" && detailsContent, modals);
|
|
2975
2981
|
};
|
|
2976
2982
|
|
|
2977
2983
|
// src/components/AiApproveDecline.tsx
|
|
2978
|
-
var
|
|
2979
|
-
var
|
|
2980
|
-
var
|
|
2984
|
+
var import_react62 = __toESM(require("react"));
|
|
2985
|
+
var import_react63 = require("@hugeicons/react");
|
|
2986
|
+
var import_core_free_icons21 = require("@hugeicons/core-free-icons");
|
|
2981
2987
|
var AiApproveDecline = ({ suggestionTitle, suggestionValue, onApprove, onDecline, onEdit }) => {
|
|
2982
|
-
const [isEditing, setIsEditing] = (0,
|
|
2983
|
-
const [editVal, setEditVal] = (0,
|
|
2984
|
-
return /* @__PURE__ */
|
|
2988
|
+
const [isEditing, setIsEditing] = (0, import_react62.useState)(false);
|
|
2989
|
+
const [editVal, setEditVal] = (0, import_react62.useState)(typeof suggestionValue === "string" ? suggestionValue : "");
|
|
2990
|
+
return /* @__PURE__ */ import_react62.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_react62.default.createElement("div", null, /* @__PURE__ */ import_react62.default.createElement("span", { className: "text-[10px] tracking-widest text-purple-600 block mb-1 uppercase" }, "AI Suggestion: ", suggestionTitle), !isEditing ? /* @__PURE__ */ import_react62.default.createElement("div", { className: "text-sm text-black" }, suggestionValue) : /* @__PURE__ */ import_react62.default.createElement(
|
|
2985
2991
|
"input",
|
|
2986
2992
|
{
|
|
2987
2993
|
type: "text",
|
|
@@ -2990,45 +2996,45 @@ var AiApproveDecline = ({ suggestionTitle, suggestionValue, onApprove, onDecline
|
|
|
2990
2996
|
className: "w-full text-sm p-2 border-b border-purple-200 bg-transparent outline-none focus:border-purple-400 transition-colors",
|
|
2991
2997
|
autoFocus: true
|
|
2992
2998
|
}
|
|
2993
|
-
)), /* @__PURE__ */
|
|
2999
|
+
)), /* @__PURE__ */ import_react62.default.createElement("div", { className: "flex items-center gap-1 mt-2" }, !isEditing ? /* @__PURE__ */ import_react62.default.createElement(import_react62.default.Fragment, null, /* @__PURE__ */ import_react62.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_react62.default.createElement(import_react63.HugeiconsIcon, { icon: import_core_free_icons21.CheckmarkCircle01Icon, size: 28 })), /* @__PURE__ */ import_react62.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_react62.default.createElement(import_react63.HugeiconsIcon, { icon: import_core_free_icons21.CancelCircleIcon, size: 28 })), onEdit && /* @__PURE__ */ import_react62.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_react62.default.createElement(import_react63.HugeiconsIcon, { icon: import_core_free_icons21.PencilEdit01Icon, size: 18 }))) : /* @__PURE__ */ import_react62.default.createElement(import_react62.default.Fragment, null, /* @__PURE__ */ import_react62.default.createElement("button", { onClick: () => {
|
|
2994
3000
|
onEdit?.(editVal);
|
|
2995
3001
|
setIsEditing(false);
|
|
2996
|
-
}, 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__ */
|
|
3002
|
+
}, 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_react62.default.createElement(import_react63.HugeiconsIcon, { icon: import_core_free_icons21.CheckmarkCircle01Icon, size: 28 })), /* @__PURE__ */ import_react62.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_react62.default.createElement(import_react63.HugeiconsIcon, { icon: import_core_free_icons21.CancelCircleIcon, size: 28 })))));
|
|
2997
3003
|
};
|
|
2998
3004
|
|
|
2999
3005
|
// src/components/AiStageCheck.tsx
|
|
3000
|
-
var
|
|
3001
|
-
var
|
|
3002
|
-
var
|
|
3006
|
+
var import_react64 = __toESM(require("react"));
|
|
3007
|
+
var import_react65 = require("@hugeicons/react");
|
|
3008
|
+
var import_core_free_icons22 = require("@hugeicons/core-free-icons");
|
|
3003
3009
|
var AiStageCheck = ({ tasks }) => {
|
|
3004
|
-
return /* @__PURE__ */
|
|
3010
|
+
return /* @__PURE__ */ import_react64.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_react64.default.createElement("span", { className: "text-[10px] tracking-widest text-purple-600 mb-1 uppercase" }, "AI Processing"), tasks.map((task) => /* @__PURE__ */ import_react64.default.createElement("div", { key: task.id, className: "flex items-center gap-3" }, task.status === "pending" && /* @__PURE__ */ import_react64.default.createElement("div", { className: "w-4 h-4 rounded-full border border-purple-200" }), task.status === "loading" && /* @__PURE__ */ import_react64.default.createElement(import_react65.HugeiconsIcon, { icon: import_core_free_icons22.Loading03Icon, size: 16, className: "animate-spin text-purple-500" }), task.status === "success" && /* @__PURE__ */ import_react64.default.createElement(import_react65.HugeiconsIcon, { icon: import_core_free_icons22.CheckmarkCircle02Icon, size: 16, className: "text-emerald-500" }), task.status === "error" && /* @__PURE__ */ import_react64.default.createElement(import_react65.HugeiconsIcon, { icon: import_core_free_icons22.CancelCircleIcon, size: 16, className: "text-red-500" }), /* @__PURE__ */ import_react64.default.createElement("span", { className: `text-xs transition-colors ${task.status === "success" ? "text-black" : task.status === "loading" ? "text-purple-700" : "text-neutral-500"}` }, task.label))));
|
|
3005
3011
|
};
|
|
3006
3012
|
|
|
3007
3013
|
// src/components/Stagger.tsx
|
|
3008
|
-
var
|
|
3009
|
-
var
|
|
3010
|
-
var
|
|
3014
|
+
var import_react66 = __toESM(require("react"));
|
|
3015
|
+
var import_react67 = require("@hugeicons/react");
|
|
3016
|
+
var import_core_free_icons23 = require("@hugeicons/core-free-icons");
|
|
3011
3017
|
var Stagger = ({ steps, currentStep }) => {
|
|
3012
3018
|
const getIconForStep = (stepName) => {
|
|
3013
3019
|
const lowerName = stepName.toLowerCase();
|
|
3014
|
-
if (lowerName.includes("document")) return
|
|
3015
|
-
if (lowerName.includes("review")) return
|
|
3016
|
-
if (lowerName.includes("submit")) return
|
|
3017
|
-
return
|
|
3020
|
+
if (lowerName.includes("document")) return import_core_free_icons23.Upload01Icon;
|
|
3021
|
+
if (lowerName.includes("review")) return import_core_free_icons23.FileSyncIcon;
|
|
3022
|
+
if (lowerName.includes("submit")) return import_core_free_icons23.CloudUploadIcon;
|
|
3023
|
+
return import_core_free_icons23.Briefcase02Icon;
|
|
3018
3024
|
};
|
|
3019
|
-
return /* @__PURE__ */
|
|
3025
|
+
return /* @__PURE__ */ import_react66.default.createElement("div", { className: "w-full flex items-center justify-between relative z-0" }, /* @__PURE__ */ import_react66.default.createElement("div", { className: "absolute left-0 top-1/2 -translate-y-1/2 w-full h-px bg-neutral-200 -z-10" }), /* @__PURE__ */ import_react66.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) => {
|
|
3020
3026
|
const isActive = idx === currentStep;
|
|
3021
3027
|
const isPassed = idx < currentStep;
|
|
3022
3028
|
const colorClass = isPassed ? "bg-emerald-500 text-white" : isActive ? "bg-neutral-200 text-neutral-500" : "bg-neutral-200 text-neutral-500";
|
|
3023
|
-
return /* @__PURE__ */
|
|
3029
|
+
return /* @__PURE__ */ import_react66.default.createElement("div", { key: step, className: `w-6 h-6 rounded-full flex items-center justify-center transition-colors duration-300 ${colorClass}` }, /* @__PURE__ */ import_react66.default.createElement(import_react67.HugeiconsIcon, { icon: getIconForStep(step), size: 11 }));
|
|
3024
3030
|
}));
|
|
3025
3031
|
};
|
|
3026
3032
|
|
|
3027
3033
|
// src/components/UniversalRegistrationFlow.tsx
|
|
3028
|
-
var
|
|
3034
|
+
var import_react68 = __toESM(require("react"));
|
|
3029
3035
|
var import_react_hot_toast7 = __toESM(require("react-hot-toast"));
|
|
3030
|
-
var
|
|
3031
|
-
var
|
|
3036
|
+
var import_react69 = require("@hugeicons/react");
|
|
3037
|
+
var import_core_free_icons24 = require("@hugeicons/core-free-icons");
|
|
3032
3038
|
var MACRO_STEPS = ["Details", "Documents", "Review", "Submit"];
|
|
3033
3039
|
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"];
|
|
3034
3040
|
var MEMBER_ROLES = ["Director Only", "Shareholder Only", "Both Director & Shareholder"];
|
|
@@ -3041,12 +3047,12 @@ var UniversalRegistrationFlow = ({
|
|
|
3041
3047
|
onRedirectToBilling,
|
|
3042
3048
|
onRedirectToApplication
|
|
3043
3049
|
}) => {
|
|
3044
|
-
const [isBooting, setIsBooting] = (0,
|
|
3045
|
-
const [macroStep, setMacroStep] = (0,
|
|
3046
|
-
const [appStatus, setAppStatus] = (0,
|
|
3047
|
-
const [isAbortModalOpen, setIsAbortModalOpen] = (0,
|
|
3048
|
-
const [isAborting, setIsAborting] = (0,
|
|
3049
|
-
const [formState, setFormState] = (0,
|
|
3050
|
+
const [isBooting, setIsBooting] = (0, import_react68.useState)(true);
|
|
3051
|
+
const [macroStep, setMacroStep] = (0, import_react68.useState)(0);
|
|
3052
|
+
const [appStatus, setAppStatus] = (0, import_react68.useState)("");
|
|
3053
|
+
const [isAbortModalOpen, setIsAbortModalOpen] = (0, import_react68.useState)(false);
|
|
3054
|
+
const [isAborting, setIsAborting] = (0, import_react68.useState)(false);
|
|
3055
|
+
const [formState, setFormState] = (0, import_react68.useState)({
|
|
3050
3056
|
natureApproved: false,
|
|
3051
3057
|
nameApproved: false,
|
|
3052
3058
|
addressApproved: false,
|
|
@@ -3057,13 +3063,13 @@ var UniversalRegistrationFlow = ({
|
|
|
3057
3063
|
passportApproved: false,
|
|
3058
3064
|
signatureApproved: false
|
|
3059
3065
|
});
|
|
3060
|
-
const idRef = (0,
|
|
3061
|
-
const passportRef = (0,
|
|
3062
|
-
const signatureRef = (0,
|
|
3063
|
-
const other1Ref = (0,
|
|
3064
|
-
const other2Ref = (0,
|
|
3065
|
-
const other3Ref = (0,
|
|
3066
|
-
const [formData, setFormData] = (0,
|
|
3066
|
+
const idRef = (0, import_react68.useRef)(null);
|
|
3067
|
+
const passportRef = (0, import_react68.useRef)(null);
|
|
3068
|
+
const signatureRef = (0, import_react68.useRef)(null);
|
|
3069
|
+
const other1Ref = (0, import_react68.useRef)(null);
|
|
3070
|
+
const other2Ref = (0, import_react68.useRef)(null);
|
|
3071
|
+
const other3Ref = (0, import_react68.useRef)(null);
|
|
3072
|
+
const [formData, setFormData] = (0, import_react68.useState)({
|
|
3067
3073
|
businessDesc: "",
|
|
3068
3074
|
natureOfBusiness: null,
|
|
3069
3075
|
proposedName: "",
|
|
@@ -3090,22 +3096,22 @@ var UniversalRegistrationFlow = ({
|
|
|
3090
3096
|
otherDoc3Url: "",
|
|
3091
3097
|
otherDoc3Meta: null
|
|
3092
3098
|
});
|
|
3093
|
-
const [activeModal, setActiveModal] = (0,
|
|
3094
|
-
const [iAgree, setIAgree] = (0,
|
|
3095
|
-
const [isAnalyzingNature, setIsAnalyzingNature] = (0,
|
|
3096
|
-
const [suggestedNature, setSuggestedNature] = (0,
|
|
3097
|
-
const [isCheckingQualifier, setIsCheckingQualifier] = (0,
|
|
3098
|
-
const [qualifierCheckResult, setQualifierCheckResult] = (0,
|
|
3099
|
-
const [isCheckingName, setIsCheckingName] = (0,
|
|
3100
|
-
const [nameCheckResult, setNameCheckResult] = (0,
|
|
3101
|
-
const [globalExtractingId, setGlobalExtractingId] = (0,
|
|
3102
|
-
const [globalUploadingPassport, setGlobalUploadingPassport] = (0,
|
|
3103
|
-
const [globalUploadingSignature, setGlobalUploadingSignature] = (0,
|
|
3104
|
-
const [isUploadingOther1, setIsUploadingOther1] = (0,
|
|
3105
|
-
const [isUploadingOther2, setIsUploadingOther2] = (0,
|
|
3106
|
-
const [isUploadingOther3, setIsUploadingOther3] = (0,
|
|
3107
|
-
const [aiTasks, setAiTasks] = (0,
|
|
3108
|
-
const [isSubmitting, setIsSubmitting] = (0,
|
|
3099
|
+
const [activeModal, setActiveModal] = (0, import_react68.useState)({ isOpen: false, type: null, memberIndex: null });
|
|
3100
|
+
const [iAgree, setIAgree] = (0, import_react68.useState)(false);
|
|
3101
|
+
const [isAnalyzingNature, setIsAnalyzingNature] = (0, import_react68.useState)(false);
|
|
3102
|
+
const [suggestedNature, setSuggestedNature] = (0, import_react68.useState)(null);
|
|
3103
|
+
const [isCheckingQualifier, setIsCheckingQualifier] = (0, import_react68.useState)(false);
|
|
3104
|
+
const [qualifierCheckResult, setQualifierCheckResult] = (0, import_react68.useState)(null);
|
|
3105
|
+
const [isCheckingName, setIsCheckingName] = (0, import_react68.useState)(false);
|
|
3106
|
+
const [nameCheckResult, setNameCheckResult] = (0, import_react68.useState)(null);
|
|
3107
|
+
const [globalExtractingId, setGlobalExtractingId] = (0, import_react68.useState)(false);
|
|
3108
|
+
const [globalUploadingPassport, setGlobalUploadingPassport] = (0, import_react68.useState)(false);
|
|
3109
|
+
const [globalUploadingSignature, setGlobalUploadingSignature] = (0, import_react68.useState)(false);
|
|
3110
|
+
const [isUploadingOther1, setIsUploadingOther1] = (0, import_react68.useState)(false);
|
|
3111
|
+
const [isUploadingOther2, setIsUploadingOther2] = (0, import_react68.useState)(false);
|
|
3112
|
+
const [isUploadingOther3, setIsUploadingOther3] = (0, import_react68.useState)(false);
|
|
3113
|
+
const [aiTasks, setAiTasks] = (0, import_react68.useState)([]);
|
|
3114
|
+
const [isSubmitting, setIsSubmitting] = (0, import_react68.useState)(false);
|
|
3109
3115
|
const isReadOnly = ["PENDING", "AWAITING_PAYMENT", "COMPLETED"].includes(appStatus);
|
|
3110
3116
|
const isAnyUploading = globalExtractingId || globalUploadingPassport || globalUploadingSignature || isUploadingOther1 || isUploadingOther2 || isUploadingOther3;
|
|
3111
3117
|
const baseApi = async (action, payload = {}) => {
|
|
@@ -3120,7 +3126,7 @@ var UniversalRegistrationFlow = ({
|
|
|
3120
3126
|
return { success: false, error: "Network communication failed." };
|
|
3121
3127
|
}
|
|
3122
3128
|
};
|
|
3123
|
-
(0,
|
|
3129
|
+
(0, import_react68.useEffect)(() => {
|
|
3124
3130
|
baseApi("progress_load").then((data) => {
|
|
3125
3131
|
if (data.success && data.data) {
|
|
3126
3132
|
const meta = data.data;
|
|
@@ -3596,23 +3602,23 @@ var UniversalRegistrationFlow = ({
|
|
|
3596
3602
|
const isStep0Valid = type === "company" ? formState.natureApproved && formState.nameApproved && formState.addressApproved && formState.membersDetailsApproved : formState.natureApproved && formState.nameApproved && formState.addressApproved && formState.ownerApproved;
|
|
3597
3603
|
const isStep1Valid = type === "company" ? formState.membersDocsApproved : formState.idApproved && formState.passportApproved && formState.signatureApproved;
|
|
3598
3604
|
const titleText = type === "company" ? "Company Incorporation (LLC)" : "Business Name Registration";
|
|
3599
|
-
if (isBooting) return /* @__PURE__ */
|
|
3605
|
+
if (isBooting) return /* @__PURE__ */ import_react68.default.createElement("div", { className: "flex justify-center py-20" }, /* @__PURE__ */ import_react68.default.createElement(import_react69.HugeiconsIcon, { icon: import_core_free_icons24.Loading03Icon, size: 32, className: "animate-spin text-black" }));
|
|
3600
3606
|
if (!["DRAFT", "QUEUED", "REJECTED"].includes(appStatus) && appStatus !== "") {
|
|
3601
|
-
return /* @__PURE__ */
|
|
3607
|
+
return /* @__PURE__ */ import_react68.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_react68.default.createElement(import_react68.default.Fragment, null, /* @__PURE__ */ import_react68.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_react68.default.createElement(import_react69.HugeiconsIcon, { icon: import_core_free_icons24.CheckmarkBadge01Icon, size: 35 })), /* @__PURE__ */ import_react68.default.createElement("h2", { className: "text-xl font-serif text-black" }, "Registration Completed"), /* @__PURE__ */ import_react68.default.createElement("p", { className: "text-sm text-neutral-500 max-w-md" }, "Your application has been successfully verified and registered.")) : appStatus === "PENDING" ? /* @__PURE__ */ import_react68.default.createElement(import_react68.default.Fragment, null, /* @__PURE__ */ import_react68.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_react68.default.createElement(import_react69.HugeiconsIcon, { icon: import_core_free_icons24.HourglassIcon, size: 35, className: "animate-spin" })), /* @__PURE__ */ import_react68.default.createElement("h2", { className: "text-xl font-serif text-black" }, "Application is Pending"), /* @__PURE__ */ import_react68.default.createElement("p", { className: "text-sm text-neutral-500 max-w-md" }, "Your application is currently pending review.")) : appStatus === "AWAITING_PAYMENT" ? /* @__PURE__ */ import_react68.default.createElement(import_react68.default.Fragment, null, /* @__PURE__ */ import_react68.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_react68.default.createElement(import_react69.HugeiconsIcon, { icon: import_core_free_icons24.HourglassIcon, size: 35, className: "animate-pulse" })), /* @__PURE__ */ import_react68.default.createElement("h2", { className: "text-xl font-serif text-black" }, "Awaiting Payment"), /* @__PURE__ */ import_react68.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_react68.default.createElement("div", { className: "mt-6 flex flex-col items-center gap-3" }, /* @__PURE__ */ import_react68.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_react68.default.createElement("button", { onClick: () => setIsAbortModalOpen(true), className: "px-8 py-3 border border-neutral-200 text-neutral-600 text-[11px] tracking-widest rounded-full hover:bg-neutral-50 outline-none" }, "Abort & Edit Application"))) : /* @__PURE__ */ import_react68.default.createElement(import_react68.default.Fragment, null, /* @__PURE__ */ import_react68.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_react68.default.createElement(import_react69.HugeiconsIcon, { icon: import_core_free_icons24.HourglassIcon, size: 35 })), /* @__PURE__ */ import_react68.default.createElement("h2", { className: "text-xl font-serif text-black" }, "Application Submitted"), /* @__PURE__ */ import_react68.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_react68.default.createElement("div", { className: "mt-6 flex flex-col items-center gap-3" }, /* @__PURE__ */ import_react68.default.createElement("button", { onClick: () => setIsAbortModalOpen(true), className: "px-8 py-3 border border-neutral-200 text-neutral-600 text-[11px] tracking-widest rounded-full hover:bg-neutral-50 outline-none" }, "Abort Application"))), isAbortModalOpen && /* @__PURE__ */ import_react68.default.createElement("div", { className: "fixed inset-0 z-110 flex items-center justify-center p-4" }, /* @__PURE__ */ import_react68.default.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => !isAborting && setIsAbortModalOpen(false) }), /* @__PURE__ */ import_react68.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_react68.default.createElement("div", { className: "p-6 flex flex-col gap-4 text-center" }, /* @__PURE__ */ import_react68.default.createElement("h3", { className: "text-[17px] font-serif text-black tracking-tight" }, "Abort Application?"), /* @__PURE__ */ import_react68.default.createElement("p", { className: "text-[12px] text-neutral-500 leading-relaxed" }, "Are you sure you want to abort? If you have already made a payment, returning to draft may cause issues. Your invoice will be deleted.")), /* @__PURE__ */ import_react68.default.createElement("div", { className: "w-full flex " }, /* @__PURE__ */ import_react68.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_react68.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")))));
|
|
3602
3608
|
}
|
|
3603
|
-
return /* @__PURE__ */
|
|
3609
|
+
return /* @__PURE__ */ import_react68.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_react68.default.createElement("div", { className: "flex flex-col gap-8" }, /* @__PURE__ */ import_react68.default.createElement("div", null, /* @__PURE__ */ import_react68.default.createElement("h2", { className: "text-xl font-serif text-black tracking-tight mb-1" }, titleText), /* @__PURE__ */ import_react68.default.createElement("p", { className: "text-sm text-neutral-500" }, "Answer the questions below to build your official application.")), /* @__PURE__ */ import_react68.default.createElement("div", { className: "px-2" }, /* @__PURE__ */ import_react68.default.createElement(Stagger, { steps: MACRO_STEPS, currentStep: macroStep }))), /* @__PURE__ */ import_react68.default.createElement("div", { className: "flex flex-col gap-8" }, macroStep === 0 && /* @__PURE__ */ import_react68.default.createElement("div", { className: "flex flex-col gap-8 animate-in fade-in" }, /* @__PURE__ */ import_react68.default.createElement("div", { className: "flex flex-col gap-4" }, /* @__PURE__ */ import_react68.default.createElement("div", { className: "flex items-center text-black" }, /* @__PURE__ */ import_react68.default.createElement("h3", { className: "text-sm " }, "What does your ", type === "company" ? "company" : "business", " do?")), !formState.natureApproved ? /* @__PURE__ */ import_react68.default.createElement(import_react68.default.Fragment, null, /* @__PURE__ */ import_react68.default.createElement("div", { className: "flex flex-col gap-3 " }, /* @__PURE__ */ import_react68.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_react68.default.createElement(ThreeDActionButton, { onClick: handleAnalyzeNature, disabled: formData.businessDesc.length < 5 || isAnalyzingNature || isReadOnly, isLoading: isAnalyzingNature, className: "w-fit" }, "Analyze Nature")), isAnalyzingNature && /* @__PURE__ */ import_react68.default.createElement("div", { className: " mt-2" }, /* @__PURE__ */ import_react68.default.createElement(AiStageCheck, { tasks: [{ id: "1", label: "Matching with Official Categories...", status: "loading" }] })), suggestedNature && /* @__PURE__ */ import_react68.default.createElement("div", { className: " mt-2 animate-in fade-in" }, /* @__PURE__ */ import_react68.default.createElement(AiApproveDecline, { suggestionTitle: "Classification Found", suggestionValue: /* @__PURE__ */ import_react68.default.createElement("div", null, /* @__PURE__ */ import_react68.default.createElement("p", { className: " text-black" }, suggestedNature.specificLabel), /* @__PURE__ */ import_react68.default.createElement("p", { className: "text-xs text-neutral-400 mt-1" }, "Category: ", suggestedNature.categoryLabel)), onApprove: () => {
|
|
3604
3610
|
const newForm = { ...formData, natureOfBusiness: suggestedNature };
|
|
3605
3611
|
setFormData(newForm);
|
|
3606
3612
|
approveSection("natureApproved", newForm);
|
|
3607
|
-
}, onDecline: () => setSuggestedNature(null) }))) : /* @__PURE__ */
|
|
3613
|
+
}, onDecline: () => setSuggestedNature(null) }))) : /* @__PURE__ */ import_react68.default.createElement("div", { className: " flex items-center justify-between" }, /* @__PURE__ */ import_react68.default.createElement("div", { className: "pr-4" }, /* @__PURE__ */ import_react68.default.createElement("p", { className: "text-sm text-black" }, formData.natureOfBusiness?.specificLabel), /* @__PURE__ */ import_react68.default.createElement("p", { className: "text-xs text-neutral-400 mt-1" }, formData.businessDesc)), !isReadOnly && /* @__PURE__ */ import_react68.default.createElement("button", { onClick: () => editSection("natureApproved"), className: "p-2 text-neutral-400 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ import_react68.default.createElement(import_react69.HugeiconsIcon, { icon: import_core_free_icons24.PencilEdit01Icon, size: 16 })))), formState.natureApproved && /* @__PURE__ */ import_react68.default.createElement("div", { className: "flex flex-col gap-4 pt-6 animate-in slide-in-from-top-4 duration-500" }, /* @__PURE__ */ import_react68.default.createElement("div", { className: "flex items-center text-black" }, /* @__PURE__ */ import_react68.default.createElement("h3", { className: "text-sm " }, "What name would you like to register?")), /* @__PURE__ */ import_react68.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_react68.default.createElement(import_react68.default.Fragment, null, /* @__PURE__ */ import_react68.default.createElement("div", { className: "flex flex-col gap-4" }, /* @__PURE__ */ import_react68.default.createElement(TextInput, { label: "Proposed Name 1 (Preferred)", value: formData.proposedName, onChange: (v) => setFormData({ ...formData, proposedName: v }), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ import_react68.default.createElement(TextInput, { label: "Proposed Name 2 (Alternative)", value: formData.proposedName2, onChange: (v) => setFormData({ ...formData, proposedName2: v }), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ import_react68.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_react68.default.createElement("div", { className: " mt-2" }, /* @__PURE__ */ import_react68.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_react68.default.createElement("div", { className: "mt-2 animate-in fade-in" }, /* @__PURE__ */ import_react68.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_react68.default.createElement("div", null, /* @__PURE__ */ import_react68.default.createElement("span", { className: "text-[10px] tracking-widest text-purple-600 block mb-1" }, "AI Suggestion: Structural Qualifier Missing"), /* @__PURE__ */ import_react68.default.createElement("p", { className: "text-sm text-black mb-3" }, "Nigerian registrations require a structural qualifier to be approved."), /* @__PURE__ */ import_react68.default.createElement("div", { className: "flex flex-col gap-2" }, (qualifierCheckResult.suggestions || []).map((alt, i) => /* @__PURE__ */ import_react68.default.createElement("button", { key: i, onClick: () => setFormData({ ...formData, proposedName: alt }), className: "text-left px-4 py-2 border border-neutral-200 rounded-full hover:border-black text-sm transition-colors outline-none" }, alt)))), /* @__PURE__ */ import_react68.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_react68.default.createElement("div", { className: " mt-2 animate-in fade-in" }, nameCheckResult.status === "APPROVED" || nameCheckResult.status === "APPROVED_WARNING" || nameCheckResult.status === "SKIPPED" ? /* @__PURE__ */ import_react68.default.createElement(AiApproveDecline, { suggestionTitle: nameCheckResult.status === "APPROVED" ? "Name Available!" : "Fallback Approval", suggestionValue: /* @__PURE__ */ import_react68.default.createElement("div", null, /* @__PURE__ */ import_react68.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_react68.default.createElement("p", { className: "text-xs text-neutral-600" }, nameCheckResult.message), /* @__PURE__ */ import_react68.default.createElement("p", { className: "text-xs text-neutral-600 mt-2 " }, "Proposed Option: ", nameCheckResult.approvedOption)), onApprove: () => {
|
|
3608
3614
|
const newForm = { ...formData, approvedName: nameCheckResult.approvedOption };
|
|
3609
3615
|
setFormData(newForm);
|
|
3610
3616
|
approveSection("nameApproved", newForm);
|
|
3611
|
-
}, onDecline: () => setNameCheckResult(null) }) : /* @__PURE__ */
|
|
3612
|
-
}, disabled: isReadOnly || isSubmitting })), /* @__PURE__ */
|
|
3613
|
-
}, disabled: isReadOnly || isSubmitting }), member.role !== "Director Only" && /* @__PURE__ */
|
|
3614
|
-
}, disabled: isReadOnly || isSubmitting }), /* @__PURE__ */
|
|
3615
|
-
}, disabled: isReadOnly || isSubmitting })))), /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center justify-between mt-2" }, !isReadOnly && /* @__PURE__ */ import_react65.default.createElement("button", { onClick: addCompanyMember, className: "px-6 py-2 bg-white border border-neutral-200 text-black text-[11px] tracking-widest rounded-full hover:bg-neutral-50 transition-colors outline-none" }, "+ Add Member"), /* @__PURE__ */ import_react65.default.createElement(ThreeDActionButton, { onClick: () => approveSection("membersDetailsApproved"), disabled: !areCompanyMembersValid() || isReadOnly, className: "w-fit" }, "Confirm Members"))) : /* @__PURE__ */ import_react65.default.createElement("div", { className: " flex items-center justify-between" }, /* @__PURE__ */ import_react65.default.createElement("div", null, /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-sm text-black" }, formData.members.length, " Member(s) Registered"), /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-xs text-neutral-500 mt-1" }, "Total Shares: 100% Verified.")), !isReadOnly && /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => editSection("membersDetailsApproved"), className: "p-2 text-neutral-400 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.PencilEdit01Icon, size: 16 })))), formState.addressApproved && type === "business" && /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col gap-4 pt-6 animate-in slide-in-from-top-4 duration-500" }, /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center text-black" }, /* @__PURE__ */ import_react65.default.createElement("h3", { className: "text-sm " }, "Who owns the business?")), /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-xs text-neutral-400 -mt-2" }, "Provide basic contact info. We will extract your DOB and ID number automatically in the next step."), !formState.ownerApproved ? /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col gap-4 " }, /* @__PURE__ */ import_react65.default.createElement(TextInput, { label: "Full Name", value: formData.ownerName, onChange: (v) => setFormData({ ...formData, ownerName: v }), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ import_react65.default.createElement("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-4" }, /* @__PURE__ */ import_react65.default.createElement(NumberInput, { label: "Phone Number", value: formData.ownerPhone, onChange: (v) => setFormData({ ...formData, ownerPhone: v }), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ import_react65.default.createElement(TextInput, { label: "Email Address", value: formData.ownerEmail, onChange: (v) => setFormData({ ...formData, ownerEmail: v }), disabled: isReadOnly || isSubmitting })), /* @__PURE__ */ import_react65.default.createElement(ThreeDActionButton, { onClick: () => approveSection("ownerApproved"), disabled: !formData.ownerName || !formData.ownerPhone || !formData.ownerEmail || isReadOnly, className: "w-fit mt-2" }, "Confirm Owner Details")) : /* @__PURE__ */ import_react65.default.createElement("div", { className: " flex items-center justify-between" }, /* @__PURE__ */ import_react65.default.createElement("div", null, /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-sm text-black" }, formData.ownerName), /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-xs text-neutral-500 mt-1" }, formData.ownerEmail, " \u2022 ", formData.ownerPhone)), !isReadOnly && /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => editSection("ownerApproved"), className: "p-2 text-neutral-400 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.PencilEdit01Icon, size: 16 })))), /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center justify-between mt-8 pt-6 " }, /* @__PURE__ */ import_react65.default.createElement("button", { onClick: handleBack, className: "flex items-center gap-2 px-6 py-2 text-[11px] tracking-widest text-neutral-500 hover:text-black hover:bg-neutral-50 rounded-full transition-colors outline-none" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.ArrowLeft01Icon, size: 14 }), " Close"), /* @__PURE__ */ import_react65.default.createElement(ThreeDActionButton, { onClick: handleNext, disabled: !isStep0Valid, className: "w-fit shrink-0" }, "Next Step"))), macroStep === 1 && /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col gap-8 animate-in fade-in" }, type === "company" ? /* @__PURE__ */ import_react65.default.createElement(import_react65.default.Fragment, null, /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col gap-2" }, /* @__PURE__ */ import_react65.default.createElement("h3", { className: "text-sm text-black" }, "Member Identity Documents"), /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-xs text-neutral-500 leading-relaxed" }, "Upload valid means of identification, passport photographs, and signatures for every director and shareholder.")), !formState.membersDocsApproved ? /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col gap-6" }, formData.members.map((member, i) => /* @__PURE__ */ import_react65.default.createElement("div", { key: member.id, className: "flex flex-col gap-4" }, /* @__PURE__ */ import_react65.default.createElement("span", { className: "text-[11px] tracking-widest text-black mb-1" }, member.fullName || `Member ${i + 1}`, " ", /* @__PURE__ */ import_react65.default.createElement("span", { className: "text-neutral-400 ml-2" }, "(", member.role, ")")), /* @__PURE__ */ import_react65.default.createElement("input", { id: `id-upload-${i}`, type: "file", accept: "image/jpeg, image/png, image/webp, application/pdf", className: "hidden", onChange: (e) => handleCompanyMemberUpload(e, i, "id"), disabled: isReadOnly || isAnyUploading }), /* @__PURE__ */ import_react65.default.createElement("input", { id: `pass-upload-${i}`, type: "file", accept: "image/jpeg, image/png, image/webp, application/pdf", className: "hidden", onChange: (e) => handleCompanyMemberUpload(e, i, "passport"), disabled: isReadOnly || isAnyUploading }), /* @__PURE__ */ import_react65.default.createElement("input", { id: `sig-upload-${i}`, type: "file", accept: "image/jpeg, image/png, image/webp, application/pdf", className: "hidden", onChange: (e) => handleCompanyMemberUpload(e, i, "signature"), disabled: isReadOnly || isAnyUploading }), !member.idExtractedData && !globalExtractingId ? /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => !isReadOnly && !isAnyUploading && document.getElementById(`id-upload-${i}`)?.click(), className: `flex items-center gap-3 p-4 border border-neutral-200 rounded-full transition-colors text-sm w-full outline-none ${isAnyUploading ? "opacity-50 cursor-not-allowed bg-neutral-50 text-neutral-400" : "text-black hover:bg-neutral-50"}`, disabled: isReadOnly || isAnyUploading }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.Upload01Icon, size: 18, className: "text-neutral-400" }), " Upload Valid ID (NIN, License, Voter's Card)") : globalExtractingId && !member.idExtractedData ? /* @__PURE__ */ import_react65.default.createElement("div", { className: " mt-2" }, /* @__PURE__ */ import_react65.default.createElement(AiStageCheck, { tasks: aiTasks })) : member.idExtractedData ? /* @__PURE__ */ import_react65.default.createElement("div", { className: " mt-2 animate-in fade-in border border-purple-100 bg-linear-to-bl from-purple-50/80 via-white to-white p-5 rounded-xl flex flex-col gap-4 relative overflow-hidden" }, /* @__PURE__ */ import_react65.default.createElement("div", null, /* @__PURE__ */ import_react65.default.createElement("span", { className: "text-[10px] tracking-widest text-purple-600 block mb-2" }, "Review Extracted ID"), /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col gap-4" }, /* @__PURE__ */ import_react65.default.createElement(TextInput, { label: "Full Name on ID", value: member.idExtractedData.fullName, onChange: (v) => updateCompanyMemberInfo(i, "idExtractedData", { ...member.idExtractedData, fullName: v }), disabled: isReadOnly || isAnyUploading }), /* @__PURE__ */ import_react65.default.createElement("div", { className: "grid grid-cols-2 gap-4" }, /* @__PURE__ */ import_react65.default.createElement(TextInput, { label: "ID Number", value: member.idExtractedData.idNumber, onChange: (v) => updateCompanyMemberInfo(i, "idExtractedData", { ...member.idExtractedData, idNumber: v }), disabled: isReadOnly || isAnyUploading }), /* @__PURE__ */ import_react65.default.createElement(TextInput, { label: "Date of Birth", value: member.idExtractedData.dob, onChange: (v) => updateCompanyMemberInfo(i, "idExtractedData", { ...member.idExtractedData, dob: v }), disabled: isReadOnly || isAnyUploading })))), /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center gap-2 mt-2" }, !isReadOnly && /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => deleteCompanyMemberDocument(i, "id"), disabled: isAnyUploading, className: "px-6 py-2 bg-white border border-neutral-200 text-neutral-500 text-[11px] rounded-full tracking-widest hover:bg-neutral-50 transition-colors outline-none disabled:opacity-50 disabled:cursor-not-allowed" }, "Delete & Re-upload ID"))) : null, !member.passportFileUrl && !globalUploadingPassport ? /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => !isReadOnly && !isAnyUploading && document.getElementById(`pass-upload-${i}`)?.click(), className: `flex items-center gap-3 p-4 border border-neutral-200 rounded-full transition-colors text-sm w-full outline-none ${isAnyUploading ? "opacity-50 cursor-not-allowed bg-neutral-50 text-neutral-400" : "text-black hover:bg-neutral-50"}`, disabled: isReadOnly || isAnyUploading }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.Upload01Icon, size: 18, className: "text-neutral-400" }), " Upload Passport Photo") : globalUploadingPassport && !member.passportFileUrl ? /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center gap-3 p-4 border border-neutral-200 rounded-full bg-neutral-50 text-neutral-500 text-sm w-full" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.Loading03Icon, size: 18, className: "animate-spin text-black" }), " Uploading Passport...") : member.passportFileUrl ? /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center justify-between p-4 bg-emerald-50 rounded-full text-emerald-800 text-sm w-full" }, /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.IdentificationIcon, size: 18 }), " Passport Uploaded"), !isReadOnly && /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => deleteCompanyMemberDocument(i, "passport"), disabled: isAnyUploading, className: "text-emerald-700 hover:text-red-500 transition-colors p-1 outline-none shrink-0 disabled:opacity-50 disabled:cursor-not-allowed" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.Delete02Icon, size: 16 }))) : null, !member.signatureFileUrl && !globalUploadingSignature ? /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => !isReadOnly && !isAnyUploading && document.getElementById(`sig-upload-${i}`)?.click(), className: `flex items-center gap-3 p-4 border border-neutral-200 rounded-full transition-colors text-sm w-full outline-none ${isAnyUploading ? "opacity-50 cursor-not-allowed bg-neutral-50 text-neutral-400" : "text-black hover:bg-neutral-50"}`, disabled: isReadOnly || isAnyUploading }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.Upload01Icon, size: 18, className: "text-neutral-400" }), " Upload Signature") : globalUploadingSignature && !member.signatureFileUrl ? /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center gap-3 p-4 border border-neutral-200 rounded-full bg-neutral-50 text-neutral-500 text-sm w-full" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.Loading03Icon, size: 18, className: "animate-spin text-black" }), " Uploading Signature...") : member.signatureFileUrl ? /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center justify-between p-4 bg-emerald-50 rounded-full text-emerald-800 text-sm w-full" }, /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.SignatureIcon, size: 18 }), " Signature Uploaded"), !isReadOnly && /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => deleteCompanyMemberDocument(i, "signature"), disabled: isAnyUploading, className: "text-emerald-700 hover:text-red-500 transition-colors p-1 outline-none shrink-0 disabled:opacity-50 disabled:cursor-not-allowed" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.Delete02Icon, size: 16 }))) : null)), /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex justify-end" }, /* @__PURE__ */ import_react65.default.createElement(ThreeDActionButton, { onClick: () => approveSection("membersDocsApproved"), disabled: !areCompanyMemberDocsValid() || isReadOnly || isAnyUploading, className: "w-fit" }, "Confirm All Documents"))) : /* @__PURE__ */ import_react65.default.createElement("div", { className: " flex items-center justify-between bg-emerald-50 p-6 rounded-full" }, /* @__PURE__ */ import_react65.default.createElement("div", null, /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-sm text-emerald-800" }, "Documents Uploaded"), /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-xs text-emerald-600 mt-1" }, "Data safely extracted.")), !isReadOnly && /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => editSection("membersDocsApproved"), className: "p-2 text-emerald-700 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.PencilEdit01Icon, size: 16 })))) : /* @__PURE__ */ import_react65.default.createElement(import_react65.default.Fragment, null, /* @__PURE__ */ import_react65.default.createElement("input", { type: "file", accept: "image/jpeg, image/png, image/webp, application/pdf", ref: idRef, onChange: (e) => handleBusinessUpload(e, "id"), disabled: isReadOnly || isAnyUploading, className: "hidden" }), /* @__PURE__ */ import_react65.default.createElement("input", { type: "file", accept: "image/jpeg, image/png, image/webp, application/pdf", ref: passportRef, onChange: (e) => handleBusinessUpload(e, "passport"), disabled: isReadOnly || isAnyUploading, className: "hidden" }), /* @__PURE__ */ import_react65.default.createElement("input", { type: "file", accept: "image/jpeg, image/png, image/webp, application/pdf", ref: signatureRef, onChange: (e) => handleBusinessUpload(e, "signature"), disabled: isReadOnly || isAnyUploading, className: "hidden" }), /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col gap-4" }, /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center gap-2 text-black" }, /* @__PURE__ */ import_react65.default.createElement("h3", { className: "text-sm " }, "Upload Means of Identification")), /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-xs text-neutral-500 -mt-2" }, "Upload your NIN, Driver's License, Voter's Card, or Int'l Passport (JPG/PNG/WEBP)."), !formState.idApproved ? /* @__PURE__ */ import_react65.default.createElement(import_react65.default.Fragment, null, /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => !isReadOnly && !isAnyUploading && idRef.current?.click(), disabled: isReadOnly || isAnyUploading, className: `w-full h-32 border border-neutral-200 rounded-full flex flex-col items-center justify-center gap-2 transition-colors outline-none ${isAnyUploading ? "opacity-50 cursor-not-allowed bg-neutral-50 text-neutral-400" : "hover:bg-neutral-50 text-black"}` }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.Upload01Icon, size: 24, className: "text-neutral-400" }), /* @__PURE__ */ import_react65.default.createElement("span", { className: "text-xs" }, "Select ID Image to Upload")), globalExtractingId && /* @__PURE__ */ import_react65.default.createElement("div", { className: " mt-2" }, /* @__PURE__ */ import_react65.default.createElement(AiStageCheck, { tasks: aiTasks })), formData.idExtractedData && /* @__PURE__ */ import_react65.default.createElement("div", { className: " mt-2 animate-in fade-in border border-purple-100 bg-linear-to-bl from-purple-50/80 via-white to-white p-5 rounded-2xl flex flex-col gap-4 relative overflow-hidden" }, /* @__PURE__ */ import_react65.default.createElement("div", null, /* @__PURE__ */ import_react65.default.createElement("span", { className: "text-[10px] tracking-widest text-purple-600 block mb-2" }, "Review AI Extracted Data"), /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-xs text-neutral-500 mb-4" }, "Please verify the extracted information and correct any OCR mistakes before approving."), /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col gap-4" }, /* @__PURE__ */ import_react65.default.createElement(TextInput, { label: "Full Name on ID", value: formData.idExtractedData.fullName, onChange: (v) => setFormData((f) => ({ ...f, idExtractedData: { ...f.idExtractedData, fullName: v } })), disabled: isReadOnly || isAnyUploading }), /* @__PURE__ */ import_react65.default.createElement("div", { className: "grid grid-cols-2 gap-4" }, /* @__PURE__ */ import_react65.default.createElement(TextInput, { label: "ID Number", value: formData.idExtractedData.idNumber, onChange: (v) => setFormData((f) => ({ ...f, idExtractedData: { ...f.idExtractedData, idNumber: v } })), disabled: isReadOnly || isAnyUploading }), /* @__PURE__ */ import_react65.default.createElement(TextInput, { label: "Date of Birth (YYYY-MM-DD)", value: formData.idExtractedData.dob, onChange: (v) => setFormData((f) => ({ ...f, idExtractedData: { ...f.idExtractedData, dob: v } })), disabled: isReadOnly || isAnyUploading })))), /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center gap-2 mt-2" }, /* @__PURE__ */ import_react65.default.createElement(ThreeDActionButton, { onClick: () => approveSection("idApproved"), disabled: isAnyUploading || isReadOnly, className: "w-fit shrink-0" }, "Approve Data"), !isReadOnly && /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => deleteBusinessDocument("id"), disabled: isAnyUploading, className: "px-6 py-2 bg-white border border-neutral-200 text-neutral-500 text-[11px] rounded-full tracking-widest hover:bg-neutral-50 transition-colors outline-none disabled:opacity-50 disabled:cursor-not-allowed" }, "Delete & Re-upload")))) : /* @__PURE__ */ import_react65.default.createElement("div", { className: " flex items-center justify-between bg-emerald-50 p-6 rounded-full" }, /* @__PURE__ */ import_react65.default.createElement("div", null, /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-sm text-emerald-800" }, "ID Document Verified"), /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-xs text-emerald-600 mt-1" }, "Data safely extracted and stored.")), !isReadOnly && /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => editSection("idApproved"), className: "p-2 text-emerald-700 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.PencilEdit01Icon, size: 16 })))), /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col gap-4 pt-6 animate-in slide-in-from-top-4 duration-500" }, /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col gap-3 " }, !formState.passportApproved && !globalUploadingPassport ? /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => !isReadOnly && !isAnyUploading && passportRef.current?.click(), disabled: isReadOnly || isAnyUploading, className: `flex items-center gap-3 p-4 border border-neutral-200 rounded-full transition-colors text-sm w-full outline-none ${isAnyUploading ? "opacity-50 cursor-not-allowed bg-neutral-50 text-neutral-400" : "text-black hover:bg-neutral-50"}` }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.Upload01Icon, size: 18, className: "text-neutral-400" }), " Upload Passport Photo") : globalUploadingPassport && !formData.passportFileUrl ? /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center gap-3 p-4 border border-neutral-200 rounded-full bg-neutral-50 text-neutral-500 text-sm w-full" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.Loading03Icon, size: 18, className: "animate-spin text-black" }), " Uploading Passport...") : /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center justify-between p-4 bg-emerald-50 rounded-full text-emerald-800 text-sm w-full" }, /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.IdentificationIcon, size: 18 }), " Passport Uploaded"), !isReadOnly && /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => deleteBusinessDocument("passport"), disabled: isAnyUploading, className: "text-emerald-700 hover:text-red-500 transition-colors p-1 outline-none shrink-0 disabled:opacity-50 disabled:cursor-not-allowed" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.Delete02Icon, size: 16 }))), !formState.signatureApproved && !globalUploadingSignature ? /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => !isReadOnly && !isAnyUploading && signatureRef.current?.click(), disabled: isReadOnly || isAnyUploading, className: `flex items-center gap-3 p-4 border border-neutral-200 rounded-full transition-colors text-sm w-full outline-none ${isAnyUploading ? "opacity-50 cursor-not-allowed bg-neutral-50 text-neutral-400" : "text-black hover:bg-neutral-50"}` }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.Upload01Icon, size: 18, className: "text-neutral-400" }), " Upload Signature") : globalUploadingSignature && !formData.signatureFileUrl ? /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center gap-3 p-4 border border-neutral-200 rounded-full bg-neutral-50 text-neutral-500 text-sm w-full" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.Loading03Icon, size: 18, className: "animate-spin text-black" }), " Uploading Signature...") : /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center justify-between p-4 bg-emerald-50 rounded-full text-emerald-800 text-sm w-full" }, /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.SignatureIcon, size: 18 }), " Signature Uploaded"), !isReadOnly && /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => deleteBusinessDocument("signature"), disabled: isAnyUploading, className: "text-emerald-700 hover:text-red-500 transition-colors p-1 outline-none shrink-0 disabled:opacity-50 disabled:cursor-not-allowed" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons21.Delete02Icon, size: 16 })))))), /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col gap-4 pt-6 border-t border-neutral-200 animate-in slide-in-from-top-4 duration-500" }, /* @__PURE__ */ import_react65.default.createElement("input", { type: "file", accept: "image/jpeg, image/png, image/webp, application/pdf", ref: other1Ref, onChange: (e) => handleOptionalUpload(e, "other1"), disabled: isAnyUploading || isReadOnly, className: "hidden" }), /* @__PURE__ */ import_react65.default.createElement("input", { type: "file", accept: "image/jpeg, image/png, image/webp, application/pdf", ref: other2Ref, onChange: (e) => handleOptionalUpload(e, "other2"), disabled: isAnyUploading || isReadOnly, className: "hidden" }), /* @__PURE__ */ import_react65.default.createElement("input", { type: "file", accept: "image/jpeg, image/png, image/webp, application/pdf", ref: other3Ref, onChange: (e) => handleOptionalUpload(e, "other3"), disabled: isAnyUploading || isReadOnly, className: "hidden" }), /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col gap-1 mb-2" }, /* @__PURE__ */ import_react65.default.createElement("h3", { className: "text-sm text-black" }, "Additional Documents (Optional)"), /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-xs text-neutral-500 leading-relaxed" }, "If your ", type === "company" ? "company" : "business", " involves regulated professional services, please upload relevant licenses, certificates, or permits here (up to 3 documents).")), /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col gap-3" }, [1, 2, 3].map((num) => {
|
|
3617
|
+
}, onDecline: () => setNameCheckResult(null) }) : /* @__PURE__ */ import_react68.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_react68.default.createElement("div", null, /* @__PURE__ */ import_react68.default.createElement("span", { className: "text-[10px] tracking-widest text-red-600 block mb-1" }, "Registry Conflict Detected"), /* @__PURE__ */ import_react68.default.createElement("p", { className: "text-sm text-black mb-3" }, nameCheckResult.message), /* @__PURE__ */ import_react68.default.createElement("div", { className: "flex flex-col gap-2" }, (nameCheckResult.alternatives || []).map((alt, i) => /* @__PURE__ */ import_react68.default.createElement("button", { key: i, onClick: () => setFormData({ ...formData, proposedName: alt }), className: "text-left px-4 py-2 border border-neutral-200 rounded-full hover:border-black text-sm transition-colors outline-none" }, alt)))), /* @__PURE__ */ import_react68.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_react68.default.createElement("div", { className: " flex items-center justify-between" }, /* @__PURE__ */ import_react68.default.createElement("div", null, /* @__PURE__ */ import_react68.default.createElement("p", { className: "text-sm text-black" }, formData.approvedName), /* @__PURE__ */ import_react68.default.createElement("p", { className: "text-xs text-emerald-600 mt-1" }, "Verified against registry")), !isReadOnly && /* @__PURE__ */ import_react68.default.createElement("button", { onClick: () => editSection("nameApproved"), className: "p-2 text-neutral-400 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ import_react68.default.createElement(import_react69.HugeiconsIcon, { icon: import_core_free_icons24.PencilEdit01Icon, size: 16 })))), formState.nameApproved && /* @__PURE__ */ import_react68.default.createElement("div", { className: "flex flex-col gap-4 pt-6 animate-in slide-in-from-top-4 duration-500" }, /* @__PURE__ */ import_react68.default.createElement("div", { className: "flex items-center text-black" }, /* @__PURE__ */ import_react68.default.createElement("h3", { className: "text-sm " }, "Where is your head office located?")), !formState.addressApproved ? /* @__PURE__ */ import_react68.default.createElement("div", { className: "flex flex-col gap-4 " }, /* @__PURE__ */ import_react68.default.createElement(TextInput, { label: "Street Address", value: formData.address, onChange: (v) => setFormData({ ...formData, address: v }), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ import_react68.default.createElement("div", { className: "grid grid-cols-2 gap-4" }, /* @__PURE__ */ import_react68.default.createElement(TextInput, { label: "City", value: formData.city, onChange: (v) => setFormData({ ...formData, city: v }), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ import_react68.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: () => {
|
|
3618
|
+
}, disabled: isReadOnly || isSubmitting })), /* @__PURE__ */ import_react68.default.createElement(ThreeDActionButton, { onClick: () => approveSection("addressApproved"), disabled: !formData.address || !formData.city || !formData.state || isReadOnly, className: "w-fit mt-2" }, "Confirm Address")) : /* @__PURE__ */ import_react68.default.createElement("div", { className: " flex items-center justify-between" }, /* @__PURE__ */ import_react68.default.createElement("p", { className: "text-sm text-neutral-500" }, formData.address, ", ", formData.city, ", ", formData.state), !isReadOnly && /* @__PURE__ */ import_react68.default.createElement("button", { onClick: () => editSection("addressApproved"), className: "p-2 text-neutral-400 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ import_react68.default.createElement(import_react69.HugeiconsIcon, { icon: import_core_free_icons24.PencilEdit01Icon, size: 16 })))), formState.addressApproved && type === "company" && /* @__PURE__ */ import_react68.default.createElement("div", { className: "flex flex-col gap-4 pt-6 animate-in slide-in-from-top-4 duration-500" }, /* @__PURE__ */ import_react68.default.createElement("div", { className: "flex items-center justify-between gap-2 text-black" }, /* @__PURE__ */ import_react68.default.createElement("div", { className: "flex items-center" }, /* @__PURE__ */ import_react68.default.createElement("h3", { className: "text-sm " }, "Directors & Shareholders")), !formState.membersDetailsApproved && /* @__PURE__ */ import_react68.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_react68.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_react68.default.createElement("div", { className: "flex flex-col gap-6 " }, formData.members.map((member, i) => /* @__PURE__ */ import_react68.default.createElement("div", { key: member.id, className: "flex flex-col gap-4 border border-neutral-200 p-5 rounded-2xl bg-neutral-50/30" }, /* @__PURE__ */ import_react68.default.createElement("div", { className: "flex justify-between items-center mb-1" }, /* @__PURE__ */ import_react68.default.createElement("span", { className: "text-[10px] tracking-widest text-neutral-400" }, "Member ", i + 1), formData.members.length > 1 && !isReadOnly && /* @__PURE__ */ import_react68.default.createElement("button", { onClick: () => removeCompanyMember(i), className: "text-red-500 text-xs hover:text-red-600" }, "Remove")), /* @__PURE__ */ import_react68.default.createElement("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-4" }, /* @__PURE__ */ import_react68.default.createElement(TextInput, { label: "Role", value: member.role, readOnly: true, onClick: () => !isReadOnly && setActiveModal({ isOpen: true, type: "role", memberIndex: i }), onChange: () => {
|
|
3619
|
+
}, disabled: isReadOnly || isSubmitting }), member.role !== "Director Only" && /* @__PURE__ */ import_react68.default.createElement(NumberInput, { label: "Share Percentage (%)", value: member.sharePercentage, onChange: (v) => updateCompanyMemberInfo(i, "sharePercentage", v), disabled: isReadOnly || isSubmitting })), /* @__PURE__ */ import_react68.default.createElement(TextInput, { label: "Full Name", value: member.fullName, onChange: (v) => updateCompanyMemberInfo(i, "fullName", v), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ import_react68.default.createElement("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-4" }, /* @__PURE__ */ import_react68.default.createElement(NumberInput, { label: "Phone Number", value: member.phone, onChange: (v) => updateCompanyMemberInfo(i, "phone", v), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ import_react68.default.createElement(TextInput, { label: "Email Address", value: member.email, onChange: (v) => updateCompanyMemberInfo(i, "email", v), disabled: isReadOnly || isSubmitting })), /* @__PURE__ */ import_react68.default.createElement(TextInput, { label: "Nationality", value: member.nationality, readOnly: true, onClick: () => !isReadOnly && setActiveModal({ isOpen: true, type: "nationality", memberIndex: i }), onChange: () => {
|
|
3620
|
+
}, disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ import_react68.default.createElement(TextInput, { label: "Residential Address", value: member.address, onChange: (v) => updateCompanyMemberInfo(i, "address", v), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ import_react68.default.createElement("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-4" }, /* @__PURE__ */ import_react68.default.createElement(TextInput, { label: "City", value: member.city, onChange: (v) => updateCompanyMemberInfo(i, "city", v), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ import_react68.default.createElement(TextInput, { label: "State", value: member.state, readOnly: true, onClick: () => !isReadOnly && setActiveModal({ isOpen: true, type: "state", memberIndex: i }), onChange: () => {
|
|
3621
|
+
}, disabled: isReadOnly || isSubmitting })))), /* @__PURE__ */ import_react68.default.createElement("div", { className: "flex items-center justify-between mt-2" }, !isReadOnly && /* @__PURE__ */ import_react68.default.createElement("button", { onClick: addCompanyMember, className: "px-6 py-2 bg-white border border-neutral-200 text-black text-[11px] tracking-widest rounded-full hover:bg-neutral-50 transition-colors outline-none" }, "+ Add Member"), /* @__PURE__ */ import_react68.default.createElement(ThreeDActionButton, { onClick: () => approveSection("membersDetailsApproved"), disabled: !areCompanyMembersValid() || isReadOnly, className: "w-fit" }, "Confirm Members"))) : /* @__PURE__ */ import_react68.default.createElement("div", { className: " flex items-center justify-between" }, /* @__PURE__ */ import_react68.default.createElement("div", null, /* @__PURE__ */ import_react68.default.createElement("p", { className: "text-sm text-black" }, formData.members.length, " Member(s) Registered"), /* @__PURE__ */ import_react68.default.createElement("p", { className: "text-xs text-neutral-500 mt-1" }, "Total Shares: 100% Verified.")), !isReadOnly && /* @__PURE__ */ import_react68.default.createElement("button", { onClick: () => editSection("membersDetailsApproved"), className: "p-2 text-neutral-400 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ import_react68.default.createElement(import_react69.HugeiconsIcon, { icon: import_core_free_icons24.PencilEdit01Icon, size: 16 })))), formState.addressApproved && type === "business" && /* @__PURE__ */ import_react68.default.createElement("div", { className: "flex flex-col gap-4 pt-6 animate-in slide-in-from-top-4 duration-500" }, /* @__PURE__ */ import_react68.default.createElement("div", { className: "flex items-center text-black" }, /* @__PURE__ */ import_react68.default.createElement("h3", { className: "text-sm " }, "Who owns the business?")), /* @__PURE__ */ import_react68.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_react68.default.createElement("div", { className: "flex flex-col gap-4 " }, /* @__PURE__ */ import_react68.default.createElement(TextInput, { label: "Full Name", value: formData.ownerName, onChange: (v) => setFormData({ ...formData, ownerName: v }), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ import_react68.default.createElement("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-4" }, /* @__PURE__ */ import_react68.default.createElement(NumberInput, { label: "Phone Number", value: formData.ownerPhone, onChange: (v) => setFormData({ ...formData, ownerPhone: v }), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ import_react68.default.createElement(TextInput, { label: "Email Address", value: formData.ownerEmail, onChange: (v) => setFormData({ ...formData, ownerEmail: v }), disabled: isReadOnly || isSubmitting })), /* @__PURE__ */ import_react68.default.createElement(ThreeDActionButton, { onClick: () => approveSection("ownerApproved"), disabled: !formData.ownerName || !formData.ownerPhone || !formData.ownerEmail || isReadOnly, className: "w-fit mt-2" }, "Confirm Owner Details")) : /* @__PURE__ */ import_react68.default.createElement("div", { className: " flex items-center justify-between" }, /* @__PURE__ */ import_react68.default.createElement("div", null, /* @__PURE__ */ import_react68.default.createElement("p", { className: "text-sm text-black" }, formData.ownerName), /* @__PURE__ */ import_react68.default.createElement("p", { className: "text-xs text-neutral-500 mt-1" }, formData.ownerEmail, " \u2022 ", formData.ownerPhone)), !isReadOnly && /* @__PURE__ */ import_react68.default.createElement("button", { onClick: () => editSection("ownerApproved"), className: "p-2 text-neutral-400 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ import_react68.default.createElement(import_react69.HugeiconsIcon, { icon: import_core_free_icons24.PencilEdit01Icon, size: 16 })))), /* @__PURE__ */ import_react68.default.createElement("div", { className: "flex items-center justify-between mt-8 pt-6 " }, /* @__PURE__ */ import_react68.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_react68.default.createElement(import_react69.HugeiconsIcon, { icon: import_core_free_icons24.ArrowLeft01Icon, size: 14 }), " Close"), /* @__PURE__ */ import_react68.default.createElement(ThreeDActionButton, { onClick: handleNext, disabled: !isStep0Valid, className: "w-fit shrink-0" }, "Next Step"))), macroStep === 1 && /* @__PURE__ */ import_react68.default.createElement("div", { className: "flex flex-col gap-8 animate-in fade-in" }, type === "company" ? /* @__PURE__ */ import_react68.default.createElement(import_react68.default.Fragment, null, /* @__PURE__ */ import_react68.default.createElement("div", { className: "flex flex-col gap-2" }, /* @__PURE__ */ import_react68.default.createElement("h3", { className: "text-sm text-black" }, "Member Identity Documents"), /* @__PURE__ */ import_react68.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_react68.default.createElement("div", { className: "flex flex-col gap-6" }, formData.members.map((member, i) => /* @__PURE__ */ import_react68.default.createElement("div", { key: member.id, className: "flex flex-col gap-4" }, /* @__PURE__ */ import_react68.default.createElement("span", { className: "text-[11px] tracking-widest text-black mb-1" }, member.fullName || `Member ${i + 1}`, " ", /* @__PURE__ */ import_react68.default.createElement("span", { className: "text-neutral-400 ml-2" }, "(", member.role, ")")), /* @__PURE__ */ import_react68.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_react68.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_react68.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_react68.default.createElement("button", { onClick: () => !isReadOnly && !isAnyUploading && document.getElementById(`id-upload-${i}`)?.click(), className: `flex items-center gap-3 p-4 border border-neutral-200 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_react68.default.createElement(import_react69.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_react68.default.createElement("div", { className: " mt-2" }, /* @__PURE__ */ import_react68.default.createElement(AiStageCheck, { tasks: aiTasks })) : member.idExtractedData ? /* @__PURE__ */ import_react68.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_react68.default.createElement("div", null, /* @__PURE__ */ import_react68.default.createElement("span", { className: "text-[10px] tracking-widest text-purple-600 block mb-2" }, "Review Extracted ID"), /* @__PURE__ */ import_react68.default.createElement("div", { className: "flex flex-col gap-4" }, /* @__PURE__ */ import_react68.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_react68.default.createElement("div", { className: "grid grid-cols-2 gap-4" }, /* @__PURE__ */ import_react68.default.createElement(TextInput, { label: "ID Number", value: member.idExtractedData.idNumber, onChange: (v) => updateCompanyMemberInfo(i, "idExtractedData", { ...member.idExtractedData, idNumber: v }), disabled: isReadOnly || isAnyUploading }), /* @__PURE__ */ import_react68.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_react68.default.createElement("div", { className: "flex items-center gap-2 mt-2" }, !isReadOnly && /* @__PURE__ */ import_react68.default.createElement("button", { onClick: () => deleteCompanyMemberDocument(i, "id"), disabled: isAnyUploading, className: "px-6 py-2 bg-white border border-neutral-200 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_react68.default.createElement("button", { onClick: () => !isReadOnly && !isAnyUploading && document.getElementById(`pass-upload-${i}`)?.click(), className: `flex items-center gap-3 p-4 border border-neutral-200 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_react68.default.createElement(import_react69.HugeiconsIcon, { icon: import_core_free_icons24.Upload01Icon, size: 18, className: "text-neutral-400" }), " Upload Passport Photo") : globalUploadingPassport && !member.passportFileUrl ? /* @__PURE__ */ import_react68.default.createElement("div", { className: "flex items-center gap-3 p-4 border border-neutral-200 rounded-full bg-neutral-50 text-neutral-500 text-sm w-full" }, /* @__PURE__ */ import_react68.default.createElement(import_react69.HugeiconsIcon, { icon: import_core_free_icons24.Loading03Icon, size: 18, className: "animate-spin text-black" }), " Uploading Passport...") : member.passportFileUrl ? /* @__PURE__ */ import_react68.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_react68.default.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ import_react68.default.createElement(import_react69.HugeiconsIcon, { icon: import_core_free_icons24.IdentificationIcon, size: 18 }), " Passport Uploaded"), !isReadOnly && /* @__PURE__ */ import_react68.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_react68.default.createElement(import_react69.HugeiconsIcon, { icon: import_core_free_icons24.Delete02Icon, size: 16 }))) : null, !member.signatureFileUrl && !globalUploadingSignature ? /* @__PURE__ */ import_react68.default.createElement("button", { onClick: () => !isReadOnly && !isAnyUploading && document.getElementById(`sig-upload-${i}`)?.click(), className: `flex items-center gap-3 p-4 border border-neutral-200 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_react68.default.createElement(import_react69.HugeiconsIcon, { icon: import_core_free_icons24.Upload01Icon, size: 18, className: "text-neutral-400" }), " Upload Signature") : globalUploadingSignature && !member.signatureFileUrl ? /* @__PURE__ */ import_react68.default.createElement("div", { className: "flex items-center gap-3 p-4 border border-neutral-200 rounded-full bg-neutral-50 text-neutral-500 text-sm w-full" }, /* @__PURE__ */ import_react68.default.createElement(import_react69.HugeiconsIcon, { icon: import_core_free_icons24.Loading03Icon, size: 18, className: "animate-spin text-black" }), " Uploading Signature...") : member.signatureFileUrl ? /* @__PURE__ */ import_react68.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_react68.default.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ import_react68.default.createElement(import_react69.HugeiconsIcon, { icon: import_core_free_icons24.SignatureIcon, size: 18 }), " Signature Uploaded"), !isReadOnly && /* @__PURE__ */ import_react68.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_react68.default.createElement(import_react69.HugeiconsIcon, { icon: import_core_free_icons24.Delete02Icon, size: 16 }))) : null)), /* @__PURE__ */ import_react68.default.createElement("div", { className: "flex justify-end" }, /* @__PURE__ */ import_react68.default.createElement(ThreeDActionButton, { onClick: () => approveSection("membersDocsApproved"), disabled: !areCompanyMemberDocsValid() || isReadOnly || isAnyUploading, className: "w-fit" }, "Confirm All Documents"))) : /* @__PURE__ */ import_react68.default.createElement("div", { className: " flex items-center justify-between bg-emerald-50 p-6 rounded-full" }, /* @__PURE__ */ import_react68.default.createElement("div", null, /* @__PURE__ */ import_react68.default.createElement("p", { className: "text-sm text-emerald-800" }, "Documents Uploaded"), /* @__PURE__ */ import_react68.default.createElement("p", { className: "text-xs text-emerald-600 mt-1" }, "Data safely extracted.")), !isReadOnly && /* @__PURE__ */ import_react68.default.createElement("button", { onClick: () => editSection("membersDocsApproved"), className: "p-2 text-emerald-700 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ import_react68.default.createElement(import_react69.HugeiconsIcon, { icon: import_core_free_icons24.PencilEdit01Icon, size: 16 })))) : /* @__PURE__ */ import_react68.default.createElement(import_react68.default.Fragment, null, /* @__PURE__ */ import_react68.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_react68.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_react68.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_react68.default.createElement("div", { className: "flex flex-col gap-4" }, /* @__PURE__ */ import_react68.default.createElement("div", { className: "flex items-center gap-2 text-black" }, /* @__PURE__ */ import_react68.default.createElement("h3", { className: "text-sm " }, "Upload Means of Identification")), /* @__PURE__ */ import_react68.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_react68.default.createElement(import_react68.default.Fragment, null, /* @__PURE__ */ import_react68.default.createElement("button", { onClick: () => !isReadOnly && !isAnyUploading && idRef.current?.click(), disabled: isReadOnly || isAnyUploading, className: `w-full h-32 border border-neutral-200 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_react68.default.createElement(import_react69.HugeiconsIcon, { icon: import_core_free_icons24.Upload01Icon, size: 24, className: "text-neutral-400" }), /* @__PURE__ */ import_react68.default.createElement("span", { className: "text-xs" }, "Select ID Image to Upload")), globalExtractingId && /* @__PURE__ */ import_react68.default.createElement("div", { className: " mt-2" }, /* @__PURE__ */ import_react68.default.createElement(AiStageCheck, { tasks: aiTasks })), formData.idExtractedData && /* @__PURE__ */ import_react68.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_react68.default.createElement("div", null, /* @__PURE__ */ import_react68.default.createElement("span", { className: "text-[10px] tracking-widest text-purple-600 block mb-2" }, "Review AI Extracted Data"), /* @__PURE__ */ import_react68.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_react68.default.createElement("div", { className: "flex flex-col gap-4" }, /* @__PURE__ */ import_react68.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_react68.default.createElement("div", { className: "grid grid-cols-2 gap-4" }, /* @__PURE__ */ import_react68.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_react68.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_react68.default.createElement("div", { className: "flex items-center gap-2 mt-2" }, /* @__PURE__ */ import_react68.default.createElement(ThreeDActionButton, { onClick: () => approveSection("idApproved"), disabled: isAnyUploading || isReadOnly, className: "w-fit shrink-0" }, "Approve Data"), !isReadOnly && /* @__PURE__ */ import_react68.default.createElement("button", { onClick: () => deleteBusinessDocument("id"), disabled: isAnyUploading, className: "px-6 py-2 bg-white border border-neutral-200 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_react68.default.createElement("div", { className: " flex items-center justify-between bg-emerald-50 p-6 rounded-full" }, /* @__PURE__ */ import_react68.default.createElement("div", null, /* @__PURE__ */ import_react68.default.createElement("p", { className: "text-sm text-emerald-800" }, "ID Document Verified"), /* @__PURE__ */ import_react68.default.createElement("p", { className: "text-xs text-emerald-600 mt-1" }, "Data safely extracted and stored.")), !isReadOnly && /* @__PURE__ */ import_react68.default.createElement("button", { onClick: () => editSection("idApproved"), className: "p-2 text-emerald-700 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ import_react68.default.createElement(import_react69.HugeiconsIcon, { icon: import_core_free_icons24.PencilEdit01Icon, size: 16 })))), /* @__PURE__ */ import_react68.default.createElement("div", { className: "flex flex-col gap-4 pt-6 animate-in slide-in-from-top-4 duration-500" }, /* @__PURE__ */ import_react68.default.createElement("div", { className: "flex flex-col gap-3 " }, !formState.passportApproved && !globalUploadingPassport ? /* @__PURE__ */ import_react68.default.createElement("button", { onClick: () => !isReadOnly && !isAnyUploading && passportRef.current?.click(), disabled: isReadOnly || isAnyUploading, className: `flex items-center gap-3 p-4 border border-neutral-200 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_react68.default.createElement(import_react69.HugeiconsIcon, { icon: import_core_free_icons24.Upload01Icon, size: 18, className: "text-neutral-400" }), " Upload Passport Photo") : globalUploadingPassport && !formData.passportFileUrl ? /* @__PURE__ */ import_react68.default.createElement("div", { className: "flex items-center gap-3 p-4 border border-neutral-200 rounded-full bg-neutral-50 text-neutral-500 text-sm w-full" }, /* @__PURE__ */ import_react68.default.createElement(import_react69.HugeiconsIcon, { icon: import_core_free_icons24.Loading03Icon, size: 18, className: "animate-spin text-black" }), " Uploading Passport...") : /* @__PURE__ */ import_react68.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_react68.default.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ import_react68.default.createElement(import_react69.HugeiconsIcon, { icon: import_core_free_icons24.IdentificationIcon, size: 18 }), " Passport Uploaded"), !isReadOnly && /* @__PURE__ */ import_react68.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_react68.default.createElement(import_react69.HugeiconsIcon, { icon: import_core_free_icons24.Delete02Icon, size: 16 }))), !formState.signatureApproved && !globalUploadingSignature ? /* @__PURE__ */ import_react68.default.createElement("button", { onClick: () => !isReadOnly && !isAnyUploading && signatureRef.current?.click(), disabled: isReadOnly || isAnyUploading, className: `flex items-center gap-3 p-4 border border-neutral-200 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_react68.default.createElement(import_react69.HugeiconsIcon, { icon: import_core_free_icons24.Upload01Icon, size: 18, className: "text-neutral-400" }), " Upload Signature") : globalUploadingSignature && !formData.signatureFileUrl ? /* @__PURE__ */ import_react68.default.createElement("div", { className: "flex items-center gap-3 p-4 border border-neutral-200 rounded-full bg-neutral-50 text-neutral-500 text-sm w-full" }, /* @__PURE__ */ import_react68.default.createElement(import_react69.HugeiconsIcon, { icon: import_core_free_icons24.Loading03Icon, size: 18, className: "animate-spin text-black" }), " Uploading Signature...") : /* @__PURE__ */ import_react68.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_react68.default.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ import_react68.default.createElement(import_react69.HugeiconsIcon, { icon: import_core_free_icons24.SignatureIcon, size: 18 }), " Signature Uploaded"), !isReadOnly && /* @__PURE__ */ import_react68.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_react68.default.createElement(import_react69.HugeiconsIcon, { icon: import_core_free_icons24.Delete02Icon, size: 16 })))))), /* @__PURE__ */ import_react68.default.createElement("div", { className: "flex flex-col gap-4 pt-6 border-t border-neutral-200 animate-in slide-in-from-top-4 duration-500" }, /* @__PURE__ */ import_react68.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_react68.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_react68.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_react68.default.createElement("div", { className: "flex flex-col gap-1 mb-2" }, /* @__PURE__ */ import_react68.default.createElement("h3", { className: "text-sm text-black" }, "Additional Documents (Optional)"), /* @__PURE__ */ import_react68.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_react68.default.createElement("div", { className: "flex flex-col gap-3" }, [1, 2, 3].map((num) => {
|
|
3616
3622
|
const docType = `other${num}`;
|
|
3617
3623
|
const ref = num === 1 ? other1Ref : num === 2 ? other2Ref : other3Ref;
|
|
3618
3624
|
const isUploading = num === 1 ? isUploadingOther1 : num === 2 ? isUploadingOther2 : isUploadingOther3;
|
|
@@ -3620,28 +3626,28 @@ var UniversalRegistrationFlow = ({
|
|
|
3620
3626
|
if (!fileUrl && !isUploading) {
|
|
3621
3627
|
const prevUrl = num > 1 ? formData[`otherDoc${num - 1}Url`] : true;
|
|
3622
3628
|
if (!prevUrl) return null;
|
|
3623
|
-
return /* @__PURE__ */
|
|
3629
|
+
return /* @__PURE__ */ import_react68.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-200 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_react68.default.createElement(import_react69.HugeiconsIcon, { icon: import_core_free_icons24.Upload01Icon, size: 18, className: "text-neutral-400" }), " Upload Optional Document ", num);
|
|
3624
3630
|
}
|
|
3625
3631
|
if (isUploading) {
|
|
3626
|
-
return /* @__PURE__ */
|
|
3632
|
+
return /* @__PURE__ */ import_react68.default.createElement("div", { key: num, className: "flex items-center gap-3 p-4 border border-neutral-200 rounded-full bg-neutral-50 text-neutral-500 text-sm w-full" }, /* @__PURE__ */ import_react68.default.createElement(import_react69.HugeiconsIcon, { icon: import_core_free_icons24.Loading03Icon, size: 18, className: "animate-spin text-black" }), " Uploading Document ", num, "...");
|
|
3627
3633
|
}
|
|
3628
|
-
return /* @__PURE__ */
|
|
3629
|
-
}))), /* @__PURE__ */
|
|
3634
|
+
return /* @__PURE__ */ import_react68.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_react68.default.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ import_react68.default.createElement(import_react69.HugeiconsIcon, { icon: import_core_free_icons24.CheckmarkBadge01Icon, size: 18 }), " Optional Document ", num, " Uploaded"), !isReadOnly && /* @__PURE__ */ import_react68.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_react68.default.createElement(import_react69.HugeiconsIcon, { icon: import_core_free_icons24.Delete02Icon, size: 16 })));
|
|
3635
|
+
}))), /* @__PURE__ */ import_react68.default.createElement("div", { className: "flex items-center justify-between mt-8 pt-6 " }, /* @__PURE__ */ import_react68.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_react68.default.createElement(import_react69.HugeiconsIcon, { icon: import_core_free_icons24.ArrowLeft01Icon, size: 14 }), " Back"), /* @__PURE__ */ import_react68.default.createElement(ThreeDActionButton, { onClick: handleNext, disabled: !isStep1Valid || isAnyUploading, className: "w-fit shrink-0" }, "Next Step"))), macroStep === 2 && /* @__PURE__ */ import_react68.default.createElement("div", { className: "flex flex-col gap-6 animate-in fade-in" }, /* @__PURE__ */ import_react68.default.createElement("div", null, /* @__PURE__ */ import_react68.default.createElement("h3", { className: "text-sm mb-5 text-black" }, "Application Summary"), /* @__PURE__ */ import_react68.default.createElement("div", { className: "flex flex-col gap-4 text-sm" }, /* @__PURE__ */ import_react68.default.createElement("div", { className: "flex flex-col sm:flex-row sm:justify-between border-b border-neutral-200 pb-3 gap-1" }, /* @__PURE__ */ import_react68.default.createElement("span", { className: "text-neutral-500 truncate text-[13px] " }, type === "company" ? "Company Name" : "Business Name"), /* @__PURE__ */ import_react68.default.createElement("span", { className: " text-black text-[13px]" }, formData.approvedName)), /* @__PURE__ */ import_react68.default.createElement("div", { className: "flex flex-col sm:flex-row sm:justify-between border-b border-neutral-200 pb-3 gap-1" }, /* @__PURE__ */ import_react68.default.createElement("span", { className: "text-neutral-500 text-[13px] " }, "Classification"), /* @__PURE__ */ import_react68.default.createElement("span", { className: " text-black truncate sm:text-right text-[13px] " }, formData.natureOfBusiness?.specificLabel || "Pending")), type === "company" ? /* @__PURE__ */ import_react68.default.createElement(import_react68.default.Fragment, null, /* @__PURE__ */ import_react68.default.createElement("div", { className: "flex flex-col sm:flex-row sm:justify-between border-b border-neutral-200 pb-3 gap-1" }, /* @__PURE__ */ import_react68.default.createElement("span", { className: "text-neutral-500 text-[13px] " }, "Total Members"), /* @__PURE__ */ import_react68.default.createElement("span", { className: " text-black truncate text-[13px] " }, formData.members.length, " Directors/Shareholders")), /* @__PURE__ */ import_react68.default.createElement("div", { className: "flex flex-col sm:flex-row sm:justify-between border-b border-neutral-200 pb-3 gap-1" }, /* @__PURE__ */ import_react68.default.createElement("span", { className: "text-neutral-500 text-[13px] " }, "Share Capital"), /* @__PURE__ */ import_react68.default.createElement("span", { className: " text-black truncate text-[13px] " }, "100% Allocated"))) : /* @__PURE__ */ import_react68.default.createElement("div", { className: "flex flex-col sm:flex-row sm:justify-between border-b border-neutral-200 pb-3 gap-1" }, /* @__PURE__ */ import_react68.default.createElement("span", { className: "text-neutral-500 text-[13px] " }, "Proprietor"), /* @__PURE__ */ import_react68.default.createElement("span", { className: " text-black truncate text-[13px] " }, formData.ownerName)), /* @__PURE__ */ import_react68.default.createElement("div", { className: "flex flex-col sm:flex-row sm:justify-between pb-2 gap-1" }, /* @__PURE__ */ import_react68.default.createElement("span", { className: "text-neutral-500 text-[13px] " }, "Documents Attached"), /* @__PURE__ */ import_react68.default.createElement("span", { className: " text-neutral-400 text-[13px] " }, "ID, Passport, Signature")), formData.otherDoc1Url && /* @__PURE__ */ import_react68.default.createElement("div", { className: "flex flex-col sm:flex-row sm:justify-between pb-2 gap-1" }, /* @__PURE__ */ import_react68.default.createElement("span", { className: "text-neutral-500 text-[13px] " }, "Optional Documents"), /* @__PURE__ */ import_react68.default.createElement("span", { className: " text-neutral-400 text-[13px] " }, [formData.otherDoc1Url, formData.otherDoc2Url, formData.otherDoc3Url].filter(Boolean).length, " Attached")))), /* @__PURE__ */ import_react68.default.createElement("div", { className: "flex items-center justify-between mt-4 pt-4 " }, /* @__PURE__ */ import_react68.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_react68.default.createElement(import_react69.HugeiconsIcon, { icon: import_core_free_icons24.ArrowLeft01Icon, size: 14 }), " Back"), /* @__PURE__ */ import_react68.default.createElement(ThreeDActionButton, { onClick: handleNext, className: "w-fit shrink-0" }, "Next Step"))), macroStep === 3 && /* @__PURE__ */ import_react68.default.createElement("div", { className: "flex flex-col gap-6 py-6 animate-in zoom-in-95 duration-500" }, /* @__PURE__ */ import_react68.default.createElement("h2", { className: "text-lg font-serif text-black tracking-tight mb-2" }, "Terms and Conditions of Application"), /* @__PURE__ */ import_react68.default.createElement("div", { className: "text-xs text-neutral-500 mb-4" }, /* @__PURE__ */ import_react68.default.createElement("p", { className: " mb-3" }, "Declaration and Consent"), /* @__PURE__ */ import_react68.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_react68.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_react68.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_react68.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_react68.default.createElement("label", { className: "flex items-start gap-3 mt-2 cursor-pointer group" }, /* @__PURE__ */ import_react68.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_react68.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_react68.default.createElement("div", { className: "flex flex-col sm:flex-row items-center gap-4 mt-8 w-full justify-end pt-6" }, /* @__PURE__ */ import_react68.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_react68.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_react68.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_react68.default.createElement("div", { className: "fixed inset-0 z-110 flex items-center justify-center p-4" }, /* @__PURE__ */ import_react68.default.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setActiveModal({ isOpen: false, type: null, memberIndex: null }) }), /* @__PURE__ */ import_react68.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_react68.default.createElement("div", { className: "p-4 text-center w-full shrink-0" }, /* @__PURE__ */ import_react68.default.createElement("h3", { className: "text-[14px] text-black tracking-tight capitalize" }, "Select ", activeModal.type)), /* @__PURE__ */ import_react68.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) => {
|
|
3630
3636
|
const isSelected = activeModal.isGlobalState ? formData.state === opt : formData.members[activeModal.memberIndex][activeModal.type] === opt;
|
|
3631
|
-
return /* @__PURE__ */
|
|
3637
|
+
return /* @__PURE__ */ import_react68.default.createElement("button", { key: opt, onClick: () => {
|
|
3632
3638
|
if (activeModal.isGlobalState) setFormData({ ...formData, state: opt });
|
|
3633
3639
|
else updateCompanyMemberInfo(activeModal.memberIndex, activeModal.type, opt);
|
|
3634
3640
|
setActiveModal({ isOpen: false, type: null, memberIndex: null });
|
|
3635
3641
|
}, 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);
|
|
3636
|
-
})), /* @__PURE__ */
|
|
3642
|
+
})), /* @__PURE__ */ import_react68.default.createElement("div", { className: "w-full flex mt-auto shrink-0 " }, /* @__PURE__ */ import_react68.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")))));
|
|
3637
3643
|
};
|
|
3638
3644
|
|
|
3639
3645
|
// src/components/UniversalDeveloperSettings.tsx
|
|
3640
|
-
var
|
|
3646
|
+
var import_react70 = __toESM(require("react"));
|
|
3641
3647
|
var import_react_hot_toast8 = require("react-hot-toast");
|
|
3642
|
-
var
|
|
3643
|
-
var
|
|
3644
|
-
var ButtonSpinner5 = () => /* @__PURE__ */
|
|
3648
|
+
var import_react71 = require("@hugeicons/react");
|
|
3649
|
+
var import_core_free_icons25 = require("@hugeicons/core-free-icons");
|
|
3650
|
+
var ButtonSpinner5 = () => /* @__PURE__ */ import_react70.default.createElement(import_react71.HugeiconsIcon, { icon: import_core_free_icons25.Loading03Icon, size: 16, className: "animate-spin text-current" });
|
|
3645
3651
|
var UniversalDeveloperSettings = ({
|
|
3646
3652
|
initialPublicKey,
|
|
3647
3653
|
initialWebhookUrl,
|
|
@@ -3649,12 +3655,12 @@ var UniversalDeveloperSettings = ({
|
|
|
3649
3655
|
onGenerateKeys,
|
|
3650
3656
|
onSaveWebhook
|
|
3651
3657
|
}) => {
|
|
3652
|
-
const [publicKey, setPublicKey] = (0,
|
|
3653
|
-
const [webhookUrl, setWebhookUrl] = (0,
|
|
3654
|
-
const [isGenerating, setIsGenerating] = (0,
|
|
3655
|
-
const [isSavingWebhook, setIsSavingWebhook] = (0,
|
|
3656
|
-
const [isRollModalOpen, setIsRollModalOpen] = (0,
|
|
3657
|
-
(0,
|
|
3658
|
+
const [publicKey, setPublicKey] = (0, import_react70.useState)(initialPublicKey);
|
|
3659
|
+
const [webhookUrl, setWebhookUrl] = (0, import_react70.useState)(initialWebhookUrl);
|
|
3660
|
+
const [isGenerating, setIsGenerating] = (0, import_react70.useState)(false);
|
|
3661
|
+
const [isSavingWebhook, setIsSavingWebhook] = (0, import_react70.useState)(false);
|
|
3662
|
+
const [isRollModalOpen, setIsRollModalOpen] = (0, import_react70.useState)(false);
|
|
3663
|
+
(0, import_react70.useEffect)(() => {
|
|
3658
3664
|
setPublicKey(initialPublicKey || "");
|
|
3659
3665
|
setWebhookUrl(initialWebhookUrl || "");
|
|
3660
3666
|
}, [initialPublicKey, initialWebhookUrl]);
|
|
@@ -3714,7 +3720,7 @@ AUDDITUR_SECRET_KEY="${secKey}"
|
|
|
3714
3720
|
};
|
|
3715
3721
|
const hasWebhookChanges = webhookUrl !== initialWebhookUrl;
|
|
3716
3722
|
const isWebhookSaveDisabled = isSavingWebhook || isReadOnly || !hasWebhookChanges;
|
|
3717
|
-
return /* @__PURE__ */
|
|
3723
|
+
return /* @__PURE__ */ import_react70.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_react70.default.createElement(ManagedToaster, null), /* @__PURE__ */ import_react70.default.createElement("div", { className: "flex flex-col sm:flex-row sm:items-start justify-between gap-3 sm:gap-4" }, /* @__PURE__ */ import_react70.default.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ import_react70.default.createElement("h1", { className: "font-serif text-xl text-black mb-1 truncate tracking-tight" }, "Developer Settings"), /* @__PURE__ */ import_react70.default.createElement("p", { className: "text-xs text-neutral-500 truncate" }, "Manage your API credentials and webhook integrations.")), isReadOnly && /* @__PURE__ */ import_react70.default.createElement("span", { className: "p-2 w-9 h-9 bg-neutral-50 text-neutral-500 rounded-full " }, /* @__PURE__ */ import_react70.default.createElement(import_react71.HugeiconsIcon, { icon: import_core_free_icons25.LockKeyIcon, size: 18, className: "text-current" }))), /* @__PURE__ */ import_react70.default.createElement("div", { className: "w-full max-w-2xl flex flex-col gap-12" }, /* @__PURE__ */ import_react70.default.createElement("div", { className: "flex flex-col gap-6" }, /* @__PURE__ */ import_react70.default.createElement("div", { className: "space-y-2 min-w-0" }, /* @__PURE__ */ import_react70.default.createElement(
|
|
3718
3724
|
TextInput,
|
|
3719
3725
|
{
|
|
3720
3726
|
label: "Public Key",
|
|
@@ -3723,7 +3729,7 @@ AUDDITUR_SECRET_KEY="${secKey}"
|
|
|
3723
3729
|
},
|
|
3724
3730
|
disabled: true
|
|
3725
3731
|
}
|
|
3726
|
-
), /* @__PURE__ */
|
|
3732
|
+
), /* @__PURE__ */ import_react70.default.createElement("p", { className: "text-[10px] 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_react70.default.createElement("div", { className: "flex items-center gap-4" }, /* @__PURE__ */ import_react70.default.createElement(
|
|
3727
3733
|
ThreeDActionButton,
|
|
3728
3734
|
{
|
|
3729
3735
|
onClick: () => {
|
|
@@ -3735,7 +3741,7 @@ AUDDITUR_SECRET_KEY="${secKey}"
|
|
|
3735
3741
|
className: "w-fit"
|
|
3736
3742
|
},
|
|
3737
3743
|
publicKey ? "Roll API Keys" : "Generate Keys"
|
|
3738
|
-
))), /* @__PURE__ */
|
|
3744
|
+
))), /* @__PURE__ */ import_react70.default.createElement("form", { className: "flex flex-col gap-6 border-t border-neutral-200 pt-8", onSubmit: handleSaveWebhook, autoComplete: "off" }, /* @__PURE__ */ import_react70.default.createElement("div", { className: "space-y-2 min-w-0" }, /* @__PURE__ */ import_react70.default.createElement(
|
|
3739
3745
|
TextInput,
|
|
3740
3746
|
{
|
|
3741
3747
|
label: "Webhook URL",
|
|
@@ -3745,7 +3751,7 @@ AUDDITUR_SECRET_KEY="${secKey}"
|
|
|
3745
3751
|
placeholder: "https://your-domain.com/webhook",
|
|
3746
3752
|
type: "url"
|
|
3747
3753
|
}
|
|
3748
|
-
), /* @__PURE__ */
|
|
3754
|
+
), /* @__PURE__ */ import_react70.default.createElement("p", { className: "text-[10px] 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_react70.default.createElement("div", { className: "flex flex-col sm:flex-row sm:items-center justify-between mt-2 gap-6 sm:gap-4" }, /* @__PURE__ */ import_react70.default.createElement("div", { className: "flex items-center gap-6 min-w-0" }, /* @__PURE__ */ import_react70.default.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ import_react70.default.createElement("span", { className: "text-[10px] text-neutral-400 tracking-[0.2em] block truncate uppercase" }, "Webhook Status"), /* @__PURE__ */ import_react70.default.createElement("span", { className: `text-xs block truncate ${webhookUrl ? "text-emerald-600" : "text-neutral-400"}` }, webhookUrl ? "Active" : "Inactive"))), /* @__PURE__ */ import_react70.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_react70.default.createElement(
|
|
3749
3755
|
"button",
|
|
3750
3756
|
{
|
|
3751
3757
|
type: "button",
|
|
@@ -3753,7 +3759,7 @@ AUDDITUR_SECRET_KEY="${secKey}"
|
|
|
3753
3759
|
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"
|
|
3754
3760
|
},
|
|
3755
3761
|
"Cancel"
|
|
3756
|
-
), /* @__PURE__ */
|
|
3762
|
+
), /* @__PURE__ */ import_react70.default.createElement(
|
|
3757
3763
|
ThreeDActionButton,
|
|
3758
3764
|
{
|
|
3759
3765
|
type: "submit",
|
|
@@ -3762,7 +3768,7 @@ AUDDITUR_SECRET_KEY="${secKey}"
|
|
|
3762
3768
|
className: "min-w-32 w-full sm:w-auto"
|
|
3763
3769
|
},
|
|
3764
3770
|
"Save Webhook"
|
|
3765
|
-
))))), isRollModalOpen && !isReadOnly && /* @__PURE__ */
|
|
3771
|
+
))))), isRollModalOpen && !isReadOnly && /* @__PURE__ */ import_react70.default.createElement("div", { className: "fixed inset-0 z-110 flex items-center justify-center p-4" }, /* @__PURE__ */ import_react70.default.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => !isGenerating && setIsRollModalOpen(false) }), /* @__PURE__ */ import_react70.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_react70.default.createElement("div", { className: "p-6 text-center w-full" }, /* @__PURE__ */ import_react70.default.createElement("h3", { className: "font-serif text-[17px] text-black tracking-tight mb-1" }, "Roll API Keys"), /* @__PURE__ */ import_react70.default.createElement("p", { className: "text-[12px] 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_react70.default.createElement("div", { className: "w-full flex" }, /* @__PURE__ */ import_react70.default.createElement(
|
|
3766
3772
|
"button",
|
|
3767
3773
|
{
|
|
3768
3774
|
onClick: () => setIsRollModalOpen(false),
|
|
@@ -3770,14 +3776,14 @@ AUDDITUR_SECRET_KEY="${secKey}"
|
|
|
3770
3776
|
className: "flex-1 py-2 text-[13px] text-neutral-600 hover:bg-neutral-50 transition-colors disabled:opacity-50 outline-none"
|
|
3771
3777
|
},
|
|
3772
3778
|
"Cancel"
|
|
3773
|
-
), /* @__PURE__ */
|
|
3779
|
+
), /* @__PURE__ */ import_react70.default.createElement(
|
|
3774
3780
|
"button",
|
|
3775
3781
|
{
|
|
3776
3782
|
onClick: handleGenerateKeys,
|
|
3777
3783
|
disabled: isGenerating,
|
|
3778
3784
|
className: "flex-1 py-2 text-[13px] text-red-600 hover:bg-neutral-50 transition-colors disabled:opacity-50 flex justify-center outline-none"
|
|
3779
3785
|
},
|
|
3780
|
-
isGenerating ? /* @__PURE__ */
|
|
3786
|
+
isGenerating ? /* @__PURE__ */ import_react70.default.createElement(ButtonSpinner5, null) : "Roll Keys"
|
|
3781
3787
|
)))));
|
|
3782
3788
|
};
|
|
3783
3789
|
// Annotate the CommonJS export names for ESM import in node:
|