"use strict";
exports.__esModule = true;
exports.TestimonialCard = exports.cnTestimonialCard = void 0;
var tslib_1 = require("tslib");
// @ts-nocheck
require("./TestimonialCard.css");
var react_1 = (0, tslib_1.__importDefault)(require("react"));
var bem_1 = require("../../utils/bem");
var getSizeByMap_1 = require("../../utils/getSizeByMap");
var PropsWithAsAttributes_1 = require("../../utils/types/PropsWithAsAttributes");
var usePropsHandler_1 = require("../EventInterceptor/usePropsHandler");
var Typography_1 = require("../Typography/Typography");
var User_1 = require("../User/User");
var sizeMap = {
    m: 'sm',
    s: 'tiny'
};
var sizeMapUser = {
    m: null,
    s: 'xs'
};
exports.cnTestimonialCard = (0, bem_1.cn)('TestimonialCard');
exports.TestimonialCard = (0, PropsWithAsAttributes_1.forwardRefWithAs)(function (props, ref) {
    var _a = (0, usePropsHandler_1.usePropsHandler)((0, exports.cnTestimonialCard)(), props), quote = _a.quote, author = _a.author, authorPhoto = _a.authorPhoto, authorPosition = _a.authorPosition, view = _a.view, _b = _a.size, size = _b === void 0 ? 'm' : _b;
    return (react_1["default"].createElement("div", { className: (0, exports.cnTestimonialCard)({ view: view, size: size }) },
        react_1["default"].createElement(Typography_1.Typography.Title, { size: (0, getSizeByMap_1.getSizeByMap)(sizeMap, size), className: (0, exports.cnTestimonialCard)('Title') }, quote),
        react_1["default"].createElement("div", { className: (0, exports.cnTestimonialCard)('User') },
            react_1["default"].createElement(User_1.User, { name: author, info: authorPosition, avatarUrl: authorPhoto === null || authorPhoto === void 0 ? void 0 : authorPhoto.url, size: (0, getSizeByMap_1.getSizeByMap)(sizeMapUser, size) }))));
});
