import { __assign } from "tslib";
// @ts-nocheck
import './ContentBuilderTemplate.css';
import React from 'react';
import { forwardRefWithAs } from '../../../utils/types/PropsWithAsAttributes';
import { Article } from '../../Article/Article';
import { usePropsHandler } from '../../EventInterceptor/usePropsHandler';
import { Grid, GridItem } from '../../Grid/Grid';
import { PartnerCard } from '../../PartnerCard/PartnerCard';
import { Typography } from '../../Typography/Typography';
import { cnContentBuilderTemplate } from './index';
export var ContentBuilderTemplate = forwardRefWithAs(function (props) {
    var _a = usePropsHandler(cnContentBuilderTemplate(), props), type = _a.type, title = _a.title, text = _a.text, partners = _a.partners;
    var typeNumber = type.toString();
    return (React.createElement("div", { className: cnContentBuilderTemplate({ type: typeNumber }) },
        title && (React.createElement(Typography.Text, { weight: "bold", transform: "uppercase", size: "xs", className: cnContentBuilderTemplate('Title') }, title)),
        text && React.createElement(Article, { content: text, className: cnContentBuilderTemplate('SubTitle') }),
        (partners === null || partners === void 0 ? void 0 : partners.length) > 0 && (React.createElement(Grid, { breakpoints: {
                desktop: { cols: 12, gap: 'xl' },
                tablet: { cols: 8, rowGap: 'xl', colGap: 'm' },
                mobile: { cols: 1, gap: 'xl' }
            } }, partners.map(function (item) { return (React.createElement(GridItem, { breakpoints: { desktop: { col: 3 }, tablet: { col: 4 }, mobile: { col: 1 } } },
            React.createElement(PartnerCard, __assign({}, item)))); })))));
});
export default ContentBuilderTemplate;
