#pragma once

#include "adapters/config/ItemConfigAdapter.h"
#include "application/actions/UiActionDispatcher.h"
#include "adapters/eft/items/interop/EftItemGateway.h"
#include "features/items/ItemFeature.h"
#include "bootstrap/modules/ModulePorts.h"

namespace ta::bootstrap::modules
{
    class ItemModule final
    {
    public:
        ItemModule(ta::adapters::eft::runtime::EftGameContext& context,
                   ta::adapters::eft::items::WishlistService& wishlist_service,
                   ta::adapters::eft::items::ItemTemplateCatalogService& item_catalog_service,
                   ta::application::UiActionDispatcher& actions);

        [[nodiscard]] const ModulePorts& ports() const noexcept { return ports_; }
        [[nodiscard]] ta::features::items::contracts::IItemQueries& queries() noexcept;
        [[nodiscard]] ta::features::items::contracts::IItemCommands& commands() noexcept;
        [[nodiscard]] ta::features::items::ItemDiagnosticsSnapshot diagnostics_snapshot() const noexcept;

    private:
        ta::adapters::config::ItemConfigAdapter settings_;
        ta::adapters::eft::items::EftItemGateway gateway_;
        ta::features::items::ItemFeature feature_;
        ModulePorts ports_;
    };
}
