using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc.RazorPages;
using TaxBaik.Application.Services;
using TaxBaik.Web.Services;

namespace TaxBaik.Web.Pages.Admin.Clients;

[Authorize(AuthenticationSchemes = AdminAuthDefaults.Scheme)]
public class DetailModel(ClientService clientService) : PageModel
{
    public TaxBaik.Domain.Entities.Client? Client { get; private set; }

    public async Task OnGetAsync(int id, CancellationToken ct)
    {
        Client = await clientService.GetByIdAsync(id, ct);
    }
}
