namespace NexusShell.Models;

public enum NexusDeviceSection
{
    Overview,
    Agent,
    DeviceIdentity,
    Hardware,
    Cpu,
    Ram,
    Storage,
    Gpu,
    Network,
    Displays,
    Printers,
    Usb,
    Bluetooth,
    Processes,
    SystemHealth,
}

public sealed class NexusDeviceNavItem
{
    public required NexusDeviceSection Section { get; init; }
    public required string Title { get; init; }
    public required string IconPath { get; init; }
    public string InfoHint { get; init; } = string.Empty;
}

public sealed class NexusCpuSnapshot
{
    public string Model { get; init; } = "—";
    public int Cores { get; init; }
    public int Threads { get; init; }
    public int LoadPercent { get; init; }
    public string FrequencyLabel { get; init; } = "—";
    public string? TemperatureLabel { get; init; }
}

public sealed class NexusMemorySnapshot
{
    public double TotalGb { get; init; }
    public double UsedGb { get; init; }
    public double FreeGb { get; init; }
    public int LoadPercent { get; init; }
}

public sealed class NexusDiskVolumeInfo
{
    public required string Name { get; init; }
    public required string FriendlyLabel { get; init; }
    public string DriveLetter { get; init; } = "—";
    public double TotalGb { get; init; }
    public double UsedGb { get; init; }
    public double FreeGb { get; init; }
    public int UsedPercent { get; init; }
    public string DriveType { get; init; } = "—";
}

public sealed class NexusGpuSnapshot
{
    public string Name { get; init; } = "—";
    public string VramLabel { get; init; } = "—";
    public int? LoadPercent { get; init; }
    public bool IsAvailable { get; init; }
}

public sealed class NexusNetworkSnapshot
{
    public string ActiveConnection { get; init; } = "—";
    public string IpAddress { get; init; } = "—";
    public string Gateway { get; init; } = "—";
    public string DownloadSpeed { get; init; } = "—";
    public string UploadSpeed { get; init; } = "—";
    public bool IsOnline { get; init; }
}

public sealed class NexusDisplaySnapshot
{
    public required string Name { get; init; }
    public string Resolution { get; init; } = "—";
    public int RefreshRate { get; init; }
    public bool IsPrimary { get; init; }
    public double LayoutLeft { get; init; }
    public double LayoutTop { get; init; }
    public double LayoutWidth { get; init; }
    public double LayoutHeight { get; init; }
}

public sealed class NexusUsbDeviceInfo
{
    public required string Name { get; init; }
    public string DeviceType { get; init; } = "—";
    public string Manufacturer { get; init; } = "—";
}

public sealed class NexusBluetoothDeviceInfo
{
    public required string Name { get; init; }
}

public sealed class NexusProcessInfo
{
    public required string Name { get; init; }
    public int ProcessId { get; init; }
    public double CpuPercent { get; init; }
    public string MemoryLabel { get; init; } = "—";
}

public sealed class NexusHardwareOverview
{
    public string MachineName { get; init; } = "—";
    public string OsLabel { get; init; } = "—";
    public string BiosVersion { get; init; } = "—";
    public string SystemManufacturer { get; init; } = "—";
    public string SystemModel { get; init; } = "—";
}

public sealed class NexusSystemHealthSnapshot
{
    public string OverallStatus { get; init; } = "Good";
    public int HealthPercent { get; init; } = 100;
    public string CpuStatus { get; init; } = "Good";
    public string RamStatus { get; init; } = "Good";
    public string DiskStatus { get; init; } = "Good";
    public string NetworkStatus { get; init; } = "Good";
}

public enum NexusHealthLevel
{
    Good,
    Warning,
    Critical,
}
