import { SCROLL_BAR_WIDTH as a } from "./constants.js";
import { ViewMode as u, ZoomLevel as r } from "./types.js";
const Z = (o, t, m, e, c, s) => {
  if (typeof o == "number")
    return o;
  const n = s === u.DUAL_PAGE ? 2 * e : e;
  switch (o) {
    case r.PAGE_FIT:
      const f = Math.min(
        (t - a) / n,
        m / c
      );
      return Math.floor(f * 100);
    case r.PAGE_WIDTH:
      return Math.floor((t - a) / n * 100);
    case r.ACTUAL:
    default:
      return 100;
  }
};
export {
  Z as getZoomLevel
};
