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

function IconBlockchainComponent(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-blockchain${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 48 48" fill={useCurrentColor ? 'currentColor' : '#000'} xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><path fillRule="evenodd" clipRule="evenodd" d="M32 5a2 2 0 00-2-2H4a2 2 0 00-2 2v26a2 2 0 002 2h12v10a2 2 0 002 2h26a2 2 0 002-2V17a2 2 0 00-2-2H32V5zM6 7h22v8H18a2 2 0 00-2 2v8h4v-6h22v22H20v-8h10a2 2 0 002-2v-8h-4v6H6V7z"/></svg>;
}

const IconBlockchain = React.forwardRef(IconBlockchainComponent);
export default IconBlockchain;
