// @ts-nocheck
import './TestimonialCard.css';
import React from 'react';
import { cn } from '../../utils/bem';
import { getSizeByMap } from '../../utils/getSizeByMap';
import { forwardRefWithAs } from '../../utils/types/PropsWithAsAttributes';
import { usePropsHandler } from '../EventInterceptor/usePropsHandler';
import { Typography } from '../Typography/Typography';
import { User } from '../User/User';
var sizeMap = {
    m: 'sm',
    s: 'tiny'
};
var sizeMapUser = {
    m: null,
    s: 'xs'
};
export var cnTestimonialCard = cn('TestimonialCard');
export var TestimonialCard = forwardRefWithAs(function (props, ref) {
    var _a = usePropsHandler(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.createElement("div", { className: cnTestimonialCard({ view: view, size: size }) },
        React.createElement(Typography.Title, { size: getSizeByMap(sizeMap, size), className: cnTestimonialCard('Title') }, quote),
        React.createElement("div", { className: cnTestimonialCard('User') },
            React.createElement(User, { name: author, info: authorPosition, avatarUrl: authorPhoto === null || authorPhoto === void 0 ? void 0 : authorPhoto.url, size: getSizeByMap(sizeMapUser, size) }))));
});
