// DragonX Wallet - ImGui Edition
// Copyright 2024-2026 The Hush Developers
// Released under the GPLv3

#pragma once

#include "../../data/wallet_state.h"
#include "../material/draw_helpers.h"  // GlassPanelSpec
#include "mining_benchmark.h"          // ThreadBenchmark
#include "imgui.h"

#include <string>

namespace dragonx {
class App;
namespace ui {

// Renders the mining "Controls" card (CPU-core grid + mining start/stop button + benchmark /
// miner-update controls). Extracted verbatim from the monolithic mining tab. State the section
// MUTATES is passed BY REFERENCE (the benchmark, selected thread count, and drag state) so the
// interactions behave exactly as before; read-only context is passed by value/const.
void RenderMiningControls(App* app, const WalletState& state, const MiningInfo& mining,
                          ImDrawList* dl, ImFont* capFont, ImFont* sub1, ImFont* ovFont,
                          float dp, float hs, float vs, float gap, float pad, float availWidth,
                          const material::GlassPanelSpec& glassSpec, float controlsBudgetH,
                          int max_threads, bool isMiningActive, bool poolMode,
                          const char* poolWorker, const std::string& xmrigLatestTag,
                          ThreadBenchmark& benchmark, int& selectedThreads,
                          bool& dragActive, int& dragAnchorThread);

} // namespace ui
} // namespace dragonx
