text: /**
   * DO NOT EDIT THIS FILE
   *
   * It is not used to to build anything.
   *
   * It's just a record of the old flow types.
   *
   * Use it as a guide when converting
   * - static/src/javascripts/projects/common/modules/accessibility/helpers.js
   * to .ts, then delete it.
   */
  
  // @flow
  import fastdom from 'fastdom';
  import { isOn } from 'common/modules/accessibility/main';
  
  const shouldHideFlashingElements = (callback: ?() => {}): void => {
      if (!isOn('flashing-elements')) {
          fastdom.mutate(() => {
              if (document.body) {
                  document.body.classList.add('disable-flashing-elements');
              }
  
              if (callback) {
                  callback();
              }
          });
      } else if (callback) {
          callback();
      }
  };
  
  export { shouldHideFlashingElements };
  