#pragma once

#include <filesystem>
#include <string>
#include <vector>

#include "schema.hpp"
#include "strings.hpp"

namespace game::resource::xml
{
  class Character
  {
  public:
    Schema schema{};
    Schema areaSchema{};
    Schema dialogue{};
    Schema itemSchema{};
    Schema menuSchema{};
    Schema cursorSchema{};
    Schema particleSchema{};
    Strings strings{};

    Schema save{};

    std::filesystem::path path{};

    Character() = default;
    Character(const std::filesystem::path&);
    Schema::Element* root();
    const Schema::Element* root() const;
    Schema::Element* alternate_spritesheet();
    const Schema::Element* alternate_spritesheet() const;
    const Schema::Element* animations_root() const;
    const Schema::Element* overrides_root() const;
    const Schema::Element* child_get(const Schema::Element&, Schema::Element::Type type, int index = 0) const;
    std::vector<const Schema::Element*> children_get(const Schema::Element&, Schema::Element::Type type) const;
    std::vector<const Schema::Element*> stages_get() const;
    int stage_count_get() const;
    std::vector<const Schema::Element*> expand_areas_get() const;
    std::vector<const Schema::Element*> eat_areas_get() const;
    std::vector<const Schema::Element*> interact_area_types_get() const;
    std::vector<const Schema::Element*> interact_areas_get() const;
    std::vector<std::string> interact_type_names_get() const;
    std::string animation_get(Schema::Element::Type type) const;
    int dialogue_pool_id_get(const std::string& poolID) const;
    int layer_id_get(const std::string&) const;
    int null_id_get(const std::string&) const;
    int event_id_get(const std::string&) const;
    int interact_type_id_get(const std::string&) const;
    int stage_pool_id_get(int stage) const;
    std::filesystem::path save_path_get();
  };
}
