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

function IconMenuKnowledgeComponent(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-menu-knowledge${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 fillRule="evenodd" d="M4.15799 3.333H15.842C16.306 3.333 16.682 3.706 16.682 4.167V17.513C16.681 17.6502 16.6465 17.7851 16.5813 17.9059C16.5162 18.0267 16.4224 18.1297 16.3082 18.2059C16.1941 18.282 16.063 18.3291 15.9265 18.3429C15.7899 18.3567 15.6521 18.3368 15.525 18.285L10.205 15.961C9.99817 15.8775 9.76676 15.8789 9.56099 15.965L4.48499 18.265C4.35773 18.3188 4.21916 18.3404 4.08157 18.3278C3.94398 18.3152 3.81161 18.2689 3.6962 18.193C3.58078 18.117 3.48589 18.0138 3.41991 17.8924C3.35394 17.771 3.31894 17.6352 3.31799 17.497V4.167C3.31799 3.707 3.69399 3.333 4.15799 3.333ZM7.89999 8.342C7.8451 8.34174 7.79069 8.35229 7.73988 8.37305C7.68906 8.39382 7.64284 8.42438 7.60384 8.46301C7.56483 8.50164 7.53382 8.54758 7.51258 8.59819C7.49133 8.6488 7.48026 8.70311 7.47999 8.758V9.592C7.47999 9.822 7.66799 10.008 7.89999 10.008H12.1C12.333 10.008 12.52 9.822 12.52 9.592V8.758C12.5197 8.70311 12.5087 8.6488 12.4874 8.59819C12.4662 8.54758 12.4352 8.50164 12.3962 8.46301C12.3572 8.42438 12.3109 8.39382 12.2601 8.37305C12.2093 8.35229 12.1549 8.34174 12.1 8.342H7.89999Z" clipRule="evenodd"/><path d="M2.08301 6.333V2.333C2.08301 1.965 2.38201 1.667 2.75001 1.667H17.25C17.618 1.667 17.917 1.965 17.917 2.333V6.333C17.917 6.5099 17.8467 6.67955 17.7216 6.80464C17.5966 6.92973 17.4269 7 17.25 7H16.682V4.167C16.6816 4.05708 16.6596 3.94832 16.6171 3.84692C16.5747 3.74552 16.5127 3.65347 16.4347 3.57603C16.3567 3.49858 16.2642 3.43726 16.1625 3.39556C16.0608 3.35386 15.9519 3.33261 15.842 3.333H4.15801C4.04809 3.33261 3.93917 3.35386 3.83747 3.39556C3.73577 3.43726 3.64328 3.49858 3.56528 3.57603C3.48728 3.65347 3.42529 3.74552 3.38287 3.84692C3.34044 3.94832 3.3184 4.05708 3.31801 4.167V7H2.75001C2.57311 7 2.40345 6.92973 2.27837 6.80464C2.15328 6.67955 2.08301 6.5099 2.08301 6.333Z" opacity=".5"/></svg>;
}

const IconMenuKnowledge = React.forwardRef(IconMenuKnowledgeComponent);
export default IconMenuKnowledge;
