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

function IconPlainTextComponent(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 || 'font';
    const loadingKls = spin ? ` ${prefix}-icon-loading` : '';
    return <svg className={`${prefix}-icon ${prefix}-icon-PlainText${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 14 14" fill={useCurrentColor ? 'currentColor' : '#000'} xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><path d="M6.56219 11.666V3.49902H2.91669C2.59452 3.49902 2.33368 3.23818 2.33368 2.91602C2.33368 2.59385 2.59452 2.33301 2.91669 2.33301H11.3747C11.6969 2.33301 11.9587 2.59385 11.9587 2.91602C11.9587 3.23818 11.6969 3.49902 11.3747 3.49902H7.72919V11.666C7.72919 11.9881 7.4682 12.2488 7.14618 12.249C6.82401 12.249 6.56219 11.9882 6.56219 11.666Z"/></svg>;
}

const IconPlainText = React.forwardRef(IconPlainTextComponent);
export default IconPlainText;
