using System;
using Expedience.Infrastructure.Models;
using Expedience.Web.Services;
using Microsoft.AspNetCore.Mvc.RazorPages;

namespace Expedience.Web.Pages
{
    public class DeepDungeonsModel : PageModel
    {
        private readonly IApiService _apiService;

        public List<DeepDungeonRecord>? DeepDungeonRecords { get; private set; }

        public DeepDungeonsModel(IApiService apiService)
        {
            _apiService = apiService;
        }

        public async Task OnGet(CancellationToken cancellationToken)
        {
            DeepDungeonRecords = await _apiService.GetDeepDungeonRecordsAsync(cancellationToken);
        }
	}
}