//Imports here
import { ITestData } from 'framework/TestData'
import { VehicleDamage, ServiceLocation, 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("CashRepairInShopAfterPay");

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

    // CASH Client
    paymentMethod: PaymentMethod.SelfPay,

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

    // Key feature: Standard Package
    servicePackage: ServicePackage.Standard,
    
    // Override specific fields with test-specific data
    vehicleDetails: {
        ...getDefaultTestData().vehicleDetails!,
        vin: '1HGCV2E35LA005448'
    },
    
    // Override appointment details
    appointmentDetails: {
        ...getDefaultTestData().appointmentDetails!,
    },
    
    // Use predefined payment data
    paymentDetails: ClientData.getDefaultAfterpayDetails()
}

const cashRepairInShopAfterPayTests: ITestCase[] = [];

const tc = {
    name: `CashRepairInShopAfterPay`,
    tags: ['@E2E','@CashRepairInShopAfterPay', '@test_report', '@CASH', '@CASH-1187'],
    testData: cashRepairInShopAfterPayData
};
cashRepairInShopAfterPayTests.push(tc);

export default cashRepairInShopAfterPayTests;