import { jsx as _jsx } from "react/jsx-runtime";
import { ToolButton } from "../components/tool-button";
import { Icons } from "../icons";
export function menuButtonToTool(constructItem) {
    return function Tool(props) {
        const item = constructItem(props.editor);
        return (_jsx(ToolButton, Object.assign({}, props, { icon: props.icon, toggled: item.isChecked || false, title: item.title, onClick: item.onClick })));
    };
}
export function toolToMenuButton(tool) {
    return Object.assign(Object.assign({}, tool), { type: "button", icon: Icons[tool.icon], key: tool.title });
}
