using OTSSignsOrchestrator.Core.Models.Entities;

namespace OTSSignsOrchestrator.Desktop.Models;

/// <summary>
/// Represents a CMS stack discovered live from a Docker Swarm host.
/// No data is persisted locally — all values come from <c>docker stack ls</c> / inspect.
/// </summary>
public class LiveStackItem
{
    /// <summary>Docker stack name, e.g. "acm-cms-stack".</summary>
    public string StackName { get; set; } = string.Empty;

    /// <summary>3-letter abbreviation derived from the stack name.</summary>
    public string CustomerAbbrev { get; set; } = string.Empty;

    /// <summary>Number of services reported by <c>docker stack ls</c>.</summary>
    public int ServiceCount { get; set; }

    /// <summary>The SSH host this stack was found on.</summary>
    public SshHost Host { get; set; } = null!;

    /// <summary>Label of the host — convenience property for data-binding.</summary>
    public string HostLabel => Host?.Label ?? string.Empty;
}
