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

function IconMarkdownComponent(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-Markdown${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 16 16" fill={useCurrentColor ? 'currentColor' : '#000'} xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><path d="M1.71582 5.16138V10.8384C1.71582 10.9041 1.76905 10.9573 1.83472 10.9573H3.21222C3.27789 10.9573 3.33112 10.9041 3.33112 10.8384V7.92606C3.33112 7.81183 3.47651 7.76332 3.5451 7.85466L4.85135 9.59406C4.89891 9.65739 4.99394 9.65739 5.0415 9.59406L6.34775 7.85466C6.41634 7.76332 6.56173 7.81184 6.56173 7.92606V10.8384C6.56173 10.9041 6.61496 10.9573 6.68063 10.9573H8.05813C8.1238 10.9573 8.17703 10.9041 8.17703 10.8384V5.16138C8.17703 5.09572 8.1238 5.04248 8.05813 5.04248H6.62113C6.58373 5.04248 6.54851 5.06008 6.52606 5.08998L5.0415 7.06681C4.99394 7.13015 4.89891 7.13015 4.85135 7.06681L3.3668 5.08998C3.34434 5.06008 3.30912 5.04248 3.27172 5.04248H1.83472C1.76905 5.04248 1.71582 5.09571 1.71582 5.16138zM9.60557 8.30338L11.7705 10.8498C11.8183 10.906 11.9051 10.9056 11.9524 10.849L14.1221 8.24881C14.1867 8.17138 14.1317 8.05372 14.0308 8.05372H12.7885C12.7228 8.05372 12.6696 8.00049 12.6696 7.93482V5.16138C12.6696 5.09572 12.6164 5.04248 12.5507 5.04248H11.1732C11.1075 5.04248 11.0543 5.09572 11.0543 5.16138V7.98856C11.0543 8.05423 11.0011 8.10746 10.9354 8.10746H9.69616C9.5948 8.10746 9.53992 8.22616 9.60557 8.30338z"/></svg>;
}

const IconMarkdown = React.forwardRef(IconMarkdownComponent);
export default IconMarkdown;
