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

function IconTaskCompletedComponent(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-task-completed${loadingKls} ${className}`} width={width} height={height} xmlns="http://www.w3.org/2000/svg" fill={useCurrentColor ? 'currentColor' : '#000'} viewBox="0 0 14 14" {...rest} ref={ref}><path d="m12.257 3.707-.403-.414a.292.292 0 0 0-.411 0l-6.19 6.186-2.887-2.885a.292.292 0 0 0-.411 0l-.411.412a.292.292 0 0 0 0 .411l3.091 3.095.415.41a.292.292 0 0 0 .41 0l.412-.41 6.393-6.394a.292.292 0 0 0-.008-.411Z"/></svg>;
}

const IconTaskCompleted = React.forwardRef(IconTaskCompletedComponent);
export default IconTaskCompleted;
