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

function IconRougeLComponent(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-rouge-l${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 18 18" fill={useCurrentColor ? 'currentColor' : '#000'} xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><path fillRule="evenodd" clipRule="evenodd" d="M1 3.96629C1 2.32805 2.32805 1 3.96629 1H14.0337C15.6719 1 17 2.32805 17 3.96629V14.0337C17 15.6719 15.6719 17 14.0337 17H3.96629C2.32805 17 1 15.6719 1 14.0337V3.96629ZM3.96629 2.61798C3.22164 2.61798 2.61798 3.22164 2.61798 3.96629V14.0337C2.61798 14.7783 3.22164 15.382 3.96629 15.382H14.0337C14.7783 15.382 15.382 14.7783 15.382 14.0337V3.96629C15.382 3.22164 14.7783 2.61798 14.0337 2.61798H3.96629ZM14.5728 11.713C14.7634 11.713 14.9211 11.7754 15.0458 11.9C15.1778 12.0174 15.2438 12.1714 15.2438 12.362C15.2438 12.5454 15.1778 12.6994 15.0458 12.824C14.9211 12.9414 14.7634 13 14.5728 13H10.9978C10.8071 13 10.6458 12.9377 10.5138 12.813C10.3891 12.681 10.3268 12.5197 10.3268 12.329V5.97105C10.3268 5.78038 10.3928 5.62272 10.5248 5.49805C10.6568 5.36605 10.8254 5.30005 11.0308 5.30005C11.2068 5.30005 11.3608 5.36605 11.4928 5.49805C11.6321 5.62272 11.7018 5.78038 11.7018 5.97105V11.713H14.5728ZM3.567 12.813C3.72833 12.9377 3.91166 13 4.117 13C4.30033 13 4.44333 12.9377 4.546 12.813C4.64866 12.681 4.7 12.5197 4.7 12.329V10.195H6.757C6.92566 10.195 7.07233 10.217 7.197 10.261C7.32166 10.2977 7.42433 10.3564 7.505 10.437C7.58566 10.5104 7.648 10.602 7.692 10.712C7.736 10.8147 7.758 10.9284 7.758 11.0531C7.758 11.4344 7.79466 11.746 7.868 11.988C7.94866 12.23 8.05133 12.4244 8.176 12.571C8.30066 12.7104 8.42533 12.8167 8.55 12.89C8.63066 12.934 8.73333 12.9707 8.858 13C8.98266 13.022 9.10733 13.022 9.232 13C9.35666 12.9707 9.45933 12.9084 9.54 12.813C9.66466 12.6737 9.705 12.516 9.661 12.34C9.62433 12.1567 9.52533 12.0174 9.364 11.922C9.26866 11.8707 9.20266 11.7974 9.166 11.702C9.13666 11.6067 9.11466 11.4894 9.1 11.35C9.09266 11.2107 9.07433 11.0494 9.045 10.866C9.03033 10.668 8.98266 10.4847 8.902 10.316C8.82866 10.14 8.72233 9.97872 8.583 9.83205C8.49892 9.73396 8.39997 9.6448 8.28615 9.56457C8.44119 9.46351 8.58414 9.34001 8.715 9.19405C8.913 8.98138 9.067 8.74305 9.177 8.47905C9.29433 8.21505 9.353 7.94372 9.353 7.66505C9.353 7.20305 9.25033 6.79605 9.045 6.44405C8.83966 6.08472 8.56833 5.80605 8.231 5.60805C7.901 5.40272 7.54533 5.30005 7.164 5.30005H3.996C3.80533 5.30005 3.644 5.36605 3.512 5.49805C3.38733 5.62272 3.325 5.78038 3.325 5.97105V12.329C3.325 12.5197 3.40566 12.681 3.567 12.813ZM4.7 9.06205H7.109C7.241 9.06205 7.36933 9.00338 7.494 8.88605C7.61866 8.76138 7.72133 8.59638 7.802 8.39105C7.88266 8.17838 7.923 7.94738 7.923 7.69805C7.923 7.37538 7.835 7.10772 7.659 6.89505C7.49033 6.67505 7.307 6.56505 7.109 6.56505H4.7V9.06205Z"/></svg>;
}

const IconRougeL = React.forwardRef(IconRougeLComponent);
export default IconRougeL;
