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

function IconExportComponent(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-export${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 fillRule="evenodd" d="M3.75 10.5c.23 0 .417.187.417.417v1.25h7.666v-1.25c0-.23.187-.417.417-.417h.833c.23 0 .417.187.417.417V13c0 .46-.373.834-.833.834H3.333A.833.833 0 0 1 2.5 13v-2.083c0-.23.187-.417.417-.417h.833Zm4.646-8.21 3.125 3.125a.417.417 0 0 1 0 .59l-.59.588a.417.417 0 0 1-.589 0L8.833 5.084V9.28c0 .23-.186.417-.416.417h-.834a.417.417 0 0 1-.416-.417V5.286L5.86 6.592a.417.417 0 0 1-.589 0l-.59-.589a.417.417 0 0 1 0-.59L7.808 2.29a.417.417 0 0 1 .589 0Z" clipRule="evenodd"/></svg>;
}

const IconExport = React.forwardRef(IconExportComponent);
export default IconExport;
