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

function IconWordSmallColorComponent(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-word_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' : '#8CA9E0'} fillOpacity=".2"/><path d="M3.13785 5.77798H5.24385L7.20585 12.816L9.11385 5.77798H10.8779L12.7859 12.816L14.7479 5.77798H16.8539L13.7039 15.084H11.9399L9.99585 8.11798L8.05185 15.084H6.28785L3.13785 5.77798Z" fill={useCurrentColor ? 'currentColor' : '#8CA9E0'}/></svg>;
}

const IconWordSmallColor = React.forwardRef(IconWordSmallColorComponent);
export default IconWordSmallColor;
