package werkbook.task.logic.commands;

/**
 * Lists all tasks in the task list to the user.
 */
public class ListCommand extends Command {

    public static final String COMMAND_WORD = "list";
    public static final String SHOW_INCOMPLETE = "incomplete";
    public static final String SHOW_COMPLETE = "complete";

    public static final String MESSAGE_SUCCESS = "(。・ω・。)" + "\nHere are all your tasks!";
    public static final String MESSAGE_SHOW_COMPLETE_SUCCESS = "(ﾉ´ヮ`)ﾉ*: ･ﾟ"
            + "\nThese are your completed tasks!";
    public static final String MESSAGE_SHOW_INCOMPLETE_SUCCESS = "(っ´ω`)ﾉ(╥ω╥)"
            + "\nThese are your uncompleted tasks!";

    public static final String MESSAGE_USAGE = COMMAND_WORD
            + ": Lists tasks by completion status, lists all tasks by default\n"
            + "Parameters: complete/incomplete \n" + "Example: " + COMMAND_WORD + " complete";

    private boolean showComplete = false;
    private boolean showIncomplete = false;

    public ListCommand(String statusToShow) {
        showComplete = statusToShow.trim().equals(SHOW_COMPLETE);
        showIncomplete = statusToShow.trim().equals(SHOW_INCOMPLETE);
    }

    @Override
    public CommandResult execute() {
        String message = MESSAGE_SUCCESS;
        if (showIncomplete) {
            model.updateFilteredTaskListToShowIncomplete();
            message = MESSAGE_SHOW_INCOMPLETE_SUCCESS;
        } else if (showComplete) {
            model.updateFilteredTaskListToShowComplete();
            message = MESSAGE_SHOW_COMPLETE_SUCCESS;
        } else {
            model.updateFilteredListToShowAll();
        }
        return new CommandResult(message);
    }
}

@@ -642,17 +642,17 @@
 re your 
-u
+i
 ncomplet
@@ -644,33 +644,32 @@
  your incomplete
-d
  tasks!%22;%0A%0A    p

Change uncompleted to incomplete