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

function IconAddVersionComponent(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-addVersion${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 16 16" fill={useCurrentColor ? 'currentColor' : '#000'} xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><path fillRule="evenodd" clipRule="evenodd" d="M0.599976 2.71429C0.599976 1.5466 1.54657 0.600006 2.71426 0.600006H13.2857C14.4534 0.600006 15.4 1.5466 15.4 2.71429V13.2857C15.4 14.4534 14.4534 15.4 13.2857 15.4H2.71426C1.54657 15.4 0.599976 14.4534 0.599976 13.2857V2.71429ZM6.92735 12.5059C6.70644 12.5059 6.52735 12.3268 6.52735 12.1059L6.52735 9.47259H3.89393C3.67302 9.47259 3.49393 9.29351 3.49393 9.07259V6.92122C3.49393 6.70031 3.67302 6.52122 3.89393 6.52122H6.52735V3.88784C6.52735 3.66693 6.70644 3.48784 6.92735 3.48784H9.07872C9.29963 3.48784 9.47872 3.66693 9.47872 3.88784V6.52122H12.112C12.3329 6.52122 12.512 6.70031 12.512 6.92122V9.07259C12.512 9.29351 12.3329 9.47259 12.112 9.47259H9.47872V12.1059C9.47872 12.3268 9.29963 12.5059 9.07872 12.5059H6.92735Z"/></svg>;
}

const IconAddVersion = React.forwardRef(IconAddVersionComponent);
export default IconAddVersion;
