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

function IconPublishedAgentComponent(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-published-agent${loadingKls} ${className}`} width={width} height={height} xmlns="http://www.w3.org/2000/svg" fill={useCurrentColor ? 'currentColor' : 'none'} viewBox="0 0 24 24" {...rest} ref={ref}><g><path fill={useCurrentColor ? 'currentColor' : '#437CF0'} d="M16.8 0H7.2A7.2 7.2 0 0 0 0 7.2v9.6A7.2 7.2 0 0 0 7.2 24h9.6a7.2 7.2 0 0 0 7.2-7.2V7.2A7.2 7.2 0 0 0 16.8 0Z"/><path fill={useCurrentColor ? 'currentColor' : '#fff'} d="M11.915 4.8a6.84 6.84 0 0 1 2.79.54c.85.357 1.628.868 2.292 1.508A7.035 7.035 0 0 1 18.556 9.1c.38.864.576 1.792.588 2.782a6.819 6.819 0 0 1-.483 2.643 7.03 7.03 0 0 1-1.386 2.196 7.592 7.592 0 0 1-2.088 1.573 7.238 7.238 0 0 1-2.587.768c-.24.032-.496.06-.768.08a17.787 17.787 0 0 1-3.394-.048c-1.13-.109-1.97-.25-2.52-.424s-.77-.272-.66-.294a4.945 4.945 0 0 0 1.484-.473c.218-.12.308-.29.27-.514a1.26 1.26 0 0 0-.318-.629 7.427 7.427 0 0 1-1.347-2.128 7.086 7.086 0 0 1-.547-2.62 6.84 6.84 0 0 1 .54-2.79A7.183 7.183 0 0 1 11.915 4.8Zm-.015 6.28c0 .283.105.528.311.734a1.004 1.004 0 0 0 .735.31.997.997 0 0 0 .741-.31 1.016 1.016 0 0 0 .303-.734 1.007 1.007 0 0 0-.303-.742 1.01 1.01 0 0 0-.741-.302 1.017 1.017 0 0 0-.735.302.996.996 0 0 0-.31.742Zm-4.046-.016c0 .282.1.528.302.733.2.208.444.311.726.311a.996.996 0 0 0 .743-.31 1.017 1.017 0 0 0 .301-.734.99.99 0 0 0-.3-.726 1.008 1.008 0 0 0-.745-.302.988.988 0 0 0-.725.302.99.99 0 0 0-.302.726Z"/></g></svg>;
}

const IconPublishedAgent = React.forwardRef(IconPublishedAgentComponent);
export default IconPublishedAgent;
