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

export const getAmexLogo = (size: Size) => {
    return size === 'regular' ? amexLogoRegular() : amexLogoSmall();
};

const amexLogoRegular = () => {
    return (
        <svg
            xmlns="http://www.w3.org/2000/svg"
            width="44"
            height="15"
            viewBox="0 0 44 15"
            fill="none"
        >
            <path
                d="M2.22743 0.299099L0.00830078 5.45869H1.45308L1.86254 4.42549H4.24293L4.65024 5.45869H6.12687L3.90976 0.299099H2.22743ZM3.04847 1.49985L3.77403 3.30534H2.3208L3.04847 1.49985ZM6.2796 5.45781V0.298218L8.33267 0.30583L9.52683 3.63244L10.6924 0.298218H12.7291V5.45781H11.4392V1.65601L10.0719 5.45781H8.94062L7.56949 1.65601V5.45781H6.2796ZM13.6116 5.45781V0.298218H17.8208V1.45233H14.9151V2.33488H17.7529V3.42115H14.9151V4.33767H17.8208V5.45781H13.6116ZM18.5676 0.299099V5.45869H19.8575V3.62566H20.4006L21.9472 5.45869H23.5235L21.8263 3.55777C22.5228 3.49899 23.2413 2.90116 23.2413 1.97298C23.2413 0.887244 22.3892 0.299099 21.4381 0.299099H18.5676ZM19.8575 1.45321H21.3319C21.6857 1.45321 21.943 1.72989 21.943 1.9963C21.943 2.33906 21.6096 2.53944 21.3511 2.53944H19.8575V1.45321ZM25.085 5.45781H23.7679V0.298218H25.085V5.45781ZM28.2079 5.45781H27.9236C26.5481 5.45781 25.713 4.3741 25.713 2.89922C25.713 1.38787 26.5387 0.298218 28.2758 0.298218H29.7014V1.52023H28.2237C27.5185 1.52023 27.0198 2.07053 27.0198 2.91194C27.0198 3.91118 27.5901 4.33085 28.4115 4.33085H28.751L28.2079 5.45781ZM31.0147 0.299099L28.7956 5.45869H30.2404L30.6498 4.42549H33.0302L33.4375 5.45869H34.9141L32.6971 0.299099H31.0147ZM31.8357 1.49985L32.5613 3.30534H31.108L31.8357 1.49985ZM35.0647 5.45781V0.298218H36.7047L38.7986 3.53995V0.298218H40.0886V5.45781H38.5016L36.3546 2.13125V5.45781H35.0647ZM9.40253 14.4871V9.32751H13.6116V10.4816H10.706V11.3642H13.5437V12.4504H10.706V13.367H13.6116V14.4871H9.40253ZM30.0274 14.4871V9.32751H34.2365V10.4816H31.3308V11.3642H34.155V12.4504H31.3308V13.367H34.2364V14.4871H30.0274ZM13.775 14.4871L15.8244 11.9392L13.7262 9.32751H15.3513L16.6009 10.942L17.8548 9.32751H19.4163L17.3456 11.9073L19.3988 14.4871H17.774L16.5606 12.8981L15.3768 14.4871H13.775ZM19.552 9.32839V14.488H20.8758V12.8587H22.2336C23.3825 12.8587 24.2533 12.2491 24.2533 11.0638C24.2533 10.0819 23.5703 9.32839 22.4012 9.32839H19.552ZM20.8758 10.4953H22.3057C22.6769 10.4953 22.9422 10.7227 22.9422 11.0893C22.9422 11.4336 22.6782 11.6833 22.3015 11.6833H20.8758V10.4953ZM24.8134 9.32751V14.4871H26.1033V12.6541H26.6465L28.193 14.4871H29.7693L28.0721 12.5862C28.7687 12.5274 29.4872 11.9296 29.4872 11.0014C29.4872 9.91566 28.635 9.32751 27.6839 9.32751H24.8134ZM26.1033 10.4816H27.5778C27.9315 10.4816 28.1888 10.7583 28.1888 11.0248C28.1888 11.3675 27.8554 11.5679 27.5969 11.5679H26.1033V10.4816ZM34.8339 14.4871V13.367H37.4154C37.7974 13.367 37.9628 13.1605 37.9628 12.9341C37.9628 12.7172 37.7979 12.498 37.4154 12.498H36.2488C35.2349 12.498 34.6701 11.8802 34.6701 10.9526C34.6701 10.1253 35.1873 9.32751 36.6941 9.32751H39.206L38.6629 10.4884H36.4904C36.0751 10.4884 35.9473 10.7063 35.9473 10.9145C35.9473 11.1283 36.1053 11.3642 36.4225 11.3642H37.6445C38.7749 11.3642 39.2654 12.0054 39.2654 12.845C39.2654 13.7478 38.7188 14.4871 37.583 14.4871H34.8339ZM39.5681 14.4871V13.367H42.1496C42.5316 13.367 42.697 13.1605 42.697 12.9341C42.697 12.7172 42.5321 12.498 42.1496 12.498H40.9831C39.9691 12.498 39.4044 11.8802 39.4044 10.9526C39.4044 10.1253 39.9215 9.32751 41.4283 9.32751H43.9402L43.3971 10.4884H41.2246C40.8094 10.4884 40.6815 10.7063 40.6815 10.9145C40.6815 11.1283 40.8395 11.3642 41.1568 11.3642H42.3788C43.5091 11.3642 43.9996 12.0054 43.9996 12.845C43.9996 13.7478 43.4531 14.4871 42.3172 14.4871H39.5681Z"
                fill="white"
            />
        </svg>
    );
};

const amexLogoSmall = () => {
    return (
        <svg
            xmlns="http://www.w3.org/2000/svg"
            width="34"
            height="12"
            viewBox="0 0 34 12"
            fill="none"
        >
            <path
                d="M2.38534 0.974293L0.745117 4.84399H1.813L2.11564 4.06909H3.87506L4.17611 4.84399H5.26754L3.62881 0.974293H2.38534ZM2.9922 1.87486L3.52848 3.22898H2.45436L2.9922 1.87486ZM5.38042 4.84333V0.973633L6.89791 0.979342L7.78055 3.4743L8.64205 0.973633H10.1474V4.84333H9.19404V1.99198L8.18339 4.84333H7.34726L6.33383 1.99198V4.84333H5.38042ZM10.7998 4.84333V0.973633H13.9109V1.83922H11.7632V2.50113H13.8607V3.31583H11.7632V4.00322H13.9109V4.84333H10.7998ZM14.4629 0.974293V4.84399H15.4163V3.46922H15.8177L16.9608 4.84399H18.1259L16.8714 3.4183C17.3863 3.37421 17.9174 2.92584 17.9174 2.22971C17.9174 1.4154 17.2875 0.974293 16.5845 0.974293H14.4629ZM15.4163 1.83988H16.5061C16.7675 1.83988 16.9577 2.04738 16.9577 2.2472C16.9577 2.50427 16.7113 2.65455 16.5202 2.65455H15.4163V1.83988ZM19.2801 4.84333H18.3066V0.973633H19.2801V4.84333ZM21.5883 4.84333H21.3782C20.3615 4.84333 19.7442 4.03054 19.7442 2.92439C19.7442 1.79088 20.3546 0.973633 21.6385 0.973633H22.6922V1.89014H21.6C21.0788 1.89014 20.7102 2.30287 20.7102 2.93393C20.7102 3.68335 21.1316 3.9981 21.7388 3.9981H21.9897L21.5883 4.84333ZM23.6629 0.974293L22.0227 4.84399H23.0906L23.3932 4.06909H25.1526L25.4537 4.84399H26.5451L24.9064 0.974293H23.6629ZM24.2698 1.87486L24.806 3.22898H23.7319L24.2698 1.87486ZM26.6564 4.84333V0.973633H27.8685L29.4162 3.40493V0.973633H30.3697V4.84333H29.1967L27.6098 2.34841V4.84333H26.6564ZM7.68868 11.6153V7.7456H10.7998V8.61119H8.6521V9.27314H10.7496V10.0878H8.6521V10.7752H10.7998V11.6153H7.68868ZM22.9331 11.6153V7.7456H26.0442V8.61119H23.8965V9.27314H25.984V10.0878H23.8965V10.7752H26.0442V11.6153H22.9331ZM10.9205 11.6153L12.4353 9.70434L10.8844 7.7456H12.0856L13.0092 8.95647L13.936 7.7456H15.0901L13.5597 9.68045L15.0772 11.6153H13.8763L12.9795 10.4235L12.1045 11.6153H10.9205ZM15.1905 7.74626V11.616H16.1689V10.394H17.1725C18.0217 10.394 18.6654 9.93683 18.6654 9.04784C18.6654 8.31139 18.1605 7.74626 17.2964 7.74626H15.1905ZM16.1689 8.62142H17.2258C17.5002 8.62142 17.6963 8.79203 17.6963 9.06692C17.6963 9.32518 17.5012 9.51245 17.2227 9.51245H16.1689V8.62142ZM19.0793 7.7456V11.6153H20.0327V10.2405H20.4342L21.5773 11.6153H22.7424L21.488 10.1896C22.0028 10.1456 22.5338 9.69715 22.5338 9.00102C22.5338 8.18671 21.904 7.7456 21.201 7.7456H19.0793ZM20.0327 8.61119H21.1226C21.384 8.61119 21.5742 8.81869 21.5742 9.01854C21.5742 9.27561 21.3278 9.42586 21.1367 9.42586H20.0327V8.61119ZM26.4858 11.6153V10.7752H28.3938C28.6762 10.7752 28.7984 10.6204 28.7984 10.4506C28.7984 10.2879 28.6766 10.1234 28.3938 10.1234H27.5316C26.7821 10.1234 26.3647 9.66012 26.3647 8.96445C26.3647 8.34396 26.747 7.7456 27.8607 7.7456H29.7173L29.3159 8.61631H27.7101C27.4032 8.61631 27.3087 8.77972 27.3087 8.93581C27.3087 9.09619 27.4255 9.27314 27.66 9.27314H28.5632C29.3987 9.27314 29.7612 9.75401 29.7612 10.3837C29.7612 11.0608 29.3572 11.6153 28.5177 11.6153H26.4858ZM29.985 11.6153V10.7752H31.893C32.1754 10.7752 32.2976 10.6204 32.2976 10.4506C32.2976 10.2879 32.1758 10.1234 31.893 10.1234H31.0308C30.2813 10.1234 29.864 9.66012 29.864 8.96445C29.864 8.34396 30.2462 7.7456 31.3599 7.7456H33.2165L32.8151 8.61631H31.2094C30.9024 8.61631 30.8079 8.77972 30.8079 8.93581C30.8079 9.09619 30.9247 9.27314 31.1592 9.27314H32.0624C32.8979 9.27314 33.2604 9.75401 33.2604 10.3837C33.2604 11.0608 32.8565 11.6153 32.0169 11.6153H29.985Z"
                fill="white"
            />
        </svg>
    );
};
