#ifndef EDITSCENE_TRIANGLEBUFFEREDITOR_HPP
#define EDITSCENE_TRIANGLEBUFFEREDITOR_HPP
#pragma once

#include "ComponentEditor.hpp"
#include "../components/TriangleBuffer.hpp"
#include <OgreSceneManager.h>
#include <flecs.h>

/**
 * Editor for TriangleBufferComponent
 */
class TriangleBufferEditor : public ComponentEditor<TriangleBufferComponent> {
public:
	TriangleBufferEditor(Ogre::SceneManager* sceneMgr = nullptr);
	bool renderComponent(flecs::entity entity, TriangleBufferComponent &tb) override;
	const char *getName() const override { return "Triangle Buffer"; }

private:
	void renderTextureSelector(flecs::entity entity, TriangleBufferComponent &tb);
	void renderRectSelector(flecs::entity entity, TriangleBufferComponent &tb);
	void renderMaterialSelector(flecs::entity entity, TriangleBufferComponent &tb);
	void renderStaticGeometrySelector(flecs::entity entity, TriangleBufferComponent &tb);
	
	Ogre::SceneManager* m_sceneMgr;
};

#endif // EDITSCENE_TRIANGLEBUFFEREDITOR_HPP
