"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.AddPropertyButton = void 0;
const tslib_1 = require("tslib");
const jsx_runtime_1 = require("react/jsx-runtime");
const uikit_1 = require("@gravity-ui/uikit");
const bem_cn_lite_1 = tslib_1.__importDefault(require("bem-cn-lite"));
const b = (0, bem_cn_lite_1.default)('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
