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

function IconDataTransformComponent(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-data_transform${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 20 20" fill={useCurrentColor ? 'currentColor' : 'none'} xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><rect width="20" height="20" rx="6" fill={useCurrentColor ? 'currentColor' : '#37A4F2'}/><path d="M5.63804 10.817L8.94073 11.409C9.08091 11.4341 9.17494 11.5702 9.15047 11.7128L8.97056 12.7476C8.94569 12.8901 8.81239 12.9851 8.67227 12.9601L7.63289 12.7737C8.27776 13.384 9.14268 13.7571 10.0929 13.7571C11.5467 13.7569 12.7996 12.8831 13.3723 11.6234C13.4632 11.4232 13.6641 11.2879 13.8831 11.3064L14.5245 11.3614C14.8184 11.3865 15.021 11.6705 14.9178 11.9468C14.1788 13.9258 12.2972 15.3323 10.0929 15.3325C8.66268 15.3325 7.36778 14.7405 6.43319 13.7841L6.28124 14.6641C6.25632 14.8067 6.12221 14.9018 5.98201 14.8766L4.96595 14.6939C4.82562 14.6688 4.73146 14.5328 4.75621 14.39L5.33881 11.0296C5.36356 10.8868 5.49772 10.7919 5.63804 10.817ZM9.91206 4.83247C11.3423 4.83247 12.6372 5.42448 13.5718 6.38081L13.7237 5.50084C13.7486 5.35829 13.8827 5.26315 14.0229 5.28831L15.039 5.47101C15.1793 5.49619 15.2735 5.63213 15.2487 5.7749L14.6661 9.13539C14.6414 9.27816 14.5072 9.3731 14.3669 9.34792L11.0642 8.75599C10.924 8.73084 10.83 8.59471 10.8545 8.4521L11.0344 7.41739C11.0593 7.27488 11.1926 7.17986 11.3327 7.20485L12.3721 7.39129C11.7272 6.78094 10.8623 6.40785 9.91206 6.40785C8.51817 6.40801 7.3084 7.21121 6.70631 8.38778C6.60029 8.59476 6.37607 8.72268 6.14794 8.67769L5.53177 8.55557C5.25189 8.50019 5.08096 8.21201 5.19526 7.95059C5.9985 6.11348 7.8084 4.83264 9.91206 4.83247Z" fill={useCurrentColor ? 'currentColor' : '#fff'}/></svg>;
}

const IconDataTransform = React.forwardRef(IconDataTransformComponent);
export default IconDataTransform;
