package seedu.address.ui;

import javafx.fxml.FXML;
import javafx.scene.control.Label;
import javafx.scene.layout.FlowPane;
import javafx.scene.layout.HBox;
import javafx.scene.layout.Region;
import seedu.address.model.task.ReadOnlyTask;

public class TaskCard extends UiPart<Region> {

    private static final String FXML = "TaskListCard.fxml";

    @FXML
    private HBox cardPane;
    @FXML
    private Label id;
    @FXML
    private Label title;
    @FXML
    private Label dateTime;
    @FXML
    private Label content;
    @FXML
    private FlowPane tags;

    public TaskCard(ReadOnlyTask task, int displayedIndex) {
        super(FXML);
        title.setText(task.getTitle().fullTitle + " ");
        id.setText(displayedIndex + ".");
        dateTime.setText(task.getDateTime().toString());
        if (task.getStatus().getStatus()) {
            dateTime.setStyle("-fx-text-fill: green");
        }
        content.setText(task.getContent().fullContent);
        initTags(task);
    }

    private void initTags(ReadOnlyTask task) {
        task.getTags().forEach(tag -> tags.getChildren().add(new Label(tag.tagName)));
    }
}

@@ -791,24 +791,80 @@
 oString());%0A
+        content.setText(task.getContent().fullContent);%0A
         if (
@@ -903,31 +903,28 @@
             
-dateTim
+titl
 e.setStyle(%22
@@ -959,66 +959,168 @@
     
-%7D%0A        content.setText(task.getContent().fullContent
+    id.setStyle(%22-fx-text-fill: green%22);%0A            dateTime.setStyle(%22-fx-text-fill: green%22);%0A            content.setStyle(%22-fx-text-fill: green%22
 );%0A
+        %7D%0A
     

change color of task when it is marked as done