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

function IconCardInfoComponent(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-Card_info${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 opacity=".5" d="M18.4347 5L5 18.4347V7.11111C5 5.94518 5.94518 5 7.11111 5H18.4347Z"/><path fillRule="evenodd" clipRule="evenodd" d="M5 40.8889V18.4347L18.4347 5H40.8889C42.0548 5 43 5.94518 43 7.11111V40.8889C43 42.0548 42.0548 43 40.8889 43H7.11111C5.94518 43 5 42.0548 5 40.8889ZM29.2778 19.25C29.2778 22.1704 26.9204 24.5278 24 24.5278C21.0796 24.5278 18.7222 22.1704 18.7222 19.25C18.7222 16.3296 21.0796 13.9722 24 13.9722C26.9204 13.9722 29.2778 16.3296 29.2778 19.25ZM13.4444 32.2685C13.4444 28.75 20.4815 26.8148 24 26.8148C27.5185 26.8148 34.5556 28.75 34.5556 32.2685V34.0278H13.4444V32.2685Z"/><path fillRule="evenodd" clipRule="evenodd" d="M5 40.8889V18.4347L18.4347 5H40.8889C42.0548 5 43 5.94518 43 7.11111V40.8889C43 42.0548 42.0548 43 40.8889 43H7.11111C5.94518 43 5 42.0548 5 40.8889ZM29.2778 19.25C29.2778 22.1704 26.9204 24.5278 24 24.5278C21.0796 24.5278 18.7222 22.1704 18.7222 19.25C18.7222 16.3296 21.0796 13.9722 24 13.9722C26.9204 13.9722 29.2778 16.3296 29.2778 19.25ZM13.4444 32.2685C13.4444 28.75 20.4815 26.8148 24 26.8148C27.5185 26.8148 34.5556 28.75 34.5556 32.2685V34.0278H13.4444V32.2685Z"/></svg>;
}

const IconCardInfo = React.forwardRef(IconCardInfoComponent);
export default IconCardInfo;
