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

@inject WebsiteService WebsiteService

<LazyLoader Load="Load">
    <FileManager Access="Access">
    </FileManager>
</LazyLoader>

@code
{
    [CascadingParameter]
    public Website CurrentWebsite { get; set; }

    private FileAccess Access;

    private async Task Load(LazyLoader arg)
    {
        Access = await WebsiteService.CreateFileAccess(CurrentWebsite);
    }
}
