import React from "react";
import { IntegrationLogoSvgWrapper, SvgLogoProps } from "./wrapper";

export const AwsSvg = ({ color, square, ...rest }: SvgLogoProps) => {
  const viewBox = square ? "0 0 32 32" : "0 0 54 32";
  const path = square ? (
    <>
      <path
        d="M9.01791 12.9498C9.01791 13.3436 9.06048 13.6629 9.13498 13.897C9.22012 14.1311 9.32655 14.3866 9.47555 14.6633C9.52877 14.7484 9.55005 14.8336 9.55005 14.9081C9.55005 15.0145 9.4862 15.1209 9.34784 15.2274L8.67734 15.6744C8.58155 15.7382 8.48577 15.7701 8.40062 15.7701C8.29419 15.7701 8.18777 15.7169 8.08134 15.6211C7.93234 15.4615 7.80462 15.2912 7.69819 15.1209C7.59177 14.94 7.48534 14.7378 7.36827 14.493C6.53812 15.4721 5.49512 15.9617 4.23926 15.9617C3.34526 15.9617 2.63219 15.7063 2.11069 15.1954C1.58919 14.6846 1.32312 14.0034 1.32312 13.152C1.32312 12.2474 1.64241 11.513 2.29162 10.9596C2.94084 10.4061 3.80291 10.1294 4.89912 10.1294C5.26098 10.1294 5.63348 10.1614 6.02726 10.2146C6.42105 10.2678 6.82548 10.3529 7.25119 10.4487V9.67179C7.25119 8.86293 7.08091 8.29886 6.75098 7.96893C6.41041 7.639 5.83569 7.47936 5.01619 7.47936C4.64369 7.47936 4.26055 7.52193 3.86676 7.61771C3.47298 7.7135 3.08984 7.83057 2.71734 7.97957C2.54705 8.05407 2.41933 8.09664 2.34483 8.11793C2.27033 8.13922 2.21712 8.14986 2.17455 8.14986C2.02555 8.14986 1.95105 8.04343 1.95105 7.81993V7.29843C1.95105 7.12814 1.97233 7.00043 2.02555 6.92593C2.07876 6.85143 2.17455 6.77693 2.32355 6.70243C2.69605 6.51086 3.14305 6.35121 3.66455 6.2235C4.18605 6.08514 4.73948 6.02129 5.32484 6.02129C6.59134 6.02129 7.51727 6.30864 8.11327 6.88336C8.69862 7.45807 8.99662 8.33079 8.99662 9.5015V12.9498H9.01791ZM4.69691 14.5675C5.04812 14.5675 5.40998 14.5036 5.79312 14.3759C6.17627 14.2482 6.51684 14.0141 6.80419 13.6948C6.97448 13.4926 7.10219 13.2691 7.16605 13.0136C7.22991 12.7582 7.27248 12.4496 7.27248 12.0877V11.6407C6.96384 11.5662 6.63391 11.5024 6.29334 11.4598C5.95276 11.4172 5.62284 11.3959 5.29291 11.3959C4.57984 11.3959 4.05834 11.5343 3.70712 11.8216C3.35591 12.109 3.18562 12.5134 3.18562 13.0456C3.18562 13.5458 3.31334 13.9183 3.57941 14.1737C3.83484 14.4398 4.20734 14.5675 4.69691 14.5675ZM13.2431 15.7169C13.0516 15.7169 12.9238 15.685 12.8387 15.6105C12.7536 15.5466 12.6791 15.3976 12.6152 15.1954L10.1141 6.9685C10.0503 6.75564 10.0183 6.61729 10.0183 6.54279C10.0183 6.3725 10.1035 6.27671 10.2738 6.27671H11.3168C11.519 6.27671 11.6573 6.30864 11.7318 6.38314C11.817 6.447 11.8808 6.596 11.9447 6.79821L13.7327 13.8438L15.393 6.79821C15.4462 6.58536 15.5101 6.447 15.5952 6.38314C15.6803 6.31929 15.8293 6.27671 16.0209 6.27671H16.8723C17.0746 6.27671 17.2129 6.30864 17.2981 6.38314C17.3832 6.447 17.4577 6.596 17.5003 6.79821L19.1818 13.9289L21.0231 6.79821C21.0869 6.58536 21.1614 6.447 21.2359 6.38314C21.3211 6.31929 21.4594 6.27671 21.651 6.27671H22.6408C22.8111 6.27671 22.9068 6.36186 22.9068 6.54279C22.9068 6.596 22.8962 6.64921 22.8856 6.71307C22.8749 6.77693 22.8536 6.86207 22.8111 6.97914L20.2461 15.2061C20.1823 15.4189 20.1078 15.5573 20.0226 15.6211C19.9375 15.685 19.7991 15.7276 19.6182 15.7276H18.7029C18.5007 15.7276 18.3623 15.6956 18.2772 15.6211C18.1921 15.5466 18.1176 15.4083 18.075 15.1954L16.4253 8.33079L14.7863 15.1848C14.7331 15.3976 14.6693 15.536 14.5841 15.6105C14.499 15.685 14.35 15.7169 14.1584 15.7169H13.2431ZM26.9192 16.0043C26.3658 16.0043 25.8123 15.9404 25.2802 15.8127C24.7481 15.685 24.333 15.5466 24.0563 15.387C23.886 15.2912 23.7689 15.1848 23.7263 15.089C23.6838 14.9932 23.6625 14.8868 23.6625 14.791V14.2482C23.6625 14.0247 23.7476 13.9183 23.9073 13.9183C23.9711 13.9183 24.035 13.9289 24.0988 13.9502C24.1627 13.9715 24.2585 14.0141 24.3649 14.0566C24.7268 14.2163 25.1206 14.344 25.5356 14.4291C25.9613 14.5143 26.3764 14.5569 26.8021 14.5569C27.4726 14.5569 27.9941 14.4398 28.356 14.2056C28.7178 13.9715 28.9094 13.6309 28.9094 13.1946C28.9094 12.8966 28.8136 12.6518 28.6221 12.4496C28.4305 12.2474 28.0686 12.0664 27.5471 11.8961L26.0039 11.4172C25.227 11.1724 24.6523 10.8106 24.3011 10.3316C23.9498 9.86336 23.7689 9.34186 23.7689 8.78843C23.7689 8.34143 23.8647 7.94764 24.0563 7.60707C24.2478 7.2665 24.5033 6.9685 24.8226 6.73436C25.1418 6.48957 25.5037 6.30864 25.9294 6.18093C26.3551 6.05321 26.8021 6 27.2704 6C27.5046 6 27.7493 6.01064 27.9835 6.04257C28.2283 6.0745 28.4518 6.11707 28.6753 6.15964C28.8881 6.21286 29.0903 6.26607 29.2819 6.32993C29.4735 6.39379 29.6225 6.45764 29.7289 6.5215C29.8779 6.60664 29.9843 6.69179 30.0482 6.78757C30.1121 6.87271 30.144 6.98979 30.144 7.13879V7.639C30.144 7.8625 30.0588 7.97957 29.8992 7.97957C29.8141 7.97957 29.6757 7.937 29.4948 7.85186C28.8881 7.57514 28.207 7.43679 27.4513 7.43679C26.8447 7.43679 26.3658 7.53257 26.0358 7.73479C25.7059 7.937 25.5356 8.24564 25.5356 8.682C25.5356 8.98 25.6421 9.23543 25.8549 9.43764C26.0678 9.63986 26.4616 9.84207 27.0256 10.023L28.5369 10.5019C29.3032 10.7467 29.8566 11.0873 30.1866 11.5236C30.5165 11.96 30.6761 12.4602 30.6761 13.0136C30.6761 13.4713 30.5803 13.8864 30.3994 14.2482C30.2078 14.6101 29.9524 14.9294 29.6225 15.1848C29.2926 15.4509 28.8988 15.6424 28.4411 15.7808C27.9622 15.9298 27.462 16.0043 26.9192 16.0043Z"
        fill={color || "#252f3e"}
      />
      <path
        fillRule="evenodd"
        clipRule="evenodd"
        d="M28.9307 21.1767C25.4292 23.7629 20.3419 25.1359 15.9677 25.1359C9.83741 25.1359 4.31377 22.8689 0.141765 19.1014C-0.188164 18.8034 0.109836 18.3989 0.503622 18.6331C5.0162 21.2512 10.5824 22.837 16.3402 22.837C20.2248 22.837 24.4926 22.0281 28.4199 20.3679C29.0052 20.1018 29.5054 20.751 28.9307 21.1767Z"
        fill={color || "#ff9900"}
      />
      <path
        fillRule="evenodd"
        clipRule="evenodd"
        d="M30.3888 19.5164C29.9418 18.9417 27.4301 19.2397 26.2913 19.3781C25.9507 19.4206 25.8975 19.1226 26.2061 18.8991C28.207 17.4943 31.4956 17.8987 31.8788 18.367C32.2619 18.8459 31.7724 22.1346 29.8992 23.7097C29.6119 23.9545 29.3351 23.8268 29.4629 23.5075C29.8886 22.4539 30.8358 20.0805 30.3888 19.5164Z"
        fill={color || "#ff9900"}
      />
    </>
  ) : (
    <>
      <path
        d="M15.0802 11.6218C15.0802 12.2803 15.1514 12.8142 15.276 13.2058C15.4184 13.5973 15.5963 14.0245 15.8455 14.4872C15.9345 14.6296 15.9701 14.772 15.9701 14.8966C15.9701 15.0745 15.8633 15.2525 15.6319 15.4305L14.5107 16.178C14.3505 16.2848 14.1903 16.3382 14.048 16.3382C13.87 16.3382 13.692 16.2492 13.514 16.089C13.2649 15.822 13.0513 15.5373 12.8733 15.2525C12.6953 14.9499 12.5174 14.6118 12.3216 14.2025C10.9334 15.8398 9.18923 16.6585 7.08912 16.6585C5.59412 16.6585 4.40168 16.2314 3.5296 15.3771C2.65752 14.5228 2.21259 13.3838 2.21259 11.96C2.21259 10.4472 2.74651 9.21914 3.83216 8.29366C4.91781 7.36819 6.35942 6.90545 8.19256 6.90545C8.79768 6.90545 9.4206 6.95885 10.0791 7.04783C10.7376 7.13682 11.4139 7.2792 12.1258 7.43938V6.14016C12.1258 4.78754 11.8411 3.84427 11.2893 3.29255C10.7198 2.74082 9.75875 2.47386 8.38834 2.47386C7.76542 2.47386 7.12471 2.54505 6.4662 2.70523C5.80769 2.86541 5.16698 3.06118 4.54407 3.31035C4.2593 3.43493 4.04573 3.50612 3.92115 3.54171C3.79657 3.57731 3.70758 3.59511 3.63639 3.59511C3.38722 3.59511 3.26264 3.41713 3.26264 3.04338V2.1713C3.26264 1.88654 3.29824 1.67297 3.38722 1.54839C3.47621 1.4238 3.63639 1.29922 3.88556 1.17464C4.50847 0.854283 5.25597 0.587319 6.12805 0.373749C7.00013 0.14238 7.9256 0.0355951 8.90447 0.0355951C11.0224 0.0355951 12.5708 0.516129 13.5674 1.4772C14.5463 2.43827 15.0446 3.89767 15.0446 5.8554V11.6218H15.0802ZM7.85441 14.327C8.44173 14.327 9.04685 14.2202 9.68756 14.0067C10.3283 13.7931 10.8978 13.4016 11.3783 12.8676C11.6631 12.5295 11.8767 12.1557 11.9834 11.7286C12.0902 11.3014 12.1614 10.7853 12.1614 10.1802V9.43271C11.6453 9.30812 11.0936 9.20134 10.524 9.13015C9.95452 9.05896 9.4028 9.02336 8.85107 9.02336C7.65864 9.02336 6.78656 9.25473 6.19924 9.73526C5.61192 10.2158 5.32716 10.8921 5.32716 11.782C5.32716 12.6185 5.54073 13.2414 5.98567 13.6685C6.41281 14.1135 7.03572 14.327 7.85441 14.327ZM22.1458 16.2492C21.8255 16.2492 21.6119 16.1958 21.4695 16.0712C21.3272 15.9644 21.2026 15.7152 21.0958 15.3771L16.9134 1.61958C16.8066 1.26363 16.7532 1.03226 16.7532 0.907675C16.7532 0.622915 16.8956 0.462736 17.1803 0.462736H18.9245C19.2626 0.462736 19.494 0.516129 19.6186 0.640712C19.761 0.747497 19.8678 0.996663 19.9745 1.33482L22.9645 13.1168L25.741 1.33482C25.8299 0.978866 25.9367 0.747497 26.0791 0.640712C26.2215 0.533927 26.4707 0.462736 26.791 0.462736H28.2148C28.553 0.462736 28.7843 0.516129 28.9267 0.640712C29.0691 0.747497 29.1937 0.996663 29.2649 1.33482L32.0769 13.2592L35.1559 1.33482C35.2626 0.978866 35.3872 0.747497 35.5118 0.640712C35.6542 0.533927 35.8856 0.462736 36.2059 0.462736H37.8611C38.1458 0.462736 38.306 0.605117 38.306 0.907675C38.306 0.996663 38.2882 1.08565 38.2704 1.19244C38.2526 1.29922 38.217 1.4416 38.1459 1.63738L33.8566 15.3949C33.7499 15.7508 33.6253 15.9822 33.4829 16.089C33.3405 16.1958 33.1091 16.267 32.8066 16.267H31.276C30.9378 16.267 30.7065 16.2136 30.5641 16.089C30.4217 15.9644 30.2971 15.733 30.2259 15.3771L27.4673 3.89767L24.7265 15.3593C24.6375 15.7152 24.5307 15.9466 24.3883 16.0712C24.246 16.1958 23.9968 16.2492 23.6764 16.2492H22.1458ZM45.0157 16.7297C44.0902 16.7297 43.1648 16.6229 42.2749 16.4093C41.385 16.1958 40.6909 15.9644 40.2282 15.6974C39.9434 15.5373 39.7476 15.3593 39.6764 15.1991C39.6053 15.0389 39.5697 14.861 39.5697 14.7008V13.7931C39.5697 13.4194 39.712 13.2414 39.979 13.2414C40.0858 13.2414 40.1926 13.2592 40.2994 13.2948C40.4061 13.3304 40.5663 13.4016 40.7443 13.4728C41.3494 13.7397 42.0079 13.9533 42.702 14.0957C43.4139 14.238 44.108 14.3092 44.8199 14.3092C45.9412 14.3092 46.8133 14.1135 47.4184 13.7219C48.0235 13.3304 48.3438 12.7608 48.3438 12.0311C48.3438 11.5328 48.1837 11.1235 47.8633 10.7853C47.543 10.4472 46.9378 10.1446 46.0658 9.85985L43.4851 9.05896C42.1859 8.64961 41.2248 8.0445 40.6375 7.24361C40.0502 6.46051 39.7476 5.58843 39.7476 4.66296C39.7476 3.91546 39.9078 3.25695 40.2282 2.68743C40.5485 2.11791 40.9757 1.61958 41.5096 1.22803C42.0435 0.818688 42.6486 0.516129 43.3605 0.302558C44.0724 0.0889878 44.8199 0 45.603 0C45.9946 0 46.4039 0.0177976 46.7955 0.0711902C47.2048 0.124583 47.5786 0.195773 47.9523 0.266963C48.3083 0.355951 48.6464 0.444939 48.9668 0.551724C49.2871 0.65851 49.5363 0.765295 49.7143 0.87208C49.9634 1.01446 50.1414 1.15684 50.2482 1.31702C50.355 1.4594 50.4084 1.65517 50.4084 1.90434V2.74082C50.4084 3.11457 50.266 3.31035 49.999 3.31035C49.8566 3.31035 49.6253 3.23916 49.3227 3.09678C48.3083 2.63404 47.1692 2.40267 45.9056 2.40267C44.8911 2.40267 44.0902 2.56285 43.5385 2.901C42.9868 3.23916 42.702 3.75528 42.702 4.48498C42.702 4.98332 42.88 5.41046 43.236 5.74861C43.5919 6.08677 44.2504 6.42492 45.1937 6.72748L47.7209 7.52837C49.0024 7.93771 49.9278 8.50723 50.4796 9.23693C51.0313 9.96663 51.2982 10.8031 51.2982 11.7286C51.2982 12.4939 51.1381 13.188 50.8355 13.7931C50.5152 14.3982 50.088 14.9322 49.5363 15.3593C48.9846 15.8042 48.3261 16.1246 47.5608 16.356C46.7599 16.6051 45.9234 16.7297 45.0157 16.7297Z"
        fill={color || "#252f3e"}
      />
      <path
        fillRule="evenodd"
        clipRule="evenodd"
        d="M48.3795 25.3793C42.5241 29.7041 34.0168 32 26.702 32C16.4506 32 7.21371 28.2091 0.237066 21.9088C-0.314658 21.4105 0.183674 20.7342 0.842183 21.1257C8.38835 25.5039 17.6965 28.1557 27.3249 28.1557C33.8211 28.1557 40.9579 26.8031 47.5252 24.0267C48.504 23.5818 49.3405 24.6674 48.3795 25.3793Z"
        fill={color || "#ff9900"}
      />
      <path
        fillRule="evenodd"
        clipRule="evenodd"
        d="M50.8178 22.6029C50.0703 21.6418 45.87 22.1402 43.9657 22.3715C43.3962 22.4427 43.3072 21.9444 43.8233 21.5706C47.1693 19.2214 52.6687 19.8977 53.3094 20.6808C53.9501 21.4816 53.1314 26.9811 49.9991 29.6151C49.5185 30.0245 49.0558 29.8109 49.2694 29.277C49.9813 27.515 51.5653 23.5462 50.8178 22.6029Z"
        fill={color || "#ff9900"}
      />
    </>
  );

  return (
    <IntegrationLogoSvgWrapper viewBox={viewBox} {...rest}>
      <title>AWS integration logo</title>
      {path}
    </IntegrationLogoSvgWrapper>
  );
};
