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

function IconCircularGraphComponent(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-circular-graph${loadingKls} ${className}`} width={width} height={height} xmlns="http://www.w3.org/2000/svg" fill={useCurrentColor ? 'currentColor' : '#000'} viewBox="0 0 21 20" {...rest} ref={ref}><path fillRule="evenodd" d="M10.25 3.25A6.75 6.75 0 1 0 17 10a.75.75 0 0 1 1.5 0 8.25 8.25 0 1 1-8.25-8.25.75.75 0 0 1 0 1.5Zm2.246-.447a.75.75 0 0 1 .984-.397 8.274 8.274 0 0 1 4.483 4.661.75.75 0 1 1-1.402.533 6.775 6.775 0 0 0-3.669-3.813.75.75 0 0 1-.396-.984ZM8.083 10a2.167 2.167 0 1 1 4.334 0 2.167 2.167 0 0 1-4.334 0Zm2.167-3.667a3.667 3.667 0 1 0 0 7.334 3.667 3.667 0 0 0 0-7.334Z" clipRule="evenodd"/></svg>;
}

const IconCircularGraph = React.forwardRef(IconCircularGraphComponent);
export default IconCircularGraph;
