import { useState } from "react"; import { Dialog, DialogContent } from "@/components/ui/dialog"; import { cn } from "@/lib/utils"; import { User, Palette, Volume2 } from "lucide-react"; import { ProfileSettings } from "./ProfileSettings"; import { AppearanceSettings } from "./AppearanceSettings"; import { AudioVideoSettings } from "./AudioVideoSettings"; import Enclave from "@/app/app"; type SettingsCategory = "profile" | "appearance" | "audio-video"; const CATEGORIES: { id: SettingsCategory; label: string; icon: React.ElementType; }[] = [ { id: "profile", label: "Profile", icon: User }, { id: "appearance", label: "Appearance", icon: Palette }, { id: "audio-video", label: "Audio & Video", icon: Volume2 }, ]; export function SettingsDialog({ appRef, }: { appRef: React.RefObject; }) { const [category, setCategory] = useState("profile"); return ( { if (!appRef.current) return; appRef.current.isSettingsOpen = open; appRef.current.forceRender(); }} >
Settings
{category === "profile" && } {category === "appearance" && } {category === "audio-video" && }
); }