// Path: src/samples/journey-pattern-sample/src/main/java/net/serenitybdd/demos/todos/model/TodoStatus.java
// public enum TodoStatus {
//     Active, Completed
// }
// 
// Path: src/samples/journey-pattern-sample/src/main/java/net/serenitybdd/demos/todos/pages/todolist/items/TodoListItem.java
// public class TodoListItem {
// 
//     public static Target COMPLETE_ITEM_BUTTON = Target.the("Complete button")
//             .locatedBy( "//*[@class='view' and contains(.,'{0}')]//input[@type='checkbox']");
// 
//     public static Target DELETE_ITEM_BUTTON = Target.the("Delete button")
//             .locatedBy( "//*[@class='view' and contains(.,'{0}')]//button[@class='destroy']");
// 
//     public static Target ITEM_TEXT_LABEL = Target.the("Item text label")
//             .locatedBy("//*[@class='view' and contains(.,'{0}')]//label");
// 
//     public static Target ITEM_TEXT_INPUT = Target.the("Item text label")
//             .locatedBy("//li[contains(.,'{0}')]//form/input");
// }


import com.google.common.collect.ImmutableMap;
import net.serenitybdd.core.steps.Instrumented;
import net.serenitybdd.demos.todos.model.TodoStatus;
import net.serenitybdd.demos.todos.pages.todolist.items.TodoListItem;
import net.serenitybdd.screenplay.Actor;
import net.serenitybdd.screenplay.Question;
import net.serenitybdd.screenplay.questions.SelectedStatus;
import net.serenitybdd.screenplay.targets.Target;
import java.util.Map;
import static java.lang.Boolean.FALSE;
import static java.lang.Boolean.TRUE;
import static net.serenitybdd.demos.todos.model.TodoStatus.Active;
import static net.serenitybdd.demos.todos.model.TodoStatus.Completed;
package net.serenitybdd.demos.todos.questions;




public class TheItemStatus implements Question<TodoStatus> {

    private final String itemName;

    private final Map<Boolean, TodoStatus> CHECKED_STATUS = ImmutableMap.of(
        FALSE, Active,
        TRUE,  Completed
    );

    public TheItemStatus(String itemName) {
        this.itemName = itemName;
    }

    @Override
    public TodoStatus answeredBy(Actor actor) {
// Path: src/samples/journey-pattern-sample/src/main/java/net/serenitybdd/demos/todos/model/TodoStatus.java
// public enum TodoStatus {
//     Active, Completed
// }
// 
// Path: src/samples/journey-pattern-sample/src/main/java/net/serenitybdd/demos/todos/pages/todolist/items/TodoListItem.java
// public class TodoListItem {
// 
//     public static Target COMPLETE_ITEM_BUTTON = Target.the("Complete button")
//             .locatedBy( "//*[@class='view' and contains(.,'{0}')]//input[@type='checkbox']");
// 
//     public static Target DELETE_ITEM_BUTTON = Target.the("Delete button")
//             .locatedBy( "//*[@class='view' and contains(.,'{0}')]//button[@class='destroy']");
// 
//     public static Target ITEM_TEXT_LABEL = Target.the("Item text label")
//             .locatedBy("//*[@class='view' and contains(.,'{0}')]//label");
// 
//     public static Target ITEM_TEXT_INPUT = Target.the("Item text label")
//             .locatedBy("//li[contains(.,'{0}')]//form/input");
// }


// Path: src/samples/journey-pattern-sample/src/main/java/net/serenitybdd/demos/todos/questions/TheItemStatus.java
import com.google.common.collect.ImmutableMap;
import net.serenitybdd.core.steps.Instrumented;
import net.serenitybdd.demos.todos.model.TodoStatus;
import net.serenitybdd.demos.todos.pages.todolist.items.TodoListItem;
import net.serenitybdd.screenplay.Actor;
import net.serenitybdd.screenplay.Question;
import net.serenitybdd.screenplay.questions.SelectedStatus;
import net.serenitybdd.screenplay.targets.Target;
import java.util.Map;
import static java.lang.Boolean.FALSE;
import static java.lang.Boolean.TRUE;
import static net.serenitybdd.demos.todos.model.TodoStatus.Active;
import static net.serenitybdd.demos.todos.model.TodoStatus.Completed;

package net.serenitybdd.demos.todos.questions;




public class TheItemStatus implements Question<TodoStatus> {

    private final String itemName;

    private final Map<Boolean, TodoStatus> CHECKED_STATUS = ImmutableMap.of(
        FALSE, Active,
        TRUE,  Completed
    );

    public TheItemStatus(String itemName) {
        this.itemName = itemName;
    }

    @Override
    public TodoStatus answeredBy(Actor actor) {
        Target completeItemButton = TodoListItem.COMPLETE_ITEM_BUTTON.of(itemName);