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

function IconDocumentComponent(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 || 'font';
    const loadingKls = spin ? ` ${prefix}-icon-loading` : '';
    return <svg className={`${prefix}-icon ${prefix}-icon-Document${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 16 16" fill={useCurrentColor ? 'currentColor' : '#000'} xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><path d="M12.667 0.666016C13.4032 0.666191 14 1.26275 14 1.99902V13.999C14 14.7353 13.4032 15.3319 12.667 15.332H3.33301C2.59678 15.3319 2 14.7353 2 13.999V1.99902C2 1.26275 2.59678 0.666192 3.33301 0.666016H12.667ZM3.33301 13.999H12.667V1.99902H3.33301V13.999ZM10.667 10.332C11.035 10.3322 11.333 10.6309 11.333 10.999C11.333 11.3671 11.035 11.6658 10.667 11.666H5.33301C4.96497 11.6658 4.66699 11.3671 4.66699 10.999C4.66699 10.6309 4.96497 10.3322 5.33301 10.332H10.667ZM10.667 7.66602C11.0349 7.66619 11.3328 7.9641 11.333 8.33203C11.333 8.70011 11.035 8.99885 10.667 8.99902H5.33301C4.96497 8.99885 4.66699 8.70011 4.66699 8.33203C4.66717 7.9641 4.96508 7.66619 5.33301 7.66602H10.667ZM8 4.99902C8.36819 4.99902 8.66699 5.29783 8.66699 5.66602C8.66682 6.03406 8.36808 6.33203 8 6.33203H5.33301C4.96508 6.33186 4.66717 6.03395 4.66699 5.66602C4.66699 5.29793 4.96497 4.9992 5.33301 4.99902H8Z"/></svg>;
}

const IconDocument = React.forwardRef(IconDocumentComponent);
export default IconDocument;
