import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import BrandFooter from "../../components/BrandFooter/BrandFooter.js";
import { block } from "../../utils/index.js";
import { GravityBlocksProvider } from "../context/GravityBlocksProvider.js";
import { useContent } from "../hooks/index.js";
const b = block('page-constructor');
export const GeneralExtensionContentWrapper = (props) => {
    const { children, isBranded: isBrandedProp, ...rest } = props;
    const { content } = useContent();
    const { isBranded = isBrandedProp, animated = rest.animated } = content;
    return (_jsx("div", { className: b('wrapper'), children: _jsxs(GravityBlocksProvider, { animated: animated, ...rest, children: [children, isBranded && _jsx(BrandFooter, {})] }) }));
};
export const generalExtension = ({ wrapperProps = {}, globalDefaults = {}, }) => {
    return {
        name: 'General Extension',
        id: '@gravity-ui/page-constructor/general-extension',
        settings: {
            ContentWrapper: GeneralExtensionContentWrapper,
            contentWrapperProps: wrapperProps,
            globalInputs: [
                {
                    type: 'switch',
                    title: 'Is branded',
                    name: 'isBranded',
                },
                {
                    type: 'switch',
                    title: 'Animated',
                    name: 'animated',
                },
            ],
            globalDefaults,
        },
    };
};
//# sourceMappingURL=GeneralExtension.js.map
