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

function IconHBookComponent(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-H-Book${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 24 24" fill={useCurrentColor ? 'currentColor' : '#000'} xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><path fillRule="evenodd" clipRule="evenodd" d="M4 6.81928V17.626C5.05367 17.2224 6.24769 17 7.5 17C8.75231 17 9.94633 17.2224 11 17.626V6.81928C10.0605 6.31657 8.84809 6 7.5 6C6.15191 6 4.9395 6.31657 4 6.81928ZM13 6.81928V17.626C14.0537 17.2224 15.2477 17 16.5 17C17.7523 17 18.9463 17.2224 20 17.626V6.81928C19.0605 6.31657 17.8481 6 16.5 6C15.1519 6 13.9395 6.31657 13 6.81928ZM12 5.0863C10.7327 4.39454 9.16806 4 7.5 4C5.57992 4 3.7969 4.52277 2.44662 5.41985C2.16766 5.60518 2 5.91786 2 6.25278V19.2528C2 19.6213 2.20267 19.9599 2.52744 20.1341C2.85221 20.3082 3.24643 20.2896 3.55338 20.0857C4.53889 19.431 5.92709 19 7.5 19C9.07291 19 10.4611 19.431 11.4466 20.0857C11.7819 20.3085 12.2181 20.3085 12.5534 20.0857C13.5389 19.431 14.9271 19 16.5 19C18.0729 19 19.4611 19.431 20.4466 20.0857C20.7536 20.2896 21.1478 20.3082 21.4726 20.1341C21.7973 19.9599 22 19.6213 22 19.2528V6.25278C22 5.91786 21.8323 5.60518 21.5534 5.41985C20.2031 4.52277 18.4201 4 16.5 4C14.8319 4 13.2673 4.39454 12 5.0863Z"/></svg>;
}

const IconHBook = React.forwardRef(IconHBookComponent);
export default IconHBook;
