@page "/admin"

<PageTitle>WatchIt administrator panel</PageTitle>

<div class="container-grid">
    @if (_loaded)
    {
        if (_authenticated)
        {
            <div class="row">
                <div class="col rounded-3 panel panel-regular m-1">
                    <h2>Add new data</h2>
                </div>
            </div>
            <div class="row">
                <a class="col rounded-3 panel panel-regular m-1" href="/media/new/movies">
                    <p class="text-center text-reset text-decorations-none">New movie</p>
                </a>
                <a class="col rounded-3 panel panel-regular m-1" href="/media/new/series">
                    <p class="text-center text-reset text-decorations-none">New TV series</p>
                </a>
                <a class="col rounded-3 panel panel-regular m-1" href="/person/new">
                    <p class="text-center text-reset text-decorations-none">New person</p>
                </a>
            </div>
        }
        else
        {
            <div class="row">
                <div class="col">
                    <ErrorComponent ErrorMessage="You do not have permission to view this site"/>
                </div>
            </div>
        }
    }
    else
    {
        <div class="row">
            <div class="col">
                <div class="m-5">
                    <LoadingComponent/>
                </div>
            </div>
        </div>
    }
</div>