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

function IconTreeQASearchComponent(props: OriginIconProps, ref: ForwardedRef<SVGSVGElement>) {
    const { prefix: prefixFromContext } = useContext(Context);
    const { className = '', prefix: prefixFromProps, width = '1em', height = '1em', useCurrentColor = false, spin, ...rest } = props;

    const prefix = prefixFromProps || prefixFromContext || 'hiagent';
    const loadingKls = spin ? ` ${prefix}-icon-loading` : '';
    return <svg className={`${prefix}-icon ${prefix}-icon-tree_QA_search${loadingKls} ${className}`} width={width} height={height} xmlns="http://www.w3.org/2000/svg" fill={useCurrentColor ? 'currentColor' : 'none'} viewBox="0 0 20 20" {...rest} ref={ref}><path fill={useCurrentColor ? 'currentColor' : '#6E9FFF'} d="M15 0H5a5 5 0 0 0-5 5v10a5 5 0 0 0 5 5h10a5 5 0 0 0 5-5V5a5 5 0 0 0-5-5Z"/><path fill={useCurrentColor ? 'currentColor' : '#fff'} d="M14.373 4.5c.62 0 1.127.524 1.127 1.165v4.963a3.5 3.5 0 0 0-5.484 3.19H6.753l-1.497 1.547c-.28.289-.756.084-.756-.324l.005-9.376c0-.64.501-1.165 1.121-1.165h8.747ZM6.292 9A.292.292 0 0 0 6 9.292v.583c0 .161.131.292.292.292h2.916a.292.292 0 0 0 .292-.292v-.583A.292.292 0 0 0 9.208 9H6.292Zm0-2.5A.292.292 0 0 0 6 6.792v.583c0 .161.131.292.292.292h4.916a.292.292 0 0 0 .292-.292v-.583a.292.292 0 0 0-.292-.292H6.292Z"/><path fill={useCurrentColor ? 'currentColor' : '#fff'} d="M13.412 11.5a1.913 1.913 0 0 1 1.709 2.767l.842.828a.5.5 0 0 1-.7.713l-.811-.796a1.91 1.91 0 0 1-.673.276 1.912 1.912 0 1 1-.367-3.788Z"/></svg>;
}

const IconTreeQASearch = React.forwardRef(IconTreeQASearchComponent);
export default IconTreeQASearch;
