import { Page } from "@playwright/test";
import { type TestPagesFactory } from 'safelite-playwright-core'
import { HomePage } from "../pages/HomePage"
import { LeadgenHomePage } from "../pages/LeadgenHomePage"
import { ServicePackagesPage } from "../pages/ServicePackagesPage"
import { VehicleDamagePage } from "../pages/VehicleDamagePage"
import { VehicleLookupAddressPage } from "../pages/VehicleLookupAddressPage"
import { VehicleLookupLicensePage } from "../pages/VehicleLookupLicensePage"
import { EstimatePage } from "../pages/EstimatePage"
import { VehicleSelectionPage } from "../pages/VehicleSelectionPage"
import { VinLookupPage } from "../pages/VinLookupPage"
import { ServiceLocationPage } from "../pages/ServiceLocationPage"
import { SchedulePage } from "../pages/SchedulePage"
import { ContactDetailsPage } from "../pages/ContactDetailsPage"
import { PaymentMethodPage } from "../pages/PaymentMethodPage"
import { ZipLookupPage } from "../pages/ZipLookupPage"
import { OrderConfirmationPage } from "../pages/OrderConfirmationPage"
import { PartQuestionsPage } from "../pages/PartQuestionPage"
import VehiclePartQuestionsPage from "../pages/VehiclePartsPage"
import CapabilityQuestionsPage from "../pages/CapabilityQuestionsPage"
import MoldingQuestionsPage from "../pages/MoldingQuestionsPage"
import { InsuranceCompanyPage } from "../pages/InsuranceCompanyPage"
import { CCPolicyInfoPage } from "../pages/CCPolicyInfoPage"
import { DuplicateCheckPage } from "../pages/DuplicateCheckPage"
import { PolicyVehiclesPage } from "../pages/PolicyVehiclesPage"
import { PolicyInfoSubmittedPage } from "../pages/PolicyInfoSubmittedPage"
import RecalibrationInfoPage from "../pages/RecalibrationInfoPage"
import { CoverageStatementPage } from "../pages/CoverageStatementPage"
import { VerifyDetailsPage } from "../pages/VerifyDetailsPage"
import { EndorsementsPage } from "../pages/EndorsementsPage"
import { PolicyDriverPage } from "../pages/PolicyDriverPage"
import { ServiceZipPage } from "../pages/ServiceZipPage"
import { MobileDetailsPage } from "pages/MobileDetailsPage";

export interface ITestPages {
    capabilityQuestionsPage: CapabilityQuestionsPage,
    ccPolicyInfoPage: CCPolicyInfoPage,
    contactDetailsPage: ContactDetailsPage,
    coverageStatementPage: CoverageStatementPage,
    duplicateCheckPage: DuplicateCheckPage,
    estimatePage: EstimatePage,
    homePage: HomePage,
    insuranceCompanyPage: InsuranceCompanyPage,
    leadgenHomePage: LeadgenHomePage,
    moldingQuestionsPage: MoldingQuestionsPage,
    orderConfirmationPage: OrderConfirmationPage,
    partQuestionsPage: PartQuestionsPage,
    paymentMethodPage: PaymentMethodPage,
    policyInfoSubmittedPage: PolicyInfoSubmittedPage,
    policyVehiclesPage: PolicyVehiclesPage,
    recalibrationInfoPage: RecalibrationInfoPage,
    schedulePage: SchedulePage,
    mobileDetailsPage: MobileDetailsPage,
    serviceLocationPage: ServiceLocationPage,
    servicePackagesPage: ServicePackagesPage,
    serviceZipPage: ServiceZipPage,
    vehicleDamagePage: VehicleDamagePage,
    vehicleLookupAddressPage: VehicleLookupAddressPage,
    vehicleLookupLicensePage: VehicleLookupLicensePage,
    vehiclePartsPage: VehiclePartQuestionsPage,
    vehicleSelectionPage: VehicleSelectionPage,
    verifyDetailsPage: VerifyDetailsPage,
    vinLookupPage: VinLookupPage,
    zipLookupPage: ZipLookupPage,
    endorsementsPage: EndorsementsPage,
    policyDriverPage: PolicyDriverPage,
}

export const createTestPages: TestPagesFactory<ITestPages> = (page: Page) => {
    const pages: ITestPages = {
        capabilityQuestionsPage: new CapabilityQuestionsPage(page),
        ccPolicyInfoPage: new CCPolicyInfoPage(page),
        contactDetailsPage: new ContactDetailsPage(page),
        coverageStatementPage: new CoverageStatementPage(page),
        duplicateCheckPage: new DuplicateCheckPage(page),
        estimatePage: new EstimatePage(page),
        homePage: new HomePage(page),
        insuranceCompanyPage: new InsuranceCompanyPage(page),
        leadgenHomePage: new LeadgenHomePage(page),
        moldingQuestionsPage: new MoldingQuestionsPage(page),
        orderConfirmationPage: new OrderConfirmationPage(page),
        partQuestionsPage: new PartQuestionsPage(page),
        paymentMethodPage: new PaymentMethodPage(page),
        policyInfoSubmittedPage: new PolicyInfoSubmittedPage(page),
        policyVehiclesPage: new PolicyVehiclesPage(page),
        recalibrationInfoPage: new RecalibrationInfoPage(page),
        schedulePage: new SchedulePage(page),
        mobileDetailsPage: new MobileDetailsPage(page),
        serviceLocationPage: new ServiceLocationPage(page),
        servicePackagesPage: new ServicePackagesPage(page),
        serviceZipPage: new ServiceZipPage(page),
        vehicleDamagePage: new VehicleDamagePage(page),
        vehicleLookupAddressPage: new VehicleLookupAddressPage(page),
        vehicleLookupLicensePage: new VehicleLookupLicensePage(page),
        vehiclePartsPage: new VehiclePartQuestionsPage(page),
        vehicleSelectionPage: new VehicleSelectionPage(page),
        verifyDetailsPage: new VerifyDetailsPage(page),
        vinLookupPage: new VinLookupPage(page),
        zipLookupPage: new ZipLookupPage(page),
        endorsementsPage: new EndorsementsPage(page),
        policyDriverPage: new PolicyDriverPage(page)
    };
    return pages;
}