using adas_core.Domain.Models.Responses;

namespace adas_core.Domain.Utils;

public sealed class AuthUtils
{
    private LoginResponse _loginResponse = new();

    static AuthUtils()
    {
        InternalInstance ??= new AuthUtils();
    }

    public AuthUtils()
    {
        InternalInstance = this;
    }

    public LoginResponse LoginResponse
    {
        get
        {
            lock (_loginResponse)
            {
                return _loginResponse;
            }
        }
        set
        {
            lock (_loginResponse)
            {
                _loginResponse = value;
            }
        }
    }

    private static AuthUtils InternalInstance { get; set; }
    public static AuthUtils Instance => InternalInstance;

    public LoginResponse GetLoginResponse()
    {
        lock (_loginResponse)
        {
            return _loginResponse;
        }
    }
}