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

function IconArchiveComponent(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-archive${loadingKls} ${className}`} width={width} height={height} xmlns="http://www.w3.org/2000/svg" fill={useCurrentColor ? 'currentColor' : '#000'} viewBox="0 0 18 18" {...rest} ref={ref}><path fillRule="evenodd" d="M15.75 6.15v9.75a.6.6 0 0 1-.6.6H2.609c-.332 0-.359-.269-.359-.6V2.1a.6.6 0 0 1 .6-.6h8.155a.6.6 0 0 1 .42.17l4.144 4.051a.6.6 0 0 1 .18.43Zm-7.908.795a1.5 1.5 0 0 1-.75 1.3v.778h1.125v1.5H7.092v.923h1.125v1.5h-1.5a1.125 1.125 0 0 1-1.125-1.125V8.245a1.5 1.5 0 1 1 2.25-1.3Zm4.857 3.578h-3v-1.5h3v1.5Zm0 2.423h-3v-1.5h3v1.5Zm0-4.875h-3v-1.5h3v1.5Z" clipRule="evenodd"/></svg>;
}

const IconArchive = React.forwardRef(IconArchiveComponent);
export default IconArchive;
