@retinalabsllc/zairusjs 16.1.90 → 16.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1658,7 +1658,7 @@ var ConfirmationDialog = ({
1658
1658
  {
1659
1659
  onClick: onConfirm,
1660
1660
  disabled: isProcessing,
1661
- className: `flex-1 py-4 text-[13px] transition-colors disabled:opacity-50 flex justify-center items-center outline-none ${isDestructive ? "text-black hover:bg-neutral-50" : "text-black hover:bg-neutral-50"}`
1661
+ className: `flex-1 py-4 text-[13px] transition-colors disabled:opacity-50 flex justify-center items-center outline-none ${isDestructive ? "text-rose-600 hover:bg-neutral-50" : "text-black hover:bg-neutral-50"}`
1662
1662
  },
1663
1663
  isProcessing ? /* @__PURE__ */ React17.createElement(HugeiconsIcon11, { icon: Loading03Icon6, className: "animate-spin", size: 18 }) : confirmText
1664
1664
  ))));
@@ -4526,72 +4526,72 @@ var UniversalBuyCryptoPage = ({
4526
4526
  }))))));
4527
4527
  };
4528
4528
 
4529
- // src/components/UniversalDepartmentsPage.tsx
4529
+ // src/components/UniversalHuddlesPage.tsx
4530
4530
  import React46, { useState as useState32 } from "react";
4531
- import toast12 from "react-hot-toast";
4532
4531
  import { HugeiconsIcon as HugeiconsIcon32 } from "@hugeicons/react";
4533
4532
  import {
4534
4533
  ArrowLeft01Icon as ArrowLeft01Icon13,
4535
4534
  ArrowRight01Icon as ArrowRight01Icon9,
4536
- Loading03Icon as Loading03Icon20,
4537
- CancelCircleIcon as CancelCircleIcon9
4535
+ Loading03Icon as Loading03Icon20
4538
4536
  } from "@hugeicons/core-free-icons";
4539
- var formatMembersCount = (num) => {
4540
- if (num >= 1e6) return (num / 1e6).toFixed(1) + "m";
4541
- if (num >= 1e3) return (num / 1e3).toFixed(1) + "k";
4542
- return num.toString();
4537
+ var HuddleAvatar = ({ src, status, sizeClass = "w-10 h-10" }) => {
4538
+ const [loaded, setLoaded] = useState32(false);
4539
+ const [error, setError] = useState32(false);
4540
+ const defaultAvatar = "https://storage.googleapis.com/retina-cloud-v2/assets/images/default_a.avif";
4541
+ const finalSrc = error || !src ? defaultAvatar : src;
4542
+ const getStatusColor = () => {
4543
+ switch (status?.toUpperCase()) {
4544
+ case "SCHEDULED":
4545
+ return "bg-amber-500";
4546
+ case "ONGOING":
4547
+ return "bg-emerald-500";
4548
+ case "COMPLETED":
4549
+ return "bg-neutral-400";
4550
+ case "CANCELLED":
4551
+ return "bg-rose-500";
4552
+ default:
4553
+ return "bg-neutral-200";
4554
+ }
4555
+ };
4556
+ return /* @__PURE__ */ React46.createElement("div", { className: `relative shrink-0 ${sizeClass}` }, /* @__PURE__ */ React46.createElement("div", { className: "w-full h-full rounded-lg bg-neutral-100 flex items-center justify-center overflow-hidden" }, !loaded && !error && /* @__PURE__ */ React46.createElement(HugeiconsIcon32, { icon: Loading03Icon20, className: "animate-spin text-neutral-400 absolute", size: 14 }), /* @__PURE__ */ React46.createElement(
4557
+ "img",
4558
+ {
4559
+ src: finalSrc,
4560
+ alt: "Huddle Avatar",
4561
+ className: `w-full h-full object-cover transition-opacity duration-300 ${loaded || error ? "opacity-100" : "opacity-0"}`,
4562
+ onLoad: () => setLoaded(true),
4563
+ onError: () => setError(true)
4564
+ }
4565
+ )), /* @__PURE__ */ React46.createElement("div", { className: `absolute -bottom-1 -right-1 w-3.5 h-3.5 rounded-full border-2 border-white z-10 ${getStatusColor()}` }));
4543
4566
  };
4544
4567
  var PageSpinner6 = () => /* @__PURE__ */ React46.createElement("div", { className: "flex justify-center items-center py-12" }, /* @__PURE__ */ React46.createElement(HugeiconsIcon32, { icon: Loading03Icon20, size: 32, className: "animate-spin mb-4 text-black" }));
4545
- var UniversalDepartmentsPage = ({
4568
+ var UniversalHuddlesPage = ({
4546
4569
  headerTitle,
4547
4570
  headerDescription,
4548
- departments,
4571
+ huddles,
4549
4572
  isLoading,
4550
4573
  currentPage,
4551
4574
  totalPages,
4552
4575
  onPageChange,
4553
- onDepartmentClick,
4554
- onCreateDepartment
4576
+ onHuddleClick,
4577
+ onCreateHuddle
4555
4578
  }) => {
4556
- const [isCreateModalOpen, setIsCreateModalOpen] = useState32(false);
4557
- const [deptName, setDeptName] = useState32("");
4558
- const [isCreating, setIsCreating] = useState32(false);
4559
- const handleCreateSubmit = async (e) => {
4560
- e.preventDefault();
4561
- if (deptName.length < 2 || isCreating || !onCreateDepartment) return;
4562
- setIsCreating(true);
4563
- try {
4564
- await onCreateDepartment(deptName);
4565
- setDeptName("");
4566
- setIsCreateModalOpen(false);
4567
- } catch (error) {
4568
- toast12.error(error.message || "Failed to create department.");
4569
- } finally {
4570
- setIsCreating(false);
4571
- }
4572
- };
4573
- return /* @__PURE__ */ React46.createElement("div", { className: "w-full max-w-3xl mx-auto flex flex-col animate-in fade-in duration-300 relative" }, /* @__PURE__ */ React46.createElement("div", { className: "flex flex-col gap-8 p-6 rounded-2xl bg-white w-full" }, /* @__PURE__ */ React46.createElement("div", { className: "flex flex-col gap-1" }, /* @__PURE__ */ React46.createElement("div", { className: "flex flex-row items-center justify-between gap-4" }, /* @__PURE__ */ React46.createElement("h2", { className: "text-black text-xl tracking-tight" }, headerTitle), onCreateDepartment && /* @__PURE__ */ React46.createElement(
4579
+ return /* @__PURE__ */ React46.createElement("div", { className: "w-full max-w-3xl mx-auto flex flex-col animate-in fade-in duration-300 relative" }, /* @__PURE__ */ React46.createElement("div", { className: "flex flex-col gap-8 p-6 rounded-2xl bg-white w-full" }, /* @__PURE__ */ React46.createElement("div", { className: "flex flex-col gap-1" }, /* @__PURE__ */ React46.createElement("div", { className: "flex flex-row items-center justify-between gap-4" }, /* @__PURE__ */ React46.createElement("h2", { className: "text-black text-xl tracking-tight" }, headerTitle), onCreateHuddle && /* @__PURE__ */ React46.createElement(
4574
4580
  "button",
4575
4581
  {
4576
- onClick: () => setIsCreateModalOpen(true),
4582
+ onClick: onCreateHuddle,
4577
4583
  className: "shrink-0 px-4 py-1.5 border border-neutral-200 text-black text-[12px] tracking-wide rounded-full hover:bg-neutral-50 transition-colors outline-none"
4578
4584
  },
4579
4585
  "Create new"
4580
- )), headerDescription && /* @__PURE__ */ React46.createElement("p", { className: "text-[12px] text-neutral-500" }, headerDescription)), /* @__PURE__ */ React46.createElement("div", { className: "w-full overflow-hidden" }, isLoading ? /* @__PURE__ */ React46.createElement(PageSpinner6, null) : /* @__PURE__ */ React46.createElement("div", { className: "flex flex-col min-w-0" }, /* @__PURE__ */ React46.createElement("div", null, departments.length === 0 ? /* @__PURE__ */ React46.createElement("p", { className: "text-[12px] text-neutral-400 py-6 text-center" }, "No departments available") : departments.map((dept) => /* @__PURE__ */ React46.createElement(
4586
+ )), headerDescription && /* @__PURE__ */ React46.createElement("p", { className: "text-[12px] text-neutral-500" }, headerDescription)), /* @__PURE__ */ React46.createElement("div", { className: "w-full overflow-hidden" }, isLoading ? /* @__PURE__ */ React46.createElement(PageSpinner6, null) : /* @__PURE__ */ React46.createElement("div", { className: "flex flex-col min-w-0" }, /* @__PURE__ */ React46.createElement("div", null, huddles.length === 0 ? /* @__PURE__ */ React46.createElement("p", { className: "text-[12px] text-neutral-400 py-6 text-center" }, "No huddles available") : huddles.map((huddle) => /* @__PURE__ */ React46.createElement(
4581
4587
  "div",
4582
4588
  {
4583
- key: dept.id,
4584
- onClick: () => onDepartmentClick(dept.id),
4589
+ key: huddle.id,
4590
+ onClick: () => onHuddleClick(huddle.id),
4585
4591
  className: "flex flex-row items-center gap-4 py-2 hover:bg-neutral-50 transition-colors cursor-pointer group min-w-0 px-3 -mx-3 rounded-xl"
4586
4592
  },
4587
- /* @__PURE__ */ React46.createElement("div", { className: "flex flex-col min-w-0 flex-1" }, /* @__PURE__ */ React46.createElement("p", { className: "text-[13px] text-black tracking-tight truncate" }, dept.name), /* @__PURE__ */ React46.createElement("div", { className: "flex items-center gap-3 min-w-0" }, dept.avatars && dept.avatars.length > 0 && /* @__PURE__ */ React46.createElement("div", { className: "flex items-center -space-x-2 shrink-0" }, dept.avatars.slice(0, 4).map((src, idx) => /* @__PURE__ */ React46.createElement("div", { key: idx, className: "w-4 h-4 rounded-md bg-neutral-100 overflow-hidden shrink-0" }, /* @__PURE__ */ React46.createElement(
4588
- "img",
4589
- {
4590
- src: src || "https://storage.googleapis.com/retina-cloud-v2/assets/images/avatar.avif",
4591
- alt: "Member",
4592
- className: "w-full h-full object-cover"
4593
- }
4594
- )))), dept.totalMembers > 0 ? /* @__PURE__ */ React46.createElement("span", { className: "text-[11px] text-neutral-500 truncate block" }, formatMembersCount(dept.totalMembers), " ", dept.totalMembers > 4 ? "+" : "") : /* @__PURE__ */ React46.createElement("span", { className: "text-[11px] text-neutral-400 truncate block" }, "No Members"))),
4593
+ /* @__PURE__ */ React46.createElement(HuddleAvatar, { src: huddle.imageUrl, status: huddle.status }),
4594
+ /* @__PURE__ */ React46.createElement("div", { className: "flex flex-col min-w-0 flex-1" }, /* @__PURE__ */ React46.createElement("p", { className: "text-[13px] text-black tracking-tight truncate" }, huddle.name), /* @__PURE__ */ React46.createElement("span", { className: "text-[11px] text-neutral-500 truncate block mt-0.5" }, huddle.timeString)),
4595
4595
  /* @__PURE__ */ React46.createElement(HugeiconsIcon32, { icon: ArrowRight01Icon9, size: 14, className: "shrink-0 text-neutral-400" })
4596
4596
  ))), /* @__PURE__ */ React46.createElement("div", { className: "flex items-center justify-between pt-6 mt-2 " }, /* @__PURE__ */ React46.createElement("span", { className: "text-[11px] text-neutral-400 tracking-[0.2em]" }, "Page ", currentPage, " of ", totalPages === 0 ? 1 : totalPages), /* @__PURE__ */ React46.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React46.createElement(
4597
4597
  "button",
@@ -4609,55 +4609,13 @@ var UniversalDepartmentsPage = ({
4609
4609
  className: "p-2 bg-white border border-neutral-200 rounded-full text-black hover:bg-neutral-50 disabled:opacity-30 disabled:cursor-not-allowed transition-all outline-none"
4610
4610
  },
4611
4611
  /* @__PURE__ */ React46.createElement(HugeiconsIcon32, { icon: ArrowRight01Icon9, size: 14 })
4612
- )))))), isCreateModalOpen && /* @__PURE__ */ React46.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ React46.createElement("div", { className: "absolute inset-0 bg-black/40", onClick: () => !isCreating && setIsCreateModalOpen(false) }), /* @__PURE__ */ React46.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__ */ React46.createElement("div", { className: "flex items-center justify-between pt-5 px-5 shrink-0 " }, /* @__PURE__ */ React46.createElement("h3", { className: "text-[15px] text-black tracking-tight" }, "Create Department"), /* @__PURE__ */ React46.createElement(
4613
- "button",
4614
- {
4615
- onClick: () => setIsCreateModalOpen(false),
4616
- disabled: isCreating,
4617
- className: "text-neutral-400 hover:text-black transition-colors outline-none disabled:opacity-50"
4618
- },
4619
- /* @__PURE__ */ React46.createElement(HugeiconsIcon32, { icon: CancelCircleIcon9, size: 18 })
4620
- )), /* @__PURE__ */ React46.createElement("div", { className: "p-6" }, /* @__PURE__ */ React46.createElement("form", { onSubmit: handleCreateSubmit, className: "flex flex-col gap-8" }, /* @__PURE__ */ React46.createElement("div", { className: "space-y-1.5" }, /* @__PURE__ */ React46.createElement("label", { className: "text-[11px] text-neutral-400 tracking-[0.2em] block" }, "Department Name"), /* @__PURE__ */ React46.createElement(
4621
- "input",
4622
- {
4623
- type: "text",
4624
- value: deptName,
4625
- onChange: (e) => setDeptName(e.target.value),
4626
- required: true,
4627
- autoFocus: true,
4628
- maxLength: 50,
4629
- disabled: isCreating,
4630
- className: "w-full px-2 py-3 bg-transparent text-sm border-b border-neutral-200 text-black outline-none focus:border-black transition-all duration-300 disabled:opacity-50",
4631
- placeholder: "e.g. Engineering, Marketing..."
4632
- }
4633
- )), /* @__PURE__ */ React46.createElement("div", { className: "flex flex-col gap-3" }, /* @__PURE__ */ React46.createElement(
4634
- ThreeDActionButton,
4635
- {
4636
- type: "submit",
4637
- disabled: deptName.length < 2 || isCreating,
4638
- isLoading: isCreating,
4639
- className: "w-full"
4640
- },
4641
- "Create Department"
4642
- ), /* @__PURE__ */ React46.createElement(
4643
- "button",
4644
- {
4645
- type: "button",
4646
- onClick: () => {
4647
- setIsCreateModalOpen(false);
4648
- setDeptName("");
4649
- },
4650
- disabled: isCreating,
4651
- className: "w-full flex items-center justify-center py-2.5 rounded-full border border-neutral-200 text-black hover:bg-neutral-50 transition-colors outline-none text-xs tracking-wide"
4652
- },
4653
- "Cancel"
4654
4612
  )))))));
4655
4613
  };
4656
4614
 
4657
4615
  // src/components/UniversalMembersPage.tsx
4658
4616
  import React47, { useState as useState33, useEffect as useEffect18, useRef as useRef12 } from "react";
4659
4617
  import { HugeiconsIcon as HugeiconsIcon33 } from "@hugeicons/react";
4660
- import toast13 from "react-hot-toast";
4618
+ import toast12 from "react-hot-toast";
4661
4619
  import {
4662
4620
  ArrowLeft01Icon as ArrowLeft01Icon14,
4663
4621
  ArrowRight01Icon as ArrowRight01Icon10,
@@ -4759,11 +4717,11 @@ var UniversalMembersPage = ({
4759
4717
  setIsRemoving(true);
4760
4718
  try {
4761
4719
  await onRemoveMember(memberToRemove.id);
4762
- toast13.success("Member removed successfully.");
4720
+ toast12.success("Member removed successfully.");
4763
4721
  setExpandedId(null);
4764
4722
  setMemberToRemove(null);
4765
4723
  } catch (error) {
4766
- toast13.error("Failed to remove member.");
4724
+ toast12.error("Failed to remove member.");
4767
4725
  } finally {
4768
4726
  setIsRemoving(false);
4769
4727
  }
@@ -4777,7 +4735,7 @@ var UniversalMembersPage = ({
4777
4735
  setInviteEmail("");
4778
4736
  setIsInviteMode(false);
4779
4737
  } catch (error) {
4780
- toast13.error(error.message || "Failed to send invitation.");
4738
+ toast12.error(error.message || "Failed to send invitation.");
4781
4739
  } finally {
4782
4740
  setIsInviting(false);
4783
4741
  }
@@ -4924,24 +4882,38 @@ var UniversalMembersPage = ({
4924
4882
  import React48, { useState as useState34 } from "react";
4925
4883
  import { useRouter as useRouter3 } from "next/navigation";
4926
4884
  import { HugeiconsIcon as HugeiconsIcon34 } from "@hugeicons/react";
4927
- import toast14 from "react-hot-toast";
4885
+ import toast13 from "react-hot-toast";
4928
4886
  import {
4929
4887
  Loading03Icon as Loading03Icon22,
4930
4888
  Notification01Icon as Notification01Icon2,
4931
4889
  ArrowLeft01Icon as ArrowLeft01Icon15,
4932
4890
  ArrowRight01Icon as ArrowRight01Icon11,
4933
- CancelCircleIcon as CancelCircleIcon10,
4891
+ CancelCircleIcon as CancelCircleIcon9,
4934
4892
  ArrowUpRight01Icon as ArrowUpRight01Icon3,
4935
4893
  Settings03Icon,
4936
4894
  Logout01Icon
4937
4895
  } from "@hugeicons/core-free-icons";
4896
+ var OrgAvatar = ({ src, sizeClass = "w-10 h-10" }) => {
4897
+ const [loaded, setLoaded] = useState34(false);
4898
+ const [error, setError] = useState34(false);
4899
+ const defaultAvatar = "https://storage.googleapis.com/retina-cloud-v2/assets/images/office_a.avif";
4900
+ const finalSrc = error || !src ? defaultAvatar : src;
4901
+ return /* @__PURE__ */ React48.createElement("div", { className: `relative shrink-0 ${sizeClass}` }, /* @__PURE__ */ React48.createElement("div", { className: "w-full h-full rounded-lg bg-neutral-100 flex items-center justify-center overflow-hidden" }, !loaded && !error && /* @__PURE__ */ React48.createElement(HugeiconsIcon34, { icon: Loading03Icon22, className: "animate-spin text-neutral-400 absolute", size: 14 }), /* @__PURE__ */ React48.createElement(
4902
+ "img",
4903
+ {
4904
+ src: finalSrc,
4905
+ alt: "Workspace Avatar",
4906
+ className: `w-full h-full object-cover transition-opacity duration-300 ${loaded || error ? "opacity-100" : "opacity-0"}`,
4907
+ onLoad: () => setLoaded(true),
4908
+ onError: () => setError(true)
4909
+ }
4910
+ )));
4911
+ };
4938
4912
  var UniversalHome2 = ({
4939
4913
  avatarSrc,
4940
- userStatus = "ACTIVE",
4941
4914
  organizations = [],
4942
4915
  activeOrgId,
4943
4916
  onOrganizationSelect,
4944
- barIcons = [],
4945
4917
  createHuddleAction,
4946
4918
  joinHuddleAction,
4947
4919
  notifications = [],
@@ -4953,7 +4925,7 @@ var UniversalHome2 = ({
4953
4925
  onResolveInvite,
4954
4926
  formatNotifDate,
4955
4927
  customContent,
4956
- departmentsProps,
4928
+ huddlesProps,
4957
4929
  onLogout
4958
4930
  }) => {
4959
4931
  const [isAvatarLoaded, setIsAvatarLoaded] = useState34(false);
@@ -4967,27 +4939,13 @@ var UniversalHome2 = ({
4967
4939
  const fallbackAvatarUrl = "https://storage.googleapis.com/retina-cloud-v2/assets/images/avatar.avif";
4968
4940
  const finalAvatarSrc = avatarSrc || fallbackAvatarUrl;
4969
4941
  const hasUnreadNotifs = notifications.some((n) => !n.isRead);
4970
- const getDisplayStatus = () => {
4971
- if (userStatus === "ACTIVE") return "Online";
4972
- if (userStatus === "BUSY") return "Busy";
4973
- if (userStatus === "OFFLINE") return "Offline";
4974
- if (userStatus === "AWAY") return "Away";
4975
- return "Online";
4976
- };
4977
- const getStatusColor = () => {
4978
- if (userStatus === "ACTIVE") return "bg-emerald-500";
4979
- if (userStatus === "BUSY") return "bg-amber-500";
4980
- if (userStatus === "OFFLINE") return "bg-rose-500";
4981
- if (userStatus === "AWAY") return "bg-neutral-400";
4982
- return "bg-emerald-500";
4983
- };
4984
4942
  const handleResolve = async (resolution) => {
4985
4943
  if (!onResolveInvite || !selectedNotif) return;
4986
4944
  setIsResolving(true);
4987
4945
  try {
4988
4946
  await onResolveInvite(selectedNotif, resolution);
4989
4947
  } catch (error) {
4990
- toast14.error("Failed to process invitation");
4948
+ toast13.error("Failed to process invitation");
4991
4949
  } finally {
4992
4950
  setIsResolving(false);
4993
4951
  }
@@ -4997,7 +4955,7 @@ var UniversalHome2 = ({
4997
4955
  try {
4998
4956
  if (onLogout) await onLogout();
4999
4957
  } catch (e) {
5000
- toast14.error("Failed to log out cleanly.");
4958
+ toast13.error("Failed to log out cleanly.");
5001
4959
  } finally {
5002
4960
  setIsLoggingOut(false);
5003
4961
  setShowLogoutConfirm(false);
@@ -5073,11 +5031,11 @@ var UniversalHome2 = ({
5073
5031
  }
5074
5032
  )
5075
5033
  ))), customContent && /* @__PURE__ */ React48.createElement("div", { className: "w-full" }, customContent), /* @__PURE__ */ React48.createElement("div", { className: "w-full mt-2" }, /* @__PURE__ */ React48.createElement(
5076
- UniversalDepartmentsPage,
5034
+ UniversalHuddlesPage,
5077
5035
  {
5078
- ...departmentsProps
5036
+ ...huddlesProps
5079
5037
  }
5080
- )), showOrgSwitcher && /* @__PURE__ */ React48.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ React48.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setShowOrgSwitcher(false) }), /* @__PURE__ */ React48.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__ */ React48.createElement("div", { className: "flex items-center justify-between p-5 shrink-0 " }, /* @__PURE__ */ React48.createElement("h3", { className: "text-[15px] text-black tracking-tight" }, "Switch Workspace"), /* @__PURE__ */ React48.createElement("button", { onClick: () => setShowOrgSwitcher(false), className: "text-neutral-400 hover:text-black transition-colors outline-none" }, /* @__PURE__ */ React48.createElement(HugeiconsIcon34, { icon: CancelCircleIcon10, size: 18 }))), /* @__PURE__ */ React48.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-2" }, /* @__PURE__ */ React48.createElement("div", { className: "flex flex-col" }, organizations?.length === 0 ? /* @__PURE__ */ React48.createElement("div", { className: "p-8 text-center text-xs text-neutral-400" }, "No organizations found.") : organizations?.map((org) => /* @__PURE__ */ React48.createElement(
5038
+ )), showOrgSwitcher && /* @__PURE__ */ React48.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ React48.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setShowOrgSwitcher(false) }), /* @__PURE__ */ React48.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__ */ React48.createElement("div", { className: "flex items-center justify-between p-5 shrink-0 " }, /* @__PURE__ */ React48.createElement("h3", { className: "text-[15px] text-black tracking-tight" }, "Switch Workspace"), /* @__PURE__ */ React48.createElement("button", { onClick: () => setShowOrgSwitcher(false), className: "text-neutral-400 hover:text-black transition-colors outline-none" }, /* @__PURE__ */ React48.createElement(HugeiconsIcon34, { icon: CancelCircleIcon9, size: 18 }))), /* @__PURE__ */ React48.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-2" }, /* @__PURE__ */ React48.createElement("div", { className: "flex flex-col" }, organizations?.length === 0 ? /* @__PURE__ */ React48.createElement("div", { className: "p-8 text-center text-xs text-neutral-400" }, "No organizations found.") : organizations?.map((org) => /* @__PURE__ */ React48.createElement(
5081
5039
  "button",
5082
5040
  {
5083
5041
  key: org.id,
@@ -5087,6 +5045,7 @@ var UniversalHome2 = ({
5087
5045
  },
5088
5046
  className: `p-4 flex items-center justify-between gap-3 cursor-pointer outline-none transition-colors border-b border-neutral-50 last:border-0 ${activeOrgId === org.id ? "bg-neutral-50" : "hover:bg-neutral-50/50"}`
5089
5047
  },
5048
+ /* @__PURE__ */ React48.createElement(OrgAvatar, { src: org.avatarUrl }),
5090
5049
  /* @__PURE__ */ React48.createElement("div", { className: "flex flex-col items-start min-w-0 flex-1" }, /* @__PURE__ */ React48.createElement("span", { className: `text-[13px] tracking-tight truncate w-full text-left ${activeOrgId === org.id ? "text-black " : "text-neutral-600"}` }, org.name), /* @__PURE__ */ React48.createElement("span", { className: "text-[11px] text-[#068afe] capitalize truncate w-full text-left mt-0.5" }, org.role?.toLowerCase() || "Member")),
5091
5050
  activeOrgId === org.id && /* @__PURE__ */ React48.createElement("div", { className: "w-2 h-2 rounded-full bg-[#068afe] shrink-0" })
5092
5051
  )))), /* @__PURE__ */ React48.createElement("div", { className: "p-4 shrink-0" }, /* @__PURE__ */ React48.createElement(
@@ -5100,7 +5059,7 @@ var UniversalHome2 = ({
5100
5059
  },
5101
5060
  /* @__PURE__ */ React48.createElement(HugeiconsIcon34, { icon: Logout01Icon, size: 15 }),
5102
5061
  "Log Out"
5103
- )))), showNotifDialog && /* @__PURE__ */ React48.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ React48.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setShowNotifDialog(false) }), /* @__PURE__ */ React48.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__ */ React48.createElement("div", { className: "flex items-center justify-between p-5 shrink-0" }, selectedNotif ? /* @__PURE__ */ React48.createElement("button", { onClick: () => setSelectedNotif(null), disabled: isResolving, className: "text-[#068afe] hover:text-[#068afe] transition-colors outline-none flex items-center gap-2 text-[11px] tracking-widest disabled:opacity-50" }, /* @__PURE__ */ React48.createElement(HugeiconsIcon34, { icon: ArrowLeft01Icon15, size: 14 }), " Back") : /* @__PURE__ */ React48.createElement("h3", { className: "text-[15px] text-black tracking-tight flex items-center gap-2" }, "Notifications"), /* @__PURE__ */ React48.createElement("button", { onClick: () => setShowNotifDialog(false), disabled: isResolving, className: "text-neutral-400 hover:text-black transition-colors outline-none disabled:opacity-50" }, /* @__PURE__ */ React48.createElement(HugeiconsIcon34, { icon: CancelCircleIcon10, size: 18 }))), /* @__PURE__ */ React48.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-2 relative" }, isNotifsLoading && !selectedNotif && /* @__PURE__ */ React48.createElement("div", { className: "absolute inset-0 z-10 flex items-center justify-center" }, /* @__PURE__ */ React48.createElement(HugeiconsIcon34, { icon: Loading03Icon22, size: 28, className: "animate-spin text-black" })), selectedNotif ? /* @__PURE__ */ React48.createElement("div", { className: "p-4 text-left" }, /* @__PURE__ */ React48.createElement("h4", { className: "text-[14px] text-black mb-1" }, selectedNotif.title), /* @__PURE__ */ React48.createElement("span", { className: "text-[10px] text-neutral-400 tracking-widest mb-4 block" }, formatNotifDate(selectedNotif.createdAt)), /* @__PURE__ */ React48.createElement("p", { className: "text-[12px] text-neutral-600 leading-relaxed whitespace-pre-wrap" }, selectedNotif.message), selectedNotif.type === "HUDDLE_INVITE" && selectedNotif.meta_json?.action === "RESOLVE_INVITE" && !selectedNotif.meta_json?.completed && /* @__PURE__ */ React48.createElement("div", { className: "mt-8 flex gap-3 pt-6 " }, /* @__PURE__ */ React48.createElement(
5062
+ )))), showNotifDialog && /* @__PURE__ */ React48.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ React48.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setShowNotifDialog(false) }), /* @__PURE__ */ React48.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__ */ React48.createElement("div", { className: "flex items-center justify-between p-5 shrink-0" }, selectedNotif ? /* @__PURE__ */ React48.createElement("button", { onClick: () => setSelectedNotif(null), disabled: isResolving, className: "text-[#068afe] hover:text-[#068afe] transition-colors outline-none flex items-center gap-2 text-[11px] tracking-widest disabled:opacity-50" }, /* @__PURE__ */ React48.createElement(HugeiconsIcon34, { icon: ArrowLeft01Icon15, size: 14 }), " Back") : /* @__PURE__ */ React48.createElement("h3", { className: "text-[15px] text-black tracking-tight flex items-center gap-2" }, "Notifications"), /* @__PURE__ */ React48.createElement("button", { onClick: () => setShowNotifDialog(false), disabled: isResolving, className: "text-neutral-400 hover:text-black transition-colors outline-none disabled:opacity-50" }, /* @__PURE__ */ React48.createElement(HugeiconsIcon34, { icon: CancelCircleIcon9, size: 18 }))), /* @__PURE__ */ React48.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-2 relative" }, isNotifsLoading && !selectedNotif && /* @__PURE__ */ React48.createElement("div", { className: "absolute inset-0 z-10 flex items-center justify-center" }, /* @__PURE__ */ React48.createElement(HugeiconsIcon34, { icon: Loading03Icon22, size: 28, className: "animate-spin text-black" })), selectedNotif ? /* @__PURE__ */ React48.createElement("div", { className: "p-4 text-left" }, /* @__PURE__ */ React48.createElement("h4", { className: "text-[14px] text-black mb-1" }, selectedNotif.title), /* @__PURE__ */ React48.createElement("span", { className: "text-[10px] text-neutral-400 tracking-widest mb-4 block" }, formatNotifDate(selectedNotif.createdAt)), /* @__PURE__ */ React48.createElement("p", { className: "text-[12px] text-neutral-600 leading-relaxed whitespace-pre-wrap" }, selectedNotif.message), selectedNotif.type === "HUDDLE_INVITE" && selectedNotif.meta_json?.action === "RESOLVE_INVITE" && !selectedNotif.meta_json?.completed && /* @__PURE__ */ React48.createElement("div", { className: "mt-8 flex gap-3 pt-6 " }, /* @__PURE__ */ React48.createElement(
5104
5063
  "button",
5105
5064
  {
5106
5065
  onClick: () => handleResolve("ACCEPTED"),
@@ -5148,22 +5107,69 @@ var UniversalHome2 = ({
5148
5107
  };
5149
5108
 
5150
5109
  // src/components/UniversalSettings.tsx
5151
- import React49, { useState as useState35, useEffect as useEffect19, useRef as useRef13 } from "react";
5152
- import toast15 from "react-hot-toast";
5153
- import { HugeiconsIcon as HugeiconsIcon35 } from "@hugeicons/react";
5110
+ import React50, { useState as useState36, useEffect as useEffect19, useRef as useRef13 } from "react";
5111
+ import toast14 from "react-hot-toast";
5112
+ import { HugeiconsIcon as HugeiconsIcon36 } from "@hugeicons/react";
5154
5113
  import {
5155
5114
  ArrowLeft01Icon as ArrowLeft01Icon16,
5156
5115
  ArrowRight01Icon as ArrowRight01Icon12,
5157
5116
  Loading03Icon as Loading03Icon23,
5158
- Search01Icon as Search01Icon4,
5117
+ Search01Icon as Search01Icon5,
5159
5118
  SearchList02Icon as SearchList02Icon3,
5160
5119
  ListSettingIcon as ListSettingIcon3,
5161
5120
  CircleLock02Icon as CircleLock02Icon3,
5121
+ PlusSignIcon as PlusSignIcon3,
5162
5122
  Coins01Icon
5163
5123
  } from "@hugeicons/core-free-icons";
5124
+
5125
+ // src/components/ReusableOptions.tsx
5126
+ import React49, { useState as useState35 } from "react";
5127
+ import { HugeiconsIcon as HugeiconsIcon35 } from "@hugeicons/react";
5128
+ import { CancelCircleIcon as CancelCircleIcon10, Search01Icon as Search01Icon4 } from "@hugeicons/core-free-icons";
5129
+ var ReusableOptions = ({
5130
+ isOpen,
5131
+ onClose,
5132
+ title,
5133
+ options,
5134
+ selectedOption,
5135
+ onSelect,
5136
+ showSearch = false
5137
+ }) => {
5138
+ const [searchQuery, setSearchQuery] = useState35("");
5139
+ if (!isOpen) return null;
5140
+ const filteredOptions = options.filter(
5141
+ (opt) => opt.toLowerCase().includes(searchQuery.toLowerCase())
5142
+ );
5143
+ return /* @__PURE__ */ React49.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ React49.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: onClose }), /* @__PURE__ */ React49.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__ */ React49.createElement("div", { className: "flex items-center justify-between p-5 shrink-0 " }, /* @__PURE__ */ React49.createElement("h3", { className: "text-[15px] text-black tracking-tight" }, title), /* @__PURE__ */ React49.createElement("button", { onClick: onClose, className: "text-neutral-400 hover:text-black transition-colors outline-none" }, /* @__PURE__ */ React49.createElement(HugeiconsIcon35, { icon: CancelCircleIcon10, size: 18 }))), showSearch && /* @__PURE__ */ React49.createElement("div", { className: "p-4 shrink-0 " }, /* @__PURE__ */ React49.createElement("div", { className: "relative w-full" }, /* @__PURE__ */ React49.createElement("div", { className: "absolute inset-y-0 left-0 pl-4 flex items-center pointer-events-none" }, /* @__PURE__ */ React49.createElement(HugeiconsIcon35, { icon: Search01Icon4, size: 16, className: "text-neutral-400" })), /* @__PURE__ */ React49.createElement(
5144
+ "input",
5145
+ {
5146
+ type: "text",
5147
+ placeholder: "Search...",
5148
+ value: searchQuery,
5149
+ onChange: (e) => setSearchQuery(e.target.value),
5150
+ className: "w-full pl-10 pr-4 py-2.5 bg-neutral-100 rounded-full text-[13px] text-black placeholder-neutral-400 outline-none focus:bg-neutral-200 transition-colors"
5151
+ }
5152
+ ))), /* @__PURE__ */ React49.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-2" }, filteredOptions.length === 0 ? /* @__PURE__ */ React49.createElement("div", { className: "p-6 text-center text-[12px] text-neutral-400" }, "No options found.") : filteredOptions.map((opt) => {
5153
+ const isSelected = selectedOption === opt;
5154
+ return /* @__PURE__ */ React49.createElement(
5155
+ "button",
5156
+ {
5157
+ key: opt,
5158
+ onClick: () => {
5159
+ onSelect(opt);
5160
+ onClose();
5161
+ },
5162
+ className: `w-full text-left p-4 text-[13px] tracking-tight rounded-full transition-colors outline-none ${isSelected ? "text-[#068afe] bg-[#068afe]/10" : "text-neutral-600 hover:bg-neutral-50/50"}`
5163
+ },
5164
+ opt
5165
+ );
5166
+ }))));
5167
+ };
5168
+
5169
+ // src/components/UniversalSettings.tsx
5164
5170
  var MemberAvatar2 = ({ src, status, sizeClass = "w-10 h-10" }) => {
5165
- const [loaded, setLoaded] = useState35(false);
5166
- const [error, setError] = useState35(false);
5171
+ const [loaded, setLoaded] = useState36(false);
5172
+ const [error, setError] = useState36(false);
5167
5173
  const defaultAvatar = "https://storage.googleapis.com/retina-cloud-v2/assets/images/avatar.avif";
5168
5174
  const finalSrc = error || !src ? defaultAvatar : src;
5169
5175
  const getStatusColor = () => {
@@ -5180,7 +5186,7 @@ var MemberAvatar2 = ({ src, status, sizeClass = "w-10 h-10" }) => {
5180
5186
  return "bg-neutral-200";
5181
5187
  }
5182
5188
  };
5183
- return /* @__PURE__ */ React49.createElement("div", { className: `relative shrink-0 ${sizeClass}` }, /* @__PURE__ */ React49.createElement("div", { className: "w-full h-full rounded-lg bg-neutral-100 flex items-center justify-center overflow-hidden" }, !loaded && !error && /* @__PURE__ */ React49.createElement(HugeiconsIcon35, { icon: Loading03Icon23, className: "animate-spin text-neutral-400 absolute", size: 14 }), /* @__PURE__ */ React49.createElement(
5189
+ return /* @__PURE__ */ React50.createElement("div", { className: `relative shrink-0 ${sizeClass}` }, /* @__PURE__ */ React50.createElement("div", { className: "w-full h-full rounded-lg bg-neutral-100 flex items-center justify-center overflow-hidden" }, !loaded && !error && /* @__PURE__ */ React50.createElement(HugeiconsIcon36, { icon: Loading03Icon23, className: "animate-spin text-neutral-400 absolute", size: 14 }), /* @__PURE__ */ React50.createElement(
5184
5190
  "img",
5185
5191
  {
5186
5192
  src: finalSrc,
@@ -5189,10 +5195,10 @@ var MemberAvatar2 = ({ src, status, sizeClass = "w-10 h-10" }) => {
5189
5195
  onLoad: () => setLoaded(true),
5190
5196
  onError: () => setError(true)
5191
5197
  }
5192
- )), /* @__PURE__ */ React49.createElement("div", { className: `absolute -bottom-1 -right-1 w-3.5 h-3.5 rounded-full border-2 border-white z-10 ${getStatusColor()}` }));
5198
+ )), /* @__PURE__ */ React50.createElement("div", { className: `absolute -bottom-1 -right-1 w-3.5 h-3.5 rounded-full border-2 border-white z-10 ${getStatusColor()}` }));
5193
5199
  };
5194
- var PageSpinner8 = () => /* @__PURE__ */ React49.createElement("div", { className: "flex justify-center items-center py-12" }, /* @__PURE__ */ React49.createElement(HugeiconsIcon35, { icon: Loading03Icon23, size: 32, className: "animate-spin mb-4 text-black" }));
5195
- var InputSpinner3 = () => /* @__PURE__ */ React49.createElement("svg", { className: "animate-spin h-4 w-4 text-neutral-400", xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24" }, /* @__PURE__ */ React49.createElement("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }), /* @__PURE__ */ React49.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" }));
5200
+ var PageSpinner8 = () => /* @__PURE__ */ React50.createElement("div", { className: "flex justify-center items-center py-12" }, /* @__PURE__ */ React50.createElement(HugeiconsIcon36, { icon: Loading03Icon23, size: 32, className: "animate-spin mb-4 text-black" }));
5201
+ var InputSpinner3 = () => /* @__PURE__ */ React50.createElement("svg", { className: "animate-spin h-4 w-4 text-neutral-400", xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24" }, /* @__PURE__ */ React50.createElement("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }), /* @__PURE__ */ React50.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" }));
5196
5202
  var UniversalSettings = ({
5197
5203
  accountType,
5198
5204
  userRole,
@@ -5226,40 +5232,30 @@ var UniversalSettings = ({
5226
5232
  const onBackHandler = onBack ?? (() => {
5227
5233
  if (typeof window !== "undefined") window.history.back();
5228
5234
  });
5229
- const [activeTab, setActiveTab] = useState35(accountType === "ORGANIZATION" ? "MEMBERS" : "ACCOUNT");
5235
+ const [activeTab, setActiveTab] = useState36(accountType === "ORGANIZATION" ? "MEMBERS" : "ACCOUNT");
5230
5236
  useEffect19(() => {
5231
5237
  if (accountType === "INDIVIDUAL" && activeTab === "MEMBERS") {
5232
5238
  setActiveTab("ACCOUNT");
5233
5239
  }
5234
5240
  }, [accountType, activeTab]);
5235
- const [expandedId, setExpandedId] = useState35(null);
5236
- const [memberToRemove, setMemberToRemove] = useState35(null);
5237
- const [isRemoving, setIsRemoving] = useState35(false);
5238
- const [isInviteMode, setIsInviteMode] = useState35(false);
5239
- const [inviteEmail, setInviteEmail] = useState35("");
5240
- const [isInviting, setIsInviting] = useState35(false);
5241
- const [localSearchQuery, setLocalSearchQuery] = useState35(membersSearchQuery);
5242
- const [isTyping, setIsTyping] = useState35(false);
5241
+ const [expandedId, setExpandedId] = useState36(null);
5242
+ const [memberToRemove, setMemberToRemove] = useState36(null);
5243
+ const [isRemoving, setIsRemoving] = useState36(false);
5244
+ const [isInviteMode, setIsInviteMode] = useState36(false);
5245
+ const [inviteEmail, setInviteEmail] = useState36("");
5246
+ const [isInviting, setIsInviting] = useState36(false);
5247
+ const [localSearchQuery, setLocalSearchQuery] = useState36(membersSearchQuery);
5248
+ const [isTyping, setIsTyping] = useState36(false);
5243
5249
  const isFirstSearchMount = useRef13(true);
5244
- const [isStatusModalOpen, setIsStatusModalOpen] = useState35(false);
5245
- const [isRoleModalOpen, setIsRoleModalOpen] = useState35(false);
5246
- const statusDropdownRef = useRef13(null);
5247
- const roleDropdownRef = useRef13(null);
5248
- const [displayName, setDisplayName] = useState35(initialDisplayName);
5249
- const [slug, setSlug] = useState35(initialSlug);
5250
- const [isCheckingSlug, setIsCheckingSlug] = useState35(false);
5251
- const [slugAvailable, setSlugAvailable] = useState35(null);
5252
- const [isSavingAccount, setIsSavingAccount] = useState35(false);
5250
+ const [isStatusModalOpen, setIsStatusModalOpen] = useState36(false);
5251
+ const [isRoleModalOpen, setIsRoleModalOpen] = useState36(false);
5252
+ const [displayName, setDisplayName] = useState36(initialDisplayName);
5253
+ const [slug, setSlug] = useState36(initialSlug);
5254
+ const [isCheckingSlug, setIsCheckingSlug] = useState36(false);
5255
+ const [slugAvailable, setSlugAvailable] = useState36(null);
5256
+ const [isSavingAccount, setIsSavingAccount] = useState36(false);
5253
5257
  const isAccountReadOnly = accountType === "ORGANIZATION" && userRole !== "ADMIN" && userRole !== "MANAGER";
5254
5258
  const cleanEmailId = (val) => val.toLowerCase().replace(/[^a-z0-9@._-]/g, "");
5255
- useEffect19(() => {
5256
- function handleClickOutside(event) {
5257
- if (statusDropdownRef.current && !statusDropdownRef.current.contains(event.target)) setIsStatusModalOpen(false);
5258
- if (roleDropdownRef.current && !roleDropdownRef.current.contains(event.target)) setIsRoleModalOpen(false);
5259
- }
5260
- document.addEventListener("mousedown", handleClickOutside);
5261
- return () => document.removeEventListener("mousedown", handleClickOutside);
5262
- }, []);
5263
5259
  useEffect19(() => {
5264
5260
  if (activeTab !== "MEMBERS") return;
5265
5261
  if (isFirstSearchMount.current) {
@@ -5278,11 +5274,11 @@ var UniversalSettings = ({
5278
5274
  setIsRemoving(true);
5279
5275
  try {
5280
5276
  await onRemoveMember(memberToRemove.userId);
5281
- toast15.success("Member removed successfully.");
5277
+ toast14.success("Member removed successfully.");
5282
5278
  setExpandedId(null);
5283
5279
  setMemberToRemove(null);
5284
5280
  } catch (error) {
5285
- toast15.error("Failed to remove member.");
5281
+ toast14.error("Failed to remove member.");
5286
5282
  } finally {
5287
5283
  setIsRemoving(false);
5288
5284
  }
@@ -5296,7 +5292,7 @@ var UniversalSettings = ({
5296
5292
  setInviteEmail("");
5297
5293
  setIsInviteMode(false);
5298
5294
  } catch (error) {
5299
- toast15.error(error.message || "Failed to send invitation.");
5295
+ toast14.error(error.message || "Failed to send invitation.");
5300
5296
  } finally {
5301
5297
  setIsInviting(false);
5302
5298
  }
@@ -5339,7 +5335,7 @@ var UniversalSettings = ({
5339
5335
  e.preventDefault();
5340
5336
  if (isSavingAccount || isCheckingSlug || isAccountReadOnly || !onSaveAccount) return;
5341
5337
  if (slug !== initialSlug && slugAvailable === false) {
5342
- toast15.error("Please select an available address handle.");
5338
+ toast14.error("Please select an available address handle.");
5343
5339
  return;
5344
5340
  }
5345
5341
  setIsSavingAccount(true);
@@ -5350,19 +5346,19 @@ var UniversalSettings = ({
5350
5346
  };
5351
5347
  const res = await onSaveAccount(payload);
5352
5348
  if (res.success) {
5353
- toast15.success("Profile updated successfully.");
5349
+ toast14.success("Profile updated successfully.");
5354
5350
  } else {
5355
- toast15.error(res.error || "Failed to update profile.");
5351
+ toast14.error(res.error || "Failed to update profile.");
5356
5352
  }
5357
5353
  } catch (error) {
5358
- toast15.error("Service unavailable. Try again later.");
5354
+ toast14.error("Service unavailable. Try again later.");
5359
5355
  } finally {
5360
5356
  setIsSavingAccount(false);
5361
5357
  }
5362
5358
  };
5363
5359
  const hasAccountChanges = displayName !== initialDisplayName || slug !== initialSlug;
5364
5360
  const isAccountSaveDisabled = isSavingAccount || isAccountReadOnly || isCheckingSlug || !hasAccountChanges || displayName.length < 3 || slug.length < 3 || slug !== initialSlug && slugAvailable === false;
5365
- return /* @__PURE__ */ React49.createElement("div", { className: "w-full max-w-3xl mx-auto flex flex-col animate-in fade-in duration-300" }, /* @__PURE__ */ React49.createElement(ManagedToaster, null), /* @__PURE__ */ React49.createElement("div", { className: "mb-6 flex w-full items-center px-1" }, /* @__PURE__ */ React49.createElement("button", { onClick: onBackHandler, className: "flex items-center gap-2 text-[#068afe] hover:text-[#068afe] transition-colors text-[13px] outline-none" }, /* @__PURE__ */ React49.createElement(HugeiconsIcon35, { icon: ArrowLeft01Icon16, size: 16 }), " Back")), /* @__PURE__ */ React49.createElement("div", { className: "flex flex-col gap-1 mb-8 px-1" }, /* @__PURE__ */ React49.createElement("h1", { className: "text-black text-xl tracking-tight" }, "System Settings"), /* @__PURE__ */ React49.createElement("p", { className: "text-xs text-neutral-500" }, "Manage your workspace identity, team configurations, and AI billing parameters.")), /* @__PURE__ */ React49.createElement("div", { className: "flex items-center gap-6 border-b border-neutral-200 mb-6 overflow-x-auto custom-scrollbar px-1" }, accountType === "ORGANIZATION" && /* @__PURE__ */ React49.createElement(
5361
+ return /* @__PURE__ */ React50.createElement("div", { className: "w-full max-w-3xl mx-auto flex flex-col animate-in fade-in duration-300" }, /* @__PURE__ */ React50.createElement(ManagedToaster, null), /* @__PURE__ */ React50.createElement("div", { className: "mb-6 flex w-full items-center px-1" }, /* @__PURE__ */ React50.createElement("button", { onClick: onBackHandler, className: "flex items-center gap-2 text-[#068afe] hover:text-[#068afe] transition-colors text-[13px] outline-none" }, /* @__PURE__ */ React50.createElement(HugeiconsIcon36, { icon: ArrowLeft01Icon16, size: 16 }), " Back")), /* @__PURE__ */ React50.createElement("div", { className: "flex flex-col gap-1 mb-8 px-1" }, /* @__PURE__ */ React50.createElement("h1", { className: "text-black text-xl tracking-tight" }, "System Settings"), /* @__PURE__ */ React50.createElement("p", { className: "text-xs text-neutral-500" }, "Manage your workspace identity, team configurations, and AI billing parameters.")), /* @__PURE__ */ React50.createElement("div", { className: "flex items-center gap-6 mb-6 overflow-x-auto custom-scrollbar px-1" }, accountType === "ORGANIZATION" && /* @__PURE__ */ React50.createElement(
5366
5362
  "button",
5367
5363
  {
5368
5364
  onClick: () => {
@@ -5373,21 +5369,21 @@ var UniversalSettings = ({
5373
5369
  className: `pb-3 text-[13px] tracking-wide outline-none transition-colors border-b-2 whitespace-nowrap ${activeTab === "MEMBERS" ? "border-black text-black" : "border-transparent text-neutral-500 hover:text-black"}`
5374
5370
  },
5375
5371
  "Members"
5376
- ), /* @__PURE__ */ React49.createElement(
5372
+ ), /* @__PURE__ */ React50.createElement(
5377
5373
  "button",
5378
5374
  {
5379
5375
  onClick: () => setActiveTab("ACCOUNT"),
5380
5376
  className: `pb-3 text-[13px] tracking-wide outline-none transition-colors border-b-2 whitespace-nowrap ${activeTab === "ACCOUNT" ? "border-black text-black" : "border-transparent text-neutral-500 hover:text-black"}`
5381
5377
  },
5382
5378
  "Account Profile"
5383
- ), /* @__PURE__ */ React49.createElement(
5379
+ ), /* @__PURE__ */ React50.createElement(
5384
5380
  "button",
5385
5381
  {
5386
5382
  onClick: () => setActiveTab("BILLING"),
5387
5383
  className: `pb-3 text-[13px] tracking-wide outline-none transition-colors border-b-2 whitespace-nowrap ${activeTab === "BILLING" ? "border-black text-black" : "border-transparent text-neutral-500 hover:text-black"}`
5388
5384
  },
5389
5385
  "Billing"
5390
- )), activeTab === "MEMBERS" && accountType === "ORGANIZATION" && /* @__PURE__ */ React49.createElement("div", { className: "flex flex-col animate-in fade-in duration-300" }, /* @__PURE__ */ React49.createElement(
5386
+ )), activeTab === "MEMBERS" && accountType === "ORGANIZATION" && /* @__PURE__ */ React50.createElement("div", { className: "flex flex-col animate-in fade-in duration-300" }, /* @__PURE__ */ React50.createElement(
5391
5387
  ConfirmationDialog,
5392
5388
  {
5393
5389
  isOpen: !!memberToRemove,
@@ -5400,7 +5396,7 @@ var UniversalSettings = ({
5400
5396
  onClose: () => setMemberToRemove(null),
5401
5397
  onConfirm: handleConfirmRemove
5402
5398
  }
5403
- ), !isInviteMode && !activeExpandedMember && /* @__PURE__ */ React49.createElement("div", { className: "flex flex-row flex-nowrap mb-4 items-center justify-between gap-4 w-full px-1" }, /* @__PURE__ */ React49.createElement("div", { className: "relative flex-1 min-w-0 max-w-full" }, /* @__PURE__ */ React49.createElement("div", { className: "absolute inset-y-0 left-0 pl-4 flex items-center pointer-events-none" }, /* @__PURE__ */ React49.createElement(HugeiconsIcon35, { icon: Search01Icon4, size: 16, className: "text-neutral-400" })), /* @__PURE__ */ React49.createElement(
5399
+ ), !isInviteMode && !activeExpandedMember && /* @__PURE__ */ React50.createElement("div", { className: "flex flex-row flex-nowrap mb-4 items-center justify-between gap-4 w-full px-1" }, /* @__PURE__ */ React50.createElement("div", { className: "relative flex-1 min-w-0 max-w-full" }, /* @__PURE__ */ React50.createElement("div", { className: "absolute inset-y-0 left-0 pl-4 flex items-center pointer-events-none" }, /* @__PURE__ */ React50.createElement(HugeiconsIcon36, { icon: Search01Icon5, size: 16, className: "text-neutral-400" })), /* @__PURE__ */ React50.createElement(
5404
5400
  "input",
5405
5401
  {
5406
5402
  type: "text",
@@ -5409,28 +5405,28 @@ var UniversalSettings = ({
5409
5405
  onChange: (e) => setLocalSearchQuery(e.target.value),
5410
5406
  className: "w-full pl-10 pr-4 py-2 bg-white rounded-full text-[13px] text-black placeholder-neutral-400 outline-none transition-colors focus:border-black"
5411
5407
  }
5412
- )), /* @__PURE__ */ React49.createElement("div", { className: "flex items-center gap-3 w-auto pb-0 shrink-0" }, /* @__PURE__ */ React49.createElement(
5408
+ )), /* @__PURE__ */ React50.createElement("div", { className: "flex items-center gap-3 w-auto pb-0 shrink-0" }, /* @__PURE__ */ React50.createElement(
5413
5409
  "button",
5414
5410
  {
5415
5411
  onClick: () => setIsStatusModalOpen(true),
5416
5412
  className: "flex items-center justify-center bg-white w-9 h-9 rounded-full text-neutral-500 hover:text-black transition-colors outline-none"
5417
5413
  },
5418
- /* @__PURE__ */ React49.createElement(HugeiconsIcon35, { icon: SearchList02Icon3, size: 16 })
5419
- ), /* @__PURE__ */ React49.createElement(
5414
+ /* @__PURE__ */ React50.createElement(HugeiconsIcon36, { icon: SearchList02Icon3, size: 16 })
5415
+ ), /* @__PURE__ */ React50.createElement(
5420
5416
  "button",
5421
5417
  {
5422
5418
  onClick: () => setIsRoleModalOpen(true),
5423
5419
  className: "flex items-center justify-center bg-white w-9 h-9 rounded-full text-neutral-500 hover:text-black transition-colors outline-none"
5424
5420
  },
5425
- /* @__PURE__ */ React49.createElement(HugeiconsIcon35, { icon: ListSettingIcon3, size: 16 })
5426
- ))), /* @__PURE__ */ React49.createElement("div", { className: "flex flex-col gap-8 p-6 rounded-2xl bg-white w-full" }, activeExpandedMember ? /* @__PURE__ */ React49.createElement("div", { className: "flex flex-col animate-in fade-in zoom-in-95 duration-300 w-full" }, /* @__PURE__ */ React49.createElement("div", { className: "flex flex-col gap-1 mb-8" }, /* @__PURE__ */ React49.createElement("h2", { className: "text-black text-xl tracking-tight" }, "Member Profile"), /* @__PURE__ */ React49.createElement("p", { className: "text-[12px] text-neutral-500" }, "View and manage this member's access privileges.")), /* @__PURE__ */ React49.createElement("div", { className: "flex items-center gap-4 mb-8" }, /* @__PURE__ */ React49.createElement(MemberAvatar2, { src: activeExpandedMember.avatarUrl, status: activeExpandedMember.status, sizeClass: "w-14 h-14" }), /* @__PURE__ */ React49.createElement("div", { className: "flex flex-col min-w-0" }, /* @__PURE__ */ React49.createElement("span", { className: "text-sm text-black tracking-tight truncate" }, activeExpandedMember.fullName), /* @__PURE__ */ React49.createElement("span", { className: "text-[12px] text-neutral-500 capitalize" }, activeExpandedMember.role.toLowerCase()))), activeExpandedMember.departmentName && /* @__PURE__ */ React49.createElement("div", { className: "mb-8" }, /* @__PURE__ */ React49.createElement("span", { className: "text-[11px] tracking-[0.2em] text-neutral-400 block mb-1" }, "Assigned Department"), /* @__PURE__ */ React49.createElement("span", { className: "text-[12px] text-black truncate block" }, activeExpandedMember.departmentName)), /* @__PURE__ */ React49.createElement("div", { className: "flex flex-col sm:flex-row gap-3 pt-6 " }, !isAccountReadOnly && /* @__PURE__ */ React49.createElement(
5421
+ /* @__PURE__ */ React50.createElement(HugeiconsIcon36, { icon: ListSettingIcon3, size: 16 })
5422
+ ))), /* @__PURE__ */ React50.createElement("div", { className: "flex flex-col gap-8 p-6 rounded-2xl bg-white w-full" }, activeExpandedMember ? /* @__PURE__ */ React50.createElement("div", { className: "flex flex-col animate-in fade-in zoom-in-95 duration-300 w-full" }, /* @__PURE__ */ React50.createElement("div", { className: "flex flex-col gap-1 mb-8" }, /* @__PURE__ */ React50.createElement("h2", { className: "text-black text-xl tracking-tight" }, "Member Profile"), /* @__PURE__ */ React50.createElement("p", { className: "text-[12px] text-neutral-500" }, "View and manage this member's access privileges.")), /* @__PURE__ */ React50.createElement("div", { className: "flex items-center gap-4 mb-8" }, /* @__PURE__ */ React50.createElement(MemberAvatar2, { src: activeExpandedMember.avatarUrl, status: activeExpandedMember.status, sizeClass: "w-14 h-14" }), /* @__PURE__ */ React50.createElement("div", { className: "flex flex-col min-w-0" }, /* @__PURE__ */ React50.createElement("span", { className: "text-sm text-black tracking-tight truncate" }, activeExpandedMember.fullName), /* @__PURE__ */ React50.createElement("span", { className: "text-[12px] text-neutral-500 capitalize" }, activeExpandedMember.role.toLowerCase()))), /* @__PURE__ */ React50.createElement("div", { className: "flex flex-col sm:flex-row gap-3 pt-6 " }, !isAccountReadOnly && /* @__PURE__ */ React50.createElement(
5427
5423
  "button",
5428
5424
  {
5429
5425
  onClick: () => setMemberToRemove(activeExpandedMember),
5430
5426
  className: "w-full sm:flex-1 py-2.5 bg-white border border-rose-200 text-rose-600 hover:bg-rose-50 rounded-full text-[12px] tracking-wide transition-colors outline-none"
5431
5427
  },
5432
5428
  "Remove Access"
5433
- ), /* @__PURE__ */ React49.createElement(
5429
+ ), /* @__PURE__ */ React50.createElement(
5434
5430
  "button",
5435
5431
  {
5436
5432
  onClick: () => setExpandedId(null),
@@ -5439,14 +5435,14 @@ var UniversalSettings = ({
5439
5435
  "Close Profile"
5440
5436
  ))) : (
5441
5437
  // Standard List & Invite Header
5442
- /* @__PURE__ */ React49.createElement(React49.Fragment, null, /* @__PURE__ */ React49.createElement("div", { className: "flex flex-col gap-1" }, /* @__PURE__ */ React49.createElement("div", { className: "flex flex-row items-center justify-between gap-4" }, /* @__PURE__ */ React49.createElement("h2", { className: "text-black text-xl tracking-tight" }, isInviteMode ? "Add Member" : "Team Directory"), !isInviteMode && !isAccountReadOnly && /* @__PURE__ */ React49.createElement(
5438
+ /* @__PURE__ */ React50.createElement(React50.Fragment, null, /* @__PURE__ */ React50.createElement("div", { className: "flex flex-col gap-1" }, /* @__PURE__ */ React50.createElement("div", { className: "flex flex-row items-center justify-between gap-4" }, /* @__PURE__ */ React50.createElement("h2", { className: "text-black text-xl tracking-tight" }, isInviteMode ? "Add Member" : "Team Directory"), !isInviteMode && !isAccountReadOnly && /* @__PURE__ */ React50.createElement(
5443
5439
  "button",
5444
5440
  {
5445
5441
  onClick: () => setIsInviteMode(true),
5446
5442
  className: "shrink-0 px-4 py-1.5 border border-neutral-200 text-black text-[12px] tracking-wide rounded-full hover:bg-neutral-50 transition-colors outline-none"
5447
5443
  },
5448
5444
  "Invite Team"
5449
- )), !isInviteMode && /* @__PURE__ */ React49.createElement("p", { className: "text-[12px] text-neutral-500" }, "Manage members and access controls across your organization.")), /* @__PURE__ */ React49.createElement("div", { className: "w-full overflow-hidden" }, isInviteMode ? /* @__PURE__ */ React49.createElement("form", { onSubmit: handleInviteSubmit, className: "flex flex-col gap-8 animate-in fade-in duration-300" }, /* @__PURE__ */ React49.createElement("div", { className: "space-y-1.5 mt-2" }, /* @__PURE__ */ React49.createElement("label", { className: "text-[11px] text-neutral-400 tracking-[0.2em] block" }, "Email Address"), /* @__PURE__ */ React49.createElement(
5445
+ )), !isInviteMode && /* @__PURE__ */ React50.createElement("p", { className: "text-[12px] text-neutral-500" }, "Manage members and access controls across your organization.")), /* @__PURE__ */ React50.createElement("div", { className: "w-full overflow-hidden" }, isInviteMode ? /* @__PURE__ */ React50.createElement("form", { onSubmit: handleInviteSubmit, className: "flex flex-col gap-8 animate-in fade-in duration-300" }, /* @__PURE__ */ React50.createElement("div", { className: "space-y-1.5 mt-2" }, /* @__PURE__ */ React50.createElement("label", { className: "text-[11px] text-neutral-400 tracking-[0.2em] block" }, "Email Address"), /* @__PURE__ */ React50.createElement(
5450
5446
  "input",
5451
5447
  {
5452
5448
  type: "email",
@@ -5457,7 +5453,7 @@ var UniversalSettings = ({
5457
5453
  className: "w-full px-2 py-3 bg-transparent text-sm border-b border-neutral-200 text-black outline-none focus:border-black transition-all duration-300",
5458
5454
  placeholder: "name@company.com"
5459
5455
  }
5460
- )), /* @__PURE__ */ React49.createElement("div", { className: "flex flex-col gap-3" }, /* @__PURE__ */ React49.createElement(
5456
+ )), /* @__PURE__ */ React50.createElement("div", { className: "flex flex-col gap-3" }, /* @__PURE__ */ React50.createElement(
5461
5457
  ThreeDActionButton,
5462
5458
  {
5463
5459
  type: "submit",
@@ -5466,7 +5462,7 @@ var UniversalSettings = ({
5466
5462
  className: "w-full"
5467
5463
  },
5468
5464
  "Send Invitation"
5469
- ), /* @__PURE__ */ React49.createElement(
5465
+ ), /* @__PURE__ */ React50.createElement(
5470
5466
  "button",
5471
5467
  {
5472
5468
  type: "button",
@@ -5478,54 +5474,52 @@ var UniversalSettings = ({
5478
5474
  className: "w-full flex items-center justify-center py-2.5 rounded-full border border-neutral-200 text-black hover:bg-neutral-50 transition-colors outline-none text-xs tracking-wide"
5479
5475
  },
5480
5476
  "Cancel"
5481
- ))) : isMembersLoading || isTyping ? /* @__PURE__ */ React49.createElement(PageSpinner8, null) : /* @__PURE__ */ React49.createElement("div", { className: "flex flex-col min-w-0 animate-in fade-in duration-300" }, /* @__PURE__ */ React49.createElement("div", null, members.length === 0 ? /* @__PURE__ */ React49.createElement("p", { className: "text-[12px] text-neutral-400 py-6 text-center" }, "No members found") : members.map((member) => /* @__PURE__ */ React49.createElement(
5477
+ ))) : isMembersLoading || isTyping ? /* @__PURE__ */ React50.createElement(PageSpinner8, null) : /* @__PURE__ */ React50.createElement("div", { className: "flex flex-col min-w-0 animate-in fade-in duration-300" }, /* @__PURE__ */ React50.createElement("div", null, members.length === 0 ? /* @__PURE__ */ React50.createElement("p", { className: "text-[12px] text-neutral-400 py-6 text-center" }, "No members found") : members.map((member) => /* @__PURE__ */ React50.createElement(
5482
5478
  "div",
5483
5479
  {
5484
5480
  key: member.id,
5485
5481
  onClick: () => setExpandedId(member.id),
5486
5482
  className: "flex items-center justify-between py-3 hover:bg-neutral-50 transition-colors cursor-pointer group min-w-0 px-3 -mx-3 rounded-xl"
5487
5483
  },
5488
- /* @__PURE__ */ React49.createElement("div", { className: "flex items-center gap-4 min-w-0 flex-1" }, /* @__PURE__ */ React49.createElement(MemberAvatar2, { src: member.avatarUrl, status: member.status }), /* @__PURE__ */ React49.createElement("div", { className: "min-w-0 flex-1 flex flex-col gap-0.5" }, /* @__PURE__ */ React49.createElement("p", { className: "text-[13px] text-black truncate" }, member.fullName), /* @__PURE__ */ React49.createElement("p", { className: "text-[11px] text-neutral-500 capitalize truncate" }, member.role.toLowerCase())))
5489
- ))), /* @__PURE__ */ React49.createElement("div", { className: "flex items-center justify-between pt-6 mt-2 " }, /* @__PURE__ */ React49.createElement("span", { className: "text-[11px] text-neutral-400 tracking-[0.2em]" }, "Page ", membersCurrentPage, " of ", membersTotalPages === 0 ? 1 : membersTotalPages), /* @__PURE__ */ React49.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React49.createElement(
5484
+ /* @__PURE__ */ React50.createElement("div", { className: "flex items-center gap-4 min-w-0 flex-1" }, /* @__PURE__ */ React50.createElement(MemberAvatar2, { src: member.avatarUrl, status: member.status }), /* @__PURE__ */ React50.createElement("div", { className: "min-w-0 flex-1 flex flex-col gap-0.5" }, /* @__PURE__ */ React50.createElement("p", { className: "text-[13px] text-black truncate" }, member.fullName), /* @__PURE__ */ React50.createElement("p", { className: "text-[11px] text-neutral-500 capitalize truncate" }, member.role.toLowerCase())))
5485
+ ))), /* @__PURE__ */ React50.createElement("div", { className: "flex items-center justify-between pt-6 mt-2 " }, /* @__PURE__ */ React50.createElement("span", { className: "text-[11px] text-neutral-400 tracking-[0.2em]" }, "Page ", membersCurrentPage, " of ", membersTotalPages === 0 ? 1 : membersTotalPages), /* @__PURE__ */ React50.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React50.createElement(
5490
5486
  "button",
5491
5487
  {
5492
5488
  onClick: () => onMembersPageChange(membersCurrentPage - 1),
5493
5489
  disabled: membersCurrentPage <= 1 || isMembersLoading,
5494
5490
  className: "p-2 bg-white border border-neutral-200 rounded-full text-black hover:bg-neutral-50 disabled:opacity-30 disabled:cursor-not-allowed transition-all outline-none"
5495
5491
  },
5496
- /* @__PURE__ */ React49.createElement(HugeiconsIcon35, { icon: ArrowLeft01Icon16, size: 14 })
5497
- ), /* @__PURE__ */ React49.createElement(
5492
+ /* @__PURE__ */ React50.createElement(HugeiconsIcon36, { icon: ArrowLeft01Icon16, size: 14 })
5493
+ ), /* @__PURE__ */ React50.createElement(
5498
5494
  "button",
5499
5495
  {
5500
5496
  onClick: () => onMembersPageChange(membersCurrentPage + 1),
5501
5497
  disabled: membersCurrentPage >= membersTotalPages || isMembersLoading || membersTotalPages === 0,
5502
5498
  className: "p-2 bg-white border border-neutral-200 rounded-full text-black hover:bg-neutral-50 disabled:opacity-30 disabled:cursor-not-allowed transition-all outline-none"
5503
5499
  },
5504
- /* @__PURE__ */ React49.createElement(HugeiconsIcon35, { icon: ArrowRight01Icon12, size: 14 })
5500
+ /* @__PURE__ */ React50.createElement(HugeiconsIcon36, { icon: ArrowRight01Icon12, size: 14 })
5505
5501
  ))))))
5506
- )), isStatusModalOpen && /* @__PURE__ */ React49.createElement("div", { className: "fixed inset-0 z-110 flex items-center justify-center p-4" }, /* @__PURE__ */ React49.createElement("div", { className: "absolute inset-0 bg-black/40", onClick: () => setIsStatusModalOpen(false) }), /* @__PURE__ */ React49.createElement("div", { ref: statusDropdownRef, className: "relative w-72 bg-white shadow-2xl rounded-2xl flex flex-col items-center overflow-hidden animate-in zoom-in-95 duration-200" }, /* @__PURE__ */ React49.createElement("div", { className: "p-6 text-center w-full mb-2" }, /* @__PURE__ */ React49.createElement("h3", { className: "text-[14px] text-black tracking-tight" }, "Status Filter")), /* @__PURE__ */ React49.createElement("div", { className: "w-full flex flex-col pl-2 pr-2 gap-1" }, ["ALL", "ACTIVE", "BUSY", "OFFLINE", "AWAY"].map((option) => /* @__PURE__ */ React49.createElement(
5507
- "button",
5508
- {
5509
- key: option,
5510
- onClick: () => {
5511
- onStatusFilterChange(option);
5512
- setIsStatusModalOpen(false);
5513
- },
5514
- className: `text-left px-4 py-3 text-[11px] tracking-wide transition-colors rounded-full flex items-center justify-between outline-none ${activeStatusFilter === option ? "bg-neutral-100 text-black" : "text-neutral-500 hover:bg-neutral-50 hover:text-black"}`
5515
- },
5516
- /* @__PURE__ */ React49.createElement("span", { className: "truncate pr-2 capitalize" }, option.toLowerCase())
5517
- ))), /* @__PURE__ */ React49.createElement("div", { className: "w-full flex mt-2" }, /* @__PURE__ */ React49.createElement("button", { onClick: () => setIsStatusModalOpen(false), className: "w-full py-4 text-[13px] text-[#068afe] hover:text-[#068afe] transition-colors outline-none" }, "Cancel")))), isRoleModalOpen && /* @__PURE__ */ React49.createElement("div", { className: "fixed inset-0 z-110 flex items-center justify-center p-4" }, /* @__PURE__ */ React49.createElement("div", { className: "absolute inset-0 bg-black/40", onClick: () => setIsRoleModalOpen(false) }), /* @__PURE__ */ React49.createElement("div", { ref: roleDropdownRef, className: "relative w-72 bg-white shadow-2xl rounded-2xl flex flex-col items-center overflow-hidden animate-in zoom-in-95 duration-200" }, /* @__PURE__ */ React49.createElement("div", { className: "p-6 text-center w-full mb-2" }, /* @__PURE__ */ React49.createElement("h3", { className: "text-[14px] text-black tracking-tight" }, "Role Filter")), /* @__PURE__ */ React49.createElement("div", { className: "w-full flex flex-col pl-2 pr-2 gap-1" }, ["ALL", "ADMIN", "MANAGER", "MEMBER", "GUEST"].map((option) => /* @__PURE__ */ React49.createElement(
5518
- "button",
5519
- {
5520
- key: option,
5521
- onClick: () => {
5522
- onRoleFilterChange(option);
5523
- setIsRoleModalOpen(false);
5524
- },
5525
- className: `text-left px-4 py-3 text-[11px] tracking-wide transition-colors rounded-full flex items-center justify-between outline-none ${activeRoleFilter === option ? "bg-neutral-100 text-black" : "text-neutral-500 hover:bg-neutral-50 hover:text-black"}`
5526
- },
5527
- /* @__PURE__ */ React49.createElement("span", { className: "truncate pr-2 capitalize" }, option.toLowerCase())
5528
- ))), /* @__PURE__ */ React49.createElement("div", { className: "w-full flex mt-2" }, /* @__PURE__ */ React49.createElement("button", { onClick: () => setIsRoleModalOpen(false), className: "w-full py-4 text-[13px] text-[#068afe] hover:text-[#068afe] transition-colors outline-none" }, "Cancel"))))), activeTab === "ACCOUNT" && /* @__PURE__ */ React49.createElement("div", { className: "flex flex-col gap-8 animate-in rounded-2xl p-6 bg-white fade-in duration-300" }, /* @__PURE__ */ React49.createElement("div", { className: "flex items-start justify-between gap-4" }, /* @__PURE__ */ React49.createElement("div", null, /* @__PURE__ */ React49.createElement("h2", { className: "text-black text-xl mb-1 tracking-tight" }, "Public Profile"), /* @__PURE__ */ React49.createElement("p", { className: "text-xs text-neutral-500" }, "Manage your workspace identifiers and structural configuration details.")), isAccountReadOnly && /* @__PURE__ */ React49.createElement("span", { className: "p-2 w-9 h-9 bg-neutral-100 text-neutral-400 rounded-full shrink-0" }, /* @__PURE__ */ React49.createElement(HugeiconsIcon35, { icon: CircleLock02Icon3, size: 18, className: "text-current" }))), /* @__PURE__ */ React49.createElement("div", { className: "w-full max-w-5xl" }, /* @__PURE__ */ React49.createElement("form", { className: "flex flex-col gap-8", onSubmit: handleSaveAccount, autoComplete: "off" }, /* @__PURE__ */ React49.createElement(
5502
+ )), /* @__PURE__ */ React50.createElement(
5503
+ ReusableOptions,
5504
+ {
5505
+ isOpen: isStatusModalOpen,
5506
+ onClose: () => setIsStatusModalOpen(false),
5507
+ title: "Status Filter",
5508
+ options: ["ALL", "ACTIVE", "BUSY", "OFFLINE", "AWAY"],
5509
+ selectedOption: activeStatusFilter,
5510
+ onSelect: (status) => onStatusFilterChange(status)
5511
+ }
5512
+ ), /* @__PURE__ */ React50.createElement(
5513
+ ReusableOptions,
5514
+ {
5515
+ isOpen: isRoleModalOpen,
5516
+ onClose: () => setIsRoleModalOpen(false),
5517
+ title: "Role Filter",
5518
+ options: ["ALL", "ADMIN", "MANAGER", "MEMBER", "GUEST"],
5519
+ selectedOption: activeRoleFilter,
5520
+ onSelect: (role) => onRoleFilterChange(role)
5521
+ }
5522
+ )), activeTab === "ACCOUNT" && /* @__PURE__ */ React50.createElement("div", { className: "flex flex-col gap-8 animate-in rounded-2xl p-6 bg-white fade-in duration-300" }, /* @__PURE__ */ React50.createElement("div", { className: "flex items-start justify-between gap-4" }, /* @__PURE__ */ React50.createElement("div", null, /* @__PURE__ */ React50.createElement("h2", { className: "text-black text-xl mb-1 tracking-tight" }, "Public Profile"), /* @__PURE__ */ React50.createElement("p", { className: "text-xs text-neutral-500" }, "Manage your workspace identifiers and structural configuration details.")), isAccountReadOnly && /* @__PURE__ */ React50.createElement("span", { className: "p-2 w-9 h-9 bg-neutral-100 text-neutral-400 rounded-full shrink-0" }, /* @__PURE__ */ React50.createElement(HugeiconsIcon36, { icon: CircleLock02Icon3, size: 18, className: "text-current" }))), /* @__PURE__ */ React50.createElement("div", { className: "w-full max-w-5xl" }, /* @__PURE__ */ React50.createElement("form", { className: "flex flex-col gap-8", onSubmit: handleSaveAccount, autoComplete: "off" }, /* @__PURE__ */ React50.createElement(
5529
5523
  TextInput,
5530
5524
  {
5531
5525
  label: "Display Name",
@@ -5535,7 +5529,7 @@ var UniversalSettings = ({
5535
5529
  placeholder: "Sovereign User",
5536
5530
  maxLength: 50
5537
5531
  }
5538
- ), accountType === "ORGANIZATION" && /* @__PURE__ */ React49.createElement("div", { className: "space-y-1.5 relative w-full" }, /* @__PURE__ */ React49.createElement("label", { className: "text-[11px] text-neutral-400 tracking-[0.2em] block" }, "Workspace Handle"), /* @__PURE__ */ React49.createElement("div", { className: "flex items-center relative w-full border-b border-neutral-200 focus-within:border-black transition-all duration-300 overflow-hidden" }, /* @__PURE__ */ React49.createElement(
5532
+ ), accountType === "ORGANIZATION" && /* @__PURE__ */ React50.createElement("div", { className: "space-y-1.5 relative w-full" }, /* @__PURE__ */ React50.createElement("label", { className: "text-[11px] text-neutral-400 tracking-[0.2em] block" }, "Workspace Handle"), /* @__PURE__ */ React50.createElement("div", { className: "flex items-center relative w-full border-b border-neutral-200 focus-within:border-black transition-all duration-300 overflow-hidden" }, /* @__PURE__ */ React50.createElement(
5539
5533
  "input",
5540
5534
  {
5541
5535
  type: "text",
@@ -5547,7 +5541,7 @@ var UniversalSettings = ({
5547
5541
  className: "w-full pr-10 pl-0 py-3 text-sm bg-transparent text-black outline-none disabled:opacity-50 disabled:cursor-not-allowed",
5548
5542
  placeholder: "workspace-handle"
5549
5543
  }
5550
- ), /* @__PURE__ */ React49.createElement("div", { className: "absolute right-2 top-1/2 -translate-y-1/2" }, isCheckingSlug && /* @__PURE__ */ React49.createElement(InputSpinner3, null), !isCheckingSlug && !isAccountReadOnly && slug !== initialSlug && slug.length >= 3 && slugAvailable === false && /* @__PURE__ */ React49.createElement("span", { className: "inline-flex items-center justify-center w-4 h-4 rounded-full bg-red-100" }, /* @__PURE__ */ React49.createElement("svg", { className: "w-2 h-2 text-red-600", viewBox: "0 0 20 20", fill: "currentColor" }, /* @__PURE__ */ React49.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 && !isAccountReadOnly && slug !== initialSlug && slug.length >= 3 && slugAvailable === true && /* @__PURE__ */ React49.createElement("span", { className: "inline-flex items-center justify-center w-4 h-4 rounded-full bg-green-100" }, /* @__PURE__ */ React49.createElement("svg", { className: "w-2 h-2 text-green-600", viewBox: "0 0 20 20", fill: "currentColor" }, /* @__PURE__ */ React49.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__ */ React49.createElement("div", { className: "pt-8 mt-2 flex items-center gap-4" }, /* @__PURE__ */ React49.createElement(
5544
+ ), /* @__PURE__ */ React50.createElement("div", { className: "absolute right-2 top-1/2 -translate-y-1/2" }, isCheckingSlug && /* @__PURE__ */ React50.createElement(InputSpinner3, null), !isCheckingSlug && !isAccountReadOnly && slug !== initialSlug && slug.length >= 3 && slugAvailable === false && /* @__PURE__ */ React50.createElement("span", { className: "inline-flex items-center justify-center w-4 h-4 rounded-full bg-red-100" }, /* @__PURE__ */ React50.createElement("svg", { className: "w-2 h-2 text-red-600", viewBox: "0 0 20 20", fill: "currentColor" }, /* @__PURE__ */ React50.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 && !isAccountReadOnly && slug !== initialSlug && slug.length >= 3 && slugAvailable === true && /* @__PURE__ */ React50.createElement("span", { className: "inline-flex items-center justify-center w-4 h-4 rounded-full bg-green-100" }, /* @__PURE__ */ React50.createElement("svg", { className: "w-2 h-2 text-green-600", viewBox: "0 0 20 20", fill: "currentColor" }, /* @__PURE__ */ React50.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__ */ React50.createElement("div", { className: "pt-8 mt-2 flex items-center gap-4" }, /* @__PURE__ */ React50.createElement(
5551
5545
  ThreeDActionButton,
5552
5546
  {
5553
5547
  type: "submit",
@@ -5556,7 +5550,7 @@ var UniversalSettings = ({
5556
5550
  className: "min-w-32"
5557
5551
  },
5558
5552
  "Save Changes"
5559
- ), hasAccountChanges && !isSavingAccount && !isAccountReadOnly && /* @__PURE__ */ React49.createElement(
5553
+ ), hasAccountChanges && !isSavingAccount && !isAccountReadOnly && /* @__PURE__ */ React50.createElement(
5560
5554
  "button",
5561
5555
  {
5562
5556
  type: "button",
@@ -5567,21 +5561,15 @@ var UniversalSettings = ({
5567
5561
  className: "text-[11px] tracking-widest text-neutral-400 hover:text-black transition-colors outline-none"
5568
5562
  },
5569
5563
  "Cancel"
5570
- ))))), activeTab === "BILLING" && /* @__PURE__ */ React49.createElement("div", { className: "flex flex-col animate-in fade-in duration-300" }, /* @__PURE__ */ React49.createElement("div", { className: "bg-[#143731] rounded-3xl p-6 relative overflow-hidden flex flex-col w-full mt-2" }, /* @__PURE__ */ React49.createElement("div", { className: "relative z-10 flex flex-col items-start w-full" }, /* @__PURE__ */ React49.createElement("p", { className: "text-[11px] text-white leading-tight mb-1" }, /* @__PURE__ */ React49.createElement("span", { className: "text-white/60" }, "AI Credits Balance")), isBillingLoading ? /* @__PURE__ */ React49.createElement("div", { className: "h-8 w-32 bg-white/10 animate-pulse rounded mt-2" }) : /* @__PURE__ */ React49.createElement("div", { className: "flex items-center gap-2 mt-1" }, /* @__PURE__ */ React49.createElement(HugeiconsIcon35, { icon: Coins01Icon, size: 24, className: "text-white" }), /* @__PURE__ */ React49.createElement("span", { className: "text-2xl text-white tracking-tight" }, aiCredits)), /* @__PURE__ */ React49.createElement("div", { className: "mt-2 w-full " }, /* @__PURE__ */ React49.createElement(
5564
+ ))))), activeTab === "BILLING" && /* @__PURE__ */ React50.createElement("div", { className: "flex flex-col animate-in fade-in duration-300" }, /* @__PURE__ */ React50.createElement("div", { className: "bg-[#ffffff] rounded-3xl p-6 relative overflow-hidden flex flex-row items-center justify-between w-full mt-2" }, /* @__PURE__ */ React50.createElement("div", { className: "relative z-10 flex flex-col items-start" }, /* @__PURE__ */ React50.createElement("p", { className: "text-[11px] text-black leading-tight mb-1" }, /* @__PURE__ */ React50.createElement("span", { className: "text-black/60" }, "AI Credits Balance")), isBillingLoading ? /* @__PURE__ */ React50.createElement("div", { className: "h-8 w-32 bg-black/10 animate-pulse rounded mt-2" }) : /* @__PURE__ */ React50.createElement("div", { className: "flex items-center gap-2 mt-1" }, /* @__PURE__ */ React50.createElement(HugeiconsIcon36, { icon: Coins01Icon, size: 24, className: "text-black" }), /* @__PURE__ */ React50.createElement("span", { className: "text-2xl text-black tracking-tight" }, aiCredits))), /* @__PURE__ */ React50.createElement(
5571
5565
  "button",
5572
5566
  {
5573
5567
  onClick: onTopUp,
5574
- className: "px-6 py-2 rounded-full border border-white/50 bg-transparent text-white/50 text-[11px] tracking-wide transition-colors outline-none hover:bg-white/10 hover:text-white hover:border-white"
5568
+ className: "w-10 h-10 rounded-full border border-neutral-200 flex items-center justify-center text-black hover:bg-neutral-50 transition-colors outline-none shrink-0",
5569
+ "aria-label": "Top Up Credits"
5575
5570
  },
5576
- "Top Up Credits"
5577
- ))), /* @__PURE__ */ React49.createElement(
5578
- "img",
5579
- {
5580
- src: "https://storage.googleapis.com/retina-cloud-v2/assets/images/save_box.avif",
5581
- alt: "Credits",
5582
- className: "absolute bottom-2 right-2 translate-x-1/4 translate-y-1/2 w-32 h-auto object-contain z-0 pointer-events-none drop-shadow-md"
5583
- }
5584
- )), /* @__PURE__ */ React49.createElement("div", { className: "mt-4 px-1" }, /* @__PURE__ */ React49.createElement("p", { className: "text-[11px] text-neutral-500 leading-relaxed max-w-lg" }, "AI credits are consumed when generating intelligent summaries, transcriptions, and automated huddle insights. Additional credits are billed dynamically to your primary payment method."))));
5571
+ /* @__PURE__ */ React50.createElement(HugeiconsIcon36, { icon: PlusSignIcon3, size: 16 })
5572
+ )), /* @__PURE__ */ React50.createElement("div", { className: "mt-4 px-1" }, /* @__PURE__ */ React50.createElement("p", { className: "text-[11px] text-neutral-500 leading-relaxed max-w-lg" }, "AI credits are consumed when generating intelligent summaries, transcriptions, and automated huddle insights. Additional credits are billed dynamically to your primary payment method."))));
5585
5573
  };
5586
5574
  export {
5587
5575
  AppBento2,
@@ -5617,10 +5605,10 @@ export {
5617
5605
  UniversalBuyCryptoPage,
5618
5606
  UniversalCardActionPage,
5619
5607
  UniversalCardPage,
5620
- UniversalDepartmentsPage,
5621
5608
  UniversalErrorView,
5622
5609
  UniversalHome2,
5623
5610
  UniversalHomeView,
5611
+ UniversalHuddlesPage,
5624
5612
  UniversalMembersPage,
5625
5613
  UniversalOrganizationPage,
5626
5614
  UniversalProfilePage,