const setLoginParams = (params) => {
  window.emui.loginParams = {
    redirectUri: new URL(window.location.href).href,
    ...params
  };
};
const getLoginParams = () => {
  if (!window.emui.loginParams) {
    const user = JSON.parse(sessionStorage.getItem("user") || "{}");
    const clientId = user.client_id || "";
    const scope = user.scope || "";
    window.emui.loginParams = {
      clientId,
      scope
    };
  }
  return window.emui.loginParams;
};
export {
  getLoginParams,
  setLoginParams
};
