#pragma once

#include "../../entity.hpp"
#include "text.hpp"

#include <optional>
#include <vector>

namespace game::state::play
{
  class CharacterManager
  {
  public:
    bool isDisabled{};
    bool isInteracting{};
    bool isHovering{};
    bool isInteractingPrevious{};
    bool isHoveringPrevious{};
    bool isJustStoppedInteracting{};
    bool isJustStoppedHovering{};
    bool isHoldInteracting{};
    bool isHoldInteractingPrevious{};
    bool isJustStoppedHoldInteracting{};
    int interactAreaID{-1};
    std::vector<int> interactAreaDialogueTimers{};

    glm::vec2 cursorWorldPositionPrevious{};
    std::string queuedAnimation{};

    struct Particle
    {
      std::string label{};
      glm::vec2 position{};
    };

    struct Input
    {
      bool isImguiCaptureMouse{};
      bool isMouseLeftClick{};
      bool isMouseLeftDown{};
      bool isMouseLeftReleased{};
    };

    std::optional<Input> inputOverride{};
    std::vector<Particle> particles{};

    void update(Entity&, Entity&, Text&, Canvas&);
  };
}
