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

function IconAWSComponent(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-AWS${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 36 36" fill={useCurrentColor ? 'currentColor' : 'none'} xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><path d="M11.2736 16.4004C11.2736 16.7914 11.3144 17.1085 11.3858 17.3409C11.4673 17.5734 11.5693 17.827 11.7121 18.1018C11.7631 18.1863 11.7835 18.2709 11.7835 18.3448C11.7835 18.4505 11.7223 18.5562 11.5897 18.6618L10.9472 19.1057C10.8554 19.1691 10.7636 19.2008 10.682 19.2008C10.58 19.2008 10.478 19.1479 10.376 19.0528C10.2332 18.8943 10.1108 18.7253 10.0088 18.5562C9.90685 18.3765 9.80486 18.1758 9.69267 17.9327C8.89712 18.9049 7.89759 19.391 6.69407 19.391C5.83733 19.391 5.15397 19.1374 4.65421 18.6301C4.15444 18.1229 3.89946 17.4466 3.89946 16.6012C3.89946 15.703 4.20544 14.9739 4.8276 14.4244C5.44975 13.8749 6.2759 13.6001 7.32643 13.6001C7.6732 13.6001 8.03018 13.6318 8.40755 13.6847C8.78493 13.7375 9.1725 13.822 9.58047 13.9171V13.1457C9.58047 12.3426 9.41728 11.7825 9.10111 11.455C8.77473 11.1274 8.22397 10.9689 7.43862 10.9689C7.08164 10.9689 6.71447 11.0111 6.33709 11.1062C5.95972 11.2013 5.59254 11.3176 5.23557 11.4655C5.07238 11.5395 4.94999 11.5818 4.87859 11.6029C4.8072 11.624 4.7562 11.6346 4.7154 11.6346C4.57261 11.6346 4.50122 11.5289 4.50122 11.307V10.7892C4.50122 10.6201 4.52162 10.4933 4.57261 10.4194C4.62361 10.3454 4.7154 10.2714 4.85819 10.1974C5.21517 10.0072 5.64354 9.84872 6.14331 9.72191C6.64307 9.58454 7.17344 9.52113 7.7344 9.52113C8.94812 9.52113 9.83546 9.80645 10.4066 10.3771C10.9676 10.9477 11.2532 11.8142 11.2532 12.9766V16.4004H11.2736ZM7.13264 18.0067C7.46922 18.0067 7.81599 17.9433 8.18317 17.8165C8.55034 17.6897 8.87672 17.4572 9.1521 17.1402C9.31529 16.9394 9.43768 16.7175 9.49888 16.4638C9.56008 16.2102 9.60087 15.9038 9.60087 15.5445V15.1007C9.30509 15.0267 8.98891 14.9633 8.66254 14.921C8.33616 14.8788 8.01998 14.8576 7.7038 14.8576C7.02045 14.8576 6.52068 14.995 6.1841 15.2803C5.84753 15.5656 5.68434 15.9672 5.68434 16.4956C5.68434 16.9922 5.80673 17.3621 6.06171 17.6157C6.3065 17.8799 6.66347 18.0067 7.13264 18.0067ZM15.3227 19.1479C15.1391 19.1479 15.0167 19.1162 14.9351 19.0423C14.8535 18.9789 14.7821 18.8309 14.7209 18.6301L12.3241 10.4616C12.2629 10.2503 12.2323 10.1129 12.2323 10.0389C12.2323 9.86986 12.3139 9.77475 12.4771 9.77475H13.4766C13.6704 9.77475 13.803 9.80645 13.8744 9.88042C13.956 9.94383 14.0172 10.0918 14.0784 10.2925L15.7919 17.2881L17.3829 10.2925C17.4339 10.0812 17.4951 9.94383 17.5767 9.88042C17.6583 9.81702 17.8011 9.77475 17.9847 9.77475H18.8006C18.9944 9.77475 19.127 9.80645 19.2086 9.88042C19.2902 9.94383 19.3616 10.0918 19.4024 10.2925L21.0139 17.3726L22.7784 10.2925C22.8396 10.0812 22.911 9.94383 22.9824 9.88042C23.064 9.81702 23.1965 9.77475 23.3801 9.77475H24.3287C24.4919 9.77475 24.5837 9.85929 24.5837 10.0389C24.5837 10.0918 24.5735 10.1446 24.5633 10.208C24.5531 10.2714 24.5327 10.356 24.4919 10.4722L22.0338 18.6407C21.9726 18.8521 21.9012 18.9894 21.8196 19.0528C21.738 19.1162 21.6055 19.1585 21.4321 19.1585H20.5549C20.3611 19.1585 20.2285 19.1268 20.147 19.0528C20.0654 18.9789 19.994 18.8415 19.9532 18.6301L18.3723 11.8142L16.8016 18.6196C16.7506 18.8309 16.6894 18.9683 16.6078 19.0423C16.5262 19.1162 16.3834 19.1479 16.1998 19.1479H15.3227ZM28.4288 19.4333C27.8984 19.4333 27.3681 19.3699 26.8581 19.243C26.3481 19.1162 25.9504 18.9789 25.6852 18.8204C25.522 18.7253 25.4098 18.6196 25.369 18.5245C25.3282 18.4294 25.3078 18.3237 25.3078 18.2286V17.6897C25.3078 17.4677 25.3894 17.3621 25.5424 17.3621C25.6036 17.3621 25.6648 17.3726 25.726 17.3938C25.7872 17.4149 25.879 17.4572 25.981 17.4994C26.3277 17.658 26.7051 17.7848 27.1029 17.8693C27.5109 17.9538 27.9086 17.9961 28.3166 17.9961C28.9592 17.9961 29.4589 17.8799 29.8057 17.6474C30.1525 17.4149 30.3361 17.0768 30.3361 16.6435C30.3361 16.3476 30.2443 16.1046 30.0607 15.9038C29.8771 15.703 29.5303 15.5234 29.0306 15.3543L27.5517 14.8788C26.8071 14.6357 26.2563 14.2764 25.9198 13.8009C25.5832 13.3359 25.4098 12.8181 25.4098 12.2686C25.4098 11.8248 25.5016 11.4338 25.6852 11.0957C25.8688 10.7575 26.1135 10.4616 26.4195 10.2291C26.7255 9.9861 27.0723 9.80645 27.4803 9.67964C27.8882 9.55284 28.3166 9.5 28.7654 9.5C28.9898 9.5 29.2243 9.51057 29.4487 9.54227C29.6833 9.57397 29.8975 9.61624 30.1117 9.65851C30.3157 9.71135 30.5094 9.76418 30.693 9.82759C30.8766 9.89099 31.0194 9.95439 31.1214 10.0178C31.2642 10.1023 31.3662 10.1869 31.4274 10.282C31.4886 10.3665 31.5192 10.4828 31.5192 10.6307V11.1274C31.5192 11.3493 31.4376 11.4655 31.2846 11.4655C31.203 11.4655 31.0704 11.4232 30.897 11.3387C30.3157 11.064 29.6629 10.9266 28.9388 10.9266C28.3574 10.9266 27.8984 11.0217 27.5823 11.2225C27.2661 11.4232 27.1029 11.7297 27.1029 12.163C27.1029 12.4588 27.2049 12.7125 27.4089 12.9132C27.6128 13.114 27.9902 13.3148 28.5308 13.4944L29.9791 13.97C30.7134 14.213 31.2438 14.5512 31.56 14.9844C31.8762 15.4177 32.0291 15.9144 32.0291 16.4638C32.0291 16.9182 31.9374 17.3304 31.764 17.6897C31.5804 18.0489 31.3356 18.366 31.0194 18.6196C30.7032 18.8838 30.3259 19.074 29.8873 19.2113C29.4283 19.3593 28.949 19.4333 28.4288 19.4333Z" fill={useCurrentColor ? 'currentColor' : '#252F3E'}/><path d="M2.76722 22.5086C2.45116 22.2128 2.73661 21.8115 3.1139 22.0438C7.43839 24.6434 12.7729 26.2177 18.2907 26.2177C22.0133 26.2177 26.1034 25.415 29.8668 23.7665C30.4278 23.5023 30.9069 24.1465 30.3561 24.5692C27.0007 27.1369 22.1259 28.4999 17.9342 28.5C12.0594 28.5 6.76535 26.2496 2.76722 22.5086ZM27.7457 22.3075C29.6627 20.9132 32.8127 21.3144 33.1813 21.7791C33.5485 22.2547 33.0797 25.5199 31.2848 27.084C31.0094 27.327 30.7445 27.2007 30.8668 26.8838C31.2748 25.8376 32.1819 23.4808 31.7536 22.9208C31.325 22.3503 28.9181 22.6457 27.8268 22.7831C27.5007 22.8251 27.45 22.5293 27.7457 22.3075Z" fill={useCurrentColor ? 'currentColor' : '#F90'}/></svg>;
}

const IconAWS = React.forwardRef(IconAWSComponent);
export default IconAWS;
