"use client"; import { ShoppingBag as AppStore24Regular, LayoutGrid as GridDotsRegular, FolderOpen as OpenFolderRegular, Cpu as PulseRegular, Settings as SettingsRegular, TerminalSquare as WindowConsoleRegular, } from "@/components/icons/platform-icons"; import { Tooltip, TooltipContent, TooltipTrigger, } from "@/components/ui/tooltip"; import { OsIcon } from "@/components/icons/OsIcon"; import { APP_ICONS } from "@/components/icons/icon-assets"; import { useRef, useState } from "react"; export type DockItemDef = { id: string; name: string; icon: React.ComponentType<{ className?: string }>; iconBg: string; }; export const dockItemDefs: DockItemDef[] = [ { id: "apps", name: "Home", icon: GridDotsRegular, iconBg: "bg-blue-500/80" }, { id: "terminal", name: "Terminal", icon: WindowConsoleRegular, iconBg: "bg-slate-700/90" }, { id: "files", name: "Files", icon: OpenFolderRegular, iconBg: "bg-amber-500/80" }, { id: "monitor", name: "Monitor", icon: PulseRegular, iconBg: "bg-emerald-600/80" }, { id: "app-store", name: "App Store", icon: AppStore24Regular, iconBg: "bg-purple-600/80" }, { id: "settings", name: "Settings", icon: SettingsRegular, iconBg: "bg-zinc-600/80" }, ]; type DockProps = { activeWindows?: string[]; focusedWindow?: string | null; onItemClick?: (id: string) => void; position?: "bottom" | "left" | "right"; animationsEnabled?: boolean; }; export function Dock({ activeWindows = [], focusedWindow = null, onItemClick, position = "bottom", animationsEnabled = true, }: DockProps) { const [hoveredIndex, setHoveredIndex] = useState(null); const dockRef = useRef(null); const isVertical = position === "left" || position === "right"; function getScale(index: number) { return hoveredIndex === index ? 1.18 : 1; } const dockPositionClass = position === "bottom" ? "fixed bottom-4 left-1/2 -translate-x-1/2" : position === "left" ? "fixed left-4 top-1/2 -translate-y-1/2" : "fixed right-4 top-1/2 -translate-y-1/2"; return (
); }