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

function IconParagraphComponent(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-paragraph${loadingKls} ${className}`} width={width} height={height} xmlns="http://www.w3.org/2000/svg" fill={useCurrentColor ? 'currentColor' : '#000'} viewBox="0 0 24 26" {...rest} ref={ref}><path fillRule="evenodd" d="M6.426 4.656a2.5 2.5 0 1 0-2.925 3.885v10.455c.043 1.469.862 2.756 2.142 2.756H7.5a.5.5 0 0 0 .5-.5V20.25a.5.5 0 0 0-.5-.5H5.737l-.015-.019-.033-.051-.037-.066a1.704 1.704 0 0 1-.152-.74V14.25h2a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5h-2V8.544A2.5 2.5 0 0 0 6.501 4.75l-.075-.095ZM22.001 20.25a.5.5 0 0 0-.502-.5H11a.5.5 0 0 0-.499.5v1a.5.5 0 0 0 .5.5h10.5a.502.502 0 0 0 .5-.5v-1Zm-.502-8a.5.5 0 0 1 .502.5v1a.5.5 0 0 1-.502.5H11a.5.5 0 0 1-.499-.5v-1a.5.5 0 0 1 .5-.5h10.5Zm.502-6.5a.5.5 0 0 0-.502-.5H11a.5.5 0 0 0-.499.5v1a.5.5 0 0 0 .5.5h10.5a.5.5 0 0 0 .5-.5v-1Z" clipRule="evenodd"/></svg>;
}

const IconParagraph = React.forwardRef(IconParagraphComponent);
export default IconParagraph;
