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

function IconEnumerationComponent(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-enumeration${loadingKls} ${className}`} width={width} height={height} xmlns="http://www.w3.org/2000/svg" fill={useCurrentColor ? 'currentColor' : '#000'} viewBox="0 0 24 24" {...rest} ref={ref}><path fillRule="evenodd" d="M18.589 12c.26 0 .47.212.47.47v2.353h2.353c.26 0 .47.212.47.47v.942a.47.47 0 0 1-.47.47H19.06v2.354a.47.47 0 0 1-.47.47h-.942a.47.47 0 0 1-.47-.47v-2.354h-2.354a.47.47 0 0 1-.47-.47v-.941c0-.26.212-.47.47-.47h2.354V12.47c0-.26.212-.47.47-.47h.942Zm-6.119 5.647c.26 0 .472.212.472.47v.942c0 .26-.212.47-.472.47H4a.47.47 0 0 1-.47-.47v-.942c0-.26.211-.47.47-.47h8.47Zm0-6.589c.26 0 .472.212.472.472v.94c0 .26-.212.472-.472.472H4a.47.47 0 0 1-.47-.472v-.94c0-.26.211-.472.47-.472h8.47Zm6.589-6.587c.26 0 .47.21.47.47v.942a.47.47 0 0 1-.47.47H3.999a.47.47 0 0 1-.47-.47V4.94c0-.26.212-.47.47-.47h15.06Z" clipRule="evenodd"/></svg>;
}

const IconEnumeration = React.forwardRef(IconEnumerationComponent);
export default IconEnumeration;
