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

function IconTableComponent(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-table${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="M2.066 4a1.6 1.6 0 0 1 1.6-1.6h2.667a1.6 1.6 0 0 1 1.6 1.6v8a1.6 1.6 0 0 1-1.6 1.6H3.666a1.6 1.6 0 0 1-1.6-1.6V4Zm1.6-.4a.4.4 0 0 0-.4.4v8c0 .22.18.4.4.4h2.667a.4.4 0 0 0 .4-.4V4a.4.4 0 0 0-.4-.4H3.666Zm5.067.4a1.6 1.6 0 0 1 1.6-1.6h2a1.6 1.6 0 0 1 1.6 1.6v2.667a1.6 1.6 0 0 1-1.6 1.6h-2a1.6 1.6 0 0 1-1.6-1.6V4Zm1.6-.4a.4.4 0 0 0-.4.4v2.667c0 .22.18.4.4.4h2a.4.4 0 0 0 .4-.4V4a.4.4 0 0 0-.4-.4h-2Zm0 5.467a1.6 1.6 0 0 0-1.6 1.6V12a1.6 1.6 0 0 0 1.6 1.6h2a1.6 1.6 0 0 0 1.6-1.6v-1.333a1.6 1.6 0 0 0-1.6-1.6h-2Zm-.4 1.6a.4.4 0 0 1 .4-.4h2a.4.4 0 0 1 .4.4V12a.4.4 0 0 1-.4.4h-2a.4.4 0 0 1-.4-.4v-1.333Z" clipRule="evenodd"/></svg>;
}

const IconTable = React.forwardRef(IconTableComponent);
export default IconTable;
