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

function IconEditNewComponent(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-edit_new${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 24 24" fill={useCurrentColor ? 'currentColor' : '#000'} xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><path fillRule="evenodd" clipRule="evenodd" d="M16.2636 3.57066C15.5216 2.82866 14.3185 2.82866 13.5765 3.57066L4.89677 12.2504C4.63422 12.513 4.48672 12.8691 4.48672 13.2404V15.9603C4.48672 16.7554 5.13129 17.3999 5.9264 17.3999H8.64628C9.01758 17.3999 9.37367 17.2524 9.63623 16.9899L18.316 8.31012C19.058 7.56812 19.058 6.36511 18.316 5.62311L16.2636 3.57066ZM14.8493 4.84345C14.8884 4.8044 14.9517 4.8044 14.9908 4.84345L17.0432 6.8959C17.0823 6.93496 17.0823 6.99827 17.0432 7.03732L8.48059 15.5999H6.28672V13.4061L14.8493 4.84345ZM4.5 19.5999C4.00294 19.5999 3.6 20.0029 3.6 20.4999C3.6 20.997 4.00294 21.3999 4.5 21.3999H19.5C19.9971 21.3999 20.4 20.997 20.4 20.4999C20.4 20.0029 19.9971 19.5999 19.5 19.5999H4.5Z"/></svg>;
}

const IconEditNew = React.forwardRef(IconEditNewComponent);
export default IconEditNew;
