import { SSFHost } from "@elliemae/ssf-host";
import { Analytics } from "@elliemae/pui-analytics-so";
import { getLogger } from "../logger.js";
import { getAppConfigValue } from "../app-config/config.js";
let ssfHost = null;
const getSSFHost = () => {
  if (!ssfHost) {
    const logger = getLogger();
    ssfHost = new SSFHost(getAppConfigValue("appId"), {
      logger,
      analyticsObj: new Analytics({ logger })
    });
  }
  return ssfHost;
};
const setSSFHost = (host) => {
  if (!ssfHost) {
    ssfHost = host;
  }
};
export {
  getSSFHost,
  setSSFHost
};
