import { jsx as _jsx } from "react/jsx-runtime";
import { createElement as _createElement } from "react";
import { block } from "../../utils/index.js";
import Button from "../Button/Button.js";
import './Buttons.css';
const b = block('buttons');
function getButtonSize(size) {
    switch (size) {
        case 's':
            return 'm';
        case 'l':
        default:
            return 'xl';
    }
}
const Buttons = ({ className, titleId, buttons, size = 's', qa, buttonQa, }) => buttons ? (_jsx("div", { className: b({ size }, className), "data-qa": qa, children: buttons.map((item) => (_createElement(Button, { className: b('button'), ...item, key: item.url, size: getButtonSize(size), qa: buttonQa, extraProps: {
            'aria-describedby': item.urlTitle ? undefined : titleId,
            ...item.extraProps,
        } }))) })) : null;
export default Buttons;
//# sourceMappingURL=Buttons.js.map
