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

function IconRmComponent(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-rm${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=".4" fillRule="evenodd" clipRule="evenodd" d="M6.65582 23.9008V29.4848C6.65582 29.9544 7.12837 30.2768 7.56563 30.1055L13.4634 27.7955L6.65582 23.9008ZM18.5366 27.7959L24.4332 30.1055C24.8704 30.2768 25.343 29.9544 25.343 29.4848V23.902L18.5366 27.7959Z"/><path fillRule="evenodd" clipRule="evenodd" d="M16.6625 1.19518C16.2523 0.960494 15.7485 0.960494 15.3383 1.19518L4.24801 7.54C3.8329 7.77748 3.57678 8.21908 3.57678 8.69732V21.366C3.57678 21.8442 3.83291 22.2858 4.24801 22.5233L15.3383 28.8681C15.7485 29.1028 16.2523 29.1028 16.6625 28.8681L27.7528 22.5233C28.1679 22.2858 28.424 21.8442 28.424 21.366V8.69732C28.424 8.21908 28.1679 7.77748 27.7528 7.54L16.6625 1.19518ZM16.1027 7.73334H11.1146V22.3169H14.5401V17.1686H15.5125L17.575 22.3169H21.251V22.1666L18.7937 16.2711C19.1125 16.0851 19.4008 15.8701 19.6584 15.6261C20.039 15.2588 20.3328 14.7947 20.5398 14.2338C20.7535 13.6729 20.8603 12.9751 20.8603 12.1404C20.8603 11.1789 20.6667 10.3709 20.2794 9.71654C19.8988 9.06215 19.3512 8.56802 18.6368 8.23415C17.9223 7.90027 17.0776 7.73334 16.1027 7.73334ZM14.5401 14.4542H16.0225C16.3364 14.4542 16.5968 14.374 16.8038 14.2138C17.0108 14.0535 17.1644 13.8265 17.2645 13.5327C17.3714 13.2322 17.4248 12.875 17.4248 12.461C17.4248 12.0403 17.3747 11.6797 17.2746 11.3792C17.1744 11.0787 17.0275 10.8484 16.8338 10.6881C16.6469 10.5278 16.4032 10.4477 16.1027 10.4477H14.5401V14.4542Z"/></svg>;
}

const IconRm = React.forwardRef(IconRmComponent);
export default IconRm;
