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

function IconMCPAgentPublishComponent(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-MCP_agent_publish${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 26 26" fill={useCurrentColor ? 'currentColor' : 'none'} xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><rect x="1" y="1" width="24" height="24" rx="4" fill={useCurrentColor ? 'currentColor' : '#010101'}/><path d="M4.36311 12.1161L11.8836 4.59718C12.5574 3.92334 13.3705 3.58643 14.3227 3.58643C15.2761 3.58643 16.0897 3.92334 16.7635 4.59718C17.4373 5.27101 17.7742 6.08405 17.7742 7.0363C17.7742 7.16305 17.7683 7.28763 17.7564 7.41005C17.8723 7.39922 17.9898 7.3938 18.109 7.3938C19.0764 7.3938 19.9019 7.73505 20.5855 8.41755C21.268 9.10222 21.6092 9.92772 21.6092 10.8941C21.6092 11.8604 21.268 12.6853 20.5855 13.3689L13.7377 20.2167C13.6543 20.3001 13.6543 20.3835 13.7377 20.4669L15.1889 21.9181C15.3286 22.0641 15.4056 22.2592 15.4034 22.4613C15.4011 22.6635 15.3198 22.8567 15.1769 22.9997C15.0339 23.1426 14.8407 23.2239 14.6385 23.2262C14.4363 23.2284 14.2413 23.1514 14.0952 23.0117L12.6441 21.5606C12.3083 21.2247 12.1404 20.8185 12.1404 20.3418C12.1404 19.8651 12.3083 19.4589 12.6441 19.1231L19.4919 12.2753C19.8732 11.894 20.0639 11.4336 20.0639 10.8941C20.0639 10.3546 19.8732 9.89413 19.4919 9.5128C19.1094 9.13038 18.649 8.93918 18.1106 8.93918C17.57 8.93918 17.1091 9.13038 16.7277 9.5128L16.289 9.94993L11.05 15.1922C10.9048 15.3364 10.7083 15.4173 10.5037 15.417C10.299 15.4167 10.1028 15.3352 9.95799 15.1906L9.95311 15.1873C9.88169 15.1157 9.82511 15.0307 9.7866 14.9371C9.7481 14.8436 9.72843 14.7434 9.72874 14.6423C9.72904 14.5411 9.7493 14.441 9.78836 14.3477C9.82742 14.2544 9.88451 14.1697 9.95636 14.0986L15.2262 8.8238L15.6682 8.3818C16.0398 8.00913 16.2256 7.56009 16.2256 7.03468C16.2256 6.50926 16.0398 6.06076 15.6682 5.68918C15.2956 5.31651 14.8465 5.13018 14.3211 5.13018C13.7957 5.13018 13.3472 5.31651 12.9756 5.68918L5.45674 13.2097C5.31064 13.3494 5.11564 13.4264 4.91348 13.4242C4.71132 13.4219 4.51807 13.3406 4.37511 13.1977C4.23215 13.0547 4.15085 12.8615 4.14861 12.6593C4.14636 12.4571 4.22336 12.2621 4.36311 12.1161ZM18.7622 11.3686L13.0487 17.0869C12.3749 17.7608 11.5613 18.0977 10.608 18.0977C9.65466 18.0977 8.84107 17.7608 8.16724 17.0869C7.49341 16.4131 7.15649 15.5995 7.15649 14.6462C7.15649 13.6928 7.49341 12.8793 8.16724 12.2054L13.8824 6.49193C14.0298 6.36088 14.2218 6.29113 14.419 6.29693C14.6161 6.30274 14.8036 6.38366 14.9431 6.52315C15.0826 6.66264 15.1636 6.85016 15.1694 7.04734C15.1752 7.24452 15.1054 7.43647 14.9744 7.58393L9.26249 13.2974C8.89091 13.6701 8.70511 14.1191 8.70511 14.6446C8.70511 15.17 8.89091 15.619 9.26249 15.9917C9.63516 16.3633 10.0842 16.5491 10.6096 16.5491C11.135 16.5491 11.5835 16.3633 11.9551 15.9917L17.6702 10.2766C17.8163 10.1368 18.0113 10.0598 18.2135 10.062C18.4157 10.0643 18.6089 10.1456 18.7519 10.2886C18.8948 10.4315 18.9761 10.6248 18.9784 10.8269C18.9806 11.0291 18.9036 11.2241 18.7639 11.3702L18.7622 11.3686Z" fill={useCurrentColor ? 'currentColor' : '#fff'}/></svg>;
}

const IconMCPAgentPublish = React.forwardRef(IconMCPAgentPublishComponent);
export default IconMCPAgentPublish;
