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

function IconIconLayoutComponent(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 || 'hkgai';
    const loadingKls = spin ? ` ${prefix}-icon-loading` : '';
    return <svg className={`${prefix}-icon ${prefix}-icon-icon-layout${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 24 24" fill={useCurrentColor ? 'currentColor' : '#000'} xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><path fillRule="evenodd" clipRule="evenodd" d="M4 21C2.89543 21 2 20.1046 2 19L2 5C2 3.89543 2.89543 3 4 3L20 3C21.1046 3 22 3.89543 22 5L22 19C22 20.1046 21.1046 21 20 21L4 21ZM4 5L4 19L8.5 19L8.5 5L4 5ZM10.5 5L10.5 19L20 19L20 5L10.5 5Z"/></svg>;
}

const IconIconLayout = React.forwardRef(IconIconLayoutComponent);
export default IconIconLayout;
