using System.Net.Http.Json;
using TIAMWebApp.Shared.Application.Interfaces;
using TIAMWebApp.Shared.Application.Models;

namespace TIAMWebApp.Client.Services
{
    public class SupplierService : ISupplierService
    {
        private readonly HttpClient http;

        public SupplierService(HttpClient http)
        {
            this.http = http;
        }


        Task<Supplier[]?> ISupplierService.GetSuppliersAsync()
        {
            return http.GetFromJsonAsync<Supplier[]>("SupplierAPI");
        }
    }
}

