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

function IconBinaryComponent(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-Binary${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 14 14" fill={useCurrentColor ? 'currentColor' : '#000'} xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><path d="M7.5838 11.958V2.33301C7.5838 2.01084 7.84464 1.75 8.16681 1.75H11.3748C11.697 1.75 11.9588 2.01084 11.9588 2.33301C11.9588 2.65517 11.697 2.91602 11.3748 2.91602H8.74982V6.5625H11.3748C11.697 6.5625 11.9588 6.82334 11.9588 7.14551C11.9588 7.46767 11.697 7.72852 11.3748 7.72852H8.74982V11.958C8.74982 12.2802 8.48898 12.541 8.16681 12.541C7.84464 12.541 7.5838 12.2802 7.5838 11.958ZM5.8338 1.75C6.15575 1.75025 6.41681 2.011 6.41681 2.33301C6.41681 2.65502 6.15575 2.91576 5.8338 2.91602H4.9588V11.083H5.8338C6.15564 11.0833 6.41663 11.3442 6.41681 11.666C6.41681 11.988 6.15575 12.2497 5.8338 12.25H2.91681C2.59464 12.25 2.3338 11.9882 2.3338 11.666C2.33398 11.344 2.59475 11.083 2.91681 11.083H3.79181V2.91602H2.91681C2.59464 2.91602 2.3338 2.65517 2.3338 2.33301C2.3338 2.01084 2.59464 1.75 2.91681 1.75H5.8338Z"/></svg>;
}

const IconBinary = React.forwardRef(IconBinaryComponent);
export default IconBinary;
