using Avalonia.Media;
using PolyTrader.App.Avalonia.Shell;

namespace PolyTrader.App.Avalonia.ViewModels
{
    /// <summary>Anzeige-Zeile der Account-Übersicht im Launcher.</summary>
    public sealed class AccountOverviewRow
    {
        public int AccountId { get; init; }
        public string Name { get; init; } = string.Empty;
        public string Modules { get; init; } = string.Empty;
        public string WalletAddress { get; init; } = string.Empty;
        public decimal Balance { get; init; }
        public decimal Pnl3d { get; init; }
        public decimal WinRate3d { get; init; }
        public decimal OverallPnl { get; init; }
    }

    /// <summary>Anzeige-Zeile für auffällige Trades der letzten 24 Stunden.</summary>
    public sealed class NotableTradeRow
    {
        public string Module { get; init; } = string.Empty;
        public string Market { get; init; } = string.Empty;
        public decimal Pnl { get; init; }
        public decimal PnlPct { get; init; }
    }

    /// <summary>Anzeige-Zeile für Warnungen & Fehler aus den Tages-JSONL-Logs.</summary>
    public sealed class LogAlertRow
    {
        public string Time { get; init; } = string.Empty;
        public string Level { get; init; } = string.Empty;
        public string Message { get; init; } = string.Empty;
    }

    /// <summary>Kachel-Datenmodell für Modul-PnL/Winrate im Launcher.</summary>
    public sealed class ModuleKpiTile
    {
        public string ModuleName { get; init; } = string.Empty;
        public string Text { get; init; } = string.Empty;
        public bool IsPositive { get; init; } = true;
        public IBrush ForegroundBrush => ThemeManager.Brush(IsPositive ? "AppPositiveBrush" : "AppNegativeBrush");
    }
}
