@retinalabsllc/zairusjs 16.1.95 → 16.2.1

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
@@ -4537,7 +4537,7 @@ import {
4537
4537
  var HuddleAvatar = ({ src, status, sizeClass = "w-10 h-10" }) => {
4538
4538
  const [loaded, setLoaded] = useState32(false);
4539
4539
  const [error, setError] = useState32(false);
4540
- const defaultAvatar = "https://storage.googleapis.com/retina-cloud-v2/assets/images/default.avif";
4540
+ const defaultAvatar = "https://storage.googleapis.com/retina-cloud-v2/assets/images/default_a.avif";
4541
4541
  const finalSrc = error || !src ? defaultAvatar : src;
4542
4542
  const getStatusColor = () => {
4543
4543
  switch (status?.toUpperCase()) {
@@ -4896,7 +4896,7 @@ import {
4896
4896
  var OrgAvatar = ({ src, sizeClass = "w-10 h-10" }) => {
4897
4897
  const [loaded, setLoaded] = useState34(false);
4898
4898
  const [error, setError] = useState34(false);
4899
- const defaultAvatar = "https://storage.googleapis.com/retina-cloud-v2/assets/images/office.avif";
4899
+ const defaultAvatar = "https://storage.googleapis.com/retina-cloud-v2/assets/images/office_a.avif";
4900
4900
  const finalSrc = error || !src ? defaultAvatar : src;
4901
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
4902
  "img",
@@ -5107,22 +5107,69 @@ var UniversalHome2 = ({
5107
5107
  };
5108
5108
 
5109
5109
  // src/components/UniversalSettings.tsx
5110
- import React49, { useState as useState35, useEffect as useEffect19, useRef as useRef13 } from "react";
5110
+ import React50, { useState as useState36, useEffect as useEffect19, useRef as useRef13 } from "react";
5111
5111
  import toast14 from "react-hot-toast";
5112
- import { HugeiconsIcon as HugeiconsIcon35 } from "@hugeicons/react";
5112
+ import { HugeiconsIcon as HugeiconsIcon36 } from "@hugeicons/react";
5113
5113
  import {
5114
5114
  ArrowLeft01Icon as ArrowLeft01Icon16,
5115
5115
  ArrowRight01Icon as ArrowRight01Icon12,
5116
5116
  Loading03Icon as Loading03Icon23,
5117
- Search01Icon as Search01Icon4,
5117
+ Search01Icon as Search01Icon5,
5118
5118
  SearchList02Icon as SearchList02Icon3,
5119
5119
  ListSettingIcon as ListSettingIcon3,
5120
5120
  CircleLock02Icon as CircleLock02Icon3,
5121
+ PlusSignIcon as PlusSignIcon3,
5121
5122
  Coins01Icon
5122
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
5123
5170
  var MemberAvatar2 = ({ src, status, sizeClass = "w-10 h-10" }) => {
5124
- const [loaded, setLoaded] = useState35(false);
5125
- const [error, setError] = useState35(false);
5171
+ const [loaded, setLoaded] = useState36(false);
5172
+ const [error, setError] = useState36(false);
5126
5173
  const defaultAvatar = "https://storage.googleapis.com/retina-cloud-v2/assets/images/avatar.avif";
5127
5174
  const finalSrc = error || !src ? defaultAvatar : src;
5128
5175
  const getStatusColor = () => {
@@ -5139,7 +5186,7 @@ var MemberAvatar2 = ({ src, status, sizeClass = "w-10 h-10" }) => {
5139
5186
  return "bg-neutral-200";
5140
5187
  }
5141
5188
  };
5142
- 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(
5143
5190
  "img",
5144
5191
  {
5145
5192
  src: finalSrc,
@@ -5148,10 +5195,10 @@ var MemberAvatar2 = ({ src, status, sizeClass = "w-10 h-10" }) => {
5148
5195
  onLoad: () => setLoaded(true),
5149
5196
  onError: () => setError(true)
5150
5197
  }
5151
- )), /* @__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()}` }));
5152
5199
  };
5153
- 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" }));
5154
- 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" }));
5155
5202
  var UniversalSettings = ({
5156
5203
  accountType,
5157
5204
  userRole,
@@ -5185,40 +5232,30 @@ var UniversalSettings = ({
5185
5232
  const onBackHandler = onBack ?? (() => {
5186
5233
  if (typeof window !== "undefined") window.history.back();
5187
5234
  });
5188
- const [activeTab, setActiveTab] = useState35(accountType === "ORGANIZATION" ? "MEMBERS" : "ACCOUNT");
5235
+ const [activeTab, setActiveTab] = useState36(accountType === "ORGANIZATION" ? "MEMBERS" : "ACCOUNT");
5189
5236
  useEffect19(() => {
5190
5237
  if (accountType === "INDIVIDUAL" && activeTab === "MEMBERS") {
5191
5238
  setActiveTab("ACCOUNT");
5192
5239
  }
5193
5240
  }, [accountType, activeTab]);
5194
- const [expandedId, setExpandedId] = useState35(null);
5195
- const [memberToRemove, setMemberToRemove] = useState35(null);
5196
- const [isRemoving, setIsRemoving] = useState35(false);
5197
- const [isInviteMode, setIsInviteMode] = useState35(false);
5198
- const [inviteEmail, setInviteEmail] = useState35("");
5199
- const [isInviting, setIsInviting] = useState35(false);
5200
- const [localSearchQuery, setLocalSearchQuery] = useState35(membersSearchQuery);
5201
- 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);
5202
5249
  const isFirstSearchMount = useRef13(true);
5203
- const [isStatusModalOpen, setIsStatusModalOpen] = useState35(false);
5204
- const [isRoleModalOpen, setIsRoleModalOpen] = useState35(false);
5205
- const statusDropdownRef = useRef13(null);
5206
- const roleDropdownRef = useRef13(null);
5207
- const [displayName, setDisplayName] = useState35(initialDisplayName);
5208
- const [slug, setSlug] = useState35(initialSlug);
5209
- const [isCheckingSlug, setIsCheckingSlug] = useState35(false);
5210
- const [slugAvailable, setSlugAvailable] = useState35(null);
5211
- 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);
5212
5257
  const isAccountReadOnly = accountType === "ORGANIZATION" && userRole !== "ADMIN" && userRole !== "MANAGER";
5213
5258
  const cleanEmailId = (val) => val.toLowerCase().replace(/[^a-z0-9@._-]/g, "");
5214
- useEffect19(() => {
5215
- function handleClickOutside(event) {
5216
- if (statusDropdownRef.current && !statusDropdownRef.current.contains(event.target)) setIsStatusModalOpen(false);
5217
- if (roleDropdownRef.current && !roleDropdownRef.current.contains(event.target)) setIsRoleModalOpen(false);
5218
- }
5219
- document.addEventListener("mousedown", handleClickOutside);
5220
- return () => document.removeEventListener("mousedown", handleClickOutside);
5221
- }, []);
5222
5259
  useEffect19(() => {
5223
5260
  if (activeTab !== "MEMBERS") return;
5224
5261
  if (isFirstSearchMount.current) {
@@ -5321,7 +5358,7 @@ var UniversalSettings = ({
5321
5358
  };
5322
5359
  const hasAccountChanges = displayName !== initialDisplayName || slug !== initialSlug;
5323
5360
  const isAccountSaveDisabled = isSavingAccount || isAccountReadOnly || isCheckingSlug || !hasAccountChanges || displayName.length < 3 || slug.length < 3 || slug !== initialSlug && slugAvailable === false;
5324
- 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(
5325
5362
  "button",
5326
5363
  {
5327
5364
  onClick: () => {
@@ -5332,21 +5369,21 @@ var UniversalSettings = ({
5332
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"}`
5333
5370
  },
5334
5371
  "Members"
5335
- ), /* @__PURE__ */ React49.createElement(
5372
+ ), /* @__PURE__ */ React50.createElement(
5336
5373
  "button",
5337
5374
  {
5338
5375
  onClick: () => setActiveTab("ACCOUNT"),
5339
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"}`
5340
5377
  },
5341
5378
  "Account Profile"
5342
- ), /* @__PURE__ */ React49.createElement(
5379
+ ), /* @__PURE__ */ React50.createElement(
5343
5380
  "button",
5344
5381
  {
5345
5382
  onClick: () => setActiveTab("BILLING"),
5346
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"}`
5347
5384
  },
5348
5385
  "Billing"
5349
- )), 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(
5350
5387
  ConfirmationDialog,
5351
5388
  {
5352
5389
  isOpen: !!memberToRemove,
@@ -5359,7 +5396,7 @@ var UniversalSettings = ({
5359
5396
  onClose: () => setMemberToRemove(null),
5360
5397
  onConfirm: handleConfirmRemove
5361
5398
  }
5362
- ), !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(
5363
5400
  "input",
5364
5401
  {
5365
5402
  type: "text",
@@ -5368,28 +5405,28 @@ var UniversalSettings = ({
5368
5405
  onChange: (e) => setLocalSearchQuery(e.target.value),
5369
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"
5370
5407
  }
5371
- )), /* @__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(
5372
5409
  "button",
5373
5410
  {
5374
5411
  onClick: () => setIsStatusModalOpen(true),
5375
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"
5376
5413
  },
5377
- /* @__PURE__ */ React49.createElement(HugeiconsIcon35, { icon: SearchList02Icon3, size: 16 })
5378
- ), /* @__PURE__ */ React49.createElement(
5414
+ /* @__PURE__ */ React50.createElement(HugeiconsIcon36, { icon: SearchList02Icon3, size: 16 })
5415
+ ), /* @__PURE__ */ React50.createElement(
5379
5416
  "button",
5380
5417
  {
5381
5418
  onClick: () => setIsRoleModalOpen(true),
5382
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"
5383
5420
  },
5384
- /* @__PURE__ */ React49.createElement(HugeiconsIcon35, { icon: ListSettingIcon3, size: 16 })
5385
- ))), /* @__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()))), /* @__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(
5386
5423
  "button",
5387
5424
  {
5388
5425
  onClick: () => setMemberToRemove(activeExpandedMember),
5389
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"
5390
5427
  },
5391
5428
  "Remove Access"
5392
- ), /* @__PURE__ */ React49.createElement(
5429
+ ), /* @__PURE__ */ React50.createElement(
5393
5430
  "button",
5394
5431
  {
5395
5432
  onClick: () => setExpandedId(null),
@@ -5398,14 +5435,14 @@ var UniversalSettings = ({
5398
5435
  "Close Profile"
5399
5436
  ))) : (
5400
5437
  // Standard List & Invite Header
5401
- /* @__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(
5402
5439
  "button",
5403
5440
  {
5404
5441
  onClick: () => setIsInviteMode(true),
5405
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"
5406
5443
  },
5407
5444
  "Invite Team"
5408
- )), !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(
5409
5446
  "input",
5410
5447
  {
5411
5448
  type: "email",
@@ -5416,7 +5453,7 @@ var UniversalSettings = ({
5416
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",
5417
5454
  placeholder: "name@company.com"
5418
5455
  }
5419
- )), /* @__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(
5420
5457
  ThreeDActionButton,
5421
5458
  {
5422
5459
  type: "submit",
@@ -5425,7 +5462,7 @@ var UniversalSettings = ({
5425
5462
  className: "w-full"
5426
5463
  },
5427
5464
  "Send Invitation"
5428
- ), /* @__PURE__ */ React49.createElement(
5465
+ ), /* @__PURE__ */ React50.createElement(
5429
5466
  "button",
5430
5467
  {
5431
5468
  type: "button",
@@ -5437,54 +5474,52 @@ var UniversalSettings = ({
5437
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"
5438
5475
  },
5439
5476
  "Cancel"
5440
- ))) : 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(
5441
5478
  "div",
5442
5479
  {
5443
5480
  key: member.id,
5444
5481
  onClick: () => setExpandedId(member.id),
5445
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"
5446
5483
  },
5447
- /* @__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())))
5448
- ))), /* @__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(
5449
5486
  "button",
5450
5487
  {
5451
5488
  onClick: () => onMembersPageChange(membersCurrentPage - 1),
5452
5489
  disabled: membersCurrentPage <= 1 || isMembersLoading,
5453
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"
5454
5491
  },
5455
- /* @__PURE__ */ React49.createElement(HugeiconsIcon35, { icon: ArrowLeft01Icon16, size: 14 })
5456
- ), /* @__PURE__ */ React49.createElement(
5492
+ /* @__PURE__ */ React50.createElement(HugeiconsIcon36, { icon: ArrowLeft01Icon16, size: 14 })
5493
+ ), /* @__PURE__ */ React50.createElement(
5457
5494
  "button",
5458
5495
  {
5459
5496
  onClick: () => onMembersPageChange(membersCurrentPage + 1),
5460
5497
  disabled: membersCurrentPage >= membersTotalPages || isMembersLoading || membersTotalPages === 0,
5461
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"
5462
5499
  },
5463
- /* @__PURE__ */ React49.createElement(HugeiconsIcon35, { icon: ArrowRight01Icon12, size: 14 })
5500
+ /* @__PURE__ */ React50.createElement(HugeiconsIcon36, { icon: ArrowRight01Icon12, size: 14 })
5464
5501
  ))))))
5465
- )), 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(
5466
- "button",
5467
- {
5468
- key: option,
5469
- onClick: () => {
5470
- onStatusFilterChange(option);
5471
- setIsStatusModalOpen(false);
5472
- },
5473
- 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"}`
5474
- },
5475
- /* @__PURE__ */ React49.createElement("span", { className: "truncate pr-2 capitalize" }, option.toLowerCase())
5476
- ))), /* @__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(
5477
- "button",
5478
- {
5479
- key: option,
5480
- onClick: () => {
5481
- onRoleFilterChange(option);
5482
- setIsRoleModalOpen(false);
5483
- },
5484
- 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"}`
5485
- },
5486
- /* @__PURE__ */ React49.createElement("span", { className: "truncate pr-2 capitalize" }, option.toLowerCase())
5487
- ))), /* @__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(
5488
5523
  TextInput,
5489
5524
  {
5490
5525
  label: "Display Name",
@@ -5494,7 +5529,7 @@ var UniversalSettings = ({
5494
5529
  placeholder: "Sovereign User",
5495
5530
  maxLength: 50
5496
5531
  }
5497
- ), 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(
5498
5533
  "input",
5499
5534
  {
5500
5535
  type: "text",
@@ -5506,7 +5541,7 @@ var UniversalSettings = ({
5506
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",
5507
5542
  placeholder: "workspace-handle"
5508
5543
  }
5509
- ), /* @__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(
5510
5545
  ThreeDActionButton,
5511
5546
  {
5512
5547
  type: "submit",
@@ -5515,7 +5550,7 @@ var UniversalSettings = ({
5515
5550
  className: "min-w-32"
5516
5551
  },
5517
5552
  "Save Changes"
5518
- ), hasAccountChanges && !isSavingAccount && !isAccountReadOnly && /* @__PURE__ */ React49.createElement(
5553
+ ), hasAccountChanges && !isSavingAccount && !isAccountReadOnly && /* @__PURE__ */ React50.createElement(
5519
5554
  "button",
5520
5555
  {
5521
5556
  type: "button",
@@ -5526,14 +5561,403 @@ var UniversalSettings = ({
5526
5561
  className: "text-[11px] tracking-widest text-neutral-400 hover:text-black transition-colors outline-none"
5527
5562
  },
5528
5563
  "Cancel"
5529
- ))))), activeTab === "BILLING" && /* @__PURE__ */ React49.createElement("div", { className: "flex flex-col animate-in fade-in duration-300" }, /* @__PURE__ */ React49.createElement("div", { className: "bg-[#ffffff] 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-black leading-tight mb-1" }, /* @__PURE__ */ React49.createElement("span", { className: "text-black/60" }, "AI Credits Balance")), isBillingLoading ? /* @__PURE__ */ React49.createElement("div", { className: "h-8 w-32 bg-black/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-black" }), /* @__PURE__ */ React49.createElement("span", { className: "text-2xl text-black 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(
5530
5565
  "button",
5531
5566
  {
5532
5567
  onClick: onTopUp,
5533
- className: "px-6 py-2 rounded-full border border-neutral-200 bg-transparent text-neutral-200 text-[11px] tracking-wide transition-colors outline-none hover:bg-black/10 hover:text-black hover:border-black"
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"
5534
5570
  },
5535
- "Top Up Credits"
5536
- )))), /* @__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."))));
5573
+ };
5574
+
5575
+ // src/components/UniversalCreateHuddle.tsx
5576
+ import React52, { useState as useState38, useEffect as useEffect21, useRef as useRef14 } from "react";
5577
+ import toast15 from "react-hot-toast";
5578
+ import { HugeiconsIcon as HugeiconsIcon38 } from "@hugeicons/react";
5579
+ import {
5580
+ ArrowLeft01Icon as ArrowLeft01Icon18,
5581
+ ArrowRight01Icon as ArrowRight01Icon14,
5582
+ Loading03Icon as Loading03Icon24,
5583
+ Search01Icon as Search01Icon6,
5584
+ Calendar01Icon,
5585
+ Clock01Icon,
5586
+ Globe02Icon,
5587
+ Tick02Icon
5588
+ } from "@hugeicons/core-free-icons";
5589
+
5590
+ // src/components/CalendarPicker.tsx
5591
+ import React51, { useState as useState37, useEffect as useEffect20 } from "react";
5592
+ import { HugeiconsIcon as HugeiconsIcon37 } from "@hugeicons/react";
5593
+ import {
5594
+ CancelCircleIcon as CancelCircleIcon11,
5595
+ ArrowLeft01Icon as ArrowLeft01Icon17,
5596
+ ArrowRight01Icon as ArrowRight01Icon13,
5597
+ ArrowUp01Icon,
5598
+ ArrowDown01Icon
5599
+ } from "@hugeicons/core-free-icons";
5600
+ var MONTHS = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
5601
+ var DAYS_OF_WEEK = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
5602
+ var CalendarPicker = ({
5603
+ isOpen,
5604
+ onClose,
5605
+ initialDate,
5606
+ defaultMode,
5607
+ onConfirm
5608
+ }) => {
5609
+ const [mode, setMode] = useState37(defaultMode);
5610
+ const today = /* @__PURE__ */ new Date();
5611
+ today.setHours(0, 0, 0, 0);
5612
+ const maxDate = new Date(today.getFullYear() + 1, 11, 31);
5613
+ maxDate.setHours(23, 59, 59, 999);
5614
+ const [viewMonth, setViewMonth] = useState37(initialDate.getMonth());
5615
+ const [viewYear, setViewYear] = useState37(initialDate.getFullYear());
5616
+ const [selectedDate, setSelectedDate] = useState37(new Date(initialDate.getFullYear(), initialDate.getMonth(), initialDate.getDate()));
5617
+ const [hour, setHour] = useState37(initialDate.getHours() % 12 || 12);
5618
+ const [minute, setMinute] = useState37(initialDate.getMinutes());
5619
+ const [ampm, setAmpm] = useState37(initialDate.getHours() >= 12 ? "PM" : "AM");
5620
+ useEffect20(() => {
5621
+ if (isOpen) {
5622
+ setMode(defaultMode);
5623
+ setViewMonth(initialDate.getMonth());
5624
+ setViewYear(initialDate.getFullYear());
5625
+ setSelectedDate(new Date(initialDate.getFullYear(), initialDate.getMonth(), initialDate.getDate()));
5626
+ setHour(initialDate.getHours() % 12 || 12);
5627
+ setMinute(initialDate.getMinutes());
5628
+ setAmpm(initialDate.getHours() >= 12 ? "PM" : "AM");
5629
+ }
5630
+ }, [isOpen, initialDate, defaultMode]);
5631
+ if (!isOpen) return null;
5632
+ const handlePrevMonth = () => {
5633
+ if (viewYear === today.getFullYear() && viewMonth === today.getMonth()) return;
5634
+ if (viewMonth === 0) {
5635
+ setViewMonth(11);
5636
+ setViewYear((y) => y - 1);
5637
+ } else {
5638
+ setViewMonth((m) => m - 1);
5639
+ }
5640
+ };
5641
+ const handleNextMonth = () => {
5642
+ if (viewYear === maxDate.getFullYear() && viewMonth === 11) return;
5643
+ if (viewMonth === 11) {
5644
+ setViewMonth(0);
5645
+ setViewYear((y) => y + 1);
5646
+ } else {
5647
+ setViewMonth((m) => m + 1);
5648
+ }
5649
+ };
5650
+ const isDateDisabled = (year, month, day) => {
5651
+ const d = new Date(year, month, day);
5652
+ return d < today || d > maxDate;
5653
+ };
5654
+ const daysInMonth = new Date(viewYear, viewMonth + 1, 0).getDate();
5655
+ const firstDayOffset = new Date(viewYear, viewMonth, 1).getDay();
5656
+ const adjustTime = (type, dir) => {
5657
+ if (type === "H") {
5658
+ setHour((h) => {
5659
+ let next = h + dir;
5660
+ if (next > 12) return 1;
5661
+ if (next < 1) return 12;
5662
+ return next;
5663
+ });
5664
+ }
5665
+ if (type === "M") {
5666
+ setMinute((m) => {
5667
+ let next = m + dir;
5668
+ if (next > 59) return 0;
5669
+ if (next < 0) return 59;
5670
+ return next;
5671
+ });
5672
+ }
5673
+ if (type === "A") {
5674
+ setAmpm((a) => a === "AM" ? "PM" : "AM");
5675
+ }
5676
+ };
5677
+ const handleSave = () => {
5678
+ const final = new Date(selectedDate);
5679
+ let h24 = hour;
5680
+ if (ampm === "PM" && hour < 12) h24 += 12;
5681
+ if (ampm === "AM" && hour === 12) h24 = 0;
5682
+ final.setHours(h24, minute, 0, 0);
5683
+ onConfirm(final);
5684
+ onClose();
5685
+ };
5686
+ return /* @__PURE__ */ React51.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ React51.createElement("div", { className: "absolute inset-0 bg-black/40", onClick: onClose }), /* @__PURE__ */ React51.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__ */ React51.createElement("div", { className: "p-4 pb-0 flex flex-col gap-4" }, /* @__PURE__ */ React51.createElement("div", { className: "flex items-center justify-between shrink-0" }, /* @__PURE__ */ React51.createElement("h3", { className: "text-[15px] text-black tracking-tight " }, "Select Date & Time"), /* @__PURE__ */ React51.createElement("button", { onClick: onClose, className: "text-neutral-400 hover:text-black transition-colors outline-none" }, /* @__PURE__ */ React51.createElement(HugeiconsIcon37, { icon: CancelCircleIcon11, size: 18 }))), /* @__PURE__ */ React51.createElement("div", { className: "flex gap-4" }, /* @__PURE__ */ React51.createElement(
5687
+ "button",
5688
+ {
5689
+ onClick: () => setMode("DATE"),
5690
+ className: `pb-2 text-[12px] tracking-wide outline-none border-b-2 transition-colors ${mode === "DATE" ? "border-[#068afe] text-[#068afe]" : "border-transparent text-neutral-500 hover:text-black"}`
5691
+ },
5692
+ "Date"
5693
+ ), /* @__PURE__ */ React51.createElement(
5694
+ "button",
5695
+ {
5696
+ onClick: () => setMode("TIME"),
5697
+ className: `pb-2 text-[12px] tracking-wide outline-none border-b-2 transition-colors ${mode === "TIME" ? "border-[#068afe] text-[#068afe]" : "border-transparent text-neutral-500 hover:text-black"}`
5698
+ },
5699
+ "Time"
5700
+ ))), /* @__PURE__ */ React51.createElement("div", { className: "p-5" }, mode === "DATE" && /* @__PURE__ */ React51.createElement("div", { className: "flex flex-col gap-4 animate-in fade-in duration-200" }, /* @__PURE__ */ React51.createElement("div", { className: "flex items-center justify-between px-2" }, /* @__PURE__ */ React51.createElement("span", { className: "text-[13px] text-black" }, MONTHS[viewMonth], " ", viewYear), /* @__PURE__ */ React51.createElement("div", { className: "flex gap-1" }, /* @__PURE__ */ React51.createElement(
5701
+ "button",
5702
+ {
5703
+ onClick: handlePrevMonth,
5704
+ disabled: viewYear === today.getFullYear() && viewMonth === today.getMonth(),
5705
+ className: "w-8 h-8 flex items-center justify-center rounded-full hover:bg-neutral-100 disabled:opacity-30 disabled:cursor-not-allowed outline-none transition-colors"
5706
+ },
5707
+ /* @__PURE__ */ React51.createElement(HugeiconsIcon37, { icon: ArrowLeft01Icon17, size: 16, className: "text-black" })
5708
+ ), /* @__PURE__ */ React51.createElement(
5709
+ "button",
5710
+ {
5711
+ onClick: handleNextMonth,
5712
+ disabled: viewYear === maxDate.getFullYear() && viewMonth === 11,
5713
+ className: "w-8 h-8 flex items-center justify-center rounded-full hover:bg-neutral-100 disabled:opacity-30 disabled:cursor-not-allowed outline-none transition-colors"
5714
+ },
5715
+ /* @__PURE__ */ React51.createElement(HugeiconsIcon37, { icon: ArrowRight01Icon13, size: 16, className: "text-black" })
5716
+ ))), /* @__PURE__ */ React51.createElement("div", { className: "grid grid-cols-7 gap-1" }, DAYS_OF_WEEK.map((d) => /* @__PURE__ */ React51.createElement("div", { key: d, className: "text-center text-[10px] text-neutral-400 py-2" }, d)), Array.from({ length: firstDayOffset }).map((_, i) => /* @__PURE__ */ React51.createElement("div", { key: `empty-${i}` })), Array.from({ length: daysInMonth }).map((_, i) => {
5717
+ const day = i + 1;
5718
+ const isDisabled = isDateDisabled(viewYear, viewMonth, day);
5719
+ const isSelected = selectedDate.getFullYear() === viewYear && selectedDate.getMonth() === viewMonth && selectedDate.getDate() === day;
5720
+ return /* @__PURE__ */ React51.createElement(
5721
+ "button",
5722
+ {
5723
+ key: day,
5724
+ disabled: isDisabled,
5725
+ onClick: () => setSelectedDate(new Date(viewYear, viewMonth, day)),
5726
+ className: `h-9 w-9 rounded-full flex items-center justify-center text-[12px] transition-colors outline-none
5727
+ ${isDisabled ? "text-neutral-300 cursor-not-allowed" : isSelected ? "bg-[#068afe] text-white" : "text-black hover:bg-neutral-100"}`
5728
+ },
5729
+ day
5730
+ );
5731
+ }))), mode === "TIME" && /* @__PURE__ */ React51.createElement("div", { className: "flex items-center justify-center gap-6 py-6 animate-in fade-in duration-200" }, /* @__PURE__ */ React51.createElement("div", { className: "flex flex-col items-center gap-4" }, /* @__PURE__ */ React51.createElement("button", { onClick: () => adjustTime("H", 1), className: "p-2 rounded-full hover:bg-neutral-100 outline-none" }, /* @__PURE__ */ React51.createElement(HugeiconsIcon37, { icon: ArrowUp01Icon, size: 20, className: "text-neutral-500" })), /* @__PURE__ */ React51.createElement("span", { className: "text-3xl text-black w-12 text-center" }, hour.toString().padStart(2, "0")), /* @__PURE__ */ React51.createElement("button", { onClick: () => adjustTime("H", -1), className: "p-2 rounded-full hover:bg-neutral-100 outline-none" }, /* @__PURE__ */ React51.createElement(HugeiconsIcon37, { icon: ArrowDown01Icon, size: 20, className: "text-neutral-500" }))), /* @__PURE__ */ React51.createElement("span", { className: "text-3xl text-neutral-300 pb-2" }, ":"), /* @__PURE__ */ React51.createElement("div", { className: "flex flex-col items-center gap-4" }, /* @__PURE__ */ React51.createElement("button", { onClick: () => adjustTime("M", 1), className: "p-2 rounded-full hover:bg-neutral-100 outline-none" }, /* @__PURE__ */ React51.createElement(HugeiconsIcon37, { icon: ArrowUp01Icon, size: 20, className: "text-neutral-500" })), /* @__PURE__ */ React51.createElement("span", { className: "text-3xl text-black w-12 text-center" }, minute.toString().padStart(2, "0")), /* @__PURE__ */ React51.createElement("button", { onClick: () => adjustTime("M", -1), className: "p-2 rounded-full hover:bg-neutral-100 outline-none" }, /* @__PURE__ */ React51.createElement(HugeiconsIcon37, { icon: ArrowDown01Icon, size: 20, className: "text-neutral-500" }))), /* @__PURE__ */ React51.createElement("div", { className: "flex flex-col items-center gap-4 ml-2" }, /* @__PURE__ */ React51.createElement("button", { onClick: () => adjustTime("A", 1), className: "p-2 rounded-full hover:bg-neutral-100 outline-none" }, /* @__PURE__ */ React51.createElement(HugeiconsIcon37, { icon: ArrowUp01Icon, size: 20, className: "text-neutral-500" })), /* @__PURE__ */ React51.createElement("span", { className: "text-xl text-[#068afe] w-12 text-center" }, ampm), /* @__PURE__ */ React51.createElement("button", { onClick: () => adjustTime("A", -1), className: "p-2 rounded-full hover:bg-neutral-100 outline-none" }, /* @__PURE__ */ React51.createElement(HugeiconsIcon37, { icon: ArrowDown01Icon, size: 20, className: "text-neutral-500" }))))), /* @__PURE__ */ React51.createElement("div", { className: "p-5 flex justify-end shrink-0" }, /* @__PURE__ */ React51.createElement(
5732
+ "button",
5733
+ {
5734
+ onClick: handleSave,
5735
+ className: "text-[#068afe] hover:text-[#0573d6] transition-colors outline-none text-[13px] tracking-wide"
5736
+ },
5737
+ "Done"
5738
+ ))));
5739
+ };
5740
+
5741
+ // src/components/UniversalCreateHuddle.tsx
5742
+ var MemberAvatar3 = ({ src, sizeClass = "w-10 h-10" }) => {
5743
+ const [loaded, setLoaded] = useState38(false);
5744
+ const [error, setError] = useState38(false);
5745
+ const defaultAvatar = "https://storage.googleapis.com/retina-cloud-v2/assets/images/avatar.avif";
5746
+ return /* @__PURE__ */ React52.createElement("div", { className: `relative shrink-0 ${sizeClass}` }, /* @__PURE__ */ React52.createElement("div", { className: "w-full h-full rounded-lg bg-neutral-100 flex items-center justify-center overflow-hidden" }, !loaded && !error && /* @__PURE__ */ React52.createElement(HugeiconsIcon38, { icon: Loading03Icon24, className: "animate-spin text-neutral-400 absolute", size: 14 }), /* @__PURE__ */ React52.createElement(
5747
+ "img",
5748
+ {
5749
+ src: error || !src ? defaultAvatar : src,
5750
+ alt: "Avatar",
5751
+ className: `w-full h-full object-cover transition-opacity duration-300 ${loaded || error ? "opacity-100" : "opacity-0"}`,
5752
+ onLoad: () => setLoaded(true),
5753
+ onError: () => setError(true)
5754
+ }
5755
+ )));
5756
+ };
5757
+ var STANDARD_TIMEZONES = [
5758
+ "UTC",
5759
+ "America/New_York",
5760
+ "America/Chicago",
5761
+ "America/Denver",
5762
+ "America/Los_Angeles",
5763
+ "Europe/London",
5764
+ "Europe/Paris",
5765
+ "Europe/Berlin",
5766
+ "Africa/Lagos",
5767
+ "Africa/Johannesburg",
5768
+ "Asia/Dubai",
5769
+ "Asia/Kolkata",
5770
+ "Asia/Singapore",
5771
+ "Asia/Tokyo",
5772
+ "Australia/Sydney"
5773
+ ];
5774
+ var UniversalCreateHuddle = ({
5775
+ onBackHref,
5776
+ members,
5777
+ isMembersLoading,
5778
+ membersCurrentPage,
5779
+ membersTotalPages,
5780
+ onMembersPageChange,
5781
+ membersSearchQuery,
5782
+ onMembersSearchChange,
5783
+ onCreateSubmit
5784
+ }) => {
5785
+ const [huddleDate, setHuddleDate] = useState38(() => {
5786
+ const d = /* @__PURE__ */ new Date();
5787
+ d.setHours(d.getHours() + 1, 0, 0, 0);
5788
+ return d;
5789
+ });
5790
+ const [title, setTitle] = useState38("");
5791
+ const [isPrivate, setIsPrivate] = useState38(false);
5792
+ const [timezone, setTimezone] = useState38("UTC");
5793
+ useEffect21(() => {
5794
+ try {
5795
+ setTimezone(Intl.DateTimeFormat().resolvedOptions().timeZone);
5796
+ } catch (e) {
5797
+ }
5798
+ }, []);
5799
+ const [calendarMode, setCalendarMode] = useState38(null);
5800
+ const [showTimezoneModal, setShowTimezoneModal] = useState38(false);
5801
+ const [showMembersModal, setShowMembersModal] = useState38(false);
5802
+ const [selectedParticipants, setSelectedParticipants] = useState38(/* @__PURE__ */ new Set());
5803
+ const [isSubmitting, setIsSubmitting] = useState38(false);
5804
+ const [localSearchQuery, setLocalSearchQuery] = useState38(membersSearchQuery);
5805
+ const [isTyping, setIsTyping] = useState38(false);
5806
+ const typingTimer = useRef14(null);
5807
+ const handleSearchInput = (e) => {
5808
+ const val = e.target.value;
5809
+ setLocalSearchQuery(val);
5810
+ setIsTyping(true);
5811
+ if (typingTimer.current) clearTimeout(typingTimer.current);
5812
+ typingTimer.current = setTimeout(() => {
5813
+ onMembersSearchChange(val);
5814
+ setTimeout(() => setIsTyping(false), 150);
5815
+ }, 600);
5816
+ };
5817
+ const toggleParticipant = (userId) => {
5818
+ const newSet = new Set(selectedParticipants);
5819
+ if (newSet.has(userId)) newSet.delete(userId);
5820
+ else newSet.add(userId);
5821
+ setSelectedParticipants(newSet);
5822
+ };
5823
+ const handleSubmit = async (e) => {
5824
+ e.preventDefault();
5825
+ const cleanTitle = title.trim();
5826
+ if (cleanTitle.length < 2) return toast15.error("Please enter a valid huddle name.");
5827
+ if (isPrivate && selectedParticipants.size === 0) return toast15.error("Private huddles require at least one participant.");
5828
+ setIsSubmitting(true);
5829
+ try {
5830
+ await onCreateSubmit({
5831
+ title: cleanTitle,
5832
+ huddleType: isPrivate ? "PRIVATE" : "PUBLIC",
5833
+ startTime: huddleDate.toISOString(),
5834
+ timezone,
5835
+ participantIds: isPrivate ? Array.from(selectedParticipants) : []
5836
+ });
5837
+ } catch (error) {
5838
+ toast15.error(error.message || "Failed to schedule huddle.");
5839
+ setIsSubmitting(false);
5840
+ }
5841
+ };
5842
+ return /* @__PURE__ */ React52.createElement("div", { className: "w-full max-w-3xl mx-auto flex flex-col animate-in fade-in duration-300 relative" }, /* @__PURE__ */ React52.createElement(ManagedToaster, null), /* @__PURE__ */ React52.createElement("div", { className: "mb-6 flex w-full items-center px-1" }, /* @__PURE__ */ React52.createElement("a", { href: onBackHref, className: "flex items-center gap-2 text-[#068afe] hover:text-[#068afe] transition-colors text-[13px] outline-none" }, /* @__PURE__ */ React52.createElement(HugeiconsIcon38, { icon: ArrowLeft01Icon18, size: 16 }), " Back")), /* @__PURE__ */ React52.createElement("div", { className: "flex flex-col gap-1 mb-8 px-1" }, /* @__PURE__ */ React52.createElement("h1", { className: "text-black text-xl tracking-tight" }, "Create Huddle"), /* @__PURE__ */ React52.createElement("p", { className: "text-xs text-neutral-500" }, "Schedule a new workspace huddle and manage participant access.")), /* @__PURE__ */ React52.createElement("div", { className: "flex flex-col gap-8 animate-in rounded-2xl p-6 bg-white fade-in duration-300" }, /* @__PURE__ */ React52.createElement("form", { className: "flex flex-col gap-8", onSubmit: handleSubmit, autoComplete: "off" }, /* @__PURE__ */ React52.createElement(
5843
+ TextInput,
5844
+ {
5845
+ label: "Huddle Subject",
5846
+ value: title,
5847
+ onChange: (val) => setTitle(val.substring(0, 80)),
5848
+ disabled: isSubmitting,
5849
+ placeholder: "e.g. Q4 Engineering Sync",
5850
+ maxLength: 80
5851
+ }
5852
+ ), /* @__PURE__ */ React52.createElement("div", { className: "grid grid-cols-1 sm:grid-cols-3 gap-6" }, /* @__PURE__ */ React52.createElement("div", { className: "space-y-1.5 w-full" }, /* @__PURE__ */ React52.createElement("label", { className: "text-[11px] text-neutral-400 tracking-[0.2em] block" }, "Date"), /* @__PURE__ */ React52.createElement(
5853
+ "div",
5854
+ {
5855
+ onClick: () => !isSubmitting && setCalendarMode("DATE"),
5856
+ className: `flex items-center relative w-full border-b border-neutral-200 transition-all duration-300 pb-3 pt-3 cursor-pointer ${isSubmitting ? "opacity-50 pointer-events-none" : "hover:border-black"}`
5857
+ },
5858
+ /* @__PURE__ */ React52.createElement(HugeiconsIcon38, { icon: Calendar01Icon, size: 16, className: "text-neutral-400 absolute left-0" }),
5859
+ /* @__PURE__ */ React52.createElement("span", { className: "w-full pl-8 text-sm text-black truncate block" }, huddleDate.toLocaleDateString("en-GB", { day: "2-digit", month: "short", year: "numeric" }))
5860
+ )), /* @__PURE__ */ React52.createElement("div", { className: "space-y-1.5 w-full" }, /* @__PURE__ */ React52.createElement("label", { className: "text-[11px] text-neutral-400 tracking-[0.2em] block" }, "Time"), /* @__PURE__ */ React52.createElement(
5861
+ "div",
5862
+ {
5863
+ onClick: () => !isSubmitting && setCalendarMode("TIME"),
5864
+ className: `flex items-center relative w-full border-b border-neutral-200 transition-all duration-300 pb-3 pt-3 cursor-pointer ${isSubmitting ? "opacity-50 pointer-events-none" : "hover:border-black"}`
5865
+ },
5866
+ /* @__PURE__ */ React52.createElement(HugeiconsIcon38, { icon: Clock01Icon, size: 16, className: "text-neutral-400 absolute left-0" }),
5867
+ /* @__PURE__ */ React52.createElement("span", { className: "w-full pl-8 text-sm text-black truncate block" }, huddleDate.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" }))
5868
+ )), /* @__PURE__ */ React52.createElement("div", { className: "space-y-1.5 w-full" }, /* @__PURE__ */ React52.createElement("label", { className: "text-[11px] text-neutral-400 tracking-[0.2em] block" }, "Timezone"), /* @__PURE__ */ React52.createElement(
5869
+ "div",
5870
+ {
5871
+ onClick: () => !isSubmitting && setShowTimezoneModal(true),
5872
+ className: `flex items-center relative w-full border-b border-neutral-200 transition-all duration-300 pb-3 pt-3 cursor-pointer ${isSubmitting ? "opacity-50 pointer-events-none" : "hover:border-black"}`
5873
+ },
5874
+ /* @__PURE__ */ React52.createElement(HugeiconsIcon38, { icon: Globe02Icon, size: 16, className: "text-neutral-400 absolute left-0" }),
5875
+ /* @__PURE__ */ React52.createElement("span", { className: "w-full pl-8 text-sm text-black truncate block" }, timezone)
5876
+ ))), /* @__PURE__ */ React52.createElement("div", { className: "flex items-center justify-between py-2 border-t border-b border-neutral-100 mt-2" }, /* @__PURE__ */ React52.createElement("div", { className: "flex flex-col" }, /* @__PURE__ */ React52.createElement("span", { className: "text-[13px] text-black tracking-tight" }, "Private Huddle"), /* @__PURE__ */ React52.createElement("span", { className: "text-[11px] text-neutral-500" }, "Only invited members can join.")), /* @__PURE__ */ React52.createElement(
5877
+ "button",
5878
+ {
5879
+ type: "button",
5880
+ onClick: () => setIsPrivate(!isPrivate),
5881
+ disabled: isSubmitting,
5882
+ className: `relative w-11 h-6 rounded-full transition-colors outline-none shrink-0 ${isPrivate ? "bg-[#068afe]" : "bg-neutral-200"}`
5883
+ },
5884
+ /* @__PURE__ */ React52.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"}` })
5885
+ )), isPrivate && /* @__PURE__ */ React52.createElement("div", { className: "flex items-center justify-between animate-in fade-in zoom-in-95 duration-200 bg-neutral-50 p-4 rounded-xl" }, /* @__PURE__ */ React52.createElement("div", { className: "flex flex-col" }, /* @__PURE__ */ React52.createElement("span", { className: "text-[12px] text-black tracking-tight" }, "Participants"), /* @__PURE__ */ React52.createElement("span", { className: "text-[11px] text-[#068afe] " }, selectedParticipants.size === 0 ? "0 added" : selectedParticipants.size >= 1e3 ? `${(selectedParticipants.size / 1e3).toFixed(1)}k+ added` : `${selectedParticipants.size} added`)), /* @__PURE__ */ React52.createElement(
5886
+ "button",
5887
+ {
5888
+ type: "button",
5889
+ onClick: () => setShowMembersModal(true),
5890
+ disabled: isSubmitting,
5891
+ className: "px-4 py-2 border border-neutral-200 text-black text-[11px] tracking-wide rounded-full hover:bg-white transition-colors outline-none bg-transparent"
5892
+ },
5893
+ "Manage Access"
5894
+ )), /* @__PURE__ */ React52.createElement("div", { className: "pt-6" }, /* @__PURE__ */ React52.createElement(
5895
+ ThreeDActionButton,
5896
+ {
5897
+ type: "submit",
5898
+ disabled: isSubmitting || title.trim().length < 2 || isPrivate && selectedParticipants.size === 0,
5899
+ isLoading: isSubmitting,
5900
+ className: "w-full sm:w-auto min-w-40"
5901
+ },
5902
+ "Schedule Huddle"
5903
+ )))), /* @__PURE__ */ React52.createElement(
5904
+ CalendarPicker,
5905
+ {
5906
+ isOpen: calendarMode !== null,
5907
+ onClose: () => setCalendarMode(null),
5908
+ initialDate: huddleDate,
5909
+ defaultMode: calendarMode || "DATE",
5910
+ onConfirm: (d) => setHuddleDate(d)
5911
+ }
5912
+ ), /* @__PURE__ */ React52.createElement(
5913
+ ReusableOptions,
5914
+ {
5915
+ isOpen: showTimezoneModal,
5916
+ onClose: () => setShowTimezoneModal(false),
5917
+ title: "Select Timezone",
5918
+ options: STANDARD_TIMEZONES,
5919
+ selectedOption: timezone,
5920
+ onSelect: (tz) => setTimezone(tz),
5921
+ showSearch: true
5922
+ }
5923
+ ), showMembersModal && /* @__PURE__ */ React52.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ React52.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setShowMembersModal(false) }), /* @__PURE__ */ React52.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__ */ React52.createElement("div", { className: "flex items-center justify-between p-5 shrink-0 " }, /* @__PURE__ */ React52.createElement("h3", { className: "text-[15px] text-black tracking-tight" }, "Select Participants"), /* @__PURE__ */ React52.createElement("button", { onClick: () => setShowMembersModal(false), className: "text-[#068afe] hover:text-[#068afe] transition-colors outline-none text-[13px] " }, "Done")), /* @__PURE__ */ React52.createElement("div", { className: "p-4 shrink-0 " }, /* @__PURE__ */ React52.createElement("div", { className: "relative w-full" }, /* @__PURE__ */ React52.createElement("div", { className: "absolute inset-y-0 left-0 pl-4 flex items-center pointer-events-none" }, /* @__PURE__ */ React52.createElement(HugeiconsIcon38, { icon: Search01Icon6, size: 16, className: "text-neutral-400" })), /* @__PURE__ */ React52.createElement(
5924
+ "input",
5925
+ {
5926
+ type: "text",
5927
+ placeholder: "Search team...",
5928
+ value: localSearchQuery,
5929
+ onChange: handleSearchInput,
5930
+ 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"
5931
+ }
5932
+ ))), /* @__PURE__ */ React52.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-2 relative" }, isMembersLoading || isTyping ? /* @__PURE__ */ React52.createElement("div", { className: "absolute inset-0 flex items-center justify-center" }, /* @__PURE__ */ React52.createElement(HugeiconsIcon38, { icon: Loading03Icon24, size: 28, className: "animate-spin text-black" })) : members.length === 0 ? /* @__PURE__ */ React52.createElement("div", { className: "p-8 text-center text-xs text-neutral-400" }, "No members found.") : members.map((member) => {
5933
+ const isChecked = selectedParticipants.has(member.userId);
5934
+ return /* @__PURE__ */ React52.createElement(
5935
+ "div",
5936
+ {
5937
+ key: member.id,
5938
+ onClick: () => toggleParticipant(member.userId),
5939
+ className: "flex items-center justify-between p-3 rounded-xl cursor-pointer hover:bg-neutral-50 transition-colors select-none"
5940
+ },
5941
+ /* @__PURE__ */ React52.createElement("div", { className: "flex items-center gap-3 min-w-0 flex-1" }, /* @__PURE__ */ React52.createElement(MemberAvatar3, { src: member.avatarUrl, sizeClass: "w-9 h-9" }), /* @__PURE__ */ React52.createElement("div", { className: "flex flex-col min-w-0 flex-1" }, /* @__PURE__ */ React52.createElement("span", { className: "text-[13px] text-black truncate" }, member.fullName), /* @__PURE__ */ React52.createElement("span", { className: "text-[11px] text-neutral-400 capitalize truncate" }, member.role.toLowerCase()))),
5942
+ /* @__PURE__ */ React52.createElement("div", { className: "shrink-0 pl-3" }, /* @__PURE__ */ React52.createElement("div", { className: `w-5 h-5 rounded-full flex items-center justify-center transition-colors ${isChecked ? "bg-[#068afe]" : "border border-neutral-300 bg-white"}` }, isChecked && /* @__PURE__ */ React52.createElement(HugeiconsIcon38, { icon: Tick02Icon, size: 14, className: "text-white" })))
5943
+ );
5944
+ })), /* @__PURE__ */ React52.createElement("div", { className: "p-4 flex items-center justify-between shrink-0 bg-white" }, /* @__PURE__ */ React52.createElement("span", { className: "text-[10px] text-neutral-400 tracking-widest" }, "Page ", membersCurrentPage, " of ", membersTotalPages === 0 ? 1 : membersTotalPages), /* @__PURE__ */ React52.createElement("div", { className: "flex gap-1" }, /* @__PURE__ */ React52.createElement(
5945
+ "button",
5946
+ {
5947
+ disabled: membersCurrentPage <= 1 || isMembersLoading,
5948
+ onClick: () => onMembersPageChange(membersCurrentPage - 1),
5949
+ className: "w-7 h-7 flex items-center justify-center rounded-full bg-white border border-neutral-200 text-neutral-600 disabled:opacity-30 outline-none hover:bg-neutral-50 transition-colors"
5950
+ },
5951
+ /* @__PURE__ */ React52.createElement(HugeiconsIcon38, { icon: ArrowLeft01Icon18, size: 12 })
5952
+ ), /* @__PURE__ */ React52.createElement(
5953
+ "button",
5954
+ {
5955
+ disabled: membersCurrentPage >= membersTotalPages || membersTotalPages === 0 || isMembersLoading,
5956
+ onClick: () => onMembersPageChange(membersCurrentPage + 1),
5957
+ className: "w-7 h-7 flex items-center justify-center rounded-full bg-white border border-neutral-200 text-neutral-600 disabled:opacity-30 outline-none hover:bg-neutral-50 transition-colors"
5958
+ },
5959
+ /* @__PURE__ */ React52.createElement(HugeiconsIcon38, { icon: ArrowRight01Icon14, size: 12 })
5960
+ ))))));
5537
5961
  };
5538
5962
  export {
5539
5963
  AppBento2,
@@ -5569,6 +5993,7 @@ export {
5569
5993
  UniversalBuyCryptoPage,
5570
5994
  UniversalCardActionPage,
5571
5995
  UniversalCardPage,
5996
+ UniversalCreateHuddle,
5572
5997
  UniversalErrorView,
5573
5998
  UniversalHome2,
5574
5999
  UniversalHomeView,