@namespace OpenArchival.Blazor.AdminPages
@layout AdminControlPanelLayout
@page "/admin/archiveadmin"

@using Microsoft.AspNetCore.Components.Web
@using Microsoft.AspNetCore.Authorization
@using MudBlazor
@using OpenArchival.Blazor.AdminPages.Shared
@using static Microsoft.AspNetCore.Components.Web.RenderMode
@using OpenArchival.DataAccess

@rendermode InteractiveServer 
@attribute [Authorize(Roles =$"{UserRoles.Admin}, {UserRoles.Writer}")]

<MudTabs 
    ApplyEffectsToContainer="true" 
    PanelClass="" 
    Centered=true>

    <MudTabPanel Text="Categories">
        <ViewAddCategoriesComponent></ViewAddCategoriesComponent>
    </MudTabPanel>

    <MudTabPanel Text="Add Grouping">
        <AddArchiveGroupingComponent 
            GroupingPublished="Helpers.OnGroupingPublished"
            ForwardLink="@null"
            ClearOnPublish=true/>
    </MudTabPanel>

    <MudTabPanel Text="Manage Groupings">
        <ArchiveGroupingsTable/>
    </MudTabPanel>
</MudTabs>

@inject ArtifactEntrySharedHelpers Helpers;
@inject IDialogService DialogService;

@code {
}
