// 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 "imgui.h"

namespace dragonx {
class App;
namespace ui {

// Renders the mining "Hashrate + Stats" card. In SOLO mode this is a full-width card (stat values
// on top, hashrate chart or live log below). In POOL mode it splits into a left card (Manual/Auto
// toggle + pool metric stack + a fixed-height scrolling pool list) and a right region (chart or
// log) — so toggling Manual/Auto or adding pools never reflows the tab. `poolMode` is the parent's
// solo/pool toggle; `s_pool_url` / `s_pool_settings_dirty` are the parent's pool-selection buffer
// and dirty flag (a pool-row click writes them, reusing the parent's save+restart path).
void RenderMiningStats(const WalletState& state, const MiningInfo& mining,
                       ImDrawList* dl, ImFont* capFont, ImFont* sub1, ImFont* ovFont,
                       float dp, float vs, float gap, float pad, float availWidth,
                       const material::GlassPanelSpec& glassSpec, float chartBudgetH, bool poolMode,
                       App* app, char (&s_pool_url)[256], bool& s_pool_settings_dirty);

} // namespace ui
} // namespace dragonx
