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

function IconAppKnowledgeComponent(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-app-knowledge${loadingKls} ${className}`} width={width} height={height} xmlns="http://www.w3.org/2000/svg" fill={useCurrentColor ? 'currentColor' : 'none'} viewBox="0 0 16 16" {...rest} ref={ref}><path fill={useCurrentColor ? 'currentColor' : '#F6BB46'} fillRule="evenodd" d="M3.326 2.667h9.348a.67.67 0 0 1 .672.666v10.678a.672.672 0 0 1-.926.617l-4.256-1.859a.678.678 0 0 0-.515.003l-4.061 1.84a.672.672 0 0 1-.934-.614V3.333c0-.368.301-.666.672-.666ZM6.32 6.673a.335.335 0 0 0-.336.334v.666c0 .184.15.334.336.334h3.36c.186 0 .337-.15.337-.334v-.666a.335.335 0 0 0-.336-.334H6.32Z" clipRule="evenodd"/><path fill={useCurrentColor ? 'currentColor' : '#F6BB46'} d="M1.667 5.067v-3.2c0-.295.238-.534.533-.534h11.6c.294 0 .533.239.533.534v3.2a.533.533 0 0 1-.533.533h-.454V3.333a.67.67 0 0 0-.672-.666H3.326a.67.67 0 0 0-.672.666V5.6H2.2a.533.533 0 0 1-.534-.533Z" opacity=".5"/></svg>;
}

const IconAppKnowledge = React.forwardRef(IconAppKnowledgeComponent);
export default IconAppKnowledge;
