#pragma once

#include <string>

namespace dragonx {
namespace ui {

float ComputeConsoleInputHeight(float frameHeightWithSpacing,
                                float itemSpacingY,
                                float spacingSm,
                                float spacingXs,
                                float cursorOffset);
float ComputeConsoleOutputHeight(float availableHeight,
                                 float inputHeight,
                                 float minHeight,
                                 float minHeightRatio);
float ClampConsoleWrapWidth(float contentWidth, float paddingX);

// True if `cmd`'s first token names a console/RPC command that carries a SECRET on its command line
// (passphrase, private/spending/viewing key, mnemonic). Output-secret commands (dumpprivkey,
// z_exportkey, z_exportmnemonic) are NOT covered — their secret is in the result, a separate concern.
bool ConsoleCommandCarriesSecret(const std::string& cmd);

// A display/history-safe copy of `cmd`: the command name with its arguments replaced by "****" when
// it carries a secret, else `cmd` unchanged. The real command is still executed unredacted.
std::string RedactConsoleCommand(const std::string& cmd);

} // namespace ui
} // namespace dragonx
