using System;
using InABox.Core;

namespace InABox.DynamicGrid;

public class WpfDigitalFormDocumentHandler : DigitalFormDocumentHandler
{
    protected override string CachePath => CoreUtils.GetPath();

    private readonly Func<bool> _connected;
    protected override bool IsConnected => _connected?.Invoke() ?? true;

    public WpfDigitalFormDocumentHandler(Action<bool> status, Func<bool> connected) : base(status)
    {
        _connected = connected;
    }
}