////////////////////////////////////////
// Programming project code
// UniBw M, 2022, 2023, 2024
// www.unibw.de/inf2
// (c) Mark Minas (mark.minas@unibw.de)
////////////////////////////////////////

package pp.monopoly.client;

import java.util.prefs.Preferences;

import pp.dialog.Dialog;
import static pp.util.PreferencesUtils.getPreferences;

/**
 * The Menu class represents the main menu in the Battleship game application.
 * It extends the Dialog class and provides functionalities for loading, saving,
 * returning to the game, and quitting the application.
 */
class Menu extends Dialog {
    private static final Preferences PREFERENCES = getPreferences(Menu.class);
    private static final String LAST_PATH = "last.file.path";
    private final MonopolyApp app;


    /**
     * Constructs the Menu dialog for the Battleship application.
     *
     * @param app the BattleshipApp instance
     */
    public Menu(MonopolyApp app) {
        super(app.getDialogManager());
        this.app = app;
    }

    /**
     * Updates the state of the load and save buttons based on the game logic.
     */
    @Override
    public void update() {

    }

    /**
     * As an escape action, this method closes the menu if it is the top dialog.
     */
    @Override
    public void escape() {
        close();
    }
}
