// @ts-nocheck
import { __assign, __rest } from "tslib";
import './Title.css';
import React from 'react';
import { Link } from 'react-router-dom';
import { cn } from '../../../utils/bem';
import { parseContent } from '../../../utils/borderImageBase64';
import { forwardRefWithAs } from '../../../utils/types/PropsWithAsAttributes';
export var typographyPropDisplay = ['block', 'inlineBlock', 'inline'];
export var typographyPropSize = ['tiny', 'hg', 'lg', 'md', 'sm'];
export var typographyPropSizeDefault = typographyPropSize[0];
export var typographyPropSpacing = ['xs', 's', 'm', 'l'];
export var typographyPropWeight = ['bold'];
export var cnTitle = cn('Title');
export var Title = forwardRefWithAs(function (props, ref) {
    var _a = props.as, as = _a === void 0 ? 'div' : _a, display = props.display, font = props.font, _b = props.size, size = _b === void 0 ? typographyPropSizeDefault : _b, spacing = props.spacing, _c = props.weight, weight = _c === void 0 ? 'bold' : _c, color = props.color, className = props.className, children = props.children, parse = props.parse, inverted = props.inverted, otherProps = __rest(props, ["as", "display", "font", "size", "spacing", "weight", "color", "className", "children", "parse", "inverted"]);
    var Tag = as;
    if (Tag === 'link') {
        return (React.createElement(Link, __assign({}, otherProps, { className: cnTitle({
                display: display,
                font: font,
                size: size,
                spacing: spacing,
                weight: weight,
                color: color,
                inverted: inverted
            }, [className]), ref: ref }), parse ? parseContent(children) : children));
    }
    return (React.createElement(Tag, __assign({}, otherProps, { className: cnTitle({
            display: display,
            font: font,
            size: size,
            spacing: spacing,
            weight: weight,
            inverted: inverted
        }, [className]), ref: ref }), parse ? parseContent(children) : children));
});
