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

function IconDatabaseComponent(props: OriginIconProps, ref: ForwardedRef<SVGSVGElement>) {
    const { prefix: prefixFromContext } = useContext(Context);
    const { className = '', prefix: prefixFromProps, width = '1em', height = '1em', useCurrentColor = false, spin, ...rest } = props;

    const prefix = prefixFromProps || prefixFromContext || 'hiagent';
    const loadingKls = spin ? ` ${prefix}-icon-loading` : '';
    return <svg className={`${prefix}-icon ${prefix}-icon-database${loadingKls} ${className}`} width={width} height={height} xmlns="http://www.w3.org/2000/svg" fill={useCurrentColor ? 'currentColor' : 'none'} viewBox="0 0 24 24" {...rest} ref={ref}><g><path fill={useCurrentColor ? 'currentColor' : '#40C6F0'} d="M18 0H6a6 6 0 0 0-6 6v12a6 6 0 0 0 6 6h12a6 6 0 0 0 6-6V6a6 6 0 0 0-6-6Z"/><path fill={useCurrentColor ? 'currentColor' : '#fff'} fillRule="evenodd" d="M18 9.467v8.666a.534.534 0 0 1-.533.534H6.319c-.295 0-.319-.24-.319-.534V5.867c0-.295.239-.534.533-.534h7.25c.139 0 .273.055.372.152l3.684 3.6a.535.535 0 0 1 .161.382Zm-7.03.707c0 .493-.267.924-.666 1.155v.692h1v1.333h-1v.82h1v1.333H9.971a1 1 0 0 1-1-1V11.33a1.333 1.333 0 1 1 2-1.155l-.001-.001Zm4.318 3.18H12.62V12.02h2.667v1.333l.001.001Zm0 2.153H12.62v-1.333h2.667v1.333h.001Zm0-4.333H12.62V9.84h2.667v1.334h.001Z" clipRule="evenodd"/></g></svg>;
}

const IconDatabase = React.forwardRef(IconDatabaseComponent);
export default IconDatabase;
