using System.Collections.Generic;
using AuraServiceLib;
using RGB.NET.Core;
namespace RGB.NET.Devices.Asus;
///
/// Represents a generic information for a .
///
public sealed class AsusKeyboardRGBDeviceInfo : AsusRGBDeviceInfo, IKeyboardDeviceInfo
{
#region Properties & Fields
///
/// The ASUS SDK returns useless names for notebook keyboards, possibly for others as well.
/// Keep a list of those and rely on to get the real model
///
private static readonly List GENERIC_DEVICE_NAMES = new() { "NotebookKeyboard" };
///
public KeyboardLayoutType Layout => KeyboardLayoutType.Unknown;
#endregion
#region Constructors
///
///
/// Internal constructor of managed .
///
/// The backing this RGB.NET device.
internal AsusKeyboardRGBDeviceInfo(IAuraSyncDevice device)
: base(RGBDeviceType.Keyboard, device, GetKeyboardModel(device.Name))
{ }
#endregion
#region Methods
private static string? GetKeyboardModel(string deviceName) => GENERIC_DEVICE_NAMES.Contains(deviceName) ? WMIHelper.GetSystemModelInfo() : deviceName;
#endregion
}