import ssoEmailStorageManager from '@/modules/auth/SsoLogin/helpers/ssoEmailStorageManager';
import selfServeDisclaimerModalManager from '@/modules/marketplace/accounts/helpers/disclaimerModal';

export const persistPermanentStorageObjects = (clearCallback: () => void) => {
  const savedSsoEmails = ssoEmailStorageManager.getEmails();
  const selfServeDisclaimerModalInfo = selfServeDisclaimerModalManager.getSelfServeDisclaimerModalShowInfo();

  clearCallback();
  ssoEmailStorageManager.setEmails(savedSsoEmails);
  if (selfServeDisclaimerModalInfo) {
    selfServeDisclaimerModalManager.setSelfServeDisclaimerModalShowInfo();
  }
};
