package seedu.address.ui;

import javafx.fxml.FXML;
import javafx.scene.Node;
import javafx.scene.control.Label;
import javafx.scene.layout.HBox;
import seedu.address.model.person.ReadOnlyPerson;

public class PersonCard extends UiPart{

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

    @FXML
    private HBox cardPane;
    @FXML
    private Label name;
    @FXML
    private Label id;
    @FXML
    private Label phone;
    @FXML
    private Label address;
    @FXML
    private Label email;
    @FXML
    private Label tags;

    private ReadOnlyPerson person;
    private int displayedIndex;

    public PersonCard(){

    }

    public static PersonCard load(ReadOnlyPerson person, int displayedIndex){
        PersonCard card = new PersonCard();
        card.person = person;
        card.displayedIndex = displayedIndex;
        return UiPartLoader.loadUiPart(card);
    }

    @FXML
    public void initialize() {
        name.setText(person.getName().fullName);
        id.setText(displayedIndex + ". ");
        phone.setText(person.getPhone().value);
        address.setText(person.getAddress().value);
        email.setText(person.getEmail().value);
        tags.setText(person.tagsString());
    }

    public HBox getLayout() {
        return cardPane;
    }

    @Override
    public void setNode(Node node) {
        cardPane = (HBox)node;
    }

    @Override
    public String getFxmlPath() {
        return FXML;
    }
}

@@ -411,115 +411,8 @@
 XML%0A
-    private Label phone;%0A    @FXML%0A    private Label address;%0A    @FXML%0A    private Label email;%0A    @FXML%0A
     
@@ -921,156 +921,8 @@
 %22);%0A
-        phone.setText(person.getPhone().value);%0A        address.setText(person.getAddress().value);%0A        email.setText(person.getEmail().value);%0A
     

Remove phone, address and email from Personcard class in UI