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

function IconEmptyFileComponent(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-empty-file${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="M3.5 1.33A1.5 1.5 0 0 0 2 2.83v10.33a1.5 1.5 0 0 0 1.5 1.5h9a1.5 1.5 0 0 0 1.5-1.5v-7.5a1.5 1.5 0 0 0-.486-1.106l-3.084-2.83a1.5 1.5 0 0 0-1.014-.394H3.5Zm6.167 5.487H6.333A.333.333 0 0 0 6 7.15v.667c0 .184.15.333.333.333h3.334A.333.333 0 0 0 10 7.817V7.15a.333.333 0 0 0-.333-.333Zm0 3.333H6.333a.333.333 0 0 0-.333.334v.666c0 .184.15.334.333.334h3.334c.184 0 .333-.15.333-.334v-.666a.333.333 0 0 0-.333-.334Z" clipRule="evenodd"/></svg>;
}

const IconEmptyFile = React.forwardRef(IconEmptyFileComponent);
export default IconEmptyFile;
