using System.Collections.Generic;
using System.Text.Json.Serialization;
using Jellyfin.Data.Enums;
using Jellyfin.Extensions.Json.Converters;
using MediaBrowser.Model.Dlna;
using MediaBrowser.Model.Session;
namespace MediaBrowser.Model.Dto;
/// 
/// Client capabilities dto.
/// 
public class ClientCapabilitiesDto
{
    /// 
    /// Gets or sets the list of playable media types.
    /// 
    [JsonConverter(typeof(JsonCommaDelimitedCollectionConverterFactory))]
    public IReadOnlyList PlayableMediaTypes { get; set; } = [];
    /// 
    /// Gets or sets the list of supported commands.
    /// 
    [JsonConverter(typeof(JsonCommaDelimitedCollectionConverterFactory))]
    public IReadOnlyList SupportedCommands { get; set; } = [];
    /// 
    /// Gets or sets a value indicating whether session supports media control.
    /// 
    public bool SupportsMediaControl { get; set; }
    /// 
    /// Gets or sets a value indicating whether session supports a persistent identifier.
    /// 
    public bool SupportsPersistentIdentifier { get; set; }
    /// 
    /// Gets or sets the device profile.
    /// 
    public DeviceProfile? DeviceProfile { get; set; }
    /// 
    /// Gets or sets the app store url.
    /// 
    public string? AppStoreUrl { get; set; }
    /// 
    /// Gets or sets the icon url.
    /// 
    public string? IconUrl { get; set; }
    /// 
    /// Convert the dto to the full  model.
    /// 
    /// The converted  model.
    public ClientCapabilities ToClientCapabilities()
    {
        return new ClientCapabilities
        {
            PlayableMediaTypes = PlayableMediaTypes,
            SupportedCommands = SupportedCommands,
            SupportsMediaControl = SupportsMediaControl,
            SupportsPersistentIdentifier = SupportsPersistentIdentifier,
            DeviceProfile = DeviceProfile,
            AppStoreUrl = AppStoreUrl,
            IconUrl = IconUrl
        };
    }
}