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

function IconTaskDoneComponent(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-done${loadingKls} ${className}`} width={width} height={height} xmlns="http://www.w3.org/2000/svg" fill={useCurrentColor ? 'currentColor' : '#000'} viewBox="0 0 16 16" {...rest} ref={ref}><path fillRule="evenodd" d="M8 .667a7.333 7.333 0 1 1 0 14.666A7.333 7.333 0 0 1 8 .667ZM8 2a6 6 0 1 0 0 12A6 6 0 0 0 8 2Zm3.234 3.984.471.472c.13.13.13.341 0 .471L7.463 11.17a.333.333 0 0 1-.472 0l-2.44-2.44a.333.333 0 0 1 0-.472l.471-.471c.13-.13.342-.13.472 0L7.227 9.52l3.535-3.536c.13-.13.342-.13.472 0Z" clipRule="evenodd"/></svg>;
}

const IconTaskDone = React.forwardRef(IconTaskDoneComponent);
export default IconTaskDone;
