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

import com.zhangmeng.online.exam.ui.api.ApiUtils;
import com.zhangmeng.online.exam.ui.layouts.SideMenu;
import com.zhangmeng.online.exam.ui.layouts.TopMenu;
import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.BorderPane;
import javafx.scene.layout.StackPane;

/**
 * @author zm
 * @date 2025/3/5 9:36
 * @version: 1.0
 */
public class UserPage extends BorderPane {

    private SideMenu sideMenu = null;

    public UserPage() {

        sideMenu = new SideMenu(ApiUtils.getMenuItems()); // 导航栏容器
        StackPane contentArea = new StackPane(); // 右侧内容区
        contentArea.setStyle("-fx-background-color: #3ce53c;");

        AnchorPane top = new AnchorPane(); // 顶部容器
        top.setStyle("-fx-background-color: #8a4ed4;");
        top.setPrefHeight(40);

        TopMenu topMenu = new TopMenu(); // 顶部菜单栏
        top.getChildren().add(topMenu);

        this.setLeft(sideMenu);
        this.setCenter(contentArea);
//        this.setTop(top);
    }

}
