@retinalabsllc/zairusjs 4.0.32 → 4.1.0
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 +44 -1
- package/dist/index.d.ts +44 -1
- package/dist/index.js +483 -250
- package/dist/index.mjs +503 -261
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -85,6 +85,7 @@ __export(index_exports, {
|
|
|
85
85
|
UniversalProfileSettings: () => UniversalProfileSettings,
|
|
86
86
|
UniversalRegistrationFlow: () => UniversalRegistrationFlow,
|
|
87
87
|
UniversalSidebar: () => UniversalSidebar,
|
|
88
|
+
UniversalTransactionPage: () => UniversalTransactionPage,
|
|
88
89
|
UniversalTrashView: () => UniversalTrashView,
|
|
89
90
|
ZairusAuth: () => ZairusAuth,
|
|
90
91
|
ZairusShareCard: () => ZairusShareCard
|
|
@@ -2048,9 +2049,14 @@ var GifFeatureCard = ({
|
|
|
2048
2049
|
// src/components/UniversalSidebar.tsx
|
|
2049
2050
|
var import_react39 = __toESM(require("react"));
|
|
2050
2051
|
var import_link9 = __toESM(require("next/link"));
|
|
2052
|
+
var import_react_hot_toast5 = __toESM(require("react-hot-toast"));
|
|
2051
2053
|
var import_react40 = require("@hugeicons/react");
|
|
2052
2054
|
var import_core_free_icons9 = require("@hugeicons/core-free-icons");
|
|
2053
2055
|
var ButtonSpinner = () => /* @__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" }));
|
|
2056
|
+
var formatNotifDate = (d) => {
|
|
2057
|
+
const date = new Date(d);
|
|
2058
|
+
return date.toLocaleDateString("en-US", { month: "short", day: "numeric", hour: "2-digit", minute: "2-digit" });
|
|
2059
|
+
};
|
|
2054
2060
|
var UniversalSidebar = ({
|
|
2055
2061
|
navItems,
|
|
2056
2062
|
currentPath,
|
|
@@ -2061,6 +2067,14 @@ var UniversalSidebar = ({
|
|
|
2061
2067
|
userName = "Profile",
|
|
2062
2068
|
userTag,
|
|
2063
2069
|
userInitials = "U",
|
|
2070
|
+
web3Address,
|
|
2071
|
+
web3Avatar,
|
|
2072
|
+
notifications,
|
|
2073
|
+
unreadNotificationsCount = 0,
|
|
2074
|
+
notificationPage = 1,
|
|
2075
|
+
notificationTotalPages = 1,
|
|
2076
|
+
onNotificationPageChange,
|
|
2077
|
+
onNotificationClick,
|
|
2064
2078
|
showBackButton = false,
|
|
2065
2079
|
backUrl = "/app",
|
|
2066
2080
|
showLogoutAction = false,
|
|
@@ -2074,6 +2088,8 @@ var UniversalSidebar = ({
|
|
|
2074
2088
|
const [isCollapsed, setIsCollapsed] = (0, import_react39.useState)(false);
|
|
2075
2089
|
const [showLogoutDialog, setShowLogoutDialog] = (0, import_react39.useState)(false);
|
|
2076
2090
|
const [isLoggingOut, setIsLoggingOut] = (0, import_react39.useState)(false);
|
|
2091
|
+
const [showNotifDialog, setShowNotifDialog] = (0, import_react39.useState)(false);
|
|
2092
|
+
const [selectedNotif, setSelectedNotif] = (0, import_react39.useState)(null);
|
|
2077
2093
|
(0, import_react39.useEffect)(() => {
|
|
2078
2094
|
if (isMobileOpen) {
|
|
2079
2095
|
closeMobile();
|
|
@@ -2092,31 +2108,50 @@ var UniversalSidebar = ({
|
|
|
2092
2108
|
setShowLogoutDialog(false);
|
|
2093
2109
|
}
|
|
2094
2110
|
};
|
|
2095
|
-
|
|
2111
|
+
const handleCopyWallet = () => {
|
|
2112
|
+
if (web3Address) {
|
|
2113
|
+
navigator.clipboard.writeText(web3Address);
|
|
2114
|
+
import_react_hot_toast5.default.success("Address copied");
|
|
2115
|
+
}
|
|
2116
|
+
};
|
|
2117
|
+
const HeaderActions = () => /* @__PURE__ */ import_react39.default.createElement("div", { className: "flex items-center gap-2 pointer-events-auto" }, web3Address && /* @__PURE__ */ import_react39.default.createElement(
|
|
2118
|
+
"div",
|
|
2119
|
+
{
|
|
2120
|
+
onClick: handleCopyWallet,
|
|
2121
|
+
className: "flex items-center gap-2 bg-white rounded-full p-1 pr-3 shadow-sm cursor-pointer hover:bg-neutral-50 transition-colors",
|
|
2122
|
+
title: "Copy Address"
|
|
2123
|
+
},
|
|
2124
|
+
web3Avatar ? /* @__PURE__ */ import_react39.default.createElement("img", { src: web3Avatar, alt: "Avatar", className: "w-6 h-6 rounded-full bg-neutral-100 object-cover shrink-0" }) : /* @__PURE__ */ import_react39.default.createElement("div", { className: "w-6 h-6 rounded-full bg-neutral-100 flex items-center justify-center text-[9px] text-black shrink-0 " }, userInitials.substring(0, 2)),
|
|
2125
|
+
/* @__PURE__ */ import_react39.default.createElement("span", { className: "text-[11px] text-black truncate max-w-20 sm:max-w-37.5" }, web3Address)
|
|
2126
|
+
), notifications !== void 0 && /* @__PURE__ */ import_react39.default.createElement(
|
|
2096
2127
|
"button",
|
|
2097
2128
|
{
|
|
2098
|
-
onClick:
|
|
2099
|
-
|
|
2100
|
-
|
|
2129
|
+
onClick: () => {
|
|
2130
|
+
setShowNotifDialog(true);
|
|
2131
|
+
setSelectedNotif(null);
|
|
2132
|
+
},
|
|
2133
|
+
className: "relative w-10 h-10 shrink-0 bg-white rounded-full flex items-center justify-center text-neutral-600 hover:text-black hover:bg-neutral-50 transition-all duration-300 outline-none shadow-sm border border-neutral-100"
|
|
2101
2134
|
},
|
|
2102
|
-
/* @__PURE__ */ import_react39.default.createElement(import_react40.HugeiconsIcon, { icon: import_core_free_icons9.
|
|
2135
|
+
/* @__PURE__ */ import_react39.default.createElement(import_react40.HugeiconsIcon, { icon: import_core_free_icons9.Notification03Icon, size: 18 }),
|
|
2136
|
+
unreadNotificationsCount > 0 && /* @__PURE__ */ import_react39.default.createElement("span", { className: "absolute top-2 right-2.5 w-2 h-2 bg-blue-500 rounded-full border border-white" })
|
|
2103
2137
|
), showBackButton && /* @__PURE__ */ import_react39.default.createElement(
|
|
2104
2138
|
import_link9.default,
|
|
2105
2139
|
{
|
|
2106
2140
|
href: backUrl,
|
|
2107
|
-
className: "w-10 h-10 bg-white rounded-full flex items-center justify-center text-black hover:bg-neutral-50 transition-all duration-300 outline-none",
|
|
2141
|
+
className: "w-10 h-10 shrink-0 bg-white rounded-full flex items-center justify-center text-neutral-600 hover:text-black hover:bg-neutral-50 transition-all duration-300 outline-none shadow-sm border border-neutral-100",
|
|
2108
2142
|
"aria-label": "Go Back"
|
|
2109
2143
|
},
|
|
2110
2144
|
/* @__PURE__ */ import_react39.default.createElement(import_react40.HugeiconsIcon, { icon: import_core_free_icons9.ArrowLeft01Icon, size: 18 })
|
|
2111
|
-
))
|
|
2112
|
-
|
|
2145
|
+
));
|
|
2146
|
+
return /* @__PURE__ */ import_react39.default.createElement(import_react39.default.Fragment, null, /* @__PURE__ */ import_react39.default.createElement("div", { className: "md:hidden fixed top-0 left-0 w-full h-16 bg-neutral-100 z-40 flex items-center justify-between px-4" }, /* @__PURE__ */ import_react39.default.createElement(
|
|
2147
|
+
"button",
|
|
2113
2148
|
{
|
|
2114
|
-
|
|
2115
|
-
className:
|
|
2116
|
-
"aria-label": "
|
|
2149
|
+
onClick: openMobile,
|
|
2150
|
+
className: `w-10 h-10 bg-white rounded-full flex items-center justify-center text-black transition-all duration-300 outline-none ${isMobileOpen ? "opacity-0 pointer-events-none scale-90" : "opacity-100 scale-100"}`,
|
|
2151
|
+
"aria-label": "Open Menu"
|
|
2117
2152
|
},
|
|
2118
|
-
/* @__PURE__ */ import_react39.default.createElement(import_react40.HugeiconsIcon, { icon: import_core_free_icons9.
|
|
2119
|
-
)), /* @__PURE__ */ import_react39.default.createElement(
|
|
2153
|
+
/* @__PURE__ */ import_react39.default.createElement(import_react40.HugeiconsIcon, { icon: import_core_free_icons9.SidebarLeft01Icon, size: 18 })
|
|
2154
|
+
), /* @__PURE__ */ import_react39.default.createElement(HeaderActions, null)), /* @__PURE__ */ import_react39.default.createElement("div", { className: "hidden md:flex fixed top-0 right-0 w-full justify-end px-8 pt-6 pb-4 bg-neutral-100 z-40 pointer-events-none" }, /* @__PURE__ */ import_react39.default.createElement(HeaderActions, null)), /* @__PURE__ */ import_react39.default.createElement(
|
|
2120
2155
|
"div",
|
|
2121
2156
|
{
|
|
2122
2157
|
className: `fixed inset-0 bg-black/30 shadow-2xl transition-opacity duration-300 md:hidden z-90 ${isMobileOpen ? "opacity-100 pointer-events-auto" : "opacity-0 pointer-events-none"}`,
|
|
@@ -2132,7 +2167,7 @@ var UniversalSidebar = ({
|
|
|
2132
2167
|
${isCollapsed ? "md:w-16 w-64" : "w-64"}
|
|
2133
2168
|
`
|
|
2134
2169
|
},
|
|
2135
|
-
/* @__PURE__ */ import_react39.default.createElement("div", { className: `flex items-center shrink-0 p-5 ${isCollapsed && !isMobileOpen ? "justify-center min-h-18" : "justify-between"}` }, /* @__PURE__ */ import_react39.default.createElement("div", { className: `flex items-center gap-3 text-left ${!isCollapsed || isMobileOpen ? "w-full" : ""}` }, /* @__PURE__ */ import_react39.default.createElement("div", { className: "w-9 h-9 rounded-full
|
|
2170
|
+
/* @__PURE__ */ import_react39.default.createElement("div", { className: `flex items-center shrink-0 p-5 ${isCollapsed && !isMobileOpen ? "justify-center min-h-18" : "justify-between"}` }, /* @__PURE__ */ import_react39.default.createElement("div", { className: `flex items-center gap-3 text-left ${!isCollapsed || isMobileOpen ? "w-full" : ""}` }, /* @__PURE__ */ import_react39.default.createElement("div", { className: "w-9 h-9 rounded-full flex items-center justify-center shrink-0 border border-neutral-200/50" }, /* @__PURE__ */ import_react39.default.createElement("h3", { className: "text-[10px] text-black uppercase tracking-wider" }, userInitials.substring(0, 2))), (!isCollapsed || isMobileOpen) && /* @__PURE__ */ import_react39.default.createElement("div", { className: "flex flex-col justify-center min-w-0 pr-2 flex-1" }, /* @__PURE__ */ import_react39.default.createElement("span", { className: "text-[13px] text-black leading-none truncate tracking-wide mb-1" }, userName), userTag && /* @__PURE__ */ import_react39.default.createElement("span", { className: "text-[9px] text-[#1f26d6] truncate tracking-[0.2em] leading-none " }, userTag))), /* @__PURE__ */ import_react39.default.createElement("div", { className: "md:hidden flex shrink-0" }, /* @__PURE__ */ import_react39.default.createElement(
|
|
2136
2171
|
"button",
|
|
2137
2172
|
{
|
|
2138
2173
|
onClick: closeMobile,
|
|
@@ -2150,7 +2185,7 @@ var UniversalSidebar = ({
|
|
|
2150
2185
|
key: item.name,
|
|
2151
2186
|
href: item.path,
|
|
2152
2187
|
onClick: (e) => onNavClick ? onNavClick(e, item.path) : void 0,
|
|
2153
|
-
className: `flex items-center gap-3 px-3 py-2 rounded-full transition-all outline-none group shrink-0 ${isCurrentRoute ? "bg-
|
|
2188
|
+
className: `flex items-center gap-3 px-3 py-2 rounded-full transition-all outline-none group shrink-0 ${isCurrentRoute ? "bg-neutral-100 text-black " : "text-neutral-500 hover:text-black hover:bg-neutral-50"}`,
|
|
2154
2189
|
title: isCollapsed && !isMobileOpen ? item.name : void 0
|
|
2155
2190
|
},
|
|
2156
2191
|
/* @__PURE__ */ import_react39.default.createElement(
|
|
@@ -2158,7 +2193,7 @@ var UniversalSidebar = ({
|
|
|
2158
2193
|
{
|
|
2159
2194
|
icon: item.icon,
|
|
2160
2195
|
size: 18,
|
|
2161
|
-
className: `shrink-0 transition-colors ${isCurrentRoute ? "text-
|
|
2196
|
+
className: `shrink-0 transition-colors ${isCurrentRoute ? "text-black" : "text-neutral-400 group-hover:text-black"}`
|
|
2162
2197
|
}
|
|
2163
2198
|
),
|
|
2164
2199
|
(!isCollapsed || isMobileOpen) && /* @__PURE__ */ import_react39.default.createElement("span", { className: "text-xs tracking-wide truncate" }, item.name)
|
|
@@ -2176,23 +2211,51 @@ var UniversalSidebar = ({
|
|
|
2176
2211
|
"button",
|
|
2177
2212
|
{
|
|
2178
2213
|
onClick: () => setIsCollapsed(!isCollapsed),
|
|
2179
|
-
className: "flex items-center justify-center md:justify-start gap-3 w-full p-2.5 rounded-full text-neutral-500 hover:text-
|
|
2214
|
+
className: "flex items-center justify-center md:justify-start gap-3 w-full p-2.5 rounded-full text-neutral-500 hover:text-black hover:bg-neutral-50 transition-colors outline-none"
|
|
2180
2215
|
},
|
|
2181
|
-
/* @__PURE__ */ import_react39.default.createElement(import_react40.HugeiconsIcon, { icon: import_core_free_icons9.SidebarLeft01Icon, size: 18, className: "shrink-0 text-neutral-400
|
|
2182
|
-
!isCollapsed && /* @__PURE__ */ import_react39.default.createElement("span", { className: "text-xs" }, "Collapse")
|
|
2216
|
+
/* @__PURE__ */ import_react39.default.createElement(import_react40.HugeiconsIcon, { icon: import_core_free_icons9.SidebarLeft01Icon, size: 18, className: "shrink-0 text-neutral-400" }),
|
|
2217
|
+
!isCollapsed && /* @__PURE__ */ import_react39.default.createElement("span", { className: "text-xs " }, "Collapse")
|
|
2183
2218
|
)))
|
|
2184
|
-
),
|
|
2219
|
+
), showNotifDialog && /* @__PURE__ */ import_react39.default.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ import_react39.default.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setShowNotifDialog(false) }), /* @__PURE__ */ import_react39.default.createElement("div", { className: "relative w-full max-w-sm bg-white rounded-2xl flex flex-col overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200 h-150 max-h-[80vh]" }, /* @__PURE__ */ import_react39.default.createElement("div", { className: "flex items-center justify-between p-5 border-b border-neutral-100 shrink-0" }, selectedNotif ? /* @__PURE__ */ import_react39.default.createElement("button", { onClick: () => setSelectedNotif(null), className: "text-neutral-400 hover:text-black transition-colors outline-none flex items-center gap-2 text-[11px] tracking-widest uppercase" }, /* @__PURE__ */ import_react39.default.createElement(import_react40.HugeiconsIcon, { icon: import_core_free_icons9.ArrowLeft01Icon, size: 14 }), " Back") : /* @__PURE__ */ import_react39.default.createElement("h3", { className: "text-[15px] text-black tracking-tight " }, "Notifications"), /* @__PURE__ */ import_react39.default.createElement("button", { onClick: () => setShowNotifDialog(false), className: "text-neutral-400 hover:text-black transition-colors outline-none" }, /* @__PURE__ */ import_react39.default.createElement(import_react40.HugeiconsIcon, { icon: import_core_free_icons9.CancelCircleIcon, size: 18 }))), /* @__PURE__ */ import_react39.default.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-2" }, selectedNotif ? /* @__PURE__ */ import_react39.default.createElement("div", { className: "p-4 text-left" }, /* @__PURE__ */ import_react39.default.createElement("h4", { className: "text-[14px] text-black mb-1" }, selectedNotif.title), /* @__PURE__ */ import_react39.default.createElement("span", { className: "text-[10px] text-neutral-400 tracking-widest uppercase mb-4 block" }, formatNotifDate(selectedNotif.createdAt)), /* @__PURE__ */ import_react39.default.createElement("p", { className: "text-[12px] text-neutral-600 leading-relaxed whitespace-pre-wrap" }, selectedNotif.message)) : /* @__PURE__ */ import_react39.default.createElement("div", { className: "flex flex-col divide-y divide-neutral-50/50" }, notifications?.length === 0 ? /* @__PURE__ */ import_react39.default.createElement("div", { className: "p-8 text-center text-xs text-neutral-400" }, "You have no notifications.") : notifications?.map((notif) => /* @__PURE__ */ import_react39.default.createElement(
|
|
2220
|
+
"div",
|
|
2221
|
+
{
|
|
2222
|
+
key: notif.id,
|
|
2223
|
+
onClick: () => {
|
|
2224
|
+
setSelectedNotif(notif);
|
|
2225
|
+
onNotificationClick?.(notif);
|
|
2226
|
+
},
|
|
2227
|
+
className: "p-3 flex items-start gap-3 hover:bg-neutral-50 rounded-xl cursor-pointer transition-colors"
|
|
2228
|
+
},
|
|
2229
|
+
/* @__PURE__ */ import_react39.default.createElement("div", { className: "mt-1.5 shrink-0" }, !notif.isRead ? /* @__PURE__ */ import_react39.default.createElement("div", { className: "w-1.5 h-1.5 bg-blue-500 rounded-full" }) : /* @__PURE__ */ import_react39.default.createElement("div", { className: "w-1.5 h-1.5 bg-transparent" })),
|
|
2230
|
+
/* @__PURE__ */ import_react39.default.createElement("div", { className: "flex-1 min-w-0 text-left" }, /* @__PURE__ */ import_react39.default.createElement("h5", { className: `text-[12px] truncate ${notif.isRead ? "text-neutral-500 " : "text-black "}` }, notif.title), /* @__PURE__ */ import_react39.default.createElement("p", { className: "text-[11px] text-neutral-400 truncate mt-0.5" }, notif.message), /* @__PURE__ */ import_react39.default.createElement("span", { className: "text-[9px] text-neutral-400 tracking-widest uppercase mt-2 block" }, formatNotifDate(notif.createdAt)))
|
|
2231
|
+
)))), !selectedNotif && notificationTotalPages > 1 && /* @__PURE__ */ import_react39.default.createElement("div", { className: "p-4 border-t border-neutral-100 flex items-center justify-between shrink-0 bg-neutral-50/50" }, /* @__PURE__ */ import_react39.default.createElement("span", { className: "text-[10px] text-neutral-400 tracking-widest uppercase" }, "Page ", notificationPage, " of ", notificationTotalPages), /* @__PURE__ */ import_react39.default.createElement("div", { className: "flex gap-1" }, /* @__PURE__ */ import_react39.default.createElement(
|
|
2232
|
+
"button",
|
|
2233
|
+
{
|
|
2234
|
+
disabled: notificationPage === 1,
|
|
2235
|
+
onClick: () => onNotificationPageChange?.(notificationPage - 1),
|
|
2236
|
+
className: "w-7 h-7 flex items-center justify-center rounded-full bg-white border border-neutral-200 text-neutral-600 disabled:opacity-30 outline-none hover:bg-neutral-50 transition-colors"
|
|
2237
|
+
},
|
|
2238
|
+
/* @__PURE__ */ import_react39.default.createElement(import_react40.HugeiconsIcon, { icon: import_core_free_icons9.ArrowLeft01Icon, size: 12 })
|
|
2239
|
+
), /* @__PURE__ */ import_react39.default.createElement(
|
|
2240
|
+
"button",
|
|
2241
|
+
{
|
|
2242
|
+
disabled: notificationPage === notificationTotalPages,
|
|
2243
|
+
onClick: () => onNotificationPageChange?.(notificationPage + 1),
|
|
2244
|
+
className: "w-7 h-7 flex items-center justify-center rounded-full bg-white border border-neutral-200 text-neutral-600 disabled:opacity-30 outline-none hover:bg-neutral-50 transition-colors"
|
|
2245
|
+
},
|
|
2246
|
+
/* @__PURE__ */ import_react39.default.createElement(import_react40.HugeiconsIcon, { icon: import_core_free_icons9.ArrowRight01Icon, size: 12 })
|
|
2247
|
+
))))), showLogoutDialog && showLogoutAction && /* @__PURE__ */ import_react39.default.createElement("div", { className: "fixed inset-0 z-110 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ import_react39.default.createElement(
|
|
2185
2248
|
"div",
|
|
2186
2249
|
{
|
|
2187
2250
|
className: "absolute inset-0 bg-black/30",
|
|
2188
2251
|
onClick: () => !isLoggingOut && setShowLogoutDialog(false)
|
|
2189
2252
|
}
|
|
2190
|
-
), /* @__PURE__ */ import_react39.default.createElement("div", { className: "relative w-72 bg-white rounded-2xl flex flex-col items-center overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200" }, /* @__PURE__ */ import_react39.default.createElement("div", { className: "p-6 text-center w-full" }, /* @__PURE__ */ import_react39.default.createElement("h3", { className: "
|
|
2253
|
+
), /* @__PURE__ */ import_react39.default.createElement("div", { className: "relative w-72 bg-white rounded-2xl flex flex-col items-center overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200" }, /* @__PURE__ */ import_react39.default.createElement("div", { className: "p-6 text-center w-full" }, /* @__PURE__ */ import_react39.default.createElement("h3", { className: "text-[17px] text-black tracking-tight mb-1 " }, "Secure Logout"), /* @__PURE__ */ import_react39.default.createElement("p", { className: "text-[11px] text-neutral-500 leading-snug mt-2" }, "Are you sure you want to log out? You will need to authenticate to return.")), /* @__PURE__ */ import_react39.default.createElement("div", { className: "w-full flex" }, /* @__PURE__ */ import_react39.default.createElement(
|
|
2191
2254
|
"button",
|
|
2192
2255
|
{
|
|
2193
2256
|
onClick: () => setShowLogoutDialog(false),
|
|
2194
2257
|
disabled: isLoggingOut,
|
|
2195
|
-
className: "flex-1 py-3 text-[13px] text-neutral-600 hover:bg-neutral-50 transition-colors disabled:opacity-50 outline-none"
|
|
2258
|
+
className: "flex-1 py-3 text-[13px] text-neutral-600 hover:bg-neutral-50 transition-colors disabled:opacity-50 outline-none "
|
|
2196
2259
|
},
|
|
2197
2260
|
"Cancel"
|
|
2198
2261
|
), /* @__PURE__ */ import_react39.default.createElement(
|
|
@@ -2200,7 +2263,7 @@ var UniversalSidebar = ({
|
|
|
2200
2263
|
{
|
|
2201
2264
|
onClick: handleLogoutInitiation,
|
|
2202
2265
|
disabled: isLoggingOut,
|
|
2203
|
-
className: "flex-1 py-3 text-[13px] text-[#1f26d6] hover:bg-neutral-50 transition-colors disabled:opacity-50 flex justify-center items-center outline-none"
|
|
2266
|
+
className: "flex-1 py-3 text-[13px] text-[#1f26d6] hover:bg-neutral-50 transition-colors disabled:opacity-50 flex justify-center items-center outline-none "
|
|
2204
2267
|
},
|
|
2205
2268
|
isLoggingOut ? /* @__PURE__ */ import_react39.default.createElement(ButtonSpinner, null) : "Log Out"
|
|
2206
2269
|
)))), showInterceptDialog && /* @__PURE__ */ import_react39.default.createElement("div", { className: "fixed inset-0 z-110 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ import_react39.default.createElement(
|
|
@@ -2209,18 +2272,18 @@ var UniversalSidebar = ({
|
|
|
2209
2272
|
className: "absolute inset-0 bg-black/30",
|
|
2210
2273
|
onClick: onCancelIntercept
|
|
2211
2274
|
}
|
|
2212
|
-
), /* @__PURE__ */ import_react39.default.createElement("div", { className: "relative w-72 bg-white rounded-2xl flex flex-col items-center overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200" }, /* @__PURE__ */ import_react39.default.createElement("div", { className: "p-6 text-center w-full" }, /* @__PURE__ */ import_react39.default.createElement("h3", { className: "text-[17px] text-black tracking-tight mb-1" }, interceptTitle), /* @__PURE__ */ import_react39.default.createElement("p", { className: "text-[11px] text-neutral-500 leading-snug mt-2" }, interceptMessage)), /* @__PURE__ */ import_react39.default.createElement("div", { className: "w-full flex" }, /* @__PURE__ */ import_react39.default.createElement(
|
|
2275
|
+
), /* @__PURE__ */ import_react39.default.createElement("div", { className: "relative w-72 bg-white rounded-2xl flex flex-col items-center overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200" }, /* @__PURE__ */ import_react39.default.createElement("div", { className: "p-6 text-center w-full" }, /* @__PURE__ */ import_react39.default.createElement("h3", { className: "text-[17px] text-black tracking-tight mb-1 " }, interceptTitle), /* @__PURE__ */ import_react39.default.createElement("p", { className: "text-[11px] text-neutral-500 leading-snug mt-2" }, interceptMessage)), /* @__PURE__ */ import_react39.default.createElement("div", { className: "w-full flex" }, /* @__PURE__ */ import_react39.default.createElement(
|
|
2213
2276
|
"button",
|
|
2214
2277
|
{
|
|
2215
2278
|
onClick: onCancelIntercept,
|
|
2216
|
-
className: "flex-1 py-3 text-[13px] text-neutral-600 hover:bg-neutral-50 transition-colors outline-none"
|
|
2279
|
+
className: "flex-1 py-3 text-[13px] text-neutral-600 hover:bg-neutral-50 transition-colors outline-none "
|
|
2217
2280
|
},
|
|
2218
2281
|
"Cancel"
|
|
2219
2282
|
), /* @__PURE__ */ import_react39.default.createElement(
|
|
2220
2283
|
"button",
|
|
2221
2284
|
{
|
|
2222
2285
|
onClick: onConfirmIntercept,
|
|
2223
|
-
className: "flex-1 py-3 text-[13px] text-[#1f26d6] hover:bg-neutral-50 transition-colors flex justify-center items-center outline-none"
|
|
2286
|
+
className: "flex-1 py-3 text-[13px] text-[#1f26d6] hover:bg-neutral-50 transition-colors flex justify-center items-center outline-none "
|
|
2224
2287
|
},
|
|
2225
2288
|
"Leave"
|
|
2226
2289
|
)))));
|
|
@@ -2228,7 +2291,7 @@ var UniversalSidebar = ({
|
|
|
2228
2291
|
|
|
2229
2292
|
// src/components/UniversalOrganizationPage.tsx
|
|
2230
2293
|
var import_react43 = __toESM(require("react"));
|
|
2231
|
-
var
|
|
2294
|
+
var import_react_hot_toast6 = __toESM(require("react-hot-toast"));
|
|
2232
2295
|
|
|
2233
2296
|
// src/components/Banner.tsx
|
|
2234
2297
|
var import_react41 = __toESM(require("react"));
|
|
@@ -2297,7 +2360,7 @@ var UniversalOrganizationPage = ({
|
|
|
2297
2360
|
initialSlug,
|
|
2298
2361
|
orgId,
|
|
2299
2362
|
isReadOnly = false,
|
|
2300
|
-
slugPrefixUrl = "
|
|
2363
|
+
slugPrefixUrl = ".aeona.eth",
|
|
2301
2364
|
bannerProps,
|
|
2302
2365
|
onSaveConfiguration,
|
|
2303
2366
|
onCheckSlugAvailability
|
|
@@ -2351,7 +2414,7 @@ var UniversalOrganizationPage = ({
|
|
|
2351
2414
|
e.preventDefault();
|
|
2352
2415
|
if (isSubmitting || isCheckingSlug || isReadOnly) return;
|
|
2353
2416
|
if (slug !== initialSlug && slugAvailable === false) {
|
|
2354
|
-
|
|
2417
|
+
import_react_hot_toast6.default.error("Please select an available profile address handles.");
|
|
2355
2418
|
return;
|
|
2356
2419
|
}
|
|
2357
2420
|
setIsSubmitting(true);
|
|
@@ -2365,14 +2428,14 @@ var UniversalOrganizationPage = ({
|
|
|
2365
2428
|
};
|
|
2366
2429
|
const responseData = await onSaveConfiguration(payload);
|
|
2367
2430
|
if (responseData.success) {
|
|
2368
|
-
|
|
2431
|
+
import_react_hot_toast6.default.success("Web3 profile identity updated successfully.");
|
|
2369
2432
|
setTimeout(() => window.location.reload(), 1e3);
|
|
2370
2433
|
} else {
|
|
2371
|
-
|
|
2434
|
+
import_react_hot_toast6.default.error(responseData.error || "Failed to update your identity profile.");
|
|
2372
2435
|
setIsSubmitting(false);
|
|
2373
2436
|
}
|
|
2374
2437
|
} catch (error) {
|
|
2375
|
-
|
|
2438
|
+
import_react_hot_toast6.default.error("Service unavailable. Try again later.");
|
|
2376
2439
|
setIsSubmitting(false);
|
|
2377
2440
|
}
|
|
2378
2441
|
};
|
|
@@ -2381,7 +2444,7 @@ var UniversalOrganizationPage = ({
|
|
|
2381
2444
|
return /* @__PURE__ */ import_react43.default.createElement("div", { className: "flex flex-col gap-8 animate-in max-w-5xl rounded-2xl p-6 bg-white fade-in duration-300 " }, /* @__PURE__ */ import_react43.default.createElement(ManagedToaster, null), /* @__PURE__ */ import_react43.default.createElement("div", { className: "flex items-start justify-between gap-4" }, /* @__PURE__ */ import_react43.default.createElement("div", null, /* @__PURE__ */ import_react43.default.createElement("h1", { className: "text-black text-xl mb-1 tracking-tight" }, "Web3 Profile"), /* @__PURE__ */ import_react43.default.createElement("p", { className: "text-xs text-neutral-500" }, "Manage your financial payment handle identifiers and global public cryptographic signature identity details.")), isReadOnly && /* @__PURE__ */ import_react43.default.createElement("span", { className: "p-2 w-9 h-9 bg-neutral-50 text-neutral-500 rounded-full shrink-0" }, /* @__PURE__ */ import_react43.default.createElement(import_react44.HugeiconsIcon, { icon: import_core_free_icons11.CircleLock02Icon, size: 18, className: "text-current" }))), bannerProps && /* @__PURE__ */ import_react43.default.createElement(Banner, { ...bannerProps }), /* @__PURE__ */ import_react43.default.createElement("div", { className: "w-full max-w-5xl" }, /* @__PURE__ */ import_react43.default.createElement("form", { className: "flex flex-col gap-8", onSubmit: handleSave, autoComplete: "off" }, /* @__PURE__ */ import_react43.default.createElement(
|
|
2382
2445
|
TextInput,
|
|
2383
2446
|
{
|
|
2384
|
-
label: "
|
|
2447
|
+
label: "Display Name",
|
|
2385
2448
|
value: web3Name,
|
|
2386
2449
|
onChange: handleWeb3NameChange,
|
|
2387
2450
|
disabled: isReadOnly || isSubmitting,
|
|
@@ -2391,14 +2454,14 @@ var UniversalOrganizationPage = ({
|
|
|
2391
2454
|
), /* @__PURE__ */ import_react43.default.createElement(
|
|
2392
2455
|
TextInput,
|
|
2393
2456
|
{
|
|
2394
|
-
label: "
|
|
2457
|
+
label: "Digital Identity",
|
|
2395
2458
|
value: username,
|
|
2396
2459
|
onChange: handleUsernameChange,
|
|
2397
2460
|
disabled: isReadOnly || isSubmitting,
|
|
2398
2461
|
placeholder: "sovereignuser",
|
|
2399
2462
|
maxLength: 30
|
|
2400
2463
|
}
|
|
2401
|
-
), /* @__PURE__ */ import_react43.default.createElement("div", { className: "space-y-2 relative w-full" }, /* @__PURE__ */ import_react43.default.createElement("label", { className: "text-[11px] text-neutral-400 tracking-[0.2em] block " }, "
|
|
2464
|
+
), /* @__PURE__ */ import_react43.default.createElement("div", { className: "space-y-2 relative w-full" }, /* @__PURE__ */ import_react43.default.createElement("label", { className: "text-[11px] text-neutral-400 tracking-[0.2em] block " }, "Wallet Username"), /* @__PURE__ */ import_react43.default.createElement("div", { className: "flex items-center relative w-full border-b border-neutral-100 focus-within:border-black transition-all" }, /* @__PURE__ */ import_react43.default.createElement(
|
|
2402
2465
|
"input",
|
|
2403
2466
|
{
|
|
2404
2467
|
type: "text",
|
|
@@ -2407,10 +2470,10 @@ var UniversalOrganizationPage = ({
|
|
|
2407
2470
|
onChange: (e) => handleSlugChange(e.target.value),
|
|
2408
2471
|
spellCheck: "false",
|
|
2409
2472
|
autoComplete: "off",
|
|
2410
|
-
className: "w-full px-2 py-3 text-sm bg-transparent
|
|
2473
|
+
className: "w-full px-2 py-3 text-sm bg-transparent text-black outline-none disabled:opacity-50 disabled:cursor-not-allowed",
|
|
2411
2474
|
placeholder: "sovereign-user-handle"
|
|
2412
2475
|
}
|
|
2413
|
-
), /* @__PURE__ */ import_react43.default.createElement("div", { className: "absolute right-2 top-1/2 -translate-y-1/2" }, isCheckingSlug && /* @__PURE__ */ import_react43.default.createElement(InputSpinner4, null), !isCheckingSlug && !isReadOnly && slug !== initialSlug && slug.length >= 3 && slugAvailable === false && /* @__PURE__ */ import_react43.default.createElement("span", { className: "inline-flex items-center justify-center w-4 h-4 rounded-full bg-red-100" }, /* @__PURE__ */ import_react43.default.createElement("svg", { className: "w-2 h-2 text-red-600", viewBox: "0 0 20 20", fill: "currentColor" }, /* @__PURE__ */ import_react43.default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" }))), !isCheckingSlug && !isReadOnly && slug !== initialSlug && slug.length >= 3 && slugAvailable === true && /* @__PURE__ */ import_react43.default.createElement("span", { className: "inline-flex items-center justify-center w-4 h-4 rounded-full bg-green-100" }, /* @__PURE__ */ import_react43.default.createElement("svg", { className: "w-2 h-2 text-green-600", viewBox: "0 0 20 20", fill: "currentColor" }, /* @__PURE__ */ import_react43.default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M16.707 5.293a1 1 0 00-1.414 0L8 12.586 4.707 9.293a1 1 0 10-1.414 1.414l4 4a1 1 0 001.414 0l8-8a1 1 0 000-1.414z" })))))), /* @__PURE__ */ import_react43.default.createElement("div", { className: "pt-8 mt-2 flex items-center gap-4" }, /* @__PURE__ */ import_react43.default.createElement(
|
|
2476
|
+
), /* @__PURE__ */ import_react43.default.createElement("span", { className: "text-neutral-400 text-sm py-3 pr-8 shrink-0 whitespace-nowrap" }, slugPrefixUrl), /* @__PURE__ */ import_react43.default.createElement("div", { className: "absolute right-2 top-1/2 -translate-y-1/2" }, isCheckingSlug && /* @__PURE__ */ import_react43.default.createElement(InputSpinner4, null), !isCheckingSlug && !isReadOnly && slug !== initialSlug && slug.length >= 3 && slugAvailable === false && /* @__PURE__ */ import_react43.default.createElement("span", { className: "inline-flex items-center justify-center w-4 h-4 rounded-full bg-red-100" }, /* @__PURE__ */ import_react43.default.createElement("svg", { className: "w-2 h-2 text-red-600", viewBox: "0 0 20 20", fill: "currentColor" }, /* @__PURE__ */ import_react43.default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" }))), !isCheckingSlug && !isReadOnly && slug !== initialSlug && slug.length >= 3 && slugAvailable === true && /* @__PURE__ */ import_react43.default.createElement("span", { className: "inline-flex items-center justify-center w-4 h-4 rounded-full bg-green-100" }, /* @__PURE__ */ import_react43.default.createElement("svg", { className: "w-2 h-2 text-green-600", viewBox: "0 0 20 20", fill: "currentColor" }, /* @__PURE__ */ import_react43.default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M16.707 5.293a1 1 0 00-1.414 0L8 12.586 4.707 9.293a1 1 0 10-1.414 1.414l4 4a1 1 0 001.414 0l8-8a1 1 0 000-1.414z" })))))), /* @__PURE__ */ import_react43.default.createElement("div", { className: "pt-8 mt-2 flex items-center gap-4" }, /* @__PURE__ */ import_react43.default.createElement(
|
|
2414
2477
|
ThreeDActionButton,
|
|
2415
2478
|
{
|
|
2416
2479
|
type: "submit",
|
|
@@ -2436,7 +2499,7 @@ var UniversalOrganizationPage = ({
|
|
|
2436
2499
|
|
|
2437
2500
|
// src/components/UniversalIdentityPage.tsx
|
|
2438
2501
|
var import_react45 = __toESM(require("react"));
|
|
2439
|
-
var
|
|
2502
|
+
var import_react_hot_toast7 = __toESM(require("react-hot-toast"));
|
|
2440
2503
|
var import_react46 = require("@hugeicons/react");
|
|
2441
2504
|
var import_core_free_icons12 = require("@hugeicons/core-free-icons");
|
|
2442
2505
|
var ButtonSpinner2 = () => /* @__PURE__ */ import_react45.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_react45.default.createElement("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }), /* @__PURE__ */ import_react45.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" }));
|
|
@@ -2481,12 +2544,12 @@ var UniversalIdentityPage = ({
|
|
|
2481
2544
|
secondaryValue: secondaryValue !== initialSecondaryValue ? secondaryValue : void 0
|
|
2482
2545
|
});
|
|
2483
2546
|
if (res.success) {
|
|
2484
|
-
|
|
2547
|
+
import_react_hot_toast7.default.success("Update successful.");
|
|
2485
2548
|
} else {
|
|
2486
|
-
|
|
2549
|
+
import_react_hot_toast7.default.error(res.error || "Update failed.");
|
|
2487
2550
|
}
|
|
2488
2551
|
} catch (error) {
|
|
2489
|
-
|
|
2552
|
+
import_react_hot_toast7.default.error("Service unavailable.");
|
|
2490
2553
|
} finally {
|
|
2491
2554
|
setIsSubmitting(false);
|
|
2492
2555
|
}
|
|
@@ -2497,15 +2560,15 @@ var UniversalIdentityPage = ({
|
|
|
2497
2560
|
try {
|
|
2498
2561
|
const res = await onDeleteResource(resourceId);
|
|
2499
2562
|
if (res.success) {
|
|
2500
|
-
|
|
2563
|
+
import_react_hot_toast7.default.success("Deletion permanent.");
|
|
2501
2564
|
setIsDeleteModalOpen(false);
|
|
2502
2565
|
window.location.href = onSuccessfulDeleteRedirect;
|
|
2503
2566
|
} else {
|
|
2504
|
-
|
|
2567
|
+
import_react_hot_toast7.default.error(res.error || "Failed to delete.");
|
|
2505
2568
|
setIsDeleting(false);
|
|
2506
2569
|
}
|
|
2507
2570
|
} catch (error) {
|
|
2508
|
-
|
|
2571
|
+
import_react_hot_toast7.default.error("Network error occurred.");
|
|
2509
2572
|
setIsDeleting(false);
|
|
2510
2573
|
}
|
|
2511
2574
|
};
|
|
@@ -2581,7 +2644,7 @@ var UniversalIdentityPage = ({
|
|
|
2581
2644
|
|
|
2582
2645
|
// src/components/UniversalMembersPage.tsx
|
|
2583
2646
|
var import_react47 = __toESM(require("react"));
|
|
2584
|
-
var
|
|
2647
|
+
var import_react_hot_toast8 = __toESM(require("react-hot-toast"));
|
|
2585
2648
|
var import_react48 = require("@hugeicons/react");
|
|
2586
2649
|
var import_core_free_icons13 = require("@hugeicons/core-free-icons");
|
|
2587
2650
|
var ButtonSpinner3 = () => /* @__PURE__ */ import_react47.default.createElement(import_react48.HugeiconsIcon, { icon: import_core_free_icons13.Loading03Icon, size: 16, className: "animate-spin text-white" });
|
|
@@ -2655,16 +2718,16 @@ var UniversalMembersPage = ({
|
|
|
2655
2718
|
try {
|
|
2656
2719
|
const res = await onInviteMember(inviteEmail, inviteFirst, inviteLast);
|
|
2657
2720
|
if (res.success) {
|
|
2658
|
-
|
|
2721
|
+
import_react_hot_toast8.default.success("Member added successfully.");
|
|
2659
2722
|
setInviteEmail("");
|
|
2660
2723
|
setInviteFirst("");
|
|
2661
2724
|
setInviteLast("");
|
|
2662
2725
|
setCurrentView("list");
|
|
2663
2726
|
} else {
|
|
2664
|
-
|
|
2727
|
+
import_react_hot_toast8.default.error(res.error || "Failed to add member.");
|
|
2665
2728
|
}
|
|
2666
2729
|
} catch (error) {
|
|
2667
|
-
|
|
2730
|
+
import_react_hot_toast8.default.error("Service unavailable.");
|
|
2668
2731
|
} finally {
|
|
2669
2732
|
setIsInviting(false);
|
|
2670
2733
|
}
|
|
@@ -2675,14 +2738,14 @@ var UniversalMembersPage = ({
|
|
|
2675
2738
|
try {
|
|
2676
2739
|
const res = await onRemoveMember(memberToDelete);
|
|
2677
2740
|
if (res.success) {
|
|
2678
|
-
|
|
2741
|
+
import_react_hot_toast8.default.success("Member removed successfully.");
|
|
2679
2742
|
setMemberToDelete(null);
|
|
2680
2743
|
setCurrentView("list");
|
|
2681
2744
|
} else {
|
|
2682
|
-
|
|
2745
|
+
import_react_hot_toast8.default.error(res.error || "Failed to remove member.");
|
|
2683
2746
|
}
|
|
2684
2747
|
} catch (error) {
|
|
2685
|
-
|
|
2748
|
+
import_react_hot_toast8.default.error("Service unavailable.");
|
|
2686
2749
|
} finally {
|
|
2687
2750
|
setIsDeleting(false);
|
|
2688
2751
|
}
|
|
@@ -2697,13 +2760,13 @@ var UniversalMembersPage = ({
|
|
|
2697
2760
|
try {
|
|
2698
2761
|
const res = await onUpdateRole(selectedMember, newRole);
|
|
2699
2762
|
if (res.success) {
|
|
2700
|
-
|
|
2763
|
+
import_react_hot_toast8.default.success("Role updated successfully.");
|
|
2701
2764
|
setSelectedMember({ ...selectedMember, role: newRole });
|
|
2702
2765
|
} else {
|
|
2703
|
-
|
|
2766
|
+
import_react_hot_toast8.default.error(res.error || "Failed to update role.");
|
|
2704
2767
|
}
|
|
2705
2768
|
} catch (error) {
|
|
2706
|
-
|
|
2769
|
+
import_react_hot_toast8.default.error("Service unavailable.");
|
|
2707
2770
|
} finally {
|
|
2708
2771
|
setIsUpdatingRole(false);
|
|
2709
2772
|
}
|
|
@@ -2849,7 +2912,7 @@ var UniversalMembersPage = ({
|
|
|
2849
2912
|
|
|
2850
2913
|
// src/components/UniversalProfileSettings.tsx
|
|
2851
2914
|
var import_react49 = __toESM(require("react"));
|
|
2852
|
-
var
|
|
2915
|
+
var import_react_hot_toast9 = __toESM(require("react-hot-toast"));
|
|
2853
2916
|
var import_react50 = require("@hugeicons/react");
|
|
2854
2917
|
var import_core_free_icons14 = require("@hugeicons/core-free-icons");
|
|
2855
2918
|
var UniversalProfileSettings = ({
|
|
@@ -2882,14 +2945,14 @@ var UniversalProfileSettings = ({
|
|
|
2882
2945
|
try {
|
|
2883
2946
|
const res = await onSaveProfile({ firstName, lastName });
|
|
2884
2947
|
if (res.success) {
|
|
2885
|
-
|
|
2948
|
+
import_react_hot_toast9.default.success("Profile updated successfully.");
|
|
2886
2949
|
setTimeout(() => window.location.reload(), 1e3);
|
|
2887
2950
|
} else {
|
|
2888
|
-
|
|
2951
|
+
import_react_hot_toast9.default.error(res.error || "Uh oh! Something went wrong.");
|
|
2889
2952
|
setIsSubmitting(false);
|
|
2890
2953
|
}
|
|
2891
2954
|
} catch (error) {
|
|
2892
|
-
|
|
2955
|
+
import_react_hot_toast9.default.error("Uh oh! Something went wrong.");
|
|
2893
2956
|
setIsSubmitting(false);
|
|
2894
2957
|
}
|
|
2895
2958
|
};
|
|
@@ -3662,7 +3725,7 @@ var UniversalDriveView = ({
|
|
|
3662
3725
|
const i = Math.floor(Math.log(num) / Math.log(k));
|
|
3663
3726
|
return parseFloat((num / Math.pow(k, i)).toFixed(1)) + " " + sizes[i];
|
|
3664
3727
|
};
|
|
3665
|
-
const
|
|
3728
|
+
const formatDate4 = (dateString) => {
|
|
3666
3729
|
return new Date(dateString).toLocaleDateString("en-US", { month: "short", day: "numeric", year: "numeric" });
|
|
3667
3730
|
};
|
|
3668
3731
|
const handleRowClick = (id, e) => {
|
|
@@ -3737,7 +3800,7 @@ var UniversalDriveView = ({
|
|
|
3737
3800
|
return /* @__PURE__ */ import_react68.default.createElement("tr", { key: item.id, onClick: (e) => handleRowClick(item.id, e), onDoubleClick: () => handleItemDoubleClick(item), onContextMenu: (e) => {
|
|
3738
3801
|
e.preventDefault();
|
|
3739
3802
|
setSelectedIds([item.id]);
|
|
3740
|
-
}, className: `hover:bg-neutral-50/70 transition-colors cursor-pointer group ${isChecked ? "bg-neutral-50" : ""}` }, /* @__PURE__ */ import_react68.default.createElement("td", { className: "p-3", onClick: (e) => e.stopPropagation() }, /* @__PURE__ */ import_react68.default.createElement("input", { type: "checkbox", checked: isChecked, onChange: () => handleRowClick(item.id, { ctrlKey: true }), className: "rounded border-neutral-300 w-2.5 h-2.5 text-black focus:ring-black accent-black cursor-pointer" })), /* @__PURE__ */ import_react68.default.createElement("td", { className: "p-3 flex items-center gap-3 min-w-0" }, /* @__PURE__ */ import_react68.default.createElement("div", { className: "w-9 h-9 shrink-0 flex items-center justify-center relative" }, /* @__PURE__ */ import_react68.default.createElement(FileIconMapper, { type: item.type, mimeType: item.mimeType })), /* @__PURE__ */ import_react68.default.createElement("span", { className: "text-xs text-black truncate pr-4" }, item.name)), /* @__PURE__ */ import_react68.default.createElement("td", { className: "p-3 text-xs text-neutral-500 whitespace-nowrap" },
|
|
3803
|
+
}, className: `hover:bg-neutral-50/70 transition-colors cursor-pointer group ${isChecked ? "bg-neutral-50" : ""}` }, /* @__PURE__ */ import_react68.default.createElement("td", { className: "p-3", onClick: (e) => e.stopPropagation() }, /* @__PURE__ */ import_react68.default.createElement("input", { type: "checkbox", checked: isChecked, onChange: () => handleRowClick(item.id, { ctrlKey: true }), className: "rounded border-neutral-300 w-2.5 h-2.5 text-black focus:ring-black accent-black cursor-pointer" })), /* @__PURE__ */ import_react68.default.createElement("td", { className: "p-3 flex items-center gap-3 min-w-0" }, /* @__PURE__ */ import_react68.default.createElement("div", { className: "w-9 h-9 shrink-0 flex items-center justify-center relative" }, /* @__PURE__ */ import_react68.default.createElement(FileIconMapper, { type: item.type, mimeType: item.mimeType })), /* @__PURE__ */ import_react68.default.createElement("span", { className: "text-xs text-black truncate pr-4" }, item.name)), /* @__PURE__ */ import_react68.default.createElement("td", { className: "p-3 text-xs text-neutral-500 whitespace-nowrap" }, formatDate4(item.updatedAt)), /* @__PURE__ */ import_react68.default.createElement("td", { className: "p-3 text-xs text-neutral-500 text-right whitespace-nowrap" }, formatBytes(item.size)));
|
|
3741
3804
|
}))), isLoading && /* @__PURE__ */ import_react68.default.createElement("div", { className: "absolute inset-0 top-12 z-20 bg-white flex items-start justify-center pt-20" }, /* @__PURE__ */ import_react68.default.createElement(import_react69.HugeiconsIcon, { icon: import_core_free_icons23.Loading03Icon, className: "animate-spin text-neutral-400", size: 24 }))), /* @__PURE__ */ import_react68.default.createElement("div", { className: `flex items-center justify-between pt-4 ${lockClass}` }, /* @__PURE__ */ import_react68.default.createElement("span", { className: "text-[11px] text-neutral-400 tracking-[0.2em] " }, "Page ", currentPage, " of ", Math.max(1, totalPages)), /* @__PURE__ */ import_react68.default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ import_react68.default.createElement("button", { onClick: () => onPageChange(currentPage - 1), disabled: currentPage <= 1, className: "p-2 border border-neutral-100 rounded-full bg-white text-neutral-500 hover:text-black disabled:opacity-30 transition-all outline-none" }, /* @__PURE__ */ import_react68.default.createElement(import_react69.HugeiconsIcon, { icon: import_core_free_icons23.ArrowLeft01Icon, size: 14 })), /* @__PURE__ */ import_react68.default.createElement("button", { onClick: () => onPageChange(currentPage + 1), disabled: currentPage >= totalPages, className: "p-2 border border-neutral-100 rounded-full bg-white text-neutral-500 hover:text-black disabled:opacity-30 transition-all outline-none" }, /* @__PURE__ */ import_react68.default.createElement(import_react69.HugeiconsIcon, { icon: import_core_free_icons23.ArrowRight01Icon, size: 14 })))), activeJobs.length > 0 && /* @__PURE__ */ import_react68.default.createElement("div", { className: "fixed bottom-6 right-6 w-80 bg-white shadow-2xl rounded-xl z-100 overflow-hidden flex flex-col animate-in slide-in-from-bottom-4 duration-300" }, /* @__PURE__ */ import_react68.default.createElement("div", { className: "p-4 bg-neutral-50 flex items-center justify-between" }, /* @__PURE__ */ import_react68.default.createElement("div", null, /* @__PURE__ */ import_react68.default.createElement("h4", { className: "text-xs text-black " }, "Uploading Elements"), /* @__PURE__ */ import_react68.default.createElement("p", { className: "text-[10px] text-neutral-500 mt-0.5" }, "Processing ", activeJobs.length, " streams")), onClearUploadQueue && activeJobs.length === 0 && /* @__PURE__ */ import_react68.default.createElement("button", { onClick: onClearUploadQueue, className: "text-neutral-400 hover:text-black transition-colors outline-none" }, /* @__PURE__ */ import_react68.default.createElement(import_react69.HugeiconsIcon, { icon: import_core_free_icons23.Cancel01Icon, size: 14 }))), /* @__PURE__ */ import_react68.default.createElement("div", { className: "w-full h-1 bg-neutral-100 relative" }, /* @__PURE__ */ import_react68.default.createElement("div", { className: "h-full transition-all duration-500 ease-out", style: { width: `${globalProgress}%`, background: "linear-gradient(to right, #f64b4d, #ffa360)" } })), /* @__PURE__ */ import_react68.default.createElement("div", { className: "max-h-40 overflow-y-auto p-2" }, uploadQueue.map((job) => /* @__PURE__ */ import_react68.default.createElement("div", { key: job.id, className: "flex items-center justify-between p-2 text-[11px] gap-4" }, /* @__PURE__ */ import_react68.default.createElement("span", { className: "text-black truncate flex-1 pr-2" }, job.name), /* @__PURE__ */ import_react68.default.createElement("div", { className: "shrink-0 whitespace-nowrap flex items-center gap-2" }, job.status === "COMPLETED" ? /* @__PURE__ */ import_react68.default.createElement(import_react69.HugeiconsIcon, { icon: import_core_free_icons23.Tick01Icon, size: 12, className: "text-green-600" }) : job.status === "FAILED" ? /* @__PURE__ */ import_react68.default.createElement("span", { className: "text-red-600 text-[10px]" }, "Failed") : /* @__PURE__ */ import_react68.default.createElement("span", { className: "text-neutral-500 text-[10px]" }, job.progress, "%")))))), (isNewFolderModalOpen || renameModal.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: () => !isSubmitting && (setIsNewFolderModalOpen(false), setRenameModal({ isOpen: false, id: "", name: "" })) }), /* @__PURE__ */ import_react68.default.createElement("form", { onSubmit: async (e) => {
|
|
3742
3805
|
e.preventDefault();
|
|
3743
3806
|
if (!folderInputVal.trim() || isSubmitting) return;
|
|
@@ -3751,7 +3814,7 @@ var UniversalDriveView = ({
|
|
|
3751
3814
|
}, className: "relative w-full max-w-sm bg-white shadow-2xl rounded-2xl p-8 flex flex-col gap-6 animate-in zoom-in-95 duration-200" }, /* @__PURE__ */ import_react68.default.createElement("div", null, /* @__PURE__ */ import_react68.default.createElement("h3", { className: "text-lg text-black tracking-tight mb-1" }, isNewFolderModalOpen ? "Create Directory" : "Rename Element"), /* @__PURE__ */ import_react68.default.createElement("p", { className: "text-[11px] text-neutral-400" }, "Please provide a valid alphanumeric name.")), /* @__PURE__ */ import_react68.default.createElement(TextInput, { placeholder: "Name (e.g., Q3 Invoices)", value: folderInputVal, onChange: setFolderInputVal }), /* @__PURE__ */ import_react68.default.createElement("div", { className: "flex items-center justify-end gap-3 mt-2" }, /* @__PURE__ */ import_react68.default.createElement("button", { type: "button", onClick: () => {
|
|
3752
3815
|
setIsNewFolderModalOpen(false);
|
|
3753
3816
|
setRenameModal({ isOpen: false, id: "", name: "" });
|
|
3754
|
-
}, disabled: isSubmitting, className: "px-6 py-2.5 text-xs text-neutral-500 hover:bg-neutral-50 rounded-full outline-none disabled:opacity-50 transition-colors" }, "Cancel"), /* @__PURE__ */ import_react68.default.createElement(ThreeDActionButton, { type: "submit", isLoading: isSubmitting, disabled: !folderInputVal.trim() }, isNewFolderModalOpen ? "Create" : "Rename")))), infoModalItem && /* @__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: () => setInfoModalItem(null) }), /* @__PURE__ */ import_react68.default.createElement("div", { className: "relative w-full max-w-sm bg-white shadow-2xl rounded-2xl p-8 flex flex-col gap-6 animate-in zoom-in-95 duration-200" }, /* @__PURE__ */ import_react68.default.createElement("div", null, /* @__PURE__ */ import_react68.default.createElement("h3", { className: "text-lg text-black tracking-tight mb-1" }, "Item Information"), /* @__PURE__ */ import_react68.default.createElement("p", { className: "text-[11px] text-neutral-400" }, "Details for the selected item.")), /* @__PURE__ */ import_react68.default.createElement("div", { className: "flex flex-col gap-4 text-sm" }, /* @__PURE__ */ import_react68.default.createElement("div", { className: "flex justify-between items-center gap-4" }, /* @__PURE__ */ import_react68.default.createElement("span", { className: "text-neutral-400 text-xs" }, "Name:"), /* @__PURE__ */ import_react68.default.createElement("span", { className: "text-black text-xs truncate max-w-37.5" }, infoModalItem.name)), /* @__PURE__ */ import_react68.default.createElement("div", { className: "flex justify-between items-center gap-4" }, /* @__PURE__ */ import_react68.default.createElement("span", { className: "text-neutral-400 text-xs" }, "Type:"), /* @__PURE__ */ import_react68.default.createElement("span", { className: "text-black text-xs " }, infoModalItem.type)), /* @__PURE__ */ import_react68.default.createElement("div", { className: "flex justify-between items-center gap-4" }, /* @__PURE__ */ import_react68.default.createElement("span", { className: "text-neutral-400 text-xs" }, "Size:"), /* @__PURE__ */ import_react68.default.createElement("span", { className: "text-black text-xs " }, formatBytes(infoModalItem.size))), /* @__PURE__ */ import_react68.default.createElement("div", { className: "flex justify-between items-center gap-4" }, /* @__PURE__ */ import_react68.default.createElement("span", { className: "text-neutral-400 text-xs" }, "Modified:"), /* @__PURE__ */ import_react68.default.createElement("span", { className: "text-black text-xs " },
|
|
3817
|
+
}, disabled: isSubmitting, className: "px-6 py-2.5 text-xs text-neutral-500 hover:bg-neutral-50 rounded-full outline-none disabled:opacity-50 transition-colors" }, "Cancel"), /* @__PURE__ */ import_react68.default.createElement(ThreeDActionButton, { type: "submit", isLoading: isSubmitting, disabled: !folderInputVal.trim() }, isNewFolderModalOpen ? "Create" : "Rename")))), infoModalItem && /* @__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: () => setInfoModalItem(null) }), /* @__PURE__ */ import_react68.default.createElement("div", { className: "relative w-full max-w-sm bg-white shadow-2xl rounded-2xl p-8 flex flex-col gap-6 animate-in zoom-in-95 duration-200" }, /* @__PURE__ */ import_react68.default.createElement("div", null, /* @__PURE__ */ import_react68.default.createElement("h3", { className: "text-lg text-black tracking-tight mb-1" }, "Item Information"), /* @__PURE__ */ import_react68.default.createElement("p", { className: "text-[11px] text-neutral-400" }, "Details for the selected item.")), /* @__PURE__ */ import_react68.default.createElement("div", { className: "flex flex-col gap-4 text-sm" }, /* @__PURE__ */ import_react68.default.createElement("div", { className: "flex justify-between items-center gap-4" }, /* @__PURE__ */ import_react68.default.createElement("span", { className: "text-neutral-400 text-xs" }, "Name:"), /* @__PURE__ */ import_react68.default.createElement("span", { className: "text-black text-xs truncate max-w-37.5" }, infoModalItem.name)), /* @__PURE__ */ import_react68.default.createElement("div", { className: "flex justify-between items-center gap-4" }, /* @__PURE__ */ import_react68.default.createElement("span", { className: "text-neutral-400 text-xs" }, "Type:"), /* @__PURE__ */ import_react68.default.createElement("span", { className: "text-black text-xs " }, infoModalItem.type)), /* @__PURE__ */ import_react68.default.createElement("div", { className: "flex justify-between items-center gap-4" }, /* @__PURE__ */ import_react68.default.createElement("span", { className: "text-neutral-400 text-xs" }, "Size:"), /* @__PURE__ */ import_react68.default.createElement("span", { className: "text-black text-xs " }, formatBytes(infoModalItem.size))), /* @__PURE__ */ import_react68.default.createElement("div", { className: "flex justify-between items-center gap-4" }, /* @__PURE__ */ import_react68.default.createElement("span", { className: "text-neutral-400 text-xs" }, "Modified:"), /* @__PURE__ */ import_react68.default.createElement("span", { className: "text-black text-xs " }, formatDate4(infoModalItem.updatedAt)))), /* @__PURE__ */ import_react68.default.createElement("div", { className: "flex items-center justify-end mt-2" }, /* @__PURE__ */ import_react68.default.createElement("button", { onClick: () => setInfoModalItem(null), className: "px-6 py-2.5 text-xs text-neutral-500 hover:bg-neutral-50 rounded-full outline-none transition-colors" }, "Close")))), explorer.isOpen && /* @__PURE__ */ import_react68.default.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4" }, /* @__PURE__ */ import_react68.default.createElement("div", { className: "absolute inset-0 bg-black/40", onClick: () => !isSubmitting && setExplorer((p) => ({ ...p, isOpen: false })) }), /* @__PURE__ */ import_react68.default.createElement("div", { className: "relative w-full max-w-md bg-white shadow-2xl rounded-2xl p-6 flex flex-col gap-4 animate-in zoom-in-95 duration-200 min-h-100" }, /* @__PURE__ */ import_react68.default.createElement("div", null, /* @__PURE__ */ import_react68.default.createElement("h3", { className: "text-lg text-black tracking-tight mb-1 capitalize" }, explorer.action, " Items"), /* @__PURE__ */ import_react68.default.createElement("p", { className: "text-[11px] text-neutral-400" }, "Select destination directory.")), /* @__PURE__ */ import_react68.default.createElement("div", { className: "flex items-center gap-1.5 overflow-x-auto text-xs py-2 text-neutral-400 whitespace-nowrap" }, explorer.breadcrumbs.map((crumb, idx) => /* @__PURE__ */ import_react68.default.createElement(import_react68.default.Fragment, { key: idx }, idx > 0 && /* @__PURE__ */ import_react68.default.createElement("span", null, "/"), /* @__PURE__ */ import_react68.default.createElement("button", { disabled: explorer.loading, onClick: () => navigateExplorer(crumb.id), className: `hover:text-black outline-none ${idx === explorer.breadcrumbs.length - 1 ? "text-black " : ""}` }, crumb.name)))), /* @__PURE__ */ import_react68.default.createElement("div", { className: "flex-1 overflow-y-auto rounded-xl" }, explorer.loading ? /* @__PURE__ */ import_react68.default.createElement("div", { className: "h-full flex items-center justify-center p-10" }, /* @__PURE__ */ import_react68.default.createElement(import_react69.HugeiconsIcon, { icon: import_core_free_icons23.Loading03Icon, className: "animate-spin text-neutral-400", size: 20 })) : explorer.folders.length === 0 ? /* @__PURE__ */ import_react68.default.createElement("div", { className: "h-full flex items-center justify-center p-10 text-xs text-neutral-400" }, "No Directories.") : /* @__PURE__ */ import_react68.default.createElement("div", { className: "divide-y divide-neutral-50" }, explorer.folders.map((f) => /* @__PURE__ */ import_react68.default.createElement("div", { key: f.id, onClick: () => navigateExplorer(f.id), className: "flex items-center gap-3 p-3 hover:bg-neutral-50 cursor-pointer transition-colors" }, /* @__PURE__ */ import_react68.default.createElement(import_react69.HugeiconsIcon, { icon: import_core_free_icons23.FolderIcon, size: 16, className: "text-black" }), /* @__PURE__ */ import_react68.default.createElement("span", { className: "text-sm text-black truncate" }, f.name))))), /* @__PURE__ */ import_react68.default.createElement("div", { className: "flex items-center justify-end gap-3 mt-2" }, /* @__PURE__ */ import_react68.default.createElement("button", { onClick: () => setExplorer((p) => ({ ...p, isOpen: false })), disabled: isSubmitting, className: "px-6 py-2.5 text-xs text-neutral-500 hover:bg-neutral-50 rounded-full outline-none disabled:opacity-50 transition-colors" }, "Cancel"), /* @__PURE__ */ import_react68.default.createElement(ThreeDActionButton, { onClick: executeExplorerAction, isLoading: isSubmitting }, "Paste Here")))));
|
|
3755
3818
|
};
|
|
3756
3819
|
|
|
3757
3820
|
// src/components/UniversalTrashView.tsx
|
|
@@ -3791,7 +3854,7 @@ var UniversalTrashView = ({
|
|
|
3791
3854
|
const i = Math.floor(Math.log(num) / Math.log(k));
|
|
3792
3855
|
return parseFloat((num / Math.pow(k, i)).toFixed(1)) + " " + sizes[i];
|
|
3793
3856
|
};
|
|
3794
|
-
const
|
|
3857
|
+
const formatDate4 = (dateString) => {
|
|
3795
3858
|
return new Date(dateString).toLocaleDateString("en-US", { month: "short", day: "numeric", year: "numeric" });
|
|
3796
3859
|
};
|
|
3797
3860
|
const handleRowClick = (id, e) => {
|
|
@@ -3823,7 +3886,7 @@ var UniversalTrashView = ({
|
|
|
3823
3886
|
return /* @__PURE__ */ import_react70.default.createElement("tr", { key: item.id, onClick: (e) => handleRowClick(item.id, e), onContextMenu: (e) => {
|
|
3824
3887
|
e.preventDefault();
|
|
3825
3888
|
setSelectedIds([item.id]);
|
|
3826
|
-
}, className: `hover:bg-neutral-50/70 transition-colors cursor-pointer group ${isChecked ? "bg-neutral-50" : ""}` }, /* @__PURE__ */ import_react70.default.createElement("td", { className: "p-3", onClick: (e) => e.stopPropagation() }, /* @__PURE__ */ import_react70.default.createElement("input", { type: "checkbox", checked: isChecked, onChange: () => handleRowClick(item.id, { ctrlKey: true }), className: "rounded border-neutral-300 w-2.5 h-2.5 text-black focus:ring-black accent-black cursor-pointer" })), /* @__PURE__ */ import_react70.default.createElement("td", { className: "p-3 flex items-center gap-3 min-w-0" }, /* @__PURE__ */ import_react70.default.createElement("div", { className: "w-9 h-9 shrink-0 flex items-center justify-center relative opacity-50" }, /* @__PURE__ */ import_react70.default.createElement(FileIconMapper, { type: item.type, mimeType: item.mimeType })), /* @__PURE__ */ import_react70.default.createElement("span", { className: "text-xs text-black truncate pr-4 line-through decoration-neutral-300 opacity-60" }, item.name)), /* @__PURE__ */ import_react70.default.createElement("td", { className: "p-3 text-xs text-neutral-500 whitespace-nowrap" },
|
|
3889
|
+
}, className: `hover:bg-neutral-50/70 transition-colors cursor-pointer group ${isChecked ? "bg-neutral-50" : ""}` }, /* @__PURE__ */ import_react70.default.createElement("td", { className: "p-3", onClick: (e) => e.stopPropagation() }, /* @__PURE__ */ import_react70.default.createElement("input", { type: "checkbox", checked: isChecked, onChange: () => handleRowClick(item.id, { ctrlKey: true }), className: "rounded border-neutral-300 w-2.5 h-2.5 text-black focus:ring-black accent-black cursor-pointer" })), /* @__PURE__ */ import_react70.default.createElement("td", { className: "p-3 flex items-center gap-3 min-w-0" }, /* @__PURE__ */ import_react70.default.createElement("div", { className: "w-9 h-9 shrink-0 flex items-center justify-center relative opacity-50" }, /* @__PURE__ */ import_react70.default.createElement(FileIconMapper, { type: item.type, mimeType: item.mimeType })), /* @__PURE__ */ import_react70.default.createElement("span", { className: "text-xs text-black truncate pr-4 line-through decoration-neutral-300 opacity-60" }, item.name)), /* @__PURE__ */ import_react70.default.createElement("td", { className: "p-3 text-xs text-neutral-500 whitespace-nowrap" }, formatDate4(item.updatedAt)), /* @__PURE__ */ import_react70.default.createElement("td", { className: "p-3 text-xs text-neutral-500 text-right whitespace-nowrap" }, formatBytes(item.size)));
|
|
3827
3890
|
}))), isLoading && /* @__PURE__ */ import_react70.default.createElement("div", { className: "absolute inset-0 top-12 z-20 bg-white flex items-start justify-center pt-20" }, /* @__PURE__ */ import_react70.default.createElement(import_react71.HugeiconsIcon, { icon: import_core_free_icons24.Loading03Icon, className: "animate-spin text-neutral-400", size: 24 }))), /* @__PURE__ */ import_react70.default.createElement("div", { className: `flex items-center justify-between pt-4 ${lockClass}` }, /* @__PURE__ */ import_react70.default.createElement("span", { className: "text-[11px] text-neutral-400 tracking-[0.2em]" }, "Page ", currentPage, " of ", Math.max(1, totalPages)), /* @__PURE__ */ import_react70.default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ import_react70.default.createElement("button", { onClick: () => onPageChange(currentPage - 1), disabled: currentPage <= 1, className: "p-2 border border-neutral-100 rounded-full bg-white text-neutral-500 hover:text-black disabled:opacity-30 transition-all outline-none" }, /* @__PURE__ */ import_react70.default.createElement(import_react71.HugeiconsIcon, { icon: import_core_free_icons24.ArrowLeft01Icon, size: 14 })), /* @__PURE__ */ import_react70.default.createElement("button", { onClick: () => onPageChange(currentPage + 1), disabled: currentPage >= totalPages, className: "p-2 border border-neutral-100 rounded-full bg-white text-neutral-500 hover:text-black disabled:opacity-30 transition-all outline-none" }, /* @__PURE__ */ import_react70.default.createElement(import_react71.HugeiconsIcon, { icon: import_core_free_icons24.ArrowRight01Icon, size: 14 })))), showEmptyTrashDialog && /* @__PURE__ */ import_react70.default.createElement("div", { className: "fixed inset-0 z-110 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ import_react70.default.createElement(
|
|
3828
3891
|
"div",
|
|
3829
3892
|
{
|
|
@@ -3849,10 +3912,179 @@ var UniversalTrashView = ({
|
|
|
3849
3912
|
)))));
|
|
3850
3913
|
};
|
|
3851
3914
|
|
|
3852
|
-
// src/components/
|
|
3915
|
+
// src/components/UniversalTransactionPage.tsx
|
|
3853
3916
|
var import_react72 = __toESM(require("react"));
|
|
3854
3917
|
var import_react73 = require("@hugeicons/react");
|
|
3855
3918
|
var import_core_free_icons25 = require("@hugeicons/core-free-icons");
|
|
3919
|
+
var PageSpinner6 = () => /* @__PURE__ */ import_react72.default.createElement("div", { className: "flex justify-center items-center py-12" }, /* @__PURE__ */ import_react72.default.createElement(import_react73.HugeiconsIcon, { icon: import_core_free_icons25.Loading03Icon, size: 32, className: "animate-spin mb-4 text-black" }));
|
|
3920
|
+
var formatDate3 = (dateInput) => {
|
|
3921
|
+
const d = new Date(dateInput);
|
|
3922
|
+
const day = d.getDate();
|
|
3923
|
+
const month = d.toLocaleString("en-US", { month: "short" });
|
|
3924
|
+
const year = d.getFullYear();
|
|
3925
|
+
return `${day} ${month} ${year}`;
|
|
3926
|
+
};
|
|
3927
|
+
var formatTime = (dateInput) => {
|
|
3928
|
+
return new Date(dateInput).toLocaleTimeString("en-US", { hour: "2-digit", minute: "2-digit" });
|
|
3929
|
+
};
|
|
3930
|
+
var UniversalTransactionPage = ({
|
|
3931
|
+
headerTitle,
|
|
3932
|
+
headerDescription,
|
|
3933
|
+
transactions,
|
|
3934
|
+
isLoading,
|
|
3935
|
+
currentPage,
|
|
3936
|
+
totalPages,
|
|
3937
|
+
onPageChange,
|
|
3938
|
+
searchQuery,
|
|
3939
|
+
onSearchChange,
|
|
3940
|
+
activeDirectionFilter,
|
|
3941
|
+
onDirectionFilterChange,
|
|
3942
|
+
activeTypeFilter,
|
|
3943
|
+
onTypeFilterChange
|
|
3944
|
+
}) => {
|
|
3945
|
+
const [currentView, setCurrentView] = (0, import_react72.useState)("list");
|
|
3946
|
+
const [selectedTransaction, setSelectedTransaction] = (0, import_react72.useState)(null);
|
|
3947
|
+
const [localSearchQuery, setLocalSearchQuery] = (0, import_react72.useState)(searchQuery);
|
|
3948
|
+
const [isTyping, setIsTyping] = (0, import_react72.useState)(false);
|
|
3949
|
+
const [isDirectionModalOpen, setIsDirectionModalOpen] = (0, import_react72.useState)(false);
|
|
3950
|
+
const [isTypeModalOpen, setIsTypeModalOpen] = (0, import_react72.useState)(false);
|
|
3951
|
+
const directionDropdownRef = (0, import_react72.useRef)(null);
|
|
3952
|
+
const typeDropdownRef = (0, import_react72.useRef)(null);
|
|
3953
|
+
(0, import_react72.useEffect)(() => {
|
|
3954
|
+
function handleClickOutside(event) {
|
|
3955
|
+
if (directionDropdownRef.current && !directionDropdownRef.current.contains(event.target)) {
|
|
3956
|
+
setIsDirectionModalOpen(false);
|
|
3957
|
+
}
|
|
3958
|
+
if (typeDropdownRef.current && !typeDropdownRef.current.contains(event.target)) {
|
|
3959
|
+
setIsTypeModalOpen(false);
|
|
3960
|
+
}
|
|
3961
|
+
}
|
|
3962
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
3963
|
+
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
3964
|
+
}, []);
|
|
3965
|
+
(0, import_react72.useEffect)(() => {
|
|
3966
|
+
setIsTyping(true);
|
|
3967
|
+
const handler = setTimeout(() => {
|
|
3968
|
+
onSearchChange(localSearchQuery);
|
|
3969
|
+
setIsTyping(false);
|
|
3970
|
+
}, 600);
|
|
3971
|
+
return () => clearTimeout(handler);
|
|
3972
|
+
}, [localSearchQuery, onSearchChange]);
|
|
3973
|
+
(0, import_react72.useEffect)(() => {
|
|
3974
|
+
if (searchQuery === "" && localSearchQuery !== "") {
|
|
3975
|
+
setLocalSearchQuery("");
|
|
3976
|
+
}
|
|
3977
|
+
}, [searchQuery]);
|
|
3978
|
+
const goBack = () => {
|
|
3979
|
+
setCurrentView("list");
|
|
3980
|
+
setSelectedTransaction(null);
|
|
3981
|
+
};
|
|
3982
|
+
const getDisplayName = (tx) => {
|
|
3983
|
+
if (tx.metadata?.merchantName) return tx.metadata.merchantName;
|
|
3984
|
+
if (tx.metadata?.description) return tx.metadata.description;
|
|
3985
|
+
return tx.type === "CARD_TRANSACTION" ? "Card Transaction" : "Wallet Transaction";
|
|
3986
|
+
};
|
|
3987
|
+
const isListLoading = isLoading || isTyping;
|
|
3988
|
+
return /* @__PURE__ */ import_react72.default.createElement("div", { className: "flex flex-col gap-6 animate-in max-w-5xl fade-in duration-300" }, currentView === "list" && /* @__PURE__ */ import_react72.default.createElement("div", { className: "flex flex-col sm:flex-row items-center justify-between gap-4 w-full" }, /* @__PURE__ */ import_react72.default.createElement("div", { className: "relative w-full sm:w-96" }, /* @__PURE__ */ import_react72.default.createElement("div", { className: "absolute inset-y-0 left-0 pl-4 flex items-center pointer-events-none" }, /* @__PURE__ */ import_react72.default.createElement(import_react73.HugeiconsIcon, { icon: import_core_free_icons25.Search01Icon, size: 16, className: "text-neutral-400" })), /* @__PURE__ */ import_react72.default.createElement(
|
|
3989
|
+
"input",
|
|
3990
|
+
{
|
|
3991
|
+
type: "text",
|
|
3992
|
+
placeholder: "Search reference or amount...",
|
|
3993
|
+
value: localSearchQuery,
|
|
3994
|
+
onChange: (e) => setLocalSearchQuery(e.target.value),
|
|
3995
|
+
className: "w-full pl-10 pr-4 py-3 bg-white rounded-full text-[13px] text-black outline-none transition-colors"
|
|
3996
|
+
}
|
|
3997
|
+
)), /* @__PURE__ */ import_react72.default.createElement("div", { className: "flex items-center gap-3 w-full sm:w-auto overflow-x-auto pb-1 sm:pb-0" }, /* @__PURE__ */ import_react72.default.createElement(
|
|
3998
|
+
"button",
|
|
3999
|
+
{
|
|
4000
|
+
onClick: () => setIsDirectionModalOpen(true),
|
|
4001
|
+
className: "flex items-center gap-2 whitespace-nowrap bg-white px-5 py-3 rounded-full text-[12px] text-neutral-600 hover:text-black hover:bg-neutral-50 transition-colors outline-none"
|
|
4002
|
+
},
|
|
4003
|
+
/* @__PURE__ */ import_react72.default.createElement(import_react73.HugeiconsIcon, { icon: import_core_free_icons25.FilterIcon, size: 14 }),
|
|
4004
|
+
activeDirectionFilter === "ALL" ? "Filter by Flow" : activeDirectionFilter
|
|
4005
|
+
), /* @__PURE__ */ import_react72.default.createElement(
|
|
4006
|
+
"button",
|
|
4007
|
+
{
|
|
4008
|
+
onClick: () => setIsTypeModalOpen(true),
|
|
4009
|
+
className: "flex items-center gap-2 whitespace-nowrap bg-white px-5 py-3 rounded-full text-[12px] text-neutral-600 hover:text-black hover:bg-neutral-50 transition-colors outline-none"
|
|
4010
|
+
},
|
|
4011
|
+
/* @__PURE__ */ import_react72.default.createElement(import_react73.HugeiconsIcon, { icon: import_core_free_icons25.FilterIcon, size: 14 }),
|
|
4012
|
+
activeTypeFilter === "ALL" ? "Filter by Type" : activeTypeFilter.replace("_", " ")
|
|
4013
|
+
))), /* @__PURE__ */ import_react72.default.createElement("div", { className: "flex flex-col gap-8 p-6 rounded-2xl bg-white w-full" }, /* @__PURE__ */ import_react72.default.createElement("div", { className: "flex flex-col sm:flex-row sm:items-start justify-between gap-4" }, currentView === "list" ? /* @__PURE__ */ import_react72.default.createElement("div", null, /* @__PURE__ */ import_react72.default.createElement("h1", { className: "text-black text-xl mb-1 tracking-tight" }, headerTitle), /* @__PURE__ */ import_react72.default.createElement("p", { className: "text-xs text-neutral-500" }, headerDescription)) : /* @__PURE__ */ import_react72.default.createElement("div", { className: "flex flex-col items-start gap-3" }, /* @__PURE__ */ import_react72.default.createElement("button", { onClick: goBack, className: "text-[11px] text-neutral-400 hover:text-black tracking-[0.2em] flex items-center gap-1.5 transition-colors outline-none" }, /* @__PURE__ */ import_react72.default.createElement(import_react73.HugeiconsIcon, { icon: import_core_free_icons25.ArrowLeft01Icon, size: 12 }), " Back to Ledger"), /* @__PURE__ */ import_react72.default.createElement("h1", { className: "text-lg text-black tracking-tight" }, "Transaction Details"))), currentView === "list" && /* @__PURE__ */ import_react72.default.createElement("div", { className: "w-full overflow-hidden" }, isListLoading ? /* @__PURE__ */ import_react72.default.createElement(PageSpinner6, null) : /* @__PURE__ */ import_react72.default.createElement("div", { className: "flex flex-col min-w-0" }, /* @__PURE__ */ import_react72.default.createElement("div", { className: "divide-y divide-neutral-100" }, transactions.length === 0 ? /* @__PURE__ */ import_react72.default.createElement("p", { className: "text-xs text-neutral-500 py-6 text-center" }, "No transactions found") : transactions.map((tx) => /* @__PURE__ */ import_react72.default.createElement(
|
|
4014
|
+
"div",
|
|
4015
|
+
{
|
|
4016
|
+
key: tx.id,
|
|
4017
|
+
onClick: () => {
|
|
4018
|
+
setSelectedTransaction(tx);
|
|
4019
|
+
setCurrentView("details");
|
|
4020
|
+
},
|
|
4021
|
+
className: "flex items-center justify-between py-4 hover:bg-neutral-50/50 transition-colors cursor-pointer group min-w-0 px-2 -mx-2 rounded-xl"
|
|
4022
|
+
},
|
|
4023
|
+
/* @__PURE__ */ import_react72.default.createElement("div", { className: "flex items-center gap-4 min-w-0 flex-1" }, /* @__PURE__ */ import_react72.default.createElement("div", { className: `w-10 h-10 shrink-0 rounded-full flex items-center justify-center ${tx.direction === "CREDIT" ? "bg-green-50 text-green-600" : "bg-neutral-100 text-neutral-600"}` }, /* @__PURE__ */ import_react72.default.createElement(import_react73.HugeiconsIcon, { icon: tx.direction === "CREDIT" ? import_core_free_icons25.ArrowDown01Icon : import_core_free_icons25.ArrowUp01Icon, size: 18 })), /* @__PURE__ */ import_react72.default.createElement("div", { className: "min-w-0 flex-1 flex flex-col gap-1" }, /* @__PURE__ */ import_react72.default.createElement("p", { className: "text-[13px] text-black truncate" }, getDisplayName(tx)), /* @__PURE__ */ import_react72.default.createElement("p", { className: "text-[13px] text-neutral-500 truncate" }, tx.direction === "CREDIT" ? "+" : "-", tx.amount, " ", tx.currency))),
|
|
4024
|
+
/* @__PURE__ */ import_react72.default.createElement("div", { className: "shrink-0 flex flex-col items-end gap-1 text-right" }, /* @__PURE__ */ import_react72.default.createElement("span", { className: "text-[11px] text-neutral-500" }, formatDate3(tx.createdAt)), /* @__PURE__ */ import_react72.default.createElement("span", { className: "text-[11px] text-neutral-400 capitalize" }, tx.direction.toLowerCase()))
|
|
4025
|
+
))), totalPages > 1 && /* @__PURE__ */ import_react72.default.createElement("div", { className: "flex items-center justify-between pt-6 mt-2 border-t border-neutral-100" }, /* @__PURE__ */ import_react72.default.createElement("span", { className: "text-[11px] text-neutral-400 tracking-[0.2em] uppercase " }, "Page ", currentPage, " of ", totalPages), /* @__PURE__ */ import_react72.default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ import_react72.default.createElement(
|
|
4026
|
+
"button",
|
|
4027
|
+
{
|
|
4028
|
+
onClick: () => onPageChange(currentPage - 1),
|
|
4029
|
+
disabled: currentPage === 1 || isListLoading,
|
|
4030
|
+
className: "p-2 border border-neutral-100 rounded-full bg-white text-neutral-500 hover:text-black hover:border-black disabled:opacity-30 disabled:cursor-not-allowed transition-all outline-none"
|
|
4031
|
+
},
|
|
4032
|
+
/* @__PURE__ */ import_react72.default.createElement(import_react73.HugeiconsIcon, { icon: import_core_free_icons25.ArrowLeft01Icon, size: 14 })
|
|
4033
|
+
), /* @__PURE__ */ import_react72.default.createElement(
|
|
4034
|
+
"button",
|
|
4035
|
+
{
|
|
4036
|
+
onClick: () => onPageChange(currentPage + 1),
|
|
4037
|
+
disabled: currentPage >= totalPages || isListLoading,
|
|
4038
|
+
className: "p-2 border border-neutral-100 rounded-full bg-white text-neutral-500 hover:text-black hover:border-black disabled:opacity-30 disabled:cursor-not-allowed transition-all outline-none"
|
|
4039
|
+
},
|
|
4040
|
+
/* @__PURE__ */ import_react72.default.createElement(import_react73.HugeiconsIcon, { icon: import_core_free_icons25.ArrowRight01Icon, size: 14 })
|
|
4041
|
+
))))), currentView === "details" && selectedTransaction && /* @__PURE__ */ import_react72.default.createElement("div", { className: "w-full text-left" }, /* @__PURE__ */ import_react72.default.createElement("div", { className: "flex flex-col items-center justify-center py-10 border-b border-neutral-100 mb-8" }, /* @__PURE__ */ import_react72.default.createElement("div", { className: `w-14 h-14 rounded-full flex items-center justify-center mb-4 ${selectedTransaction.direction === "CREDIT" ? "bg-green-50 text-green-600" : "bg-neutral-100 text-neutral-600"}` }, /* @__PURE__ */ import_react72.default.createElement(import_react73.HugeiconsIcon, { icon: selectedTransaction.direction === "CREDIT" ? import_core_free_icons25.ArrowDown01Icon : import_core_free_icons25.ArrowUp01Icon, size: 24 })), /* @__PURE__ */ import_react72.default.createElement("h2", { className: "text-3xl text-black mb-2" }, selectedTransaction.direction === "CREDIT" ? "+" : "-", selectedTransaction.amount, " ", selectedTransaction.currency), /* @__PURE__ */ import_react72.default.createElement("span", { className: "text-[11px] tracking-widest text-neutral-500 uppercase px-4 py-1.5 rounded-full bg-neutral-50" }, selectedTransaction.status)), /* @__PURE__ */ import_react72.default.createElement("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-y-8 gap-x-4 " }, /* @__PURE__ */ import_react72.default.createElement("div", null, /* @__PURE__ */ import_react72.default.createElement("span", { className: "text-[11px] tracking-[0.2em] text-neutral-400 block mb-2 uppercase" }, "Reference ID"), /* @__PURE__ */ import_react72.default.createElement("span", { className: "text-[13px] text-black break-all" }, selectedTransaction.reference)), /* @__PURE__ */ import_react72.default.createElement("div", null, /* @__PURE__ */ import_react72.default.createElement("span", { className: "text-[11px] tracking-[0.2em] text-neutral-400 block mb-2 uppercase" }, "Date & Time"), /* @__PURE__ */ import_react72.default.createElement("span", { className: "text-[13px] text-black" }, formatDate3(selectedTransaction.createdAt), " at ", formatTime(selectedTransaction.createdAt))), /* @__PURE__ */ import_react72.default.createElement("div", null, /* @__PURE__ */ import_react72.default.createElement("span", { className: "text-[11px] tracking-[0.2em] text-neutral-400 block mb-2 uppercase" }, "Transaction Type"), /* @__PURE__ */ import_react72.default.createElement("span", { className: "text-[13px] text-black capitalize" }, selectedTransaction.type.replace("_", " ").toLowerCase())), /* @__PURE__ */ import_react72.default.createElement("div", null, /* @__PURE__ */ import_react72.default.createElement("span", { className: "text-[11px] tracking-[0.2em] text-neutral-400 block mb-2 uppercase" }, "Flow Direction"), /* @__PURE__ */ import_react72.default.createElement("span", { className: "text-[13px] text-black capitalize" }, selectedTransaction.direction.toLowerCase()))))), isDirectionModalOpen && /* @__PURE__ */ import_react72.default.createElement("div", { className: "fixed inset-0 z-110 flex items-center justify-center p-4" }, /* @__PURE__ */ import_react72.default.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setIsDirectionModalOpen(false) }), /* @__PURE__ */ import_react72.default.createElement("div", { ref: directionDropdownRef, 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_react72.default.createElement("div", { className: "p-6 text-center w-full" }, /* @__PURE__ */ import_react72.default.createElement("h3", { className: "text-[14px] text-black tracking-tight " }, "Filter by Flow")), /* @__PURE__ */ import_react72.default.createElement("div", { className: "w-full flex flex-col pl-2 pr-2" }, ["ALL", "CREDIT", "DEBIT"].map((option) => /* @__PURE__ */ import_react72.default.createElement(
|
|
4042
|
+
"button",
|
|
4043
|
+
{
|
|
4044
|
+
key: option,
|
|
4045
|
+
onClick: () => {
|
|
4046
|
+
onDirectionFilterChange(option);
|
|
4047
|
+
setIsDirectionModalOpen(false);
|
|
4048
|
+
},
|
|
4049
|
+
className: `text-left px-4 py-3 text-[11px] tracking-wide transition-colors rounded-full flex items-center justify-between outline-none ${activeDirectionFilter === option ? "bg-neutral-100 text-black" : "text-neutral-500 hover:bg-neutral-50 hover:text-black"}`
|
|
4050
|
+
},
|
|
4051
|
+
/* @__PURE__ */ import_react72.default.createElement("span", { className: "truncate pr-2 capitalize" }, option.toLowerCase())
|
|
4052
|
+
))), /* @__PURE__ */ import_react72.default.createElement("div", { className: "w-full flex" }, /* @__PURE__ */ import_react72.default.createElement(
|
|
4053
|
+
"button",
|
|
4054
|
+
{
|
|
4055
|
+
onClick: () => setIsDirectionModalOpen(false),
|
|
4056
|
+
className: "w-full py-3 text-[13px] text-neutral-600 hover:bg-neutral-50 transition-colors outline-none "
|
|
4057
|
+
},
|
|
4058
|
+
"Cancel"
|
|
4059
|
+
)))), isTypeModalOpen && /* @__PURE__ */ import_react72.default.createElement("div", { className: "fixed inset-0 z-110 flex items-center justify-center p-4" }, /* @__PURE__ */ import_react72.default.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setIsTypeModalOpen(false) }), /* @__PURE__ */ import_react72.default.createElement("div", { ref: typeDropdownRef, 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_react72.default.createElement("div", { className: "p-6 text-center w-full" }, /* @__PURE__ */ import_react72.default.createElement("h3", { className: "text-[14px] text-black tracking-tight " }, "Filter by Type")), /* @__PURE__ */ import_react72.default.createElement("div", { className: "w-full flex flex-col pl-2 pr-2" }, [
|
|
4060
|
+
{ label: "All Transactions", value: "ALL" },
|
|
4061
|
+
{ label: "Wallet Transactions", value: "WALLET_TRANSACTION" },
|
|
4062
|
+
{ label: "Card Transactions", value: "CARD_TRANSACTION" }
|
|
4063
|
+
].map((option) => /* @__PURE__ */ import_react72.default.createElement(
|
|
4064
|
+
"button",
|
|
4065
|
+
{
|
|
4066
|
+
key: option.value,
|
|
4067
|
+
onClick: () => {
|
|
4068
|
+
onTypeFilterChange(option.value);
|
|
4069
|
+
setIsTypeModalOpen(false);
|
|
4070
|
+
},
|
|
4071
|
+
className: `text-left px-4 py-3 text-[11px] tracking-wide transition-colors rounded-full flex items-center justify-between outline-none ${activeTypeFilter === option.value ? "bg-neutral-100 text-black" : "text-neutral-500 hover:bg-neutral-50 hover:text-black"}`
|
|
4072
|
+
},
|
|
4073
|
+
/* @__PURE__ */ import_react72.default.createElement("span", { className: "truncate pr-2" }, option.label)
|
|
4074
|
+
))), /* @__PURE__ */ import_react72.default.createElement("div", { className: "w-full flex" }, /* @__PURE__ */ import_react72.default.createElement(
|
|
4075
|
+
"button",
|
|
4076
|
+
{
|
|
4077
|
+
onClick: () => setIsTypeModalOpen(false),
|
|
4078
|
+
className: "w-full py-3 text-[13px] text-neutral-600 hover:bg-neutral-50 transition-colors outline-none "
|
|
4079
|
+
},
|
|
4080
|
+
"Cancel"
|
|
4081
|
+
)))));
|
|
4082
|
+
};
|
|
4083
|
+
|
|
4084
|
+
// src/components/DriveItemOpener.tsx
|
|
4085
|
+
var import_react74 = __toESM(require("react"));
|
|
4086
|
+
var import_react75 = require("@hugeicons/react");
|
|
4087
|
+
var import_core_free_icons26 = require("@hugeicons/core-free-icons");
|
|
3856
4088
|
var DriveItemOpener = ({ item, onClose }) => {
|
|
3857
4089
|
if (!item) return null;
|
|
3858
4090
|
const formatBytes = (bytes) => {
|
|
@@ -3863,38 +4095,38 @@ var DriveItemOpener = ({ item, onClose }) => {
|
|
|
3863
4095
|
const i = Math.floor(Math.log(num) / Math.log(k));
|
|
3864
4096
|
return parseFloat((num / Math.pow(k, i)).toFixed(1)) + " " + sizes[i];
|
|
3865
4097
|
};
|
|
3866
|
-
return /* @__PURE__ */
|
|
4098
|
+
return /* @__PURE__ */ import_react74.default.createElement("div", { className: "fixed inset-0 z-200 bg-black/95 flex flex-col animate-in fade-in duration-200" }, /* @__PURE__ */ import_react74.default.createElement("div", { className: "flex items-center justify-between p-4 border-b border-white/10 bg-black" }, /* @__PURE__ */ import_react74.default.createElement("div", { className: "flex items-center gap-4" }, /* @__PURE__ */ import_react74.default.createElement("div", { className: "w-10 h-10 bg-white/10 rounded-xl flex items-center justify-center" }, /* @__PURE__ */ import_react74.default.createElement("div", { className: "invert grayscale brightness-200" }, /* @__PURE__ */ import_react74.default.createElement(FileIconMapper, { type: item.type, mimeType: item.mimeType }))), /* @__PURE__ */ import_react74.default.createElement("div", null, /* @__PURE__ */ import_react74.default.createElement("h3", { className: "text-sm text-white tracking-wide" }, item.name), /* @__PURE__ */ import_react74.default.createElement("p", { className: "text-xs text-white/50 mt-0.5" }, item.type, " \u2022 ", formatBytes(item.size), " \u2022 ", new Date(item.updatedAt).toLocaleDateString()))), /* @__PURE__ */ import_react74.default.createElement(
|
|
3867
4099
|
"button",
|
|
3868
4100
|
{
|
|
3869
4101
|
onClick: onClose,
|
|
3870
4102
|
className: "p-3 bg-white/10 hover:bg-white/20 text-white rounded-full transition-colors outline-none"
|
|
3871
4103
|
},
|
|
3872
|
-
/* @__PURE__ */
|
|
3873
|
-
)), /* @__PURE__ */
|
|
4104
|
+
/* @__PURE__ */ import_react74.default.createElement(import_react75.HugeiconsIcon, { icon: import_core_free_icons26.Cancel01Icon, size: 20 })
|
|
4105
|
+
)), /* @__PURE__ */ import_react74.default.createElement("div", { className: "flex-1 flex items-center justify-center p-8 overflow-y-auto relative" }, /* @__PURE__ */ import_react74.default.createElement("div", { className: "text-center" }, /* @__PURE__ */ import_react74.default.createElement("p", { className: "text-white/40 text-sm tracking-widest " }, "File Preview Engine"), /* @__PURE__ */ import_react74.default.createElement("p", { className: "text-white/20 text-xs mt-2" }, "Content rendering logic will be attached here."))));
|
|
3874
4106
|
};
|
|
3875
4107
|
|
|
3876
4108
|
// src/components/DriveShareModal.tsx
|
|
3877
|
-
var
|
|
4109
|
+
var import_react76 = __toESM(require("react"));
|
|
3878
4110
|
var DriveShareModal = ({ items, onClose }) => {
|
|
3879
4111
|
if (!items || items.length === 0) return null;
|
|
3880
|
-
return /* @__PURE__ */
|
|
4112
|
+
return /* @__PURE__ */ import_react76.default.createElement("div", { className: "fixed inset-0 z-150 flex items-center justify-center p-4 bg-black/30 animate-in fade-in duration-200" }, /* @__PURE__ */ import_react76.default.createElement("div", { className: "bg-white w-full max-w-md rounded-2xl p-6 shadow-2xl flex flex-col gap-6 animate-in zoom-in-95 duration-200" }, /* @__PURE__ */ import_react76.default.createElement("div", null, /* @__PURE__ */ import_react76.default.createElement("h3", { className: "text-lg text-black tracking-tight mb-1" }, "Share Access"), /* @__PURE__ */ import_react76.default.createElement("p", { className: "text-xs text-neutral-500" }, "Managing permissions for ", items.length, " selected item(s).")), /* @__PURE__ */ import_react76.default.createElement("div", { className: "flex justify-end gap-3 mt-2" }, /* @__PURE__ */ import_react76.default.createElement(
|
|
3881
4113
|
"button",
|
|
3882
4114
|
{
|
|
3883
4115
|
onClick: onClose,
|
|
3884
4116
|
className: "px-6 py-2.5 text-xs text-neutral-500 hover:bg-neutral-50 rounded-full transition-colors outline-none"
|
|
3885
4117
|
},
|
|
3886
4118
|
"Close"
|
|
3887
|
-
), /* @__PURE__ */
|
|
4119
|
+
), /* @__PURE__ */ import_react76.default.createElement(ThreeDActionButton, { onClick: onClose }, "Save Links"))));
|
|
3888
4120
|
};
|
|
3889
4121
|
|
|
3890
4122
|
// src/components/AiApproveDecline.tsx
|
|
3891
|
-
var
|
|
3892
|
-
var
|
|
3893
|
-
var
|
|
4123
|
+
var import_react77 = __toESM(require("react"));
|
|
4124
|
+
var import_react78 = require("@hugeicons/react");
|
|
4125
|
+
var import_core_free_icons27 = require("@hugeicons/core-free-icons");
|
|
3894
4126
|
var AiApproveDecline = ({ suggestionTitle, suggestionValue, onApprove, onDecline, onEdit }) => {
|
|
3895
|
-
const [isEditing, setIsEditing] = (0,
|
|
3896
|
-
const [editVal, setEditVal] = (0,
|
|
3897
|
-
return /* @__PURE__ */
|
|
4127
|
+
const [isEditing, setIsEditing] = (0, import_react77.useState)(false);
|
|
4128
|
+
const [editVal, setEditVal] = (0, import_react77.useState)(typeof suggestionValue === "string" ? suggestionValue : "");
|
|
4129
|
+
return /* @__PURE__ */ import_react77.default.createElement("div", { className: "border border-orange-100 bg-linear-to-bl from-orange-50/80 via-white to-white p-5 rounded-2xl flex flex-col gap-4 relative overflow-hidden" }, /* @__PURE__ */ import_react77.default.createElement("div", null, /* @__PURE__ */ import_react77.default.createElement("span", { className: "text-[11px] tracking-widest text-orange-600 block mb-1 " }, "AI Suggestion: ", suggestionTitle), !isEditing ? /* @__PURE__ */ import_react77.default.createElement("div", { className: "text-sm text-black" }, suggestionValue) : /* @__PURE__ */ import_react77.default.createElement(
|
|
3898
4130
|
"input",
|
|
3899
4131
|
{
|
|
3900
4132
|
type: "text",
|
|
@@ -3903,45 +4135,45 @@ var AiApproveDecline = ({ suggestionTitle, suggestionValue, onApprove, onDecline
|
|
|
3903
4135
|
className: "w-full text-sm p-2 border-b border-orange-200 bg-transparent outline-none focus:border-orange-400 transition-colors",
|
|
3904
4136
|
autoFocus: true
|
|
3905
4137
|
}
|
|
3906
|
-
)), /* @__PURE__ */
|
|
4138
|
+
)), /* @__PURE__ */ import_react77.default.createElement("div", { className: "flex items-center gap-1 mt-2" }, !isEditing ? /* @__PURE__ */ import_react77.default.createElement(import_react77.default.Fragment, null, /* @__PURE__ */ import_react77.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_react77.default.createElement(import_react78.HugeiconsIcon, { icon: import_core_free_icons27.CheckmarkCircle01Icon, size: 28 })), /* @__PURE__ */ import_react77.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_react77.default.createElement(import_react78.HugeiconsIcon, { icon: import_core_free_icons27.CancelCircleIcon, size: 28 })), onEdit && /* @__PURE__ */ import_react77.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_react77.default.createElement(import_react78.HugeiconsIcon, { icon: import_core_free_icons27.PencilEdit01Icon, size: 18 }))) : /* @__PURE__ */ import_react77.default.createElement(import_react77.default.Fragment, null, /* @__PURE__ */ import_react77.default.createElement("button", { onClick: () => {
|
|
3907
4139
|
onEdit?.(editVal);
|
|
3908
4140
|
setIsEditing(false);
|
|
3909
|
-
}, 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__ */
|
|
4141
|
+
}, 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_react77.default.createElement(import_react78.HugeiconsIcon, { icon: import_core_free_icons27.CheckmarkCircle01Icon, size: 28 })), /* @__PURE__ */ import_react77.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_react77.default.createElement(import_react78.HugeiconsIcon, { icon: import_core_free_icons27.CancelCircleIcon, size: 28 })))));
|
|
3910
4142
|
};
|
|
3911
4143
|
|
|
3912
4144
|
// src/components/AiStageCheck.tsx
|
|
3913
|
-
var
|
|
3914
|
-
var
|
|
3915
|
-
var
|
|
4145
|
+
var import_react79 = __toESM(require("react"));
|
|
4146
|
+
var import_react80 = require("@hugeicons/react");
|
|
4147
|
+
var import_core_free_icons28 = require("@hugeicons/core-free-icons");
|
|
3916
4148
|
var AiStageCheck = ({ tasks }) => {
|
|
3917
|
-
return /* @__PURE__ */
|
|
4149
|
+
return /* @__PURE__ */ import_react79.default.createElement("div", { className: "flex flex-col gap-3 p-5 rounded-2xl border border-orange-100 bg-linear-to-bl from-orange-50/80 via-white to-white relative overflow-hidden" }, /* @__PURE__ */ import_react79.default.createElement("span", { className: "text-[11px] tracking-widest text-orange-600 mb-1 " }, "AI Processing"), tasks.map((task) => /* @__PURE__ */ import_react79.default.createElement("div", { key: task.id, className: "flex items-center gap-3" }, task.status === "pending" && /* @__PURE__ */ import_react79.default.createElement("div", { className: "w-4 h-4 rounded-full border border-orange-200" }), task.status === "loading" && /* @__PURE__ */ import_react79.default.createElement(import_react80.HugeiconsIcon, { icon: import_core_free_icons28.Loading03Icon, size: 16, className: "animate-spin text-orange-500" }), task.status === "success" && /* @__PURE__ */ import_react79.default.createElement(import_react80.HugeiconsIcon, { icon: import_core_free_icons28.CheckmarkCircle02Icon, size: 16, className: "text-emerald-500" }), task.status === "error" && /* @__PURE__ */ import_react79.default.createElement(import_react80.HugeiconsIcon, { icon: import_core_free_icons28.CancelCircleIcon, size: 16, className: "text-red-500" }), /* @__PURE__ */ import_react79.default.createElement("span", { className: `text-xs transition-colors ${task.status === "success" ? "text-black" : task.status === "loading" ? "text-orange-700" : "text-neutral-500"}` }, task.label))));
|
|
3918
4150
|
};
|
|
3919
4151
|
|
|
3920
4152
|
// src/components/Stagger.tsx
|
|
3921
|
-
var
|
|
3922
|
-
var
|
|
3923
|
-
var
|
|
4153
|
+
var import_react81 = __toESM(require("react"));
|
|
4154
|
+
var import_react82 = require("@hugeicons/react");
|
|
4155
|
+
var import_core_free_icons29 = require("@hugeicons/core-free-icons");
|
|
3924
4156
|
var Stagger = ({ steps, currentStep }) => {
|
|
3925
4157
|
const getIconForStep = (stepName) => {
|
|
3926
4158
|
const lowerName = stepName.toLowerCase();
|
|
3927
|
-
if (lowerName.includes("document")) return
|
|
3928
|
-
if (lowerName.includes("review")) return
|
|
3929
|
-
if (lowerName.includes("submit")) return
|
|
3930
|
-
return
|
|
4159
|
+
if (lowerName.includes("document")) return import_core_free_icons29.Upload01Icon;
|
|
4160
|
+
if (lowerName.includes("review")) return import_core_free_icons29.FileSyncIcon;
|
|
4161
|
+
if (lowerName.includes("submit")) return import_core_free_icons29.CloudUploadIcon;
|
|
4162
|
+
return import_core_free_icons29.Briefcase02Icon;
|
|
3931
4163
|
};
|
|
3932
|
-
return /* @__PURE__ */
|
|
4164
|
+
return /* @__PURE__ */ import_react81.default.createElement("div", { className: "w-full flex items-center justify-between relative z-0" }, /* @__PURE__ */ import_react81.default.createElement("div", { className: "absolute left-0 top-1/2 -translate-y-1/2 w-full h-px bg-neutral-100 -z-10" }), /* @__PURE__ */ import_react81.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) => {
|
|
3933
4165
|
const isActive = idx === currentStep;
|
|
3934
4166
|
const isPassed = idx < currentStep;
|
|
3935
4167
|
const colorClass = isPassed ? "bg-emerald-500 text-white" : isActive ? "bg-neutral-100 text-neutral-500" : "bg-neutral-100 text-neutral-500";
|
|
3936
|
-
return /* @__PURE__ */
|
|
4168
|
+
return /* @__PURE__ */ import_react81.default.createElement("div", { key: step, className: `w-6 h-6 rounded-full flex items-center justify-center transition-colors duration-300 ${colorClass}` }, /* @__PURE__ */ import_react81.default.createElement(import_react82.HugeiconsIcon, { icon: getIconForStep(step), size: 11 }));
|
|
3937
4169
|
}));
|
|
3938
4170
|
};
|
|
3939
4171
|
|
|
3940
4172
|
// src/components/UniversalRegistrationFlow.tsx
|
|
3941
|
-
var
|
|
3942
|
-
var
|
|
3943
|
-
var
|
|
3944
|
-
var
|
|
4173
|
+
var import_react83 = __toESM(require("react"));
|
|
4174
|
+
var import_react_hot_toast10 = __toESM(require("react-hot-toast"));
|
|
4175
|
+
var import_react84 = require("@hugeicons/react");
|
|
4176
|
+
var import_core_free_icons30 = require("@hugeicons/core-free-icons");
|
|
3945
4177
|
var MACRO_STEPS = ["Details", "Documents", "Review", "Submit"];
|
|
3946
4178
|
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"];
|
|
3947
4179
|
var MEMBER_ROLES = ["Director Only", "Shareholder Only", "Both Director & Shareholder"];
|
|
@@ -3954,12 +4186,12 @@ var UniversalRegistrationFlow = ({
|
|
|
3954
4186
|
onRedirectToBilling,
|
|
3955
4187
|
onRedirectToApplication
|
|
3956
4188
|
}) => {
|
|
3957
|
-
const [isBooting, setIsBooting] = (0,
|
|
3958
|
-
const [macroStep, setMacroStep] = (0,
|
|
3959
|
-
const [appStatus, setAppStatus] = (0,
|
|
3960
|
-
const [isAbortModalOpen, setIsAbortModalOpen] = (0,
|
|
3961
|
-
const [isAborting, setIsAborting] = (0,
|
|
3962
|
-
const [formState, setFormState] = (0,
|
|
4189
|
+
const [isBooting, setIsBooting] = (0, import_react83.useState)(true);
|
|
4190
|
+
const [macroStep, setMacroStep] = (0, import_react83.useState)(0);
|
|
4191
|
+
const [appStatus, setAppStatus] = (0, import_react83.useState)("");
|
|
4192
|
+
const [isAbortModalOpen, setIsAbortModalOpen] = (0, import_react83.useState)(false);
|
|
4193
|
+
const [isAborting, setIsAborting] = (0, import_react83.useState)(false);
|
|
4194
|
+
const [formState, setFormState] = (0, import_react83.useState)({
|
|
3963
4195
|
natureApproved: false,
|
|
3964
4196
|
nameApproved: false,
|
|
3965
4197
|
addressApproved: false,
|
|
@@ -3970,13 +4202,13 @@ var UniversalRegistrationFlow = ({
|
|
|
3970
4202
|
passportApproved: false,
|
|
3971
4203
|
signatureApproved: false
|
|
3972
4204
|
});
|
|
3973
|
-
const idRef = (0,
|
|
3974
|
-
const passportRef = (0,
|
|
3975
|
-
const signatureRef = (0,
|
|
3976
|
-
const other1Ref = (0,
|
|
3977
|
-
const other2Ref = (0,
|
|
3978
|
-
const other3Ref = (0,
|
|
3979
|
-
const [formData, setFormData] = (0,
|
|
4205
|
+
const idRef = (0, import_react83.useRef)(null);
|
|
4206
|
+
const passportRef = (0, import_react83.useRef)(null);
|
|
4207
|
+
const signatureRef = (0, import_react83.useRef)(null);
|
|
4208
|
+
const other1Ref = (0, import_react83.useRef)(null);
|
|
4209
|
+
const other2Ref = (0, import_react83.useRef)(null);
|
|
4210
|
+
const other3Ref = (0, import_react83.useRef)(null);
|
|
4211
|
+
const [formData, setFormData] = (0, import_react83.useState)({
|
|
3980
4212
|
businessDesc: "",
|
|
3981
4213
|
natureOfBusiness: null,
|
|
3982
4214
|
proposedName: "",
|
|
@@ -4003,22 +4235,22 @@ var UniversalRegistrationFlow = ({
|
|
|
4003
4235
|
otherDoc3Url: "",
|
|
4004
4236
|
otherDoc3Meta: null
|
|
4005
4237
|
});
|
|
4006
|
-
const [activeModal, setActiveModal] = (0,
|
|
4007
|
-
const [iAgree, setIAgree] = (0,
|
|
4008
|
-
const [isAnalyzingNature, setIsAnalyzingNature] = (0,
|
|
4009
|
-
const [suggestedNature, setSuggestedNature] = (0,
|
|
4010
|
-
const [isCheckingQualifier, setIsCheckingQualifier] = (0,
|
|
4011
|
-
const [qualifierCheckResult, setQualifierCheckResult] = (0,
|
|
4012
|
-
const [isCheckingName, setIsCheckingName] = (0,
|
|
4013
|
-
const [nameCheckResult, setNameCheckResult] = (0,
|
|
4014
|
-
const [globalExtractingId, setGlobalExtractingId] = (0,
|
|
4015
|
-
const [globalUploadingPassport, setGlobalUploadingPassport] = (0,
|
|
4016
|
-
const [globalUploadingSignature, setGlobalUploadingSignature] = (0,
|
|
4017
|
-
const [isUploadingOther1, setIsUploadingOther1] = (0,
|
|
4018
|
-
const [isUploadingOther2, setIsUploadingOther2] = (0,
|
|
4019
|
-
const [isUploadingOther3, setIsUploadingOther3] = (0,
|
|
4020
|
-
const [aiTasks, setAiTasks] = (0,
|
|
4021
|
-
const [isSubmitting, setIsSubmitting] = (0,
|
|
4238
|
+
const [activeModal, setActiveModal] = (0, import_react83.useState)({ isOpen: false, type: null, memberIndex: null });
|
|
4239
|
+
const [iAgree, setIAgree] = (0, import_react83.useState)(false);
|
|
4240
|
+
const [isAnalyzingNature, setIsAnalyzingNature] = (0, import_react83.useState)(false);
|
|
4241
|
+
const [suggestedNature, setSuggestedNature] = (0, import_react83.useState)(null);
|
|
4242
|
+
const [isCheckingQualifier, setIsCheckingQualifier] = (0, import_react83.useState)(false);
|
|
4243
|
+
const [qualifierCheckResult, setQualifierCheckResult] = (0, import_react83.useState)(null);
|
|
4244
|
+
const [isCheckingName, setIsCheckingName] = (0, import_react83.useState)(false);
|
|
4245
|
+
const [nameCheckResult, setNameCheckResult] = (0, import_react83.useState)(null);
|
|
4246
|
+
const [globalExtractingId, setGlobalExtractingId] = (0, import_react83.useState)(false);
|
|
4247
|
+
const [globalUploadingPassport, setGlobalUploadingPassport] = (0, import_react83.useState)(false);
|
|
4248
|
+
const [globalUploadingSignature, setGlobalUploadingSignature] = (0, import_react83.useState)(false);
|
|
4249
|
+
const [isUploadingOther1, setIsUploadingOther1] = (0, import_react83.useState)(false);
|
|
4250
|
+
const [isUploadingOther2, setIsUploadingOther2] = (0, import_react83.useState)(false);
|
|
4251
|
+
const [isUploadingOther3, setIsUploadingOther3] = (0, import_react83.useState)(false);
|
|
4252
|
+
const [aiTasks, setAiTasks] = (0, import_react83.useState)([]);
|
|
4253
|
+
const [isSubmitting, setIsSubmitting] = (0, import_react83.useState)(false);
|
|
4022
4254
|
const isReadOnly = ["PENDING", "AWAITING_PAYMENT", "COMPLETED"].includes(appStatus);
|
|
4023
4255
|
const isAnyUploading = globalExtractingId || globalUploadingPassport || globalUploadingSignature || isUploadingOther1 || isUploadingOther2 || isUploadingOther3;
|
|
4024
4256
|
const baseApi = async (action, payload = {}) => {
|
|
@@ -4033,7 +4265,7 @@ var UniversalRegistrationFlow = ({
|
|
|
4033
4265
|
return { success: false, error: "Network communication failed." };
|
|
4034
4266
|
}
|
|
4035
4267
|
};
|
|
4036
|
-
(0,
|
|
4268
|
+
(0, import_react83.useEffect)(() => {
|
|
4037
4269
|
baseApi("progress_load").then((data) => {
|
|
4038
4270
|
if (data.success && data.data) {
|
|
4039
4271
|
const meta = data.data;
|
|
@@ -4141,7 +4373,7 @@ var UniversalRegistrationFlow = ({
|
|
|
4141
4373
|
if (data.appStatus === "QUEUED" || data.appStatus === "REJECTED") setMacroStep(0);
|
|
4142
4374
|
}
|
|
4143
4375
|
}).catch(() => {
|
|
4144
|
-
|
|
4376
|
+
import_react_hot_toast10.default.error("Uh oh! Something went wrong while loading.");
|
|
4145
4377
|
}).finally(() => setIsBooting(false));
|
|
4146
4378
|
}, [applicationId, type, apiEndpoint]);
|
|
4147
4379
|
const saveProgress = async (newFormData = formData, newFormState = formState, newMacro = macroStep) => {
|
|
@@ -4153,11 +4385,11 @@ var UniversalRegistrationFlow = ({
|
|
|
4153
4385
|
setIsAborting(true);
|
|
4154
4386
|
const data = await baseApi("abort");
|
|
4155
4387
|
if (data.success) {
|
|
4156
|
-
|
|
4388
|
+
import_react_hot_toast10.default.success("Application aborted.");
|
|
4157
4389
|
setAppStatus("DRAFT");
|
|
4158
4390
|
setMacroStep(0);
|
|
4159
4391
|
setIsAbortModalOpen(false);
|
|
4160
|
-
} else
|
|
4392
|
+
} else import_react_hot_toast10.default.error(data.error || "Uh oh! Something went wrong.");
|
|
4161
4393
|
setIsAborting(false);
|
|
4162
4394
|
};
|
|
4163
4395
|
const handleBack = () => {
|
|
@@ -4200,7 +4432,7 @@ var UniversalRegistrationFlow = ({
|
|
|
4200
4432
|
setIsAnalyzingNature(true);
|
|
4201
4433
|
const data = await baseApi("analyze_nature", { description: formData.businessDesc });
|
|
4202
4434
|
if (data.success) setSuggestedNature(data.data);
|
|
4203
|
-
else
|
|
4435
|
+
else import_react_hot_toast10.default.error(data.error || "Uh oh! Something went wrong.");
|
|
4204
4436
|
setIsAnalyzingNature(false);
|
|
4205
4437
|
};
|
|
4206
4438
|
const pollNameCheckJob = async (jobId) => {
|
|
@@ -4209,7 +4441,7 @@ var UniversalRegistrationFlow = ({
|
|
|
4209
4441
|
setNameCheckResult(poll.data.result);
|
|
4210
4442
|
setIsCheckingName(false);
|
|
4211
4443
|
} else if (poll.success && poll.data.status === "error") {
|
|
4212
|
-
|
|
4444
|
+
import_react_hot_toast10.default.error(poll.data.error || "Uh oh! Something went wrong.");
|
|
4213
4445
|
setIsCheckingName(false);
|
|
4214
4446
|
} else setTimeout(() => pollNameCheckJob(jobId), 3e3);
|
|
4215
4447
|
};
|
|
@@ -4227,7 +4459,7 @@ var UniversalRegistrationFlow = ({
|
|
|
4227
4459
|
const data = await baseApi("check_name_start", { name: nameToCheck, lineOfBusiness: formData.natureOfBusiness?.specificLabel });
|
|
4228
4460
|
if (data.success && data.data.jobId) pollNameCheckJob(data.data.jobId);
|
|
4229
4461
|
else {
|
|
4230
|
-
|
|
4462
|
+
import_react_hot_toast10.default.error(data.error || "Uh oh! Something went wrong.");
|
|
4231
4463
|
setIsCheckingName(false);
|
|
4232
4464
|
}
|
|
4233
4465
|
};
|
|
@@ -4252,7 +4484,7 @@ var UniversalRegistrationFlow = ({
|
|
|
4252
4484
|
throw new Error(data.error || "Failed to secure upload URL.");
|
|
4253
4485
|
}
|
|
4254
4486
|
} catch (error) {
|
|
4255
|
-
|
|
4487
|
+
import_react_hot_toast10.default.error(error.message);
|
|
4256
4488
|
} finally {
|
|
4257
4489
|
if (optType === "other1") {
|
|
4258
4490
|
setIsUploadingOther1(false);
|
|
@@ -4303,7 +4535,7 @@ var UniversalRegistrationFlow = ({
|
|
|
4303
4535
|
const maxAllowed = Math.max(0, 100 - otherSharesSum);
|
|
4304
4536
|
if (numValue > maxAllowed) {
|
|
4305
4537
|
numValue = maxAllowed;
|
|
4306
|
-
|
|
4538
|
+
import_react_hot_toast10.default.error(`Total shares cannot exceed 100%. Remaining: ${maxAllowed}%`, { id: "share-limit" });
|
|
4307
4539
|
} else if (numValue < 0) numValue = 0;
|
|
4308
4540
|
updated[index] = { ...updated[index], [key]: numValue.toString() };
|
|
4309
4541
|
}
|
|
@@ -4334,7 +4566,7 @@ var UniversalRegistrationFlow = ({
|
|
|
4334
4566
|
updatedMembers[memberIndex] = { ...updatedMembers[memberIndex], idExtractedData: data.data, idFileUrl: uploadData.data.fileUrl, idMetadata: { fileName: file.name, contentType: file.type, fileSizeInBytes: file.size } };
|
|
4335
4567
|
setFormData({ ...formData, members: updatedMembers });
|
|
4336
4568
|
saveProgress({ ...formData, members: updatedMembers });
|
|
4337
|
-
} else
|
|
4569
|
+
} else import_react_hot_toast10.default.error(data.error || "Uh oh! Something went wrong.");
|
|
4338
4570
|
} else {
|
|
4339
4571
|
if (docType === "passport") setGlobalUploadingPassport(true);
|
|
4340
4572
|
else setGlobalUploadingSignature(true);
|
|
@@ -4351,10 +4583,10 @@ var UniversalRegistrationFlow = ({
|
|
|
4351
4583
|
}
|
|
4352
4584
|
setFormData({ ...formData, members: updatedMembers });
|
|
4353
4585
|
saveProgress({ ...formData, members: updatedMembers });
|
|
4354
|
-
} else
|
|
4586
|
+
} else import_react_hot_toast10.default.error(`Failed to secure upload URL for ${docType}.`);
|
|
4355
4587
|
}
|
|
4356
4588
|
} catch (error) {
|
|
4357
|
-
|
|
4589
|
+
import_react_hot_toast10.default.error(error.message);
|
|
4358
4590
|
} finally {
|
|
4359
4591
|
if (docType === "id") setGlobalExtractingId(false);
|
|
4360
4592
|
else if (docType === "passport") setGlobalUploadingPassport(false);
|
|
@@ -4403,7 +4635,7 @@ var UniversalRegistrationFlow = ({
|
|
|
4403
4635
|
setFormData(updatedForm);
|
|
4404
4636
|
saveProgress(updatedForm);
|
|
4405
4637
|
} else {
|
|
4406
|
-
|
|
4638
|
+
import_react_hot_toast10.default.error(data.error || "Uh oh! Something went wrong.");
|
|
4407
4639
|
setAiTasks([{ id: "1", label: "Document Scanned", status: "success" }, { id: "2", label: "Extraction Failed", status: "error" }]);
|
|
4408
4640
|
}
|
|
4409
4641
|
} else {
|
|
@@ -4423,10 +4655,10 @@ var UniversalRegistrationFlow = ({
|
|
|
4423
4655
|
approveSection("signatureApproved", updatedForm);
|
|
4424
4656
|
}
|
|
4425
4657
|
setFormData(updatedForm);
|
|
4426
|
-
} else
|
|
4658
|
+
} else import_react_hot_toast10.default.error(data.error || `Failed to upload ${docType}.`);
|
|
4427
4659
|
}
|
|
4428
4660
|
} catch (error) {
|
|
4429
|
-
|
|
4661
|
+
import_react_hot_toast10.default.error(error.message);
|
|
4430
4662
|
} finally {
|
|
4431
4663
|
if (docType === "id") {
|
|
4432
4664
|
setGlobalExtractingId(false);
|
|
@@ -4509,33 +4741,33 @@ var UniversalRegistrationFlow = ({
|
|
|
4509
4741
|
}
|
|
4510
4742
|
const data = await baseApi("submit", finalJsonPayload);
|
|
4511
4743
|
if (data.success) {
|
|
4512
|
-
|
|
4744
|
+
import_react_hot_toast10.default.success("Application Submitted!");
|
|
4513
4745
|
onRedirectToApplication(applicationId);
|
|
4514
4746
|
} else {
|
|
4515
|
-
|
|
4747
|
+
import_react_hot_toast10.default.error(data.error || "Uh oh! Something went wrong.");
|
|
4516
4748
|
setIsSubmitting(false);
|
|
4517
4749
|
}
|
|
4518
4750
|
};
|
|
4519
4751
|
const isStep0Valid = type === "company" ? formState.natureApproved && formState.nameApproved && formState.addressApproved && formState.membersDetailsApproved : formState.natureApproved && formState.nameApproved && formState.addressApproved && formState.ownerApproved;
|
|
4520
4752
|
const isStep1Valid = type === "company" ? formState.membersDocsApproved : formState.idApproved && formState.passportApproved && formState.signatureApproved;
|
|
4521
4753
|
const titleText = type === "company" ? "Company Incorporation (LLC)" : "Business Name Registration";
|
|
4522
|
-
if (isBooting) return /* @__PURE__ */
|
|
4754
|
+
if (isBooting) return /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex justify-center py-20" }, /* @__PURE__ */ import_react83.default.createElement(import_react84.HugeiconsIcon, { icon: import_core_free_icons30.Loading03Icon, size: 32, className: "animate-spin text-black" }));
|
|
4523
4755
|
if (!["DRAFT", "QUEUED", "REJECTED"].includes(appStatus) && appStatus !== "") {
|
|
4524
|
-
return /* @__PURE__ */
|
|
4756
|
+
return /* @__PURE__ */ import_react83.default.createElement("div", { className: "w-full max-w-5xl 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_react83.default.createElement(import_react83.default.Fragment, null, /* @__PURE__ */ import_react83.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_react83.default.createElement(import_react84.HugeiconsIcon, { icon: import_core_free_icons30.CheckmarkBadge01Icon, size: 35 })), /* @__PURE__ */ import_react83.default.createElement("h2", { className: "text-xl text-black" }, "Registration Completed"), /* @__PURE__ */ import_react83.default.createElement("p", { className: "text-sm text-neutral-500 max-w-md" }, "Your application has been successfully verified and registered.")) : appStatus === "PENDING" ? /* @__PURE__ */ import_react83.default.createElement(import_react83.default.Fragment, null, /* @__PURE__ */ import_react83.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_react83.default.createElement(import_react84.HugeiconsIcon, { icon: import_core_free_icons30.HourglassIcon, size: 35, className: "animate-spin" })), /* @__PURE__ */ import_react83.default.createElement("h2", { className: "text-xl text-black" }, "Application is Pending"), /* @__PURE__ */ import_react83.default.createElement("p", { className: "text-sm text-neutral-500 max-w-md" }, "Your application is currently pending review.")) : appStatus === "AWAITING_PAYMENT" ? /* @__PURE__ */ import_react83.default.createElement(import_react83.default.Fragment, null, /* @__PURE__ */ import_react83.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_react83.default.createElement(import_react84.HugeiconsIcon, { icon: import_core_free_icons30.HourglassIcon, size: 35, className: "animate-pulse" })), /* @__PURE__ */ import_react83.default.createElement("h2", { className: "text-xl text-black" }, "Awaiting Payment"), /* @__PURE__ */ import_react83.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_react83.default.createElement("div", { className: "mt-6 flex flex-col items-center gap-3" }, /* @__PURE__ */ import_react83.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_react83.default.createElement("button", { onClick: () => setIsAbortModalOpen(true), className: "px-8 py-3 border border-neutral-100 text-neutral-600 text-[11px] tracking-widest rounded-full hover:bg-neutral-50 outline-none" }, "Abort & Edit Application"))) : /* @__PURE__ */ import_react83.default.createElement(import_react83.default.Fragment, null, /* @__PURE__ */ import_react83.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_react83.default.createElement(import_react84.HugeiconsIcon, { icon: import_core_free_icons30.HourglassIcon, size: 35 })), /* @__PURE__ */ import_react83.default.createElement("h2", { className: "text-xl text-black" }, "Application Submitted"), /* @__PURE__ */ import_react83.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_react83.default.createElement("div", { className: "mt-6 flex flex-col items-center gap-3" }, /* @__PURE__ */ import_react83.default.createElement("button", { onClick: () => setIsAbortModalOpen(true), className: "px-8 py-3 border border-neutral-100 text-neutral-600 text-[11px] tracking-widest rounded-full hover:bg-neutral-50 outline-none" }, "Abort Application"))), isAbortModalOpen && /* @__PURE__ */ import_react83.default.createElement("div", { className: "fixed inset-0 z-110 flex items-center justify-center p-4" }, /* @__PURE__ */ import_react83.default.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => !isAborting && setIsAbortModalOpen(false) }), /* @__PURE__ */ import_react83.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_react83.default.createElement("div", { className: "p-6 flex flex-col gap-4 text-center" }, /* @__PURE__ */ import_react83.default.createElement("h3", { className: "text-[17px] text-black tracking-tight" }, "Abort Application?"), /* @__PURE__ */ import_react83.default.createElement("p", { className: "text-[11px] text-neutral-500 leading-relaxed" }, "Are you sure you want to abort? If you have already made a payment, returning to draft may cause issues. Your invoice will be deleted.")), /* @__PURE__ */ import_react83.default.createElement("div", { className: "w-full flex " }, /* @__PURE__ */ import_react83.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_react83.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")))));
|
|
4525
4757
|
}
|
|
4526
|
-
return /* @__PURE__ */
|
|
4758
|
+
return /* @__PURE__ */ import_react83.default.createElement("div", { className: "w-full max-w-5xl 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_react83.default.createElement("div", { className: "flex flex-col gap-8" }, /* @__PURE__ */ import_react83.default.createElement("div", null, /* @__PURE__ */ import_react83.default.createElement("h2", { className: "text-xl text-black tracking-tight mb-1" }, titleText), /* @__PURE__ */ import_react83.default.createElement("p", { className: "text-sm text-neutral-500" }, "Answer the questions below to build your official application.")), /* @__PURE__ */ import_react83.default.createElement("div", { className: "px-2" }, /* @__PURE__ */ import_react83.default.createElement(Stagger, { steps: MACRO_STEPS, currentStep: macroStep }))), /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex flex-col gap-8" }, macroStep === 0 && /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex flex-col gap-8 animate-in fade-in" }, /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex flex-col gap-4" }, /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex items-center text-black" }, /* @__PURE__ */ import_react83.default.createElement("h3", { className: "text-sm " }, "What does your ", type === "company" ? "company" : "business", " do?")), !formState.natureApproved ? /* @__PURE__ */ import_react83.default.createElement(import_react83.default.Fragment, null, /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex flex-col gap-3 " }, /* @__PURE__ */ import_react83.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_react83.default.createElement(ThreeDActionButton, { onClick: handleAnalyzeNature, disabled: formData.businessDesc.length < 5 || isAnalyzingNature || isReadOnly, isLoading: isAnalyzingNature, className: "w-fit" }, "Analyze Nature")), isAnalyzingNature && /* @__PURE__ */ import_react83.default.createElement("div", { className: " mt-2" }, /* @__PURE__ */ import_react83.default.createElement(AiStageCheck, { tasks: [{ id: "1", label: "Matching with Official Categories...", status: "loading" }] })), suggestedNature && /* @__PURE__ */ import_react83.default.createElement("div", { className: " mt-2 animate-in fade-in" }, /* @__PURE__ */ import_react83.default.createElement(AiApproveDecline, { suggestionTitle: "Classification Found", suggestionValue: /* @__PURE__ */ import_react83.default.createElement("div", null, /* @__PURE__ */ import_react83.default.createElement("p", { className: " text-black" }, suggestedNature.specificLabel), /* @__PURE__ */ import_react83.default.createElement("p", { className: "text-xs text-neutral-400 mt-1" }, "Category: ", suggestedNature.categoryLabel)), onApprove: () => {
|
|
4527
4759
|
const newForm = { ...formData, natureOfBusiness: suggestedNature };
|
|
4528
4760
|
setFormData(newForm);
|
|
4529
4761
|
approveSection("natureApproved", newForm);
|
|
4530
|
-
}, onDecline: () => setSuggestedNature(null) }))) : /* @__PURE__ */
|
|
4762
|
+
}, onDecline: () => setSuggestedNature(null) }))) : /* @__PURE__ */ import_react83.default.createElement("div", { className: " flex items-center justify-between" }, /* @__PURE__ */ import_react83.default.createElement("div", { className: "pr-4" }, /* @__PURE__ */ import_react83.default.createElement("p", { className: "text-sm text-black" }, formData.natureOfBusiness?.specificLabel), /* @__PURE__ */ import_react83.default.createElement("p", { className: "text-xs text-neutral-400 mt-1" }, formData.businessDesc)), !isReadOnly && /* @__PURE__ */ import_react83.default.createElement("button", { onClick: () => editSection("natureApproved"), className: "p-2 text-neutral-400 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ import_react83.default.createElement(import_react84.HugeiconsIcon, { icon: import_core_free_icons30.PencilEdit01Icon, size: 16 })))), formState.natureApproved && /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex flex-col gap-4 pt-6 animate-in slide-in-from-top-4 duration-500" }, /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex items-center text-black" }, /* @__PURE__ */ import_react83.default.createElement("h3", { className: "text-sm " }, "What name would you like to register?")), /* @__PURE__ */ import_react83.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_react83.default.createElement(import_react83.default.Fragment, null, /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex flex-col gap-4" }, /* @__PURE__ */ import_react83.default.createElement(TextInput, { label: "Proposed Name 1 (Preferred)", value: formData.proposedName, onChange: (v) => setFormData({ ...formData, proposedName: v }), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ import_react83.default.createElement(TextInput, { label: "Proposed Name 2 (Alternative)", value: formData.proposedName2, onChange: (v) => setFormData({ ...formData, proposedName2: v }), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ import_react83.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_react83.default.createElement("div", { className: " mt-2" }, /* @__PURE__ */ import_react83.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_react83.default.createElement("div", { className: "mt-2 animate-in fade-in" }, /* @__PURE__ */ import_react83.default.createElement("div", { className: "border border-orange-100 bg-linear-to-bl from-orange-50/80 via-white to-white p-5 rounded-2xl flex flex-col gap-4 relative overflow-hidden" }, /* @__PURE__ */ import_react83.default.createElement("div", null, /* @__PURE__ */ import_react83.default.createElement("span", { className: "text-[11px] tracking-widest text-orange-600 block mb-1" }, "AI Suggestion: Structural Qualifier Missing"), /* @__PURE__ */ import_react83.default.createElement("p", { className: "text-sm text-black mb-3" }, "Nigerian registrations require a structural qualifier to be approved."), /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex flex-col gap-2" }, (qualifierCheckResult.suggestions || []).map((alt, i) => /* @__PURE__ */ import_react83.default.createElement("button", { key: i, onClick: () => setFormData({ ...formData, proposedName: alt }), className: "text-left px-4 py-2 border border-neutral-100 rounded-full hover:border-black text-sm transition-colors outline-none" }, alt)))), /* @__PURE__ */ import_react83.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_react83.default.createElement("div", { className: " mt-2 animate-in fade-in" }, nameCheckResult.status === "APPROVED" || nameCheckResult.status === "APPROVED_WARNING" || nameCheckResult.status === "SKIPPED" ? /* @__PURE__ */ import_react83.default.createElement(AiApproveDecline, { suggestionTitle: nameCheckResult.status === "APPROVED" ? "Name Available!" : "Fallback Approval", suggestionValue: /* @__PURE__ */ import_react83.default.createElement("div", null, /* @__PURE__ */ import_react83.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_react83.default.createElement("p", { className: "text-xs text-neutral-600" }, nameCheckResult.message), /* @__PURE__ */ import_react83.default.createElement("p", { className: "text-xs text-neutral-600 mt-2 " }, "Proposed Option: ", nameCheckResult.approvedOption)), onApprove: () => {
|
|
4531
4763
|
const newForm = { ...formData, approvedName: nameCheckResult.approvedOption };
|
|
4532
4764
|
setFormData(newForm);
|
|
4533
4765
|
approveSection("nameApproved", newForm);
|
|
4534
|
-
}, onDecline: () => setNameCheckResult(null) }) : /* @__PURE__ */
|
|
4535
|
-
}, disabled: isReadOnly || isSubmitting })), /* @__PURE__ */
|
|
4536
|
-
}, disabled: isReadOnly || isSubmitting }), member.role !== "Director Only" && /* @__PURE__ */
|
|
4537
|
-
}, disabled: isReadOnly || isSubmitting }), /* @__PURE__ */
|
|
4538
|
-
}, disabled: isReadOnly || isSubmitting })))), /* @__PURE__ */ import_react81.default.createElement("div", { className: "flex items-center justify-between mt-2" }, !isReadOnly && /* @__PURE__ */ import_react81.default.createElement("button", { onClick: addCompanyMember, className: "px-6 py-2 bg-white border border-neutral-100 text-black text-[11px] tracking-widest rounded-full hover:bg-neutral-50 transition-colors outline-none" }, "+ Add Member"), /* @__PURE__ */ import_react81.default.createElement(ThreeDActionButton, { onClick: () => approveSection("membersDetailsApproved"), disabled: !areCompanyMembersValid() || isReadOnly, className: "w-fit" }, "Confirm Members"))) : /* @__PURE__ */ import_react81.default.createElement("div", { className: " flex items-center justify-between" }, /* @__PURE__ */ import_react81.default.createElement("div", null, /* @__PURE__ */ import_react81.default.createElement("p", { className: "text-sm text-black" }, formData.members.length, " Member(s) Registered"), /* @__PURE__ */ import_react81.default.createElement("p", { className: "text-xs text-neutral-500 mt-1" }, "Total Shares: 100% Verified.")), !isReadOnly && /* @__PURE__ */ import_react81.default.createElement("button", { onClick: () => editSection("membersDetailsApproved"), className: "p-2 text-neutral-400 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ import_react81.default.createElement(import_react82.HugeiconsIcon, { icon: import_core_free_icons29.PencilEdit01Icon, size: 16 })))), formState.addressApproved && type === "business" && /* @__PURE__ */ import_react81.default.createElement("div", { className: "flex flex-col gap-4 pt-6 animate-in slide-in-from-top-4 duration-500" }, /* @__PURE__ */ import_react81.default.createElement("div", { className: "flex items-center text-black" }, /* @__PURE__ */ import_react81.default.createElement("h3", { className: "text-sm " }, "Who owns the business?")), /* @__PURE__ */ import_react81.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_react81.default.createElement("div", { className: "flex flex-col gap-4 " }, /* @__PURE__ */ import_react81.default.createElement(TextInput, { label: "Full Name", value: formData.ownerName, onChange: (v) => setFormData({ ...formData, ownerName: v }), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ import_react81.default.createElement("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-4" }, /* @__PURE__ */ import_react81.default.createElement(NumberInput, { label: "Phone Number", value: formData.ownerPhone, onChange: (v) => setFormData({ ...formData, ownerPhone: v }), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ import_react81.default.createElement(TextInput, { label: "Email Address", value: formData.ownerEmail, onChange: (v) => setFormData({ ...formData, ownerEmail: v }), disabled: isReadOnly || isSubmitting })), /* @__PURE__ */ import_react81.default.createElement(ThreeDActionButton, { onClick: () => approveSection("ownerApproved"), disabled: !formData.ownerName || !formData.ownerPhone || !formData.ownerEmail || isReadOnly, className: "w-fit mt-2" }, "Confirm Owner Details")) : /* @__PURE__ */ import_react81.default.createElement("div", { className: " flex items-center justify-between" }, /* @__PURE__ */ import_react81.default.createElement("div", null, /* @__PURE__ */ import_react81.default.createElement("p", { className: "text-sm text-black" }, formData.ownerName), /* @__PURE__ */ import_react81.default.createElement("p", { className: "text-xs text-neutral-500 mt-1" }, formData.ownerEmail, " \u2022 ", formData.ownerPhone)), !isReadOnly && /* @__PURE__ */ import_react81.default.createElement("button", { onClick: () => editSection("ownerApproved"), className: "p-2 text-neutral-400 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ import_react81.default.createElement(import_react82.HugeiconsIcon, { icon: import_core_free_icons29.PencilEdit01Icon, size: 16 })))), /* @__PURE__ */ import_react81.default.createElement("div", { className: "flex items-center justify-between mt-8 pt-6 " }, /* @__PURE__ */ import_react81.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_react81.default.createElement(import_react82.HugeiconsIcon, { icon: import_core_free_icons29.ArrowLeft01Icon, size: 14 }), " Close"), /* @__PURE__ */ import_react81.default.createElement(ThreeDActionButton, { onClick: handleNext, disabled: !isStep0Valid, className: "w-fit shrink-0" }, "Next Step"))), macroStep === 1 && /* @__PURE__ */ import_react81.default.createElement("div", { className: "flex flex-col gap-8 animate-in fade-in" }, type === "company" ? /* @__PURE__ */ import_react81.default.createElement(import_react81.default.Fragment, null, /* @__PURE__ */ import_react81.default.createElement("div", { className: "flex flex-col gap-2" }, /* @__PURE__ */ import_react81.default.createElement("h3", { className: "text-sm text-black" }, "Member Identity Documents"), /* @__PURE__ */ import_react81.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_react81.default.createElement("div", { className: "flex flex-col gap-6" }, formData.members.map((member, i) => /* @__PURE__ */ import_react81.default.createElement("div", { key: member.id, className: "flex flex-col gap-4" }, /* @__PURE__ */ import_react81.default.createElement("span", { className: "text-[11px] tracking-widest text-black mb-1" }, member.fullName || `Member ${i + 1}`, " ", /* @__PURE__ */ import_react81.default.createElement("span", { className: "text-neutral-400 ml-2" }, "(", member.role, ")")), /* @__PURE__ */ import_react81.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_react81.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_react81.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_react81.default.createElement("button", { onClick: () => !isReadOnly && !isAnyUploading && document.getElementById(`id-upload-${i}`)?.click(), className: `flex items-center gap-3 p-4 border border-neutral-100 rounded-full transition-colors text-sm w-full outline-none ${isAnyUploading ? "opacity-50 cursor-not-allowed bg-neutral-50 text-neutral-400" : "text-black hover:bg-neutral-50"}`, disabled: isReadOnly || isAnyUploading }, /* @__PURE__ */ import_react81.default.createElement(import_react82.HugeiconsIcon, { icon: import_core_free_icons29.Upload01Icon, size: 18, className: "text-neutral-400" }), " Upload Valid ID (NIN, License, Voter's Card)") : globalExtractingId && !member.idExtractedData ? /* @__PURE__ */ import_react81.default.createElement("div", { className: " mt-2" }, /* @__PURE__ */ import_react81.default.createElement(AiStageCheck, { tasks: aiTasks })) : member.idExtractedData ? /* @__PURE__ */ import_react81.default.createElement("div", { className: " mt-2 animate-in fade-in border border-orange-100 bg-linear-to-bl from-orange-50/80 via-white to-white p-5 rounded-xl flex flex-col gap-4 relative overflow-hidden" }, /* @__PURE__ */ import_react81.default.createElement("div", null, /* @__PURE__ */ import_react81.default.createElement("span", { className: "text-[11px] tracking-widest text-orange-600 block mb-2" }, "Review Extracted ID"), /* @__PURE__ */ import_react81.default.createElement("div", { className: "flex flex-col gap-4" }, /* @__PURE__ */ import_react81.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_react81.default.createElement("div", { className: "grid grid-cols-2 gap-4" }, /* @__PURE__ */ import_react81.default.createElement(TextInput, { label: "ID Number", value: member.idExtractedData.idNumber, onChange: (v) => updateCompanyMemberInfo(i, "idExtractedData", { ...member.idExtractedData, idNumber: v }), disabled: isReadOnly || isAnyUploading }), /* @__PURE__ */ import_react81.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_react81.default.createElement("div", { className: "flex items-center gap-2 mt-2" }, !isReadOnly && /* @__PURE__ */ import_react81.default.createElement("button", { onClick: () => deleteCompanyMemberDocument(i, "id"), disabled: isAnyUploading, className: "px-6 py-2 bg-white border border-neutral-100 text-neutral-500 text-[11px] rounded-full tracking-widest hover:bg-neutral-50 transition-colors outline-none disabled:opacity-50 disabled:cursor-not-allowed" }, "Delete & Re-upload ID"))) : null, !member.passportFileUrl && !globalUploadingPassport ? /* @__PURE__ */ import_react81.default.createElement("button", { onClick: () => !isReadOnly && !isAnyUploading && document.getElementById(`pass-upload-${i}`)?.click(), className: `flex items-center gap-3 p-4 border border-neutral-100 rounded-full transition-colors text-sm w-full outline-none ${isAnyUploading ? "opacity-50 cursor-not-allowed bg-neutral-50 text-neutral-400" : "text-black hover:bg-neutral-50"}`, disabled: isReadOnly || isAnyUploading }, /* @__PURE__ */ import_react81.default.createElement(import_react82.HugeiconsIcon, { icon: import_core_free_icons29.Upload01Icon, size: 18, className: "text-neutral-400" }), " Upload Passport Photo") : globalUploadingPassport && !member.passportFileUrl ? /* @__PURE__ */ import_react81.default.createElement("div", { className: "flex items-center gap-3 p-4 border border-neutral-100 rounded-full bg-neutral-50 text-neutral-500 text-sm w-full" }, /* @__PURE__ */ import_react81.default.createElement(import_react82.HugeiconsIcon, { icon: import_core_free_icons29.Loading03Icon, size: 18, className: "animate-spin text-black" }), " Uploading Passport...") : member.passportFileUrl ? /* @__PURE__ */ import_react81.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_react81.default.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ import_react81.default.createElement(import_react82.HugeiconsIcon, { icon: import_core_free_icons29.IdentificationIcon, size: 18 }), " Passport Uploaded"), !isReadOnly && /* @__PURE__ */ import_react81.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_react81.default.createElement(import_react82.HugeiconsIcon, { icon: import_core_free_icons29.Delete02Icon, size: 16 }))) : null, !member.signatureFileUrl && !globalUploadingSignature ? /* @__PURE__ */ import_react81.default.createElement("button", { onClick: () => !isReadOnly && !isAnyUploading && document.getElementById(`sig-upload-${i}`)?.click(), className: `flex items-center gap-3 p-4 border border-neutral-100 rounded-full transition-colors text-sm w-full outline-none ${isAnyUploading ? "opacity-50 cursor-not-allowed bg-neutral-50 text-neutral-400" : "text-black hover:bg-neutral-50"}`, disabled: isReadOnly || isAnyUploading }, /* @__PURE__ */ import_react81.default.createElement(import_react82.HugeiconsIcon, { icon: import_core_free_icons29.Upload01Icon, size: 18, className: "text-neutral-400" }), " Upload Signature") : globalUploadingSignature && !member.signatureFileUrl ? /* @__PURE__ */ import_react81.default.createElement("div", { className: "flex items-center gap-3 p-4 border border-neutral-100 rounded-full bg-neutral-50 text-neutral-500 text-sm w-full" }, /* @__PURE__ */ import_react81.default.createElement(import_react82.HugeiconsIcon, { icon: import_core_free_icons29.Loading03Icon, size: 18, className: "animate-spin text-black" }), " Uploading Signature...") : member.signatureFileUrl ? /* @__PURE__ */ import_react81.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_react81.default.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ import_react81.default.createElement(import_react82.HugeiconsIcon, { icon: import_core_free_icons29.SignatureIcon, size: 18 }), " Signature Uploaded"), !isReadOnly && /* @__PURE__ */ import_react81.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_react81.default.createElement(import_react82.HugeiconsIcon, { icon: import_core_free_icons29.Delete02Icon, size: 16 }))) : null)), /* @__PURE__ */ import_react81.default.createElement("div", { className: "flex justify-end" }, /* @__PURE__ */ import_react81.default.createElement(ThreeDActionButton, { onClick: () => approveSection("membersDocsApproved"), disabled: !areCompanyMemberDocsValid() || isReadOnly || isAnyUploading, className: "w-fit" }, "Confirm All Documents"))) : /* @__PURE__ */ import_react81.default.createElement("div", { className: " flex items-center justify-between bg-emerald-50 p-6 rounded-full" }, /* @__PURE__ */ import_react81.default.createElement("div", null, /* @__PURE__ */ import_react81.default.createElement("p", { className: "text-sm text-emerald-800" }, "Documents Uploaded"), /* @__PURE__ */ import_react81.default.createElement("p", { className: "text-xs text-emerald-600 mt-1" }, "Data safely extracted.")), !isReadOnly && /* @__PURE__ */ import_react81.default.createElement("button", { onClick: () => editSection("membersDocsApproved"), className: "p-2 text-emerald-700 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ import_react81.default.createElement(import_react82.HugeiconsIcon, { icon: import_core_free_icons29.PencilEdit01Icon, size: 16 })))) : /* @__PURE__ */ import_react81.default.createElement(import_react81.default.Fragment, null, /* @__PURE__ */ import_react81.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_react81.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_react81.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_react81.default.createElement("div", { className: "flex flex-col gap-4" }, /* @__PURE__ */ import_react81.default.createElement("div", { className: "flex items-center gap-2 text-black" }, /* @__PURE__ */ import_react81.default.createElement("h3", { className: "text-sm " }, "Upload Means of Identification")), /* @__PURE__ */ import_react81.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_react81.default.createElement(import_react81.default.Fragment, null, /* @__PURE__ */ import_react81.default.createElement("button", { onClick: () => !isReadOnly && !isAnyUploading && idRef.current?.click(), disabled: isReadOnly || isAnyUploading, className: `w-full h-32 border border-neutral-100 rounded-full flex flex-col items-center justify-center gap-2 transition-colors outline-none ${isAnyUploading ? "opacity-50 cursor-not-allowed bg-neutral-50 text-neutral-400" : "hover:bg-neutral-50 text-black"}` }, /* @__PURE__ */ import_react81.default.createElement(import_react82.HugeiconsIcon, { icon: import_core_free_icons29.Upload01Icon, size: 24, className: "text-neutral-400" }), /* @__PURE__ */ import_react81.default.createElement("span", { className: "text-xs" }, "Select ID Image to Upload")), globalExtractingId && /* @__PURE__ */ import_react81.default.createElement("div", { className: " mt-2" }, /* @__PURE__ */ import_react81.default.createElement(AiStageCheck, { tasks: aiTasks })), formData.idExtractedData && /* @__PURE__ */ import_react81.default.createElement("div", { className: " mt-2 animate-in fade-in border border-orange-100 bg-linear-to-bl from-orange-50/80 via-white to-white p-5 rounded-2xl flex flex-col gap-4 relative overflow-hidden" }, /* @__PURE__ */ import_react81.default.createElement("div", null, /* @__PURE__ */ import_react81.default.createElement("span", { className: "text-[11px] tracking-widest text-orange-600 block mb-2" }, "Review AI Extracted Data"), /* @__PURE__ */ import_react81.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_react81.default.createElement("div", { className: "flex flex-col gap-4" }, /* @__PURE__ */ import_react81.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_react81.default.createElement("div", { className: "grid grid-cols-2 gap-4" }, /* @__PURE__ */ import_react81.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_react81.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_react81.default.createElement("div", { className: "flex items-center gap-2 mt-2" }, /* @__PURE__ */ import_react81.default.createElement(ThreeDActionButton, { onClick: () => approveSection("idApproved"), disabled: isAnyUploading || isReadOnly, className: "w-fit shrink-0" }, "Approve Data"), !isReadOnly && /* @__PURE__ */ import_react81.default.createElement("button", { onClick: () => deleteBusinessDocument("id"), disabled: isAnyUploading, className: "px-6 py-2 bg-white border border-neutral-100 text-neutral-500 text-[11px] rounded-full tracking-widest hover:bg-neutral-50 transition-colors outline-none disabled:opacity-50 disabled:cursor-not-allowed" }, "Delete & Re-upload")))) : /* @__PURE__ */ import_react81.default.createElement("div", { className: " flex items-center justify-between bg-emerald-50 p-6 rounded-full" }, /* @__PURE__ */ import_react81.default.createElement("div", null, /* @__PURE__ */ import_react81.default.createElement("p", { className: "text-sm text-emerald-800" }, "ID Document Verified"), /* @__PURE__ */ import_react81.default.createElement("p", { className: "text-xs text-emerald-600 mt-1" }, "Data safely extracted and stored.")), !isReadOnly && /* @__PURE__ */ import_react81.default.createElement("button", { onClick: () => editSection("idApproved"), className: "p-2 text-emerald-700 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ import_react81.default.createElement(import_react82.HugeiconsIcon, { icon: import_core_free_icons29.PencilEdit01Icon, size: 16 })))), /* @__PURE__ */ import_react81.default.createElement("div", { className: "flex flex-col gap-4 pt-6 animate-in slide-in-from-top-4 duration-500" }, /* @__PURE__ */ import_react81.default.createElement("div", { className: "flex flex-col gap-3 " }, !formState.passportApproved && !globalUploadingPassport ? /* @__PURE__ */ import_react81.default.createElement("button", { onClick: () => !isReadOnly && !isAnyUploading && passportRef.current?.click(), disabled: isReadOnly || isAnyUploading, className: `flex items-center gap-3 p-4 border border-neutral-100 rounded-full transition-colors text-sm w-full outline-none ${isAnyUploading ? "opacity-50 cursor-not-allowed bg-neutral-50 text-neutral-400" : "text-black hover:bg-neutral-50"}` }, /* @__PURE__ */ import_react81.default.createElement(import_react82.HugeiconsIcon, { icon: import_core_free_icons29.Upload01Icon, size: 18, className: "text-neutral-400" }), " Upload Passport Photo") : globalUploadingPassport && !formData.passportFileUrl ? /* @__PURE__ */ import_react81.default.createElement("div", { className: "flex items-center gap-3 p-4 border border-neutral-100 rounded-full bg-neutral-50 text-neutral-500 text-sm w-full" }, /* @__PURE__ */ import_react81.default.createElement(import_react82.HugeiconsIcon, { icon: import_core_free_icons29.Loading03Icon, size: 18, className: "animate-spin text-black" }), " Uploading Passport...") : /* @__PURE__ */ import_react81.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_react81.default.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ import_react81.default.createElement(import_react82.HugeiconsIcon, { icon: import_core_free_icons29.IdentificationIcon, size: 18 }), " Passport Uploaded"), !isReadOnly && /* @__PURE__ */ import_react81.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_react81.default.createElement(import_react82.HugeiconsIcon, { icon: import_core_free_icons29.Delete02Icon, size: 16 }))), !formState.signatureApproved && !globalUploadingSignature ? /* @__PURE__ */ import_react81.default.createElement("button", { onClick: () => !isReadOnly && !isAnyUploading && signatureRef.current?.click(), disabled: isReadOnly || isAnyUploading, className: `flex items-center gap-3 p-4 border border-neutral-100 rounded-full transition-colors text-sm w-full outline-none ${isAnyUploading ? "opacity-50 cursor-not-allowed bg-neutral-50 text-neutral-400" : "text-black hover:bg-neutral-50"}` }, /* @__PURE__ */ import_react81.default.createElement(import_react82.HugeiconsIcon, { icon: import_core_free_icons29.Upload01Icon, size: 18, className: "text-neutral-400" }), " Upload Signature") : globalUploadingSignature && !formData.signatureFileUrl ? /* @__PURE__ */ import_react81.default.createElement("div", { className: "flex items-center gap-3 p-4 border border-neutral-100 rounded-full bg-neutral-50 text-neutral-500 text-sm w-full" }, /* @__PURE__ */ import_react81.default.createElement(import_react82.HugeiconsIcon, { icon: import_core_free_icons29.Loading03Icon, size: 18, className: "animate-spin text-black" }), " Uploading Signature...") : /* @__PURE__ */ import_react81.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_react81.default.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ import_react81.default.createElement(import_react82.HugeiconsIcon, { icon: import_core_free_icons29.SignatureIcon, size: 18 }), " Signature Uploaded"), !isReadOnly && /* @__PURE__ */ import_react81.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_react81.default.createElement(import_react82.HugeiconsIcon, { icon: import_core_free_icons29.Delete02Icon, size: 16 })))))), /* @__PURE__ */ import_react81.default.createElement("div", { className: "flex flex-col gap-4 pt-6 border-t border-neutral-100 animate-in slide-in-from-top-4 duration-500" }, /* @__PURE__ */ import_react81.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_react81.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_react81.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_react81.default.createElement("div", { className: "flex flex-col gap-1 mb-2" }, /* @__PURE__ */ import_react81.default.createElement("h3", { className: "text-sm text-black" }, "Additional Documents (Optional)"), /* @__PURE__ */ import_react81.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_react81.default.createElement("div", { className: "flex flex-col gap-3" }, [1, 2, 3].map((num) => {
|
|
4766
|
+
}, onDecline: () => setNameCheckResult(null) }) : /* @__PURE__ */ import_react83.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_react83.default.createElement("div", null, /* @__PURE__ */ import_react83.default.createElement("span", { className: "text-[11px] tracking-widest text-red-600 block mb-1" }, "Registry Conflict Detected"), /* @__PURE__ */ import_react83.default.createElement("p", { className: "text-sm text-black mb-3" }, nameCheckResult.message), /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex flex-col gap-2" }, (nameCheckResult.alternatives || []).map((alt, i) => /* @__PURE__ */ import_react83.default.createElement("button", { key: i, onClick: () => setFormData({ ...formData, proposedName: alt }), className: "text-left px-4 py-2 border border-neutral-100 rounded-full hover:border-black text-sm transition-colors outline-none" }, alt)))), /* @__PURE__ */ import_react83.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_react83.default.createElement("div", { className: " flex items-center justify-between" }, /* @__PURE__ */ import_react83.default.createElement("div", null, /* @__PURE__ */ import_react83.default.createElement("p", { className: "text-sm text-black" }, formData.approvedName), /* @__PURE__ */ import_react83.default.createElement("p", { className: "text-xs text-emerald-600 mt-1" }, "Verified against registry")), !isReadOnly && /* @__PURE__ */ import_react83.default.createElement("button", { onClick: () => editSection("nameApproved"), className: "p-2 text-neutral-400 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ import_react83.default.createElement(import_react84.HugeiconsIcon, { icon: import_core_free_icons30.PencilEdit01Icon, size: 16 })))), formState.nameApproved && /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex flex-col gap-4 pt-6 animate-in slide-in-from-top-4 duration-500" }, /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex items-center text-black" }, /* @__PURE__ */ import_react83.default.createElement("h3", { className: "text-sm " }, "Where is your head office located?")), !formState.addressApproved ? /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex flex-col gap-4 " }, /* @__PURE__ */ import_react83.default.createElement(TextInput, { label: "Street Address", value: formData.address, onChange: (v) => setFormData({ ...formData, address: v }), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ import_react83.default.createElement("div", { className: "grid grid-cols-2 gap-4" }, /* @__PURE__ */ import_react83.default.createElement(TextInput, { label: "City", value: formData.city, onChange: (v) => setFormData({ ...formData, city: v }), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ import_react83.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: () => {
|
|
4767
|
+
}, disabled: isReadOnly || isSubmitting })), /* @__PURE__ */ import_react83.default.createElement(ThreeDActionButton, { onClick: () => approveSection("addressApproved"), disabled: !formData.address || !formData.city || !formData.state || isReadOnly, className: "w-fit mt-2" }, "Confirm Address")) : /* @__PURE__ */ import_react83.default.createElement("div", { className: " flex items-center justify-between" }, /* @__PURE__ */ import_react83.default.createElement("p", { className: "text-sm text-neutral-500" }, formData.address, ", ", formData.city, ", ", formData.state), !isReadOnly && /* @__PURE__ */ import_react83.default.createElement("button", { onClick: () => editSection("addressApproved"), className: "p-2 text-neutral-400 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ import_react83.default.createElement(import_react84.HugeiconsIcon, { icon: import_core_free_icons30.PencilEdit01Icon, size: 16 })))), formState.addressApproved && type === "company" && /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex flex-col gap-4 pt-6 animate-in slide-in-from-top-4 duration-500" }, /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex items-center justify-between gap-2 text-black" }, /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex items-center" }, /* @__PURE__ */ import_react83.default.createElement("h3", { className: "text-sm " }, "Directors & Shareholders")), !formState.membersDetailsApproved && /* @__PURE__ */ import_react83.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_react83.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_react83.default.createElement("div", { className: "flex flex-col gap-6 " }, formData.members.map((member, i) => /* @__PURE__ */ import_react83.default.createElement("div", { key: member.id, className: "flex flex-col gap-4 border border-neutral-100 p-5 rounded-2xl bg-neutral-50/30" }, /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex justify-between items-center mb-1" }, /* @__PURE__ */ import_react83.default.createElement("span", { className: "text-[11px] tracking-widest text-neutral-400" }, "Member ", i + 1), formData.members.length > 1 && !isReadOnly && /* @__PURE__ */ import_react83.default.createElement("button", { onClick: () => removeCompanyMember(i), className: "text-red-500 text-xs hover:text-red-600" }, "Remove")), /* @__PURE__ */ import_react83.default.createElement("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-4" }, /* @__PURE__ */ import_react83.default.createElement(TextInput, { label: "Role", value: member.role, readOnly: true, onClick: () => !isReadOnly && setActiveModal({ isOpen: true, type: "role", memberIndex: i }), onChange: () => {
|
|
4768
|
+
}, disabled: isReadOnly || isSubmitting }), member.role !== "Director Only" && /* @__PURE__ */ import_react83.default.createElement(NumberInput, { label: "Share Percentage (%)", value: member.sharePercentage, onChange: (v) => updateCompanyMemberInfo(i, "sharePercentage", v), disabled: isReadOnly || isSubmitting })), /* @__PURE__ */ import_react83.default.createElement(TextInput, { label: "Full Name", value: member.fullName, onChange: (v) => updateCompanyMemberInfo(i, "fullName", v), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ import_react83.default.createElement("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-4" }, /* @__PURE__ */ import_react83.default.createElement(NumberInput, { label: "Phone Number", value: member.phone, onChange: (v) => updateCompanyMemberInfo(i, "phone", v), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ import_react83.default.createElement(TextInput, { label: "Email Address", value: member.email, onChange: (v) => updateCompanyMemberInfo(i, "email", v), disabled: isReadOnly || isSubmitting })), /* @__PURE__ */ import_react83.default.createElement(TextInput, { label: "Nationality", value: member.nationality, readOnly: true, onClick: () => !isReadOnly && setActiveModal({ isOpen: true, type: "nationality", memberIndex: i }), onChange: () => {
|
|
4769
|
+
}, disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ import_react83.default.createElement(TextInput, { label: "Residential Address", value: member.address, onChange: (v) => updateCompanyMemberInfo(i, "address", v), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ import_react83.default.createElement("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-4" }, /* @__PURE__ */ import_react83.default.createElement(TextInput, { label: "City", value: member.city, onChange: (v) => updateCompanyMemberInfo(i, "city", v), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ import_react83.default.createElement(TextInput, { label: "State", value: member.state, readOnly: true, onClick: () => !isReadOnly && setActiveModal({ isOpen: true, type: "state", memberIndex: i }), onChange: () => {
|
|
4770
|
+
}, disabled: isReadOnly || isSubmitting })))), /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex items-center justify-between mt-2" }, !isReadOnly && /* @__PURE__ */ import_react83.default.createElement("button", { onClick: addCompanyMember, className: "px-6 py-2 bg-white border border-neutral-100 text-black text-[11px] tracking-widest rounded-full hover:bg-neutral-50 transition-colors outline-none" }, "+ Add Member"), /* @__PURE__ */ import_react83.default.createElement(ThreeDActionButton, { onClick: () => approveSection("membersDetailsApproved"), disabled: !areCompanyMembersValid() || isReadOnly, className: "w-fit" }, "Confirm Members"))) : /* @__PURE__ */ import_react83.default.createElement("div", { className: " flex items-center justify-between" }, /* @__PURE__ */ import_react83.default.createElement("div", null, /* @__PURE__ */ import_react83.default.createElement("p", { className: "text-sm text-black" }, formData.members.length, " Member(s) Registered"), /* @__PURE__ */ import_react83.default.createElement("p", { className: "text-xs text-neutral-500 mt-1" }, "Total Shares: 100% Verified.")), !isReadOnly && /* @__PURE__ */ import_react83.default.createElement("button", { onClick: () => editSection("membersDetailsApproved"), className: "p-2 text-neutral-400 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ import_react83.default.createElement(import_react84.HugeiconsIcon, { icon: import_core_free_icons30.PencilEdit01Icon, size: 16 })))), formState.addressApproved && type === "business" && /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex flex-col gap-4 pt-6 animate-in slide-in-from-top-4 duration-500" }, /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex items-center text-black" }, /* @__PURE__ */ import_react83.default.createElement("h3", { className: "text-sm " }, "Who owns the business?")), /* @__PURE__ */ import_react83.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_react83.default.createElement("div", { className: "flex flex-col gap-4 " }, /* @__PURE__ */ import_react83.default.createElement(TextInput, { label: "Full Name", value: formData.ownerName, onChange: (v) => setFormData({ ...formData, ownerName: v }), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ import_react83.default.createElement("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-4" }, /* @__PURE__ */ import_react83.default.createElement(NumberInput, { label: "Phone Number", value: formData.ownerPhone, onChange: (v) => setFormData({ ...formData, ownerPhone: v }), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ import_react83.default.createElement(TextInput, { label: "Email Address", value: formData.ownerEmail, onChange: (v) => setFormData({ ...formData, ownerEmail: v }), disabled: isReadOnly || isSubmitting })), /* @__PURE__ */ import_react83.default.createElement(ThreeDActionButton, { onClick: () => approveSection("ownerApproved"), disabled: !formData.ownerName || !formData.ownerPhone || !formData.ownerEmail || isReadOnly, className: "w-fit mt-2" }, "Confirm Owner Details")) : /* @__PURE__ */ import_react83.default.createElement("div", { className: " flex items-center justify-between" }, /* @__PURE__ */ import_react83.default.createElement("div", null, /* @__PURE__ */ import_react83.default.createElement("p", { className: "text-sm text-black" }, formData.ownerName), /* @__PURE__ */ import_react83.default.createElement("p", { className: "text-xs text-neutral-500 mt-1" }, formData.ownerEmail, " \u2022 ", formData.ownerPhone)), !isReadOnly && /* @__PURE__ */ import_react83.default.createElement("button", { onClick: () => editSection("ownerApproved"), className: "p-2 text-neutral-400 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ import_react83.default.createElement(import_react84.HugeiconsIcon, { icon: import_core_free_icons30.PencilEdit01Icon, size: 16 })))), /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex items-center justify-between mt-8 pt-6 " }, /* @__PURE__ */ import_react83.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_react83.default.createElement(import_react84.HugeiconsIcon, { icon: import_core_free_icons30.ArrowLeft01Icon, size: 14 }), " Close"), /* @__PURE__ */ import_react83.default.createElement(ThreeDActionButton, { onClick: handleNext, disabled: !isStep0Valid, className: "w-fit shrink-0" }, "Next Step"))), macroStep === 1 && /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex flex-col gap-8 animate-in fade-in" }, type === "company" ? /* @__PURE__ */ import_react83.default.createElement(import_react83.default.Fragment, null, /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex flex-col gap-2" }, /* @__PURE__ */ import_react83.default.createElement("h3", { className: "text-sm text-black" }, "Member Identity Documents"), /* @__PURE__ */ import_react83.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_react83.default.createElement("div", { className: "flex flex-col gap-6" }, formData.members.map((member, i) => /* @__PURE__ */ import_react83.default.createElement("div", { key: member.id, className: "flex flex-col gap-4" }, /* @__PURE__ */ import_react83.default.createElement("span", { className: "text-[11px] tracking-widest text-black mb-1" }, member.fullName || `Member ${i + 1}`, " ", /* @__PURE__ */ import_react83.default.createElement("span", { className: "text-neutral-400 ml-2" }, "(", member.role, ")")), /* @__PURE__ */ import_react83.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_react83.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_react83.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_react83.default.createElement("button", { onClick: () => !isReadOnly && !isAnyUploading && document.getElementById(`id-upload-${i}`)?.click(), className: `flex items-center gap-3 p-4 border border-neutral-100 rounded-full transition-colors text-sm w-full outline-none ${isAnyUploading ? "opacity-50 cursor-not-allowed bg-neutral-50 text-neutral-400" : "text-black hover:bg-neutral-50"}`, disabled: isReadOnly || isAnyUploading }, /* @__PURE__ */ import_react83.default.createElement(import_react84.HugeiconsIcon, { icon: import_core_free_icons30.Upload01Icon, size: 18, className: "text-neutral-400" }), " Upload Valid ID (NIN, License, Voter's Card)") : globalExtractingId && !member.idExtractedData ? /* @__PURE__ */ import_react83.default.createElement("div", { className: " mt-2" }, /* @__PURE__ */ import_react83.default.createElement(AiStageCheck, { tasks: aiTasks })) : member.idExtractedData ? /* @__PURE__ */ import_react83.default.createElement("div", { className: " mt-2 animate-in fade-in border border-orange-100 bg-linear-to-bl from-orange-50/80 via-white to-white p-5 rounded-xl flex flex-col gap-4 relative overflow-hidden" }, /* @__PURE__ */ import_react83.default.createElement("div", null, /* @__PURE__ */ import_react83.default.createElement("span", { className: "text-[11px] tracking-widest text-orange-600 block mb-2" }, "Review Extracted ID"), /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex flex-col gap-4" }, /* @__PURE__ */ import_react83.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_react83.default.createElement("div", { className: "grid grid-cols-2 gap-4" }, /* @__PURE__ */ import_react83.default.createElement(TextInput, { label: "ID Number", value: member.idExtractedData.idNumber, onChange: (v) => updateCompanyMemberInfo(i, "idExtractedData", { ...member.idExtractedData, idNumber: v }), disabled: isReadOnly || isAnyUploading }), /* @__PURE__ */ import_react83.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_react83.default.createElement("div", { className: "flex items-center gap-2 mt-2" }, !isReadOnly && /* @__PURE__ */ import_react83.default.createElement("button", { onClick: () => deleteCompanyMemberDocument(i, "id"), disabled: isAnyUploading, className: "px-6 py-2 bg-white border border-neutral-100 text-neutral-500 text-[11px] rounded-full tracking-widest hover:bg-neutral-50 transition-colors outline-none disabled:opacity-50 disabled:cursor-not-allowed" }, "Delete & Re-upload ID"))) : null, !member.passportFileUrl && !globalUploadingPassport ? /* @__PURE__ */ import_react83.default.createElement("button", { onClick: () => !isReadOnly && !isAnyUploading && document.getElementById(`pass-upload-${i}`)?.click(), className: `flex items-center gap-3 p-4 border border-neutral-100 rounded-full transition-colors text-sm w-full outline-none ${isAnyUploading ? "opacity-50 cursor-not-allowed bg-neutral-50 text-neutral-400" : "text-black hover:bg-neutral-50"}`, disabled: isReadOnly || isAnyUploading }, /* @__PURE__ */ import_react83.default.createElement(import_react84.HugeiconsIcon, { icon: import_core_free_icons30.Upload01Icon, size: 18, className: "text-neutral-400" }), " Upload Passport Photo") : globalUploadingPassport && !member.passportFileUrl ? /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex items-center gap-3 p-4 border border-neutral-100 rounded-full bg-neutral-50 text-neutral-500 text-sm w-full" }, /* @__PURE__ */ import_react83.default.createElement(import_react84.HugeiconsIcon, { icon: import_core_free_icons30.Loading03Icon, size: 18, className: "animate-spin text-black" }), " Uploading Passport...") : member.passportFileUrl ? /* @__PURE__ */ import_react83.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_react83.default.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ import_react83.default.createElement(import_react84.HugeiconsIcon, { icon: import_core_free_icons30.IdentificationIcon, size: 18 }), " Passport Uploaded"), !isReadOnly && /* @__PURE__ */ import_react83.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_react83.default.createElement(import_react84.HugeiconsIcon, { icon: import_core_free_icons30.Delete02Icon, size: 16 }))) : null, !member.signatureFileUrl && !globalUploadingSignature ? /* @__PURE__ */ import_react83.default.createElement("button", { onClick: () => !isReadOnly && !isAnyUploading && document.getElementById(`sig-upload-${i}`)?.click(), className: `flex items-center gap-3 p-4 border border-neutral-100 rounded-full transition-colors text-sm w-full outline-none ${isAnyUploading ? "opacity-50 cursor-not-allowed bg-neutral-50 text-neutral-400" : "text-black hover:bg-neutral-50"}`, disabled: isReadOnly || isAnyUploading }, /* @__PURE__ */ import_react83.default.createElement(import_react84.HugeiconsIcon, { icon: import_core_free_icons30.Upload01Icon, size: 18, className: "text-neutral-400" }), " Upload Signature") : globalUploadingSignature && !member.signatureFileUrl ? /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex items-center gap-3 p-4 border border-neutral-100 rounded-full bg-neutral-50 text-neutral-500 text-sm w-full" }, /* @__PURE__ */ import_react83.default.createElement(import_react84.HugeiconsIcon, { icon: import_core_free_icons30.Loading03Icon, size: 18, className: "animate-spin text-black" }), " Uploading Signature...") : member.signatureFileUrl ? /* @__PURE__ */ import_react83.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_react83.default.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ import_react83.default.createElement(import_react84.HugeiconsIcon, { icon: import_core_free_icons30.SignatureIcon, size: 18 }), " Signature Uploaded"), !isReadOnly && /* @__PURE__ */ import_react83.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_react83.default.createElement(import_react84.HugeiconsIcon, { icon: import_core_free_icons30.Delete02Icon, size: 16 }))) : null)), /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex justify-end" }, /* @__PURE__ */ import_react83.default.createElement(ThreeDActionButton, { onClick: () => approveSection("membersDocsApproved"), disabled: !areCompanyMemberDocsValid() || isReadOnly || isAnyUploading, className: "w-fit" }, "Confirm All Documents"))) : /* @__PURE__ */ import_react83.default.createElement("div", { className: " flex items-center justify-between bg-emerald-50 p-6 rounded-full" }, /* @__PURE__ */ import_react83.default.createElement("div", null, /* @__PURE__ */ import_react83.default.createElement("p", { className: "text-sm text-emerald-800" }, "Documents Uploaded"), /* @__PURE__ */ import_react83.default.createElement("p", { className: "text-xs text-emerald-600 mt-1" }, "Data safely extracted.")), !isReadOnly && /* @__PURE__ */ import_react83.default.createElement("button", { onClick: () => editSection("membersDocsApproved"), className: "p-2 text-emerald-700 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ import_react83.default.createElement(import_react84.HugeiconsIcon, { icon: import_core_free_icons30.PencilEdit01Icon, size: 16 })))) : /* @__PURE__ */ import_react83.default.createElement(import_react83.default.Fragment, null, /* @__PURE__ */ import_react83.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_react83.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_react83.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_react83.default.createElement("div", { className: "flex flex-col gap-4" }, /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex items-center gap-2 text-black" }, /* @__PURE__ */ import_react83.default.createElement("h3", { className: "text-sm " }, "Upload Means of Identification")), /* @__PURE__ */ import_react83.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_react83.default.createElement(import_react83.default.Fragment, null, /* @__PURE__ */ import_react83.default.createElement("button", { onClick: () => !isReadOnly && !isAnyUploading && idRef.current?.click(), disabled: isReadOnly || isAnyUploading, className: `w-full h-32 border border-neutral-100 rounded-full flex flex-col items-center justify-center gap-2 transition-colors outline-none ${isAnyUploading ? "opacity-50 cursor-not-allowed bg-neutral-50 text-neutral-400" : "hover:bg-neutral-50 text-black"}` }, /* @__PURE__ */ import_react83.default.createElement(import_react84.HugeiconsIcon, { icon: import_core_free_icons30.Upload01Icon, size: 24, className: "text-neutral-400" }), /* @__PURE__ */ import_react83.default.createElement("span", { className: "text-xs" }, "Select ID Image to Upload")), globalExtractingId && /* @__PURE__ */ import_react83.default.createElement("div", { className: " mt-2" }, /* @__PURE__ */ import_react83.default.createElement(AiStageCheck, { tasks: aiTasks })), formData.idExtractedData && /* @__PURE__ */ import_react83.default.createElement("div", { className: " mt-2 animate-in fade-in border border-orange-100 bg-linear-to-bl from-orange-50/80 via-white to-white p-5 rounded-2xl flex flex-col gap-4 relative overflow-hidden" }, /* @__PURE__ */ import_react83.default.createElement("div", null, /* @__PURE__ */ import_react83.default.createElement("span", { className: "text-[11px] tracking-widest text-orange-600 block mb-2" }, "Review AI Extracted Data"), /* @__PURE__ */ import_react83.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_react83.default.createElement("div", { className: "flex flex-col gap-4" }, /* @__PURE__ */ import_react83.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_react83.default.createElement("div", { className: "grid grid-cols-2 gap-4" }, /* @__PURE__ */ import_react83.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_react83.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_react83.default.createElement("div", { className: "flex items-center gap-2 mt-2" }, /* @__PURE__ */ import_react83.default.createElement(ThreeDActionButton, { onClick: () => approveSection("idApproved"), disabled: isAnyUploading || isReadOnly, className: "w-fit shrink-0" }, "Approve Data"), !isReadOnly && /* @__PURE__ */ import_react83.default.createElement("button", { onClick: () => deleteBusinessDocument("id"), disabled: isAnyUploading, className: "px-6 py-2 bg-white border border-neutral-100 text-neutral-500 text-[11px] rounded-full tracking-widest hover:bg-neutral-50 transition-colors outline-none disabled:opacity-50 disabled:cursor-not-allowed" }, "Delete & Re-upload")))) : /* @__PURE__ */ import_react83.default.createElement("div", { className: " flex items-center justify-between bg-emerald-50 p-6 rounded-full" }, /* @__PURE__ */ import_react83.default.createElement("div", null, /* @__PURE__ */ import_react83.default.createElement("p", { className: "text-sm text-emerald-800" }, "ID Document Verified"), /* @__PURE__ */ import_react83.default.createElement("p", { className: "text-xs text-emerald-600 mt-1" }, "Data safely extracted and stored.")), !isReadOnly && /* @__PURE__ */ import_react83.default.createElement("button", { onClick: () => editSection("idApproved"), className: "p-2 text-emerald-700 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ import_react83.default.createElement(import_react84.HugeiconsIcon, { icon: import_core_free_icons30.PencilEdit01Icon, size: 16 })))), /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex flex-col gap-4 pt-6 animate-in slide-in-from-top-4 duration-500" }, /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex flex-col gap-3 " }, !formState.passportApproved && !globalUploadingPassport ? /* @__PURE__ */ import_react83.default.createElement("button", { onClick: () => !isReadOnly && !isAnyUploading && passportRef.current?.click(), disabled: isReadOnly || isAnyUploading, className: `flex items-center gap-3 p-4 border border-neutral-100 rounded-full transition-colors text-sm w-full outline-none ${isAnyUploading ? "opacity-50 cursor-not-allowed bg-neutral-50 text-neutral-400" : "text-black hover:bg-neutral-50"}` }, /* @__PURE__ */ import_react83.default.createElement(import_react84.HugeiconsIcon, { icon: import_core_free_icons30.Upload01Icon, size: 18, className: "text-neutral-400" }), " Upload Passport Photo") : globalUploadingPassport && !formData.passportFileUrl ? /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex items-center gap-3 p-4 border border-neutral-100 rounded-full bg-neutral-50 text-neutral-500 text-sm w-full" }, /* @__PURE__ */ import_react83.default.createElement(import_react84.HugeiconsIcon, { icon: import_core_free_icons30.Loading03Icon, size: 18, className: "animate-spin text-black" }), " Uploading Passport...") : /* @__PURE__ */ import_react83.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_react83.default.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ import_react83.default.createElement(import_react84.HugeiconsIcon, { icon: import_core_free_icons30.IdentificationIcon, size: 18 }), " Passport Uploaded"), !isReadOnly && /* @__PURE__ */ import_react83.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_react83.default.createElement(import_react84.HugeiconsIcon, { icon: import_core_free_icons30.Delete02Icon, size: 16 }))), !formState.signatureApproved && !globalUploadingSignature ? /* @__PURE__ */ import_react83.default.createElement("button", { onClick: () => !isReadOnly && !isAnyUploading && signatureRef.current?.click(), disabled: isReadOnly || isAnyUploading, className: `flex items-center gap-3 p-4 border border-neutral-100 rounded-full transition-colors text-sm w-full outline-none ${isAnyUploading ? "opacity-50 cursor-not-allowed bg-neutral-50 text-neutral-400" : "text-black hover:bg-neutral-50"}` }, /* @__PURE__ */ import_react83.default.createElement(import_react84.HugeiconsIcon, { icon: import_core_free_icons30.Upload01Icon, size: 18, className: "text-neutral-400" }), " Upload Signature") : globalUploadingSignature && !formData.signatureFileUrl ? /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex items-center gap-3 p-4 border border-neutral-100 rounded-full bg-neutral-50 text-neutral-500 text-sm w-full" }, /* @__PURE__ */ import_react83.default.createElement(import_react84.HugeiconsIcon, { icon: import_core_free_icons30.Loading03Icon, size: 18, className: "animate-spin text-black" }), " Uploading Signature...") : /* @__PURE__ */ import_react83.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_react83.default.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ import_react83.default.createElement(import_react84.HugeiconsIcon, { icon: import_core_free_icons30.SignatureIcon, size: 18 }), " Signature Uploaded"), !isReadOnly && /* @__PURE__ */ import_react83.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_react83.default.createElement(import_react84.HugeiconsIcon, { icon: import_core_free_icons30.Delete02Icon, size: 16 })))))), /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex flex-col gap-4 pt-6 border-t border-neutral-100 animate-in slide-in-from-top-4 duration-500" }, /* @__PURE__ */ import_react83.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_react83.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_react83.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_react83.default.createElement("div", { className: "flex flex-col gap-1 mb-2" }, /* @__PURE__ */ import_react83.default.createElement("h3", { className: "text-sm text-black" }, "Additional Documents (Optional)"), /* @__PURE__ */ import_react83.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_react83.default.createElement("div", { className: "flex flex-col gap-3" }, [1, 2, 3].map((num) => {
|
|
4539
4771
|
const docType = `other${num}`;
|
|
4540
4772
|
const ref = num === 1 ? other1Ref : num === 2 ? other2Ref : other3Ref;
|
|
4541
4773
|
const isUploading = num === 1 ? isUploadingOther1 : num === 2 ? isUploadingOther2 : isUploadingOther3;
|
|
@@ -4543,29 +4775,29 @@ var UniversalRegistrationFlow = ({
|
|
|
4543
4775
|
if (!fileUrl && !isUploading) {
|
|
4544
4776
|
const prevUrl = num > 1 ? formData[`otherDoc${num - 1}Url`] : true;
|
|
4545
4777
|
if (!prevUrl) return null;
|
|
4546
|
-
return /* @__PURE__ */
|
|
4778
|
+
return /* @__PURE__ */ import_react83.default.createElement("button", { key: num, onClick: () => !isReadOnly && !isAnyUploading && ref.current?.click(), disabled: isReadOnly || isAnyUploading, className: `flex items-center gap-3 p-4 border border-neutral-100 rounded-full transition-colors text-sm w-full outline-none ${isAnyUploading ? "opacity-50 cursor-not-allowed bg-neutral-50 text-neutral-400" : "text-black hover:bg-neutral-50"}` }, /* @__PURE__ */ import_react83.default.createElement(import_react84.HugeiconsIcon, { icon: import_core_free_icons30.Upload01Icon, size: 18, className: "text-neutral-400" }), " Upload Optional Document ", num);
|
|
4547
4779
|
}
|
|
4548
4780
|
if (isUploading) {
|
|
4549
|
-
return /* @__PURE__ */
|
|
4781
|
+
return /* @__PURE__ */ import_react83.default.createElement("div", { key: num, className: "flex items-center gap-3 p-4 border border-neutral-100 rounded-full bg-neutral-50 text-neutral-500 text-sm w-full" }, /* @__PURE__ */ import_react83.default.createElement(import_react84.HugeiconsIcon, { icon: import_core_free_icons30.Loading03Icon, size: 18, className: "animate-spin text-black" }), " Uploading Document ", num, "...");
|
|
4550
4782
|
}
|
|
4551
|
-
return /* @__PURE__ */
|
|
4552
|
-
}))), /* @__PURE__ */
|
|
4783
|
+
return /* @__PURE__ */ import_react83.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_react83.default.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ import_react83.default.createElement(import_react84.HugeiconsIcon, { icon: import_core_free_icons30.CheckmarkBadge01Icon, size: 18 }), " Optional Document ", num, " Uploaded"), !isReadOnly && /* @__PURE__ */ import_react83.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_react83.default.createElement(import_react84.HugeiconsIcon, { icon: import_core_free_icons30.Delete02Icon, size: 16 })));
|
|
4784
|
+
}))), /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex items-center justify-between mt-8 pt-6 " }, /* @__PURE__ */ import_react83.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_react83.default.createElement(import_react84.HugeiconsIcon, { icon: import_core_free_icons30.ArrowLeft01Icon, size: 14 }), " Back"), /* @__PURE__ */ import_react83.default.createElement(ThreeDActionButton, { onClick: handleNext, disabled: !isStep1Valid || isAnyUploading, className: "w-fit shrink-0" }, "Next Step"))), macroStep === 2 && /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex flex-col gap-6 animate-in fade-in" }, /* @__PURE__ */ import_react83.default.createElement("div", null, /* @__PURE__ */ import_react83.default.createElement("h3", { className: "text-sm mb-5 text-black" }, "Application Summary"), /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex flex-col gap-4 text-sm" }, /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex flex-col sm:flex-row sm:justify-between border-b border-neutral-100 pb-3 gap-1" }, /* @__PURE__ */ import_react83.default.createElement("span", { className: "text-neutral-500 truncate text-[13px] " }, type === "company" ? "Company Name" : "Business Name"), /* @__PURE__ */ import_react83.default.createElement("span", { className: " text-black text-[13px]" }, formData.approvedName)), /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex flex-col sm:flex-row sm:justify-between border-b border-neutral-100 pb-3 gap-1" }, /* @__PURE__ */ import_react83.default.createElement("span", { className: "text-neutral-500 text-[13px] " }, "Classification"), /* @__PURE__ */ import_react83.default.createElement("span", { className: " text-black truncate sm:text-right text-[13px] " }, formData.natureOfBusiness?.specificLabel || "Pending")), type === "company" ? /* @__PURE__ */ import_react83.default.createElement(import_react83.default.Fragment, null, /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex flex-col sm:flex-row sm:justify-between border-b border-neutral-100 pb-3 gap-1" }, /* @__PURE__ */ import_react83.default.createElement("span", { className: "text-neutral-500 text-[13px] " }, "Total Members"), /* @__PURE__ */ import_react83.default.createElement("span", { className: " text-black truncate text-[13px] " }, formData.members.length, " Directors/Shareholders")), /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex flex-col sm:flex-row sm:justify-between border-b border-neutral-100 pb-3 gap-1" }, /* @__PURE__ */ import_react83.default.createElement("span", { className: "text-neutral-500 text-[13px] " }, "Share Capital"), /* @__PURE__ */ import_react83.default.createElement("span", { className: " text-black truncate text-[13px] " }, "100% Allocated"))) : /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex flex-col sm:flex-row sm:justify-between border-b border-neutral-100 pb-3 gap-1" }, /* @__PURE__ */ import_react83.default.createElement("span", { className: "text-neutral-500 text-[13px] " }, "Proprietor"), /* @__PURE__ */ import_react83.default.createElement("span", { className: " text-black truncate text-[13px] " }, formData.ownerName)), /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex flex-col sm:flex-row sm:justify-between pb-2 gap-1" }, /* @__PURE__ */ import_react83.default.createElement("span", { className: "text-neutral-500 text-[13px] " }, "Documents Attached"), /* @__PURE__ */ import_react83.default.createElement("span", { className: " text-neutral-400 text-[13px] " }, "ID, Passport, Signature")), formData.otherDoc1Url && /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex flex-col sm:flex-row sm:justify-between pb-2 gap-1" }, /* @__PURE__ */ import_react83.default.createElement("span", { className: "text-neutral-500 text-[13px] " }, "Optional Documents"), /* @__PURE__ */ import_react83.default.createElement("span", { className: " text-neutral-400 text-[13px] " }, [formData.otherDoc1Url, formData.otherDoc2Url, formData.otherDoc3Url].filter(Boolean).length, " Attached")))), /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex items-center justify-between mt-4 pt-4 " }, /* @__PURE__ */ import_react83.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_react83.default.createElement(import_react84.HugeiconsIcon, { icon: import_core_free_icons30.ArrowLeft01Icon, size: 14 }), " Back"), /* @__PURE__ */ import_react83.default.createElement(ThreeDActionButton, { onClick: handleNext, className: "w-fit shrink-0" }, "Next Step"))), macroStep === 3 && /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex flex-col gap-6 py-6 animate-in zoom-in-95 duration-500" }, /* @__PURE__ */ import_react83.default.createElement("h2", { className: "text-lg text-black tracking-tight mb-2" }, "Terms and Conditions of Application"), /* @__PURE__ */ import_react83.default.createElement("div", { className: "text-xs text-neutral-500 mb-4" }, /* @__PURE__ */ import_react83.default.createElement("p", { className: " mb-3" }, "Declaration and Consent"), /* @__PURE__ */ import_react83.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_react83.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_react83.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_react83.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_react83.default.createElement("label", { className: "flex items-start gap-3 mt-2 cursor-pointer group" }, /* @__PURE__ */ import_react83.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_react83.default.createElement("span", { className: "text-[13px] text-neutral-500 group-hover:text-neutral-600 transition-colors" }, "I have read, understood, and agree to the terms of data transfer and processing.")), /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex flex-col sm:flex-row items-center gap-4 mt-8 w-full justify-end pt-6" }, /* @__PURE__ */ import_react83.default.createElement("button", { onClick: onCancelOrClose, disabled: isSubmitting, className: "text-[11px] tracking-widest text-neutral-500 hover:text-black hover:bg-neutral-50 rounded-full px-8 py-2.5 border border-neutral-100 transition-colors outline-none w-full sm:w-auto" }, "Cancel"), /* @__PURE__ */ import_react83.default.createElement("button", { onClick: () => setMacroStep(0), disabled: isSubmitting || isReadOnly, className: " text-[11px] tracking-widest text-neutral-500 hover:text-black hover:bg-neutral-50 rounded-full px-8 py-2.5 border border-neutral-100transition-colors outline-none w-full sm:w-auto" }, "Edit Application"), /* @__PURE__ */ import_react83.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_react83.default.createElement("div", { className: "fixed inset-0 z-110 flex items-center justify-center p-4" }, /* @__PURE__ */ import_react83.default.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setActiveModal({ isOpen: false, type: null, memberIndex: null }) }), /* @__PURE__ */ import_react83.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_react83.default.createElement("div", { className: "p-4 text-center w-full shrink-0" }, /* @__PURE__ */ import_react83.default.createElement("h3", { className: "text-[14px] text-black tracking-tight capitalize" }, "Select ", activeModal.type)), /* @__PURE__ */ import_react83.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) => {
|
|
4553
4785
|
const isSelected = activeModal.isGlobalState ? formData.state === opt : formData.members[activeModal.memberIndex][activeModal.type] === opt;
|
|
4554
|
-
return /* @__PURE__ */
|
|
4786
|
+
return /* @__PURE__ */ import_react83.default.createElement("button", { key: opt, onClick: () => {
|
|
4555
4787
|
if (activeModal.isGlobalState) setFormData({ ...formData, state: opt });
|
|
4556
4788
|
else updateCompanyMemberInfo(activeModal.memberIndex, activeModal.type, opt);
|
|
4557
4789
|
setActiveModal({ isOpen: false, type: null, memberIndex: null });
|
|
4558
4790
|
}, 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);
|
|
4559
|
-
})), /* @__PURE__ */
|
|
4791
|
+
})), /* @__PURE__ */ import_react83.default.createElement("div", { className: "w-full flex mt-auto shrink-0 " }, /* @__PURE__ */ import_react83.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")))));
|
|
4560
4792
|
};
|
|
4561
4793
|
|
|
4562
4794
|
// src/components/UniversalDeveloperSettings.tsx
|
|
4563
|
-
var
|
|
4564
|
-
var
|
|
4565
|
-
var
|
|
4566
|
-
var
|
|
4567
|
-
var ButtonSpinner5 = () => /* @__PURE__ */
|
|
4568
|
-
var
|
|
4795
|
+
var import_react85 = __toESM(require("react"));
|
|
4796
|
+
var import_react_hot_toast11 = require("react-hot-toast");
|
|
4797
|
+
var import_react86 = require("@hugeicons/react");
|
|
4798
|
+
var import_core_free_icons31 = require("@hugeicons/core-free-icons");
|
|
4799
|
+
var ButtonSpinner5 = () => /* @__PURE__ */ import_react85.default.createElement(import_react86.HugeiconsIcon, { icon: import_core_free_icons31.Loading03Icon, size: 16, className: "animate-spin text-current" });
|
|
4800
|
+
var PageSpinner7 = () => /* @__PURE__ */ import_react85.default.createElement("div", { className: "flex justify-center items-center py-12 w-full" }, /* @__PURE__ */ import_react85.default.createElement(import_react86.HugeiconsIcon, { icon: import_core_free_icons31.Loading03Icon, size: 32, className: "animate-spin text-black" }));
|
|
4569
4801
|
var UniversalDeveloperSettings = ({
|
|
4570
4802
|
initialPublicKey,
|
|
4571
4803
|
initialWebhookUrl,
|
|
@@ -4574,12 +4806,12 @@ var UniversalDeveloperSettings = ({
|
|
|
4574
4806
|
onGenerateKeys,
|
|
4575
4807
|
onSaveWebhook
|
|
4576
4808
|
}) => {
|
|
4577
|
-
const [publicKey, setPublicKey] = (0,
|
|
4578
|
-
const [webhookUrl, setWebhookUrl] = (0,
|
|
4579
|
-
const [isGenerating, setIsGenerating] = (0,
|
|
4580
|
-
const [isSavingWebhook, setIsSavingWebhook] = (0,
|
|
4581
|
-
const [isRollModalOpen, setIsRollModalOpen] = (0,
|
|
4582
|
-
(0,
|
|
4809
|
+
const [publicKey, setPublicKey] = (0, import_react85.useState)(initialPublicKey);
|
|
4810
|
+
const [webhookUrl, setWebhookUrl] = (0, import_react85.useState)(initialWebhookUrl);
|
|
4811
|
+
const [isGenerating, setIsGenerating] = (0, import_react85.useState)(false);
|
|
4812
|
+
const [isSavingWebhook, setIsSavingWebhook] = (0, import_react85.useState)(false);
|
|
4813
|
+
const [isRollModalOpen, setIsRollModalOpen] = (0, import_react85.useState)(false);
|
|
4814
|
+
(0, import_react85.useEffect)(() => {
|
|
4583
4815
|
setPublicKey(initialPublicKey || "");
|
|
4584
4816
|
setWebhookUrl(initialWebhookUrl || "");
|
|
4585
4817
|
}, [initialPublicKey, initialWebhookUrl]);
|
|
@@ -4608,13 +4840,13 @@ SECRET_KEY="${secKey}"
|
|
|
4608
4840
|
if (res.success && res.data) {
|
|
4609
4841
|
setPublicKey(res.data.publicKey);
|
|
4610
4842
|
downloadEnvironmentFile(res.data.publicKey, res.data.secretKey);
|
|
4611
|
-
|
|
4843
|
+
import_react_hot_toast11.toast.success("Keys generated. Check your downloads folder.");
|
|
4612
4844
|
setIsRollModalOpen(false);
|
|
4613
4845
|
} else {
|
|
4614
|
-
|
|
4846
|
+
import_react_hot_toast11.toast.error(res.error || "Uh oh! Something went wrong.");
|
|
4615
4847
|
}
|
|
4616
4848
|
} catch (error) {
|
|
4617
|
-
|
|
4849
|
+
import_react_hot_toast11.toast.error("Uh oh! Something went wrong.");
|
|
4618
4850
|
} finally {
|
|
4619
4851
|
setIsGenerating(false);
|
|
4620
4852
|
}
|
|
@@ -4627,19 +4859,19 @@ SECRET_KEY="${secKey}"
|
|
|
4627
4859
|
const res = await onSaveWebhook(webhookUrl);
|
|
4628
4860
|
if (res.success && res.data) {
|
|
4629
4861
|
setWebhookUrl(res.data.webhookUrl || "");
|
|
4630
|
-
|
|
4862
|
+
import_react_hot_toast11.toast.success("Webhook URL updated.");
|
|
4631
4863
|
} else {
|
|
4632
|
-
|
|
4864
|
+
import_react_hot_toast11.toast.error(res.error || "Uh oh! Something went wrong.");
|
|
4633
4865
|
}
|
|
4634
4866
|
} catch (error) {
|
|
4635
|
-
|
|
4867
|
+
import_react_hot_toast11.toast.error("Uh oh! Something went wrong.");
|
|
4636
4868
|
} finally {
|
|
4637
4869
|
setIsSavingWebhook(false);
|
|
4638
4870
|
}
|
|
4639
4871
|
};
|
|
4640
4872
|
const hasWebhookChanges = webhookUrl !== initialWebhookUrl;
|
|
4641
4873
|
const isWebhookSaveDisabled = isSavingWebhook || isReadOnly || !hasWebhookChanges;
|
|
4642
|
-
return /* @__PURE__ */
|
|
4874
|
+
return /* @__PURE__ */ import_react85.default.createElement("div", { className: "flex flex-col max-w-5xl rounded-2xl p-6 bg-white gap-8 animate-in fade-in duration-300" }, /* @__PURE__ */ import_react85.default.createElement(ManagedToaster, null), /* @__PURE__ */ import_react85.default.createElement("div", { className: "flex flex-col sm:flex-row sm:items-start justify-between gap-3 sm:gap-4" }, /* @__PURE__ */ import_react85.default.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ import_react85.default.createElement("h1", { className: " text-xl text-black mb-1 truncate tracking-tight" }, "Developer Settings"), /* @__PURE__ */ import_react85.default.createElement("p", { className: "text-xs text-neutral-500 truncate" }, "Manage your API credentials and webhook integrations.")), isReadOnly && /* @__PURE__ */ import_react85.default.createElement("span", { className: "p-2 w-9 h-9 bg-neutral-50 text-neutral-500 rounded-full flex items-center justify-center shrink-0" }, /* @__PURE__ */ import_react85.default.createElement(import_react86.HugeiconsIcon, { icon: import_core_free_icons31.CircleLock02Icon, size: 18, className: "text-current" }))), isLoading ? /* @__PURE__ */ import_react85.default.createElement(PageSpinner7, null) : /* @__PURE__ */ import_react85.default.createElement("div", { className: "w-full max-w-5xl flex flex-col gap-12" }, /* @__PURE__ */ import_react85.default.createElement("div", { className: "flex flex-col gap-6" }, /* @__PURE__ */ import_react85.default.createElement("div", { className: "space-y-2 min-w-0" }, /* @__PURE__ */ import_react85.default.createElement(
|
|
4643
4875
|
TextInput,
|
|
4644
4876
|
{
|
|
4645
4877
|
label: "Public Key",
|
|
@@ -4648,7 +4880,7 @@ SECRET_KEY="${secKey}"
|
|
|
4648
4880
|
},
|
|
4649
4881
|
disabled: true
|
|
4650
4882
|
}
|
|
4651
|
-
), /* @__PURE__ */
|
|
4883
|
+
), /* @__PURE__ */ import_react85.default.createElement("p", { className: "text-[11px] text-neutral-400 mt-1 leading-snug" }, "Your public key is used to identify your application. Your secret key will only be shown once upon generation.")), /* @__PURE__ */ import_react85.default.createElement("div", { className: "flex items-center gap-4" }, /* @__PURE__ */ import_react85.default.createElement(
|
|
4652
4884
|
ThreeDActionButton,
|
|
4653
4885
|
{
|
|
4654
4886
|
onClick: () => {
|
|
@@ -4660,7 +4892,7 @@ SECRET_KEY="${secKey}"
|
|
|
4660
4892
|
className: "w-fit"
|
|
4661
4893
|
},
|
|
4662
4894
|
publicKey ? "Roll API Keys" : "Generate Keys"
|
|
4663
|
-
))), /* @__PURE__ */
|
|
4895
|
+
))), /* @__PURE__ */ import_react85.default.createElement("form", { className: "flex flex-col gap-6 border-t border-neutral-100 pt-8", onSubmit: handleSaveWebhook, autoComplete: "off" }, /* @__PURE__ */ import_react85.default.createElement("div", { className: "space-y-2 min-w-0" }, /* @__PURE__ */ import_react85.default.createElement(
|
|
4664
4896
|
TextInput,
|
|
4665
4897
|
{
|
|
4666
4898
|
label: "Webhook URL",
|
|
@@ -4670,7 +4902,7 @@ SECRET_KEY="${secKey}"
|
|
|
4670
4902
|
placeholder: "https://your-domain.com/webhook",
|
|
4671
4903
|
type: "url"
|
|
4672
4904
|
}
|
|
4673
|
-
), /* @__PURE__ */
|
|
4905
|
+
), /* @__PURE__ */ import_react85.default.createElement("p", { className: "text-[11px] text-neutral-400 mt-1 leading-snug" }, "We will send secure POST requests to this endpoint when significant events occur. Must use HTTPS.")), /* @__PURE__ */ import_react85.default.createElement("div", { className: "flex flex-col sm:flex-row sm:items-center justify-between mt-2 gap-6 sm:gap-4" }, /* @__PURE__ */ import_react85.default.createElement("div", { className: "flex items-center gap-6 min-w-0" }, /* @__PURE__ */ import_react85.default.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ import_react85.default.createElement("span", { className: "text-[11px] text-neutral-400 tracking-[0.2em] block truncate " }, "Webhook Status"), /* @__PURE__ */ import_react85.default.createElement("span", { className: `text-xs block truncate ${webhookUrl ? "text-emerald-600" : "text-neutral-400"}` }, webhookUrl ? "Active" : "Inactive"))), /* @__PURE__ */ import_react85.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_react85.default.createElement(
|
|
4674
4906
|
"button",
|
|
4675
4907
|
{
|
|
4676
4908
|
type: "button",
|
|
@@ -4678,7 +4910,7 @@ SECRET_KEY="${secKey}"
|
|
|
4678
4910
|
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"
|
|
4679
4911
|
},
|
|
4680
4912
|
"Cancel"
|
|
4681
|
-
), /* @__PURE__ */
|
|
4913
|
+
), /* @__PURE__ */ import_react85.default.createElement(
|
|
4682
4914
|
ThreeDActionButton,
|
|
4683
4915
|
{
|
|
4684
4916
|
type: "submit",
|
|
@@ -4687,7 +4919,7 @@ SECRET_KEY="${secKey}"
|
|
|
4687
4919
|
className: "min-w-32 w-full sm:w-auto"
|
|
4688
4920
|
},
|
|
4689
4921
|
"Save Webhook"
|
|
4690
|
-
))))), isRollModalOpen && !isReadOnly && /* @__PURE__ */
|
|
4922
|
+
))))), isRollModalOpen && !isReadOnly && /* @__PURE__ */ import_react85.default.createElement("div", { className: "fixed inset-0 z-110 flex items-center justify-center p-4" }, /* @__PURE__ */ import_react85.default.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => !isGenerating && setIsRollModalOpen(false) }), /* @__PURE__ */ import_react85.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_react85.default.createElement("div", { className: "p-6 text-center w-full" }, /* @__PURE__ */ import_react85.default.createElement("h3", { className: " text-[17px] text-black tracking-tight mb-1" }, "Roll API Keys"), /* @__PURE__ */ import_react85.default.createElement("p", { className: "text-[11px] text-neutral-500 leading-snug mt-2" }, "Are you sure you want to roll your keys? This will permanently invalidate your current secret key and active MCP tokens.")), /* @__PURE__ */ import_react85.default.createElement("div", { className: "w-full flex" }, /* @__PURE__ */ import_react85.default.createElement(
|
|
4691
4923
|
"button",
|
|
4692
4924
|
{
|
|
4693
4925
|
onClick: () => setIsRollModalOpen(false),
|
|
@@ -4695,30 +4927,30 @@ SECRET_KEY="${secKey}"
|
|
|
4695
4927
|
className: "flex-1 py-3 text-[13px] text-neutral-600 hover:bg-neutral-50 transition-colors disabled:opacity-50 outline-none"
|
|
4696
4928
|
},
|
|
4697
4929
|
"Cancel"
|
|
4698
|
-
), /* @__PURE__ */
|
|
4930
|
+
), /* @__PURE__ */ import_react85.default.createElement(
|
|
4699
4931
|
"button",
|
|
4700
4932
|
{
|
|
4701
4933
|
onClick: handleGenerateKeys,
|
|
4702
4934
|
disabled: isGenerating,
|
|
4703
4935
|
className: "flex-1 py-3 text-[13px] text-red-600 hover:bg-neutral-50 transition-colors disabled:opacity-50 flex justify-center items-center outline-none"
|
|
4704
4936
|
},
|
|
4705
|
-
isGenerating ? /* @__PURE__ */
|
|
4937
|
+
isGenerating ? /* @__PURE__ */ import_react85.default.createElement(ButtonSpinner5, null) : "Roll Keys"
|
|
4706
4938
|
)))));
|
|
4707
4939
|
};
|
|
4708
4940
|
|
|
4709
4941
|
// src/components/UniversalAppLibrary.tsx
|
|
4710
|
-
var
|
|
4711
|
-
var
|
|
4712
|
-
var
|
|
4942
|
+
var import_react87 = __toESM(require("react"));
|
|
4943
|
+
var import_react88 = require("@hugeicons/react");
|
|
4944
|
+
var import_core_free_icons32 = require("@hugeicons/core-free-icons");
|
|
4713
4945
|
var AppCard = ({ app }) => {
|
|
4714
|
-
const [isLoading, setIsLoading] = (0,
|
|
4715
|
-
return /* @__PURE__ */
|
|
4946
|
+
const [isLoading, setIsLoading] = (0, import_react87.useState)(true);
|
|
4947
|
+
return /* @__PURE__ */ import_react87.default.createElement(
|
|
4716
4948
|
"button",
|
|
4717
4949
|
{
|
|
4718
4950
|
onClick: app.onClick,
|
|
4719
4951
|
className: "flex flex-col gap-3 group cursor-pointer w-25 shrink-0 text-left outline-none"
|
|
4720
4952
|
},
|
|
4721
|
-
/* @__PURE__ */
|
|
4953
|
+
/* @__PURE__ */ import_react87.default.createElement("div", { className: "relative w-full aspect-square rounded-2xl bg-white overflow-hidden transition-all duration-300 flex items-center justify-center" }, isLoading && /* @__PURE__ */ import_react87.default.createElement("div", { className: "absolute inset-0 flex items-center justify-center z-10 bg-neutral-50/50" }, /* @__PURE__ */ import_react87.default.createElement(import_react88.HugeiconsIcon, { icon: import_core_free_icons32.Loading03Icon, size: 24, className: "animate-spin text-neutral-400" })), /* @__PURE__ */ import_react87.default.createElement(
|
|
4722
4954
|
"img",
|
|
4723
4955
|
{
|
|
4724
4956
|
src: app.logoSrc,
|
|
@@ -4728,7 +4960,7 @@ var AppCard = ({ app }) => {
|
|
|
4728
4960
|
className: `w-full h-full object-cover transition-all duration-700 ease-out z-20 ${isLoading ? "opacity-0 scale-95 blur-md" : "opacity-100 scale-100 blur-0"}`
|
|
4729
4961
|
}
|
|
4730
4962
|
)),
|
|
4731
|
-
/* @__PURE__ */
|
|
4963
|
+
/* @__PURE__ */ import_react87.default.createElement("div", { className: "flex flex-col min-w-0 px-1" }, /* @__PURE__ */ import_react87.default.createElement("span", { className: "text-[13px] text-black tracking-tight truncate group-hover:text-neutral-600 transition-colors" }, app.name), /* @__PURE__ */ import_react87.default.createElement("span", { className: "text-[10px] text-neutral-500 tracking-wide truncate mt-0.5" }, app.category))
|
|
4732
4964
|
);
|
|
4733
4965
|
};
|
|
4734
4966
|
var UniversalAppLibrary = ({
|
|
@@ -4736,18 +4968,18 @@ var UniversalAppLibrary = ({
|
|
|
4736
4968
|
headline,
|
|
4737
4969
|
categories
|
|
4738
4970
|
}) => {
|
|
4739
|
-
return /* @__PURE__ */
|
|
4971
|
+
return /* @__PURE__ */ import_react87.default.createElement("div", { className: "w-full py-16" }, /* @__PURE__ */ import_react87.default.createElement("div", { className: "w-full flex justify-center px-4" }, /* @__PURE__ */ import_react87.default.createElement("div", { className: "max-w-6xl w-full" }, (tagline || headline) && /* @__PURE__ */ import_react87.default.createElement("div", { className: "relative overflow-hidden mb-12 text-left" }, /* @__PURE__ */ import_react87.default.createElement("div", { className: "relative z-10" }, tagline && /* @__PURE__ */ import_react87.default.createElement("span", { className: "text-[11px] tracking-[0.4em] text-neutral-500 block mb-4 " }, tagline), headline && /* @__PURE__ */ import_react87.default.createElement("h2", { className: "text-2xl sm:text-3xl tracking-tight text-black leading-[1.1]" }, headline))), /* @__PURE__ */ import_react87.default.createElement("div", { className: "flex flex-col gap-14" }, categories.map((category) => /* @__PURE__ */ import_react87.default.createElement("div", { key: category.id, className: "flex flex-col" }, /* @__PURE__ */ import_react87.default.createElement("div", { className: "flex items-end justify-between mb-5 px-1" }, /* @__PURE__ */ import_react87.default.createElement("h3", { className: "text-lg text-black tracking-tight " }, category.title), category.onSeeMore && /* @__PURE__ */ import_react87.default.createElement(
|
|
4740
4972
|
"button",
|
|
4741
4973
|
{
|
|
4742
4974
|
onClick: category.onSeeMore,
|
|
4743
4975
|
className: "text-[11px] tracking-widest text-neutral-500 hover:text-black transition-colors outline-none shrink-0 ml-4 pb-0.5"
|
|
4744
4976
|
},
|
|
4745
4977
|
category.seeMoreLabel || "See More"
|
|
4746
|
-
)), /* @__PURE__ */
|
|
4978
|
+
)), /* @__PURE__ */ import_react87.default.createElement("div", { className: "flex gap-4 sm:gap-6 overflow-x-auto pb-6 pt-2 -mx-4 px-4 sm:mx-0 sm:px-1 [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] scrollbar-none" }, category.apps.map((app) => /* @__PURE__ */ import_react87.default.createElement(AppCard, { key: app.id, app }))), /* @__PURE__ */ import_react87.default.createElement("div", { className: "w-full h-px mt-2 last-of-type:hidden" })))))));
|
|
4747
4979
|
};
|
|
4748
4980
|
|
|
4749
4981
|
// src/components/MedicalFeatureStatsBlock.tsx
|
|
4750
|
-
var
|
|
4982
|
+
var import_react89 = __toESM(require("react"));
|
|
4751
4983
|
var import_image11 = __toESM(require("next/image"));
|
|
4752
4984
|
var MedicalFeatureStatsBlock = ({
|
|
4753
4985
|
bottomHeadline,
|
|
@@ -4756,9 +4988,9 @@ var MedicalFeatureStatsBlock = ({
|
|
|
4756
4988
|
trustText,
|
|
4757
4989
|
stats
|
|
4758
4990
|
}) => {
|
|
4759
|
-
const [isAnimating, setIsAnimating] = (0,
|
|
4760
|
-
const titleRef = (0,
|
|
4761
|
-
(0,
|
|
4991
|
+
const [isAnimating, setIsAnimating] = (0, import_react89.useState)(false);
|
|
4992
|
+
const titleRef = (0, import_react89.useRef)(null);
|
|
4993
|
+
(0, import_react89.useEffect)(() => {
|
|
4762
4994
|
const observer = new IntersectionObserver(
|
|
4763
4995
|
([entry]) => {
|
|
4764
4996
|
if (entry.isIntersecting) {
|
|
@@ -4776,7 +5008,7 @@ var MedicalFeatureStatsBlock = ({
|
|
|
4776
5008
|
}
|
|
4777
5009
|
return () => observer.disconnect();
|
|
4778
5010
|
}, []);
|
|
4779
|
-
return /* @__PURE__ */
|
|
5011
|
+
return /* @__PURE__ */ import_react89.default.createElement("section", { className: "py-24 w-full flex justify-center relative z-10" }, /* @__PURE__ */ import_react89.default.createElement("div", { className: "max-w-6xl w-full flex flex-col px-4 md:px-8" }, /* @__PURE__ */ import_react89.default.createElement("div", { className: "flex flex-col lg:flex-row justify-between items-start lg:items-end gap-10 mb-12" }, /* @__PURE__ */ import_react89.default.createElement("div", { className: "max-w-xl" }, /* @__PURE__ */ import_react89.default.createElement(
|
|
4780
5012
|
"h2",
|
|
4781
5013
|
{
|
|
4782
5014
|
ref: titleRef,
|
|
@@ -4784,7 +5016,7 @@ var MedicalFeatureStatsBlock = ({
|
|
|
4784
5016
|
style: isAnimating ? { animationIterationCount: 1 } : {}
|
|
4785
5017
|
},
|
|
4786
5018
|
bottomHeadline
|
|
4787
|
-
), /* @__PURE__ */
|
|
5019
|
+
), /* @__PURE__ */ import_react89.default.createElement("p", { className: "text-[14px] leading-relaxed text-neutral-500" }, bottomDescription)), /* @__PURE__ */ import_react89.default.createElement("div", { className: "flex items-center gap-4 shrink-0" }, /* @__PURE__ */ import_react89.default.createElement("div", { className: "flex -space-x-3" }, avatars.map((src, i) => /* @__PURE__ */ import_react89.default.createElement("div", { key: i, className: "relative w-12 h-12 rounded-full border-[3px] border-white overflow-hidden bg-neutral-100 z-1 hover:z-10 transition-all" }, /* @__PURE__ */ import_react89.default.createElement(
|
|
4788
5020
|
import_image11.default,
|
|
4789
5021
|
{
|
|
4790
5022
|
src,
|
|
@@ -4793,17 +5025,17 @@ var MedicalFeatureStatsBlock = ({
|
|
|
4793
5025
|
sizes: "48px",
|
|
4794
5026
|
className: "object-cover"
|
|
4795
5027
|
}
|
|
4796
|
-
)))), /* @__PURE__ */
|
|
5028
|
+
)))), /* @__PURE__ */ import_react89.default.createElement("p", { className: "text-[11px] text-neutral-800 leading-[1.4] max-w-55" }, trustText))), /* @__PURE__ */ import_react89.default.createElement("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6" }, stats.map((stat, idx) => /* @__PURE__ */ import_react89.default.createElement("div", { key: idx, className: "bg-white rounded-4xl p-8 md:p-10 flex flex-col h-70" }, /* @__PURE__ */ import_react89.default.createElement("div", { className: "flex items-center p-0.5 mb-6" }, /* @__PURE__ */ import_react89.default.createElement("span", { className: "text-[14px] text-neutral-500 tracking-wide" }, stat.label)), /* @__PURE__ */ import_react89.default.createElement("div", { className: "text-6xl gradient-text md:text-[80px] font-light tracking-tighter text-black mt-auto leading-none" }, stat.value))))));
|
|
4797
5029
|
};
|
|
4798
5030
|
|
|
4799
5031
|
// src/components/ConsultantShowcase.tsx
|
|
4800
|
-
var
|
|
5032
|
+
var import_react90 = __toESM(require("react"));
|
|
4801
5033
|
var import_image12 = __toESM(require("next/image"));
|
|
4802
|
-
var
|
|
4803
|
-
var
|
|
5034
|
+
var import_react91 = require("@hugeicons/react");
|
|
5035
|
+
var import_core_free_icons33 = require("@hugeicons/core-free-icons");
|
|
4804
5036
|
var ImageWithLoader = ({ src, alt, className, sizes, priority = false }) => {
|
|
4805
|
-
const [isLoading, setIsLoading] = (0,
|
|
4806
|
-
return /* @__PURE__ */
|
|
5037
|
+
const [isLoading, setIsLoading] = (0, import_react90.useState)(true);
|
|
5038
|
+
return /* @__PURE__ */ import_react90.default.createElement("div", { className: `absolute inset-0 bg-neutral-800 ${className}` }, isLoading && /* @__PURE__ */ import_react90.default.createElement("div", { className: "absolute inset-0 flex items-center justify-center z-20 bg-neutral-800/50 backdrop-blur-md transition-opacity duration-300" }, /* @__PURE__ */ import_react90.default.createElement(import_react91.HugeiconsIcon, { icon: import_core_free_icons33.Loading03Icon, size: 24, className: "animate-spin text-white/50" })), /* @__PURE__ */ import_react90.default.createElement(
|
|
4807
5039
|
import_image12.default,
|
|
4808
5040
|
{
|
|
4809
5041
|
src,
|
|
@@ -4822,9 +5054,9 @@ var ImageWithLoader = ({ src, alt, className, sizes, priority = false }) => {
|
|
|
4822
5054
|
var ConsultantShowcase = ({
|
|
4823
5055
|
profiles
|
|
4824
5056
|
}) => {
|
|
4825
|
-
const [currentIndex, setCurrentIndex] = (0,
|
|
4826
|
-
const [touchStart, setTouchStart] = (0,
|
|
4827
|
-
const [touchEnd, setTouchEnd] = (0,
|
|
5057
|
+
const [currentIndex, setCurrentIndex] = (0, import_react90.useState)(0);
|
|
5058
|
+
const [touchStart, setTouchStart] = (0, import_react90.useState)(null);
|
|
5059
|
+
const [touchEnd, setTouchEnd] = (0, import_react90.useState)(null);
|
|
4828
5060
|
const nextSlide = () => {
|
|
4829
5061
|
setCurrentIndex((prev) => prev === profiles.length - 1 ? 0 : prev + 1);
|
|
4830
5062
|
};
|
|
@@ -4849,7 +5081,7 @@ var ConsultantShowcase = ({
|
|
|
4849
5081
|
}
|
|
4850
5082
|
};
|
|
4851
5083
|
if (!profiles || profiles.length === 0) return null;
|
|
4852
|
-
return /* @__PURE__ */
|
|
5084
|
+
return /* @__PURE__ */ import_react90.default.createElement("section", { className: "py-24 w-full flex justify-center px-4 md:px-8 z-10 relative" }, /* @__PURE__ */ import_react90.default.createElement("div", { className: "max-w-6xl w-full" }, /* @__PURE__ */ import_react90.default.createElement(
|
|
4853
5085
|
"div",
|
|
4854
5086
|
{
|
|
4855
5087
|
className: "relative w-full h-100 md:h-112.5 rounded-4xl overflow-hidden bg-neutral-900 group select-none",
|
|
@@ -4859,13 +5091,13 @@ var ConsultantShowcase = ({
|
|
|
4859
5091
|
},
|
|
4860
5092
|
profiles.map((profile, idx) => {
|
|
4861
5093
|
const isActive = idx === currentIndex;
|
|
4862
|
-
return /* @__PURE__ */
|
|
5094
|
+
return /* @__PURE__ */ import_react90.default.createElement(
|
|
4863
5095
|
"div",
|
|
4864
5096
|
{
|
|
4865
5097
|
key: profile.id,
|
|
4866
5098
|
className: `absolute inset-0 transition-opacity duration-700 ease-in-out ${isActive ? "opacity-100 z-10" : "opacity-0 z-0 pointer-events-none"}`
|
|
4867
5099
|
},
|
|
4868
|
-
/* @__PURE__ */
|
|
5100
|
+
/* @__PURE__ */ import_react90.default.createElement(
|
|
4869
5101
|
ImageWithLoader,
|
|
4870
5102
|
{
|
|
4871
5103
|
src: profile.imageSrc,
|
|
@@ -4873,14 +5105,14 @@ var ConsultantShowcase = ({
|
|
|
4873
5105
|
priority: idx === 0
|
|
4874
5106
|
}
|
|
4875
5107
|
),
|
|
4876
|
-
/* @__PURE__ */
|
|
4877
|
-
/* @__PURE__ */
|
|
4878
|
-
/* @__PURE__ */
|
|
5108
|
+
/* @__PURE__ */ import_react90.default.createElement("div", { className: "absolute inset-0 bg-black/20 z-10 pointer-events-none" }),
|
|
5109
|
+
/* @__PURE__ */ import_react90.default.createElement("div", { className: "absolute top-0 left-0 w-full h-[60%] bg-linear-to-b from-black/80 via-black/30 to-transparent z-20 pointer-events-none" }),
|
|
5110
|
+
/* @__PURE__ */ import_react90.default.createElement("div", { className: `absolute top-8 left-8 md:top-12 md:left-12 z-30 text-white max-w-lg transition-transform duration-700 ease-out ${isActive ? "translate-y-0" : "-translate-y-4"}` }, /* @__PURE__ */ import_react90.default.createElement("h2", { className: "text-[29px] tracking-tight mb-2 leading-none" }, profile.name), /* @__PURE__ */ import_react90.default.createElement("div", { className: "flex flex-col gap-0.5" }, /* @__PURE__ */ import_react90.default.createElement("p", { className: "text-[15px] text-white/80 font-light tracking-wide" }, profile.role), profile.description && /* @__PURE__ */ import_react90.default.createElement("p", { className: "text-[15px] text-white/80 font-light tracking-wide mt-1" }, profile.description)))
|
|
4879
5111
|
);
|
|
4880
5112
|
}),
|
|
4881
|
-
/* @__PURE__ */
|
|
4882
|
-
/* @__PURE__ */
|
|
4883
|
-
/* @__PURE__ */
|
|
5113
|
+
/* @__PURE__ */ import_react90.default.createElement("div", { className: "absolute top-0 left-0 w-[20%] h-full z-40 cursor-w-resize hidden md:block", onClick: prevSlide, "aria-label": "Previous image" }),
|
|
5114
|
+
/* @__PURE__ */ import_react90.default.createElement("div", { className: "absolute top-0 right-0 w-[20%] h-full z-40 cursor-e-resize hidden md:block", onClick: nextSlide, "aria-label": "Next image" }),
|
|
5115
|
+
/* @__PURE__ */ import_react90.default.createElement("div", { className: "absolute bottom-6 md:bottom-8 left-0 w-full px-4 z-30 flex justify-center items-center gap-2" }, profiles.map((_, idx) => /* @__PURE__ */ import_react90.default.createElement(
|
|
4884
5116
|
"button",
|
|
4885
5117
|
{
|
|
4886
5118
|
key: idx,
|
|
@@ -4893,10 +5125,10 @@ var ConsultantShowcase = ({
|
|
|
4893
5125
|
};
|
|
4894
5126
|
|
|
4895
5127
|
// src/components/ContentGridBlock.tsx
|
|
4896
|
-
var
|
|
5128
|
+
var import_react92 = __toESM(require("react"));
|
|
4897
5129
|
var import_image13 = __toESM(require("next/image"));
|
|
4898
|
-
var
|
|
4899
|
-
var
|
|
5130
|
+
var import_react93 = require("@hugeicons/react");
|
|
5131
|
+
var import_core_free_icons34 = require("@hugeicons/core-free-icons");
|
|
4900
5132
|
var ContentGridBlock = ({
|
|
4901
5133
|
header,
|
|
4902
5134
|
leftCard,
|
|
@@ -4904,23 +5136,23 @@ var ContentGridBlock = ({
|
|
|
4904
5136
|
middleBottomCard,
|
|
4905
5137
|
rightCards
|
|
4906
5138
|
}) => {
|
|
4907
|
-
return /* @__PURE__ */
|
|
5139
|
+
return /* @__PURE__ */ import_react92.default.createElement("section", { className: " w-full flex justify-center z-10 relative" }, /* @__PURE__ */ import_react92.default.createElement("div", { className: "max-w-300 w-full px-4 md:px-8 flex flex-col gap-12" }, /* @__PURE__ */ import_react92.default.createElement("div", { className: "flex flex-col lg:flex-row justify-between items-start lg:items-end gap-6 w-full" }, /* @__PURE__ */ import_react92.default.createElement("h2", { className: "text-3xl tracking-tight text-black leading-[1.15] max-w-lg" }, header.titlePrefix, " ", /* @__PURE__ */ import_react92.default.createElement("span", { className: "gradient-text" }, header.highlightText))), /* @__PURE__ */ import_react92.default.createElement("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6" }, /* @__PURE__ */ import_react92.default.createElement("div", { className: "flex flex-col justify-end" }, /* @__PURE__ */ import_react92.default.createElement("div", { className: "bg-black rounded-3xl p-8 flex flex-col h-80" }, /* @__PURE__ */ import_react92.default.createElement("p", { className: "text-[17px] text-white leading-snug mb-4" }, leftCard.mainText), leftCard.tag && /* @__PURE__ */ import_react92.default.createElement("span", { className: "mb-auto text-[11px] text-neutral-200 tracking-widest" }, leftCard.tag), /* @__PURE__ */ import_react92.default.createElement("div", { className: "flex items-center justify-between mt-8" }, /* @__PURE__ */ import_react92.default.createElement("div", null, /* @__PURE__ */ import_react92.default.createElement("h4", { className: "text-[15px] text-white" }, leftCard.title), /* @__PURE__ */ import_react92.default.createElement("p", { className: "text-[13px] text-neutral-300" }, leftCard.subtitle)), /* @__PURE__ */ import_react92.default.createElement("div", { className: "w-10 h-10 rounded-full overflow-hidden relative" }, /* @__PURE__ */ import_react92.default.createElement(import_image13.default, { src: leftCard.thumbnailSrc, alt: leftCard.title, fill: true, className: "object-cover" }))))), /* @__PURE__ */ import_react92.default.createElement("div", { className: "flex flex-col gap-6" }, /* @__PURE__ */ import_react92.default.createElement("div", { className: "bg-white rounded-3xl p-8 flex flex-col relative h-75" }, /* @__PURE__ */ import_react92.default.createElement("div", { className: "absolute top-6 right-6 flex flex-col items-end gap-1" }, /* @__PURE__ */ import_react92.default.createElement("span", { className: "text-[11px] text-neutral-400 tracking-wide" }, middleTopCard.topRightLabel), /* @__PURE__ */ import_react92.default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ import_react92.default.createElement("div", { className: "flex -space-x-2" }, middleTopCard.topRightAvatars.map((src, i) => /* @__PURE__ */ import_react92.default.createElement("div", { key: i, className: "w-7 h-7 rounded-full border-2 border-white overflow-hidden relative z-10" }, /* @__PURE__ */ import_react92.default.createElement(import_image13.default, { src, alt: "Avatar", fill: true, className: "object-cover", sizes: "28px" })))), /* @__PURE__ */ import_react92.default.createElement("span", { className: "text-sm text-neutral-500" }, middleTopCard.topRightCount))), /* @__PURE__ */ import_react92.default.createElement("div", { className: "grow flex flex-col justify-center items-center py-6" }, /* @__PURE__ */ import_react92.default.createElement("div", { className: "px-5 py-2 rounded-full bg-neutral-50/50 border border-neutral-100 text-[13px] text-neutral-600" }, middleTopCard.badgePrefix, " ", /* @__PURE__ */ import_react92.default.createElement("span", { className: " text-black" }, middleTopCard.badgeHighlight), middleTopCard.badgeSuffix)), /* @__PURE__ */ import_react92.default.createElement("div", { className: "mt-auto" }, /* @__PURE__ */ import_react92.default.createElement("p", { className: "text-[11px] text-neutral-400 tracking-wide mb-1" }, middleTopCard.title), /* @__PURE__ */ import_react92.default.createElement("p", { className: "text-[14px] text-black leading-snug pr-4" }, middleTopCard.description))), /* @__PURE__ */ import_react92.default.createElement("div", { className: "bg-white rounded-3xl p-8 flex flex-col h-80" }, /* @__PURE__ */ import_react92.default.createElement("div", { className: "flex justify-between items-start mb-6" }, /* @__PURE__ */ import_react92.default.createElement("div", null, /* @__PURE__ */ import_react92.default.createElement("h4", { className: "text-[15px] text-black leading-tight" }, middleBottomCard.title), /* @__PURE__ */ import_react92.default.createElement("p", { className: "text-[13px] text-neutral-400" }, middleBottomCard.subtitle)), /* @__PURE__ */ import_react92.default.createElement("div", { className: "w-10 h-10 rounded-full overflow-hidden relative" }, /* @__PURE__ */ import_react92.default.createElement(import_image13.default, { src: middleBottomCard.thumbnailSrc, alt: middleBottomCard.title, fill: true, className: "object-cover" }))), /* @__PURE__ */ import_react92.default.createElement("div", { className: "mt-auto" }, /* @__PURE__ */ import_react92.default.createElement("p", { className: "text-[16px] text-black leading-snug mb-4" }, middleBottomCard.mainText), middleBottomCard.tag && /* @__PURE__ */ import_react92.default.createElement("span", { className: "text-[11px] text-neutral-400 tracking-widest" }, middleBottomCard.tag)))), /* @__PURE__ */ import_react92.default.createElement("div", { className: "flex flex-col gap-6" }, rightCards.slice(0, 2).map((card, idx) => /* @__PURE__ */ import_react92.default.createElement("div", { key: idx, className: "relative w-full h-80 bg-[#2027d7] rounded-3xl overflow-hidden group" }, /* @__PURE__ */ import_react92.default.createElement("div", { className: "absolute inset-0 z-20 pointer-events-none" }), /* @__PURE__ */ import_react92.default.createElement("div", { className: "absolute inset-0 z-30 p-6 flex flex-col justify-end text-white" }, /* @__PURE__ */ import_react92.default.createElement("p", { className: "text-[14px] leading-snug mb-3 pr-2 text-white/90" }, card.mainText), card.tag && /* @__PURE__ */ import_react92.default.createElement("span", { className: "mb-4 text-[11px] text-white/50 tracking-widest" }, card.tag), /* @__PURE__ */ import_react92.default.createElement("div", { className: "pt-3" }, /* @__PURE__ */ import_react92.default.createElement("h4", { className: "text-[15px] tracking-wide" }, card.title), /* @__PURE__ */ import_react92.default.createElement("p", { className: "text-[13px] text-white/60" }, card.subtitle)))))))));
|
|
4908
5140
|
};
|
|
4909
5141
|
|
|
4910
5142
|
// src/components/UniversalAppDetails.tsx
|
|
4911
|
-
var
|
|
4912
|
-
var
|
|
4913
|
-
var
|
|
5143
|
+
var import_react94 = __toESM(require("react"));
|
|
5144
|
+
var import_react95 = require("@hugeicons/react");
|
|
5145
|
+
var import_core_free_icons35 = require("@hugeicons/core-free-icons");
|
|
4914
5146
|
var ScreenshotCard = ({ src, alt, onClick }) => {
|
|
4915
|
-
const [isLoading, setIsLoading] = (0,
|
|
4916
|
-
return /* @__PURE__ */
|
|
5147
|
+
const [isLoading, setIsLoading] = (0, import_react94.useState)(true);
|
|
5148
|
+
return /* @__PURE__ */ import_react94.default.createElement(
|
|
4917
5149
|
"button",
|
|
4918
5150
|
{
|
|
4919
5151
|
onClick,
|
|
4920
5152
|
className: "relative w-28 sm:w-32 aspect-9/19 shrink-0 rounded-2xl overflow-hidden bg-neutral-100 border border-neutral-200/50 outline-none hover:opacity-90 transition-opacity"
|
|
4921
5153
|
},
|
|
4922
|
-
isLoading && /* @__PURE__ */
|
|
4923
|
-
/* @__PURE__ */
|
|
5154
|
+
isLoading && /* @__PURE__ */ import_react94.default.createElement("div", { className: "absolute inset-0 flex items-center justify-center z-10 bg-neutral-50/50" }, /* @__PURE__ */ import_react94.default.createElement(import_react95.HugeiconsIcon, { icon: import_core_free_icons35.Loading03Icon, size: 24, className: "animate-spin text-neutral-400" })),
|
|
5155
|
+
/* @__PURE__ */ import_react94.default.createElement(
|
|
4924
5156
|
"img",
|
|
4925
5157
|
{
|
|
4926
5158
|
src,
|
|
@@ -4933,8 +5165,8 @@ var ScreenshotCard = ({ src, alt, onClick }) => {
|
|
|
4933
5165
|
);
|
|
4934
5166
|
};
|
|
4935
5167
|
var LightboxImage = ({ src }) => {
|
|
4936
|
-
const [isLoading, setIsLoading] = (0,
|
|
4937
|
-
return /* @__PURE__ */
|
|
5168
|
+
const [isLoading, setIsLoading] = (0, import_react94.useState)(true);
|
|
5169
|
+
return /* @__PURE__ */ import_react94.default.createElement("div", { className: "relative w-full h-full flex items-center justify-center p-4" }, isLoading && /* @__PURE__ */ import_react94.default.createElement("div", { className: "absolute inset-0 flex items-center justify-center z-10" }, /* @__PURE__ */ import_react94.default.createElement(import_react95.HugeiconsIcon, { icon: import_core_free_icons35.Loading03Icon, size: 32, className: "animate-spin text-white" })), /* @__PURE__ */ import_react94.default.createElement(
|
|
4938
5170
|
"img",
|
|
4939
5171
|
{
|
|
4940
5172
|
src,
|
|
@@ -4945,9 +5177,9 @@ var LightboxImage = ({ src }) => {
|
|
|
4945
5177
|
));
|
|
4946
5178
|
};
|
|
4947
5179
|
var UniversalAppDetails = ({ app, onBack }) => {
|
|
4948
|
-
const [isLogoLoading, setIsLogoLoading] = (0,
|
|
4949
|
-
const [isDescExpanded, setIsDescExpanded] = (0,
|
|
4950
|
-
const [lightboxIndex, setLightboxIndex] = (0,
|
|
5180
|
+
const [isLogoLoading, setIsLogoLoading] = (0, import_react94.useState)(true);
|
|
5181
|
+
const [isDescExpanded, setIsDescExpanded] = (0, import_react94.useState)(false);
|
|
5182
|
+
const [lightboxIndex, setLightboxIndex] = (0, import_react94.useState)(null);
|
|
4951
5183
|
const MAX_DESC_LENGTH = 150;
|
|
4952
5184
|
const isDescLong = app.description.length > MAX_DESC_LENGTH;
|
|
4953
5185
|
const displayDesc = isDescExpanded || !isDescLong ? app.description : `${app.description.substring(0, MAX_DESC_LENGTH)}...`;
|
|
@@ -4961,7 +5193,7 @@ var UniversalAppDetails = ({ app, onBack }) => {
|
|
|
4961
5193
|
setLightboxIndex(lightboxIndex === app.screenshots.length - 1 ? 0 : lightboxIndex + 1);
|
|
4962
5194
|
}
|
|
4963
5195
|
};
|
|
4964
|
-
return /* @__PURE__ */
|
|
5196
|
+
return /* @__PURE__ */ import_react94.default.createElement("div", { className: "w-full max-w-3xl mx-auto pt-10 pb-20 px-6 min-h-screen flex flex-col items-center" }, /* @__PURE__ */ import_react94.default.createElement("div", { className: "flex flex-col sm:flex-row items-start gap-4 w-full mb-10 text-left" }, /* @__PURE__ */ import_react94.default.createElement("div", { className: "relative w-20 h-20 sm:w-20 sm:h-20 md:w-24 md:h-24 lg:w-28 lg:h-28 shrink-0 rounded-2xl overflow-hidden flex items-center justify-center border border-neutral-100/50 bg-neutral-50" }, isLogoLoading && /* @__PURE__ */ import_react94.default.createElement("div", { className: "absolute inset-0 flex items-center justify-center z-10 bg-neutral-100 animate-pulse" }), /* @__PURE__ */ import_react94.default.createElement(
|
|
4965
5197
|
"img",
|
|
4966
5198
|
{
|
|
4967
5199
|
src: app.logoSrc,
|
|
@@ -4969,15 +5201,15 @@ var UniversalAppDetails = ({ app, onBack }) => {
|
|
|
4969
5201
|
onLoad: () => setIsLogoLoading(false),
|
|
4970
5202
|
className: `w-full h-full object-cover transition-opacity duration-300 z-20 ${isLogoLoading ? "opacity-0" : "opacity-100"}`
|
|
4971
5203
|
}
|
|
4972
|
-
)), /* @__PURE__ */
|
|
5204
|
+
)), /* @__PURE__ */ import_react94.default.createElement("div", { className: "flex flex-col justify-center pt-1 min-w-0" }, /* @__PURE__ */ import_react94.default.createElement("h1", { className: "text-xl text-black leading-tight mb-1 " }, /* @__PURE__ */ import_react94.default.createElement("span", { className: "block truncate" }, app.name)), /* @__PURE__ */ import_react94.default.createElement("span", { className: "text-xs mt-1 text-neutral-400 truncate max-w-full" }, app.tagline), /* @__PURE__ */ import_react94.default.createElement("div", { className: "flex flex-wrap items-center mt-4 gap-8 w-full" }, /* @__PURE__ */ import_react94.default.createElement("div", { className: "flex flex-col items-center" }, /* @__PURE__ */ import_react94.default.createElement("div", { className: "flex items-center gap-1.5 h-6 text-neutral-800" }, app.platforms.android && /* @__PURE__ */ import_react94.default.createElement(import_react95.HugeiconsIcon, { icon: import_core_free_icons35.AndroidIcon, size: 18 }), app.platforms.ios && /* @__PURE__ */ import_react94.default.createElement(import_react95.HugeiconsIcon, { icon: import_core_free_icons35.AppleIcon, size: 18 })), /* @__PURE__ */ import_react94.default.createElement("span", { className: "text-[10px] text-neutral-400 mt-1" }, "Platforms")), /* @__PURE__ */ import_react94.default.createElement("div", { className: "flex flex-col items-center" }, /* @__PURE__ */ import_react94.default.createElement("span", { className: "text-sm h-6 flex items-center text-neutral-800 truncate" }, app.stats.type), /* @__PURE__ */ import_react94.default.createElement("span", { className: "text-[10px] text-neutral-400 mt-1" }, "Type")), /* @__PURE__ */ import_react94.default.createElement("div", { className: "flex flex-col items-center" }, /* @__PURE__ */ import_react94.default.createElement("span", { className: "text-sm h-6 flex items-center text-neutral-800 truncate" }, app.stats.size), /* @__PURE__ */ import_react94.default.createElement("span", { className: "text-[10px] text-neutral-400 mt-1" }, "Size"))))), /* @__PURE__ */ import_react94.default.createElement("div", { className: "flex flex-col sm:flex-row gap-4 items-center w-full mx-auto mb-12" }, app.ctaText && app.ctaHref && /* @__PURE__ */ import_react94.default.createElement("div", { className: "w-full sm:w-60 flex justify-center *:w-full" }, /* @__PURE__ */ import_react94.default.createElement(ThreeDButton, { href: app.ctaHref }, /* @__PURE__ */ import_react94.default.createElement("span", { className: "flex items-center justify-center gap-2" }, /* @__PURE__ */ import_react94.default.createElement(import_react95.HugeiconsIcon, { icon: import_core_free_icons35.Download01Icon, size: 16 }), app.ctaText))), app.secondaryCtaText && app.secondaryCtaHref && /* @__PURE__ */ import_react94.default.createElement(
|
|
4973
5205
|
"a",
|
|
4974
5206
|
{
|
|
4975
5207
|
href: app.secondaryCtaHref,
|
|
4976
5208
|
className: "w-full sm:w-60 inline-flex items-center justify-center gap-2 text-[11px] tracking-widest rounded-full px-8 py-2.5 border border-neutral-100 text-center text-black hover:bg-neutral-50 outline-none transition-colors"
|
|
4977
5209
|
},
|
|
4978
|
-
/* @__PURE__ */
|
|
5210
|
+
/* @__PURE__ */ import_react94.default.createElement(import_react95.HugeiconsIcon, { icon: import_core_free_icons35.Bookmark02Icon, size: 16 }),
|
|
4979
5211
|
app.secondaryCtaText
|
|
4980
|
-
)), /* @__PURE__ */
|
|
5212
|
+
)), /* @__PURE__ */ import_react94.default.createElement("div", { className: "w-full mb-12" }, /* @__PURE__ */ import_react94.default.createElement("h2", { className: "text-xl text-black mb-4" }, "About"), /* @__PURE__ */ import_react94.default.createElement("div", { className: "flex gap-3 overflow-x-auto pb-4 scrollbar-hide -mx-6 px-6" }, app.screenshots.map((src, idx) => /* @__PURE__ */ import_react94.default.createElement(
|
|
4981
5213
|
ScreenshotCard,
|
|
4982
5214
|
{
|
|
4983
5215
|
key: idx,
|
|
@@ -4985,43 +5217,43 @@ var UniversalAppDetails = ({ app, onBack }) => {
|
|
|
4985
5217
|
alt: `${app.name} Screenshot ${idx + 1}`,
|
|
4986
5218
|
onClick: () => setLightboxIndex(idx)
|
|
4987
5219
|
}
|
|
4988
|
-
))), /* @__PURE__ */
|
|
5220
|
+
))), /* @__PURE__ */ import_react94.default.createElement("div", { className: "flex items-end text-neutral-500 text-sm leading-relaxed mt-2" }, /* @__PURE__ */ import_react94.default.createElement("p", { className: "flex-1 whitespace-pre-wrap" }, displayDesc), isDescLong && /* @__PURE__ */ import_react94.default.createElement(
|
|
4989
5221
|
"button",
|
|
4990
5222
|
{
|
|
4991
5223
|
onClick: () => setIsDescExpanded(!isDescExpanded),
|
|
4992
5224
|
className: "ml-2 mb-0.5 text-neutral-400 hover:text-black transition-colors outline-none shrink-0"
|
|
4993
5225
|
},
|
|
4994
|
-
/* @__PURE__ */
|
|
4995
|
-
|
|
5226
|
+
/* @__PURE__ */ import_react94.default.createElement(
|
|
5227
|
+
import_react95.HugeiconsIcon,
|
|
4996
5228
|
{
|
|
4997
|
-
icon:
|
|
5229
|
+
icon: import_core_free_icons35.ArrowDown01Icon,
|
|
4998
5230
|
size: 18,
|
|
4999
5231
|
className: `transform transition-transform ${isDescExpanded ? "rotate-180" : ""}`
|
|
5000
5232
|
}
|
|
5001
5233
|
)
|
|
5002
|
-
))), lightboxIndex !== null && /* @__PURE__ */
|
|
5234
|
+
))), lightboxIndex !== null && /* @__PURE__ */ import_react94.default.createElement("div", { className: "fixed inset-0 z-50 bg-black/30 flex flex-col" }, /* @__PURE__ */ import_react94.default.createElement("div", { className: "w-full p-4 sm:p-6 flex justify-end" }, /* @__PURE__ */ import_react94.default.createElement(
|
|
5003
5235
|
"button",
|
|
5004
5236
|
{
|
|
5005
5237
|
onClick: () => setLightboxIndex(null),
|
|
5006
5238
|
className: "p-3 text-white bg-white/30 rounded-full transition-colors outline-none"
|
|
5007
5239
|
},
|
|
5008
|
-
/* @__PURE__ */
|
|
5009
|
-
)), /* @__PURE__ */
|
|
5240
|
+
/* @__PURE__ */ import_react94.default.createElement(import_react95.HugeiconsIcon, { icon: import_core_free_icons35.Cancel01Icon, size: 24 })
|
|
5241
|
+
)), /* @__PURE__ */ import_react94.default.createElement("div", { className: "flex-1 flex items-center justify-between px-4 sm:px-10 pb-10" }, /* @__PURE__ */ import_react94.default.createElement("button", { onClick: handlePrev, className: "p-3 text-white bg-white/30 rounded-full" }, /* @__PURE__ */ import_react94.default.createElement(import_react95.HugeiconsIcon, { icon: import_core_free_icons35.ArrowLeft01Icon, size: 24 })), /* @__PURE__ */ import_react94.default.createElement("div", { className: "flex-1 h-full max-h-[80vh]" }, /* @__PURE__ */ import_react94.default.createElement(LightboxImage, { src: app.screenshots[lightboxIndex] })), /* @__PURE__ */ import_react94.default.createElement("button", { onClick: handleNext, className: "p-3 text-white bg-white/30 rounded-full" }, /* @__PURE__ */ import_react94.default.createElement(import_react95.HugeiconsIcon, { icon: import_core_free_icons35.ArrowRight01Icon, size: 24 }))), /* @__PURE__ */ import_react94.default.createElement("div", { className: "sm:hidden flex justify-between px-8 pb-12 w-full" }, /* @__PURE__ */ import_react94.default.createElement("button", { onClick: handlePrev, className: "p-3 text-white bg-white/30 rounded-full" }, /* @__PURE__ */ import_react94.default.createElement(import_react95.HugeiconsIcon, { icon: import_core_free_icons35.ArrowLeft01Icon, size: 24 })), /* @__PURE__ */ import_react94.default.createElement("button", { onClick: handleNext, className: "p-3 text-white bg-white/30 rounded-full" }, /* @__PURE__ */ import_react94.default.createElement(import_react95.HugeiconsIcon, { icon: import_core_free_icons35.ArrowRight01Icon, size: 24 })))));
|
|
5010
5242
|
};
|
|
5011
5243
|
|
|
5012
5244
|
// src/components/UniversalAppCategoryGrid.tsx
|
|
5013
|
-
var
|
|
5014
|
-
var
|
|
5015
|
-
var
|
|
5245
|
+
var import_react96 = __toESM(require("react"));
|
|
5246
|
+
var import_react97 = require("@hugeicons/react");
|
|
5247
|
+
var import_core_free_icons36 = require("@hugeicons/core-free-icons");
|
|
5016
5248
|
var AppGridCard = ({ app }) => {
|
|
5017
|
-
const [isLoading, setIsLoading] = (0,
|
|
5018
|
-
return /* @__PURE__ */
|
|
5249
|
+
const [isLoading, setIsLoading] = (0, import_react96.useState)(true);
|
|
5250
|
+
return /* @__PURE__ */ import_react96.default.createElement(
|
|
5019
5251
|
"button",
|
|
5020
5252
|
{
|
|
5021
5253
|
onClick: app.onClick,
|
|
5022
5254
|
className: "flex flex-col gap-3 group cursor-pointer w-25 text-left outline-none"
|
|
5023
5255
|
},
|
|
5024
|
-
/* @__PURE__ */
|
|
5256
|
+
/* @__PURE__ */ import_react96.default.createElement("div", { className: "relative w-full aspect-square rounded-2xl bg-white overflow-hidden transition-all duration-300 flex items-center justify-center" }, isLoading && /* @__PURE__ */ import_react96.default.createElement("div", { className: "absolute inset-0 flex items-center justify-center z-10 bg-neutral-50/50" }, /* @__PURE__ */ import_react96.default.createElement(import_react97.HugeiconsIcon, { icon: import_core_free_icons36.Loading03Icon, size: 24, className: "animate-spin text-neutral-400" })), /* @__PURE__ */ import_react96.default.createElement(
|
|
5025
5257
|
"img",
|
|
5026
5258
|
{
|
|
5027
5259
|
src: app.logoSrc,
|
|
@@ -5031,7 +5263,7 @@ var AppGridCard = ({ app }) => {
|
|
|
5031
5263
|
className: `w-full h-full object-cover transition-all duration-700 ease-out z-20 ${isLoading ? "opacity-0 scale-95 blur-md" : "opacity-100 scale-100 blur-0"}`
|
|
5032
5264
|
}
|
|
5033
5265
|
)),
|
|
5034
|
-
/* @__PURE__ */
|
|
5266
|
+
/* @__PURE__ */ import_react96.default.createElement("div", { className: "flex flex-col min-w-0 px-1" }, /* @__PURE__ */ import_react96.default.createElement("span", { className: "text-[13px] text-black tracking-tight truncate group-hover:text-neutral-600 transition-colors" }, app.name), /* @__PURE__ */ import_react96.default.createElement("span", { className: "text-[10px] text-neutral-500 tracking-wide truncate mt-0.5" }, app.category))
|
|
5035
5267
|
);
|
|
5036
5268
|
};
|
|
5037
5269
|
var UniversalAppCategoryGrid = ({
|
|
@@ -5039,7 +5271,7 @@ var UniversalAppCategoryGrid = ({
|
|
|
5039
5271
|
categoryTitle,
|
|
5040
5272
|
apps
|
|
5041
5273
|
}) => {
|
|
5042
|
-
return /* @__PURE__ */
|
|
5274
|
+
return /* @__PURE__ */ import_react96.default.createElement("div", { className: "w-full py-16" }, /* @__PURE__ */ import_react96.default.createElement("div", { className: "w-full flex justify-center px-4" }, /* @__PURE__ */ import_react96.default.createElement("div", { className: "max-w-6xl w-full" }, /* @__PURE__ */ import_react96.default.createElement("div", { className: "relative overflow-hidden mb-12 text-left" }, /* @__PURE__ */ import_react96.default.createElement("div", { className: "relative z-10" }, tagline && /* @__PURE__ */ import_react96.default.createElement("span", { className: "text-[11px] tracking-[0.4em] text-neutral-500 block mb-4 " }, tagline), categoryTitle && /* @__PURE__ */ import_react96.default.createElement("h2", { className: "text-2xl sm:text-3xl tracking-tight text-black leading-[1.1]" }, categoryTitle))), /* @__PURE__ */ import_react96.default.createElement("div", { className: "grid grid-cols-3 sm:grid-cols-4 md:grid-cols-6 lg:grid-cols-8 gap-4 sm:gap-6 px-1" }, apps.map((app) => /* @__PURE__ */ import_react96.default.createElement(AppGridCard, { key: app.id, app }))))));
|
|
5043
5275
|
};
|
|
5044
5276
|
// Annotate the CommonJS export names for ESM import in node:
|
|
5045
5277
|
0 && (module.exports = {
|
|
@@ -5097,6 +5329,7 @@ var UniversalAppCategoryGrid = ({
|
|
|
5097
5329
|
UniversalProfileSettings,
|
|
5098
5330
|
UniversalRegistrationFlow,
|
|
5099
5331
|
UniversalSidebar,
|
|
5332
|
+
UniversalTransactionPage,
|
|
5100
5333
|
UniversalTrashView,
|
|
5101
5334
|
ZairusAuth,
|
|
5102
5335
|
ZairusShareCard
|