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

// Set the seed based on test name for consistent but unique data
setFakerSeedFromTestName("CashReplaceWiperPromoInShop");

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

    // CASH Client
    paymentMethod: PaymentMethod.SelfPay,
   
    // Key feature: Standard package with wipers
    servicePackage: ServicePackage.Standard,
   
    // Override customer postal code
    customerDetails: {
        ...getDefaultTestData().customerDetails!,
        address: {
            ...getDefaultTestData().customerDetails!.address,
            postalCode: '43085'
        }
    },
   
    // Override vehicle details - Truck with VIN lookup
    vehicleDetails: {
        ...getDefaultTestData().vehicleDetails!,
        year: '2015',
        make: 'Ford',
        model: 'F Series F150',
        style: '2 door standard cab',
        vin: '1FTMF1C87FKD85044',
        vehicleLookupType: VehicleLookupType.Vin
    },
   
    // No need to override vehicleDamage as it already defaults to WindshieldCrack
   
    // Payment at service
    paymentDetails: {
        paymentType: PaymentType.PayAtService,
        // Specific wiper promo code
        promoCode: '1WIPER0',
    }
}

const cashReplaceWiperPromoInShopTests: ITestCase[] = [];

const tc = {
    name: `CashReplaceWiperPromoInShop`,
    tags: ['@E2E','@CashReplaceWiperPromoInShop', '@test_report', '@CASH'],
    testData: cashReplaceWiperPromoInShopData
};
cashReplaceWiperPromoInShopTests.push(tc);

export default cashReplaceWiperPromoInShopTests;