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

function IconPythonComponent(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-python${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 18 18" fill={useCurrentColor ? 'currentColor' : 'none'} xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><path d="M6.44474 8.71218C6.60172 8.68602 6.75869 8.66858 6.91567 8.66858H6.78486H11.032C11.2151 8.66858 11.3895 8.64242 11.5639 8.59881C12.3488 8.38079 12.9244 7.68311 12.9244 6.81974V3.25287C12.9244 2.24124 12.061 1.4738 11.032 1.3081C10.3779 1.20345 9.4273 1.15112 8.78195 1.15112C8.1366 1.15112 7.51741 1.21217 6.96799 1.3081C5.36334 1.58717 5.07555 2.17147 5.07555 3.25287V4.42148H8.99998V5.07555H3.80229C2.34589 5.07555 1.15984 6.81974 1.15112 8.96509V8.99998C1.15112 9.39242 1.18601 9.76742 1.2645 10.1163C1.58717 11.7384 2.5988 12.9244 3.80229 12.9244H4.42148V11.0494C4.42148 9.95056 5.24125 8.93021 6.44474 8.71218ZM6.86334 3.7238C6.4709 3.7238 6.14823 3.40113 6.15695 3.00868C6.15695 2.61624 6.4709 2.29357 6.86334 2.29357C7.25579 2.29357 7.57846 2.61624 7.57846 3.00868C7.56974 3.40985 7.25579 3.7238 6.86334 3.7238Z" fill={useCurrentColor ? 'currentColor' : '#0075AA'}/><path d="M16.6831 7.63092C16.3081 6.13964 15.3401 5.07568 14.1977 5.07568H13.5785V6.74138C13.5785 8.12802 12.6715 9.13092 11.5552 9.30534C11.4419 9.32279 11.3285 9.33151 11.2151 9.33151H6.96801C6.78487 9.33151 6.61045 9.35767 6.43603 9.40127C5.65114 9.61058 5.07556 10.2559 5.07556 11.1019V14.6687C5.07556 15.6804 6.09591 16.2821 7.09882 16.5699C8.29359 16.9187 9.60173 16.9798 11.0407 16.5699C11.9913 16.2995 12.9244 15.7501 12.9244 14.6687V13.5873H8.99999V12.9245H14.1977C15.2267 12.9245 16.125 12.0524 16.561 10.7792C16.7442 10.2472 16.8488 9.64546 16.8488 9.00011C16.8488 8.52046 16.7878 8.05825 16.6831 7.63092ZM11.1192 14.1804C11.5116 14.1804 11.8256 14.503 11.8256 14.8955C11.8256 15.2879 11.5029 15.6106 11.1192 15.6106C10.7267 15.6106 10.4041 15.2879 10.4041 14.8955C10.4128 14.503 10.7267 14.1804 11.1192 14.1804Z" fill={useCurrentColor ? 'currentColor' : '#FFD400'}/></svg>;
}

const IconPython = React.forwardRef(IconPythonComponent);
export default IconPython;
