"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.PDFDocument = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
const classNames_1 = require("../../utils/classNames");
const constants_1 = require("../constants");
const styles_1 = require("./styles");
const useLogic_1 = require("./useLogic");
const PDFDocument = (props) => {
    const { documentRef, onAnimationEnd, isLoading } = (0, useLogic_1.useLogic)(props);
    const { enabledZoom, isCentered, ...restProps } = props;
    return ((0, jsx_runtime_1.jsx)(styles_1.StyledDocument, { ...restProps, "$isLoading": isLoading, className: (0, classNames_1.classNames)(constants_1.pdfViewerClassnames.document, {
            [constants_1.pdfViewerClassnames.zoom]: enabledZoom,
            [constants_1.pdfViewerClassnames.centered]: isCentered,
        }), inputRef: documentRef, onAnimationEnd: onAnimationEnd }));
};
exports.PDFDocument = PDFDocument;
