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

function IconDataAnnotationComponent(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-data_annotation${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 20 20" fill={useCurrentColor ? 'currentColor' : 'none'} xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><rect width="20" height="20" rx="6" fill={useCurrentColor ? 'currentColor' : '#B272E7'}/><path d="M6.20825 11.7933V13.9167H8.34244L14.3749 7.88153L12.2443 5.75L6.20825 11.7933Z" fill={useCurrentColor ? 'currentColor' : '#fff'} stroke="#fff" strokeWidth="2" strokeLinejoin="round"/></svg>;
}

const IconDataAnnotation = React.forwardRef(IconDataAnnotationComponent);
export default IconDataAnnotation;
