"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.exposeBackendCallbacks = exposeBackendCallbacks;
exports.getProcessEnvFromBackend = getProcessEnvFromBackend;
exports.getClientAccessTokenFromBackend = getClientAccessTokenFromBackend;
const CallbackUtils_1 = require("@itwin/certa/lib/utils/CallbackUtils");
const getEnvCallbackName = "getEnv";
const getClientAccessTokenCallbackName = "getClientAccessToken";
function exposeBackendCallbacks() {
    (0, CallbackUtils_1.registerBackendCallback)(getEnvCallbackName, () => {
        return JSON.stringify(process.env);
    });
    (0, CallbackUtils_1.registerBackendCallback)(getClientAccessTokenCallbackName, async () => {
        // const authClient = new ServiceAuthorizationClient(clientConfiguration);
        // const token = await authClient.getAccessToken();
        return "";
    });
}
async function getProcessEnvFromBackend() {
    return JSON.parse(await (0, CallbackUtils_1.executeBackendCallback)(getEnvCallbackName));
}
async function getClientAccessTokenFromBackend() {
    // const tokenString = await executeBackendCallback(getClientAccessTokenCallbackName, clientConfiguration);
    return "";
}
//# sourceMappingURL=SideChannels.js.map