import React from 'react';
import type { Size } from '../types';

export const getVisaLogo = (size: Size) => {
    return size === 'regular' ? visaLogoRegular() : visaLogoSmall();
};

const visaLogoRegular = () => {
    return (
        <svg
            width="45"
            height="32"
            viewBox="0 0 45 32"
            fill="none"
            xmlns="http://www.w3.org/2000/svg"
        >
            <path
                d="M23.2729 12.8118C23.2473 14.9083 25.0769 16.0784 26.4552 16.7739C27.8713 17.4877 28.3469 17.9454 28.3415 18.5835C28.3307 19.5604 27.2119 19.9915 26.1646 20.0083C24.3377 20.0377 23.2756 19.4974 22.4311 19.0888L21.773 22.2784C22.6203 22.6828 24.1891 23.0355 25.816 23.0509C29.6347 23.0509 32.1332 21.0985 32.1467 18.0713C32.1616 14.2295 27.0159 14.0168 27.0511 12.2996C27.0632 11.7789 27.5429 11.2233 28.5942 11.082C29.1145 11.0106 30.5509 10.956 32.1791 11.7328L32.8183 8.64675C31.9427 8.31646 30.8171 8.00016 29.4158 8.00016C25.8214 8.00016 23.2932 9.97912 23.2729 12.8118ZM38.9598 8.26607C38.2626 8.26607 37.6748 8.68734 37.4126 9.33393L31.9575 22.8242H35.7735L36.5329 20.6507H41.1962L41.6367 22.8242H45L42.065 8.26607H38.9598ZM39.4936 12.1988L40.5949 17.6654H37.5788L39.4936 12.1988ZM18.6462 8.26607L15.6382 22.8242H19.2745L22.2811 8.26607H18.6462ZM13.2668 8.26607L9.48186 18.1749L7.95087 9.7496C7.77115 8.8091 7.06174 8.26607 6.27395 8.26607H0.0864813L0 8.68874C1.27019 8.97425 2.71335 9.4347 3.58762 9.92734C4.12273 10.2282 4.27542 10.4914 4.45108 11.2065L7.35091 22.8242H11.1939L17.0855 8.26607H13.2668Z"
                fill="white"
            />
        </svg>
    );
};

const visaLogoSmall = () => {
    return (
        <svg
            width="33"
            height="24"
            viewBox="0 0 33 24"
            fill="none"
            xmlns="http://www.w3.org/2000/svg"
        >
            <path
                d="M17.0668 9.60889C17.048 11.1813 18.3897 12.0588 19.4005 12.5805C20.439 13.1158 20.7878 13.459 20.7838 13.9377C20.7759 14.6704 19.9554 14.9936 19.1874 15.0062C17.8477 15.0283 17.0688 14.6231 16.4495 14.3166L15.9669 16.7088C16.5882 17.0121 17.7387 17.2767 18.9317 17.2882C21.7321 17.2882 23.5644 15.8239 23.5743 13.5535C23.5852 10.6722 19.8117 10.5126 19.8375 9.22471C19.8464 8.83424 20.1982 8.41752 20.9691 8.3115C21.3506 8.25797 22.404 8.21704 23.598 8.7996L24.0668 6.48509C23.4246 6.23737 22.5992 6.00015 21.5716 6.00015C18.9357 6.00015 17.0817 7.48437 17.0668 9.60889ZM28.5705 6.19959C28.0592 6.19959 27.6282 6.51553 27.4359 7.00048L23.4355 17.1182H26.2339L26.7908 15.488H30.2105L30.5336 17.1182H33L30.8477 6.19959H28.5705ZM28.962 9.14913L29.7696 13.2491H27.5578L28.962 9.14913ZM13.6739 6.19959L11.4681 17.1182H14.1346L16.3395 6.19959H13.6739ZM9.72896 6.19959L6.95337 13.6312L5.83064 7.31223C5.69885 6.60685 5.17861 6.19959 4.60089 6.19959H0.0634196L0 6.51658C0.931476 6.73071 1.98979 7.07605 2.63092 7.44553C3.02333 7.67121 3.13531 7.86855 3.26413 8.40492L5.39067 17.1182H8.20888L12.5293 6.19959H9.72896Z"
                fill="white"
            />
        </svg>
    );
};
