"use strict";
exports.__esModule = true;
exports.ContentBuilderTemplate = void 0;
var tslib_1 = require("tslib");
// @ts-nocheck
require("./ContentBuilderTemplate.css");
var react_1 = (0, tslib_1.__importDefault)(require("react"));
var PropsWithAsAttributes_1 = require("../../../utils/types/PropsWithAsAttributes");
var ContentCard_1 = require("../../ContentCard/ContentCard");
var usePropsHandler_1 = require("../../EventInterceptor/usePropsHandler");
var Grid_1 = require("../../Grid/Grid");
var Typography_1 = require("../../Typography/Typography");
var index_1 = require("./index");
exports.ContentBuilderTemplate = (0, PropsWithAsAttributes_1.forwardRefWithAs)(function (props) {
    var _a = (0, usePropsHandler_1.usePropsHandler)((0, index_1.cnContentBuilderTemplate)(), props), type = _a.type, title = _a.title, text = _a.text, text2 = _a.text2, columnI = _a.columnI, columnII = _a.columnII;
    var typeNumber = type.toString();
    return (react_1["default"].createElement("div", { className: (0, index_1.cnContentBuilderTemplate)({ type: typeNumber }) },
        title && (react_1["default"].createElement(Typography_1.Typography.Text, { size: "xs", weight: "bold", transform: "uppercase", className: (0, index_1.cnContentBuilderTemplate)('Title') }, title)),
        text && (react_1["default"].createElement(Typography_1.Typography.Title, { className: (0, index_1.cnContentBuilderTemplate)('SubTitle'), size: "sm", parse: true }, text)),
        text2 && (react_1["default"].createElement(Typography_1.Typography.Text, { className: (0, index_1.cnContentBuilderTemplate)('SubTitle2'), parse: true }, text2)),
        react_1["default"].createElement(Grid_1.Grid, { className: (0, index_1.cnContentBuilderTemplate)('Blocks'), breakpoints: {
                desktop: { cols: 12, colGap: '3xxl' },
                tablet: { cols: 8, colGap: 's' },
                mobile: { cols: 1, rowGap: '3xxl' }
            } },
            (columnI === null || columnI === void 0 ? void 0 : columnI.length) > 0 && (react_1["default"].createElement(Grid_1.GridItem, { breakpoints: { desktop: { col: 5 }, tablet: { col: 4 } } },
                react_1["default"].createElement(Grid_1.Grid, { rowGap: "3xxl", cols: "1" }, columnI.map(function (item) { return (react_1["default"].createElement(Grid_1.GridItem, { col: "1" },
                    react_1["default"].createElement(ContentCard_1.ContentCard, (0, tslib_1.__assign)({}, item, { titleTag: "h4", titleSize: "md" })))); })))),
            (columnII === null || columnII === void 0 ? void 0 : columnII.length) > 0 && (react_1["default"].createElement(Grid_1.GridItem, { breakpoints: {
                    desktop: { col: 5, colStart: 7 },
                    tablet: { col: 4 }
                } },
                react_1["default"].createElement(Grid_1.Grid, { rowGap: "3xxl", cols: "1" }, columnII.map(function (item) { return (react_1["default"].createElement(Grid_1.GridItem, { col: "1" },
                    react_1["default"].createElement(ContentCard_1.ContentCard, (0, tslib_1.__assign)({}, item, { titleTag: "h4", titleSize: "md" })))); })))))));
});
exports["default"] = exports.ContentBuilderTemplate;
