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

function IconTreeSuccessComponent(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-tree_success${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 d="M12.8031 4.13639C13.096 3.84349 13.5707 3.84349 13.8636 4.13639C14.1565 4.42928 14.1565 4.90404 13.8636 5.19693L7.19664 11.8639C6.90372 12.1565 6.42888 12.1567 6.13609 11.8639L2.80308 8.52994C2.51035 8.23704 2.51025 7.76223 2.80308 7.4694C3.09594 7.17672 3.57078 7.17672 3.86363 7.4694L6.66637 10.2721L12.8031 4.13639Z"/></svg>;
}

const IconTreeSuccess = React.forwardRef(IconTreeSuccessComponent);
export default IconTreeSuccess;
