#pragma once

#include "application/state.h"
#include "core/corefactory.h"
#include "core/functional.h"

class Group;

class MainMenu : public GUIState
{
public:

    struct Callbacks
    {
        kku::lambda onAppendGameState;
        kku::lambda onAppendEditorState;
        kku::lambda onAppendAboutState;
    };

    explicit MainMenu(const std::shared_ptr<kku::CoreFactory>& factory, Callbacks&& callbacks);
    virtual void input(const kku::SystemEvent& event) override;
    virtual void update(const kku::microsec& dt) override;
    virtual void display() const override;

    virtual void enter() override;
    virtual void leave() override;

private:
    const Callbacks _callbacks;
    const std::shared_ptr<kku::CoreFactory> _core_factory;

    std::shared_ptr<Group> _buttons;
};

