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

function IconImage2imageComponent(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-image2image${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="M16.5469 3.61035C17.5409 3.61049 18.3467 4.41613 18.3467 5.41016V8.41016C18.3466 8.85183 17.9885 9.20983 17.5469 9.20996C17.1051 9.20996 16.7472 8.85191 16.7471 8.41016V5.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.594 13.1411 10.0878 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.1201C10.5619 16.7871 10.9199 17.1451 10.9199 17.5869C10.9197 18.0286 10.5618 18.3867 10.1201 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.5469ZM17.1201 15.1602C17.5342 15.1602 17.87 15.4961 17.8701 15.9102C17.8699 16.3242 17.5342 16.6602 17.1201 16.6602H14.5586L14.8887 16.9238C15.2121 17.1825 15.2645 17.6551 15.0059 17.9785C14.7471 18.3019 14.2746 18.3544 13.9512 18.0957L12.6191 17.0293C11.8448 16.4091 12.2831 15.1602 13.2754 15.1602H17.1201ZM15.0342 11.4414C15.2929 11.1181 15.7655 11.0656 16.0889 11.3242L17.4209 12.3906C18.1954 13.0108 17.757 14.2598 16.7646 14.2598H12.9199C12.5059 14.2596 12.17 13.9238 12.1699 13.5098C12.1702 13.0958 12.506 12.7599 12.9199 12.7598H15.4814L15.1514 12.4961C14.8281 12.2374 14.7756 11.7648 15.0342 11.4414ZM12.3701 6.0127C13.5638 6.01288 14.5311 6.98112 14.5312 8.1748C14.5311 9.36845 13.5638 10.3358 12.3701 10.3359C11.1764 10.3358 10.2082 9.36848 10.208 8.1748C10.2081 6.98109 11.1764 6.01283 12.3701 6.0127ZM12.3701 7.5127C12.0048 7.51283 11.7081 7.80951 11.708 8.1748C11.7082 8.54005 12.0049 8.83581 12.3701 8.83594C12.7353 8.83575 13.0311 8.54002 13.0312 8.1748C13.0311 7.80955 12.7354 7.51288 12.3701 7.5127Z"/></svg>;
}

const IconImage2image = React.forwardRef(IconImage2imageComponent);
export default IconImage2image;
