import { jsx as _jsx } from "react/jsx-runtime";
import BlockBase from "../../components/BlockBase/BlockBase.js";
export const BlockBaseExtensionBlockWrapper = ({ props, content, children, index }) => {
    let defaultIndent;
    if (index === 0) {
        defaultIndent = { top: '0', bottom: 'l' };
    }
    return (_jsx(BlockBase, { anchor: content?.anchor ?? props?.anchor, indent: content?.indent ?? props?.indent ?? defaultIndent, visible: content?.visible ?? props?.visible, resetPaddings: content?.resetPaddings ?? props?.resetPaddings, qa: content?.qa ?? props?.qa, children: children }));
};
export const blockBaseExtension = () => ({
    name: 'Block Base',
    id: '@gravity-ui/page-constructor/block-base',
    settings: {
        blockWrapper: BlockBaseExtensionBlockWrapper,
        blockInputs: [
            {
                type: 'section',
                title: 'Block Base',
                fields: [
                    {
                        type: 'textInput',
                        title: 'Anchor',
                        name: 'anchor.url',
                    },
                    {
                        type: 'textInput',
                        title: 'Anchor text',
                        name: 'anchor.text',
                    },
                    {
                        type: 'select',
                        title: 'Top indent',
                        name: 'indent.top',
                        hasClear: true,
                        options: [
                            { value: '0' },
                            { value: 'xs' },
                            { value: 's' },
                            { value: 'm' },
                            { value: 'l' },
                            { value: 'xl' },
                        ],
                    },
                    {
                        type: 'select',
                        title: 'Bottom indent',
                        name: 'indent.bottom',
                        hasClear: true,
                        options: [
                            { value: '0' },
                            { value: 'xs' },
                            { value: 's' },
                            { value: 'm' },
                            { value: 'l' },
                            { value: 'xl' },
                        ],
                    },
                    {
                        type: 'select',
                        title: 'Hide on breakpoint',
                        name: 'visible',
                        hasClear: true,
                        options: [
                            { value: 'sm', content: 'SM only' },
                            { value: 'md', content: 'MD and down' },
                            { value: 'lg', content: 'LG and down' },
                            { value: 'xl', content: 'XL and down' },
                        ],
                    },
                ],
            },
        ],
    },
});
//# sourceMappingURL=BlockBaseExtension.js.map
