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

function IconDataInsightComponent(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-data_Insight${loadingKls} ${className}`} width={width} height={height} xmlns="http://www.w3.org/2000/svg" fill={useCurrentColor ? 'currentColor' : '#000'} viewBox="0 0 20 20" {...rest} ref={ref}><path d="M10.165 1.51a8.241 8.241 0 0 1 7.816 8.23l-.01.425A8.193 8.193 0 0 1 16.6 14.3l1.901 1.9a1.347 1.347 0 0 1-1.904 1.905l-1.835-1.835a8.203 8.203 0 0 1-5.022 1.71l-.425-.01a8.241 8.241 0 0 1-7.805-7.806L1.5 9.74c0-4.55 3.69-8.24 8.24-8.24l.425.01ZM9.74 4.194a5.548 5.548 0 1 0 0 11.096 5.548 5.548 0 0 0 0-11.096ZM9.987 5.4c.363.02.435.536.211.822a2.163 2.163 0 0 0 1.06 3.394 2.163 2.163 0 0 0 1.974-.36c.287-.224.802-.152.823.211A4.321 4.321 0 1 1 9.987 5.4Z"/></svg>;
}

const IconDataInsight = React.forwardRef(IconDataInsightComponent);
export default IconDataInsight;
