@retinalabsllc/zairusjs 21.2.2 → 21.2.5

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.mjs CHANGED
@@ -606,7 +606,7 @@ var ReusableOptions = ({
606
606
  const filteredOptions = options.filter(
607
607
  (opt) => opt.toLowerCase().includes(searchQuery.toLowerCase())
608
608
  );
609
- return /* @__PURE__ */ React8.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ React8.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: onClose }), /* @__PURE__ */ React8.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 max-h-[80vh]" }, /* @__PURE__ */ React8.createElement("div", { className: "flex items-center justify-between p-5 shrink-0 " }, /* @__PURE__ */ React8.createElement("h3", { className: "text-lg text-black tracking-tight" }, title), /* @__PURE__ */ React8.createElement("button", { onClick: onClose, className: "text-stone-400 hover:text-black transition-colors outline-none" }, /* @__PURE__ */ React8.createElement(HugeiconsIcon4, { icon: CancelCircleIcon, size: 18 }))), showSearch && /* @__PURE__ */ React8.createElement("div", { className: "p-4 shrink-0 " }, /* @__PURE__ */ React8.createElement("div", { className: "relative w-full" }, /* @__PURE__ */ React8.createElement("div", { className: "absolute inset-y-0 left-0 pl-4 flex items-center pointer-events-none" }, /* @__PURE__ */ React8.createElement(HugeiconsIcon4, { icon: Search01Icon, size: 16, className: "text-stone-400" })), /* @__PURE__ */ React8.createElement(
609
+ return /* @__PURE__ */ React8.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ React8.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: onClose }), /* @__PURE__ */ React8.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 max-h-[80vh]" }, /* @__PURE__ */ React8.createElement("div", { className: "flex items-center justify-between p-5 shrink-0" }, /* @__PURE__ */ React8.createElement("h3", { className: "text-lg text-black tracking-tight" }, title), /* @__PURE__ */ React8.createElement("button", { onClick: onClose, className: "text-stone-400 hover:text-black transition-colors outline-none" }, /* @__PURE__ */ React8.createElement(HugeiconsIcon4, { icon: CancelCircleIcon, size: 18 }))), showSearch && /* @__PURE__ */ React8.createElement("div", { className: "p-4 shrink-0" }, /* @__PURE__ */ React8.createElement("div", { className: "relative w-full" }, /* @__PURE__ */ React8.createElement("div", { className: "absolute inset-y-0 left-0 pl-4 flex items-center pointer-events-none" }, /* @__PURE__ */ React8.createElement(HugeiconsIcon4, { icon: Search01Icon, size: 16, className: "text-stone-400" })), /* @__PURE__ */ React8.createElement(
610
610
  "input",
611
611
  {
612
612
  type: "text",
@@ -621,15 +621,19 @@ var ReusableOptions = ({
621
621
  "button",
622
622
  {
623
623
  key: opt,
624
- onClick: () => {
625
- onSelect(opt);
626
- onClose();
627
- },
624
+ onClick: () => onSelect(opt),
628
625
  className: `w-full text-left p-4 text-xs tracking-tight rounded-full transition-colors outline-none ${isSelected ? "text-[#d97757] bg-[#d97757]/10" : "text-stone-600 hover:bg-stone-50/50"}`
629
626
  },
630
627
  opt.charAt(0).toUpperCase() + opt.slice(1).toLowerCase()
631
628
  );
632
- }))));
629
+ })), /* @__PURE__ */ React8.createElement("div", { className: "p-4 flex items-center justify-end shrink-0 bg-white " }, /* @__PURE__ */ React8.createElement(
630
+ "button",
631
+ {
632
+ onClick: onClose,
633
+ className: "text-[#d97757] outline-none text-sm tracking-wide hover:opacity-80 transition-opacity"
634
+ },
635
+ "Done"
636
+ ))));
633
637
  };
634
638
 
635
639
  // src/components/CalendarPicker.tsx
@@ -6473,9 +6477,31 @@ import {
6473
6477
  ArrowRight01Icon as ArrowRight01Icon17,
6474
6478
  CancelCircleIcon as CancelCircleIcon14,
6475
6479
  ArrowUpRight01Icon as ArrowUpRight01Icon4,
6476
- Robot01Icon as Robot01Icon2
6480
+ Robot01Icon as Robot01Icon2,
6481
+ Logout01Icon as Logout01Icon2
6477
6482
  } from "@hugeicons/core-free-icons";
6483
+ var OrgAvatar3 = ({ src, sizeClass = "w-10 h-10" }) => {
6484
+ const [loaded, setLoaded] = useState40(false);
6485
+ const [error, setError] = useState40(false);
6486
+ const defaultAvatar = "https://storage.googleapis.com/retina-cloud-v2/assets/images/office_a.avif";
6487
+ const finalSrc = error || !src ? defaultAvatar : src;
6488
+ return /* @__PURE__ */ React56.createElement("div", { className: `relative shrink-0 ${sizeClass}` }, /* @__PURE__ */ React56.createElement("div", { className: "w-full h-full rounded-lg bg-stone-100 flex items-center justify-center overflow-hidden" }, !loaded && !error && /* @__PURE__ */ React56.createElement(HugeiconsIcon42, { icon: Loading03Icon30, className: "animate-spin text-stone-400 absolute", size: 14 }), /* @__PURE__ */ React56.createElement(
6489
+ "img",
6490
+ {
6491
+ src: finalSrc,
6492
+ alt: "Workspace Avatar",
6493
+ className: `w-full h-full object-cover transition-opacity duration-300 ${loaded || error ? "opacity-100" : "opacity-0"}`,
6494
+ onLoad: () => setLoaded(true),
6495
+ onError: () => setError(true)
6496
+ }
6497
+ )));
6498
+ };
6478
6499
  var UniversalHome3 = ({
6500
+ avatarSrc,
6501
+ organizations = [],
6502
+ activeOrgId,
6503
+ onOrganizationSelect,
6504
+ onLogout,
6479
6505
  createApplicationAction,
6480
6506
  checkApplicationAction,
6481
6507
  notifications = [],
@@ -6489,10 +6515,16 @@ var UniversalHome3 = ({
6489
6515
  customContent,
6490
6516
  applicationsProps
6491
6517
  }) => {
6518
+ const [isAvatarLoaded, setIsAvatarLoaded] = useState40(false);
6519
+ const [showOrgSwitcher, setShowOrgSwitcher] = useState40(false);
6492
6520
  const [showNotifDialog, setShowNotifDialog] = useState40(false);
6493
6521
  const [selectedNotif, setSelectedNotif] = useState40(null);
6494
6522
  const [isResolving, setIsResolving] = useState40(false);
6523
+ const [showLogoutConfirm, setShowLogoutConfirm] = useState40(false);
6524
+ const [isLoggingOut, setIsLoggingOut] = useState40(false);
6495
6525
  const router = useRouter5();
6526
+ const fallbackAvatarUrl = "https://storage.googleapis.com/retina-cloud-v2/assets/images/avatar.avif";
6527
+ const finalAvatarSrc = avatarSrc || fallbackAvatarUrl;
6496
6528
  const hasUnreadNotifs = notifications.some((n) => !n.isRead);
6497
6529
  const handleResolve = async (resolution) => {
6498
6530
  if (!onResolveInvite || !selectedNotif) return;
@@ -6505,7 +6537,39 @@ var UniversalHome3 = ({
6505
6537
  setIsResolving(false);
6506
6538
  }
6507
6539
  };
6508
- return /* @__PURE__ */ React56.createElement("div", { className: "w-full max-w-4xl mx-auto flex flex-col animate-in fade-in duration-300 relative" }, /* @__PURE__ */ React56.createElement("div", { className: "flex items-center justify-between w-full pb-4" }, /* @__PURE__ */ React56.createElement("div", { className: "flex items-center gap-3" }), /* @__PURE__ */ React56.createElement("div", { className: "flex items-center gap-2 shrink-0" }, /* @__PURE__ */ React56.createElement(
6540
+ const confirmLogout = async () => {
6541
+ setIsLoggingOut(true);
6542
+ try {
6543
+ if (onLogout) await onLogout();
6544
+ } catch (e) {
6545
+ toast17.error("Failed to log out cleanly.");
6546
+ } finally {
6547
+ setIsLoggingOut(false);
6548
+ setShowLogoutConfirm(false);
6549
+ }
6550
+ };
6551
+ return /* @__PURE__ */ React56.createElement("div", { className: "w-full max-w-4xl mx-auto flex flex-col animate-in fade-in duration-300 relative" }, /* @__PURE__ */ React56.createElement(
6552
+ ConfirmationDialog,
6553
+ {
6554
+ isOpen: showLogoutConfirm,
6555
+ title: "Log Out",
6556
+ message: "Are you sure you want to log out of your workspace?",
6557
+ confirmText: "Log Out",
6558
+ cancelText: "Cancel",
6559
+ isProcessing: isLoggingOut,
6560
+ isDestructive: true,
6561
+ onClose: () => setShowLogoutConfirm(false),
6562
+ onConfirm: confirmLogout
6563
+ }
6564
+ ), /* @__PURE__ */ React56.createElement("div", { className: "flex items-center justify-between w-full pb-4" }, /* @__PURE__ */ React56.createElement("div", { className: "w-10 h-10 shrink-0 cursor-pointer", onClick: () => setShowOrgSwitcher(true) }, /* @__PURE__ */ React56.createElement("div", { className: "relative w-full h-full rounded-lg overflow-hidden bg-white flex items-center justify-center" }, !isAvatarLoaded && /* @__PURE__ */ React56.createElement("div", { className: "absolute inset-0 flex items-center justify-center z-10 bg-white" }, /* @__PURE__ */ React56.createElement(HugeiconsIcon42, { icon: Loading03Icon30, size: 16, className: "animate-spin text-black" })), /* @__PURE__ */ React56.createElement(
6565
+ "img",
6566
+ {
6567
+ src: finalAvatarSrc,
6568
+ alt: "User Avatar",
6569
+ onLoad: () => setIsAvatarLoaded(true),
6570
+ className: `w-full h-full object-cover transition-opacity duration-300 ${isAvatarLoaded ? "opacity-100" : "opacity-0"}`
6571
+ }
6572
+ ))), /* @__PURE__ */ React56.createElement("div", { className: "flex items-center gap-2 shrink-0" }, /* @__PURE__ */ React56.createElement(
6509
6573
  "button",
6510
6574
  {
6511
6575
  onClick: () => router.push("/app/ai"),
@@ -6558,7 +6622,31 @@ var UniversalHome3 = ({
6558
6622
  {
6559
6623
  ...applicationsProps
6560
6624
  }
6561
- )), showNotifDialog && /* @__PURE__ */ React56.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ React56.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setShowNotifDialog(false) }), /* @__PURE__ */ React56.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 max-h-[80vh] h-auto" }, /* @__PURE__ */ React56.createElement("div", { className: "flex items-center justify-between p-5 shrink-0" }, selectedNotif ? /* @__PURE__ */ React56.createElement("button", { onClick: () => setSelectedNotif(null), disabled: isResolving, className: "text-[#d97757] hover:text-[#d97757] transition-colors outline-none flex items-center gap-2 text-xs tracking-widest disabled:opacity-50" }, /* @__PURE__ */ React56.createElement(HugeiconsIcon42, { icon: ArrowLeft01Icon22, size: 14 }), " Back") : /* @__PURE__ */ React56.createElement("h3", { className: "text-sm text-black tracking-tight flex items-center gap-2" }, "Notifications"), /* @__PURE__ */ React56.createElement("button", { onClick: () => setShowNotifDialog(false), disabled: isResolving, className: "text-stone-400 hover:text-black transition-colors outline-none disabled:opacity-50" }, /* @__PURE__ */ React56.createElement(HugeiconsIcon42, { icon: CancelCircleIcon14, size: 18 }))), /* @__PURE__ */ React56.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-2 relative" }, isNotifsLoading && !selectedNotif && /* @__PURE__ */ React56.createElement("div", { className: "absolute inset-0 z-10 flex items-center justify-center" }, /* @__PURE__ */ React56.createElement(HugeiconsIcon42, { icon: Loading03Icon30, size: 28, className: "animate-spin text-black" })), selectedNotif ? /* @__PURE__ */ React56.createElement("div", { className: "p-4 text-left" }, selectedNotif.type === "HUDDLE_INVITE" && selectedNotif.meta_json?.action === "RESOLVE_INVITE" && selectedNotif.meta_json?.completed ? /* @__PURE__ */ React56.createElement("div", { className: "" }) : /* @__PURE__ */ React56.createElement("h4", { className: "text-sm text-black mb-1" }, selectedNotif.title), /* @__PURE__ */ React56.createElement("span", { className: "text-xs text-stone-400 tracking-widest mb-4 block" }, formatNotifDate(selectedNotif.createdAt)), /* @__PURE__ */ React56.createElement("p", { className: "text-xs text-stone-600 leading-relaxed whitespace-pre-wrap" }, selectedNotif.message), selectedNotif.type === "HUDDLE_INVITE" && selectedNotif.meta_json?.action === "RESOLVE_INVITE" && /* @__PURE__ */ React56.createElement("div", { className: `mt-8 flex gap-3 pt-6 ${selectedNotif.meta_json?.completed ? "opacity-40 pointer-events-none cursor-not-allowed" : ""}` }, /* @__PURE__ */ React56.createElement(
6625
+ )), showOrgSwitcher && /* @__PURE__ */ React56.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ React56.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setShowOrgSwitcher(false) }), /* @__PURE__ */ React56.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 max-h-[80vh] h-auto" }, /* @__PURE__ */ React56.createElement("div", { className: "flex items-center justify-between p-5 shrink-0 " }, /* @__PURE__ */ React56.createElement("h3", { className: "text-sm text-black tracking-tight" }, "Switch Workspace"), /* @__PURE__ */ React56.createElement("button", { onClick: () => setShowOrgSwitcher(false), className: "text-stone-400 hover:text-black transition-colors outline-none" }, /* @__PURE__ */ React56.createElement(HugeiconsIcon42, { icon: CancelCircleIcon14, size: 18 }))), /* @__PURE__ */ React56.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-2" }, /* @__PURE__ */ React56.createElement("div", { className: "flex flex-col" }, organizations?.length === 0 ? /* @__PURE__ */ React56.createElement("div", { className: "p-8 text-center text-xs text-stone-400" }, "No organizations found.") : organizations?.map((org) => /* @__PURE__ */ React56.createElement(
6626
+ "button",
6627
+ {
6628
+ key: org.id,
6629
+ onClick: () => {
6630
+ onOrganizationSelect?.(org.id);
6631
+ setShowOrgSwitcher(false);
6632
+ },
6633
+ className: `p-4 flex items-center justify-between gap-3 cursor-pointer outline-none transition-colors border-b border-stone-50 last:border-0 ${activeOrgId === org.id ? "bg-stone-50" : "hover:bg-stone-50/50"}`
6634
+ },
6635
+ /* @__PURE__ */ React56.createElement(OrgAvatar3, { src: org.avatarUrl }),
6636
+ /* @__PURE__ */ React56.createElement("div", { className: "flex flex-col items-start min-w-0 flex-1" }, /* @__PURE__ */ React56.createElement("span", { className: `text-sm tracking-tight truncate w-full text-left ${activeOrgId === org.id ? "text-black " : "text-stone-600"}` }, org.name), /* @__PURE__ */ React56.createElement("span", { className: "text-xs text-stone-500 capitalize truncate w-full text-left mt-0.5" }, org.role?.toLowerCase() || "Member")),
6637
+ activeOrgId === org.id && /* @__PURE__ */ React56.createElement("div", { className: "w-2 h-2 rounded-full bg-[#d97757] shrink-0" })
6638
+ )))), /* @__PURE__ */ React56.createElement("div", { className: "p-4 shrink-0" }, /* @__PURE__ */ React56.createElement(
6639
+ "button",
6640
+ {
6641
+ onClick: () => {
6642
+ setShowOrgSwitcher(false);
6643
+ setShowLogoutConfirm(true);
6644
+ },
6645
+ className: "w-full py-2.5 flex items-center justify-center gap-2 rounded-full border border-stone-200 text-stone-600 hover:bg-stone-100 transition-colors outline-none text-xs tracking-wide"
6646
+ },
6647
+ /* @__PURE__ */ React56.createElement(HugeiconsIcon42, { icon: Logout01Icon2, size: 15 }),
6648
+ "Log Out"
6649
+ )))), showNotifDialog && /* @__PURE__ */ React56.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ React56.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setShowNotifDialog(false) }), /* @__PURE__ */ React56.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 max-h-[80vh] h-auto" }, /* @__PURE__ */ React56.createElement("div", { className: "flex items-center justify-between p-5 shrink-0" }, selectedNotif ? /* @__PURE__ */ React56.createElement("button", { onClick: () => setSelectedNotif(null), disabled: isResolving, className: "text-[#d97757] hover:text-[#d97757] transition-colors outline-none flex items-center gap-2 text-xs tracking-widest disabled:opacity-50" }, /* @__PURE__ */ React56.createElement(HugeiconsIcon42, { icon: ArrowLeft01Icon22, size: 14 }), " Back") : /* @__PURE__ */ React56.createElement("h3", { className: "text-sm text-black tracking-tight flex items-center gap-2" }, "Notifications"), /* @__PURE__ */ React56.createElement("button", { onClick: () => setShowNotifDialog(false), disabled: isResolving, className: "text-stone-400 hover:text-black transition-colors outline-none disabled:opacity-50" }, /* @__PURE__ */ React56.createElement(HugeiconsIcon42, { icon: CancelCircleIcon14, size: 18 }))), /* @__PURE__ */ React56.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-2 relative" }, isNotifsLoading && !selectedNotif && /* @__PURE__ */ React56.createElement("div", { className: "absolute inset-0 z-10 flex items-center justify-center" }, /* @__PURE__ */ React56.createElement(HugeiconsIcon42, { icon: Loading03Icon30, size: 28, className: "animate-spin text-black" })), selectedNotif ? /* @__PURE__ */ React56.createElement("div", { className: "p-4 text-left" }, selectedNotif.type === "HUDDLE_INVITE" && selectedNotif.meta_json?.action === "RESOLVE_INVITE" && selectedNotif.meta_json?.completed ? /* @__PURE__ */ React56.createElement("div", { className: "" }) : /* @__PURE__ */ React56.createElement("h4", { className: "text-sm text-black mb-1" }, selectedNotif.title), /* @__PURE__ */ React56.createElement("span", { className: "text-xs text-stone-400 tracking-widest mb-4 block" }, formatNotifDate(selectedNotif.createdAt)), /* @__PURE__ */ React56.createElement("p", { className: "text-xs text-stone-600 leading-relaxed whitespace-pre-wrap" }, selectedNotif.message), selectedNotif.type === "HUDDLE_INVITE" && selectedNotif.meta_json?.action === "RESOLVE_INVITE" && /* @__PURE__ */ React56.createElement("div", { className: `mt-8 flex gap-3 pt-6 ${selectedNotif.meta_json?.completed ? "opacity-40 pointer-events-none cursor-not-allowed" : ""}` }, /* @__PURE__ */ React56.createElement(
6562
6650
  "button",
6563
6651
  {
6564
6652
  onClick: () => handleResolve("ACCEPTED"),
@@ -6606,47 +6694,25 @@ var UniversalHome3 = ({
6606
6694
  };
6607
6695
 
6608
6696
  // src/components/RootSidebar.tsx
6609
- import React57, { useState as useState41, useEffect as useEffect23 } from "react";
6697
+ import React57, { useState as useState41 } from "react";
6610
6698
  import Link10 from "next/link";
6611
6699
  import { HugeiconsIcon as HugeiconsIcon43 } from "@hugeicons/react";
6612
6700
  import {
6613
- SidebarLeft01Icon as SidebarLeft01Icon2,
6614
- CancelCircleIcon as CancelCircleIcon15,
6615
- UserIcon as UserIcon3,
6616
- CheckmarkCircle01Icon as CheckmarkCircle01Icon2,
6617
- LogoutCircle02Icon as LogoutCircle02Icon3,
6618
- Loading03Icon as Loading03Icon31
6701
+ MenuCircleIcon,
6702
+ LogoutCircle02Icon as LogoutCircle02Icon3
6619
6703
  } from "@hugeicons/core-free-icons";
6620
6704
  function RootSidebar({
6621
6705
  NavItem2s,
6622
6706
  currentPath,
6623
- isMobileOpen,
6624
- closeMobile,
6625
- openMobile,
6626
6707
  onNavClick,
6627
- avatarSrc,
6628
- title = "App",
6629
- subtitle,
6630
- homeUrl = "/app",
6631
- showWorkspaceSwitcher = false,
6632
- workspaces = [],
6633
- activeWorkspaceId,
6634
- onSwitchWorkspace,
6635
6708
  showLogoutAction = false,
6636
6709
  onLogout
6637
6710
  }) {
6638
- const [isCollapsed, setIsCollapsed] = useState41(false);
6639
- const [isAvatarLoaded, setIsAvatarLoaded] = useState41(false);
6640
- const [showSwitcherDialog, setShowSwitcherDialog] = useState41(false);
6641
6711
  const [showLogoutDialog, setShowLogoutDialog] = useState41(false);
6642
6712
  const [isLoggingOut, setIsLoggingOut] = useState41(false);
6643
- useEffect23(() => {
6644
- if (isMobileOpen) {
6645
- closeMobile();
6646
- }
6647
- }, [currentPath]);
6713
+ const [isSheetOpen, setIsSheetOpen] = useState41(false);
6648
6714
  const hasActiveMatch = NavItem2s.some(
6649
- (item) => item.path === "/applications" || item.path === "/app" ? currentPath === item.path : currentPath === item.path || currentPath?.startsWith(`${item.path}/`)
6715
+ (item) => item.path === "/" || item.path === "/app" ? currentPath === "/" || currentPath === "/app" : currentPath === item.path || currentPath?.startsWith(`${item.path}/`)
6650
6716
  );
6651
6717
  const handleLogoutInitiation = async () => {
6652
6718
  if (isLoggingOut || !onLogout) return;
@@ -6658,152 +6724,114 @@ function RootSidebar({
6658
6724
  setShowLogoutDialog(false);
6659
6725
  }
6660
6726
  };
6661
- const finalAvatarSrc = avatarSrc || "https://storage.googleapis.com/retina-cloud-v2/assets/images/avatar.avif";
6662
- return /* @__PURE__ */ React57.createElement(React57.Fragment, null, !isMobileOpen && /* @__PURE__ */ React57.createElement(
6727
+ return /* @__PURE__ */ React57.createElement(React57.Fragment, null, /* @__PURE__ */ React57.createElement("aside", { className: "hidden md:flex fixed top-0 left-0 h-screen w-20 flex-col z-40 overflow-y-auto custom-scrollbar" }, /* @__PURE__ */ React57.createElement("div", { className: "h-24 shrink-0" }), /* @__PURE__ */ React57.createElement("nav", { className: "flex-1 flex flex-col gap-3 px-2" }, NavItem2s.map((item, index) => {
6728
+ const isExactOrSubMatch = item.path === "/" || item.path === "/app" ? currentPath === "/" || currentPath === "/app" : currentPath === item.path || currentPath?.startsWith(`${item.path}/`);
6729
+ const isCurrentRoute = isExactOrSubMatch || !hasActiveMatch && index === 0;
6730
+ return /* @__PURE__ */ React57.createElement(
6731
+ Link10,
6732
+ {
6733
+ key: item.name,
6734
+ href: item.path,
6735
+ onClick: (e) => onNavClick ? onNavClick(e, item.path) : void 0,
6736
+ className: `flex items-center justify-center w-12 h-12 mx-auto rounded-full transition-all outline-none group shrink-0 ${isCurrentRoute ? "bg-[#ffffff] text-[#d97757]" : "text-stone-500 hover:text-black hover:bg-white/50"}`,
6737
+ title: item.name
6738
+ },
6739
+ /* @__PURE__ */ React57.createElement(
6740
+ HugeiconsIcon43,
6741
+ {
6742
+ icon: item.icon,
6743
+ size: 20,
6744
+ className: `shrink-0 transition-colors ${isCurrentRoute ? "text-[#d97757]" : "text-stone-400 group-hover:text-black"}`
6745
+ }
6746
+ )
6747
+ );
6748
+ })), /* @__PURE__ */ React57.createElement("div", { className: "p-4 shrink-0 flex flex-col items-center gap-2 mb-4" }, showLogoutAction && /* @__PURE__ */ React57.createElement(
6663
6749
  "button",
6664
6750
  {
6665
- onClick: openMobile,
6666
- className: "md:hidden fixed left-0 top-1/2 -translate-y-1/2 z-50 bg-white border border-stone-200 border-l-0 shadow-[4px_0_24px_rgba(0,0,0,0.06)] rounded-r-xl py-6 px-1.5 flex items-center justify-center outline-none hover:bg-stone-50 transition-colors",
6667
- "aria-label": "Open Menu"
6751
+ onClick: () => setShowLogoutDialog(true),
6752
+ className: "w-12 h-12 rounded-full flex items-center justify-center text-stone-600 hover:bg-white/50 transition-all outline-none",
6753
+ title: "Log Out"
6668
6754
  },
6669
- /* @__PURE__ */ React57.createElement(
6670
- "span",
6671
- {
6672
- className: "text-[10px] font-medium uppercase tracking-[0.2em] text-stone-500",
6673
- style: { writingMode: "vertical-rl", transform: "rotate(180deg)" }
6674
- },
6675
- "Open Menu"
6676
- )
6755
+ /* @__PURE__ */ React57.createElement(HugeiconsIcon43, { icon: LogoutCircle02Icon3, size: 20 })
6756
+ ))), !isSheetOpen && /* @__PURE__ */ React57.createElement(
6757
+ "button",
6758
+ {
6759
+ onClick: () => setIsSheetOpen(true),
6760
+ className: "md:hidden fixed bottom-6 left-1/2 -translate-x-1/2 z-40 bg-black text-white px-8 py-2 rounded-full shadow-xl flex items-center justify-center gap-2 text-xs tracking-wide outline-none active:scale-95 transition-transform"
6761
+ },
6762
+ /* @__PURE__ */ React57.createElement(HugeiconsIcon43, { icon: MenuCircleIcon, size: 14 }),
6763
+ "Open Menu"
6677
6764
  ), /* @__PURE__ */ React57.createElement(
6678
6765
  "div",
6679
6766
  {
6680
- className: `fixed inset-0 bg-black/40 shadow-2xl transition-opacity duration-300 md:hidden z-90 ${isMobileOpen ? "opacity-100 pointer-events-auto" : "opacity-0 pointer-events-none"}`,
6681
- onClick: closeMobile
6767
+ className: `md:hidden fixed inset-0 bg-black/40 z-50 transition-opacity duration-300 ${isSheetOpen ? "opacity-100 pointer-events-auto" : "opacity-0 pointer-events-none"}`,
6768
+ onClick: () => setIsSheetOpen(false)
6682
6769
  }
6683
6770
  ), /* @__PURE__ */ React57.createElement(
6684
- "aside",
6771
+ "div",
6685
6772
  {
6686
- className: `
6687
- fixed md:sticky top-0 left-0 h-dvh bg-[#212121]
6688
- transition-all duration-300 ease-in-out shrink-0 flex flex-col z-100 md:z-10
6689
- ${isMobileOpen ? "translate-x-0" : "translate-x-[-120%] md:translate-x-0"}
6690
- ${isCollapsed ? "md:w-16 w-64" : "w-64"}
6691
- `
6773
+ className: `md:hidden fixed bottom-0 left-0 right-0 bg-white rounded-t-3xl z-50 flex flex-col overflow-hidden transition-transform duration-300 ease-[cubic-bezier(0.32,0.72,0,1)] ${isSheetOpen ? "translate-y-0" : "translate-y-full"}`
6692
6774
  },
6693
- /* @__PURE__ */ React57.createElement("div", { className: `flex items-center shrink-0 p-5 ${isCollapsed && !isMobileOpen ? "justify-center" : "justify-between"}` }, /* @__PURE__ */ React57.createElement(Link10, { href: homeUrl, className: `flex items-center outline-none group min-w-0 ${isCollapsed && !isMobileOpen ? "" : "gap-3 pr-2"}` }, /* @__PURE__ */ React57.createElement("div", { className: "w-8 h-8 shrink-0 relative rounded-lg overflow-hidden bg-white/10 flex items-center justify-center" }, !isAvatarLoaded && /* @__PURE__ */ React57.createElement(HugeiconsIcon43, { icon: Loading03Icon31, size: 14, className: "animate-spin text-white/50 absolute" }), /* @__PURE__ */ React57.createElement(
6694
- "img",
6695
- {
6696
- src: finalAvatarSrc,
6697
- alt: "User Avatar",
6698
- onLoad: () => setIsAvatarLoaded(true),
6699
- className: `w-full h-full object-cover transition-opacity duration-300 ${isAvatarLoaded ? "opacity-100" : "opacity-0"}`
6700
- }
6701
- )), (!isCollapsed || isMobileOpen) && /* @__PURE__ */ React57.createElement("div", { className: "flex flex-col justify-center min-w-0" }, /* @__PURE__ */ React57.createElement("span", { className: "text-[13px] font-serif text-white leading-none truncate max-w-32.5 tracking-wide mb-1 group-hover:opacity-80 transition-opacity" }, title), subtitle && /* @__PURE__ */ React57.createElement("span", { className: "text-[9px] text-neutral-400 truncate max-w-32.5 tracking-[0.2em] leading-none uppercase" }, subtitle))), (!isCollapsed || isMobileOpen) && /* @__PURE__ */ React57.createElement("div", { className: "md:hidden flex shrink-0" }, /* @__PURE__ */ React57.createElement(
6702
- "button",
6703
- {
6704
- onClick: closeMobile,
6705
- className: "text-neutral-400 hover:text-white transition-colors outline-none",
6706
- "aria-label": "Close Menu"
6707
- },
6708
- /* @__PURE__ */ React57.createElement(HugeiconsIcon43, { icon: CancelCircleIcon15, size: 24 })
6709
- ))),
6710
- /* @__PURE__ */ React57.createElement("nav", { className: "flex-1 py-2 flex flex-col gap-1.5 px-3 overflow-y-auto custom-scrollbar" }, NavItem2s.map((item, index) => {
6711
- const isExactOrSubMatch = item.path === "/applications" || item.path === "/app" ? currentPath === item.path : currentPath === item.path || currentPath?.startsWith(`${item.path}/`);
6775
+ /* @__PURE__ */ React57.createElement("div", { className: "w-full flex justify-center py-4 shrink-0", onClick: () => setIsSheetOpen(false) }, /* @__PURE__ */ React57.createElement("div", { className: "w-12 h-1.5 bg-stone-200 rounded-full" })),
6776
+ /* @__PURE__ */ React57.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar px-4 pb-8 flex flex-col gap-2 max-h-[70vh]" }, NavItem2s.map((item, index) => {
6777
+ const isExactOrSubMatch = item.path === "/" || item.path === "/app" ? currentPath === "/" || currentPath === "/app" : currentPath === item.path || currentPath?.startsWith(`${item.path}/`);
6712
6778
  const isCurrentRoute = isExactOrSubMatch || !hasActiveMatch && index === 0;
6713
6779
  return /* @__PURE__ */ React57.createElement(
6714
6780
  Link10,
6715
6781
  {
6716
6782
  key: item.name,
6717
6783
  href: item.path,
6718
- onClick: (e) => onNavClick ? onNavClick(e, item.path) : void 0,
6719
- className: `flex items-center gap-3 px-3 py-2 rounded-full transition-all outline-none group shrink-0 ${isCurrentRoute ? "bg-white/10 text-white" : "text-neutral-400 hover:text-white hover:bg-white/5"}`,
6720
- title: isCollapsed && !isMobileOpen ? item.name : void 0
6784
+ onClick: (e) => {
6785
+ if (onNavClick) onNavClick(e, item.path);
6786
+ setIsSheetOpen(false);
6787
+ },
6788
+ className: `flex items-center gap-4 px-5 py-3 rounded-full transition-colors outline-none ${isCurrentRoute ? "bg-[#fff5f2] text-[#d97757]" : "text-stone-600 hover:bg-stone-50"}`
6721
6789
  },
6722
6790
  /* @__PURE__ */ React57.createElement(
6723
6791
  HugeiconsIcon43,
6724
6792
  {
6725
6793
  icon: item.icon,
6726
6794
  size: 18,
6727
- className: `shrink-0 transition-colors ${isCurrentRoute ? "text-white" : "text-neutral-400 group-hover:text-white"}`
6795
+ className: isCurrentRoute ? "text-[#d97757]" : "text-stone-400"
6728
6796
  }
6729
6797
  ),
6730
- (!isCollapsed || isMobileOpen) && /* @__PURE__ */ React57.createElement("span", { className: "text-xs tracking-wide truncate" }, item.name)
6798
+ /* @__PURE__ */ React57.createElement("span", { className: "text-xs tracking-wide" }, item.name)
6731
6799
  );
6732
- })),
6733
- /* @__PURE__ */ React57.createElement("div", { className: "p-4 shrink-0 flex flex-col gap-2" }, (showWorkspaceSwitcher || showLogoutAction) && /* @__PURE__ */ React57.createElement("div", { className: `flex gap-2 px-1 pb-2 ${isCollapsed && !isMobileOpen ? "flex-col items-center" : "flex-row items-center"}` }, showWorkspaceSwitcher && workspaces && workspaces.length > 0 && /* @__PURE__ */ React57.createElement(
6734
- "button",
6735
- {
6736
- onClick: () => setShowSwitcherDialog(true),
6737
- className: "w-8 h-8 shrink-0 rounded-full bg-white/5 flex items-center justify-center text-neutral-400 hover:text-white hover:bg-white/10 transition-all outline-none",
6738
- title: "Switch Workspace"
6739
- },
6740
- /* @__PURE__ */ React57.createElement(HugeiconsIcon43, { icon: UserIcon3, size: 16 })
6741
- ), showLogoutAction && /* @__PURE__ */ React57.createElement(
6742
- "button",
6743
- {
6744
- onClick: () => setShowLogoutDialog(true),
6745
- className: "w-8 h-8 shrink-0 rounded-full bg-white/5 flex items-center justify-center text-neutral-400 hover:text-white hover:bg-white/10 transition-all outline-none",
6746
- title: "Secure Logout"
6747
- },
6748
- /* @__PURE__ */ React57.createElement(HugeiconsIcon43, { icon: LogoutCircle02Icon3, size: 16 })
6749
- )), /* @__PURE__ */ React57.createElement("div", { className: "hidden md:block border-t border-white/5 pt-2" }, /* @__PURE__ */ React57.createElement(
6800
+ }), showLogoutAction && /* @__PURE__ */ React57.createElement("div", { className: "mt-2" }, /* @__PURE__ */ React57.createElement(
6750
6801
  "button",
6751
6802
  {
6752
- onClick: () => setIsCollapsed(!isCollapsed),
6753
- className: "flex items-center justify-center md:justify-start gap-3 w-full p-2.5 rounded-full text-neutral-400 hover:text-white hover:bg-white/5 transition-colors outline-none"
6803
+ onClick: () => {
6804
+ setIsSheetOpen(false);
6805
+ setShowLogoutDialog(true);
6806
+ },
6807
+ className: "w-full flex items-center gap-4 px-5 py-3 rounded-full transition-colors outline-none text-red-600 hover:bg-red-50"
6754
6808
  },
6755
- /* @__PURE__ */ React57.createElement(HugeiconsIcon43, { icon: SidebarLeft01Icon2, size: 18, className: "shrink-0 text-neutral-400" }),
6756
- !isCollapsed && /* @__PURE__ */ React57.createElement("span", { className: "text-xs" }, "Collapse")
6809
+ /* @__PURE__ */ React57.createElement(HugeiconsIcon43, { icon: LogoutCircle02Icon3, size: 18, className: "text-red-500" }),
6810
+ /* @__PURE__ */ React57.createElement("span", { className: "text-xs tracking-wide" }, "Log Out")
6757
6811
  )))
6758
- ), showSwitcherDialog && showWorkspaceSwitcher && workspaces && workspaces.length > 0 && /* @__PURE__ */ React57.createElement("div", { className: "fixed inset-0 z-110 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ React57.createElement(
6759
- "div",
6760
- {
6761
- className: "absolute inset-0 bg-black/30",
6762
- onClick: () => setShowSwitcherDialog(false)
6763
- }
6764
- ), /* @__PURE__ */ React57.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" }, /* @__PURE__ */ React57.createElement("div", { className: "p-5 text-center w-full" }, /* @__PURE__ */ React57.createElement("h3", { className: " font-serif text-[17px] text-black tracking-tight mb-1" }, "Switch Workspace"), /* @__PURE__ */ React57.createElement("p", { className: "text-[11px] text-neutral-500 leading-snug" }, "Select an organization to switch your current context.")), /* @__PURE__ */ React57.createElement("div", { className: "max-h-75 overflow-y-auto w-full custom-scrollbar" }, workspaces.map((org) => /* @__PURE__ */ React57.createElement(
6765
- "button",
6766
- {
6767
- key: org.id,
6768
- onClick: () => {
6769
- if (onSwitchWorkspace) onSwitchWorkspace(org.id);
6770
- setShowSwitcherDialog(false);
6771
- },
6772
- className: "w-full text-left px-5 py-4 flex items-center justify-between hover:bg-neutral-50 transition-colors group outline-none last:border-0"
6773
- },
6774
- /* @__PURE__ */ React57.createElement("div", { className: "flex flex-col truncate pr-4" }, /* @__PURE__ */ React57.createElement("span", { className: `text-[13px] truncate ${activeWorkspaceId === org.id ? "text-black" : "text-neutral-600 group-hover:text-black"}` }, org.name), /* @__PURE__ */ React57.createElement("span", { className: "text-[9px] text-neutral-400 tracking-[0.2em] mt-1 uppercase" }, "Role: ", org.role)),
6775
- activeWorkspaceId === org.id && /* @__PURE__ */ React57.createElement(HugeiconsIcon43, { icon: CheckmarkCircle01Icon2, size: 16, className: "text-black shrink-0" })
6776
- ))), /* @__PURE__ */ React57.createElement("div", { className: "w-full flex mt-auto" }, /* @__PURE__ */ React57.createElement(
6777
- "button",
6778
- {
6779
- onClick: () => setShowSwitcherDialog(false),
6780
- className: "w-full py-3.5 text-[13px] text-neutral-600 hover:bg-neutral-50 transition-colors outline-none"
6781
- },
6782
- "Cancel"
6783
- )))), /* @__PURE__ */ React57.createElement(
6812
+ ), showLogoutAction && /* @__PURE__ */ React57.createElement(
6784
6813
  ConfirmationDialog,
6785
6814
  {
6786
- isOpen: showLogoutDialog && showLogoutAction,
6815
+ isOpen: showLogoutDialog,
6787
6816
  title: "Secure Logout",
6788
6817
  message: "Are you sure you want to log out? You will need to authenticate to return.",
6789
6818
  confirmText: "Log Out",
6790
- cancelText: "Cancel",
6791
- isProcessing: isLoggingOut,
6792
6819
  isDestructive: true,
6793
- onClose: () => !isLoggingOut && setShowLogoutDialog(false),
6820
+ isProcessing: isLoggingOut,
6821
+ onClose: () => setShowLogoutDialog(false),
6794
6822
  onConfirm: handleLogoutInitiation
6795
6823
  }
6796
6824
  ));
6797
6825
  }
6798
6826
 
6799
6827
  // src/components/UniversalSettings2.tsx
6800
- import React58, { useState as useState42, useEffect as useEffect24, useRef as useRef17 } from "react";
6828
+ import React58, { useState as useState42, useEffect as useEffect23, useRef as useRef17 } from "react";
6801
6829
  import toast18 from "react-hot-toast";
6802
6830
  import { HugeiconsIcon as HugeiconsIcon44 } from "@hugeicons/react";
6803
6831
  import {
6804
6832
  ArrowLeft01Icon as ArrowLeft01Icon23,
6805
6833
  ArrowRight01Icon as ArrowRight01Icon18,
6806
- Loading03Icon as Loading03Icon32,
6834
+ Loading03Icon as Loading03Icon31,
6807
6835
  CircleLock02Icon as CircleLock02Icon5,
6808
6836
  CloudUploadIcon as CloudUploadIcon2
6809
6837
  } from "@hugeicons/core-free-icons";
@@ -6826,14 +6854,14 @@ var MemberAvatar5 = ({ src, status, sizeClass = "w-10 h-10" }) => {
6826
6854
  return "bg-stone-200";
6827
6855
  }
6828
6856
  };
6829
- return /* @__PURE__ */ React58.createElement("div", { className: `relative shrink-0 ${sizeClass}` }, /* @__PURE__ */ React58.createElement("div", { className: "w-full h-full rounded-lg bg-stone-100 flex items-center justify-center overflow-hidden" }, !loaded && !error && /* @__PURE__ */ React58.createElement(HugeiconsIcon44, { icon: Loading03Icon32, className: "animate-spin text-stone-400 absolute", size: 14 }), /* @__PURE__ */ React58.createElement("img", { src: finalSrc, alt: "Member", className: `w-full h-full object-cover transition-opacity duration-300 ${loaded || error ? "opacity-100" : "opacity-0"}`, onLoad: () => setLoaded(true), onError: () => setError(true) })), /* @__PURE__ */ React58.createElement("div", { className: `absolute -bottom-1 -right-1 w-3.5 h-3.5 rounded-full border-2 border-white z-10 ${getStatusColor()}` }));
6857
+ return /* @__PURE__ */ React58.createElement("div", { className: `relative shrink-0 ${sizeClass}` }, /* @__PURE__ */ React58.createElement("div", { className: "w-full h-full rounded-lg bg-stone-100 flex items-center justify-center overflow-hidden" }, !loaded && !error && /* @__PURE__ */ React58.createElement(HugeiconsIcon44, { icon: Loading03Icon31, className: "animate-spin text-stone-400 absolute", size: 14 }), /* @__PURE__ */ React58.createElement("img", { src: finalSrc, alt: "Member", className: `w-full h-full object-cover transition-opacity duration-300 ${loaded || error ? "opacity-100" : "opacity-0"}`, onLoad: () => setLoaded(true), onError: () => setError(true) })), /* @__PURE__ */ React58.createElement("div", { className: `absolute -bottom-1 -right-1 w-3.5 h-3.5 rounded-full border-2 border-white z-10 ${getStatusColor()}` }));
6830
6858
  };
6831
- var OrgAvatar3 = ({ src, sizeClass = "w-10 h-10" }) => {
6859
+ var OrgAvatar4 = ({ src, sizeClass = "w-10 h-10" }) => {
6832
6860
  const [loaded, setLoaded] = useState42(false);
6833
6861
  const [error, setError] = useState42(false);
6834
6862
  const defaultAvatar = "https://storage.googleapis.com/retina-cloud-v2/assets/images/office_a.avif";
6835
6863
  const finalSrc = error || !src ? defaultAvatar : src;
6836
- return /* @__PURE__ */ React58.createElement("div", { className: `relative shrink-0 ${sizeClass}` }, /* @__PURE__ */ React58.createElement("div", { className: "w-full h-full rounded-lg bg-stone-100 flex items-center justify-center overflow-hidden" }, !loaded && !error && /* @__PURE__ */ React58.createElement(HugeiconsIcon44, { icon: Loading03Icon32, className: "animate-spin text-stone-400 absolute", size: 14 }), /* @__PURE__ */ React58.createElement(
6864
+ return /* @__PURE__ */ React58.createElement("div", { className: `relative shrink-0 ${sizeClass}` }, /* @__PURE__ */ React58.createElement("div", { className: "w-full h-full rounded-lg bg-stone-100 flex items-center justify-center overflow-hidden" }, !loaded && !error && /* @__PURE__ */ React58.createElement(HugeiconsIcon44, { icon: Loading03Icon31, className: "animate-spin text-stone-400 absolute", size: 14 }), /* @__PURE__ */ React58.createElement(
6837
6865
  "img",
6838
6866
  {
6839
6867
  src: finalSrc,
@@ -6844,7 +6872,7 @@ var OrgAvatar3 = ({ src, sizeClass = "w-10 h-10" }) => {
6844
6872
  }
6845
6873
  )));
6846
6874
  };
6847
- var PageSpinner10 = () => /* @__PURE__ */ React58.createElement("div", { className: "flex justify-center items-center py-12" }, /* @__PURE__ */ React58.createElement(HugeiconsIcon44, { icon: Loading03Icon32, size: 32, className: "animate-spin mb-4 text-black" }));
6875
+ var PageSpinner10 = () => /* @__PURE__ */ React58.createElement("div", { className: "flex justify-center items-center py-12" }, /* @__PURE__ */ React58.createElement(HugeiconsIcon44, { icon: Loading03Icon31, size: 32, className: "animate-spin mb-4 text-black" }));
6848
6876
  var InputSpinner4 = () => /* @__PURE__ */ React58.createElement("svg", { className: "animate-spin h-4 w-4 text-stone-400", xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24" }, /* @__PURE__ */ React58.createElement("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }), /* @__PURE__ */ React58.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" }));
6849
6877
  var UniversalSettings2 = ({
6850
6878
  accountType,
@@ -6915,7 +6943,7 @@ var UniversalSettings2 = ({
6915
6943
  const [pendingUserAvatar, setPendingUserAvatar] = useState42(null);
6916
6944
  const [isUploadingOrgAvatar, setIsUploadingOrgAvatar] = useState42(false);
6917
6945
  const [isUploadingUserAvatar, setIsUploadingUserAvatar] = useState42(false);
6918
- useEffect24(() => {
6946
+ useEffect23(() => {
6919
6947
  setOrgName(initialOrgName || "");
6920
6948
  setOrgSlug(initialOrgSlug || "");
6921
6949
  setOrgAvatarUrl(initialOrgAvatarUrl || "");
@@ -6950,7 +6978,7 @@ var UniversalSettings2 = ({
6950
6978
  }
6951
6979
  e.target.value = "";
6952
6980
  };
6953
- useEffect24(() => {
6981
+ useEffect23(() => {
6954
6982
  if (activeTab !== "MEMBERS") return;
6955
6983
  if (isFirstSearchMount.current) {
6956
6984
  isFirstSearchMount.current = false;
@@ -7007,7 +7035,7 @@ var UniversalSettings2 = ({
7007
7035
  }
7008
7036
  };
7009
7037
  const activeExpandedMember = expandedId ? members.find((m) => m.id === expandedId) : null;
7010
- useEffect24(() => {
7038
+ useEffect23(() => {
7011
7039
  if (!isOrg || !orgSlug || orgSlug === initialOrgSlug) {
7012
7040
  setSlugAvailable(null);
7013
7041
  setIsCheckingSlug(false);
@@ -7150,7 +7178,7 @@ var UniversalSettings2 = ({
7150
7178
  },
7151
7179
  /* @__PURE__ */ React58.createElement(HugeiconsIcon44, { icon: ArrowLeft01Icon23, size: 16 }),
7152
7180
  " Back"
7153
- )), /* @__PURE__ */ React58.createElement("div", { className: "flex flex-col gap-1 mb-8" }, /* @__PURE__ */ React58.createElement("h2", { className: "text-black text-xl tracking-tight" }, "Member Profile"), /* @__PURE__ */ React58.createElement("p", { className: "text-xs text-stone-500" }, "View and manage this member's access privileges.")), /* @__PURE__ */ React58.createElement("div", { className: "flex items-center gap-4 mb-4" }, /* @__PURE__ */ React58.createElement(MemberAvatar5, { src: activeExpandedMember.avatarUrl, status: activeExpandedMember.status, sizeClass: "w-14 h-14" }), /* @__PURE__ */ React58.createElement("div", { className: "flex flex-col min-w-0" }, /* @__PURE__ */ React58.createElement("span", { className: "text-sm text-black tracking-tight truncate" }, activeExpandedMember.fullName), /* @__PURE__ */ React58.createElement("div", { className: "flex items-center gap-2 mt-0.5" }, /* @__PURE__ */ React58.createElement("span", { className: "text-xs text-stone-500 capitalize" }, activeExpandedMember.role.toLowerCase()), canManage && (isUpdatingRole ? /* @__PURE__ */ React58.createElement(HugeiconsIcon44, { icon: Loading03Icon32, size: 12, className: "animate-spin text-stone-400 ml-1" }) : /* @__PURE__ */ React58.createElement(React58.Fragment, null, /* @__PURE__ */ React58.createElement("span", { className: "text-stone-300 text-xs px-0.5" }, "\u2022"), /* @__PURE__ */ React58.createElement("button", { onClick: () => setRoleEditTarget(activeExpandedMember), className: "text-xs text-[#d97757] hover:underline outline-none" }, "Edit"), /* @__PURE__ */ React58.createElement("span", { className: "text-stone-300 text-xs px-0.5" }, "\u2022"), /* @__PURE__ */ React58.createElement(
7181
+ )), /* @__PURE__ */ React58.createElement("div", { className: "flex flex-col gap-1 mb-8" }, /* @__PURE__ */ React58.createElement("h2", { className: "text-black text-xl tracking-tight" }, "Member Profile"), /* @__PURE__ */ React58.createElement("p", { className: "text-xs text-stone-500" }, "View and manage this member's access privileges.")), /* @__PURE__ */ React58.createElement("div", { className: "flex items-center gap-4 mb-4" }, /* @__PURE__ */ React58.createElement(MemberAvatar5, { src: activeExpandedMember.avatarUrl, status: activeExpandedMember.status, sizeClass: "w-14 h-14" }), /* @__PURE__ */ React58.createElement("div", { className: "flex flex-col min-w-0" }, /* @__PURE__ */ React58.createElement("span", { className: "text-sm text-black tracking-tight truncate" }, activeExpandedMember.fullName), /* @__PURE__ */ React58.createElement("div", { className: "flex items-center gap-2 mt-0.5" }, /* @__PURE__ */ React58.createElement("span", { className: "text-xs text-stone-500 capitalize" }, activeExpandedMember.role.toLowerCase()), canManage && (isUpdatingRole ? /* @__PURE__ */ React58.createElement(HugeiconsIcon44, { icon: Loading03Icon31, size: 12, className: "animate-spin text-stone-400 ml-1" }) : /* @__PURE__ */ React58.createElement(React58.Fragment, null, /* @__PURE__ */ React58.createElement("span", { className: "text-stone-300 text-xs px-0.5" }, "\u2022"), /* @__PURE__ */ React58.createElement("button", { onClick: () => setRoleEditTarget(activeExpandedMember), className: "text-xs text-[#d97757] hover:underline outline-none" }, "Edit"), /* @__PURE__ */ React58.createElement("span", { className: "text-stone-300 text-xs px-0.5" }, "\u2022"), /* @__PURE__ */ React58.createElement(
7154
7182
  "button",
7155
7183
  {
7156
7184
  onClick: () => setMemberToRemove(activeExpandedMember),
@@ -7161,12 +7189,12 @@ var UniversalSettings2 = ({
7161
7189
  ))))))) : /* @__PURE__ */ React58.createElement(React58.Fragment, null, /* @__PURE__ */ React58.createElement("div", { className: "flex flex-col gap-1" }, /* @__PURE__ */ React58.createElement("div", { className: "flex flex-row items-center justify-between gap-4" }, /* @__PURE__ */ React58.createElement("h2", { className: "text-black text-xl tracking-tight" }, isInviteMode ? "Add Member" : "Team Directory"), !isInviteMode && canManage && /* @__PURE__ */ React58.createElement("button", { onClick: () => setIsInviteMode(true), className: "shrink-0 px-4 py-1.5 border border-stone-200 text-black text-xs tracking-wide rounded-full hover:bg-stone-50 transition-colors outline-none" }, "Invite Team")), !isInviteMode && /* @__PURE__ */ React58.createElement("p", { className: "text-xs text-stone-500" }, "Manage members and access controls across your organization.")), /* @__PURE__ */ React58.createElement("div", { className: "w-full overflow-hidden" }, isInviteMode ? /* @__PURE__ */ React58.createElement("form", { onSubmit: handleInviteSubmit, className: "flex flex-col gap-8 animate-in fade-in duration-300" }, /* @__PURE__ */ React58.createElement("div", { className: "space-y-1.5 mt-2" }, /* @__PURE__ */ React58.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block" }, "Email Address"), /* @__PURE__ */ React58.createElement("input", { type: "email", value: inviteEmail, onChange: (e) => setInviteEmail(cleanEmailId(e.target.value)), required: true, autoFocus: true, className: "w-full px-2 py-3 bg-transparent text-sm border-b border-stone-200 text-black outline-none focus:border-black transition-all duration-300", placeholder: "name@company.com" })), /* @__PURE__ */ React58.createElement("div", { className: "flex flex-col gap-3" }, /* @__PURE__ */ React58.createElement(ThreeDActionButton, { type: "submit", disabled: inviteEmail.length < 5 || isInviting, isLoading: isInviting, className: "w-full" }, "Send Invitation"), /* @__PURE__ */ React58.createElement("button", { type: "button", onClick: () => {
7162
7190
  setIsInviteMode(false);
7163
7191
  setInviteEmail("");
7164
- }, disabled: isInviting, className: "w-full flex items-center justify-center py-2.5 rounded-full border border-stone-200 text-black hover:bg-stone-50 transition-colors outline-none text-xs tracking-wide" }, "Cancel"))) : isMembersLoading || isTyping ? /* @__PURE__ */ React58.createElement(PageSpinner10, null) : /* @__PURE__ */ React58.createElement("div", { className: "flex flex-col min-w-0 animate-in fade-in duration-300" }, /* @__PURE__ */ React58.createElement("div", null, members.length === 0 ? /* @__PURE__ */ React58.createElement("p", { className: "text-xs text-stone-400 py-6 text-center" }, "No members found") : members.map((member) => /* @__PURE__ */ React58.createElement("div", { key: member.id, onClick: () => setExpandedId(member.id), className: "flex items-center justify-between py-3 hover:bg-stone-50 transition-colors cursor-pointer group min-w-0 px-3 -mx-3 rounded-xl" }, /* @__PURE__ */ React58.createElement("div", { className: "flex items-center gap-4 min-w-0 flex-1" }, /* @__PURE__ */ React58.createElement(MemberAvatar5, { src: member.avatarUrl, status: member.status }), /* @__PURE__ */ React58.createElement("div", { className: "min-w-0 flex-1 flex flex-col gap-0.5" }, /* @__PURE__ */ React58.createElement("p", { className: "text-sm text-black truncate" }, member.fullName), /* @__PURE__ */ React58.createElement("p", { className: "text-xs text-stone-500 capitalize truncate" }, member.role.toLowerCase())))))), /* @__PURE__ */ React58.createElement("div", { className: "flex items-center justify-between pt-6 mt-2 " }, /* @__PURE__ */ React58.createElement("span", { className: "text-xs text-stone-400 tracking-[0.2em]" }, "Page ", membersCurrentPage, " of ", membersTotalPages === 0 ? 1 : membersTotalPages), /* @__PURE__ */ React58.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React58.createElement("button", { onClick: () => onMembersPageChange(membersCurrentPage - 1), disabled: membersCurrentPage <= 1 || isMembersLoading, className: "p-2 bg-white border border-stone-200 rounded-full text-black hover:bg-stone-50 disabled:opacity-30 disabled:cursor-not-allowed transition-all outline-none" }, /* @__PURE__ */ React58.createElement(HugeiconsIcon44, { icon: ArrowLeft01Icon23, size: 14 })), /* @__PURE__ */ React58.createElement("button", { onClick: () => onMembersPageChange(membersCurrentPage + 1), disabled: membersCurrentPage >= membersTotalPages || isMembersLoading || membersTotalPages === 0, className: "p-2 bg-white border border-stone-200 rounded-full text-black hover:bg-stone-50 disabled:opacity-30 disabled:cursor-not-allowed transition-all outline-none" }, /* @__PURE__ */ React58.createElement(HugeiconsIcon44, { icon: ArrowRight01Icon18, size: 14 })))))))), /* @__PURE__ */ React58.createElement(ReusableOptions, { isOpen: !!roleEditTarget, onClose: () => setRoleEditTarget(null), title: "Modify Access Role", options: ["ADMIN", "MANAGER", "MEMBER"], selectedOption: roleEditTarget?.role || "", onSelect: handleRoleUpdate })), activeTab === "ORGANIZATION" && isOrg && /* @__PURE__ */ React58.createElement("div", { className: "flex flex-col gap-8 animate-in rounded-2xl p-6 bg-white fade-in duration-300" }, /* @__PURE__ */ React58.createElement("div", { className: "flex items-start justify-between gap-4" }, /* @__PURE__ */ React58.createElement("div", { className: "flex items-center gap-4" }, /* @__PURE__ */ React58.createElement("div", { className: "relative group cursor-pointer shrink-0", onClick: () => canManage && !isSavingOrg ? orgFileInputRef.current?.click() : void 0 }, /* @__PURE__ */ React58.createElement(OrgAvatar3, { src: orgAvatarUrl, sizeClass: "w-14 h-14" }), canManage && /* @__PURE__ */ React58.createElement("div", { className: "absolute -bottom-1 -right-1 w-6 h-6 bg-white border border-stone-200 rounded-full flex items-center justify-center text-stone-500 group-hover:text-black transition-colors z-10" }, isUploadingOrgAvatar ? /* @__PURE__ */ React58.createElement(HugeiconsIcon44, { icon: Loading03Icon32, size: 12, className: "animate-spin" }) : /* @__PURE__ */ React58.createElement(HugeiconsIcon44, { icon: CloudUploadIcon2, size: 14 })), /* @__PURE__ */ React58.createElement("input", { type: "file", ref: orgFileInputRef, className: "hidden", accept: ".png, .jpg, .jpeg", onChange: (e) => handleFileSelect(e, "ORGANIZATION") })), /* @__PURE__ */ React58.createElement("div", null, /* @__PURE__ */ React58.createElement("h2", { className: "text-black text-xl mb-1 tracking-tight" }, "Workspace Details"), /* @__PURE__ */ React58.createElement("p", { className: "text-xs text-stone-500" }, "Manage your organizational identity and handles."))), !canManage && /* @__PURE__ */ React58.createElement("span", { className: "p-2 w-9 h-9 bg-stone-100 text-stone-400 rounded-full shrink-0" }, /* @__PURE__ */ React58.createElement(HugeiconsIcon44, { icon: CircleLock02Icon5, size: 18, className: "text-current" }))), /* @__PURE__ */ React58.createElement("form", { className: "flex flex-col gap-8 w-full max-w-5xl", onSubmit: handleSaveOrganization, autoComplete: "off" }, /* @__PURE__ */ React58.createElement(TextInput, { label: "Workspace Name", value: orgName, onChange: handleOrgNameChange, disabled: !canManage || isSavingOrg, placeholder: "Acme Corporation", maxLength: 50 }), /* @__PURE__ */ React58.createElement("div", { className: "space-y-1.5 relative w-full" }, /* @__PURE__ */ React58.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block" }, "Workspace Handle"), /* @__PURE__ */ React58.createElement("div", { className: "flex items-center relative w-full border-b border-stone-200 focus-within:border-black transition-all duration-300 overflow-hidden" }, /* @__PURE__ */ React58.createElement("input", { type: "text", value: orgSlug, disabled: !canManage || isSavingOrg, onChange: (e) => handleOrgSlugChange(e.target.value), spellCheck: "false", autoComplete: "off", className: "w-full pr-10 pl-0 py-3 text-sm bg-transparent text-black outline-none disabled:opacity-50 disabled:cursor-not-allowed", placeholder: "workspace-handle" }), /* @__PURE__ */ React58.createElement("div", { className: "absolute right-2 top-1/2 -translate-y-1/2" }, isCheckingSlug && /* @__PURE__ */ React58.createElement(InputSpinner4, null), !isCheckingSlug && canManage && orgSlug !== initialOrgSlug && orgSlug.length >= 3 && slugAvailable === false && /* @__PURE__ */ React58.createElement("span", { className: "inline-flex items-center justify-center w-4 h-4 rounded-full bg-[#d97757]/10" }, /* @__PURE__ */ React58.createElement("svg", { className: "w-2 h-2 text-[#d97757]", viewBox: "0 0 20 20", fill: "currentColor" }, /* @__PURE__ */ React58.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 && canManage && orgSlug !== initialOrgSlug && orgSlug.length >= 3 && slugAvailable === true && /* @__PURE__ */ React58.createElement("span", { className: "inline-flex items-center justify-center w-4 h-4 rounded-full bg-green-100" }, /* @__PURE__ */ React58.createElement("svg", { className: "w-2 h-2 text-green-600", viewBox: "0 0 20 20", fill: "currentColor" }, /* @__PURE__ */ React58.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__ */ React58.createElement("div", { className: "pt-8 mt-2 flex items-center gap-4" }, /* @__PURE__ */ React58.createElement(ThreeDActionButton, { type: "submit", disabled: isOrgSaveDisabled, isLoading: isSavingOrg, className: "min-w-32" }, "Save Changes"), hasOrgChanges && !isSavingOrg && canManage && /* @__PURE__ */ React58.createElement("button", { type: "button", onClick: () => {
7192
+ }, disabled: isInviting, className: "w-full flex items-center justify-center py-2.5 rounded-full border border-stone-200 text-black hover:bg-stone-50 transition-colors outline-none text-xs tracking-wide" }, "Cancel"))) : isMembersLoading || isTyping ? /* @__PURE__ */ React58.createElement(PageSpinner10, null) : /* @__PURE__ */ React58.createElement("div", { className: "flex flex-col min-w-0 animate-in fade-in duration-300" }, /* @__PURE__ */ React58.createElement("div", null, members.length === 0 ? /* @__PURE__ */ React58.createElement("p", { className: "text-xs text-stone-400 py-6 text-center" }, "No members found") : members.map((member) => /* @__PURE__ */ React58.createElement("div", { key: member.id, onClick: () => setExpandedId(member.id), className: "flex items-center justify-between py-3 hover:bg-stone-50 transition-colors cursor-pointer group min-w-0 px-3 -mx-3 rounded-xl" }, /* @__PURE__ */ React58.createElement("div", { className: "flex items-center gap-4 min-w-0 flex-1" }, /* @__PURE__ */ React58.createElement(MemberAvatar5, { src: member.avatarUrl, status: member.status }), /* @__PURE__ */ React58.createElement("div", { className: "min-w-0 flex-1 flex flex-col gap-0.5" }, /* @__PURE__ */ React58.createElement("p", { className: "text-sm text-black truncate" }, member.fullName), /* @__PURE__ */ React58.createElement("p", { className: "text-xs text-stone-500 capitalize truncate" }, member.role.toLowerCase())))))), /* @__PURE__ */ React58.createElement("div", { className: "flex items-center justify-between pt-6 mt-2 " }, /* @__PURE__ */ React58.createElement("span", { className: "text-xs text-stone-400 tracking-[0.2em]" }, "Page ", membersCurrentPage, " of ", membersTotalPages === 0 ? 1 : membersTotalPages), /* @__PURE__ */ React58.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React58.createElement("button", { onClick: () => onMembersPageChange(membersCurrentPage - 1), disabled: membersCurrentPage <= 1 || isMembersLoading, className: "p-2 bg-white border border-stone-200 rounded-full text-black hover:bg-stone-50 disabled:opacity-30 disabled:cursor-not-allowed transition-all outline-none" }, /* @__PURE__ */ React58.createElement(HugeiconsIcon44, { icon: ArrowLeft01Icon23, size: 14 })), /* @__PURE__ */ React58.createElement("button", { onClick: () => onMembersPageChange(membersCurrentPage + 1), disabled: membersCurrentPage >= membersTotalPages || isMembersLoading || membersTotalPages === 0, className: "p-2 bg-white border border-stone-200 rounded-full text-black hover:bg-stone-50 disabled:opacity-30 disabled:cursor-not-allowed transition-all outline-none" }, /* @__PURE__ */ React58.createElement(HugeiconsIcon44, { icon: ArrowRight01Icon18, size: 14 })))))))), /* @__PURE__ */ React58.createElement(ReusableOptions, { isOpen: !!roleEditTarget, onClose: () => setRoleEditTarget(null), title: "Modify Access Role", options: ["ADMIN", "MANAGER", "MEMBER"], selectedOption: roleEditTarget?.role || "", onSelect: handleRoleUpdate })), activeTab === "ORGANIZATION" && isOrg && /* @__PURE__ */ React58.createElement("div", { className: "flex flex-col gap-8 animate-in rounded-2xl p-6 bg-white fade-in duration-300" }, /* @__PURE__ */ React58.createElement("div", { className: "flex items-start justify-between gap-4" }, /* @__PURE__ */ React58.createElement("div", { className: "flex items-center gap-4" }, /* @__PURE__ */ React58.createElement("div", { className: "relative group cursor-pointer shrink-0", onClick: () => canManage && !isSavingOrg ? orgFileInputRef.current?.click() : void 0 }, /* @__PURE__ */ React58.createElement(OrgAvatar4, { src: orgAvatarUrl, sizeClass: "w-14 h-14" }), canManage && /* @__PURE__ */ React58.createElement("div", { className: "absolute -bottom-1 -right-1 w-6 h-6 bg-white border border-stone-200 rounded-full flex items-center justify-center text-stone-500 group-hover:text-black transition-colors z-10" }, isUploadingOrgAvatar ? /* @__PURE__ */ React58.createElement(HugeiconsIcon44, { icon: Loading03Icon31, size: 12, className: "animate-spin" }) : /* @__PURE__ */ React58.createElement(HugeiconsIcon44, { icon: CloudUploadIcon2, size: 14 })), /* @__PURE__ */ React58.createElement("input", { type: "file", ref: orgFileInputRef, className: "hidden", accept: ".png, .jpg, .jpeg", onChange: (e) => handleFileSelect(e, "ORGANIZATION") })), /* @__PURE__ */ React58.createElement("div", null, /* @__PURE__ */ React58.createElement("h2", { className: "text-black text-xl mb-1 tracking-tight" }, "Workspace Details"), /* @__PURE__ */ React58.createElement("p", { className: "text-xs text-stone-500" }, "Manage your organizational identity and handles."))), !canManage && /* @__PURE__ */ React58.createElement("span", { className: "p-2 w-9 h-9 bg-stone-100 text-stone-400 rounded-full shrink-0" }, /* @__PURE__ */ React58.createElement(HugeiconsIcon44, { icon: CircleLock02Icon5, size: 18, className: "text-current" }))), /* @__PURE__ */ React58.createElement("form", { className: "flex flex-col gap-8 w-full max-w-5xl", onSubmit: handleSaveOrganization, autoComplete: "off" }, /* @__PURE__ */ React58.createElement(TextInput, { label: "Workspace Name", value: orgName, onChange: handleOrgNameChange, disabled: !canManage || isSavingOrg, placeholder: "Acme Corporation", maxLength: 50 }), /* @__PURE__ */ React58.createElement("div", { className: "space-y-1.5 relative w-full" }, /* @__PURE__ */ React58.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block" }, "Workspace Handle"), /* @__PURE__ */ React58.createElement("div", { className: "flex items-center relative w-full border-b border-stone-200 focus-within:border-black transition-all duration-300 overflow-hidden" }, /* @__PURE__ */ React58.createElement("input", { type: "text", value: orgSlug, disabled: !canManage || isSavingOrg, onChange: (e) => handleOrgSlugChange(e.target.value), spellCheck: "false", autoComplete: "off", className: "w-full pr-10 pl-0 py-3 text-sm bg-transparent text-black outline-none disabled:opacity-50 disabled:cursor-not-allowed", placeholder: "workspace-handle" }), /* @__PURE__ */ React58.createElement("div", { className: "absolute right-2 top-1/2 -translate-y-1/2" }, isCheckingSlug && /* @__PURE__ */ React58.createElement(InputSpinner4, null), !isCheckingSlug && canManage && orgSlug !== initialOrgSlug && orgSlug.length >= 3 && slugAvailable === false && /* @__PURE__ */ React58.createElement("span", { className: "inline-flex items-center justify-center w-4 h-4 rounded-full bg-[#d97757]/10" }, /* @__PURE__ */ React58.createElement("svg", { className: "w-2 h-2 text-[#d97757]", viewBox: "0 0 20 20", fill: "currentColor" }, /* @__PURE__ */ React58.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 && canManage && orgSlug !== initialOrgSlug && orgSlug.length >= 3 && slugAvailable === true && /* @__PURE__ */ React58.createElement("span", { className: "inline-flex items-center justify-center w-4 h-4 rounded-full bg-green-100" }, /* @__PURE__ */ React58.createElement("svg", { className: "w-2 h-2 text-green-600", viewBox: "0 0 20 20", fill: "currentColor" }, /* @__PURE__ */ React58.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__ */ React58.createElement("div", { className: "pt-8 mt-2 flex items-center gap-4" }, /* @__PURE__ */ React58.createElement(ThreeDActionButton, { type: "submit", disabled: isOrgSaveDisabled, isLoading: isSavingOrg, className: "min-w-32" }, "Save Changes"), hasOrgChanges && !isSavingOrg && canManage && /* @__PURE__ */ React58.createElement("button", { type: "button", onClick: () => {
7165
7193
  setOrgName(initialOrgName || "");
7166
7194
  setOrgSlug(initialOrgSlug || "");
7167
7195
  setOrgAvatarUrl(initialOrgAvatarUrl || "");
7168
7196
  setPendingOrgAvatar(null);
7169
- }, className: "text-xs tracking-widest text-stone-400 hover:text-black transition-colors outline-none" }, "Cancel")))), activeTab === "ACCOUNT" && /* @__PURE__ */ React58.createElement("div", { className: "flex flex-col gap-6 animate-in fade-in duration-300" }, /* @__PURE__ */ React58.createElement("div", { className: "flex flex-col gap-8 rounded-2xl p-6 bg-white w-full" }, /* @__PURE__ */ React58.createElement("div", { className: "flex items-start justify-between gap-4" }, /* @__PURE__ */ React58.createElement("div", { className: "flex items-center gap-4" }, /* @__PURE__ */ React58.createElement("div", { className: "relative group cursor-pointer shrink-0", onClick: () => !isSavingProfile ? userFileInputRef.current?.click() : void 0 }, /* @__PURE__ */ React58.createElement(MemberAvatar5, { src: avatarUrl, status: "ACTIVE", sizeClass: "w-14 h-14" }), /* @__PURE__ */ React58.createElement("div", { className: "absolute -bottom-1 -right-1 w-6 h-6 bg-white border border-stone-200 rounded-full flex items-center justify-center text-stone-500 group-hover:text-black transition-colors z-20" }, isUploadingUserAvatar ? /* @__PURE__ */ React58.createElement(HugeiconsIcon44, { icon: Loading03Icon32, size: 12, className: "animate-spin" }) : /* @__PURE__ */ React58.createElement(HugeiconsIcon44, { icon: CloudUploadIcon2, size: 14 })), /* @__PURE__ */ React58.createElement("input", { type: "file", ref: userFileInputRef, className: "hidden", accept: ".png, .jpg, .jpeg", onChange: (e) => handleFileSelect(e, "USER") })), /* @__PURE__ */ React58.createElement("div", null, /* @__PURE__ */ React58.createElement("h2", { className: "text-black text-xl mb-1 tracking-tight" }, "Personal Identity"), /* @__PURE__ */ React58.createElement("p", { className: "text-xs text-stone-500" }, "Update your system display name and contact email.")))), /* @__PURE__ */ React58.createElement("form", { className: "flex flex-col gap-6 w-full max-w-5xl", onSubmit: handleSaveProfile, autoComplete: "off" }, /* @__PURE__ */ React58.createElement("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-6" }, /* @__PURE__ */ React58.createElement(TextInput, { label: "First Name", value: firstName, onChange: (v) => setFirstName(v.replace(/[^a-zA-Z\s-]/g, "").substring(0, 50)), disabled: isSavingProfile, placeholder: "First name", maxLength: 50 }), /* @__PURE__ */ React58.createElement(TextInput, { label: "Last Name", value: lastName, onChange: (v) => setLastName(v.replace(/[^a-zA-Z\s-]/g, "").substring(0, 50)), disabled: isSavingProfile, placeholder: "Last name", maxLength: 50 })), /* @__PURE__ */ React58.createElement("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-6" }, /* @__PURE__ */ React58.createElement(TextInput, { label: "Job Title", value: jobTitle, onChange: (v) => setJobTitle(v.substring(0, 50)), disabled: isSavingProfile, placeholder: "e.g. HR Manager, CEO", maxLength: 50 }), /* @__PURE__ */ React58.createElement("div", { className: "space-y-1.5 w-full" }, /* @__PURE__ */ React58.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block" }, "Email Address"), /* @__PURE__ */ React58.createElement("input", { type: "email", value: initialEmail, disabled: true, className: "w-full pb-3 pt-3 text-sm bg-transparent text-stone-400 border-b border-stone-200 outline-none cursor-not-allowed" }))), /* @__PURE__ */ React58.createElement("div", { className: "space-y-1.5 w-full" }, /* @__PURE__ */ React58.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block" }, "About Me"), /* @__PURE__ */ React58.createElement(
7197
+ }, className: "text-xs tracking-widest text-stone-400 hover:text-black transition-colors outline-none" }, "Cancel")))), activeTab === "ACCOUNT" && /* @__PURE__ */ React58.createElement("div", { className: "flex flex-col gap-6 animate-in fade-in duration-300" }, /* @__PURE__ */ React58.createElement("div", { className: "flex flex-col gap-8 rounded-2xl p-6 bg-white w-full" }, /* @__PURE__ */ React58.createElement("div", { className: "flex items-start justify-between gap-4" }, /* @__PURE__ */ React58.createElement("div", { className: "flex items-center gap-4" }, /* @__PURE__ */ React58.createElement("div", { className: "relative group cursor-pointer shrink-0", onClick: () => !isSavingProfile ? userFileInputRef.current?.click() : void 0 }, /* @__PURE__ */ React58.createElement(MemberAvatar5, { src: avatarUrl, status: "ACTIVE", sizeClass: "w-14 h-14" }), /* @__PURE__ */ React58.createElement("div", { className: "absolute -bottom-1 -right-1 w-6 h-6 bg-white border border-stone-200 rounded-full flex items-center justify-center text-stone-500 group-hover:text-black transition-colors z-20" }, isUploadingUserAvatar ? /* @__PURE__ */ React58.createElement(HugeiconsIcon44, { icon: Loading03Icon31, size: 12, className: "animate-spin" }) : /* @__PURE__ */ React58.createElement(HugeiconsIcon44, { icon: CloudUploadIcon2, size: 14 })), /* @__PURE__ */ React58.createElement("input", { type: "file", ref: userFileInputRef, className: "hidden", accept: ".png, .jpg, .jpeg", onChange: (e) => handleFileSelect(e, "USER") })), /* @__PURE__ */ React58.createElement("div", null, /* @__PURE__ */ React58.createElement("h2", { className: "text-black text-xl mb-1 tracking-tight" }, "Personal Identity"), /* @__PURE__ */ React58.createElement("p", { className: "text-xs text-stone-500" }, "Update your system display name and contact email.")))), /* @__PURE__ */ React58.createElement("form", { className: "flex flex-col gap-6 w-full max-w-5xl", onSubmit: handleSaveProfile, autoComplete: "off" }, /* @__PURE__ */ React58.createElement("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-6" }, /* @__PURE__ */ React58.createElement(TextInput, { label: "First Name", value: firstName, onChange: (v) => setFirstName(v.replace(/[^a-zA-Z\s-]/g, "").substring(0, 50)), disabled: isSavingProfile, placeholder: "First name", maxLength: 50 }), /* @__PURE__ */ React58.createElement(TextInput, { label: "Last Name", value: lastName, onChange: (v) => setLastName(v.replace(/[^a-zA-Z\s-]/g, "").substring(0, 50)), disabled: isSavingProfile, placeholder: "Last name", maxLength: 50 })), /* @__PURE__ */ React58.createElement("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-6" }, /* @__PURE__ */ React58.createElement(TextInput, { label: "Job Title", value: jobTitle, onChange: (v) => setJobTitle(v.substring(0, 50)), disabled: isSavingProfile, placeholder: "e.g. HR Manager, CEO", maxLength: 50 }), /* @__PURE__ */ React58.createElement("div", { className: "space-y-1.5 w-full" }, /* @__PURE__ */ React58.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block" }, "Email Address"), /* @__PURE__ */ React58.createElement("input", { type: "email", value: initialEmail, disabled: true, className: "w-full pb-3 pt-3 text-sm bg-transparent text-stone-400 border-b border-stone-200 outline-none cursor-not-allowed" }))), /* @__PURE__ */ React58.createElement("div", { className: "space-y-1.5 w-full" }, /* @__PURE__ */ React58.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block" }, "About Me"), /* @__PURE__ */ React58.createElement(
7170
7198
  "textarea",
7171
7199
  {
7172
7200
  value: description,
@@ -7180,9 +7208,15 @@ var UniversalSettings2 = ({
7180
7208
  };
7181
7209
 
7182
7210
  // src/components/UniversalDeveloperSettings.tsx
7183
- import React59, { useState as useState43, useEffect as useEffect25 } from "react";
7184
- import { toast as toast19 } from "react-hot-toast";
7211
+ import React59, { useState as useState43, useEffect as useEffect24 } from "react";
7212
+ import toast19 from "react-hot-toast";
7213
+ import { HugeiconsIcon as HugeiconsIcon45 } from "@hugeicons/react";
7214
+ import {
7215
+ ArrowLeft01Icon as ArrowLeft01Icon24,
7216
+ CircleLock02Icon as CircleLock02Icon6
7217
+ } from "@hugeicons/core-free-icons";
7185
7218
  var UniversalDeveloperSettings = ({
7219
+ onBackHref = "/app",
7186
7220
  initialPublicKey,
7187
7221
  initialWebhookUrl,
7188
7222
  isReadOnly = false,
@@ -7194,7 +7228,7 @@ var UniversalDeveloperSettings = ({
7194
7228
  const [isGenerating, setIsGenerating] = useState43(false);
7195
7229
  const [isSavingWebhook, setIsSavingWebhook] = useState43(false);
7196
7230
  const [isRollModalOpen, setIsRollModalOpen] = useState43(false);
7197
- useEffect25(() => {
7231
+ useEffect24(() => {
7198
7232
  setPublicKey(initialPublicKey || "");
7199
7233
  setWebhookUrl(initialWebhookUrl || "");
7200
7234
  }, [initialPublicKey, initialWebhookUrl]);
@@ -7254,28 +7288,30 @@ AUDDITUR_SECRET_KEY="${secKey}"
7254
7288
  };
7255
7289
  const hasWebhookChanges = webhookUrl !== initialWebhookUrl;
7256
7290
  const isWebhookSaveDisabled = isSavingWebhook || isReadOnly || !hasWebhookChanges;
7257
- return /* @__PURE__ */ React59.createElement("div", { className: "flex flex-col max-w-3xl rounded-2xl p-6 bg-white gap-8 animate-in fade-in duration-300 min-h-full" }, /* @__PURE__ */ React59.createElement(ManagedToaster, null), /* @__PURE__ */ React59.createElement("div", { className: "flex flex-col sm:flex-row sm:items-start justify-between gap-3 sm:gap-4" }, /* @__PURE__ */ React59.createElement("div", { className: "flex flex-col min-w-0 gap-1" }, /* @__PURE__ */ React59.createElement("div", { className: "flex items-center" }, /* @__PURE__ */ React59.createElement("h1", { className: "font-serif text-xl text-black truncate tracking-tight" }, "Developer Settings")), /* @__PURE__ */ React59.createElement("p", { className: "text-xs text-neutral-500 truncate" }, "Manage your API credentials and webhook integrations.")), isReadOnly && /* @__PURE__ */ React59.createElement("span", { className: "px-3 py-1 bg-neutral-50 text-neutral-500 rounded-full text-[10px] tracking-[0.2em] shrink-0 w-fit sm:mt-1" }, "Read Only Access")), /* @__PURE__ */ React59.createElement("div", { className: "w-full max-w-2xl flex flex-col gap-12" }, /* @__PURE__ */ React59.createElement("div", { className: "flex flex-col gap-6" }, /* @__PURE__ */ React59.createElement("div", { className: "space-y-2 min-w-0" }, /* @__PURE__ */ React59.createElement(
7291
+ return /* @__PURE__ */ React59.createElement("div", { className: "w-full max-w-4xl mx-auto flex flex-col animate-in fade-in duration-300 relative" }, /* @__PURE__ */ React59.createElement(ManagedToaster, null), /* @__PURE__ */ React59.createElement("div", { className: "mb-6 flex w-full items-center px-1" }, /* @__PURE__ */ React59.createElement("a", { href: onBackHref, className: "flex items-center gap-2 text-[#d97757] hover:text-[#d97757] transition-colors text-sm outline-none" }, /* @__PURE__ */ React59.createElement(HugeiconsIcon45, { icon: ArrowLeft01Icon24, size: 16 }), " Back")), /* @__PURE__ */ React59.createElement("div", { className: "flex flex-col gap-1 mb-6 px-1" }, /* @__PURE__ */ React59.createElement("h1", { className: "text-black text-xl tracking-tight" }, "Developer Settings"), /* @__PURE__ */ React59.createElement("p", { className: "text-xs text-stone-500" }, "Manage your API credentials and webhook integrations.")), /* @__PURE__ */ React59.createElement("div", { className: "flex flex-col gap-8 animate-in rounded-2xl p-6 bg-white fade-in duration-300" }, isReadOnly && /* @__PURE__ */ React59.createElement("div", { className: "flex items-start gap-3 p-4 bg-stone-50 rounded-xl" }, /* @__PURE__ */ React59.createElement(HugeiconsIcon45, { icon: CircleLock02Icon6, size: 20, className: "text-stone-500 shrink-0 mt-0.5" }), /* @__PURE__ */ React59.createElement("div", { className: "flex flex-col" }, /* @__PURE__ */ React59.createElement("span", { className: "text-sm text-black tracking-tight" }, "Access Restricted"), /* @__PURE__ */ React59.createElement("span", { className: "text-xs text-stone-500 mt-1 leading-relaxed" }, "You lack clearance to modify developer settings. Only Owners, Admins, or Managers can roll keys or update webhooks."))), /* @__PURE__ */ React59.createElement("div", { className: "flex flex-col gap-8" }, /* @__PURE__ */ React59.createElement("div", { className: "flex flex-col gap-6" }, /* @__PURE__ */ React59.createElement("div", { className: "space-y-1.5 w-full" }, /* @__PURE__ */ React59.createElement(
7258
7292
  TextInput,
7259
7293
  {
7260
7294
  label: "Public Key",
7261
7295
  value: publicKey || "No key generated yet",
7262
7296
  onChange: () => {
7263
7297
  },
7264
- disabled: true
7298
+ disabled: true,
7299
+ placeholder: "pk_live_..."
7265
7300
  }
7266
- ), /* @__PURE__ */ React59.createElement("p", { className: "text-[10px] text-neutral-400 mt-1 leading-snug" }, "Your public key is used to identify your application. Your secret key will only be shown once upon generation.")), /* @__PURE__ */ React59.createElement("div", { className: "flex items-center gap-4" }, /* @__PURE__ */ React59.createElement(
7301
+ ), /* @__PURE__ */ React59.createElement("p", { className: "text-xs text-stone-500 mt-2 leading-relaxed" }, "Your public key is used to identify your application. Your secret key will only be shown once upon generation.")), /* @__PURE__ */ React59.createElement("div", { className: "flex" }, /* @__PURE__ */ React59.createElement(
7267
7302
  ThreeDActionButton,
7268
7303
  {
7304
+ type: "button",
7269
7305
  onClick: () => {
7270
7306
  if (publicKey) setIsRollModalOpen(true);
7271
7307
  else handleGenerateKeys();
7272
7308
  },
7273
7309
  disabled: isGenerating || isReadOnly,
7274
7310
  isLoading: isGenerating,
7275
- className: "w-fit"
7311
+ className: "w-full sm:w-auto min-w-40"
7276
7312
  },
7277
7313
  publicKey ? "Roll API Keys" : "Generate Keys"
7278
- ))), /* @__PURE__ */ React59.createElement("form", { className: "flex flex-col gap-6 border-t border-neutral-100 pt-8", onSubmit: handleSaveWebhook, autoComplete: "off" }, /* @__PURE__ */ React59.createElement("div", { className: "space-y-2 min-w-0" }, /* @__PURE__ */ React59.createElement(
7314
+ ))), /* @__PURE__ */ React59.createElement("form", { className: "flex flex-col gap-6 border-t border-stone-100 pt-8", onSubmit: handleSaveWebhook, autoComplete: "off" }, /* @__PURE__ */ React59.createElement("div", { className: "space-y-1.5 w-full" }, /* @__PURE__ */ React59.createElement(
7279
7315
  TextInput,
7280
7316
  {
7281
7317
  label: "Webhook URL",
@@ -7285,29 +7321,29 @@ AUDDITUR_SECRET_KEY="${secKey}"
7285
7321
  placeholder: "https://your-domain.com/webhook",
7286
7322
  type: "url"
7287
7323
  }
7288
- ), /* @__PURE__ */ React59.createElement("p", { className: "text-[10px] text-neutral-400 mt-1 leading-snug" }, "We will send secure POST requests to this endpoint when significant events occur. Must use HTTPS.")), /* @__PURE__ */ React59.createElement("div", { className: "flex flex-col sm:flex-row sm:items-center justify-between mt-2 gap-6 sm:gap-4" }, /* @__PURE__ */ React59.createElement("div", { className: "flex items-center gap-6 min-w-0" }, /* @__PURE__ */ React59.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ React59.createElement("span", { className: "text-[10px] text-neutral-400 tracking-[0.2em] block truncate uppercase" }, "Webhook Status"), /* @__PURE__ */ React59.createElement("span", { className: `text-xs block truncate ${webhookUrl ? "text-emerald-600" : "text-neutral-400"}` }, webhookUrl ? "Active" : "Inactive"))), /* @__PURE__ */ React59.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__ */ React59.createElement(
7289
- "button",
7290
- {
7291
- type: "button",
7292
- onClick: () => setWebhookUrl(initialWebhookUrl),
7293
- 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"
7294
- },
7295
- "Cancel"
7296
- ), /* @__PURE__ */ React59.createElement(
7324
+ ), /* @__PURE__ */ React59.createElement("div", { className: "flex flex-col sm:flex-row sm:items-center justify-between mt-2 gap-2" }, /* @__PURE__ */ React59.createElement("p", { className: "text-xs text-stone-500 leading-relaxed" }, "We will send secure POST requests to this endpoint when significant events occur. Must use HTTPS."), /* @__PURE__ */ React59.createElement("span", { className: `text-[10px] tracking-widest uppercase font-medium ${webhookUrl ? "text-emerald-600" : "text-stone-400"}` }, webhookUrl ? "Active" : "Inactive"))), /* @__PURE__ */ React59.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ React59.createElement(
7297
7325
  ThreeDActionButton,
7298
7326
  {
7299
7327
  type: "submit",
7300
7328
  disabled: isWebhookSaveDisabled,
7301
7329
  isLoading: isSavingWebhook,
7302
- className: "min-w-32 w-full sm:w-auto"
7330
+ className: "w-full sm:w-auto min-w-40"
7303
7331
  },
7304
7332
  "Save Webhook"
7333
+ ), hasWebhookChanges && !isSavingWebhook && !isReadOnly && /* @__PURE__ */ React59.createElement(
7334
+ "button",
7335
+ {
7336
+ type: "button",
7337
+ onClick: () => setWebhookUrl(initialWebhookUrl),
7338
+ className: "px-4 py-2 text-stone-500 hover:text-black transition-colors outline-none text-xs font-medium"
7339
+ },
7340
+ "Cancel"
7305
7341
  ))))), /* @__PURE__ */ React59.createElement(
7306
7342
  ConfirmationDialog,
7307
7343
  {
7308
7344
  isOpen: isRollModalOpen && !isReadOnly,
7309
7345
  title: "Roll API Keys",
7310
- message: "Are you sure you want to roll your keys? This will permanently invalidate your current secret key and active MCP tokens.",
7346
+ message: "Are you sure you want to roll your keys? This will permanently invalidate your current secret key and active integrations.",
7311
7347
  confirmText: "Roll Keys",
7312
7348
  cancelText: "Cancel",
7313
7349
  isProcessing: isGenerating,
@@ -7320,10 +7356,10 @@ AUDDITUR_SECRET_KEY="${secKey}"
7320
7356
 
7321
7357
  // src/components/UniversalApplicationPage2.tsx
7322
7358
  import React60, { useState as useState44, useRef as useRef18 } from "react";
7323
- import { HugeiconsIcon as HugeiconsIcon45 } from "@hugeicons/react";
7359
+ import { HugeiconsIcon as HugeiconsIcon46 } from "@hugeicons/react";
7324
7360
  import {
7325
- Search01Icon as Search01Icon10,
7326
- SearchList02Icon as SearchList02Icon5
7361
+ Search01Icon as Search01Icon9,
7362
+ SearchList02Icon as SearchList02Icon4
7327
7363
  } from "@hugeicons/core-free-icons";
7328
7364
  var UniversalApplicationPage2 = ({
7329
7365
  userRole = "MEMBER",
@@ -7357,10 +7393,9 @@ var UniversalApplicationPage2 = ({
7357
7393
  "COMPLETED",
7358
7394
  "PENDING",
7359
7395
  "REJECTED",
7360
- "QUERIED",
7361
- "AWAITING_PAYMENT"
7396
+ "QUERIED"
7362
7397
  ];
7363
- return /* @__PURE__ */ React60.createElement("div", { className: "w-full max-w-4xl mx-auto flex flex-col animate-in fade-in duration-300 relative" }, /* @__PURE__ */ React60.createElement("div", { className: "flex flex-col gap-1 mb-8 px-1" }, /* @__PURE__ */ React60.createElement("div", { className: "flex items-center" }, /* @__PURE__ */ React60.createElement("h1", { className: "text-black text-xl tracking-tight" }, "Applications Directory")), /* @__PURE__ */ React60.createElement("p", { className: "text-xs text-stone-500" }, "Search, filter, and track all your organizational applications.")), /* @__PURE__ */ React60.createElement("div", { className: "flex flex-row flex-nowrap mb-2 items-center justify-between gap-4 w-full px-1" }, /* @__PURE__ */ React60.createElement("div", { className: "relative flex-1 min-w-0 max-w-full" }, /* @__PURE__ */ React60.createElement("div", { className: "absolute inset-y-0 left-0 pl-4 flex items-center pointer-events-none" }, /* @__PURE__ */ React60.createElement(HugeiconsIcon45, { icon: Search01Icon10, size: 16, className: "text-stone-400" })), /* @__PURE__ */ React60.createElement(
7398
+ return /* @__PURE__ */ React60.createElement("div", { className: "w-full max-w-4xl mx-auto flex flex-col animate-in fade-in duration-300 relative" }, /* @__PURE__ */ React60.createElement("div", { className: "flex flex-col gap-1 mb-8 px-1" }, /* @__PURE__ */ React60.createElement("div", { className: "flex items-center" }, /* @__PURE__ */ React60.createElement("h1", { className: "text-black text-xl tracking-tight" }, "Applications Directory")), /* @__PURE__ */ React60.createElement("p", { className: "text-xs text-stone-500" }, "Search, filter, and track all your organizational applications.")), /* @__PURE__ */ React60.createElement("div", { className: "flex flex-row flex-nowrap mb-2 items-center justify-between gap-4 w-full px-1" }, /* @__PURE__ */ React60.createElement("div", { className: "relative flex-1 min-w-0 max-w-full" }, /* @__PURE__ */ React60.createElement("div", { className: "absolute inset-y-0 left-0 pl-4 flex items-center pointer-events-none" }, /* @__PURE__ */ React60.createElement(HugeiconsIcon46, { icon: Search01Icon9, size: 16, className: "text-stone-400" })), /* @__PURE__ */ React60.createElement(
7364
7399
  "input",
7365
7400
  {
7366
7401
  type: "text",
@@ -7375,7 +7410,7 @@ var UniversalApplicationPage2 = ({
7375
7410
  onClick: () => setShowStatusModal(true),
7376
7411
  className: "flex items-center justify-center bg-white shadow-[0_2px_10px_rgba(0,0,0,0.02)] w-10 h-10 rounded-full text-stone-500 hover:text-black transition-colors outline-none relative"
7377
7412
  },
7378
- /* @__PURE__ */ React60.createElement(HugeiconsIcon45, { icon: SearchList02Icon5, size: 18 }),
7413
+ /* @__PURE__ */ React60.createElement(HugeiconsIcon46, { icon: SearchList02Icon4, size: 18 }),
7379
7414
  activeStatusFilter !== "ALL" && /* @__PURE__ */ React60.createElement("span", { className: "absolute top-2 right-2 w-2 h-2 bg-[#d97757] rounded-full border border-white" })
7380
7415
  ))), /* @__PURE__ */ React60.createElement("div", { className: "w-full mt-2" }, /* @__PURE__ */ React60.createElement(
7381
7416
  UniversalApplicationsPage,
@@ -7408,8 +7443,8 @@ var UniversalApplicationPage2 = ({
7408
7443
 
7409
7444
  // src/components/UniversalApplicationDetails.tsx
7410
7445
  import React61, { useState as useState45 } from "react";
7411
- import { HugeiconsIcon as HugeiconsIcon46 } from "@hugeicons/react";
7412
- import { ArrowLeft01Icon as ArrowLeft01Icon24 } from "@hugeicons/core-free-icons";
7446
+ import { HugeiconsIcon as HugeiconsIcon47 } from "@hugeicons/react";
7447
+ import { ArrowLeft01Icon as ArrowLeft01Icon25 } from "@hugeicons/core-free-icons";
7413
7448
  var formatType2 = (type) => type.split("_").map((w) => w[0] + w.slice(1).toLowerCase()).join(" ");
7414
7449
  var UniversalApplicationDetails = ({
7415
7450
  onBackHref,
@@ -7436,36 +7471,36 @@ var UniversalApplicationDetails = ({
7436
7471
  isOpen: confirmDialog,
7437
7472
  title: "Delete Application",
7438
7473
  message: "Are you sure you want to permanently delete this application and its assets? This action cannot be undone.",
7439
- confirmText: "Delete Application",
7474
+ confirmText: "Delete",
7440
7475
  cancelText: "Cancel",
7441
7476
  isProcessing: isDeleting,
7442
7477
  isDestructive: true,
7443
7478
  onClose: () => setConfirmDialog(false),
7444
7479
  onConfirm: handleDelete
7445
7480
  }
7446
- ), /* @__PURE__ */ React61.createElement("div", { className: "mb-6 flex w-full items-center px-1" }, /* @__PURE__ */ React61.createElement("a", { href: onBackHref, className: "flex items-center gap-2 text-[#d97757] hover:text-[#d97757] transition-colors text-sm outline-none" }, /* @__PURE__ */ React61.createElement(HugeiconsIcon46, { icon: ArrowLeft01Icon24, size: 16 }), " Back")), /* @__PURE__ */ React61.createElement("div", { className: "mb-8 px-1 flex flex-col sm:flex-row sm:items-center justify-between gap-4" }, /* @__PURE__ */ React61.createElement("div", null, /* @__PURE__ */ React61.createElement("h1", { className: "text-black text-xl tracking-tight" }, "Application Details"), /* @__PURE__ */ React61.createElement("p", { className: "text-xs text-stone-500" }, "Review your filing entity and access its workspace.")), /* @__PURE__ */ React61.createElement("div", { className: "px-4 py-1.5 bg-stone-100 text-stone-600 rounded-full text-xs self-start sm:self-auto uppercase tracking-widest " }, application.status)), /* @__PURE__ */ React61.createElement("div", { className: "flex flex-col gap-8 animate-in rounded-2xl p-6 bg-white fade-in duration-300" }, /* @__PURE__ */ React61.createElement("div", { className: "flex flex-col gap-1 w-full" }, /* @__PURE__ */ React61.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block" }, "Target Company"), /* @__PURE__ */ React61.createElement("span", { className: "text-sm text-black py-2 " }, application.name)), /* @__PURE__ */ React61.createElement("div", { className: "flex flex-col gap-1 w-full border-t border-stone-100 pt-6" }, /* @__PURE__ */ React61.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block" }, "Filing Type"), /* @__PURE__ */ React61.createElement("span", { className: "text-sm text-black py-2" }, formatType2(application.type))), /* @__PURE__ */ React61.createElement("div", { className: "flex flex-col sm:flex-row items-center gap-3 pt-6 mt-2 border-t border-stone-100" }, /* @__PURE__ */ React61.createElement("a", { href: `/app/applications/app/${application.id}`, className: "flex-1 w-full py-2.5 bg-[#d97757] text-white rounded-full text-center text-xs transition-colors hover:bg-[#d97757]/90" }, "Open Application"), /* @__PURE__ */ React61.createElement("a", { href: `/app/applications/assets/${application.id}`, className: "flex-1 w-full py-2.5 bg-transparent border border-stone-200 text-black rounded-full text-center text-xs transition-colors hover:bg-stone-50" }, "Application Assets"), deletePermitted && /* @__PURE__ */ React61.createElement("button", { onClick: () => setConfirmDialog(true), className: "flex-1 w-full py-2.5 bg-transparent border border-stone-200 text-black rounded-full text-center text-xs transition-colors hover:bg-stone-50" }, "Delete Application"))));
7481
+ ), /* @__PURE__ */ React61.createElement("div", { className: "mb-6 flex w-full items-center px-1" }, /* @__PURE__ */ React61.createElement("a", { href: onBackHref, className: "flex items-center gap-2 text-[#d97757] hover:text-[#d97757] transition-colors text-sm outline-none" }, /* @__PURE__ */ React61.createElement(HugeiconsIcon47, { icon: ArrowLeft01Icon25, size: 16 }), " Back")), /* @__PURE__ */ React61.createElement("div", { className: "mb-8 px-1 flex flex-col sm:flex-row sm:items-center justify-between gap-4" }, /* @__PURE__ */ React61.createElement("div", null, /* @__PURE__ */ React61.createElement("h1", { className: "text-black text-xl tracking-tight" }, "Application Details"), /* @__PURE__ */ React61.createElement("p", { className: "text-xs text-stone-500" }, "Review your filing entity and access its workspace.")), /* @__PURE__ */ React61.createElement("div", { className: "px-4 py-1.5 bg-stone-200 text-stone-600 rounded-full text-xs self-start sm:self-auto uppercase tracking-widest " }, application.status)), /* @__PURE__ */ React61.createElement("div", { className: "flex flex-col gap-8 animate-in rounded-2xl p-6 bg-white fade-in duration-300" }, /* @__PURE__ */ React61.createElement("div", { className: "flex flex-col gap-1 w-full" }, /* @__PURE__ */ React61.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block" }, "Target Company"), /* @__PURE__ */ React61.createElement("span", { className: "text-sm text-black py-2 " }, application.name)), /* @__PURE__ */ React61.createElement("div", { className: "flex flex-col gap-1 w-full border-t border-stone-100 pt-6" }, /* @__PURE__ */ React61.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block" }, "Filing Type"), /* @__PURE__ */ React61.createElement("span", { className: "text-sm text-black py-2" }, formatType2(application.type))), /* @__PURE__ */ React61.createElement("div", { className: "flex flex-col sm:flex-row items-center gap-3 pt-6 mt-2 border-t border-stone-100" }, /* @__PURE__ */ React61.createElement("a", { href: `/app/applications/app/${application.id}`, className: "flex-1 w-full py-2.5 bg-[#d97757] text-white rounded-full text-center text-xs transition-colors hover:bg-[#d97757]/90" }, "Open Application"), /* @__PURE__ */ React61.createElement("a", { href: `/app/applications/assets/${application.id}`, className: "flex-1 w-full py-2.5 bg-transparent border border-stone-200 text-black rounded-full text-center text-xs transition-colors hover:bg-stone-50" }, "Application Assets"), deletePermitted && /* @__PURE__ */ React61.createElement("button", { onClick: () => setConfirmDialog(true), className: "flex-1 w-full py-2.5 bg-transparent border border-stone-200 text-black rounded-full text-center text-xs transition-colors hover:bg-stone-50" }, "Delete Application"))));
7447
7482
  };
7448
7483
 
7449
7484
  // src/components/UniversalCreateApplication.tsx
7450
- import React62, { useState as useState46, useRef as useRef19, useEffect as useEffect26 } from "react";
7485
+ import React62, { useState as useState46, useRef as useRef19, useEffect as useEffect25 } from "react";
7451
7486
  import toast20 from "react-hot-toast";
7452
- import { HugeiconsIcon as HugeiconsIcon47 } from "@hugeicons/react";
7487
+ import { HugeiconsIcon as HugeiconsIcon48 } from "@hugeicons/react";
7453
7488
  import {
7454
- ArrowLeft01Icon as ArrowLeft01Icon25,
7489
+ ArrowLeft01Icon as ArrowLeft01Icon26,
7455
7490
  ArrowRight01Icon as ArrowRight01Icon19,
7456
- Loading03Icon as Loading03Icon33,
7457
- Search01Icon as Search01Icon11,
7458
- CircleLock02Icon as CircleLock02Icon6,
7491
+ Loading03Icon as Loading03Icon32,
7492
+ Search01Icon as Search01Icon10,
7493
+ CircleLock02Icon as CircleLock02Icon7,
7459
7494
  CheckmarkCircle02Icon as CheckmarkCircle02Icon2,
7460
7495
  Building03Icon,
7461
7496
  File02Icon,
7462
- Tick02Icon as Tick02Icon4
7497
+ Tick02Icon as Tick02Icon5
7463
7498
  } from "@hugeicons/core-free-icons";
7464
7499
  var MemberAvatar6 = ({ src, sizeClass = "w-10 h-10" }) => {
7465
7500
  const [loaded, setLoaded] = useState46(false);
7466
7501
  const [error, setError] = useState46(false);
7467
7502
  const defaultAvatar = "https://storage.googleapis.com/retina-cloud-v2/assets/images/avatar.avif";
7468
- return /* @__PURE__ */ React62.createElement("div", { className: `relative shrink-0 ${sizeClass}` }, /* @__PURE__ */ React62.createElement("div", { className: "w-full h-full rounded-lg bg-stone-100 flex items-center justify-center overflow-hidden" }, !loaded && !error && /* @__PURE__ */ React62.createElement(HugeiconsIcon47, { icon: Loading03Icon33, className: "animate-spin text-stone-400 absolute", size: 14 }), /* @__PURE__ */ React62.createElement("img", { src: error || !src ? defaultAvatar : src, alt: "Avatar", className: `w-full h-full object-cover transition-opacity duration-300 ${loaded || error ? "opacity-100" : "opacity-0"}`, onLoad: () => setLoaded(true), onError: () => setError(true) })));
7503
+ return /* @__PURE__ */ React62.createElement("div", { className: `relative shrink-0 ${sizeClass}` }, /* @__PURE__ */ React62.createElement("div", { className: "w-full h-full rounded-lg bg-stone-100 flex items-center justify-center overflow-hidden" }, !loaded && !error && /* @__PURE__ */ React62.createElement(HugeiconsIcon48, { icon: Loading03Icon32, className: "animate-spin text-stone-400 absolute", size: 14 }), /* @__PURE__ */ React62.createElement("img", { src: error || !src ? defaultAvatar : src, alt: "Avatar", className: `w-full h-full object-cover transition-opacity duration-300 ${loaded || error ? "opacity-100" : "opacity-0"}`, onLoad: () => setLoaded(true), onError: () => setError(true) })));
7469
7504
  };
7470
7505
  var UniversalCreateApplication = ({
7471
7506
  onBackHref,
@@ -7491,7 +7526,7 @@ var UniversalCreateApplication = ({
7491
7526
  const [creationMode, setCreationMode] = useState46("EXISTING");
7492
7527
  const defaultTypeKey = applicationTypesMeta.length > 0 ? applicationTypesMeta[0].key : "";
7493
7528
  const [selectedTypeKey, setSelectedTypeKey] = useState46(defaultTypeKey);
7494
- useEffect26(() => {
7529
+ useEffect25(() => {
7495
7530
  if (!selectedTypeKey && applicationTypesMeta.length > 0) {
7496
7531
  setSelectedTypeKey(applicationTypesMeta[0].key);
7497
7532
  }
@@ -7556,7 +7591,7 @@ var UniversalCreateApplication = ({
7556
7591
  { id: "EXISTING", label: "Select Company" },
7557
7592
  { id: "NEW", label: "New Company" }
7558
7593
  ];
7559
- return /* @__PURE__ */ React62.createElement("div", { className: "w-full max-w-4xl mx-auto flex flex-col animate-in fade-in duration-300 relative" }, /* @__PURE__ */ React62.createElement(ManagedToaster, null), /* @__PURE__ */ React62.createElement("div", { className: "mb-6 flex w-full items-center px-1" }, /* @__PURE__ */ React62.createElement("a", { href: onBackHref, className: "flex items-center gap-2 text-[#d97757] hover:text-[#d97757] transition-colors text-sm outline-none" }, /* @__PURE__ */ React62.createElement(HugeiconsIcon47, { icon: ArrowLeft01Icon25, size: 16 }), " Back")), /* @__PURE__ */ React62.createElement("div", { className: "flex flex-col gap-1 mb-6 px-1" }, /* @__PURE__ */ React62.createElement("h1", { className: "text-black text-xl tracking-tight" }, "Create Application"), /* @__PURE__ */ React62.createElement("p", { className: "text-xs text-stone-500" }, "Initiate a new registration or filing for a company.")), /* @__PURE__ */ React62.createElement("div", { className: "flex items-center mb-4 w-full animate-in fade-in duration-300 px-2" }, /* @__PURE__ */ React62.createElement("div", { className: "flex items-center bg-white rounded-full p-1 sm:p-1.5 max-w-full overflow-x-auto custom-scrollbar" }, modeTabs.map((tab) => {
7594
+ return /* @__PURE__ */ React62.createElement("div", { className: "w-full max-w-4xl mx-auto flex flex-col animate-in fade-in duration-300 relative" }, /* @__PURE__ */ React62.createElement(ManagedToaster, null), /* @__PURE__ */ React62.createElement("div", { className: "mb-6 flex w-full items-center px-1" }, /* @__PURE__ */ React62.createElement("a", { href: onBackHref, className: "flex items-center gap-2 text-[#d97757] hover:text-[#d97757] transition-colors text-sm outline-none" }, /* @__PURE__ */ React62.createElement(HugeiconsIcon48, { icon: ArrowLeft01Icon26, size: 16 }), " Back")), /* @__PURE__ */ React62.createElement("div", { className: "flex flex-col gap-1 mb-6 px-1" }, /* @__PURE__ */ React62.createElement("h1", { className: "text-black text-xl tracking-tight" }, "Create Application"), /* @__PURE__ */ React62.createElement("p", { className: "text-xs text-stone-500" }, "Initiate a new registration or filing for a company.")), /* @__PURE__ */ React62.createElement("div", { className: "flex items-center mb-4 w-full animate-in fade-in duration-300 px-2" }, /* @__PURE__ */ React62.createElement("div", { className: "flex items-center bg-white rounded-full p-1 sm:p-1.5 max-w-full overflow-x-auto custom-scrollbar" }, modeTabs.map((tab) => {
7560
7595
  const isActive = creationMode === tab.id;
7561
7596
  return /* @__PURE__ */ React62.createElement(
7562
7597
  "button",
@@ -7569,7 +7604,7 @@ var UniversalCreateApplication = ({
7569
7604
  },
7570
7605
  tab.label
7571
7606
  );
7572
- }))), /* @__PURE__ */ React62.createElement("div", { className: "flex flex-col gap-8 animate-in rounded-2xl p-6 bg-white fade-in duration-300" }, /* @__PURE__ */ React62.createElement("form", { className: "flex flex-col gap-8", onSubmit: handleSubmit, autoComplete: "off" }, !canManage && /* @__PURE__ */ React62.createElement("div", { className: "flex items-start gap-3 p-4 bg-stone-50 rounded-xl" }, /* @__PURE__ */ React62.createElement(HugeiconsIcon47, { icon: CircleLock02Icon6, size: 20, className: "text-stone-500 shrink-0 mt-0.5" }), /* @__PURE__ */ React62.createElement("div", { className: "flex flex-col" }, /* @__PURE__ */ React62.createElement("span", { className: "text-sm text-black tracking-tight" }, "Access Restricted"), /* @__PURE__ */ React62.createElement("span", { className: "text-xs text-stone-500 mt-1 leading-relaxed" }, "You lack clearance to create applications."))), creationMode === "EXISTING" ? /* @__PURE__ */ React62.createElement("div", { className: "space-y-1.5 w-full" }, /* @__PURE__ */ React62.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block" }, "Target Company"), /* @__PURE__ */ React62.createElement("div", { onClick: () => canManage && !isSubmitting && setShowCompaniesModal(true), className: `flex items-center relative w-full border-b border-stone-200 transition-all duration-300 pb-3 pt-3 ${!canManage || isSubmitting ? "opacity-50 pointer-events-none" : "hover:border-black cursor-pointer"}` }, /* @__PURE__ */ React62.createElement(HugeiconsIcon47, { icon: Building03Icon, size: 16, className: "text-stone-400 absolute left-0" }), /* @__PURE__ */ React62.createElement("span", { className: `w-full pl-8 text-sm truncate block ${activeCompany ? "text-black" : "text-stone-400"}` }, activeCompany ? activeCompany.name : "Select an existing company..."))) : /* @__PURE__ */ React62.createElement(React62.Fragment, null, /* @__PURE__ */ React62.createElement(TextInput, { label: "Company Name", value: newCompanyName, onChange: (val) => setNewCompanyName(val), disabled: isSubmitting || !canManage, placeholder: "e.g. Acme Innovations Ltd.", maxLength: 80 }), /* @__PURE__ */ React62.createElement("div", { className: `flex items-center justify-between py-2 mt-2 ${!canManage ? "opacity-50 pointer-events-none" : ""}` }, /* @__PURE__ */ React62.createElement("div", { className: "flex flex-col" }, /* @__PURE__ */ React62.createElement("span", { className: "text-sm text-black tracking-tight" }, "Private Company"), /* @__PURE__ */ React62.createElement("span", { className: "text-xs text-stone-500" }, "Only assigned members can view and access its applications.")), /* @__PURE__ */ React62.createElement("button", { type: "button", onClick: () => setIsPrivate(!isPrivate), disabled: !canManage || isSubmitting, className: `relative w-11 h-6 rounded-full transition-colors outline-none shrink-0 ${isPrivate ? "bg-[#d97757]" : "bg-stone-200"}` }, /* @__PURE__ */ React62.createElement("div", { className: `absolute top-1 left-1 bg-white w-4 h-4 rounded-full transition-transform ${isPrivate ? "translate-x-5" : "translate-x-0"}` }))), isPrivate && /* @__PURE__ */ React62.createElement("div", { className: `flex items-center justify-between animate-in fade-in zoom-in-95 duration-200 bg-stone-50 p-4 rounded-xl ${!canManage ? "opacity-50" : ""}` }, /* @__PURE__ */ React62.createElement("div", { className: "flex flex-col" }, /* @__PURE__ */ React62.createElement("span", { className: "text-xs text-black tracking-tight" }, "Members"), /* @__PURE__ */ React62.createElement("span", { className: "text-xs text-[#d97757]" }, selectedParticipants.size, " added")), /* @__PURE__ */ React62.createElement("button", { type: "button", onClick: () => setShowMembersModal(true), disabled: !canManage || isSubmitting, className: "px-4 py-2 border border-stone-200 text-black text-xs tracking-wide rounded-full hover:bg-white transition-colors outline-none bg-transparent" }, "Manage Access"))), /* @__PURE__ */ React62.createElement("div", { className: "space-y-1.5 w-full" }, /* @__PURE__ */ React62.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block" }, "Application Type"), /* @__PURE__ */ React62.createElement("div", { onClick: () => canManage && !isSubmitting && setShowTypeModal(true), className: `flex items-center relative w-full border-b border-stone-200 transition-all duration-300 pb-3 pt-3 ${!canManage || isSubmitting ? "opacity-50 pointer-events-none" : "hover:border-black cursor-pointer"}` }, /* @__PURE__ */ React62.createElement(HugeiconsIcon47, { icon: File02Icon, size: 16, className: "text-stone-400 absolute left-0" }), /* @__PURE__ */ React62.createElement("span", { className: "w-full pl-8 text-sm text-black truncate block" }, activeTypeObj?.label || "Select Type..."))), canManage && /* @__PURE__ */ React62.createElement("div", { className: "pt-6" }, /* @__PURE__ */ React62.createElement(ThreeDActionButton, { type: "submit", disabled: isSubmitting || !selectedTypeKey || creationMode === "EXISTING" && !selectedCompanyId || creationMode === "NEW" && newCompanyName.length < 2, isLoading: isSubmitting, className: "w-full sm:w-auto min-w-40" }, "Create Application")))), showTypeModal && canManage && /* @__PURE__ */ React62.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ React62.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setShowTypeModal(false) }), /* @__PURE__ */ React62.createElement("div", { className: "relative w-full max-w-md bg-white rounded-2xl flex flex-col overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200 h-[80vh]" }, /* @__PURE__ */ React62.createElement("div", { className: "flex items-center justify-between p-5 shrink-0" }, /* @__PURE__ */ React62.createElement("h3", { className: "text-sm text-black tracking-tight " }, "Application Type"), /* @__PURE__ */ React62.createElement("button", { onClick: () => setShowTypeModal(false), className: "text-[#d97757] outline-none text-sm" }, "Done")), /* @__PURE__ */ React62.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-3 space-y-2" }, applicationTypesMeta.map((item) => {
7607
+ }))), /* @__PURE__ */ React62.createElement("div", { className: "flex flex-col gap-8 animate-in rounded-2xl p-6 bg-white fade-in duration-300" }, /* @__PURE__ */ React62.createElement("form", { className: "flex flex-col gap-8", onSubmit: handleSubmit, autoComplete: "off" }, !canManage && /* @__PURE__ */ React62.createElement("div", { className: "flex items-start gap-3 p-4 bg-stone-50 rounded-xl" }, /* @__PURE__ */ React62.createElement(HugeiconsIcon48, { icon: CircleLock02Icon7, size: 20, className: "text-stone-500 shrink-0 mt-0.5" }), /* @__PURE__ */ React62.createElement("div", { className: "flex flex-col" }, /* @__PURE__ */ React62.createElement("span", { className: "text-sm text-black tracking-tight" }, "Access Restricted"), /* @__PURE__ */ React62.createElement("span", { className: "text-xs text-stone-500 mt-1 leading-relaxed" }, "You lack clearance to create applications."))), creationMode === "EXISTING" ? /* @__PURE__ */ React62.createElement("div", { className: "space-y-1.5 w-full" }, /* @__PURE__ */ React62.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block" }, "Target Company"), /* @__PURE__ */ React62.createElement("div", { onClick: () => canManage && !isSubmitting && setShowCompaniesModal(true), className: `flex items-center relative w-full border-b border-stone-200 transition-all duration-300 pb-3 pt-3 ${!canManage || isSubmitting ? "opacity-50 pointer-events-none" : "hover:border-black cursor-pointer"}` }, /* @__PURE__ */ React62.createElement(HugeiconsIcon48, { icon: Building03Icon, size: 16, className: "text-stone-400 absolute left-0" }), /* @__PURE__ */ React62.createElement("span", { className: `w-full pl-8 text-sm truncate block ${activeCompany ? "text-black" : "text-stone-400"}` }, activeCompany ? activeCompany.name : "Select an existing company..."))) : /* @__PURE__ */ React62.createElement(React62.Fragment, null, /* @__PURE__ */ React62.createElement(TextInput, { label: "Company Name", value: newCompanyName, onChange: (val) => setNewCompanyName(val), disabled: isSubmitting || !canManage, placeholder: "e.g. Acme Innovations Ltd.", maxLength: 80 }), /* @__PURE__ */ React62.createElement("div", { className: `flex items-center justify-between py-2 mt-2 ${!canManage ? "opacity-50 pointer-events-none" : ""}` }, /* @__PURE__ */ React62.createElement("div", { className: "flex flex-col" }, /* @__PURE__ */ React62.createElement("span", { className: "text-sm text-black tracking-tight" }, "Private Company"), /* @__PURE__ */ React62.createElement("span", { className: "text-xs text-stone-500" }, "Only assigned members can view and access its applications.")), /* @__PURE__ */ React62.createElement("button", { type: "button", onClick: () => setIsPrivate(!isPrivate), disabled: !canManage || isSubmitting, className: `relative w-11 h-6 rounded-full transition-colors outline-none shrink-0 ${isPrivate ? "bg-[#d97757]" : "bg-stone-200"}` }, /* @__PURE__ */ React62.createElement("div", { className: `absolute top-1 left-1 bg-white w-4 h-4 rounded-full transition-transform ${isPrivate ? "translate-x-5" : "translate-x-0"}` }))), isPrivate && /* @__PURE__ */ React62.createElement("div", { className: `flex items-center justify-between animate-in fade-in zoom-in-95 duration-200 bg-stone-50 p-4 rounded-xl ${!canManage ? "opacity-50" : ""}` }, /* @__PURE__ */ React62.createElement("div", { className: "flex flex-col" }, /* @__PURE__ */ React62.createElement("span", { className: "text-xs text-black tracking-tight" }, "Members"), /* @__PURE__ */ React62.createElement("span", { className: "text-xs text-[#d97757]" }, selectedParticipants.size, " added")), /* @__PURE__ */ React62.createElement("button", { type: "button", onClick: () => setShowMembersModal(true), disabled: !canManage || isSubmitting, className: "px-4 py-2 border border-stone-200 text-black text-xs tracking-wide rounded-full hover:bg-white transition-colors outline-none bg-transparent" }, "Manage Access"))), /* @__PURE__ */ React62.createElement("div", { className: "space-y-1.5 w-full" }, /* @__PURE__ */ React62.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block" }, "Application Type"), /* @__PURE__ */ React62.createElement("div", { onClick: () => canManage && !isSubmitting && setShowTypeModal(true), className: `flex items-center relative w-full border-b border-stone-200 transition-all duration-300 pb-3 pt-3 ${!canManage || isSubmitting ? "opacity-50 pointer-events-none" : "hover:border-black cursor-pointer"}` }, /* @__PURE__ */ React62.createElement(HugeiconsIcon48, { icon: File02Icon, size: 16, className: "text-stone-400 absolute left-0" }), /* @__PURE__ */ React62.createElement("span", { className: "w-full pl-8 text-sm text-black truncate block" }, activeTypeObj?.label || "Select Type..."))), canManage && /* @__PURE__ */ React62.createElement("div", { className: "pt-6" }, /* @__PURE__ */ React62.createElement(ThreeDActionButton, { type: "submit", disabled: isSubmitting || !selectedTypeKey || creationMode === "EXISTING" && !selectedCompanyId || creationMode === "NEW" && newCompanyName.length < 2, isLoading: isSubmitting, className: "w-full sm:w-auto min-w-40" }, "Create Application")))), showTypeModal && canManage && /* @__PURE__ */ React62.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ React62.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setShowTypeModal(false) }), /* @__PURE__ */ React62.createElement("div", { className: "relative w-full max-w-md bg-white rounded-2xl flex flex-col overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200 h-[80vh]" }, /* @__PURE__ */ React62.createElement("div", { className: "flex items-center justify-between p-5 shrink-0" }, /* @__PURE__ */ React62.createElement("h3", { className: "text-sm text-black tracking-tight " }, "Application Type"), /* @__PURE__ */ React62.createElement("button", { onClick: () => setShowTypeModal(false), className: "text-[#d97757] outline-none text-sm" }, "Done")), /* @__PURE__ */ React62.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-3 space-y-2" }, applicationTypesMeta.map((item) => {
7573
7608
  const isSelected = selectedTypeKey === item.key;
7574
7609
  return /* @__PURE__ */ React62.createElement(
7575
7610
  "div",
@@ -7580,15 +7615,15 @@ var UniversalCreateApplication = ({
7580
7615
  },
7581
7616
  className: `p-4 rounded-xl cursor-pointer transition-all border ${isSelected ? "bg-white border-[#d97757]" : "bg-stone-50 border-transparent hover:bg-stone-100/60"}`
7582
7617
  },
7583
- /* @__PURE__ */ React62.createElement("div", { className: "flex items-center justify-between gap-2" }, /* @__PURE__ */ React62.createElement("h4", { className: "text-xs text-black" }, item.label), isSelected && /* @__PURE__ */ React62.createElement(HugeiconsIcon47, { icon: CheckmarkCircle02Icon2, size: 16, className: "text-[#d97757] shrink-0" })),
7618
+ /* @__PURE__ */ React62.createElement("div", { className: "flex items-center justify-between gap-2" }, /* @__PURE__ */ React62.createElement("h4", { className: "text-xs text-black" }, item.label), isSelected && /* @__PURE__ */ React62.createElement(HugeiconsIcon48, { icon: CheckmarkCircle02Icon2, size: 16, className: "text-[#d97757] shrink-0" })),
7584
7619
  /* @__PURE__ */ React62.createElement("p", { className: "text-[11px] text-stone-500 mt-1 leading-relaxed whitespace-normal wrap-break-word" }, item.desc)
7585
7620
  );
7586
- })))), showCompaniesModal && canManage && /* @__PURE__ */ React62.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ React62.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setShowCompaniesModal(false) }), /* @__PURE__ */ React62.createElement("div", { className: "relative w-full max-w-md bg-white rounded-2xl flex flex-col overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200 h-[80vh]" }, /* @__PURE__ */ React62.createElement("div", { className: "flex items-center justify-between p-5 shrink-0" }, /* @__PURE__ */ React62.createElement("h3", { className: "text-sm text-black tracking-tight" }, "Select Company"), /* @__PURE__ */ React62.createElement("button", { onClick: () => setShowCompaniesModal(false), className: "text-[#d97757] outline-none text-sm" }, "Done")), /* @__PURE__ */ React62.createElement("div", { className: "p-4 shrink-0" }, /* @__PURE__ */ React62.createElement("div", { className: "relative w-full" }, /* @__PURE__ */ React62.createElement(HugeiconsIcon47, { icon: Search01Icon11, size: 16, className: "text-stone-400 absolute left-4 top-1/2 -translate-y-1/2 pointer-events-none" }), /* @__PURE__ */ React62.createElement("input", { type: "text", placeholder: "Search companies...", value: localCompSearch, onChange: handleCompSearch, className: "w-full pl-10 pr-4 py-2.5 bg-stone-100 rounded-full focus:border-[#d97757] border border-transparent text-sm text-black outline-none focus:bg-stone-50 transition-colors" }))), /* @__PURE__ */ React62.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-2" }, isCompaniesLoading ? /* @__PURE__ */ React62.createElement("div", { className: "absolute inset-0 flex items-center justify-center" }, /* @__PURE__ */ React62.createElement(HugeiconsIcon47, { icon: Loading03Icon33, size: 28, className: "animate-spin text-black" })) : companies.length === 0 ? /* @__PURE__ */ React62.createElement("div", { className: "p-8 text-center text-xs text-stone-400" }, "No companies available.") : companies.map((comp) => /* @__PURE__ */ React62.createElement("div", { key: comp.id, onClick: () => {
7621
+ })))), showCompaniesModal && canManage && /* @__PURE__ */ React62.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ React62.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setShowCompaniesModal(false) }), /* @__PURE__ */ React62.createElement("div", { className: "relative w-full max-w-md bg-white rounded-2xl flex flex-col overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200 h-[80vh]" }, /* @__PURE__ */ React62.createElement("div", { className: "flex items-center justify-between p-5 shrink-0" }, /* @__PURE__ */ React62.createElement("h3", { className: "text-sm text-black tracking-tight" }, "Select Company"), /* @__PURE__ */ React62.createElement("button", { onClick: () => setShowCompaniesModal(false), className: "text-[#d97757] outline-none text-sm" }, "Done")), /* @__PURE__ */ React62.createElement("div", { className: "p-4 shrink-0" }, /* @__PURE__ */ React62.createElement("div", { className: "relative w-full" }, /* @__PURE__ */ React62.createElement(HugeiconsIcon48, { icon: Search01Icon10, size: 16, className: "text-stone-400 absolute left-4 top-1/2 -translate-y-1/2 pointer-events-none" }), /* @__PURE__ */ React62.createElement("input", { type: "text", placeholder: "Search companies...", value: localCompSearch, onChange: handleCompSearch, className: "w-full pl-10 pr-4 py-2.5 bg-stone-100 rounded-full focus:border-[#d97757] border border-transparent text-sm text-black outline-none focus:bg-stone-50 transition-colors" }))), /* @__PURE__ */ React62.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-2" }, isCompaniesLoading ? /* @__PURE__ */ React62.createElement("div", { className: "absolute inset-0 flex items-center justify-center" }, /* @__PURE__ */ React62.createElement(HugeiconsIcon48, { icon: Loading03Icon32, size: 28, className: "animate-spin text-black" })) : companies.length === 0 ? /* @__PURE__ */ React62.createElement("div", { className: "p-8 text-center text-xs text-stone-400" }, "No companies available.") : companies.map((comp) => /* @__PURE__ */ React62.createElement("div", { key: comp.id, onClick: () => {
7587
7622
  setSelectedCompanyId(comp.id);
7588
- }, className: "flex items-center justify-between p-3 rounded-xl cursor-pointer hover:bg-stone-50 transition-colors" }, /* @__PURE__ */ React62.createElement("div", { className: "flex flex-col min-w-0 flex-1 pl-2" }, /* @__PURE__ */ React62.createElement("span", { className: "text-sm text-black truncate" }, comp.name), /* @__PURE__ */ React62.createElement("div", { className: "flex items-center gap-2 mt-0.5" }, /* @__PURE__ */ React62.createElement("span", { className: "text-[10px] text-stone-500 tracking-widest uppercase" }, "Applications: ", comp.applicationsCount || 0), comp.isPrivate && /* @__PURE__ */ React62.createElement("span", { className: "text-[10px] text-[#d97757] tracking-widest uppercase" }, "Private"))), selectedCompanyId === comp.id && /* @__PURE__ */ React62.createElement(HugeiconsIcon47, { icon: CheckmarkCircle02Icon2, size: 16, className: "text-[#d97757] mr-2" })))), /* @__PURE__ */ React62.createElement("div", { className: "p-4 flex items-center justify-between shrink-0 bg-white" }, /* @__PURE__ */ React62.createElement("span", { className: "text-xs text-stone-400 tracking-widest" }, "Page ", companiesCurrentPage, " of ", companiesTotalPages || 1), /* @__PURE__ */ React62.createElement("div", { className: "flex gap-1" }, /* @__PURE__ */ React62.createElement("button", { disabled: companiesCurrentPage <= 1 || isCompaniesLoading, onClick: () => onCompaniesPageChange(companiesCurrentPage - 1), className: "w-7 h-7 flex items-center justify-center rounded-full bg-white border border-stone-200 text-stone-600 disabled:opacity-30 outline-none hover:bg-stone-50" }, /* @__PURE__ */ React62.createElement(HugeiconsIcon47, { icon: ArrowLeft01Icon25, size: 12 })), /* @__PURE__ */ React62.createElement("button", { disabled: companiesCurrentPage >= companiesTotalPages || isCompaniesLoading, onClick: () => onCompaniesPageChange(companiesCurrentPage + 1), className: "w-7 h-7 flex items-center justify-center rounded-full bg-white border border-stone-200 text-stone-600 disabled:opacity-30 outline-none hover:bg-stone-50" }, /* @__PURE__ */ React62.createElement(HugeiconsIcon47, { icon: ArrowRight01Icon19, size: 12 })))))), showMembersModal && canManage && /* @__PURE__ */ React62.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ React62.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setShowMembersModal(false) }), /* @__PURE__ */ React62.createElement("div", { className: "relative w-full max-w-md bg-white rounded-2xl flex flex-col overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200 h-[80vh]" }, /* @__PURE__ */ React62.createElement("div", { className: "flex items-center justify-between p-5 shrink-0" }, /* @__PURE__ */ React62.createElement("h3", { className: "text-sm text-black tracking-tight" }, "Assign Members"), /* @__PURE__ */ React62.createElement("button", { onClick: () => setShowMembersModal(false), className: "text-[#d97757] outline-none text-sm" }, "Done")), /* @__PURE__ */ React62.createElement("div", { className: "p-4 shrink-0" }, /* @__PURE__ */ React62.createElement("div", { className: "relative w-full" }, /* @__PURE__ */ React62.createElement(HugeiconsIcon47, { icon: Search01Icon11, size: 16, className: "text-stone-400 absolute left-4 top-1/2 -translate-y-1/2 pointer-events-none" }), /* @__PURE__ */ React62.createElement("input", { type: "text", placeholder: "Search team...", value: localMemSearch, onChange: handleMemSearch, className: "w-full pl-10 pr-4 py-2.5 bg-stone-100 rounded-full focus:border-[#d97757] border border-transparent text-sm text-black outline-none focus:bg-stone-50 transition-colors" }))), /* @__PURE__ */ React62.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-2" }, isMembersLoading ? /* @__PURE__ */ React62.createElement("div", { className: "absolute inset-0 flex items-center justify-center" }, /* @__PURE__ */ React62.createElement(HugeiconsIcon47, { icon: Loading03Icon33, size: 28, className: "animate-spin text-black" })) : members.length === 0 ? /* @__PURE__ */ React62.createElement("div", { className: "p-8 text-center text-xs text-stone-400" }, "No members found.") : members.map((member) => {
7623
+ }, className: "flex items-center justify-between p-3 rounded-xl cursor-pointer hover:bg-stone-50 transition-colors" }, /* @__PURE__ */ React62.createElement("div", { className: "flex flex-col min-w-0 flex-1 pl-2" }, /* @__PURE__ */ React62.createElement("span", { className: "text-sm text-black truncate" }, comp.name), /* @__PURE__ */ React62.createElement("div", { className: "flex items-center gap-2 mt-0.5" }, /* @__PURE__ */ React62.createElement("span", { className: "text-[10px] text-stone-500 tracking-widest uppercase" }, "Applications: ", comp.applicationsCount || 0), comp.isPrivate && /* @__PURE__ */ React62.createElement("span", { className: "text-[10px] text-[#d97757] tracking-widest uppercase" }, "Private"))), selectedCompanyId === comp.id && /* @__PURE__ */ React62.createElement(HugeiconsIcon48, { icon: CheckmarkCircle02Icon2, size: 16, className: "text-[#d97757] mr-2" })))), /* @__PURE__ */ React62.createElement("div", { className: "p-4 flex items-center justify-between shrink-0 bg-white" }, /* @__PURE__ */ React62.createElement("span", { className: "text-xs text-stone-400 tracking-widest" }, "Page ", companiesCurrentPage, " of ", companiesTotalPages || 1), /* @__PURE__ */ React62.createElement("div", { className: "flex gap-1" }, /* @__PURE__ */ React62.createElement("button", { disabled: companiesCurrentPage <= 1 || isCompaniesLoading, onClick: () => onCompaniesPageChange(companiesCurrentPage - 1), className: "w-7 h-7 flex items-center justify-center rounded-full bg-white border border-stone-200 text-stone-600 disabled:opacity-30 outline-none hover:bg-stone-50" }, /* @__PURE__ */ React62.createElement(HugeiconsIcon48, { icon: ArrowLeft01Icon26, size: 12 })), /* @__PURE__ */ React62.createElement("button", { disabled: companiesCurrentPage >= companiesTotalPages || isCompaniesLoading, onClick: () => onCompaniesPageChange(companiesCurrentPage + 1), className: "w-7 h-7 flex items-center justify-center rounded-full bg-white border border-stone-200 text-stone-600 disabled:opacity-30 outline-none hover:bg-stone-50" }, /* @__PURE__ */ React62.createElement(HugeiconsIcon48, { icon: ArrowRight01Icon19, size: 12 })))))), showMembersModal && canManage && /* @__PURE__ */ React62.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ React62.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setShowMembersModal(false) }), /* @__PURE__ */ React62.createElement("div", { className: "relative w-full max-w-md bg-white rounded-2xl flex flex-col overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200 h-[80vh]" }, /* @__PURE__ */ React62.createElement("div", { className: "flex items-center justify-between p-5 shrink-0" }, /* @__PURE__ */ React62.createElement("h3", { className: "text-sm text-black tracking-tight" }, "Assign Members"), /* @__PURE__ */ React62.createElement("button", { onClick: () => setShowMembersModal(false), className: "text-[#d97757] outline-none text-sm" }, "Done")), /* @__PURE__ */ React62.createElement("div", { className: "p-4 shrink-0" }, /* @__PURE__ */ React62.createElement("div", { className: "relative w-full" }, /* @__PURE__ */ React62.createElement(HugeiconsIcon48, { icon: Search01Icon10, size: 16, className: "text-stone-400 absolute left-4 top-1/2 -translate-y-1/2 pointer-events-none" }), /* @__PURE__ */ React62.createElement("input", { type: "text", placeholder: "Search team...", value: localMemSearch, onChange: handleMemSearch, className: "w-full pl-10 pr-4 py-2.5 bg-stone-100 rounded-full focus:border-[#d97757] border border-transparent text-sm text-black outline-none focus:bg-stone-50 transition-colors" }))), /* @__PURE__ */ React62.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-2" }, isMembersLoading ? /* @__PURE__ */ React62.createElement("div", { className: "absolute inset-0 flex items-center justify-center" }, /* @__PURE__ */ React62.createElement(HugeiconsIcon48, { icon: Loading03Icon32, size: 28, className: "animate-spin text-black" })) : members.length === 0 ? /* @__PURE__ */ React62.createElement("div", { className: "p-8 text-center text-xs text-stone-400" }, "No members found.") : members.map((member) => {
7589
7624
  const isChecked = selectedParticipants.has(member.userId);
7590
- return /* @__PURE__ */ React62.createElement("div", { key: member.id, onClick: () => toggleParticipant(member.userId), className: "flex items-center justify-between p-3 rounded-xl cursor-pointer hover:bg-stone-50 transition-colors select-none" }, /* @__PURE__ */ React62.createElement("div", { className: "flex items-center gap-3 min-w-0 flex-1" }, /* @__PURE__ */ React62.createElement(MemberAvatar6, { src: member.avatarUrl, sizeClass: "w-9 h-9" }), /* @__PURE__ */ React62.createElement("div", { className: "flex flex-col min-w-0 flex-1" }, /* @__PURE__ */ React62.createElement("span", { className: "text-sm text-black truncate" }, member.fullName), /* @__PURE__ */ React62.createElement("span", { className: "text-xs text-stone-400 capitalize truncate" }, member.role.toLowerCase()))), /* @__PURE__ */ React62.createElement("div", { className: "shrink-0 pl-3" }, /* @__PURE__ */ React62.createElement("div", { className: `w-5 h-5 rounded-full flex items-center justify-center transition-colors ${isChecked ? "bg-[#d97757]" : "border border-stone-300 bg-white"}` }, isChecked && /* @__PURE__ */ React62.createElement(HugeiconsIcon47, { icon: Tick02Icon4, size: 14, className: "text-white" }))));
7591
- })), /* @__PURE__ */ React62.createElement("div", { className: "p-4 flex items-center justify-between shrink-0 bg-white" }, /* @__PURE__ */ React62.createElement("span", { className: "text-xs text-stone-400 tracking-widest" }, "Page ", membersCurrentPage, " of ", membersTotalPages || 1), /* @__PURE__ */ React62.createElement("div", { className: "flex gap-1" }, /* @__PURE__ */ React62.createElement("button", { disabled: membersCurrentPage <= 1 || isMembersLoading, onClick: () => onMembersPageChange(membersCurrentPage - 1), className: "w-7 h-7 flex items-center justify-center rounded-full bg-white border border-stone-200 text-stone-600 disabled:opacity-30 outline-none hover:bg-stone-50" }, /* @__PURE__ */ React62.createElement(HugeiconsIcon47, { icon: ArrowLeft01Icon25, size: 12 })), /* @__PURE__ */ React62.createElement("button", { disabled: membersCurrentPage >= membersTotalPages || isMembersLoading, onClick: () => onMembersPageChange(membersCurrentPage + 1), className: "w-7 h-7 flex items-center justify-center rounded-full bg-white border border-stone-200 text-stone-600 disabled:opacity-30 outline-none hover:bg-stone-50" }, /* @__PURE__ */ React62.createElement(HugeiconsIcon47, { icon: ArrowRight01Icon19, size: 12 })))))));
7625
+ return /* @__PURE__ */ React62.createElement("div", { key: member.id, onClick: () => toggleParticipant(member.userId), className: "flex items-center justify-between p-3 rounded-xl cursor-pointer hover:bg-stone-50 transition-colors select-none" }, /* @__PURE__ */ React62.createElement("div", { className: "flex items-center gap-3 min-w-0 flex-1" }, /* @__PURE__ */ React62.createElement(MemberAvatar6, { src: member.avatarUrl, sizeClass: "w-9 h-9" }), /* @__PURE__ */ React62.createElement("div", { className: "flex flex-col min-w-0 flex-1" }, /* @__PURE__ */ React62.createElement("span", { className: "text-sm text-black truncate" }, member.fullName), /* @__PURE__ */ React62.createElement("span", { className: "text-xs text-stone-400 capitalize truncate" }, member.role.toLowerCase()))), /* @__PURE__ */ React62.createElement("div", { className: "shrink-0 pl-3" }, /* @__PURE__ */ React62.createElement("div", { className: `w-5 h-5 rounded-full flex items-center justify-center transition-colors ${isChecked ? "bg-[#d97757]" : "border border-stone-300 bg-white"}` }, isChecked && /* @__PURE__ */ React62.createElement(HugeiconsIcon48, { icon: Tick02Icon5, size: 14, className: "text-white" }))));
7626
+ })), /* @__PURE__ */ React62.createElement("div", { className: "p-4 flex items-center justify-between shrink-0 bg-white" }, /* @__PURE__ */ React62.createElement("span", { className: "text-xs text-stone-400 tracking-widest" }, "Page ", membersCurrentPage, " of ", membersTotalPages || 1), /* @__PURE__ */ React62.createElement("div", { className: "flex gap-1" }, /* @__PURE__ */ React62.createElement("button", { disabled: membersCurrentPage <= 1 || isMembersLoading, onClick: () => onMembersPageChange(membersCurrentPage - 1), className: "w-7 h-7 flex items-center justify-center rounded-full bg-white border border-stone-200 text-stone-600 disabled:opacity-30 outline-none hover:bg-stone-50" }, /* @__PURE__ */ React62.createElement(HugeiconsIcon48, { icon: ArrowLeft01Icon26, size: 12 })), /* @__PURE__ */ React62.createElement("button", { disabled: membersCurrentPage >= membersTotalPages || isMembersLoading, onClick: () => onMembersPageChange(membersCurrentPage + 1), className: "w-7 h-7 flex items-center justify-center rounded-full bg-white border border-stone-200 text-stone-600 disabled:opacity-30 outline-none hover:bg-stone-50" }, /* @__PURE__ */ React62.createElement(HugeiconsIcon48, { icon: ArrowRight01Icon19, size: 12 })))))));
7592
7627
  };
7593
7628
  export {
7594
7629
  AppBento2,