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

function IconCodeUnComponent(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-code_un${loadingKls} ${className}`} width={width} height={height} xmlns="http://www.w3.org/2000/svg" fill={useCurrentColor ? 'currentColor' : 'currentColor'} viewBox="0 0 24 24" {...rest} ref={ref}><path fill={useCurrentColor ? 'currentColor' : '#A0A2A7'} d="M0 6.31579C0 2.82768 2.82768 0 6.31579 0H17.6842C21.1724 0 24 2.82768 24 6.31579V17.6842C24 21.1724 21.1724 24 17.6842 24H6.31579C2.82768 24 0 21.1724 0 17.6842V6.31579Z"/><path fill={useCurrentColor ? 'currentColor' : '#676B72'} fillRule="evenodd" d="M17.6842 2.31579H6.31579C4.10665 2.31579 2.31579 4.10665 2.31579 6.31579V17.6842C2.31579 19.8933 4.10665 21.6842 6.31579 21.6842H17.6842C19.8933 21.6842 21.6842 19.8933 21.6842 17.6842V6.31579C21.6842 4.10665 19.8933 2.31579 17.6842 2.31579ZM6.31579 0C2.82768 0 0 2.82768 0 6.31579V17.6842C0 21.1724 2.82768 24 6.31579 24H17.6842C21.1724 24 24 21.1724 24 17.6842V6.31579C24 2.82768 21.1724 0 17.6842 0H6.31579Z" clipRule="evenodd"/><path fill={useCurrentColor ? 'currentColor' : '#fff'} d="M9.7763 17.5056C9.83371 17.6085 9.92078 17.6814 10.028 17.7216C10.0458 17.7776 10.0818 17.8108 10.0994 17.8249C10.1216 17.8425 10.1425 17.8522 10.1536 17.8569C10.1914 17.8729 10.2333 17.8785 10.2517 17.881C10.3024 17.8877 10.3696 17.8915 10.4303 17.8933C10.4919 17.8952 10.556 17.8953 10.6027 17.8932C10.6211 17.8924 10.6533 17.8907 10.6813 17.8846C10.6886 17.883 10.7067 17.8788 10.7274 17.8695C10.7377 17.8649 10.7575 17.8552 10.7784 17.8374C10.7939 17.8244 10.8196 17.7987 10.8366 17.7588C10.858 17.7544 10.8786 17.7498 10.8979 17.7451C10.9338 17.7363 10.974 17.7249 11.0095 17.7098C11.027 17.7024 11.0514 17.6906 11.0756 17.6728C11.096 17.6578 11.1425 17.6197 11.1633 17.5514L11.1641 17.5486L14.2661 6.85955C14.2662 6.85928 14.2663 6.85898 14.2664 6.85871C14.3032 6.73454 14.2906 6.60854 14.2269 6.49433C14.1637 6.38107 14.0646 6.30418 13.9422 6.26715L13.9395 6.26633L13.9368 6.26559L13.4251 6.12559C13.3021 6.08789 13.1788 6.10345 13.0681 6.16467C12.9548 6.22738 12.8773 6.32606 12.8399 6.44852L12.8391 6.45132L9.7371 17.1404C9.73701 17.1407 9.73691 17.141 9.73682 17.1413C9.70004 17.2654 9.71257 17.3914 9.7763 17.5056ZM10.3102 17.8466C10.3103 17.8466 10.3105 17.8465 10.3107 17.8465C10.3088 17.8471 10.3084 17.8471 10.3102 17.8466ZM8.28072 16.1987L8.69699 15.7842C8.78838 15.6933 8.84204 15.5773 8.84204 15.4443C8.84204 15.3112 8.78838 15.1952 8.69699 15.1043L5.57838 11.9994L8.69699 8.8946C8.78838 8.80364 8.84204 8.68768 8.84204 8.55463C8.84204 8.42157 8.78838 8.30561 8.69699 8.21465L8.28072 7.8002C8.18935 7.70924 8.07331 7.6562 7.94055 7.6562C7.80781 7.6562 7.69175 7.70924 7.60038 7.8002L3.72398 11.6595C3.63261 11.7504 3.57895 11.8664 3.57895 11.9994C3.57895 12.1325 3.63261 12.2485 3.72398 12.3394L7.60038 16.1987C7.69175 16.2897 7.80781 16.3427 7.94055 16.3427C8.07331 16.3427 8.18935 16.2897 8.28072 16.1987ZM16.3996 16.1987L20.276 12.3394C20.3674 12.2485 20.4211 12.1325 20.4211 11.9994C20.4211 11.8664 20.3674 11.7504 20.276 11.6595L16.3996 7.8002C16.3083 7.70924 16.1922 7.6562 16.0595 7.6562C15.9267 7.6562 15.8107 7.70924 15.7193 7.8002L15.303 8.21465C15.2116 8.30561 15.158 8.42157 15.158 8.55463C15.158 8.68768 15.2116 8.80364 15.303 8.8946L18.4216 11.9994L15.303 15.1043C15.2116 15.1952 15.158 15.3112 15.158 15.4443C15.158 15.5773 15.2116 15.6933 15.303 15.7842L15.7193 16.1987C15.8107 16.2897 15.9267 16.3427 16.0595 16.3427C16.1922 16.3427 16.3083 16.2897 16.3996 16.1987Z"/></svg>;
}

const IconCodeUn = React.forwardRef(IconCodeUnComponent);
export default IconCodeUn;
