/* eslint-disable complexity */
import React from 'react';
import { Svg, Path } from 'react-native-svg';

export default function PinSvg({ color, height, width, style, variant = 'outline' }) {
  let children;

  switch (variant) {
    case 'outline':
      children = (
        <Path
          fillRule="evenodd"
          clipRule="evenodd"
          d="M13.11 4.43217L13.2371 3.62719L16.6978 7.08792L15.8928 7.21502C15.6006 7.26116 15.3304 7.39872 15.1212 7.60794L12.6312 10.098C12.4414 10.2878 12.3101 10.5282 12.2531 10.7905L11.5866 13.8562L6.46884 8.73835L9.53448 8.07191C9.7968 8.01488 10.0372 7.88364 10.227 7.69381L12.7171 5.20377C12.9263 4.99455 13.0638 4.72443 13.11 4.43217ZM12.198 1.87265C12.2617 1.46901 12.7565 1.30813 13.0454 1.59708L18.7279 7.27955C19.0169 7.56851 18.856 8.06325 18.4523 8.12699L16.0956 8.49911C16.0747 8.5024 16.0554 8.51223 16.0405 8.52717L13.5504 11.0172C13.5369 11.0308 13.5275 11.0479 13.5234 11.0667L12.5457 15.5642C12.4617 15.9508 11.9833 16.0913 11.7036 15.8115L8.56813 12.6761L5.03259 16.2116C4.77875 16.4655 4.36719 16.4655 4.11335 16.2116C3.85951 15.9578 3.85951 15.5462 4.11335 15.2924L7.64889 11.7569L4.51346 8.62144C4.23374 8.34172 4.37424 7.86333 4.7608 7.7793L9.25832 6.80158C9.27705 6.7975 9.29423 6.78813 9.30779 6.77457L11.7978 4.28453C11.8128 4.26959 11.8226 4.25029 11.8259 4.22942L12.198 1.87265Z"
          fill={color || 'currentColor'}
        />
      );
      break;

    case 'fill':
      children = (
        <>
          <Path
            fillRule="evenodd"
            clipRule="evenodd"
            d="M13.1692 1.64835C12.8802 1.3594 12.3855 1.52028 12.3218 1.92392L11.9496 4.28069C11.9463 4.30156 11.9365 4.32086 11.9216 4.3358L9.43153 6.82584C9.41798 6.8394 9.4008 6.84877 9.38207 6.85285L4.88454 7.83057C4.49799 7.9146 4.35749 8.39299 4.63721 8.67271L7.52515 11.5607L3.98961 15.0962C3.59909 15.4867 3.59909 16.1199 3.98961 16.5104C4.38014 16.9009 5.0133 16.9009 5.40383 16.5104L8.93936 12.9749L11.8273 15.8628C12.107 16.1425 12.5854 16.002 12.6694 15.6155L13.6472 11.1179C13.6512 11.0992 13.6606 11.082 13.6742 11.0685L16.1642 8.57844C16.1792 8.5635 16.1985 8.55367 16.2193 8.55038L18.5761 8.17826C18.9797 8.11452 19.1406 7.61978 18.8517 7.33082L13.1692 1.64835Z"
            fill={color || 'currentColor'}
          />
        </>
      );
      break;

    case 'closed':
      children = (
        <>
          <Path
            fillRule="evenodd"
            clipRule="evenodd"
            d="M13.2371 3.62719L13.11 4.43217C13.0638 4.72443 12.9263 4.99455 12.717 5.20377L11.0211 6.89973L10.1018 5.9805L11.7978 4.28453C11.8128 4.26959 11.8226 4.25029 11.8259 4.22942L12.198 1.87265C12.2617 1.46901 12.7565 1.30813 13.0454 1.59708L18.7279 7.27955C19.0169 7.56851 18.856 8.06325 18.4523 8.12699L16.0956 8.49911C16.0747 8.5024 16.0554 8.51223 16.0404 8.52717L14.3445 10.2231L13.4253 9.30388L15.1212 7.60794C15.3304 7.39872 15.6006 7.26116 15.8928 7.21502L16.6978 7.08792L13.2371 3.62719ZM7.14064 7.26194L8.23345 8.35474L6.46883 8.73835L11.5866 13.8562L11.9703 12.0915L13.0631 13.1843L12.5457 15.5642C12.4616 15.9508 11.9833 16.0913 11.7035 15.8115L8.56811 12.6761L5.03258 16.2116C4.77874 16.4655 4.36718 16.4655 4.11334 16.2116C3.8595 15.9578 3.8595 15.5462 4.11334 15.2924L7.64887 11.7569L4.51344 8.62144C4.23372 8.34172 4.37423 7.86333 4.76078 7.7793L7.14064 7.26194Z"
            fill={color || 'currentColor'}
          />
          <Path
            d="M19 17L4 2"
            stroke={color || 'currentColor'}
            strokeWidth="1.3"
            strokeLinecap="round"
            fill={color || 'currentColor'}
          />
        </>
      );
      break;

    default:
      break;
  }

  return (
    <Svg
      width={`${width || 20}`}
      height={`${height || 20}`}
      viewBox="0 0 20 20"
      fill="none"
      style={style}
    >
      {children}
    </Svg>
  );
}
