package cz.moneta.test.dsl.ufo.banka.pages.main.components;

import cz.moneta.test.dsl.ufo.operations.shared.SharedElements;
import cz.moneta.test.harness.context.StoreAccessor;
import cz.moneta.test.harness.support.web.*;

import static cz.moneta.test.dsl.ufo.banka.pages.main.components.CIF003_S002_EditPoFopPage.*;

@Wait(value = CIF003_S002_PAGE_LABEL_XPATH, by = Lookup.XPATH)
@Wait(SEND_BUTTON)
public interface CIF003_S002_EditPoFopPage extends WebFlow<CIF003_S002_EditPoFopPage>, StoreAccessor {
    String CIF003_S002_PAGE_LABEL_XPATH = "//div[text()='CIF003_S002']";
    String SEND_BUTTON = "CIF003_S002_B002";
    String ID_VALID_INPUT = "CIF003_S002_E005";
    String EMAIL_INPUT = "CIF003_S002_E037";
    String PHONE_NUMBER_INPUT = "CIF003_S002_U016";
    String ID_CARD_INPUT = "CIF003_S002_U021";

    @TypeInto(value = EMAIL_INPUT, clear = true, andWait = @Wait(value = SharedElements.LOAD_IMG_DIV_CLASS, by = Lookup.CLASSNAME, until = Until.GONE))
    CIF003_S002_EditPoFopPage fillEmail(String email);

    @Click(value = SEND_BUTTON, andWait = @Wait(value = SharedElements.LOAD_IMG_DIV_CLASS, by = Lookup.CLASSNAME, until = Until.GONE))
    CIF003_S002_EditPoFopPageTransitions clickSend();

    @TypeInto(value = PHONE_NUMBER_INPUT, clear = true)
    CIF003_S002_EditPoFopPage fillPhoneNumber(String phoneNumber);

    @TypeInto(value = ID_CARD_INPUT, clear = true)
    CIF003_S002_EditPoFopPage fillIdCard(String idCard);

    @TypeInto(value = ID_VALID_INPUT, clear = true)
    CIF003_S002_EditPoFopPage fillIdValid(String idValid);
}
