using Avalonia.Controls;
using Avalonia.Platform.Storage;

namespace Harmonia.UI.Platform;

public class StorageProviderLocator : PlatformServiceLocator<IStorageProvider>, IStorageProviderLocator
{
    protected override IStorageProvider? GetFromWindow(Window mainWindow)
    {
        return mainWindow.StorageProvider;
    }

    protected override IStorageProvider? GetFromTopLevel(TopLevel topLevel)
    {
        return topLevel.StorageProvider;
    }
}