import { __assign, __rest } 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 { DiagramsBlock } from '../../DiagramsBlock/DiagramsBlock';
export var ContentBuilderTemplate = forwardRefWithAs(function (props, ref) {
    var _a = usePropsHandler(cnContentBuilderTemplate(), props), type = _a.type, title = _a.title, text = _a.text, diagrams = _a.diagrams, otherProps = __rest(_a, ["type", "title", "text", "diagrams"]);
    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(Article, { content: text, className: cnContentBuilderTemplate('SubTitle') })),
        (diagrams === null || diagrams === void 0 ? void 0 : diagrams.length) > 0 && (React.createElement("div", { className: cnContentBuilderTemplate('Diagrams') },
            React.createElement(DiagramsBlock, __assign({ items: diagrams }, otherProps))))));
});
export default ContentBuilderTemplate;
