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

function IconKnowledgeWritingComponent(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-knowledge-writing${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}><rect width="20" height="20" fill={useCurrentColor ? 'currentColor' : '#FF9600'} rx="6"/><g fill={useCurrentColor ? 'currentColor' : '#fff'}><path fillRule="evenodd" d="M15.2885 10.9961L15.6637 11.3713C15.7159 11.4226 15.7573 11.4838 15.7855 11.5513C15.8138 11.6188 15.8283 11.6912 15.8283 11.7643C15.8283 11.8375 15.8138 11.9099 15.7855 11.9774C15.7573 12.0449 15.7159 12.1061 15.6637 12.1574L11.988 15.8331H10.826V14.6718L13.7163 11.7794L14.5024 10.9961C14.6068 10.892 14.7481 10.8336 14.8955 10.8336C15.0429 10.8336 15.1842 10.892 15.2885 10.9961Z" clipRule="evenodd"/><path d="M11.5596 4.16699C11.6815 4.16696 11.7986 4.21456 11.8857 4.2998L15.1104 7.4502C15.1546 7.49361 15.1899 7.54537 15.2139 7.60254C15.2379 7.65988 15.2501 7.722 15.25 7.78418V9.39648C15.1371 9.35621 15.0176 9.334 14.8955 9.33398C14.6507 9.33401 14.4144 9.41865 14.2266 9.57227L14.1494 9.64258L13.3633 10.4258L9.61889 14.172C9.43146 14.3595 9.32617 14.6138 9.32617 14.8789V15.833H5.2168C4.95864 15.833 4.75015 15.6246 4.75 15.3672V4.63281C4.75026 4.50935 4.79943 4.39102 4.88672 4.30371C4.97424 4.21633 5.09313 4.16702 5.2168 4.16699H11.5596ZM6.79199 9.88086C6.71482 9.88086 6.64063 9.91139 6.58594 9.96582C6.53127 10.0204 6.50024 10.0947 6.5 10.1719V10.7559C6.5 10.9169 6.63099 11.0469 6.79199 11.0469H9.70801C9.86901 11.0469 10 10.9169 10 10.7559V10.1719C9.99975 10.0947 9.96873 10.0204 9.91406 9.96582C9.85937 9.91139 9.78518 9.88086 9.70801 9.88086H6.79199ZM6.79199 6.96387C6.71461 6.96387 6.64067 6.9951 6.58594 7.0498C6.53121 7.10454 6.50001 7.17846 6.5 7.25586V7.83887C6.5 7.99987 6.63099 8.13086 6.79199 8.13086H9.70801C9.86901 8.13086 10 7.99987 10 7.83887V7.25586C9.99999 7.17846 9.96879 7.10454 9.91406 7.0498C9.85933 6.99511 9.78539 6.96387 9.70801 6.96387H6.79199Z"/></g></svg>;
}

const IconKnowledgeWriting = React.forwardRef(IconKnowledgeWritingComponent);
export default IconKnowledgeWriting;
