import styles from "./icon.module.scss";

export default function Icon({
  type,
}: {
  type?: "doc" | "arrow" | "externalLink";
}) {
  return (
    <div className={styles.icon}>
      {type === "doc" && (
        <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
          <path
            d="M2.66667 0C1.18667 0 0 1.18667 0 2.66667V21.3333C0 22.8133 1.18667 24 2.66667 24H21.3333C22.8133 24 24 22.8133 24 21.3333V2.66667C24 1.18667 22.8133 0 21.3333 0H2.66667ZM2.66667 2.66667H21.3333V21.3333H2.66667V2.66667ZM5.33333 5.33333V8H18.6667V5.33333H5.33333ZM5.33333 10.6667V13.3333H18.6667V10.6667H5.33333ZM5.33333 16V18.6667H14.6667V16H5.33333Z"
            fill="currentColor"
          />
        </svg>
      )}
      {type === "arrow" && <div>&rarr;</div>}
      {type === "externalLink" && <div>&#8599;</div>}
      {!type && (
        <div>
          <svg
            viewBox="0 0 49 49"
            fill="none"
            xmlns="http://www.w3.org/2000/svg"
          >
            <path
              d="M19.0153 35.2721C19.0891 35.8711 19.2807 36.4479 19.5129 37.0025C19.7598 37.5497 20.0768 38.0636 20.449 38.5294C21.1972 39.4427 22.137 40.2745 23.298 40.6738C24.4221 41.0805 25.6384 41.1249 26.7919 40.892C27.9418 40.6332 29.0254 40.0749 29.8694 39.2689C30.8903 38.3261 31.5279 37.0357 31.8154 35.701C32.1397 34.1445 31.8817 32.4585 31.0672 31.0684C30.2638 29.6782 28.9296 28.5949 27.3779 28.1142C26.9062 27.9737 26.3349 27.7593 24.8496 27.6632C24.8496 27.6632 24.8496 27.6632 24.8459 27.6632C23.4233 27.5522 22.0965 27.7593 20.8655 28.0736C19.6456 28.3915 18.4994 28.8204 17.4084 29.3269C17.062 29.4933 16.7156 29.656 16.3839 29.8483C15.3261 30.4361 14.3347 31.1053 13.3506 31.7708C12.4919 32.3513 11.6184 32.9096 10.7818 33.527C10.0631 34.0557 9.37387 34.5955 8.74364 35.2315C8.12446 35.8563 7.5495 36.5366 7.00772 37.2206C6.62442 37.7049 6.24481 38.1893 5.89468 38.9546C5.82097 39.1469 5.87625 39.3613 6.03473 39.5425C6.64654 40.2413 7.81118 40.3189 8.66992 40.1969C8.85052 40.171 9.02742 40.1156 9.17485 40.0046C9.32596 39.8937 9.44758 39.7273 9.57657 39.5905C9.80877 39.3465 10.041 39.1062 10.2732 38.8622C10.7891 38.3187 11.3088 37.7863 11.8469 37.2724C11.9243 37.5755 12.0238 37.8713 12.1159 38.1708C12.2449 38.6514 12.4734 39.0988 12.6282 39.5721C12.7277 39.8937 12.8899 40.1895 13.0263 40.5001C13.1663 40.8069 13.3027 41.1138 13.4796 41.4022C13.6344 41.6684 13.7855 41.942 13.9477 42.2045C13.9772 42.2526 14.0066 42.2969 14.0361 42.3413L14.5742 43.0992C15.3998 44.1641 16.347 45.1549 17.4674 45.9203C19.6345 47.4435 22.255 48.3383 24.8939 48.4122C25.5278 48.464 26.1617 48.3974 26.7919 48.3642C26.8435 48.3642 26.8951 48.3568 26.943 48.3494C27.2453 48.3124 27.5438 48.2569 27.846 48.2126L28.2478 48.146C28.3067 48.1349 28.362 48.1238 28.4173 48.109L28.8116 48.0055C30.1016 47.7097 31.3215 47.1699 32.4677 46.5229C34.7454 45.2104 36.7246 43.3026 37.9629 40.9326C38.56 39.805 38.9544 38.5849 39.2381 37.3463C39.2492 37.2908 39.2603 37.2354 39.2713 37.1762L39.404 36.2963C39.4261 36.1336 39.4519 35.9746 39.4667 35.8119L39.4888 35.3276C39.5035 35.0022 39.5219 34.6806 39.5256 34.3552C39.5219 34.0299 39.5072 33.7045 39.4814 33.3828C39.2787 30.7984 38.3315 28.2732 36.7983 26.1991C35.8916 24.9716 34.7897 23.9031 33.5476 23.0305C33.3818 22.9122 33.2122 22.8013 33.0427 22.6904C33.0501 22.6793 33.0574 22.6682 33.0648 22.6534C33.2196 22.3724 33.3781 22.0951 33.5476 21.8289C34.4174 20.3759 35.0808 18.8637 35.4494 17.2924C35.8106 15.7543 35.9912 14.1977 36.0022 12.6338C36.0096 11.0699 35.8916 9.49853 35.5341 7.92719C35.372 7.14337 35.1472 6.34846 34.8707 5.55724C34.5648 4.76973 34.1926 3.97481 33.6471 3.23905C33.3596 2.88781 33.0869 2.53288 32.7294 2.21861C32.5562 2.05963 32.394 1.89695 32.195 1.75646L31.8965 1.53832C31.7712 1.44959 31.6459 1.34975 31.4837 1.27951L30.5586 0.83583C30.4075 0.747096 30.2453 0.732313 30.0905 0.680552L29.6188 0.551145C29.464 0.51787 29.3018 0.447626 29.1507 0.440232L28.6937 0.399556C28.3952 0.384767 28.0671 0.310822 27.8165 0.388465L27.0131 0.521572C26.7661 0.59182 26.5376 0.695339 26.3165 0.82844C25.8742 1.08725 25.4836 1.46437 25.2293 1.94501C25.1039 2.18163 25.0229 2.42936 24.9897 2.62532C24.9565 2.82867 24.9491 2.93588 24.9602 3.12075C24.9676 3.20948 24.9639 3.28343 24.9786 3.38695L25.0708 3.77516L25.1187 3.97111L25.2551 4.21513L25.5278 4.69947C25.6015 4.82518 25.7489 4.95089 25.8558 5.0729C25.9664 5.25407 26.0806 5.40935 26.1838 5.6127L26.2207 5.70513L26.2428 5.76429L26.2575 5.81235L26.2907 5.90848C26.3423 6.02679 26.3607 6.18208 26.405 6.31888C26.4381 6.46307 26.4565 6.61836 26.486 6.76994L26.5339 7.25058C26.5782 7.9087 26.545 8.60748 26.4381 9.30626C26.1691 11.0107 25.5904 12.7188 24.8054 14.3087C24.0167 15.8985 23.0179 17.3774 21.8422 18.6566C21.4921 19.0301 19.8925 20.6864 19.3987 20.8824C16.1627 21.5516 13.1221 22.7532 10.2547 24.1249C9.38861 24.539 8.53724 24.9864 7.67481 25.4041C6.85293 25.7998 6.10845 26.395 5.65512 27.2047C5.20179 28.0144 5.46715 29.0792 6.21532 29.6264C6.64285 29.937 7.01141 29.8741 7.71167 29.6079C7.99546 29.5007 8.26451 29.3491 8.53356 29.2049C12.1233 27.2417 15.7426 25.4633 19.524 24.5316C20.4343 24.3209 21.3446 24.1323 22.266 24.0288C23.1727 23.9031 24.0683 23.8698 24.975 23.8994C26.7735 23.9622 28.5647 24.3134 30.0611 25.0307C31.0119 25.4892 31.926 26.1399 32.7184 26.8941C33.9862 28.0958 34.9592 29.5894 35.501 31.2495C35.7737 32.0777 35.9432 32.9466 36.0022 33.8191C36.0133 34.0373 36.028 34.2554 36.0206 34.4772L35.9911 35.1353L35.9801 35.4644C35.969 35.5753 35.9469 35.6825 35.9322 35.7898L35.8364 36.4405C35.2798 39.4611 33.2307 42.1158 30.5734 43.5577C29.6593 44.0347 28.6826 44.3859 27.6765 44.5855C26.6666 44.7519 25.6383 44.8259 24.6174 44.7297C23.3275 44.6151 22.0154 44.3674 20.8324 43.7758C19.3655 43.066 18.0903 41.9642 17.1246 40.6517C16.6234 40.0046 16.2512 39.2726 15.9084 38.5331C15.831 38.3446 15.772 38.1486 15.6983 37.96C15.6357 37.7678 15.5435 37.5829 15.5067 37.3796L15.3593 36.788C15.3371 36.6882 15.3077 36.5921 15.2856 36.4922L15.245 36.1891C15.2229 35.9857 15.1566 35.372 15.0644 34.858C15.8568 34.2998 16.6603 33.7637 17.4932 33.2793C18.0792 32.9429 18.6542 32.5879 19.2697 32.3328C18.9638 33.2793 18.8716 34.2924 19.0227 35.2684L19.0153 35.2721ZM25.2145 20.3759C26.2354 19.104 27.1015 17.7249 27.8165 16.283C28.4173 15.0703 28.9185 13.8095 29.3018 12.5007C29.6888 11.1956 29.9505 9.83867 30.0389 8.41892C30.0869 7.50939 30.0574 6.57399 29.851 5.59052C29.7957 5.35389 29.7515 5.12466 29.6667 4.88434L29.6077 4.70687L29.5782 4.61813C29.5782 4.61813 29.5856 4.64771 29.5893 4.6625C29.5893 4.6625 29.5819 4.6514 29.5782 4.64771C29.5524 4.61073 29.5119 4.57007 29.4566 4.5294C29.4013 4.47764 29.4271 4.39999 29.4713 4.37411C29.5635 4.31865 29.7072 4.33715 29.8326 4.4037C29.851 4.41109 29.8583 4.42218 29.921 4.47025C29.9947 4.5294 30.0721 4.57376 30.1458 4.63662L30.3559 4.83997C30.4296 4.90283 30.4959 4.97307 30.5586 5.05811C30.6876 5.21339 30.8203 5.36868 30.9308 5.55724C30.9861 5.64967 31.0525 5.73101 31.1041 5.82714L31.2589 6.12292C31.6643 6.91414 31.9444 7.83476 32.1287 8.79235C32.3719 10.1012 32.3977 11.4803 32.3498 12.8445C32.3166 13.7134 32.335 14.6007 32.1913 15.4659C32.007 16.5307 31.7269 17.577 31.3363 18.5494C30.9456 19.5144 30.448 20.4202 29.8436 21.1116C29.8252 21.1301 29.8141 21.1523 29.7994 21.1745C29.6777 21.1375 29.5561 21.0968 29.4345 21.0599C28.0414 20.6532 26.6298 20.4424 25.2219 20.3759H25.2145ZM27.916 32.7802C28.1777 33.1647 28.3473 33.6084 28.4062 34.0705C28.4726 34.5401 28.4025 35.017 28.2478 35.4533C28.1446 35.7306 28.0119 36.0042 27.8313 36.2482C27.2821 37.0357 26.3239 37.5681 25.314 37.5053C24.4405 37.4646 23.6297 36.9729 23.1469 36.2741C22.8078 35.7971 22.6678 35.2352 22.6162 34.6843C22.583 34.333 22.6346 33.7045 22.7341 33.3422C22.9626 32.4548 24.0019 31.6636 25.3324 31.5712C25.373 31.5749 25.4172 31.5749 25.4578 31.5749C25.9332 31.5564 26.4013 31.6599 26.8288 31.8633C27.26 32.0666 27.6286 32.3994 27.916 32.7876V32.7802Z"
              fill="currentColor"
            />
          </svg>
        </div>
      )}
    </div>
  );
}
