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

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

    const prefix = prefixFromProps || prefixFromContext || 'hiagent';
    const loadingKls = spin ? ` ${prefix}-icon-loading` : '';
    return <svg className={`${prefix}-icon ${prefix}-icon-shrink${loadingKls} ${className}`} width={width} height={height} xmlns="http://www.w3.org/2000/svg" fill={useCurrentColor ? 'currentColor' : 'none'} viewBox="0 0 20 20" {...rest} ref={ref}><path fill={useCurrentColor ? 'currentColor' : '#fff'} d="M6.375 12.925a.7.7 0 0 1 .7.7v3.625a.7.7 0 0 1-1.4 0v-2.925H2.75a.7.7 0 0 1 0-1.4h3.625Zm10.834 0a.7.7 0 0 1 0 1.4h-2.884v2.925a.701.701 0 0 1-1.4 0v-3.625a.7.7 0 0 1 .7-.7h3.584ZM6.375 2.05a.7.7 0 0 1 .7.7v3.625a.7.7 0 0 1-.7.7H2.75a.7.7 0 0 1 0-1.4h2.925V2.75a.7.7 0 0 1 .7-.7Zm7.25 0a.7.7 0 0 1 .7.7v2.925h2.925a.7.7 0 0 1 0 1.4h-3.625a.7.7 0 0 1-.7-.7V2.75a.7.7 0 0 1 .7-.7Z"/></svg>;
}

const IconShrink = React.forwardRef(IconShrinkComponent);
export default IconShrink;
