//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 based on test name for consistent but unique data
setFakerSeedFromTestName("CashReplaceVinMobile");

// Now get the test data with the seeded faker
const cashReplaceVinMobileData: Partial<ITestData> = {
    ...getDefaultTestData(),  // Get default data with current seed
   
    // Flag for recalibration vehicle
    isRecalVehicle: true,
   
    // Override customer postal code
    customerDetails: {
        ...getDefaultTestData().customerDetails!,
        address: {
            ...getDefaultTestData().customerDetails!.address,
            postalCode: '43085'
        }
    },
   
    // Override vehicle details - using VIN lookup
    vehicleDetails: {
        ...getDefaultTestData().vehicleDetails!,
        year: '2012',
        make: 'Honda',
        model: 'Accord',
        style: '4 door sedan',
        vin: '1HGCP3F83CA040466',
        vehicleLookupType: VehicleLookupType.Vin
    },
   
    // No need to override vehicleDamage as it already defaults to WindshieldCrack
   
    // Override for mobile service
    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'
        }
    },
   
    // Payment at service
    paymentDetails: {
        paymentType: PaymentType.PayAtService
    },
}

const cashReplaceVinMobileTests: TestCase[] = [];

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

export default cashReplaceVinMobileTests;