import { jsx as _jsx } from "react/jsx-runtime";
import { FolderTreeIcon } from "lucide-react";
import { useEditContext } from "../../client/editContext";
import { CONTENT_TREE_SIDEBAR_ID } from "../../sidebar/contentTreeConstants";
import { SimpleIconButton } from "../../ui/SimpleIconButton";
export function ContentTreeToggle() {
    const editContext = useEditContext();
    if (!editContext || !editContext.workspace?.supportsSidebars)
        return null;
    const contentTreeOpen = editContext.openSidebars.includes(CONTENT_TREE_SIDEBAR_ID);
    return (_jsx(SimpleIconButton, { icon: _jsx(FolderTreeIcon, { className: "h-6 w-6 p-1", strokeWidth: 1 }), label: contentTreeOpen ? "Hide content tree" : "Show content tree", size: "large", "data-testid": "content-tree-toggle-button", selected: contentTreeOpen, onClick: () => editContext.toggleSidebar(CONTENT_TREE_SIDEBAR_ID) }));
}
//# sourceMappingURL=ContentTreeToggle.js.map