// Ignore Spelling: Utils

using AbrBlazorTools;
using Microsoft.AspNetCore.Components;

namespace Panel.ApiUtils;

public class UserUtils:IUserUtils
{
    private readonly IHttpClientWithLoginToken _client;

    public UserUtils(IHttpClientWithLoginToken client)
    {
        _client = client;
    }

  

    public Task<HttpResponseMessage> SignUp(object accountModel)
    {
        return _client.HttpPost("/api/AUTH/SignUp",accountModel);

    }
    public Task<HttpResponseMessage> Login(object loginModel)
    {
        return _client.HttpPost("/api/AUTH/Login",loginModel);
    }
    public Task<HttpResponseMessage> CheckLogin()
    {
        return _client.HttpGet("/api/AUTH/Check");
    }

}


public interface IUserUtils
{
    Task<HttpResponseMessage> Login(object loginModel);
    Task<HttpResponseMessage> SignUp(object accountModel);
    Task<HttpResponseMessage> CheckLogin();


}