#pragma once
#include "types.h"
#include <glm/gtc/matrix_transform.hpp>
#include <SDL3/SDL.h>

struct Camera {
  vec2  pos        = vec2(0.0f, 0.0f);
  float zoom       = 1.0f;
  float move_speed = 5.0f;
  float rotation   = 0.0f;

  bool move_left   = false;
  bool move_right  = false;
  bool move_up     = false;
  bool move_down   = false;
  bool shifted     = false;

  void update();
  void on_key(SDL_Scancode scancode, bool pressed);
  void on_mouse_motion(float dx, float dy);
  void on_gamepad(SDL_Gamepad* gamepad);
  CameraUBO ubo(float aspect) const;
};
