import { jsx as _jsx } from "react/jsx-runtime";
import { useStyleConfig, vui } from '../core';
import Icon from '../icon';
import { cs } from '../utils';
import { useButtonContext } from './context';
const isConceptualIcon = (name) => name?.startsWith('con');
/** Displays an icon within the Button. */
export const ButtonIcon = vui((props, ref) => {
    const { className, name, ...rest } = props;
    const styles = useStyleConfig('Button', useButtonContext());
    const verifiedName = isConceptualIcon(name) ? undefined : name;
    return _jsx(Icon, { className: cs('vui-buttonIcon', className), name: verifiedName, ref: ref, ...styles.icon, ...rest });
});
ButtonIcon.displayName = 'ButtonIcon';
export default ButtonIcon;
//# sourceMappingURL=buttonIcon.js.map