@tool
class_name MoveCameraCommand extends CutsceneCommand

@export_node_path("LerpableCamera") var target_camera: NodePath
@export var to_initial = false
@export var target: Vector2
@export var relative = false
@export var speed = 1.0
@export var teleport = false
@export var wait_until_completion = true

func _validate_property(property: Dictionary):
	if property.name == "speed" and teleport:
		property.usage |= PROPERTY_USAGE_READ_ONLY
	elif property.name == "speed" and not teleport:
		property.usage &= ~PROPERTY_USAGE_READ_ONLY
	
	if (property.name == "target" or property.name == "relative") and to_initial:
		property.usage |= PROPERTY_USAGE_READ_ONLY
	elif (property.name == "target" or property.name == "relative") and not to_initial:
		property.usage &= ~PROPERTY_USAGE_READ_ONLY
