#pragma once

#include <godot_cpp/classes/input_event.hpp>
#include <godot_cpp/classes/node3d.hpp>
#include <godot_cpp/classes/spring_arm3d.hpp>
#include <godot_cpp/classes/camera3d.hpp>

namespace blitz {
class SpringArmPivot : public godot::Node3D {

	GDCLASS(SpringArmPivot, godot::Node3D);

  protected:
	static void _bind_methods();

  public:
	SpringArmPivot();
	~SpringArmPivot();

	void _ready();
	void _unhandled_input(const godot::Ref<godot::InputEvent>& p_event);
	void _physics_process(float delta);

	void SetDynamicFov(bool fov) {
		m_DynamicFOV = fov;
	}

	bool IsFovDynamic() const {
		return m_DynamicFOV;
	}

  private:
	godot::SpringArm3D* m_SpringArm;
	godot::Camera3D* m_Camera;

	bool m_DynamicFOV = false;
};
}  // namespace blitz
