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

function IconPiplconComponent(props: OriginIconProps, ref: ForwardedRef<SVGSVGElement>) {
    const { prefix: prefixFromContext } = useContext(Context);
    const { className = '', prefix: prefixFromProps, width = '1em', height = '1em', useCurrentColor = false, spin, ...rest } = props;

    const prefix = prefixFromProps || prefixFromContext || 'hiagent';
    const loadingKls = spin ? ` ${prefix}-icon-loading` : '';
    return <svg className={`${prefix}-icon ${prefix}-icon-piplcon${loadingKls} ${className}`} width={width} height={height} xmlns="http://www.w3.org/2000/svg" fill={useCurrentColor ? 'currentColor' : 'none'} viewBox="0 0 20 20" {...rest} ref={ref}><path fill={useCurrentColor ? 'currentColor' : '#fff'} d="M15.873 2.63c.719 0 1.302.583 1.302 1.303v3.959a.65.65 0 0 1-1.3 0V3.93H4.12v12.142l.002.001h3.263a.65.65 0 0 1 0 1.3H4.123c-.72 0-1.303-.583-1.303-1.303V3.933c0-.72.584-1.303 1.303-1.303h11.75Zm0 8.222c.719 0 1.302.583 1.302 1.302v3.917c0 .72-.583 1.303-1.302 1.303H11.65c-.72 0-1.303-.583-1.303-1.303v-3.917c0-.719.584-1.302 1.303-1.302h4.223Zm-4.225 5.221.002.001h4.224l.002-.002h-.001v-3.92h-4.227v3.921Z"/></svg>;
}

const IconPiplcon = React.forwardRef(IconPiplconComponent);
export default IconPiplcon;
