// @ts-nocheck
import './ContentBuilderTemplate.css';
import React from 'react';
import { forwardRefWithAs } from '../../../utils/types/PropsWithAsAttributes';
import { usePropsHandler } from '../../EventInterceptor/usePropsHandler';
import { cnContentBuilderTemplate } from './index';
import { Typography } from '../../Typography';
import { ValuesCard } from '../../ValuesCard/ValuesCard';
import { Grid, GridItem } from '../../Grid/Grid';
export var ContentBuilderTemplate = forwardRefWithAs(function (props, ref) {
    var _a = usePropsHandler(cnContentBuilderTemplate(), props), type = _a.type, title = _a.title, text = _a.text, items = _a.items;
    var typeNumber = type.toString();
    return (React.createElement("div", { className: cnContentBuilderTemplate({ type: typeNumber }) },
        title && (React.createElement(Typography.Text, { size: "xs", weight: "bold", transform: "uppercase", className: cnContentBuilderTemplate('Title') }, title)),
        text && (React.createElement(Typography.Text, { size: "l", dangerouslySetInnerHTML: { __html: text }, className: cnContentBuilderTemplate('SubTitle') })),
        items && items.length > 0 && (React.createElement(Grid, { className: cnContentBuilderTemplate('Cards'), breakpoints: {
                desktop: { cols: 12, gap: 'xl' },
                tablet: { cols: 8, rowGap: '5xl' },
                mobile: { rowGap: '4xl', cols: 2 }
            } }, items.map(function (item) { return (React.createElement(GridItem, { breakpoints: {
                desktop: { col: 3 },
                tablet: { col: 4 },
                mobile: { col: 1 }
            }, key: item.id },
            React.createElement(ValuesCard, { title: item.title, number: item.number, subtitle: item.subtitle, text: item.texr, size: "l", view: "transparent" }))); })))));
});
export default ContentBuilderTemplate;
