//Imports here
import { ITestData } from 'framework/TestData'
import { VehicleDamage, ServicePackage } from 'safelite-playwright-core';
import { ITestCase } from '../framework/Typedefs'
import { ClientData } from 'safelite-playwright-core';
import { getDefaultTestData, setFakerSeedFromTestName } from 'safelite-playwright-core';
import { PaymentMethod } from 'framework/localTypes/Enums';

// Set the seed before generating any data
setFakerSeedFromTestName("CashRepairInShopPayPal");

// Now get the test data with the seeded faker
const cashRepairInShopPayPalData : Partial<ITestData> = {
    ...getDefaultTestData(),  // Get default data with current seed

    // CASH Client
    paymentMethod: PaymentMethod.SelfPay,

    //Override default vehicle damage (Windshield Crack)
    vehicleDamage: [VehicleDamage.WindshieldThreeChips],

    // Key feature: Standard Package
    servicePackage: ServicePackage.Premium,
    
    // Override specific fields with test-specific data
    vehicleDetails: {
        ...getDefaultTestData().vehicleDetails!,
        vin: '1HGCV2E35LA005448'
    },
    
    // Override appointment details
    appointmentDetails: {
        ...getDefaultTestData().appointmentDetails!,
        shopAddress: "6826 Sawmill Rd, Columbus, OH 43235"
    },  
      
    // Use predefined payment data
    paymentDetails: ClientData.getDefaultPaypalDetails()
}

const cashRepairInShopPayPalTests: ITestCase[] = [];

const tc = {
    name: `CashRepairInShopPayPal`,
    tags: ['@E2E','@CashRepairInShopPayPal', '@test_report', '@CASH'],
    testData: cashRepairInShopPayPalData
};
cashRepairInShopPayPalTests.push(tc);

export default cashRepairInShopPayPalTests;