package io.trustbuilder.mfa.android.demoapp.config;

import android.app.Activity;

import io.trustbuilder.mfa.lib.TrustBuilderMfaLib;

public class TrustBuilderMfaLibHolder {
    private static TrustBuilderMfaLib instance;

    private TrustBuilderMfaLibHolder() {}

    public static TrustBuilderMfaLib getInstance(Activity activity) {
        if (instance == null) {
            ConfigHost androidHost = ConfigHost.getInstance();
            ConfigSecureTokenStorage androidSecureTokenStorage = ConfigSecureTokenStorage.getInstance(activity);
            instance = new TrustBuilderMfaLib(androidHost, androidSecureTokenStorage);
        }
        return instance;
    }
}
