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

function IconCloudEngineComponent(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-cloud-engine${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="M42.5 5a2 2 0 012 2v35a2 2 0 01-2 2h-38a2 2 0 01-2-2V7a2 2 0 012-2h38zm-2 28h-34v7h34v-7zM36 35a1 1 0 011 1v2a1 1 0 01-1 1h-2a1 1 0 01-1-1v-2a1 1 0 011-1h2zm4.5-14h-34v8h34v-8zM34 23h2a1 1 0 01.993.883L37 24v2a1 1 0 01-.883.993L36 27h-2a1 1 0 01-.993-.883L33 26v-2a1 1 0 01.883-.993L34 23h2-2zm6.5-14h-34v8h34V9zM36 11a1 1 0 01.993.883L37 12v2a1 1 0 01-.883.993L36 15h-2a1 1 0 01-.993-.883L33 14v-2a1 1 0 01.883-.993L34 11h2z"/></svg>;
}

const IconCloudEngine = React.forwardRef(IconCloudEngineComponent);
export default IconCloudEngine;
