#pragma once

#include "../../data/wallet_state.h"

#include <string>
#include <vector>

namespace dragonx {
namespace ui {

bool shouldDefaultPoolWorker(const std::string& currentWorker, bool alreadyDefaulted);
std::string defaultPoolWorkerAddress(const std::vector<AddressInfo>& addresses);

// The xmrig "user" — the pool login block rewards are credited to. The user-entered
// payout address wins; otherwise fall back to the wallet's own first shielded, then
// transparent, address. "x" is the empty-field placeholder and counts as unset. The
// result may be empty (no address anywhere), which the caller treats as an error.
std::string resolveMiningUserAddress(const std::string& payoutAddress,
                                     const std::string& firstShieldedAddress,
                                     const std::string& firstTransparentAddress);
bool miningValueAlreadySaved(const std::vector<std::string>& savedValues,
							 const std::string& value);
const char* defaultPoolUrl();

} // namespace ui
} // namespace dragonx
