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 javafx.fxml.FXMLLoader;

import java.io.IOException;

/**
 * @author zm
 * @date 2025/3/15 11:38
 * @version: 1.0
 */
public class RoleForm extends Form {

    private RoleEditController controller;

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

    public RoleEditController getController() {
        return controller;
    }

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