import { type Page } from '@playwright/test';
import { BasePage } from '../BasePage';
import { IVehicleDetails } from '@business-logic/types/CustomerDetails';

export class VehicleSelectionForm extends BasePage {
    readonly page: Page;

    constructor(page: Page) {
        super(page);
        this.page = page;
    }

    async selectVehicle(vehicleDetails: IVehicleDetails){
        await this.page.locator('label').filter({hasText: vehicleDetails.model}).locator('div').first().click();
    }
}