import { __assign } from "tslib";
// @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/Typography';
import { Article } from '../../Article/Article';
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", dangerouslySetInnerHTML: { __html: title } })),
        text && React.createElement(Article, { content: text }),
        (items === null || items === void 0 ? void 0 : items.length) > 0 && (React.createElement(Grid, { breakpoints: {
                desktop: { cols: 12, gap: 'xl' },
                tablet: { cols: 8, gap: 'm' },
                mobile: { gap: 'm' }
            } }, items.map(function (item) { return (React.createElement(GridItem, { key: item.id, breakpoints: { desktop: { col: 4 }, tablet: { col: 4 } } },
            React.createElement(ValuesCard, __assign({}, item, { size: "m" })))); })))));
});
export default ContentBuilderTemplate;
