package cz.moneta.test.dsl.auto.smartauto;

import cz.moneta.test.dsl.auto.smartauto.shared.CalendarAccessor;
import cz.moneta.test.dsl.auto.smartauto.shared.Day;
import cz.moneta.test.dsl.auto.smartauto.shared.Month;
import cz.moneta.test.dsl.auto.smartauto.shared.Year;
import cz.moneta.test.harness.support.web.Click;
import cz.moneta.test.harness.support.web.TypeInto;

public interface InvoicesPage extends SmartAutoFlow<InvoicesPage>, CalendarAccessor {
    String DATE_FROM_BUTTON = "//div[label/span[text()='Od data 1. ZP']]/div/button";
    String DATE_TO_BUTTON = "//div[label/span[text()='Do data 1. ZP']]/div/button";
    String SEARCH_BUTTON = "//button[@id='FetchListButton']";

    @Click(DATE_FROM_BUTTON)
    InvoicesPage clickDateFrom();

    @Click(DATE_TO_BUTTON)
    InvoicesPage clickDateTo();

    @Click(DATE_FROM_MONTH)
    InvoicesPage clickDateFromMonth();

    @Click(DATE_TO_MONTH)
    InvoicesPage clickDateToMonth();

    @Click(DATE_FROM_MONTH_DEFAULT)
    InvoicesPage clickDateFromMonthValue(Month month);

    @Click(DATE_TO_MONTH_DEFAULT)
    InvoicesPage clickDateToMonthValue(Month month);

    @Click(DATE_FROM_DAY_DEFAULT)
    InvoicesPage clickDateFromDayValue(Day day);

    @Click(DATE_TO_DAY_DEFAULT)
    InvoicesPage clickDateToDayValue(Day day);

    @TypeInto(value = FROM_DATE_YEAR_FIELD, clear = true)
    InvoicesPage setDateFromYear(Year year);

    @Click(SEARCH_BUTTON)
    InvoicesPage clickSearch();
}