"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 usePropsHandler_1 = require("../../EventInterceptor/usePropsHandler");
var index_1 = require("./index");
var Typography_1 = require("../../Typography/Typography");
var Slider_1 = require("../../Slider/Slider");
var MemberCard_1 = require("../../MemberCard/MemberCard");
exports.ContentBuilderTemplate = (0, PropsWithAsAttributes_1.forwardRefWithAs)(function (props, ref) {
    var _a = (0, usePropsHandler_1.usePropsHandler)((0, index_1.cnContentBuilderTemplate)(), props), type = _a.type, title = _a.title, members = _a.members, aliases = _a.aliases, cardAttrs = _a.cardAttrs;
    var typeNumber = type.toString();
    var options = {
        watchOverflow: true,
        slidesPerView: 'auto',
        spaceBetween: 8,
        navigation: true,
        breakpoints: {
            767: {
                spaceBetween: 16
            },
            1199: {
                spaceBetween: 24
            }
        }
    };
    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'), as: "h4" }, title)),
        members && members.length > 0 && (react_1["default"].createElement(Slider_1.Slider, (0, tslib_1.__assign)({}, options), members.map(function (member) {
            return (react_1["default"].createElement(Slider_1.SliderItem, { key: member.id },
                react_1["default"].createElement(MemberCard_1.MemberCard, (0, tslib_1.__assign)({}, member, { routePath: member.type === 1 ? aliases.TEAM_ADVISOR : aliases.TEAM_MEMBER }, cardAttrs))));
        })))));
});
exports["default"] = exports.ContentBuilderTemplate;
