"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.PageLayoutSection = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
const react_1 = require("react");
const classNames_1 = require("../utils/classNames");
const cva_1 = require("../utils/cva");
const constants_1 = require("./constants");
const styles_1 = require("./styles");
const sectionWrapperCva = (0, cva_1.cva)(constants_1.pageLayoutSectionClassnames.wrapper, {
    variants: {
        isNoMobileSidePadding: {
            true: constants_1.pageLayoutSectionClassnames.isNoMobileSidePadding,
        },
    },
});
/**
 * Секция страницы. На десктопе между секциями отображается разделитель или отступ. На мобильных разрешениях секции оформляются как карточки.
 *
 * @example
 * <PageLayout content={
 *   <PageLayoutSectionContainer>
 *     <PageLayoutSection>
 *           Секция 1
 *     </PageLayoutSection>
 *   </PageLayoutSectionContainer>
 * } />
 */
exports.PageLayoutSection = (0, react_1.forwardRef)(({ children, className, isNoMobileSidePadding = false }, ref) => {
    return ((0, jsx_runtime_1.jsx)(styles_1.Section, { className: (0, classNames_1.classNames)(className, constants_1.pageLayoutSectionClassnames.root), ref: ref, children: (0, jsx_runtime_1.jsx)(styles_1.SectionWrapper, { className: sectionWrapperCva({ isNoMobileSidePadding }), children: children }) }));
});
