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

function IconPromptGeneralComponent(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-prompt_general${loadingKls} ${className}`} width={width} height={height} xmlns="http://www.w3.org/2000/svg" fill={useCurrentColor ? 'currentColor' : '#000'} viewBox="0 0 16 16" {...rest} ref={ref}><path d="M13.764 1c.684 0 1.24.555 1.24 1.24v11.524a1.24 1.24 0 0 1-1.24 1.24H2.24A1.24 1.24 0 0 1 1 13.764V2.24C1 1.555 1.555 1 2.24 1h11.524ZM2.199 5.412l.001 8.352c0 .022.018.04.04.04h1.961V5.41L2.2 5.412ZM5.4 5.41v8.395h8.364a.04.04 0 0 0 .04-.04V5.4L5.4 5.41Zm5.312.81a.6.6 0 0 1 .754.078l.96.96.48.48a.599.599 0 1 1-.847.848l-.416-.416v3.036a.6.6 0 0 1-.601.6h-2.87l.413.414a.599.599 0 1 1-.848.847l-.48-.48-.96-.96a.6.6 0 0 1 0-.848l.96-.96.48-.48a.6.6 0 1 1 .848.848l-.419.42h2.276v-2.44l-.417.417a.599.599 0 1 1-.847-.848l.48-.48.96-.96.094-.077ZM2.24 2.2a.042.042 0 0 0-.04.041v1.972l2-.003V2.2H2.24ZM5.4 4.21l8.404-.008v-1.96a.04.04 0 0 0-.04-.042H5.4v2.01Z"/></svg>;
}

const IconPromptGeneral = React.forwardRef(IconPromptGeneralComponent);
export default IconPromptGeneral;
