"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.List = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
const react_1 = require("react");
const constants_1 = require("../constants");
const styles_1 = require("./styles");
const List = ({ paginationRef, children, initialIndex }) => {
    (0, react_1.useEffect)(() => {
        if (!initialIndex) {
            return;
        }
        const element = paginationRef?.current?.childNodes[initialIndex];
        if (element) {
            element.scrollIntoView({ behavior: 'auto', block: 'start' });
        }
    }, []);
    return ((0, jsx_runtime_1.jsx)(styles_1.Wrapper, { ref: paginationRef, className: constants_1.pdfViewerClassnames.list, children: children }));
};
exports.List = List;
