using System;
using MediaBrowser.Common.Plugins;
using MediaBrowser.Model.Plugins;
namespace Jellyfin.Api.Models
{
    /// 
    /// The configuration page info.
    /// 
    public class ConfigurationPageInfo
    {
        /// 
        /// Initializes a new instance of the  class.
        /// 
        /// Instance of  interface.
        /// Instance of  interface.
        public ConfigurationPageInfo(IPlugin? plugin, PluginPageInfo page)
        {
            Name = page.Name;
            EnableInMainMenu = page.EnableInMainMenu;
            MenuSection = page.MenuSection;
            MenuIcon = page.MenuIcon;
            DisplayName = string.IsNullOrWhiteSpace(page.DisplayName) ? plugin?.Name : page.DisplayName;
            PluginId = plugin?.Id;
        }
        /// 
        /// Initializes a new instance of the  class.
        /// 
        public ConfigurationPageInfo()
        {
            Name = string.Empty;
        }
        /// 
        /// Gets or sets the name.
        /// 
        /// The name.
        public string Name { get; set; }
        /// 
        /// Gets or sets a value indicating whether the configurations page is enabled in the main menu.
        /// 
        public bool EnableInMainMenu { get; set; }
        /// 
        /// Gets or sets the menu section.
        /// 
        public string? MenuSection { get; set; }
        /// 
        /// Gets or sets the menu icon.
        /// 
        public string? MenuIcon { get; set; }
        /// 
        /// Gets or sets the display name.
        /// 
        public string? DisplayName { get; set; }
        /// 
        /// Gets or sets the plugin id.
        /// 
        /// The plugin id.
        public Guid? PluginId { get; set; }
    }
}