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

import cz.moneta.test.dsl.auto.smartauto.cr.ForBillingPage;
import cz.moneta.test.dsl.auto.smartauto.df.DashboardPage;
import cz.moneta.test.dsl.auto.smartauto.shared.*;
import cz.moneta.test.harness.context.StoreAccessor;
import cz.moneta.test.harness.endpoints.SmartAutoEndpoint;
import cz.moneta.test.harness.support.web.*;

import static cz.moneta.test.dsl.auto.smartauto.NewCalculationPage.*;

@Wait(value = {VEHICLE_NEW_VEHICLE_BUTTON, VEHICLE_SEARCH_BRAND, VEHICLE_PRICE, VEHICLE_VALUE_ADDED_TAX_YES_BUTTON,
        VEHICLE_REGISTRATION_DATE, IMG_AUTO_OPERATOR_OPTIONS},
        waitSecondsForElement = 40)
@Wait(value = CommonElements.LOADER_DIV, until = Until.GONE)
public interface NewCalculationPage extends SmartAutoFlow<NewCalculationPage>, StoreAccessor {
    String VEHICLE_CUSTOMER_DEFAULT = "//button//span[contains(text(), '%s')]";
    String VEHICLE_VAT_BUTTON_DEFAULT = "//button//span[contains(text(), '%s')]";
    String VEHICLE_USAGE_DEFAULT = "//button[@type='button' and contains(., '%s')]";
    String VEHICLE_NEW_VEHICLE_BUTTON = "//button[@type='button' and contains(., 'Nová')]";
    String PRCLASS_VALUE_DEFAULT = "//button[@data-testid=\"%s\"]";
    String SUBSIDY_VALUE_DEFAULT = "//span[contains(text(), \"%s\")]";
    String VEHICLE_CATEGORY_DEFAULT = "//span[contains(text(), 'Kategorie')]//..//../following-sibling::div/button[@data-testid='%s']";
    String PRGROUP_VALUE_DEFAULT = "//button[@data-testid=\"%s\"]";
    String VEHICLE_GROUP_COMBOBOX_ARROW = "//span[contains(text(), 'Skupina')]/../../following::button[contains(., '▼')]";
    String VEHICLE_GROUP_COMBOBOX_VALUE_DEFAULT = "//button[@type='button' and contains(., '%s')]";
    String VEHICLE_SEARCH_BRAND = "//span[contains(text(), 'Značka vozidla')]/../../following-sibling::div//input";
    String VEHICLE_SEARCH_MODEL = "//span[contains(text(), 'Model vozidla')]/../../following-sibling::div//input";
    String VEHICLE_SEARCH_BRAND_FIRST_OPTION_DEFAULT = "(//button[contains(text(), '%s')])[1]";
    String VEHICLE_SEARCH_MODEL_FIRST_OPTION_DEFAULT = "(//button[contains(text(), '%s')])[1]";
    String VEHICLE_PRICE = "//input[@name='vehicle.price']";
    String COMPANY_NAME = "//input[@name='companyName']";
    String COMPANY_TYPE = "//span[contains(.,'Typ firmy')]/..//following-sibling::div/div/div/input";
    String COMPANY_TYPE_SRO = "//span[contains(.,'Typ firmy')]/..//following-sibling::div/div/button[1]";
    String COMPANY_IC = "//input[@name='ico']";
    String COMPANY_RESIDENCE_NUMBER = "//input[@name='companyAddress.residenceNumber']";
    String COMPANY_TOWNSHIP = "//input[@name='companyAddress.township']";
    String COMPANY_CITY = "//input[@name='companyAddress.city']";
    String COMPANY_ZIP = "//input[@name='companyAddress.zipCode']";
    String COMPANY_RESIDENCE_TYPE = "//span[contains(text(),'Popisné')]/../../..//preceding-sibling::input";
    String VEHICLE_VALUE_ADDED_TAX_YES_BUTTON = "//button//span[contains(text(), 'Ano')]";
    String VEHICLE_USAGE_COMBOBOX_ARROW = "//span[contains(text(), 'Účel')]/../../following::button[contains(., '▼')]";
    String VEHICLE_REGISTRATION_DATE = "//input[@id='popover']";
    String VEHICLE_REGISTRATION_DATE_MONTH = "//span[1][contains(text(), '%s')]";
    String VEHICLE_REGISTRATION_DATE_YEAR = "//li[contains(text(), '%s')]";
    String SAVE_BTN = "(//span[text() = 'Uložit'])[2]";
    String VEHICLE_REGISTRATION_DATE_CHOOSE_BUTTON = "//button//span[contains(text(), 'Vybrat')]";
    String VEHICLE_FINANCE_PRODUCT = "(//DIV//p//span[contains(text(), 'Vyberte záznam ...')])[1]";
    String VEHICLE_FINANCE_PRODUCT_CHOOSE_BUTTON_DEFAULT = "(//div/h3[contains(text(), '%s')])/..//following-sibling::div//button//span[contains(text(), 'Vybrat')][1]/..";
    String VEHICLE_CAR_INSURANCE = "//h4/following-sibling::div/div[contains(text(),'Vyberte záznam ...')][1]";
    String VEHICLE_CAR_ACCIDENT_INSURANCE = "(//DIV//p//span[contains(text(), 'Vyberte záznam ...')])[1]";
    String VEHICLE_CAR_BENEFITS = "(//DIV//p//span[contains(text(), 'Vyberte záznam ...')])[1]";
    String VEHICLE_CAR_BENEFITS_OPTION_DEFAULT = "(//label//span[contains(text(), '%s')])[1]/..";
    String VEHICLE_CAR_BENEFITS_CHOOSE_BUTTON = "(//button//span[contains(text(), 'Vybrat')])[1]";
    String VEHICLE_CAR_ACCIDENT_INSURANCE_OPTION_DEFAULT = "(//label//span[contains(text(), '%s')])[1]/..";
    String VEHICLE_CAR_ACCIDENT_INSURANCE_CHOOSE_BUTTON = "(//button//span[contains(text(), 'Vybrat')])[1]";
    String VEHICLE_CAR_ACCIDENT_INSURANCE_FIRM_NAME = "//input[@placeholder='Vyhledávání firmy v ARES']";
    String VEHICLE_CAR_ACCIDENT_INSURANCE_FIRM_NAME_SEARCH = "//input[@placeholder='Vyhledávání firmy v ARES']/../div/button";
    String VEHICLE_CAR_ACCIDENT_INSURANCE_FIRM_NAME_FIELD = "//input[@placeholder='Vyhledávání firmy v ARES']/../../../div/button[1]";
    String VEHICLE_CAR_INSURANCE_CUSTOMER_NAME = "//label//span[contains(text(), 'Jméno')]/../following-sibling::input";
    String VEHICLE_CAR_INSURANCE_CUSTOMER_SURNAME = "//label//span[contains(text(), 'Příjmení')]/../following-sibling::input";
    String VEHICLE_CAR_INSURANCE_CUSTOMER_BIRTHDATE = "//label//span[contains(text(), 'Datum narození')]/../following-sibling::div/input";
    String VEHICLE_CAR_INSURANCE_CUSTOMER_PIN = "//label//span[contains(text(), 'Rodné číslo')]/../following-sibling::input";
    String VEHICLE_CAR_INSURANCE_CUSTOMER_NATIONALITY = "//label/span/span[contains(text(), 'Občanství')]/../../following-sibling::div/div/div/input";
    String VEHICLE_CAR_INSURANCE_CUSTOMER_NATIONALITY_FIELD = "//label/span/span[contains(text(), 'Občanství')]/../../following-sibling::div/div/button[1]";
    String VEHICLE_CAR_INSURANCE_CUSTOMER_ADDRESS = "//span[contains(text(),'Trvalé bydliště')]/../../following-sibling::div/div/div/input";
    String VEHICLE_CAR_INSURANCE_CUSTOMER_ADDRESS_FIELDS = "//span[contains(text(),'Trvalé bydliště')]/../../following-sibling::div/div/button[1]";
    String VEHICLE_CAR_INSURANCE_VEHICLE_TAB = "//button/div/div[contains(text(),'Předmět')]";
    String VEHICLE_CAR_INSURANCE_VEHICLE_VIN = "//input[@name='vehicle.chassisNumber']";
    String VEHICLE_CAR_INSURANCE_VEHICLE_VIN_SEARCH = "//button[contains(text(), 'Hledat')]";
    String VEHICLE_CAR_INSURANCE_VEHICLE_TYPE = "//div[contains(@class, 'styles_table-item__1MCcy')][1]";
    String VEHICLE_CAR_INSURANCE_VEHICLE_FUEL_TYPE_INPUT = "//span[contains(.,'Palivo')]/../../div/div/div/input";
    String VEHICLE_CAR_INSURANCE_VEHICLE_FUEL_TYPE_CHOOSE = "//span[contains(.,'Palivo')]/../../div/div/button[contains(.,'%s')]";
    String VEHICLE_CAR_INSURANCE_VEHICLE_SECOND_FUEL_TYPE_INPUT = "//label[contains(.,'Palivo')]/../div/button";
    String VEHICLE_CAR_INSURANCE_VEHICLE_SECOND_FUEL_TYPE_CHOOSE = "//label[contains(.,'Palivo')]/../div/ul/li[contains(.,'%s')]";
    String VEHICLE_CAR_INSURANCE_VEHICLE_SEARCH_NO_VIN = "//button[contains(.,'Vyhledat')]";
    String VEHICLE_CAR_INSURANCE_VEHICLE_VOLUME_AGRO = "//label[contains(.,'Objem')]/following-sibling::div/div/input";
    String VEHICLE_CAR_INSURANCE_VEHICLE_NUMBER_OF_SEATS = "//label[contains(.,'Počet sedadel')]/following-sibling::div/div/input";
    String VEHICLE_CAR_INSURANCE_VEHICLE_POWER_AGRO = "//label[contains(.,'Výkon')]/following-sibling::div/div/input";
    String VEHICLE_CAR_INSURANCE_VEHICLE_WEIGHT_AGRO = "//label[contains(.,'Hmotnost')]/following-sibling::div/div/input";
    String VEHICLE_CAR_INSURANCE_VEHICLE_FUEL_AGRO = "//label[contains(.,'Palivo')]/following-sibling::div/button";
    String VEHICLE_CAR_INSURANCE_VEHICLE_FUEL_AGRO_CHOOSE = "//label[contains(.,'Palivo')]/following-sibling::div/ul/li/div[contains(.,'%s')]";
    String VEHICLE_CAR_INSURANCE_INSURANCE_TAB = "//button/div/div[contains(text(),'Pojištění')]";
    String VEHICLE_CAR_INSURANCE_INSURANCE_HAV_FIELD_DEFAULT = "//h4[contains(.,'Havarijní pojištění')]/../../../../div[2]/div[2]/div/div[1]/section/h4/button/span[2]";
    String VEHICLE_CAR_INSURANCE_INSURANCE_HAV_FIELD_CHOOSE_DEFAULT = "//h4[contains(.,'Havarijní pojištění')]/../../../../div[2]/div[2]/div/div/section/div/div/div/button";
    String VEHICLE_CAR_INSURANCE_INSURANCE_POV_FIELD_DEFAULT = "//h4[contains(.,'Povinné ručení')]/../../../../div[2]/div[1]/div/div[1]/section/h4/button/span[2]";
    String VEHICLE_CAR_INSURANCE_INSURANCE_POV_FIELD_CHOOSE_DEFAULT = "//h4[contains(.,'Povinné ručení')]/../../../../div[2]/div[1]/div/div/section/div/div/div/button";
    String VEHICLE_CAR_INSURANCE_INSURANCE_CHOOSE = "//section[@data-testid='Collapse']//button[contains(text(),'Vybrat')]";
    String VEHICLE_CAR_INSURANCE_INSURANCE_CLOSE = "/html/body/aside[1]/div/div/div[2]/div/div/button[contains(text(),'Zavřít')]";
    String CREATE_APPLICATION = "//span[contains(text(), 'Vytvořit žádost')]/parent::button";
    String DIV_CLICK_BLOCKER = "//div[@class='_21KP5GbzHYNm19YwGmWy0r']";
    String DIV_CLICK_BLOCKER_2 = "//div[@class='_3Lp0XIzdhx1ktbMqO92O8T']";
    String IMG_AUTO_OPERATOR_OPTIONS = "//img[@src='./static/media/auto.705bbb78dc90ca27d48c.png']";
    String SPAN_CHANGE_PASSWORD = "//span[contains(text(), 'Změnit heslo')]";
    String SPAN_DEALER_FINANCING = "//span[contains(text(), 'Dealer Financing')]";
    String SPAN_COMMISSION_REPORTING = "//span[contains(text(), 'Provizní Reporting')]";
    String NEW_CALCULATION_BUTTON = "//span[text() = \"Vytvořit žádost\"]";
    String FP_DIMMER = "//div[@class='dimmer-2DQ8w']";
    String MAIN_NAV_PROFILE = "//img[contains(@class, 'auto-img-exsNS')]";
    String INVOICES_BUTTON = "//span[text() = 'Provizní Reporting']";
    String FIRST_PAYMENT_INPUT = "//input[@name = 'computation.firstPayment']";
    String LOGIN_SUCCESS = "//div[@id='q9edoy1']";
    // AGRO
    String AGRO_SEARCH_BRAND_ARROW = "//span[contains(text(), 'Značka')]/../following::button[contains(., '▼')]";
    String AGRO_SEARCH = "//button[@type='button' and contains(., '%s')]";
    String AGRO_MODEL = "//input[@name='vehicle.subjectDescription']";
    String AGRO_CALENDAR_BUTTON = "//label[contains(text(), 'Datum')]//following-sibling::div//button";
    String AGRO_CALENDAR_TODAY = "//span[@class='flatpickr-day today']";
    String AGRO_DEFERRED_DRAWING = "//input[@name='vehicle.carRegistration.deferredDrawing']";
    String AGRO_ITEM_TYPE_SEARCH_ARROW = "//span[contains(text(), 'Typ předmětu')]/../following::button[contains(., '▼')]";


    // AGRO Dotace checkbox
    String AGRO_PGRLF_CHECKBOX = "//*[@id='donation-1']";
    String AGRO_SZIF_CHECKBOX = "//*[@id='donation-2']";
    String AGRO_YOUNGFARMER_CHECKBOX = "//*[@id='youngFarmer']";

    // AGRO bez TP
    String AGRO_NO_TP_BRAND = "//input[@name='vehicle.producer']";

    // elements for @CheckElementPresent
    String VEHICLE_FIRST_PAYMENT_NOT_EMPTY = "//input[@name='computation.firstPayment'][not(@value='')]";
    String VEHICLE_INSTALMENT_COUNT_NOT_EMPTY = "//input[@name='computation.instalmentCount'][not(@value='')]";
    String VEHICLE_INSTALMENT_COMPUTATION_NOT_EMPTY = "//input[@name='computation.instalment'][not(@value='')]";
    String MENU_NEW_CALCULATION = "(//span[contains(text(), 'Nová kalkulace')])[1]";
    String MENU_SAVED = "(//span[contains(text(), 'Uložené')])[1]";
    String MENU_QUEUE = "(//span[contains(text(), 'Fronta')])[1]";
    String AGRO_SEARCH_TYPE = "//input[@placeholder='Vyberte stroj']";
    String AGRO_SEARCH_RESULT = "//button[contains(text(), '%s')]";

    // Nerovnoměrné splátky
    String IRREGULAR_ICON = "//button[@class='btn-33Jra btn-sm-vOrTC btn-secondary-3voo4 btn-no-shadow-3u6tG ml-2-2RUiN px-3-2pJmf']";
    String IRREGULAR_EDIT_BUTTON = "//span[@data-testid='CreditBadge']";
    String IRREGULAR_INPUT = "//input[@class='form-control-2EJkW']";
    String IRREGULAR_CONFIRM = "//button[contains(@class,'btn-33Jra btn-sm-vOrTC btn-secondary-3voo4 btn-no-shadow-3u6tG px-3-2pJmf')]";
    String IRREGULAR_SUBMIT = "//button[@data-testid='irregularInstallmentButtonAgree']";
    String IS_IRREGULAR = "//button[contains(text(), 'Průměrná')]";
    String VEHICLE_INSTALMENT_COMPUTATION_VALUE = "//input[@name='computation.instalmentCount']";

    @TypeInto(value = COMPANY_NAME, clear = true)
    NewCalculationPage typeCompanyName(String name);

    @Click(COMPANY_TYPE)
    NewCalculationPage clickCompanyType();

    @Click(COMPANY_TYPE_SRO)
    NewCalculationPage chooseCompanyType();

    @TypeInto(COMPANY_TOWNSHIP)
    NewCalculationPage typeCompanyTownship(String township);

    @TypeInto(COMPANY_CITY)
    NewCalculationPage typeCompanyCity(String city);

    @TypeInto(COMPANY_IC)
    NewCalculationPage typeCompanyIco(Integer ico);

    @TypeInto(COMPANY_ZIP)
    NewCalculationPage typeCompanyZip(Integer zip);

    @TypeInto(COMPANY_RESIDENCE_NUMBER)
    NewCalculationPage typeCompanyResidenceNumber(Integer residenceNumber);

    @Click(value = COMPANY_RESIDENCE_TYPE, jsClick = true)
    NewCalculationPage chooseCompanyResidenceType();

    @Click(SAVE_BTN)
    NewCalculationPage clickSave();

    @TypeInto(value = VEHICLE_INSTALMENT_COMPUTATION_VALUE, clear = true)
    NewCalculationPage editInstalmentComputation(String months);

    @CheckElementPresent(MENU_NEW_CALCULATION)
    NewCalculationPage checkMenuNewCalculation();

    @CheckElementPresent(MENU_SAVED)
    NewCalculationPage checkMenuSaved();

    @CheckElementPresent(MENU_QUEUE)
    NewCalculationPage checkMenuQueue();

    @Wait(value = VEHICLE_SEARCH_BRAND_FIRST_OPTION_DEFAULT, waitSecondsForElement = 30)
    @Click(value = VEHICLE_SEARCH_BRAND_FIRST_OPTION_DEFAULT, andWait = @Wait(explicitWaitSeconds = 2))
    NewCalculationPage clickVehicleBrandSearchedOption(Brand brand);

    @Wait(value = VEHICLE_SEARCH_MODEL_FIRST_OPTION_DEFAULT, waitSecondsForElement = 30)
    @Click(value = VEHICLE_SEARCH_MODEL_FIRST_OPTION_DEFAULT, jsClick = true)
    NewCalculationPage clickVehicleModelSearchedOption(Model model);

    @Wait(value = VEHICLE_CATEGORY_DEFAULT, until = Until.CLICKABLE)
    @Click(value = VEHICLE_CATEGORY_DEFAULT, andWait = @Wait(explicitWaitSeconds = 5))
    NewCalculationPage clickVehicleCategoryValue(Category category);

    @Click(value = PRGROUP_VALUE_DEFAULT, andWait = @Wait(explicitWaitSeconds = 2))
    NewCalculationPage clickVehiclePrGroupValue(PrGroup prGroup);

    @Click(value = PRCLASS_VALUE_DEFAULT, andWait = @Wait(explicitWaitSeconds = 1))
    NewCalculationPage clickVehiclePrClassValue(PrClass prClass);

    @Click(value = VEHICLE_GROUP_COMBOBOX_VALUE_DEFAULT, andWait = @Wait(explicitWaitSeconds = 2))
    NewCalculationPage clickVehicleGroupComboboxValue(Group group);

    @Wait(value = {DIV_CLICK_BLOCKER, DIV_CLICK_BLOCKER_2}, until = Until.GONE, waitSecondsForElement = 30)
    @Wait(value = FP_DIMMER, until = Until.GONE)
    @Wait(value = VEHICLE_FINANCE_PRODUCT, waitSecondsForElement = 30)
    @Click(value = VEHICLE_FINANCE_PRODUCT, andWait = @Wait(value = CommonElements.MODAL, waitSecondsForElement = 30))
    NewCalculationPage clickVehicleFinanceProduct();

    @Wait(value = VEHICLE_FINANCE_PRODUCT_CHOOSE_BUTTON_DEFAULT, waitSecondsForElement = 30)
    @Click(value = VEHICLE_FINANCE_PRODUCT_CHOOSE_BUTTON_DEFAULT, jsClick = true)
    NewCalculationPage clickVehicleFinanceProductChoose(Product product);

    @Wait(value = {VEHICLE_FIRST_PAYMENT_NOT_EMPTY, VEHICLE_INSTALMENT_COUNT_NOT_EMPTY}, waitSecondsForElement = 30)
    NewCalculationPage waitForCalculationOutput();

    @Wait(value = VEHICLE_INSTALMENT_COMPUTATION_NOT_EMPTY, waitSecondsForElement = 30)
    NewCalculationPage waitForCalculationInstalmentOutput();

    @Wait(value = {DIV_CLICK_BLOCKER, DIV_CLICK_BLOCKER_2}, until = Until.GONE, waitSecondsForElement = 30)
    @Wait(value = VEHICLE_CAR_INSURANCE, waitSecondsForElement = 30)
    @Click(value = VEHICLE_CAR_INSURANCE)
    NewCalculationPage clickVehicleCarInsurance();

    @Wait(VEHICLE_CAR_ACCIDENT_INSURANCE_FIRM_NAME)
    @TypeInto(value = VEHICLE_CAR_ACCIDENT_INSURANCE_FIRM_NAME, clear = true)
    NewCalculationPage typeVehicleInsuranceFirmName(String companyName);

    @Wait(VEHICLE_CAR_ACCIDENT_INSURANCE_FIRM_NAME_FIELD)
    @Click(value = VEHICLE_CAR_ACCIDENT_INSURANCE_FIRM_NAME_FIELD, jsClick = true)
    NewCalculationPage clickVehicleInsuranceFirmField();

    @Wait(VEHICLE_CAR_ACCIDENT_INSURANCE_FIRM_NAME_SEARCH)
    @Click(value = VEHICLE_CAR_ACCIDENT_INSURANCE_FIRM_NAME_SEARCH, jsClick = true)
    NewCalculationPage clickVehicleInsuranceFirmSearch();

    @Wait(VEHICLE_CAR_INSURANCE_CUSTOMER_NAME)
    @TypeInto(value = VEHICLE_CAR_INSURANCE_CUSTOMER_NAME, clear = true)
    NewCalculationPage typeVehicleInsuranceCustomerName(String name);

    @Wait(VEHICLE_CAR_INSURANCE_CUSTOMER_SURNAME)
    @TypeInto(value = VEHICLE_CAR_INSURANCE_CUSTOMER_SURNAME, clear = true)
    NewCalculationPage typeVehicleInsuranceCustomerSurname(String surname);

    @Wait(VEHICLE_CAR_INSURANCE_CUSTOMER_BIRTHDATE)
    @TypeInto(value = VEHICLE_CAR_INSURANCE_CUSTOMER_BIRTHDATE, clear = true)
    NewCalculationPage typeVehicleInsuranceCustomerBirthdate(String birthdate);

    @Wait(VEHICLE_CAR_INSURANCE_CUSTOMER_PIN)
    @TypeInto(value = VEHICLE_CAR_INSURANCE_CUSTOMER_PIN, clear = true)
    NewCalculationPage typeVehicleInsuranceCustomerPIN(String pin);

    @Wait(VEHICLE_CAR_INSURANCE_CUSTOMER_NATIONALITY)
    @TypeInto(value = VEHICLE_CAR_INSURANCE_CUSTOMER_NATIONALITY, clear = true)
    NewCalculationPage typeVehicleInsuranceCustomerNationality(String nationality);

    @Wait(value = VEHICLE_CAR_INSURANCE_CUSTOMER_NATIONALITY_FIELD)
    @Click(value = VEHICLE_CAR_INSURANCE_CUSTOMER_NATIONALITY_FIELD, jsClick = true)
    NewCalculationPage clickVehicleInsuranceCustomerNationality();

    @Wait(VEHICLE_CAR_INSURANCE_CUSTOMER_ADDRESS)
    @TypeInto(value = VEHICLE_CAR_INSURANCE_CUSTOMER_ADDRESS, clear = true)
    NewCalculationPage typeVehicleInsuranceCustomerAddress(Address address);

    @Wait(VEHICLE_CAR_INSURANCE_CUSTOMER_ADDRESS_FIELDS)
    @Click(value = VEHICLE_CAR_INSURANCE_CUSTOMER_ADDRESS_FIELDS, jsClick = true)
    NewCalculationPage clickVehicleInsuranceCustomerAddress();

    @Wait(VEHICLE_CAR_INSURANCE_VEHICLE_TAB)
    @Click(value = VEHICLE_CAR_INSURANCE_VEHICLE_TAB, jsClick = true)
    NewCalculationPage clickVehicleInsuranceVehicleTab();

    @Wait(VEHICLE_CAR_INSURANCE_VEHICLE_TAB)
    @TypeInto(value = VEHICLE_CAR_INSURANCE_VEHICLE_VOLUME_AGRO)
    NewCalculationPage typeVehicleInsuranceVehicleVolume(String volume);

    @Wait(VEHICLE_CAR_INSURANCE_VEHICLE_TAB)
    @TypeInto(value = VEHICLE_CAR_INSURANCE_VEHICLE_NUMBER_OF_SEATS)
    NewCalculationPage typeVehicleInsuranceVehicleNumberOfSeats(String numberOfSeats);

    @Wait(VEHICLE_CAR_INSURANCE_VEHICLE_TAB)
    @TypeInto(value = VEHICLE_CAR_INSURANCE_VEHICLE_POWER_AGRO, andWait = @Wait(explicitWaitSeconds = 2))
    NewCalculationPage typeVehicleInsuranceVehiclePower(String power);

    @Wait(VEHICLE_CAR_INSURANCE_VEHICLE_TAB)
    @TypeInto(value = VEHICLE_CAR_INSURANCE_VEHICLE_WEIGHT_AGRO)
    NewCalculationPage typeVehicleInsuranceVehicleWeight(String weight);

    @Wait(VEHICLE_CAR_INSURANCE_VEHICLE_TAB)
    @Click(VEHICLE_CAR_INSURANCE_VEHICLE_FUEL_AGRO)
    NewCalculationPage clickVehicleInsuranceVehicleFuelTypeAgro();

    @Wait(VEHICLE_CAR_INSURANCE_VEHICLE_TAB)
    @Click(VEHICLE_CAR_INSURANCE_VEHICLE_FUEL_AGRO_CHOOSE)
    NewCalculationPage chooseVehicleInsuranceVehicleFuelTypeAgro(FilterFuel fuel);

    @Wait(VEHICLE_CAR_INSURANCE_VEHICLE_TAB)
    @Click(VEHICLE_CAR_INSURANCE_VEHICLE_FUEL_TYPE_INPUT)
    NewCalculationPage clickVehicleInsuranceVehicleFuelType();

    @Wait(VEHICLE_CAR_INSURANCE_VEHICLE_TAB)
    @Click(VEHICLE_CAR_INSURANCE_VEHICLE_FUEL_TYPE_CHOOSE)
    NewCalculationPage chooseVehicleInsuranceVehicleFuelType(FilterFuel fuel);

    @Wait(VEHICLE_CAR_INSURANCE_VEHICLE_TAB)
    @Click(VEHICLE_CAR_INSURANCE_VEHICLE_SECOND_FUEL_TYPE_INPUT)
    NewCalculationPage clickVehicleInsuranceVehicleFuelTypeSecond();

    @Wait(VEHICLE_CAR_INSURANCE_VEHICLE_TAB)
    @Click(VEHICLE_CAR_INSURANCE_VEHICLE_SECOND_FUEL_TYPE_CHOOSE)
    NewCalculationPage chooseVehicleInsuranceVehicleFuelTypeSecond(FilterFuel fuel);

    @Wait(VEHICLE_CAR_INSURANCE_VEHICLE_TAB)
    @Click(VEHICLE_CAR_INSURANCE_VEHICLE_SEARCH_NO_VIN)
    NewCalculationPage clickVehicleInsuranceVehicleFilterSearch();

    @Wait(VEHICLE_CAR_INSURANCE_VEHICLE_VIN)
    @TypeInto(value = VEHICLE_CAR_INSURANCE_VEHICLE_VIN, clear = true)
    NewCalculationPage typeVehicleInsuranceVehicleVIN(String VIN);

    @Wait(value = VEHICLE_CAR_INSURANCE_VEHICLE_VIN_SEARCH, waitSecondsForElement = 30)
    @Click(value = VEHICLE_CAR_INSURANCE_VEHICLE_VIN_SEARCH, jsClick = true)
    NewCalculationPage clickVehicleInsuranceVehicleVINSearch();

    @Wait(value = VEHICLE_CAR_INSURANCE_VEHICLE_TYPE, waitSecondsForElement = 30)
    @Wait(explicitWaitSeconds = 1)
    @Click(value = VEHICLE_CAR_INSURANCE_VEHICLE_TYPE, jsClick = true)
    NewCalculationPage clickVehicleInsuranceVehicleType();

    @Wait(explicitWaitSeconds = 2)
    @Click(value = VEHICLE_CAR_INSURANCE_INSURANCE_TAB)
    NewCalculationPage clickVehicleInsuranceInsuranceTab();

    @Wait(value = VEHICLE_CAR_INSURANCE_INSURANCE_POV_FIELD_DEFAULT, waitSecondsForElement = 30)
    @Click(value = VEHICLE_CAR_INSURANCE_INSURANCE_POV_FIELD_DEFAULT)
    NewCalculationPage clickVehicleInsuranceInsurancePovInsurance();

    @Wait(value = VEHICLE_CAR_INSURANCE_INSURANCE_POV_FIELD_DEFAULT, waitSecondsForElement = 30)
    @Click(value = VEHICLE_CAR_INSURANCE_INSURANCE_POV_FIELD_CHOOSE_DEFAULT)
    NewCalculationPage clickVehicleInsuranceInsurancePovInsuranceChoose();

    @Wait(value = VEHICLE_CAR_INSURANCE_INSURANCE_HAV_FIELD_DEFAULT, waitSecondsForElement = 30)
    @Click(value = VEHICLE_CAR_INSURANCE_INSURANCE_HAV_FIELD_DEFAULT)
    NewCalculationPage clickVehicleInsuranceInsuranceHavInsurance();

    @Wait(value = VEHICLE_CAR_INSURANCE_INSURANCE_HAV_FIELD_DEFAULT, waitSecondsForElement = 30)
    @Click(value = VEHICLE_CAR_INSURANCE_INSURANCE_HAV_FIELD_CHOOSE_DEFAULT)
    NewCalculationPage clickVehicleInsuranceInsuranceHavInsuranceChoose();

    @Wait(value = VEHICLE_CAR_INSURANCE_INSURANCE_CHOOSE, waitSecondsForElement = 30)
    @Click(value = VEHICLE_CAR_INSURANCE_INSURANCE_CHOOSE,jsClick = true)
    NewCalculationPage clickVehicleInsuranceInsuranceChoose();

    @Wait(value = VEHICLE_CAR_INSURANCE_INSURANCE_CLOSE, waitSecondsForElement = 30)
    @Click(value = VEHICLE_CAR_INSURANCE_INSURANCE_CLOSE,jsClick = true)
    NewCalculationPage clickVehicleInsuranceInsuranceClose();

    @Wait(value = {DIV_CLICK_BLOCKER, DIV_CLICK_BLOCKER_2}, until = Until.GONE, waitSecondsForElement = 30)
    @Wait(value = VEHICLE_CAR_ACCIDENT_INSURANCE, waitSecondsForElement = 30)
    @Click(value = VEHICLE_CAR_ACCIDENT_INSURANCE, andWait = @Wait(value = CommonElements.MODAL, waitSecondsForElement = 30))
    NewCalculationPage clickVehicleAccidentInsurance();

    @Wait(value = {DIV_CLICK_BLOCKER, DIV_CLICK_BLOCKER_2}, until = Until.GONE, waitSecondsForElement = 30)
    @Wait(value = VEHICLE_CAR_ACCIDENT_INSURANCE_OPTION_DEFAULT, waitSecondsForElement = 30)
    @Click(VEHICLE_CAR_ACCIDENT_INSURANCE_OPTION_DEFAULT)
    NewCalculationPage clickVehicleAccidentInsuranceOption(AccidentInsurance accidentInsurance);

    @Wait(value = VEHICLE_CAR_ACCIDENT_INSURANCE_CHOOSE_BUTTON, waitSecondsForElement = 30)
    @Click(value = VEHICLE_CAR_ACCIDENT_INSURANCE_CHOOSE_BUTTON, jsClick = true)
    NewCalculationPage clickVehicleAccidentInsuranceChoose();

    @Wait(value = {DIV_CLICK_BLOCKER, DIV_CLICK_BLOCKER_2}, until = Until.GONE, waitSecondsForElement = 30)
    @Wait(value = VEHICLE_CAR_BENEFITS, waitSecondsForElement = 30)
    @Click(value = VEHICLE_CAR_BENEFITS, andWait = @Wait(value = CommonElements.MODAL, waitSecondsForElement = 30))
    NewCalculationPage clickVehicleBenefit();

    @Wait(value = {DIV_CLICK_BLOCKER, DIV_CLICK_BLOCKER_2}, until = Until.GONE, waitSecondsForElement = 30)
    @Wait(value = VEHICLE_CAR_BENEFITS_OPTION_DEFAULT, waitSecondsForElement = 30)
    @Click(VEHICLE_CAR_BENEFITS_OPTION_DEFAULT)
    NewCalculationPage clickVehicleBenefitOption(Benefit benefit);

    @Wait(value = VEHICLE_CAR_BENEFITS_CHOOSE_BUTTON, waitSecondsForElement = 30)
    @Click(value = VEHICLE_CAR_BENEFITS_CHOOSE_BUTTON, jsClick = true)
    NewCalculationPage clickVehicleBenefitChoose();

    @Wait(explicitWaitSeconds = 15)
    @Click(value = IMG_AUTO_OPERATOR_OPTIONS, jsClick = true)
    NewCalculationPage clickOperatorOptions();

    @Click(value = SPAN_CHANGE_PASSWORD, jsClick = true)
    ChangePasswordPage clickChangePassword();

    @Click(value = SPAN_DEALER_FINANCING, jsClick = true)
    DashboardPage clickDealerFinancing();

    @Click(SPAN_COMMISSION_REPORTING)
    ForBillingPage clickCommissionReporting();

    @Click(value = VEHICLE_CUSTOMER_DEFAULT, andWait = @Wait(explicitWaitSeconds = 1))
    NewCalculationPage clickCustomer(Customer customer);

    @Click(VEHICLE_USAGE_COMBOBOX_ARROW)
    NewCalculationPage clickVehicleUsageComboboxArrow();

    @Click(VEHICLE_USAGE_DEFAULT)
    NewCalculationPage clickVehicleUsage(Usage usage);

    @TypeInto(value = VEHICLE_SEARCH_BRAND, andWait = @Wait(explicitWaitSeconds = 2))
    NewCalculationPage typeVehicleBrand(String vehicleName);

    @TypeInto(value = VEHICLE_SEARCH_MODEL, andWait = @Wait(explicitWaitSeconds = 2))
    NewCalculationPage typeVehicleModel(String vehicleModel);

    @TypeInto(VEHICLE_PRICE)
    NewCalculationPage typePrice(int price);

    @Click(VEHICLE_VAT_BUTTON_DEFAULT)
    NewCalculationPage clickVat(Vat vat);

    @Click(VEHICLE_GROUP_COMBOBOX_ARROW)
    NewCalculationPage clickVehicleGroupComboboxArrow();

    @Click(VEHICLE_REGISTRATION_DATE)
    NewCalculationPage clickVehicleRegistrationDate();

    @Click(value = VEHICLE_REGISTRATION_DATE_MONTH, isStringDynamicXpath = true)
    NewCalculationPage clickVehicleRegistrationMonth(String month);

    @Click(VEHICLE_REGISTRATION_DATE_YEAR)
    NewCalculationPage clickVehicleRegistrationYear(Year year);

    @Click(VEHICLE_REGISTRATION_DATE_CHOOSE_BUTTON)
    NewCalculationPage clickVehicleRegistrationDateChoose();

    @CheckElementPresent(VEHICLE_FIRST_PAYMENT_NOT_EMPTY)
    NewCalculationPage checkVehicleFirstPayment();

    @CheckElementPresent(VEHICLE_INSTALMENT_COUNT_NOT_EMPTY)
    NewCalculationPage checkVehicleInstalmentCount();

    @CheckElementPresent(VEHICLE_INSTALMENT_COMPUTATION_NOT_EMPTY)
    NewCalculationPage checkVehicleInstalmentComputation();

    @Click(value = CommonElements.SAVE_CALCULATION_BUTTON, andWait = @Wait(value = CommonElements.SUCCESSFUL_SAVED_CALCULATION_MESSAGE, until = Until.VISIBLE), jsClick = true)
    NewCalculationPage clickSaveCalculation();

    @Wait(value = CREATE_APPLICATION, until = Until.CLICKABLE)
    @Click(value = CREATE_APPLICATION, jsClick = true)
    CustomerPage clickCreateApplication();

    @Click(MENU_QUEUE)
    QueuePage clickMenuQueue();

    @Click(AGRO_SEARCH)
    NewCalculationPage clickAgroBrand(Brand brand);

    @Click(AGRO_SEARCH)
    NewCalculationPage clickAgroItemType(ItemType itemType);

    @Click(value = AGRO_SEARCH_BRAND_ARROW, andWait = @Wait(explicitWaitSeconds = 2))
    NewCalculationPage clickAgroSearchBrandArrow();

    @Click(value = AGRO_ITEM_TYPE_SEARCH_ARROW, andWait = @Wait(explicitWaitSeconds = 2))
    NewCalculationPage clickItemTypeSearchArrow();

    @Click(value = AGRO_SEARCH_TYPE, andWait = @Wait(explicitWaitSeconds = 2), jsClick = true)
    NewCalculationPage searchAgroModel();

    @Click(value = AGRO_SEARCH_RESULT, jsClick = true)
    NewCalculationPage clickAgroModel(Model model);

    @TypeInto(value = AGRO_MODEL, andWait = @Wait(explicitWaitSeconds = 1))
    NewCalculationPage typeAgroModel(String model);


    @TypeInto(value = AGRO_NO_TP_BRAND, andWait = @Wait(explicitWaitSeconds = 1))
    NewCalculationPage typeAgroBrandWithoutTP(String brand);

    @Click(value = AGRO_PGRLF_CHECKBOX, jsClick = true)
    NewCalculationPage clickAgroPgrlf();

    @Click(value = AGRO_SZIF_CHECKBOX, jsClick = true)
    NewCalculationPage clickAgroSzif();

    @Click(value = AGRO_YOUNGFARMER_CHECKBOX, jsClick = true)
    NewCalculationPage clickAgroYoungFarmer();

    @Click(value = AGRO_CALENDAR_BUTTON, jsClick = true, andWait = @Wait(explicitWaitSeconds = 2))
    NewCalculationPage clickAgroCalendar();

    @Click(value = AGRO_CALENDAR_TODAY, andWait = @Wait(explicitWaitSeconds = 2))
    NewCalculationPage clickAgroToday();

    @Click(value = AGRO_DEFERRED_DRAWING, jsClick = true)
    NewCalculationPage clickDeferredDrawing();

    // Nerovnoměrné splátky
    @Click(value = IRREGULAR_ICON)
    NewCalculationPage clickIrregularIcon();

    @Click(value = IRREGULAR_EDIT_BUTTON)
    NewCalculationPage clickIrregularEditButton();

    @Click(value = IRREGULAR_CONFIRM, andWait = @Wait(explicitWaitSeconds = 2))
    NewCalculationPage clickIrregularConfirm();

    @Click(value = IRREGULAR_SUBMIT)
    NewCalculationPage clickIrregularSubmit();

    @TypeInto(value = IRREGULAR_INPUT, clear = true)
    NewCalculationPage typeIrregularPayment(Long payment);

    @CheckElementPresent(IS_IRREGULAR)
    NewCalculationPage checkIfIrregular();

    @Click(value = MENU_SAVED)
    SavedCalculationsPage clickMenuSaved();

    @Wait(value = LOGIN_SUCCESS, until = Until.GONE)
    @Click(value = MAIN_NAV_PROFILE)
    NewCalculationPage clickNavigation();

    @Click(value = INVOICES_BUTTON)
    InvoicesPage clickInvoices();

    @Click(value = SUBSIDY_VALUE_DEFAULT, andWait = @Wait(until = Until.VISIBLE))
    NewCalculationPage setSubsidyValue(Subsidy subsidy);

    @TypeInto(value = FIRST_PAYMENT_INPUT, clear = true)
    NewCalculationPage typeFirstPayment(int payment);

    @CustomAction
    default NewCalculationPage scrollToTop() {
        SmartAutoEndpoint endpoint = getEndpoint(SmartAutoEndpoint.class);
        endpoint.scrollIntoView(NEW_CALCULATION_BUTTON);
        return null;
    }

    @KeyPress(Key.TAB)
    NewCalculationPage lostFocus();

    @Wait(VEHICLE_CAR_INSURANCE)
    @CustomAction
    default NewCalculationPage scrollToChoose() {
        SmartAutoEndpoint endpoint = getEndpoint(SmartAutoEndpoint.class);
        endpoint.scrollIntoView(VEHICLE_CAR_INSURANCE_INSURANCE_CHOOSE);
        return null;
    }


}