using PSLauncher.Core.Localization;
using PSLauncher.Models;

namespace PSLauncher.App.ViewModels;

public sealed class InstalledVersionViewModel
{
    public InstalledVersion Model { get; }

    public InstalledVersionViewModel(InstalledVersion model) => Model = model;

    public string Display => $"v{Model.Version}";

    public string Subtitle =>
        $"{Strings.FormatSize(Model.SizeBytes)} • {Strings.FormatDate(Model.InstalledAt)}";

    public override string ToString() => Display;
}
