@attribute [Route(RouteConstants.Gateway.OrdersChooser)]
@inject IJSRuntime JS

<PageTitle>سفارشات من</PageTitle>

<MudContainer MaxWidth="MaxWidth.Medium" Class="py-6 py-md-10">
    <PageHeader Title="سفارشات من" BackHref="@RouteConstants.Profile.Index" />
    <MudStack AlignItems="AlignItems.Center" Spacing="4">
        <MudIcon Icon="@Icons.Material.Filled.Receipt" Size="Size.Large" Color="Color.Primary" />
        <MudText Typo="Typo.body1" Align="Align.Center" Class="mud-text-secondary">
            سفارشات کدام فروشگاه را می‌خواهید مشاهده کنید؟
        </MudText>

        <MudGrid Spacing="4" Justify="Justify.Center" Class="mt-4">
            <MudItem xs="12" sm="6">
                <MudLink Href="@RouteConstants.Store.Orders" Underline="Underline.None" Class="store-chooser-link">
                    <MudPaper Elevation="2" Class="pa-6 rounded-xl text-center store-chooser-card store-chooser-regular">
                        <MudAvatar Size="Size.Large" Class="mx-auto mb-3 gateway-avatar-sm-store">
                            <MudIcon Icon="@Icons.Material.Filled.Storefront" Size="Size.Large" Class="text-brand-store" />
                        </MudAvatar>
                        <MudText Typo="Typo.h6" Class="fw-semibold">سفارشات فروشگاه</MudText>
                        <MudText Typo="Typo.caption" Class="mud-text-secondary mt-1">سفارشات خرید معمولی</MudText>
                    </MudPaper>
                </MudLink>
            </MudItem>

            <MudItem xs="12" sm="6">
                <MudLink Href="@RouteConstants.DiscountStore.Orders" Underline="Underline.None" Class="store-chooser-link">
                    <MudPaper Elevation="2" Class="pa-6 rounded-xl text-center store-chooser-card store-chooser-discount">
                        <MudAvatar Size="Size.Large" Class="mx-auto mb-3 gateway-avatar-sm-discount">
                            <MudIcon Icon="@Icons.Material.Filled.Loyalty" Size="Size.Large" Class="text-brand-discount" />
                        </MudAvatar>
                        <MudText Typo="Typo.h6" Class="fw-semibold">سفارشات فروشگاه اعتباری</MudText>
                        <MudText Typo="Typo.caption" Class="mud-text-secondary mt-1">سفارشات خرید اعتباری</MudText>
                    </MudPaper>
                </MudLink>
            </MudItem>
        </MudGrid>

        <MudButton Variant="Variant.Text" StartIcon="@Icons.Material.Filled.ArrowBack"
                   OnClick="GoBack" Class="mt-4">
            بازگشت به داشبورد
        </MudButton>
    </MudStack>
</MudContainer>

@code {
    private async Task GoBack() => await JS.InvokeVoidAsync("history.back");
}
