import { jsx as _jsx } from "react/jsx-runtime";
import { Button, DropdownMenu } from '@gravity-ui/uikit';
import { formBuilderCn } from "../../utils/cn.js";
import './AddPropertyButton.css';
const b = formBuilderCn('add-property-button');
export const AddPropertyButton = ({ inputTypeMenuItems, onAdd, buttonText = '+ Add Property', }) => (_jsx("div", { className: b(), children: _jsx(DropdownMenu, { items: inputTypeMenuItems.map((item) => ({
            ...item,
            action: () => {
                onAdd(item.type);
            },
        })), renderSwitcher: (props) => (_jsx(Button, { ...props, view: "normal", size: "s", children: buttonText })) }) }));
//# sourceMappingURL=AddPropertyButton.js.map
