"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.AddPropertyButton = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
const uikit_1 = require("@gravity-ui/uikit");
const cn_1 = require("../../utils/cn.js");
const b = (0, cn_1.formBuilderCn)('add-property-button');
const AddPropertyButton = ({ inputTypeMenuItems, onAdd, buttonText = '+ Add Property', }) => ((0, jsx_runtime_1.jsx)("div", { className: b(), children: (0, jsx_runtime_1.jsx)(uikit_1.DropdownMenu, { items: inputTypeMenuItems.map((item) => ({
            ...item,
            action: () => {
                onAdd(item.type);
            },
        })), renderSwitcher: (props) => ((0, jsx_runtime_1.jsx)(uikit_1.Button, { ...props, view: "normal", size: "s", children: buttonText })) }) }));
exports.AddPropertyButton = AddPropertyButton;
//# sourceMappingURL=AddPropertyButton.js.map
