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

function IconAnalysisComponent(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-analysis${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 48 48" fill={useCurrentColor ? 'currentColor' : '#000'} xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><path fillRule="evenodd" clipRule="evenodd" d="M42 4a2 2 0 012 2v10h-4V8H8v32h8v4H6a2 2 0 01-2-2V6a2 2 0 012-2h36zM29.8 16c7.07 0 12.8 5.73 12.8 12.8 0 3.03-1.053 5.814-2.812 8.006l3.787 3.786a1 1 0 010 1.414l-1.697 1.697a1 1 0 01-1.415 0l-3.982-3.983A12.74 12.74 0 0129.8 41.6c-7.07 0-12.8-5.73-12.8-12.8S22.73 16 29.8 16zM21 28.8a8.8 8.8 0 1117.6 0 8.8 8.8 0 01-17.6 0z"/></svg>;
}

const IconAnalysis = React.forwardRef(IconAnalysisComponent);
export default IconAnalysis;
