#pragma once

#include <cstdint>
#include <string>

#include "adapters/hooks/HookCallbacks.h"

namespace ta::adapters::hooks::lifecycle
{
    enum class InstallStage : std::uint8_t
    {
        None,
        PublishCallbacks,
        LocalRaid,
        GameLoop,
        Player,
        Items,
        Aimbot
    };

    struct InstallResult final
    {
        bool success = false;
        // True when installed or partially installed hook state still requires
        // lifecycle-managed detach/reset.
        bool hook_state_active = false;
        InstallStage stage = InstallStage::None;
        std::string detail;
    };

    [[nodiscard]] InstallResult install_all(const ta::adapters::hooks::RuntimeCallbacks& callbacks);
    [[nodiscard]] bool detach_all();
    void reset_all();
    [[nodiscard]] const char* to_string(InstallStage stage) noexcept;
}
