#ifndef END_SCREEN_HPP
#define END_SCREEN_HPP

#include "godot_cpp/classes/canvas_layer.hpp"
#include "godot_cpp/classes/packed_scene.hpp"
namespace godot {
//! The game-over screen, used both when the player has won and lost the game.
class EndScreen : public CanvasLayer {
    GDCLASS(EndScreen, CanvasLayer);
    //! Bind editor properties.
    static void _bind_methods();
public:
    //! Fetch buttons from children and register observers.
    virtual void _ready() override;

    //! Listener for return to menu button "button_down" observer. Load the main menu scene.
    void return_to_main();
    //! Listener for restart button "button_down" observer. Load the game scene.
    void restart();

    //! The scene to load when return to main menu is pressed.
    void set_main_menu_scene(Ref<PackedScene> scene);
    //! The scene to load when return to main menu is pressed.
    Ref<PackedScene> get_main_menu_scene() const;
    //! The scene to load when the restart game button is pressed.
    void set_game_scene(Ref<PackedScene> scene);
    //! The scene to load when the restart game button is pressed.
    Ref<PackedScene> get_game_scene() const;
private:
    Ref<PackedScene> game_scene{};
    Ref<PackedScene> main_menu_scene{};
};
}
#endif // !END_SCREEN_HPP
