@inherits LayoutComponentBase
@using AliasVault.Admin.Main.Layout
@layout MainLayout

<PageHeader
    BreadcrumbItems="@BreadcrumbItems"
    Title="Manage account"
    Description="Manage your profile here.">
</PageHeader>

<div class="container mx-auto px-4 py-8">
    <hr class="mb-6 border-t border-gray-300"/>
    <div class="flex flex-col md:flex-row">
        <div class="w-full md:w-1/4 mb-6 md:mb-0">
            <ManageNavMenu/>
        </div>
        <div class="w-full md:w-3/4 md:pl-8">
            @Body
        </div>
    </div>
</div>

@code {
    /// <summary>
    /// Gets the breadcrumb items for the page. A default set of breadcrumbs is added in the parent OnInitialized method.
    /// </summary>
    private List<BreadcrumbItem> BreadcrumbItems { get; } = new();

    /// <inheritdoc />
    protected override async Task OnInitializedAsync()
    {
        await base.OnInitializedAsync();

        // Add base breadcrumbs.
        BreadcrumbItems.Add(new BreadcrumbItem { DisplayName = "Home", Url = "/" });
    }
}
