import { createRoute, createVirtualRoute } from "@/router/methods/helpers/create-route";
import { routeData } from "@/router/constants/routes";

import { vehicleBeforeEnter } from "@/router/methods/route-logic/vehicle";
import { quoteBeforeEnter } from "@/router/methods/route-logic/quote";
import { insuranceCompanyBeforeEnter } from "@/router/methods/route-logic/insurance-company";
import { landingBeforeEnter } from "@/router/methods/route-logic/landing";
import { heritageBeforeEnter } from "@/router/methods/route-logic/heritage";
import { loadSessionBeforeEnter } from "@/router/methods/route-logic/load-session";
import { autoRouteBeforeEnter } from "@/router/methods/route-logic/auto-route";
import { errorBeforeEnter } from "@/router/methods/route-logic/error";
import { restartBeforeEnter } from "@/router/methods/route-logic/restart";
import { paymentMethodBeforeEnter } from "@/router/methods/route-logic/payment-method";
import { paymentBeforeEnter } from "@/router/methods/route-logic/payment";
import { serviceLocationBeforeEnter } from "@/router/methods/route-logic/service-location";

export const routes = [
    // Non-virtual pages.
    createRoute(routeData.VEHICLE, vehicleBeforeEnter),
    createRoute(routeData.VEHICLE_DAMAGE),
    createRoute(routeData.ESTIMATE),
    createRoute(routeData.ADDRESS_LOOKUP),
    createRoute(routeData.VIN_LOOKUP),
    createRoute(routeData.LICENSE_PLATE_LOOKUP),
    createRoute(routeData.SERVICE_ZIP),
    createRoute(routeData.ADDRESS_VEHICLES),
    createRoute(routeData.VEHICLE_PARTS),
    createRoute(routeData.PART_QUESTIONS),
    createRoute(routeData.MOLDING_QUESTIONS),
    createRoute(routeData.CAPABILITY_QUESTIONS),
    createRoute(routeData.QUOTE, quoteBeforeEnter),
    createRoute(routeData.INSURANCE_COMPANY, insuranceCompanyBeforeEnter),
    createRoute(routeData.SERVICE_LOCATION, serviceLocationBeforeEnter),
    createRoute(routeData.SCHEDULE),
    createRoute(routeData.CUSTOMER_DETAILS),
    createRoute(routeData.PAYMENT_METHOD, paymentMethodBeforeEnter),
    createRoute(routeData.PAYMENT, paymentBeforeEnter),
    createRoute(routeData.PAYMENT_PIA_RETURN),
    createRoute(routeData.CONFIRMATION),
    createRoute(routeData.RETURN_USER),
    createRoute(routeData.MOBILE_DETAILS),

    // Virtual pages (resolve to a non-virtual page.)
    createVirtualRoute(routeData.LANDING, landingBeforeEnter),
    createVirtualRoute(routeData.HERITAGE, heritageBeforeEnter),
    createVirtualRoute(routeData.LOAD_SESSION, loadSessionBeforeEnter),
    createVirtualRoute(routeData.AUTO_ROUTE, autoRouteBeforeEnter),
    createVirtualRoute(routeData.ERROR, errorBeforeEnter),
    createVirtualRoute(routeData.RESTART, restartBeforeEnter),
];
