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

function IconTreeSQLComponent(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_SQL${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 24 24" fill={useCurrentColor ? 'currentColor' : 'none'} xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><g clipPath="url(#svg_9778840a01__clip0_37122_1120129)"><path fill={useCurrentColor ? 'currentColor' : '#2A86A7'} d="M0 0H24V24H0z"/><path d="M8.25732 13.7104C8.25732 14.22 8.21626 14.5846 8.13513 14.8038C8.04889 15.0324 7.91044 15.242 7.72882 15.4189C7.53886 15.6094 7.27102 15.7453 6.92922 15.8268C6.58579 15.9087 6.17557 15.9509 5.70018 15.9509C5.18569 15.9509 4.76145 15.9078 4.42845 15.8215C4.09415 15.735 3.83055 15.5878 3.63505 15.3802C3.43628 15.1668 3.29029 14.9172 3.2069 14.6484C3.11697 14.3686 3.07201 13.9207 3.07201 13.308V12.9709H5.21404V13.7996C5.21404 14.1024 5.23587 14.3092 5.27823 14.4221C5.32189 14.534 5.43267 14.5899 5.61383 14.5899C5.91849 14.5899 6.0713 14.3488 6.0713 13.8646C6.0713 13.5535 6.05208 13.3204 6.0133 13.1653C5.97486 13.0108 5.86179 12.8463 5.67118 12.6737C4.78426 12.0941 4.17593 11.6628 3.84326 11.3783C3.28152 10.9029 3 10.2036 3 9.28013C3 8.95131 3.02183 8.66711 3.06419 8.42456C3.10655 8.1832 3.19517 7.95483 3.32909 7.73769C3.50849 7.46151 3.79295 7.25424 4.12901 7.15481C4.47081 7.05111 4.92861 7 5.49947 7C6.0524 7 6.48837 7.03043 6.80703 7.09099C7.1257 7.15156 7.3906 7.2845 7.60044 7.49189C7.81027 7.69958 7.94745 7.9631 8.01425 8.28216C8.05302 8.47242 8.07094 8.82191 8.07094 9.33153V9.44823H5.94455V9.04703C5.94455 8.81394 5.93934 8.67066 5.93054 8.61925C5.89177 8.42102 5.77382 8.32087 5.5731 8.32087C5.2968 8.32087 5.15897 8.55396 5.15897 9.02015C5.15897 9.38294 5.22349 9.64262 5.35186 9.79772C5.48057 9.95252 5.87743 10.2255 6.54506 10.6137C7.27786 11.0368 7.75879 11.4855 7.98753 11.9612C8.16706 12.3325 8.25732 12.9154 8.25732 13.7104ZM15.0858 17H13.1712C12.5143 17 12.095 16.9182 11.9138 16.7536C11.7724 16.6242 11.7007 16.3433 11.7007 15.911C11.4598 15.9117 11.2198 15.8857 10.9858 15.8336C10.7409 15.7749 10.509 15.6783 10.3003 15.548C9.79525 15.2549 9.47105 14.8664 9.32866 14.3825C9.23351 14.0634 9.18725 13.5024 9.18725 12.6994V9.94041C9.18725 9.55251 9.19735 9.23493 9.22178 8.98913C9.24388 8.74836 9.29916 8.51106 9.38633 8.28276C9.57662 7.834 9.89821 7.50755 10.3505 7.30488C10.8031 7.10192 11.3625 7.00059 12.0279 7.00059C12.8187 7.00059 13.4615 7.11965 13.9565 7.35747C14.4517 7.59411 14.786 7.96369 14.9568 8.46504C15.0236 8.64584 15.0607 8.88957 15.0715 9.19593C15.0803 9.50258 15.0858 9.73331 15.0858 9.88989V12.7913C15.0858 13.516 15.0519 14.0173 14.9848 14.2939C14.8437 14.8883 14.3527 15.2776 13.514 15.4593C13.514 15.675 13.5567 15.8044 13.643 15.8475C13.7281 15.8904 13.9196 15.9116 14.2135 15.9116H15.0858V17ZM12.528 13.7104V9.08573C12.528 8.81778 12.5055 8.62398 12.4576 8.50285C12.4101 8.38172 12.3045 8.32116 12.1426 8.32116C11.962 8.32116 11.8493 8.38616 11.8066 8.51585C11.7646 8.64525 11.7428 8.90375 11.7428 9.29342V13.8652C11.7428 14.0983 11.7669 14.2788 11.8148 14.41C11.8623 14.5382 11.9666 14.6032 12.1285 14.6032C12.3947 14.6032 12.528 14.306 12.528 13.7104ZM20.9997 15.911H16.1281V7.0003H18.6853V14.1367H21V15.911H20.9997Z" fill={useCurrentColor ? 'currentColor' : '#fff'}/></g><defs><clipPath id="svg_9778840a01__clip0_37122_1120129"><rect width="24" height="24" rx="6" fill={useCurrentColor ? 'currentColor' : '#fff'}/></clipPath></defs></svg>;
}

const IconTreeSQL = React.forwardRef(IconTreeSQLComponent);
export default IconTreeSQL;
