package cz.moneta.test.dsl.brokerportal.contractdetail;

import cz.moneta.test.harness.context.StoreAccessor;
import cz.moneta.test.harness.support.web.Click;
import cz.moneta.test.harness.support.web.TypeInto;
import cz.moneta.test.harness.support.web.Wait;
import cz.moneta.test.harness.support.web.WebFlow;

@Wait(ContractDetailEditContactModal.SAVE_CONTACT_DETAILS)
public interface ContractDetailEditContactModal extends WebFlow<ContractDetailEditContactModal>, StoreAccessor {
    String PHONE_CONTACT_INPUT = "//input[@id='cellPhone']";
    String EMAIL_CONTACT_INPUT = "//input[@id='email']";
    String SAVE_CONTACT_DETAILS = "//div[@class='c-modal__body']//button[text()='Uložit'][not(@disabled)]";

    @TypeInto(value = PHONE_CONTACT_INPUT)
    ContractDetailEditContactModal fillPhoneNumber(String phoneNumber);

    @TypeInto(value = EMAIL_CONTACT_INPUT)
    ContractDetailEditContactModal fillEmail(String email);

    @Click(SAVE_CONTACT_DETAILS)
    ContractDetailPage saveContactDetails ();
}