package com.zhangmeng.online.exam.ui.components;

import javafx.beans.property.SimpleIntegerProperty;
import javafx.beans.property.SimpleStringProperty;
import javafx.geometry.Insets;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.control.TextField;
import javafx.scene.layout.HBox;

/**
 * @author zm
 * @date 2025/3/20 11:26
 * @version: 1.0
 */
public class PaperResultHeaderComponent extends HBox {

    private Button commitBtn;//提交按钮

    private SimpleStringProperty SINGLE_CHOICE_SCORE = new SimpleStringProperty("单选题分数：0");//单选题分数

    private SimpleStringProperty MULTIPLE_CHOICE_SCORE = new SimpleStringProperty("多选题分数：0");//多选题分数

    private SimpleStringProperty JUDGMENT_SCORE = new SimpleStringProperty("判断题分数：0");//判断题分数

    private SimpleStringProperty NUMERICAL_SCORE = new SimpleStringProperty("计算题分数：0");//计算题分数

    private SimpleStringProperty SHORT_ANSWER_SCORE = new SimpleStringProperty("简答题分数：0");//简答题分数

    private SimpleStringProperty Fill_IN_THE_BLANKS = new SimpleStringProperty();//填空题分数

    private SimpleStringProperty ANSWER_SCORE = new SimpleStringProperty("答题总分：0");//答题总分

    public PaperResultHeaderComponent(double spacing) {
        super();
        this.setSpacing(spacing);
        Label label = new Label("");
        label.setPadding(new Insets(5, 0, 0, 0));
        label.textProperty().bindBidirectional(SINGLE_CHOICE_SCORE);
//
        Label label2 = new Label();
        label2.setPadding(new Insets(5, 0, 0, 0));
        label2.textProperty().bindBidirectional(MULTIPLE_CHOICE_SCORE);

        Label label3 = new Label();
        label3.setPadding(new Insets(5, 0, 0, 0));
        label3.textProperty().bindBidirectional(JUDGMENT_SCORE);

        Label label4 = new Label();
        label4.setPadding(new Insets(5, 0, 0, 0));
        label4.textProperty().bindBidirectional(NUMERICAL_SCORE);

        Label label5 = new Label();
        label5.setPadding(new Insets(5, 0, 0, 0));
        label5.textProperty().bindBidirectional(SHORT_ANSWER_SCORE);

        Label label6 = new Label();
        label6.setPadding(new Insets(5, 0, 0, 0));
        label6.textProperty().bindBidirectional(ANSWER_SCORE);


        commitBtn = new Button("提交");

        this.getChildren().add(label);
        this.getChildren().add(label2);
        this.getChildren().add(label3);
        this.getChildren().add(label4);
        this.getChildren().add(label5);
        this.getChildren().add(label6);
        this.getChildren().add(commitBtn);

    }

    public Button getCommitBtn() {
        return commitBtn;
    }

    public void setCommitBtn(Button commitBtn) {
        this.commitBtn = commitBtn;
    }

    public String getSINGLE_CHOICE_SCORE() {
        return SINGLE_CHOICE_SCORE.get();
    }

    public SimpleStringProperty SINGLE_CHOICE_SCOREProperty() {
        return SINGLE_CHOICE_SCORE;
    }

    public void setSINGLE_CHOICE_SCORE(String SINGLE_CHOICE_SCORE) {
        this.SINGLE_CHOICE_SCORE.set(SINGLE_CHOICE_SCORE);
    }

    public String getMULTIPLE_CHOICE_SCORE() {
        return MULTIPLE_CHOICE_SCORE.get();
    }

    public SimpleStringProperty MULTIPLE_CHOICE_SCOREProperty() {
        return MULTIPLE_CHOICE_SCORE;
    }

    public void setMULTIPLE_CHOICE_SCORE(String MULTIPLE_CHOICE_SCORE) {
        this.MULTIPLE_CHOICE_SCORE.set(MULTIPLE_CHOICE_SCORE);
    }

    public String getJUDGMENT_SCORE() {
        return JUDGMENT_SCORE.get();
    }

    public SimpleStringProperty JUDGMENT_SCOREProperty() {
        return JUDGMENT_SCORE;
    }

    public void setJUDGMENT_SCORE(String JUDGMENT_SCORE) {
        this.JUDGMENT_SCORE.set(JUDGMENT_SCORE);
    }

    public String getNUMERICAL_SCORE() {
        return NUMERICAL_SCORE.get();
    }

    public SimpleStringProperty NUMERICAL_SCOREProperty() {
        return NUMERICAL_SCORE;
    }

    public void setNUMERICAL_SCORE(String NUMERICAL_SCORE) {
        this.NUMERICAL_SCORE.set(NUMERICAL_SCORE);
    }

    public String getSHORT_ANSWER_SCORE() {
        return SHORT_ANSWER_SCORE.get();
    }

    public SimpleStringProperty SHORT_ANSWER_SCOREProperty() {
        return SHORT_ANSWER_SCORE;
    }

    public void setSHORT_ANSWER_SCORE(String SHORT_ANSWER_SCORE) {
        this.SHORT_ANSWER_SCORE.set(SHORT_ANSWER_SCORE);
    }

    public String getANSWER_SCORE() {
        return ANSWER_SCORE.get();
    }

    public SimpleStringProperty ANSWER_SCOREProperty() {
        return ANSWER_SCORE;
    }

    public void setANSWER_SCORE(String ANSWER_SCORE) {
        this.ANSWER_SCORE.set(ANSWER_SCORE);
    }

    public String getFill_IN_THE_BLANKS() {
        return Fill_IN_THE_BLANKS.get();
    }

    public SimpleStringProperty fill_IN_THE_BLANKSProperty() {
        return Fill_IN_THE_BLANKS;
    }

    public void setFill_IN_THE_BLANKS(String fill_IN_THE_BLANKS) {
        this.Fill_IN_THE_BLANKS.set(fill_IN_THE_BLANKS);
    }
}
