function apiPageLayoutToViewerModes(layout) {
  let scrollMode = ScrollMode.VERTICAL,
    spreadMode = SpreadMode.NONE;

  switch (layout) {
    case "SinglePage":
      scrollMode = ScrollMode.PAGE;
      break;
    case "OneColumn":
      break;
    case "TwoPageLeft":
      scrollMode = ScrollMode.PAGE;
    /* falls through */
    case "TwoColumnLeft":
      spreadMode = SpreadMode.ODD;
      break;
    case "TwoPageRight":
      scrollMode = ScrollMode.PAGE;
    /* falls through */
    case "TwoColumnRight":
      spreadMode = SpreadMode.EVEN;
      break;
  }
  return { scrollMode, spreadMode };
}
Converts API PageLayout values to the format used by `BaseViewer`.
@param {string} layout - The API PageLayout value.
@returns {Object}