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

function IconBasicDatabaseComponent(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-basic_database${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 22 22" fill={useCurrentColor ? 'currentColor' : '#000'} xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><path d="M9.51562 11.8252C9.87957 11.8252 10.1748 12.1204 10.1748 12.4844V15.5381C10.1746 17.5882 8.51296 19.2498 6.46289 19.25C4.41264 19.25 2.75019 17.5883 2.75 15.5381C2.75 13.4878 4.41252 11.8252 6.46289 11.8252H9.51562ZM15.5371 11.8252C17.5875 11.8252 19.25 13.4877 19.25 15.5381C19.2499 17.5884 17.5874 19.25 15.5371 19.25C13.4871 19.2498 11.8253 17.5882 11.8252 15.5381V12.4844C11.8252 12.1204 12.1204 11.8252 12.4844 11.8252H15.5371ZM6.46289 2.75C8.51308 2.75021 10.1748 4.41265 10.1748 6.46289V9.5166C10.1747 9.88043 9.87947 10.1758 9.51562 10.1758H6.46289C4.41255 10.1758 2.75005 8.51321 2.75 6.46289C2.75 4.41252 4.41253 2.75 6.46289 2.75ZM15.5371 2.75C17.5875 2.75 19.25 4.41252 19.25 6.46289C19.2498 8.51309 17.5874 10.1748 15.5371 10.1748H12.4844C12.1204 10.1748 11.8252 9.87957 11.8252 9.51562V6.46289C11.8252 4.41262 13.4869 2.75015 15.5371 2.75Z"/></svg>;
}

const IconBasicDatabase = React.forwardRef(IconBasicDatabaseComponent);
export default IconBasicDatabase;
