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

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

    const prefix = prefixFromProps || prefixFromContext || 'hiagent';
    const loadingKls = spin ? ` ${prefix}-icon-loading` : '';
    return <svg className={`${prefix}-icon ${prefix}-icon-image_embedding${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 22 22" fill={useCurrentColor ? 'currentColor' : '#000'} xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><path d="M14.7842 13.0996C15.4778 13.0996 16.0385 13.1719 16.4648 13.3164C16.891 13.4609 17.2014 13.729 17.3965 14.1191C17.5987 14.5021 17.7002 15.0584 17.7002 15.7881V18.2324C17.7002 18.3429 17.6105 18.4326 17.5 18.4326H16.3076C16.2056 18.4325 16.1204 18.3553 16.1094 18.2539L16.0742 17.9336H16.042C15.9047 18.1142 15.6913 18.2588 15.4023 18.3672C15.1134 18.4755 14.7377 18.5302 14.2754 18.5303C13.0254 18.5303 12.4005 17.9449 12.4004 16.7744C12.4004 16.2758 12.5625 15.8853 12.8877 15.6035C13.22 15.3146 13.7403 15.17 14.4482 15.1699H16.0527C16.0021 14.8666 15.8716 14.6646 15.6621 14.5635C15.4526 14.4552 15.0953 14.4004 14.5898 14.4004C14.2719 14.4004 13.9572 14.426 13.6465 14.4766C13.3432 14.5199 13.0759 14.5702 12.8447 14.6279L12.8115 14.6064L12.8213 13.4971C12.822 13.4094 12.8797 13.3314 12.9648 13.3105C13.0822 13.2819 13.2191 13.2556 13.375 13.2305C13.599 13.1871 13.8344 13.1545 14.0801 13.1328C14.3328 13.1112 14.5675 13.0996 14.7842 13.0996ZM16.5469 3.61035C17.5409 3.61049 18.3467 4.41613 18.3467 5.41016V8.2998C18.3466 8.74148 17.9885 9.10045 17.5469 9.10059C17.1051 9.10059 16.7472 8.74156 16.7471 8.2998V5.41016C16.7471 5.29978 16.6572 5.2101 16.5469 5.20996H5.37012C5.25966 5.20996 5.16992 5.2997 5.16992 5.41016V10.9502L6.3916 9.72852C7.09455 9.02557 8.23456 9.02557 8.9375 9.72852L10.7002 11.4922L10.9062 11.6973C11.2184 12.0097 11.2186 12.5168 10.9062 12.8291C10.5939 13.1411 10.0877 13.141 9.77539 12.8291L7.80566 10.8594C7.72755 10.7814 7.60051 10.7813 7.52246 10.8594L5.16992 13.2119V16.5869C5.17014 16.6972 5.25979 16.7871 5.37012 16.7871H10.3496C10.7914 16.7871 11.1504 17.1451 11.1504 17.5869C11.1502 18.0286 10.7913 18.3867 10.3496 18.3867H5.37012C4.37614 18.3867 3.57053 17.5808 3.57031 16.5869V5.41016C3.57031 4.41604 4.376 3.61035 5.37012 3.61035H16.5469ZM14.8496 16.2754C14.5317 16.2754 14.3078 16.3231 14.1777 16.417C14.0549 16.5037 13.9932 16.6227 13.9932 16.7744C13.9932 16.955 14.0585 17.0811 14.1885 17.1533C14.3185 17.2184 14.4957 17.251 14.7197 17.251C15.1676 17.251 15.5036 17.1972 15.7275 17.0889C15.9515 16.9733 16.0669 16.7924 16.0742 16.5469V16.2754H14.8496ZM15.1123 9.79395C15.3366 9.51375 15.7461 9.46821 16.0264 9.69238L17.3584 10.7588C18.0591 11.3199 17.6625 12.4502 16.7646 12.4502H12.9199C12.5611 12.4501 12.2696 12.1586 12.2695 11.7998C12.2698 11.4411 12.5612 11.1505 12.9199 11.1504H15.7666L15.2139 10.708C14.9337 10.4838 14.8883 10.0742 15.1123 9.79395ZM12.3701 5.84961C13.5637 5.84979 14.531 6.8181 14.5312 8.01172C14.5311 9.20536 13.5638 10.1727 12.3701 10.1729C11.1765 10.1727 10.2082 9.20535 10.208 8.01172C10.2082 6.81811 11.1765 5.84981 12.3701 5.84961ZM12.3701 7.34961C12.0049 7.34981 11.7082 7.64654 11.708 8.01172C11.7082 8.37692 12.0049 8.67265 12.3701 8.67285C12.7353 8.67267 13.0311 8.37693 13.0312 8.01172C13.031 7.64653 12.7353 7.34979 12.3701 7.34961Z"/></svg>;
}

const IconImageEmbedding = React.forwardRef(IconImageEmbeddingComponent);
export default IconImageEmbedding;
