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

function IconPromptFileComponent(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_file${loadingKls} ${className}`} width={width} height={height} xmlns="http://www.w3.org/2000/svg" fill={useCurrentColor ? 'currentColor' : '#000'} viewBox="0 0 24 24" {...rest} ref={ref}><path fillRule="evenodd" d="M18.267 21.333a2.4 2.4 0 0 0 2.4-2.4V8.681a2.4 2.4 0 0 0-.727-1.721l-3.718-3.614a2.4 2.4 0 0 0-1.673-.68H5.733a2.4 2.4 0 0 0-2.4 2.4v13.867a2.4 2.4 0 0 0 2.4 2.4h12.534Zm-10.834-10a.9.9 0 0 1 .9-.9h7.334a.9.9 0 0 1 0 1.8H8.333a.9.9 0 0 1-.9-.9Zm.9 3.1a.9.9 0 1 0 0 1.8h7.334a.9.9 0 0 0 0-1.8H8.333Z" clipRule="evenodd"/></svg>;
}

const IconPromptFile = React.forwardRef(IconPromptFileComponent);
export default IconPromptFile;
