@using Moonlight.Shared.Components.FileManagerPartials
@using Moonlight.App.Database.Entities
@using Moonlight.App.Helpers
@using Moonlight.App.Helpers.Files
@using Moonlight.App.Services
@using Moonlight.App.ApiClients.Wings
@using Moonlight.App.Helpers.Wings
@using Moonlight.App.Services.Sessions

@inject WingsApiHelper WingsApiHelper
@inject WingsJwtHelper WingsJwtHelper
@inject ConfigService ConfigService
@inject IdentityService IdentityService

<FileManager Access="FileAccess"></FileManager>

@code
{
    [CascadingParameter]
    public Server CurrentServer { get; set; }
    
    private FileAccess FileAccess;

    protected override void OnInitialized()
    {
        FileAccess = new WingsFileAccess(WingsApiHelper, WingsJwtHelper, CurrentServer, ConfigService, IdentityService.User);
    }
}
