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

function IconArtifactsCodeComponent(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-artifacts-code${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 fillRule="evenodd" d="M2.066 4.933a2.2 2.2 0 0 1 2.2-2.2h7.467a2.2 2.2 0 0 1 2.2 2.2v6.134a2.2 2.2 0 0 1-2.2 2.2H4.266a2.2 2.2 0 0 1-2.2-2.2V4.933Zm2.2-1a1 1 0 0 0-1 1v6.134a1 1 0 0 0 1 1h7.467a1 1 0 0 0 1-1V4.933a1 1 0 0 0-1-1H4.266Z" clipRule="evenodd"/><path fillRule="evenodd" d="M7.4 6a.6.6 0 0 1 .6-.6h2.666a.6.6 0 1 1 0 1.2H8a.6.6 0 0 1-.6-.6ZM4.733 8a.6.6 0 0 1 .6-.6h5.333a.6.6 0 1 1 0 1.2H5.333a.6.6 0 0 1-.6-.6Zm0-2a.6.6 0 0 1 .6-.6H6a.6.6 0 1 1 0 1.2h-.667a.6.6 0 0 1-.6-.6Z" clipRule="evenodd"/></svg>;
}

const IconArtifactsCode = React.forwardRef(IconArtifactsCodeComponent);
export default IconArtifactsCode;
