// Path: src/samples/journey-pattern-sample/src/main/java/net/serenitybdd/demos/todos/model/TodoStatusFilter.java
// public enum TodoStatusFilter {
//     All, Active, Completed
// }
// 
// Path: src/samples/journey-pattern-sample/src/main/java/net/serenitybdd/demos/todos/pages/todolist/filter/FilterSelection.java
// public class FilterSelection {
//     public static Target SELECTED_FILTER = Target.the("selected filter").locatedBy("#filters li .selected");
//     public static Target FILTER = Target.the("filter").locatedBy("//*[@id='filters']//a[.='{0}']");
// }


import net.serenitybdd.demos.todos.model.TodoStatusFilter;
import net.serenitybdd.demos.todos.pages.todolist.filter.FilterSelection;
import net.serenitybdd.screenplay.Actor;
import net.serenitybdd.screenplay.Task;
import net.serenitybdd.screenplay.actions.Click;
import net.serenitybdd.screenplay.targets.Target;
import net.thucydides.core.annotations.Step;
import static net.serenitybdd.screenplay.Tasks.instrumented;
package net.serenitybdd.demos.todos.tasks;



public class FilterItems implements Task {

    public static FilterItems byStatus(TodoStatusFilter status) {
        return instrumented(FilterItems.class, status);
    }

    private final TodoStatusFilter filter;

    protected FilterItems(TodoStatusFilter filter) {
        this.filter = filter;
    }

    @Step("{0} filters items by #filter")
    public <T extends Actor> void performAs(T theActor) {
// Path: src/samples/journey-pattern-sample/src/main/java/net/serenitybdd/demos/todos/model/TodoStatusFilter.java
// public enum TodoStatusFilter {
//     All, Active, Completed
// }
// 
// Path: src/samples/journey-pattern-sample/src/main/java/net/serenitybdd/demos/todos/pages/todolist/filter/FilterSelection.java
// public class FilterSelection {
//     public static Target SELECTED_FILTER = Target.the("selected filter").locatedBy("#filters li .selected");
//     public static Target FILTER = Target.the("filter").locatedBy("//*[@id='filters']//a[.='{0}']");
// }


// Path: src/samples/journey-pattern-sample/src/main/java/net/serenitybdd/demos/todos/tasks/FilterItems.java
import net.serenitybdd.demos.todos.model.TodoStatusFilter;
import net.serenitybdd.demos.todos.pages.todolist.filter.FilterSelection;
import net.serenitybdd.screenplay.Actor;
import net.serenitybdd.screenplay.Task;
import net.serenitybdd.screenplay.actions.Click;
import net.serenitybdd.screenplay.targets.Target;
import net.thucydides.core.annotations.Step;
import static net.serenitybdd.screenplay.Tasks.instrumented;

package net.serenitybdd.demos.todos.tasks;



public class FilterItems implements Task {

    public static FilterItems byStatus(TodoStatusFilter status) {
        return instrumented(FilterItems.class, status);
    }

    private final TodoStatusFilter filter;

    protected FilterItems(TodoStatusFilter filter) {
        this.filter = filter;
    }

    @Step("{0} filters items by #filter")
    public <T extends Actor> void performAs(T theActor) {
        Target filterSelection = FilterSelection.FILTER.of(filter.name()).called("filter by "+ filter);