using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WinRT.BxlComponent.Plugin.BxlMpXamarinSDK;
using WinRT.BxlComponent.Plugin.BxlMpXamarinSDK.Abstractions;
using Windows.Foundation;
using System.Collections.ObjectModel;
using Microsoft.ReactNative.Managed;
using System.IO;
using WinRT.BxlComponent.UwpWrapper;
using WinRT.BxlComponent;

namespace ReactNativeRnBixolonBgateLibs
{
    [ReactModule]
    public sealed class MPosLookupProxy
    {
        //private MPosDevicePrinterImpl _printerDev;
        private BxlPrinterAPIs _printerDev;

        public MPosLookupProxy()
        {
            _printerDev = new BxlPrinterAPIs();
        }


        [ReactMethod("getNetworkDevices")]
        public async void GetNetworkDevices(bool wireless, int searchTime /* second */, IReactPromise<string> promise)
        {
            promise.Resolve(await _printerDev.GetNetworkDevice(wireless, searchTime));
            return;
        }

        [ReactMethod("getBluetoothDevices")]
        public async void GetPairedDevice(IReactPromise<string> promise)
        {
            promise.Resolve(await _printerDev.GetPairedDevice());
            return;
        }


    }
    
}
