//Imports here
import { ITestData } from "@business-logic/types/ITestData"
import { AppointmentType, PaymentType } from "@business-logic/types/Enums";
import TestCase from "@business-logic/types/TestCase";
import { VehicleLookupType } from "@business-logic/types/Enums";
import { getDefaultTestData, setFakerSeedFromTestName } from "@business-logic/constants/DefaultTestData";

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

// Now get the test data with the seeded faker
const cashReplaceDynamicRecalMobileData: Partial<ITestData> = {
    ...getDefaultTestData(),  // Get default data with current seed
   
    // Flag for recalibration vehicle
    isRecalVehicle: true,

    // Flag for dynamic Recalibration vehicle
    dynamicRecal: true,
   
    // Override vehicle details
    vehicleDetails: {
        ...getDefaultTestData().vehicleDetails!,
        year: '2018',
        make: 'Ford',
        model: 'Expedition',
        style: '4 door utility',
        vin: '1FMJU1JT2JEA59123',
        vehicleLookupType: VehicleLookupType.Vin
    },
   
    // No need to override vehicleDamage as it already defaults to WindshieldCrack
   
    // Override appointment details
    appointmentDetails: {
        serviceLocation: AppointmentType.Mobile,
        appointmentDate: getDefaultTestData().appointmentDetails?.appointmentDate,
        serviceAddress: {
            // Use street address from current faker seed
            street: getDefaultTestData().customerDetails!.address.street,
            city: 'Rosedale',
            state: 'Maryland',
            postalCode: '21237',
            country: 'United States'
        },
    },
   
    // Override payment details
    paymentDetails: {
        paymentType: PaymentType.PayAtService
    }
}

const cashReplaceDynamicRecalMobileTests: TestCase[] = [];

const tc = new TestCase({
    name: `CashReplaceDynamicRecalMobile`,
    tags: ['@E2E','@CashReplaceDynamicRecalMobile', '@test_report', '@CASH'],
    testData: cashReplaceDynamicRecalMobileData
}, undefined, 'CashReplaceDynamicRecalMobile');
cashReplaceDynamicRecalMobileTests.push(tc);

export default cashReplaceDynamicRecalMobileTests;