import { jsx as _jsx } from "react/jsx-runtime";
import { omitThemingProps, styled, useStyleConfig, vui } from '../core';
import { cs, filterUndefined } from '../utils';
export const TBase = styled.spanBox `
  transition-duration: fast;
`;
/** Displays given text and allows easy styling. */
export const T = vui((props, ref) => {
    const { align, casing, centerV, children, className, decoration, text, weight, ...rest } = omitThemingProps(props);
    const styles = useStyleConfig('T', props);
    const aliasedProps = filterUndefined({
        alignItems: centerV ? 'center' : undefined,
        display: centerV ? 'inline-flex' : undefined,
        fontWeight: weight,
        textAlign: align,
        textDecoration: decoration,
        textTransform: casing,
    });
    return (_jsx(TBase, { className: cs('vui-t', className), ref: ref, ...styles, ...aliasedProps, ...rest, children: children ?? text }));
});
T.displayName = 'T';
export default T;
//# sourceMappingURL=t.js.map