import { type Locator, type Page } from '@playwright/test';
import { BasePage } from './BasePage';
import { ICustomerDetails } from '@business-logic/types/CustomerDetails';
import { AddressForm } from './forms/AddressForm';

export class PolicyHolderDetailsPage extends BasePage {
    readonly page: Page;
    readonly addressForm: AddressForm;
    readonly issPageValue = 'policy-holder-details';

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

    async fillCustomerDetails(customerDetails: ICustomerDetails){
        await this.addressForm.populateAddress(customerDetails);
    }
}