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

function IconArtifactsFileComponent(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-artifacts-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 d="M9.004 1.4a2.2 2.2 0 0 1 1.556.644l2.062 2.062c.413.413.645.973.645 1.556V12.4a2.2 2.2 0 0 1-2.2 2.2H4.932a2.2 2.2 0 0 1-2.2-2.2V3.6a2.2 2.2 0 0 1 2.2-2.2h4.07ZM4.933 2.6a1 1 0 0 0-1 1v8.8a1 1 0 0 0 1 1h6.133a1 1 0 0 0 1-1V5.661a1 1 0 0 0-.293-.707L9.711 2.893a1 1 0 0 0-.707-.293H4.933ZM10 10.066a.6.6 0 0 1 0 1.2H6a.601.601 0 0 1 0-1.2h4ZM10 7.4a.6.6 0 0 1 0 1.2H6a.6.6 0 1 1 0-1.2h4Z"/></svg>;
}

const IconArtifactsFile = React.forwardRef(IconArtifactsFileComponent);
export default IconArtifactsFile;
