import React from 'react';
import Text from '../../../Text';
import { st, classes } from './Label.st.css.js';
import Asterisk from '../Asterisk';
import InfoContentIcon from '../InfoContentIcon';
const Label = ({ labelSize, label, 'aria-hidden': ariaHidden, hasInlineElements, required, infoContent, infoTooltipProps, ...rest }) => {
    const weight = labelSize === 'tiny' ? 'normal' : undefined;
    const hasSuffix = required || infoContent;
    return (React.createElement(Text, { "aria-hidden": ariaHidden, className: st(classes.root, {
            hasInlineElements,
            labelSize,
        }), size: labelSize, weight: weight, secondary: true, style: { display: 'block' }, suffix: hasSuffix ? (React.createElement(React.Fragment, null,
            required && React.createElement(Asterisk, { labelSize: labelSize }),
            React.createElement(InfoContentIcon, { required: required, infoContent: infoContent, infoTooltipProps: infoTooltipProps }))) : undefined, ...rest }, label));
};
export default Label;
//# sourceMappingURL=Label.js.map