namespace DocuMed.PWA.Pages;

public class HomePageViewModel : BaseViewModel
{
    private readonly IUserUtility _userUtility;

    public HomePageViewModel(IUserUtility userUtility)
    {
        _userUtility = userUtility;
    }

    public List<MedicalHistorySDto> MedicalHistories { get; private set; } = new List<MedicalHistorySDto>();
    public ApplicationUserSDto User { get; private set; } = new ApplicationUserSDto();

    public override async Task InitializeAsync()
    {
        User = await _userUtility.GetUserAsync();
        MedicalHistories.Add(new MedicalHistorySDto
        {
            FirstName = "امیرحسین ",
            LastName = "معتمدی",
            Age = 35,
            ChiefComplaint = "سردرد",
            Section = "داخلی",
        });
        MedicalHistories.Add(new MedicalHistorySDto
        {
            FirstName = "امیرحسین ",
            LastName = "معتمدی",
            Age = 35,
            ChiefComplaint = "سردرد",
            Section = "داخلی",
        });
        MedicalHistories.Add(new MedicalHistorySDto
        {
            FirstName = "امیرحسین ",
            LastName = "معتمدی",
            Age = 35,
            ChiefComplaint = "سردرد",
            Section = "داخلی",
        });
        MedicalHistories.Add(new MedicalHistorySDto
        {
            FirstName = "امیرحسین ",
            LastName = "معتمدی",
            Age = 35,
            ChiefComplaint = "سردرد",
            Section = "داخلی",
        });
        MedicalHistories.Add(new MedicalHistorySDto
        {
            FirstName = "امیرحسین ",
            LastName = "معتمدی",
            Age = 35,
            ChiefComplaint = "سردرد",
            Section = "داخلی",
        });

        await base.InitializeAsync();

    }
}