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 { TestimonialCard } from '../../TestimonialCard/TestimonialCard';
import { Slider, SliderItem } from '../../Slider/Slider';
export var ContentBuilderTemplate = forwardRefWithAs(function (props, ref) {
    var _a = usePropsHandler(cnContentBuilderTemplate(), props), type = _a.type, title = _a.title, text = _a.text, testimonials = _a.testimonials;
    var typeNumber = type.toString();
    var options = {
        navigation: true,
        spaceBetween: 8,
        breakpoints: {
            767: {
                spaceBetween: 16,
                slidesPerView: 2
            },
            1199: {
                spaceBetween: 24,
                slidesPerView: 3
            }
        }
    };
    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(Article, { content: text, className: cnContentBuilderTemplate('SubTitle') })),
        React.createElement(Slider, __assign({}, options), testimonials.map(function (item) { return (React.createElement(SliderItem, { key: item.id },
            React.createElement(TestimonialCard, __assign({}, item)))); }))));
});
export default ContentBuilderTemplate;
