import { jsx as _jsx } from "react/jsx-runtime";
import { useStyleConfig, vui } from '../core';
import T from '../t';
import { cs } from '../utils';
import { useSwitchContext } from './context';
/** Displays label text within the Switch component. */
export const SwitchLabel = vui((props, ref) => {
    const { className, ...rest } = props;
    const styles = useStyleConfig('Switch', useSwitchContext());
    // <T> has xs but not xl
    if (styles.label.size === 'xl') {
        rest.fontSize = 20;
    }
    return _jsx(T, { className: cs('vui-switchLabel', className), display: "flex", ref: ref, ...styles.label, ...rest });
});
SwitchLabel.displayName = 'SwitchLabel';
export default SwitchLabel;
//# sourceMappingURL=switchLabel.js.map