package com.zhangmeng.online.exam.ui.api.form;

import com.zhangmeng.online.exam.ui.api.form.base.Form;
import com.zhangmeng.online.exam.ui.controller.RoleEditController;
import com.zhangmeng.online.exam.ui.controller.SubjectEditController;
import javafx.fxml.FXMLLoader;

import java.io.IOException;

/**
 * @author zm
 * @date 2025/4/11 9:25
 * @version: 1.0
 */
public class SubjectForm extends Form {

    private SubjectEditController controller;

    public SubjectForm() {
        try {
            FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("/fxml/subject-edit.fxml"));
            this.getChildren().add(fxmlLoader.load());
            this.controller = fxmlLoader.getController();
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }

    public SubjectEditController getController() {
        return controller;
    }

    public void setController(SubjectEditController controller) {
        this.controller = controller;
    }
}
