// Copyright © Selmo Technology GmbH. All Rights Reserved

using Microsoft.JSInterop;
using SelmoStudio.Hmi.Server.SelmoHmi.Shared.Model;
using System.Threading.Tasks;

namespace SelmoStudio.Hmi.Server.SelmoHmi.Shared.Service
{
    public class BrowserService : IBrowserService
    {
        private readonly IJSRuntime _js;

        public BrowserService(IJSRuntime js)
        {
            _js = js;
        }

        public async Task<BrowserDimension> GetDimensions()
        {
            return await _js.InvokeAsync<BrowserDimension>("getDimensions");
        }
    }
}