import React, { forwardRef } from "react";
import { applySpacing } from "../../../../mixins/applySpacing";
import { base as sizeCSS } from "../../variations/_size/base";
import { classes } from "../../tokens";
import { cx } from "../../../../utils";
import { base } from "./Subtitle.styles";
export const subtitleRoot = (Root)=>/*#__PURE__*/ forwardRef((props, ref)=>{
        const { size, children, color, noWrap, className, style, ...rest } = props;
        return /*#__PURE__*/ React.createElement(Root, {
            size: size,
            ref: ref,
            className: cx(noWrap && classes.typoWithNoWrap, className),
            style: {
                color,
                ...style,
                ...applySpacing(rest)
            },
            ...rest
        }, children);
    });
export const subtitleConfig = {
    name: 'Subtitle',
    tag: 'div',
    layout: subtitleRoot,
    base,
    variations: {
        size: {
            css: sizeCSS
        }
    },
    defaults: {
        size: 'm'
    }
};
