using Android.Bluetooth.LE;

namespace InABox.Avalonia.Platform.Android;

public class Android_BluetoothDevice(ScanResult scan, Guid[] availableservices, DateTime timestamp) : IBluetoothDevice
{
    public ScanResult Scan { get; } = scan;
    public string ID { get; } = scan.Device?.Address ?? string.Empty;
    public string Name { get; } = scan.ScanRecord?.DeviceName ?? "Unknown Device";
    public Guid[] AvailableServices { get; } = availableservices;
    public DateTime LastSeen { get; set; } = timestamp;

    public void Dispose()
    {
        scan.Dispose();
        Scan.Dispose();
    }
}