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

function IconRenameComponent(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-rename${loadingKls} ${className}`} width={width} height={height} xmlns="http://www.w3.org/2000/svg" fill={useCurrentColor ? 'currentColor' : '#000'} viewBox="0 0 16 16" {...rest} ref={ref}><path fillRule="evenodd" d="M10.8424 2.38046C10.3477 1.88579 9.54572 1.88579 9.05106 2.38046L3.26454 8.16698C3.0895 8.34201 2.99117 8.57941 2.99117 8.82694V10.6402C2.99117 11.1703 3.42088 11.6 3.95096 11.6H5.76421C6.01174 11.6 6.24914 11.5017 6.42418 11.3266L12.2107 5.5401C12.7054 5.04543 12.7054 4.24342 12.2107 3.74876L10.8424 2.38046ZM9.89959 3.22899C9.92562 3.20295 9.96783 3.20295 9.99387 3.22899L11.3622 4.59729C11.3882 4.62332 11.3882 4.66554 11.3622 4.69157L5.65375 10.4H4.19117V8.9374L9.89959 3.22899ZM3.00002 13.0667C2.66865 13.0667 2.40002 13.3353 2.40002 13.6667C2.40002 13.998 2.66865 14.2667 3.00002 14.2667H13C13.3314 14.2667 13.6 13.998 13.6 13.6667C13.6 13.3353 13.3314 13.0667 13 13.0667H3.00002Z" clipRule="evenodd"/></svg>;
}

const IconRename = React.forwardRef(IconRenameComponent);
export default IconRename;
