@page "/pagination"
@inject IStringLocalizer<Paginations> Localizer

<h3>@Localizer["PaginationsTitle"]</h3>

<h4>@Localizer["PaginationsDescription"]</h4>

<DemoBlock Title="@Localizer["PaginationsNormalTitle"]"
           Introduction="@Localizer["PaginationsNormalIntro"]"
           Name="Normal">
    <Pagination PageCount="30" OnPageLinkClick="@OnPageClick" />
    <ConsoleLogger @ref="Logger" />
</DemoBlock>

<DemoBlock Title="@Localizer["PaginationsDisplayTextTitle"]"
           Introduction="@Localizer["PaginationsDisplayTextIntro"]"
           Name="DisplayText">
    <Pagination PageCount="1" />
</DemoBlock>

<DemoBlock Title="@Localizer["PaginationsMaxPageLinkCountTitle"]"
           Introduction="@Localizer["PaginationsMaxPageLinkCountIntro"]"
           Name="MaxPageLinkCount">
    <Pagination PageCount="2000" MaxPageLinkCount="10" />
</DemoBlock>

<DemoBlock Title="@Localizer["PaginationsAlignmentTitle"]"
           Introduction="@Localizer["PaginationsAlignmentIntro"]"
           Name="Alignment">
    <RadioList @bind-Value="Alignment" Items="AlignmentItems" />
    <Pagination PageCount="20" Alignment="@Alignment" class="mt-3" />
</DemoBlock>

<DemoBlock Title="@Localizer["PaginationsGotoTitle"]"
           Introduction="@Localizer["PaginationsGotoIntro"]"
           Name="ShowGotoNavigator">
    <Pagination PageCount="20" ShowGotoNavigator="true" />
</DemoBlock>

<DemoBlock Title="@Localizer["PaginationsPageInfoTextTitle"]"
           Introduction="@Localizer["PaginationsPageInfoTextIntro"]"
           Name="PageInfoText">
    <Pagination PageCount="20" ShowPageInfo="true" PageInfoText="@Localizer["PaginationsInfoTotal"]" ShowGotoNavigator="true" />
</DemoBlock>

<DemoBlock Title="@Localizer["PaginationsInfoTemplateTitle"]"
           Introduction="@Localizer["PaginationsInfoTemplateIntro"]"
           Name="InfoTemplate">
    <Pagination PageCount="@PageCount" ShowPageInfo="true" ShowGotoNavigator="true">
        <PageInfoTemplate>
            <div class="page-info me-2">@PageInfoText</div>
            <Select @bind-Value="PageItems" Items="PageItemsSource" />
        </PageInfoTemplate>
    </Pagination>
</DemoBlock>

<AttributeTable Items="@GetAttributes()" />
