import React, { ForwardedRef, useContext } from 'react';
import { OriginIconProps } from '../type';
import { Context } from '../context';

function IconMinusComponent(props: OriginIconProps, ref: ForwardedRef<SVGSVGElement>) {
    const { prefix: prefixFromContext } = useContext(Context);
    const { className = '', prefix: prefixFromProps, width = '1em', height = '1em', useCurrentColor = true, spin, ...rest } = props;

    const prefix = prefixFromProps || prefixFromContext || 'hiagent';
    const loadingKls = spin ? ` ${prefix}-icon-loading` : '';
    return <svg className={`${prefix}-icon ${prefix}-icon-minus${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 12 12" fill={useCurrentColor ? 'currentColor' : '#000'} xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><path fillRule="evenodd" clipRule="evenodd" d="M9.5 4.99963C9.77614 4.99963 10 5.22349 10 5.49963V6.49963C10 6.77578 9.77614 6.99963 9.5 6.99963H2.5C2.22386 6.99963 2 6.77578 2 6.49963V5.49963C2 5.22349 2.22386 4.99963 2.5 4.99963H9.5Z"/></svg>;
}

const IconMinus = React.forwardRef(IconMinusComponent);
export default IconMinus;
