using SteUp.Shared.Core.BarcodeReader.Contracts;
using SteUp.Shared.Core.BarcodeReader.Dto;
using SteUp.Shared.Core.Interface.System;

namespace SteUp.Maui.Core.System;

public partial class HoneywellScannerService : IBarcodeReaderService
{
    protected Action<BarcodeScanDto>? OnScanSuccessful;
    protected Action<Exception>? OnScanFailed;

    public partial bool IsRightAdapter();
    public partial void Init(Action onDeviceReady);
    public partial void Deinit();
    public partial string GetAdapterName();
    public partial void OnKeyEvent(object keyEvent);
    public partial void ChangeSettings(List<(string Key, object Value)> settings);

    public void Register(Action<BarcodeScanDto> onScanSuccessful, Action<Exception> onScanFailed)
    {
        OnScanSuccessful = onScanSuccessful;
        OnScanFailed = onScanFailed;
    }
}