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

function IconAgentFileComponent(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-agent_file${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}><g clipPath="url(#svg_481e034e60__clip0_36927_1120675)"><path d="M9.05139 1C9.66996 1.00013 10.2633 1.2453 10.7008 1.68262L12.8893 3.87109C13.3266 4.30857 13.5718 4.90194 13.5719 5.52051V12.667C13.5719 13.9557 12.5276 15 11.2389 15H4.73303C3.44445 14.9998 2.40004 13.9556 2.40002 12.667V3.33301C2.40007 2.04441 3.44447 1.00018 4.73303 1H9.05139ZM4.73303 2.27246C4.14742 2.27264 3.67253 2.74736 3.67249 3.33301V12.667C3.6725 13.2527 4.1474 13.7274 4.73303 13.7275H11.2389C11.8246 13.7275 12.2994 13.2527 12.2994 12.667V5.52051C12.2993 5.23937 12.1877 4.96931 11.9889 4.77051L9.80139 2.58301C9.60259 2.38421 9.33253 2.27259 9.05139 2.27246H4.73303ZM7.53577 5.42871C7.7843 5.18018 8.18763 5.18018 8.43616 5.42871L10.5573 7.5498C10.8058 7.79834 10.8058 8.20166 10.5573 8.4502C10.3088 8.69819 9.90626 8.69822 9.65784 8.4502L8.62366 7.41602L8.62268 10.8281C8.62257 11.1796 8.33744 11.4649 7.98596 11.4648C7.63449 11.4647 7.35011 11.1796 7.35022 10.8281L7.3512 7.41406L6.31506 8.4502C6.06658 8.69854 5.66317 8.69852 5.41467 8.4502C5.16619 8.20171 5.16627 7.79835 5.41467 7.5498L7.53577 5.42871Z"/></g><defs><clipPath id="svg_481e034e60__clip0_36927_1120675"><path d="M0 0H16V16H0z"/></clipPath></defs></svg>;
}

const IconAgentFile = React.forwardRef(IconAgentFileComponent);
export default IconAgentFile;
