import { jsx as _jsx } from "react/jsx-runtime";
import { useEffect } from 'react';
import { pdfViewerClassnames } from '../constants';
import { Wrapper } from './styles';
export const List = ({ paginationRef, children, initialIndex }) => {
    useEffect(() => {
        if (!initialIndex) {
            return;
        }
        const element = paginationRef?.current?.childNodes[initialIndex];
        if (element) {
            element.scrollIntoView({ behavior: 'auto', block: 'start' });
        }
    }, []);
    return (_jsx(Wrapper, { ref: paginationRef, className: pdfViewerClassnames.list, children: children }));
};
