import { jsx as _jsx } from "react/jsx-runtime";
import { useEditContext } from "../client/editContext";
import { cn } from "../../lib/utils";
import { ParheliaIcon } from "./ParheliaIcon";
export function HomeButton({ size = 32, className }) {
    const editContext = useEditContext();
    if (!editContext)
        return null;
    return (_jsx("button", { onClick: (e) => {
            e.preventDefault();
            e.stopPropagation();
            editContext.switchWorkspace("home", {
                skipNavigationHistory: true,
            });
        }, className: cn("focus-visible:ring-highlight-100 size-7 cursor-pointer transition-all focus:outline-none focus-visible:ring-2 md:size-10", className), "aria-label": "Home", "data-testid": "home-workspace-button", children: _jsx(ParheliaIcon, { size: size }) }));
}
//# sourceMappingURL=HomeButton.js.map