"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getPageHeightList = void 0;
const getFullPageHeight_1 = require("../getFullPageHeight");
const getPageHeight_1 = require("../getPageHeight");
const getPageParams_1 = require("../getPageParams");
const getPageHeightList = async (pdf, containerWidth, scrollRef, renderPageRange = {}, isFullHeight) => {
    const pages = [];
    const { start = 0, end = pdf.numPages - 1 } = renderPageRange;
    for (let index = start; index <= end; index++) {
        if (isFullHeight) {
            pages[index] = (0, getFullPageHeight_1.getFullPageHeight)(scrollRef);
        }
        else {
            const { width, height, rotate } = await (0, getPageParams_1.getPageParams)(pdf, index);
            pages[index] = (0, getPageHeight_1.getPageHeight)(containerWidth, width, height, rotate);
        }
    }
    return pages;
};
exports.getPageHeightList = getPageHeightList;
