<MudDialog>
    <TitleContent>
        <MudText Typo="Typo.h6">
            Select a File
        </MudText>
    </TitleContent>

    <DialogContent>
        <ArchiveBrowser ArchiveId="ArchiveId" OnFileSelected="FileSelected" />
    </DialogContent>

    <DialogActions>
        <MudButton OnClick="Cancel">Cancel</MudButton>
    </DialogActions>
</MudDialog>

@code {
    [CascadingParameter] MudDialogInstance MudDialog { get; set; }
    [Parameter] public Guid ArchiveId { get; set; }

    protected override async Task OnInitializedAsync()
    {
        MudDialog.Options.MaxWidth = MaxWidth.Large;
        MudDialog.Options.FullWidth = true;
        MudDialog.Options.FullScreen = true;

        MudDialog.SetOptions(MudDialog.Options);
    }

    private void Cancel()
    {
        MudDialog.Cancel();
    }

    private void FileSelected(string fileName)
    {
        MudDialog.Close(DialogResult.Ok(fileName));
    }
}