"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.PDFPage = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
const react_pdf_1 = require("react-pdf");
const personalDataSecurity_1 = require("../../personalDataSecurity");
const constants_1 = require("../constants");
const styles_1 = require("./styles");
const useLogic_1 = require("./useLogic");
const PDFPage = (props) => {
    const { ref, isHidePersonalData, isShowPage, isViewerLite, isShowTag, label, } = (0, useLogic_1.useLogic)(props);
    const { scale, ...restProps } = props;
    const hidePersonalDataClassname = (0, personalDataSecurity_1.useHidePersonalData)({
        isEnabled: isHidePersonalData,
    });
    return ((0, jsx_runtime_1.jsx)(styles_1.Wrapper, { className: constants_1.pdfViewerClassnames.page, ref: ref, "$height": props.height, "$isShowTag": isShowTag, "$isViewerLite": isViewerLite, children: isShowPage && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [isShowTag && ((0, jsx_runtime_1.jsx)(styles_1.StyledTag, { color: "grey", variant: "light", label: label })), (0, jsx_runtime_1.jsx)(react_pdf_1.Page, { className: hidePersonalDataClassname, loading: null, renderAnnotationLayer: !isViewerLite, renderTextLayer: !isViewerLite, ...restProps })] })) }));
};
exports.PDFPage = PDFPage;
