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

function IconMermaidDownloadComponent(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-mermaid-download${loadingKls} ${className}`} width={width} height={height} xmlns="http://www.w3.org/2000/svg" fill={useCurrentColor ? 'currentColor' : '#000'} viewBox="0 0 16 16" {...rest} ref={ref}><path d="M3.553 10.814a.27.27 0 0 1 .27.27v1.492h8.448v-1.491a.27.27 0 0 1 .272-.271h.881l.055.006a.27.27 0 0 1 .216.265v2.204l-.003.072a.712.712 0 0 1-.709.639h-9.87a.712.712 0 0 1-.713-.711v-2.204a.27.27 0 0 1 .271-.271h.882ZM8.488 2l.055.005a.271.271 0 0 1 .216.266v5.692l.29-.288 1.595-1.596a.272.272 0 0 1 .384 0l.623.624a.271.271 0 0 1 0 .384l-3.305 3.305a.271.271 0 0 1-.383 0L4.657 7.087a.271.271 0 0 1 0-.384l.623-.624a.272.272 0 0 1 .385 0l1.67 1.672V2.27c0-.15.122-.27.271-.271h.882Z"/></svg>;
}

const IconMermaidDownload = React.forwardRef(IconMermaidDownloadComponent);
export default IconMermaidDownload;
