import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { Tooltip, TooltipContent, TooltipTrigger, } from "../../components/ui/tooltip";
import { cn } from "../../lib/utils";
import { cloneElement } from "react";
export const WorkspaceButton = ({ active, onClick, workspace, numberKey, }) => {
    return (_jsxs(Tooltip, { delayDuration: 500, children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx("button", { type: "button", "aria-label": workspace.title, "aria-current": active ? "page" : undefined, "data-testid": `workspace-rail-${workspace.id}`, className: cn("flex h-9 w-9 shrink-0 items-center justify-center rounded-md border transition-colors", active
                        ? "border-purple-200 bg-purple-50 text-purple-700"
                        : "border-transparent text-gray-500 hover:border-gray-200 hover:bg-gray-50 hover:text-gray-800"), onClick: () => onClick(workspace.id), children: cloneElement(workspace.icon, {
                        className: "w-5 h-5",
                        strokeWidth: 1,
                    }) }) }), _jsxs(TooltipContent, { side: "right", children: [workspace.title, numberKey ? ` (Alt+${numberKey})` : ""] })] }));
};
//# sourceMappingURL=WorkspaceButton.js.map