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("cursor-pointer transition-all size-7 focus:outline-none focus-visible:ring-2 focus-visible:ring-purple-400 md:size-10", className), "aria-label": "Home", "data-testid": "home-workspace-button", children: _jsx(ParheliaIcon, { size: size }) }));
}
//# sourceMappingURL=HomeButton.js.map