#pragma once

/*
	GameEngine and Editor
	by John Ryland
	Copyright (c) 2023
*/

////////////////////////////////////////////////////////////////////////////////////
//	Flat Entity List View

#include "IView.h"
#include "EcsSystem.h"

namespace GameEngine {

class FlatEntityListView : public IView
{
public:
    FlatEntityListView(const EcsSystem& entityComponentSystem)
        : m_entityComponentSystem(entityComponentSystem)
    {
    }

    void AddShowMenuItem() override;

    void Initialize() override;
    void Shutdown() override;
    void Update() override;

    // Experimenting with idea to expose some UI events like this:
    void OnVisibilityChanged(bool shown);
    void OnOpen();
    void OnClose();
    void OnDraw();

private:
    bool m_open = false;
    bool m_wasOpen = false;
    const EcsSystem& m_entityComponentSystem;
};

} // GameEngine namespace
