#pragma once

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

class Group;
class PushButton;

namespace kku { class Sprite; class Text; }

class About : public GUIState
{
public:

    struct Callbacks
    {
        kku::lambda onLeaveAboutState;
    };

    explicit About(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;
    const std::shared_ptr<kku::Sprite> _sfml_logo;
    const std::shared_ptr<kku::Sprite> _cryptopp_logo;
    const std::shared_ptr<kku::Text> _powered_by_text;

    std::shared_ptr<Group> _buttons;
    std::shared_ptr<PushButton> _exit_button;
};

