#include "PrefabInstanceEditor.hpp"
#include <imgui.h>

bool PrefabInstanceEditor::renderComponent(flecs::entity entity,
					   PrefabInstanceComponent &component)
{
	bool modified = false;

	char pathBuf[256] = { 0 };
	strncpy(pathBuf, component.prefabPath.c_str(), sizeof(pathBuf) - 1);
	if (ImGui::InputText("Prefab Path", pathBuf, sizeof(pathBuf))) {
		component.prefabPath = pathBuf;
		modified = true;
	}

	ImGui::TextDisabled("Instantiated: %s",
			    component.instantiated ? "yes" : "no");

	return modified;
}
