import React from 'react';
import Svg, { G, Path, Defs, LinearGradient, Stop, ClipPath, Rect } from 'react-native-svg';

const TickIcon = ({ isBlackAndWhite }: { isBlackAndWhite: boolean }) => {
  return (
    <Svg width="20" height="20" viewBox="0 0 20 20" fill="none">
      <G clipPath="url(#clip0_761_5423)">
        <Path
          d="M19.9984 10.5029C19.964 10.658 19.9356 10.8152 19.8936 10.9683C19.6665 11.8033 19.0786 12.3593 18.4183 12.8524C17.9969 13.1653 17.4849 13.3311 16.9606 13.3247C16.9093 13.3247 16.8578 13.3182 16.7606 13.3114C16.8154 13.0496 16.8466 12.7991 16.9206 12.5622C17.3205 11.2794 18.5155 10.3438 19.8 10.2944C19.866 10.292 19.9324 10.3 20 10.3033L19.9984 10.5029ZM0.0019954 10.5029C0.0363907 10.6584 0.0567861 10.8184 0.107577 10.9683C0.483512 12.0787 1.25897 12.8047 2.33158 13.2132C2.59473 13.3138 2.89907 13.3062 3.21142 13.3527C3.19982 13.1992 3.20182 13.0998 3.18383 13.0044C2.96947 11.8675 2.33198 11.0533 1.29537 10.559C0.889042 10.3654 0.457516 10.2584 0 10.3025L0.0019954 10.5029ZM6.56084 0C6.50284 0.0272605 6.44684 0.0589302 6.38684 0.0801767C6.02014 0.20546 5.69028 0.420233 5.42702 0.70514C5.04256 1.12275 4.74242 1.61106 4.54316 2.14307C4.378 2.58403 4.35684 3.03742 4.45479 3.51206C4.54879 3.48239 4.63274 3.46275 4.71116 3.42947C5.68577 3.01457 6.28167 2.27015 6.56163 1.26476C6.67679 0.850656 6.71479 0.42693 6.60163 0.0020046L6.56084 0ZM13.3596 0C13.0796 1.64078 14.2794 3.13924 15.5592 3.4387C15.572 3.37496 15.59 3.31202 15.5964 3.24788C15.7136 2.12944 14.9525 0.731595 13.9463 0.226893C13.7699 0.138302 13.5807 0.0749628 13.3976 0H13.3596ZM7.30991 18.8299C8.39251 18.7096 9.38949 18.4074 10.0014 17.3502C10.4449 18.1343 11.1268 18.5072 11.9314 18.7076C12.7361 18.908 13.5227 18.9124 14.2558 18.4226C14.2227 18.3685 14.197 18.322 14.1671 18.2791C13.2872 17.0203 11.506 16.5793 10.139 17.2748C10.0706 17.3097 9.9586 17.3221 9.89381 17.2901C8.90079 16.8027 7.91419 16.8351 6.93674 17.3226C6.44219 17.5682 6.02805 17.9506 5.74335 18.4246C6.23126 18.738 6.75037 18.8916 7.30991 18.8299ZM12.6869 16.8107C13.6727 17.8621 16.2519 17.6124 17.0229 16.4214C15.8175 15.3611 13.6771 15.5571 12.6869 16.8107ZM1.41374 3.63312C0.429121 4.73033 0.893837 7.34479 2.09362 7.9794C3.07465 6.66414 2.68232 4.50944 1.41374 3.63312ZM17.914 7.98061C19.129 7.30354 19.5585 4.71828 18.5851 3.6247C17.1525 4.70465 17.0349 6.87819 17.912 7.98061H17.914ZM4.96433 15.4028C4.422 13.8578 2.41717 13.0096 0.995023 13.6157C1.35935 15.0151 3.71933 16.0774 4.96233 15.4028H4.96433ZM15.0377 15.4112C16.2855 16.0678 18.6454 15.0079 19.0102 13.6145C17.5065 12.9963 15.5272 13.9332 15.0357 15.4112H15.0377ZM2.98027 16.4326C3.79493 17.6353 6.34926 17.8437 7.31349 16.8099C6.23567 15.4677 4.03326 15.4313 2.97827 16.4326H2.98027ZM2.2052 10.7318C2.69592 9.27502 1.74448 7.30633 0.167967 6.84972C-0.39993 8.20307 0.857446 10.5197 2.2032 10.7318H2.2052ZM19.8273 6.85493C18.4207 7.22577 17.2849 9.08219 17.7904 10.7382C19.2374 10.4552 20.398 8.08605 19.8273 6.85493ZM2.60473 2.49985C2.43223 2.95567 2.35188 3.44133 2.36837 3.92856C2.39077 4.47577 2.59513 4.95763 2.92187 5.38977C4.31763 4.6774 4.57958 2.73837 3.60935 1.42471C3.13344 1.66242 2.7867 2.00678 2.60473 2.49985ZM16.4154 1.39945C15.4512 2.62933 15.6776 4.61005 17.1141 5.27912C18.1263 4.1767 17.71 1.83159 16.4154 1.39945ZM11.032 19.9795C11.2836 19.2792 10.7773 18.2819 10.0762 18.081C9.99995 18.0658 9.92084 18.076 9.85102 18.1103C9.31354 18.3608 9.00679 18.7918 8.922 19.3734C8.89321 19.5699 8.91721 19.7743 8.91721 20C9.54349 19.8184 9.79702 19.3707 9.99981 18.8287C10.2073 19.3767 10.4605 19.8224 11.032 19.9795Z"
          fill="url(#dynamicGradient)"
        />
        <Path
          fillRule="evenodd"
          clipRule="evenodd"
          d="M8.26313 14.0869C8.3423 14.0717 8.41792 14.0335 8.47921 13.9722L9.03867 13.4128L9.49359 12.9846C9.52855 12.9517 9.55655 12.9142 9.57755 12.8739L15.2831 7.16837C15.4458 7.00566 15.4458 6.74183 15.2831 6.57912L14.2425 5.53854C14.0798 5.37583 13.816 5.37583 13.6533 5.53854L8.19488 10.997L5.95817 8.62058C5.80042 8.45299 5.53676 8.44504 5.36917 8.60274L4.29759 9.61137C4.13003 9.76908 4.12205 10.0328 4.27976 10.2003L6.82051 12.8997C6.82946 12.9107 6.83909 12.9214 6.84938 12.9317L6.8703 12.9526L7.83301 13.9754C7.94659 14.0961 8.11509 14.134 8.26313 14.0869Z"
          fill="#144456"
        />
      </G>
      <Defs>
        <LinearGradient
          id="dynamicGradient"
          x1="10.0002"
          y1="19.9543"
          x2="10.0002"
          y2="-0.27179"
          gradientUnits="userSpaceOnUse"
        >
          {isBlackAndWhite
            ? [
                <Stop key="0" offset="0" stopColor="#555555" />,
                <Stop key="1" offset="1" stopColor="#BBBBBB" />
              ]
            : [
                <Stop key="0" offset="0" stopColor="#F27127" />,
                <Stop key="1" offset="1" stopColor="#FFBB31" />
              ]}
        </LinearGradient>
        <ClipPath id="clip0_761_5423">
          <Rect width="20" height="20" fill="white" />
        </ClipPath>
      </Defs>
    </Svg>
  );
};

export default TickIcon;
