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

function IconFullscreenComponent(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-fullscreen${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 48 48" fill={useCurrentColor ? 'currentColor' : '#000'} xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><path fillRule="evenodd" clipRule="evenodd" d="M4 6a2 2 0 012-2h9a1 1 0 011 1v2a1 1 0 01-1 1H8v7a1 1 0 01-1 1H5a1 1 0 01-1-1V6zm40 36a2 2 0 01-2 2h-9a1 1 0 01-1-1v-2a1 1 0 011-1h7v-7a1 1 0 011-1h2a1 1 0 011 1v9zM6 44a2 2 0 01-2-2v-9a1 1 0 011-1h2a1 1 0 011 1v7h7a1 1 0 011 1v2a1 1 0 01-1 1H6zM42 4a2 2 0 012 2v9a1 1 0 01-1 1h-2a1 1 0 01-1-1V8h-7a1 1 0 01-1-1V5a1 1 0 011-1h9z"/></svg>;
}

const IconFullscreen = React.forwardRef(IconFullscreenComponent);
export default IconFullscreen;
