#ifndef LIBMONITARR_INCLUDE_ACTIONS_HPP_
#define LIBMONITARR_INCLUDE_ACTIONS_HPP_

#include "utils/config.hpp"

namespace monitarr {
struct app_config;
struct server_cfg;
class data_db;

[[nodiscard]] auto create_client(const server_cfg &server) -> httplib::Client;

[[nodiscard]] auto get_download(std::uint64_t record_id,
                                const server_cfg &server)
    -> std::optional<nlohmann::json>;

[[nodiscard]] auto list_queue(const server_cfg &server) -> int;

[[nodiscard]] auto load_config(std::string &cfg_file) -> app_config;

void remove_stalled(std::string_view download_id, std::string_view title,
                    std::uint64_t episode_id, std::uint64_t movie_id,
                    const server_cfg &server, data_db *state_db = nullptr);
} // namespace monitarr

#endif // LIBMONITARR_INCLUDE_ACTIONS_HPP_
