import { IClient } from "@business-logic/types/Client";
import { IPaymentDetails } from "@business-logic/types/CustomerDetails";
import { PaymentType } from "@business-logic/types/Enums";

const essentialClients: IClient[] = [
    {
        clientTag: 'A8156D39-5943-4D3B-88C3-0D1A8810B51',
        accountName: 'Acadia',
        clientFlags: {}
    },
    {
        clientTag: '4fc3010a-ef5f-434d-93aa-7fdf4878d667',
        accountName: 'AIG Private Client',
        clientFlags: {}
    },
    {
        clientTag: '93FE1F55-19FA-4B7D-8F49-6E6C9F0E2B42',
        accountName: 'Alfa Alliance',
        clientFlags: {}
    },
    {
        clientTag: '1FC7999E-E0AC-484C-9AC9-267D1A2E5493',
        accountName: 'American Family Insurance',
        clientFlags: { isTpaEnabled: true }
    },
    {
        clientTag: '65FD47E0-F0DB-47FD-8CBB-E6F4F3BBF457',
        accountName: 'Apparent Insurance',
        clientFlags: {}
    },
    {
        clientTag: '009E3AE9-8E4E-40B7-9C7B-4516F640F10',
        accountName: 'Berkley One',
        clientFlags: {}
    },
    {
        clientTag: '0B3A3B02-5267-4302-A305-E742E1F1BFC5',
        accountName: 'Branch Insurance',
        clientFlags: {}
    },
    {
        clientTag: '7DF15A1A-0FD3-42D3-A6B1-26FB36550BDC',
        accountName: 'Brethren Mutual',
        clientFlags: {}
    },
    {
        clientTag: 'E2D26369-1739-402C-9A85-F5F748C72647',
        accountName: 'Certainly',
        clientFlags: { isTpaEnabled: true }
    },
    {
        clientTag: '394EF217-7882-4281-B4B8-FA11FDA7D500',
        accountName: 'Continental Western',
        clientFlags: {}
    },
    {
        clientTag: 'BF29B5A9-EFD8-4138-B301-CAD9C2495E74',
        accountName: 'Donegal Mutual',
        clientFlags: {}
    },
    {
        clientTag: 'FDEAB808-9922-4851-A692-7128ECF9F879',
        accountName: 'Elephant Insurance',
        clientFlags: {}
    },
    {
        clientTag: '42AC5AFB-0A08-4845-935A-9FA3A1BBF2D0',
        accountName: 'Encompass',
        clientFlags: {}
    },
    {
        clientTag: '1BED97B1-4593-4E09-AF1A-9DDD2CCAD0A4',
        accountName: 'Farm Bureau',
        clientFlags: {}
    },
    {
        clientTag: '05CC1609-3631-4044-B45A-E78E13343B9A',
        accountName: 'Federated Insurance',
        clientFlags: { isTpaEnabled: true }
    },
    {
        clientTag: 'C05C2F61-26EB-4849-99DD-0172EDA4C70F',
        accountName: 'Fremont Insurance',
        clientFlags: {}
    },
    {
        clientTag: 'B6911ACB-4B6A-4549-B674-0FC79AA6E782',
        accountName: 'Grange Insurance Association',
        clientFlags: {}
    },
    {
        clientTag: 'BDA2D606-D34F-4ED3-83DD-7BF56AC9C2CE',
        accountName: 'GuideOne Insurance',
        clientFlags: {}
    },
    {
        clientTag: '3CC58C8F-9207-44AF-B5F1-E1BA84CFADD1',
        accountName: 'Hagerty',
        clientFlags: { isTpaEnabled: true }
    },
    {
        clientTag: '6D13AEF6-CE16-400F-9A29-A1AED5C47D48',
        accountName: 'Liberty Mutual',
        clientFlags: { isTpaEnabled: true }
    },
    {
        clientTag: 'F680CCE4-6D88-4845-9FA4-746CF54B4AC',
        accountName: 'M Plate',
        clientFlags: {}
    },
    {
        clientTag: '988C2DCB-C95E-452D-9AE3-23B719FB3991',
        accountName: 'Main Street America',
        clientFlags: { isTpaEnabled: true }
    },
    {
        clientTag: '1873b283-a0b5-4d10-b112-b6bab94cd9dd',
        accountName: 'Maine Mutual Group',
        clientFlags: {}
    },
    {
        clientTag: 'A639E2E5-6347-4E38-92B3-37DEF73BE51A',
        accountName: 'Merchants Insurance Group',
        clientFlags: {}
    },
    {
        clientTag: '9B37A4B6-B4C2-4FCA-9E7C-FF8F0AB48067',
        accountName: 'Midvale',
        clientFlags: {}
    },
    {
        clientTag: 'F2617197-C39D-451C-A3D1-61C39BA0BD57',
        accountName: 'M-Plate',
        clientFlags: {}
    },
    {
        clientTag: 'f4730f4c-f83f-41de-a543-3ce761f66802',
        accountName: 'Mutual Benefit',
        clientFlags: {}
    },
    {
        clientTag: '1DE5F9C7-34F0-4115-9582-4BFDF89F8504',
        accountName: 'Nationwide Insurance',
        clientFlags: { isTpaEnabled: true }
    },
    {
        clientTag: 'EA776DDA-0686-43F3-B222-70F1531B9610',
        accountName: 'Nationwide Private Client',
        clientFlags: { isTpaEnabled: true }
    },
    {
        clientTag: 'D3AA7E5D-2184-4761-99C3-69ED8515916E',
        accountName: 'Northstar',
        clientFlags: {}
    },
    {
        clientTag: '8879E236-AFEA-4B46-A94D-06078B84B641',
        accountName: 'OnStar Insurance',
        clientFlags: { isTpaEnabled: true }
    },
    {
        clientTag: '29EF1D8A-C3AF-4037-8FDB-AC7DBD50B1B5',
        accountName: 'Pioneer State Mutual',
        clientFlags: { isTpaEnabled: true }
    },
    {
        clientTag: 'BBC83F09-82D7-492D-A8E8-64594215E559',
        accountName: 'Preferred Mutual',
        clientFlags: {}
    },
    {
        clientTag: 'D27EBC04-A912-4974-A9D1-E3EBC2B2575B',
        accountName: 'QBE',
        clientFlags: {}
    },
    {
        clientTag: 'A5F7D473-29C4-4E2C-AD08-A3AB13FE0314',
        accountName: 'Safeco Insurance',
        clientFlags: { isTpaEnabled: true }
    },
    {
        clientTag: '32978a45-dd2e-4fc6-b2ca-7178efb40373',
        accountName: 'Secura',
        clientFlags: {}
    },
    {
        clientTag: 'C471BDE5-7005-47C2-A544-933D988BCB7F',
        accountName: 'Travelers Insurance',
        clientFlags: { isTpaEnabled: true }
    },
    {
        clientTag: 'd6ba651f-1611-4f32-a6f6-0267e1968eed',
        accountName: 'Utica',
        clientFlags: { isAuthenticationEnabled: true}
    },
    {
        clientTag: '1065734B-2292-4392-8CAF-205F07752BBE',
        accountName: 'Wayne Insurance',
        clientFlags: {}
    }
]

const advancedClients: IClient[] = [
    {
        clientTag: '1216EA5F-64D1-462A-A03F-34C0A652430E',
        accountName: 'Liberty Mutual',
        clientFlags: {}
    }
]

const defaultCreditCardDetails: IPaymentDetails = {
    paymentType: PaymentType.Credit,
    cardNumber: '4111111111111111',
    expirationMonth: '12 - December',
    expirationYear: '2029',
    cvv: '555',
    billingAddress: {
        street: '2088 Tuller St',
        city: 'Columbus',
        state: 'OH',
        postalCode: '43028',
        country: 'US'
    }
}

const defaultAfterpayDetails: IPaymentDetails = {
    paymentType: PaymentType.AfterPay,
    username: 'itqatest@safelite.com',
    password: 'Safelite1',
    cardNumber: '4111 1111 1111 1111',
    expirationMonth: '12',
    expirationYear: '34',
    cvv: '000'
}

const defaultPaypalDetails: IPaymentDetails = {
    paymentType: PaymentType.Paypal,
    password: 'Safelite1'
}

export default class ClientData {
    static getEssentialClients() {
        return essentialClients;
    }

    static getEssentialClientsWithTpaEnabled() {
        return essentialClients.filter(value => {
           return value.clientFlags.isTpaEnabled;
        });
    }

    static getEssentialClientsWithTpaDisabled() {
        return essentialClients.filter(value => {
            return !value.clientFlags.isTpaEnabled;
       });
    }

    static getAdvancedClients() {
        return advancedClients;
    }

    static getDefaultCreditCardDetails() {
        return defaultCreditCardDetails;
    }

    static getDefaultAfterpayDetails() {
        return defaultAfterpayDetails;
    }

    static getDefaultPaypalDetails() {
        return defaultPaypalDetails;
    }
}