/*
 * Copyright 2016 - 2025 Gary Talent (gary@drinkingtea.net). All rights reserved.
 */

#pragma once

#include <ox/model/modelvalue.hpp>
#include <turbine/context.hpp>

#include <studio/editor.hpp>

namespace studio {

class ClawEditor: public Editor {
	private:
		using ObjPath = ox::Vector<ox::StringView, 8>;
		ox::ModelObject m_obj;
	public:
		ClawEditor(Context &sctx, ox::StringParam path);

		void draw(Context&) noexcept final;

	private:
		static void drawRow(ox::ModelValue const &value) noexcept;

		void drawVar(ObjPath &path, ox::StringViewCR name, ox::ModelValue const &value) noexcept;

		void drawTree(ObjPath &path, ox::ModelObject const &obj) noexcept;
};

}
