#pragma once
#include "editor/editor_system.h"
#include "render/graph/frame_graph.h"
#include "vkn/vulkan_api.h"
namespace vkn {
	using api::FrameGraph;
	using api::RenderPassContext;
	using api::RenderPassBuilder;
	using api::RenderEditorContext;
	class VulkanImguiEditor : public api::EditorSystem {
	public:
		void Initialize() override;
		void Finalize() override;
		
		ImTextureID AddTexture(ImageViewPtr imageview, SamplerPtr sampler, ResourceState state) override;

		void Render(FrameGraph& graph, RenderEditorContext& ctx);
		void OnBeginRenderFrame(FrameGraph& graph, uint32_t frame);
		static VulkanImguiEditor* Ptr() {
			return (VulkanImguiEditor*)api::EditorSystem::Ptr();
		};
		static void Setup(FrameGraph& graph, RenderPassBuilder& builder);
		static void Execute(FrameGraph&, RenderPassContext&);
	};
}