@tool
extends EditorInspectorPlugin

const SLOT_SCENE:= preload("res://addons/reedscene/act/StateDrapSlot.tscn")
const QUICK_CONFIG_SCENE:= preload("res://addons/reedscene/act/StateQuickConfigPanel.tscn")

func _can_handle(object) -> bool:
	return object is ActManager

func _parse_begin(object) -> void:
	var root := VBoxContainer.new()
	
	var am = object as ActManager
	if not am: return
	var rs: ReedScene = am._get_owner_scene()
	if not rs: return
	var size: int = rs.get_prop_count()
	
	
	var quick_config_panel := QUICK_CONFIG_SCENE.instantiate()
	var info := {
		"size": size
	}
	quick_config_panel.init(info)
	
	root.add_child(quick_config_panel)
	add_custom_control(root)
