package cz.moneta.test.dsl.hypos.pages.structure;

import cz.moneta.test.dsl.hypos.components.StructureMenu;
import cz.moneta.test.dsl.hypos.pages.HyposPageFlow;
import cz.moneta.test.harness.context.StoreAccessor;
import cz.moneta.test.harness.support.web.CheckElementPresent;
import cz.moneta.test.harness.support.web.Click;
import cz.moneta.test.harness.support.web.Select;
import cz.moneta.test.harness.support.web.Wait;

import static cz.moneta.test.dsl.hypos.pages.structure.StructureClientChangePage.APPENDIX_LINK;

@Wait(APPENDIX_LINK)
public interface StructureClientChangePage extends HyposPageFlow<StructureClientChangePage>, StructureMenu, StoreAccessor {
    String CONTRACTS = "//table//tbody//td/a[contains(@href,'/')]";
    String APPENDIX_LINK = "//a[@id='ui-id-3']";
    String APPENDIX_ALLOWED_LINK = "//div[@id='section-a3']//a[text()='Povolené']";
    String FILTER_CREATED_BY_SELECT = "//select[@id='filter-created_by']";
    String SEARCH_BUTTON = "//button[@id='filter-submit']";

    @Click(APPENDIX_LINK)
    StructureClientChangePage clickAppendix();

    @Click(SEARCH_BUTTON)
    StructureClientChangePage clickSearchButton();

    @Click(APPENDIX_ALLOWED_LINK)
    StructureClientChangePage clickAppendixAllowed();

    @CheckElementPresent(CONTRACTS)
    StructureClientChangePage checkContracts();

    @Select(FILTER_CREATED_BY_SELECT)
    StructureClientChangePage selectFilterCreatedBy(String createdBy);
}