extends Camera2D


@export_range(0.0, 100) var pan_speed: float = 1.0

var should_move_right = false
var should_move_left = false

signal move_to_reception_finished
signal move_to_dining_room_finished

func move_to_reception() -> void:
	var camera_tween = get_tree().create_tween()
	camera_tween.set_ease(Tween.EASE_IN_OUT)
	camera_tween.set_trans(Tween.TRANS_CUBIC)
	camera_tween.tween_property(self, "position", Vector2.ZERO, 0.5)
	camera_tween.tween_callback(on_move_to_reception_finished)
	
func on_move_to_reception_finished() -> void:
	move_to_reception_finished.emit()

func move_to_dining_room() -> void:
	var camera_tween = get_tree().create_tween()
	camera_tween.set_ease(Tween.EASE_IN_OUT)
	camera_tween.set_trans(Tween.TRANS_CUBIC)
	camera_tween.tween_property(self, "position", Vector2(2720.0, 0), 0.5)
	camera_tween.tween_callback(on_move_to_dining_room_finished)
	
func on_move_to_dining_room_finished() -> void:
	move_to_dining_room_finished.emit()

func _on_arrow_right_on_clicked() -> void:
	move_to_dining_room()

func _on_arrow_left_on_clicked() -> void:
	move_to_reception()
