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

function IconSystemCodePackageComponent(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-system_code-package${loadingKls} ${className}`} width={width} height={height} xmlns="http://www.w3.org/2000/svg" fill={useCurrentColor ? 'currentColor' : '#000'} viewBox="0 0 20 20" {...rest} ref={ref}><path d="M11.77 1.662c.469 0 .921.176 1.267.493l3.856 3.537a1.879 1.879 0 0 1 .607 1.383v9.375a1.875 1.875 0 0 1-1.875 1.875H4.375A1.877 1.877 0 0 1 2.5 16.45V3.537a1.875 1.875 0 0 1 1.875-1.875h7.395ZM9.28 8.47a.75.75 0 0 0-1.06 0l-2.083 2.083a.75.75 0 0 0 0 1.06l2.083 2.084a.75.75 0 0 0 1.06-1.06l-1.553-1.554L9.28 9.53a.75.75 0 0 0 0-1.06Zm2.5 0a.75.75 0 0 0-1.06 1.06l1.553 1.553-1.553 1.554a.75.75 0 0 0 1.06 1.06l2.083-2.084a.75.75 0 0 0 0-1.06L11.78 8.47Z"/></svg>;
}

const IconSystemCodePackage = React.forwardRef(IconSystemCodePackageComponent);
export default IconSystemCodePackage;
