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

function IconImageSmallColorComponent(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 || 'font';
    const loadingKls = spin ? ` ${prefix}-icon-loading` : '';
    return <svg className={`${prefix}-icon ${prefix}-icon-image_small_color${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><rect width="20" height="20" rx="5" fill={useCurrentColor ? 'currentColor' : '#9C95DF'} fillOpacity=".2"/><path d="M4.99783 10.9578L3.65894 13.816C3.0377 15.1422 4.00557 16.6644 5.47007 16.6644H14.5274C15.9925 16.6644 16.9604 15.141 16.3379 13.8146L13.8284 8.46798C13.4959 7.75948 12.5151 7.69035 12.0865 8.3452L9.72574 11.9519C9.38804 12.4678 8.66841 12.5582 8.21367 12.1417L6.57877 10.6445C6.08108 10.1887 5.2841 10.3466 4.99783 10.9578zM5.89984 4.87982C6.72811 4.87982 7.39959 5.55161 7.39984 6.37982 7.39984 7.20824 6.72828 7.87982 5.89984 7.87982 5.07157 7.87964 4.39984 7.20814 4.39984 6.37982 4.4001 5.55172 5.07172 4.87999 5.89984 4.87982z" fill={useCurrentColor ? 'currentColor' : '#9C95DF'}/></svg>;
}

const IconImageSmallColor = React.forwardRef(IconImageSmallColorComponent);
export default IconImageSmallColor;
