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

function IconRlComponent(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-rl${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 32 32" fill={useCurrentColor ? 'currentColor' : '#000'} xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><path opacity=".5" fillRule="evenodd" clipRule="evenodd" d="M8.04247 3.33337C7.37973 3.33337 6.84247 3.87063 6.84247 4.53338V8.17004H23.9543C24.6171 8.17004 25.1543 8.7073 25.1543 9.37004V23.0163H27.4668C28.1295 23.0163 28.6668 22.4791 28.6668 21.8163V4.53337C28.6668 3.87063 28.1295 3.33337 27.4668 3.33337H8.04247Z"/><path fillRule="evenodd" clipRule="evenodd" d="M3.54597 8.68636C3.41187 8.88007 3.33331 9.11515 3.33331 9.36858V12.3696L11.3 18.0871L17.2932 15.6869C17.838 15.4687 18.4551 15.5317 18.9447 15.8554L25.1576 19.964V9.36858C25.1576 8.70584 24.6204 8.16858 23.9576 8.16858H7.09172L10.3634 10.3761C10.6114 10.2774 10.8819 10.2232 11.1651 10.2232C12.3637 10.2232 13.3354 11.1949 13.3354 12.3935C13.3354 13.5921 12.3637 14.5638 11.1651 14.5638C9.96643 14.5638 8.99475 13.5921 8.99475 12.3935L8.99479 12.3797H8.97219L3.54597 8.68636ZM25.1576 23.0272L17.8703 18.2082L11.8596 20.6153C11.2923 20.8425 10.6483 20.7644 10.1518 20.4081L3.33331 15.5146V27.4667C3.33331 28.1295 3.87057 28.6667 4.53331 28.6667H22.5138L18.0661 25.6105C17.8304 25.6983 17.5753 25.7463 17.3089 25.7463C16.1103 25.7463 15.1386 24.7746 15.1386 23.576C15.1386 22.3773 16.1103 21.4057 17.3089 21.4057C18.5076 21.4057 19.4792 22.3773 19.4792 23.576L19.4792 23.5937L19.5009 23.59L25.1551 27.5446C25.1568 27.5188 25.1576 27.4929 25.1576 27.4667V23.0272Z"/><path opacity=".4" fillRule="evenodd" clipRule="evenodd" d="M7.09169 8.16858H4.53331C4.124 8.16858 3.76254 8.37351 3.54596 8.68638L8.97217 12.3797H8.99478C9.00044 11.4702 9.56557 10.6934 10.3634 10.3761L7.09169 8.16858ZM3.33331 15.5147V12.3697L11.3 18.0871L17.2931 15.6869C17.8379 15.4688 18.4551 15.5317 18.9446 15.8554L25.1576 19.964V23.0273L17.8703 18.2082L11.8596 20.6154C11.2923 20.8425 10.6483 20.7644 10.1518 20.4081L3.33331 15.5147ZM25.1551 27.5446C25.115 28.171 24.5942 28.6667 23.9576 28.6667H22.5138L18.0661 25.6105C18.8861 25.3052 19.4717 24.5184 19.4792 23.5937L19.5009 23.59L25.1551 27.5446Z"/></svg>;
}

const IconRl = React.forwardRef(IconRlComponent);
export default IconRl;
