"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
Object.defineProperty(exports, "SignaturePdfDisplay", {
    enumerable: true,
    get: function() {
        return SignaturePdfDisplay;
    }
});
const _renderer = require("@react-pdf/renderer");
const _react = /*#__PURE__*/ _interop_require_default(require("react"));
const _signature = require("../signature");
function _interop_require_default(obj) {
    return obj && obj.__esModule ? obj : {
        default: obj
    };
}
const SIGNATURE_PDF_WIDTH = 198;
const SIGNATURE_PDF_HEIGHT = _signature.SIGNATURE_VIEWBOX_HEIGHT / _signature.SIGNATURE_VIEWBOX_WIDTH * SIGNATURE_PDF_WIDTH;
const styles = _renderer.StyleSheet.create({
    svg: {
        border: '0.25pt solid black',
        borderRadius: 3,
        height: SIGNATURE_PDF_HEIGHT,
        width: SIGNATURE_PDF_WIDTH
    }
});
const SignaturePdfDisplay = ({ body })=>{
    const paths = (0, _signature.bodyToDrawPaths)(body).filter(Boolean);
    if (!paths.length) return null;
    return /*#__PURE__*/ _react.default.createElement(_renderer.Svg, {
        viewBox: _signature.SIGNATURE_VIEWBOX,
        style: styles.svg
    }, paths.map((d, index)=>/*#__PURE__*/ _react.default.createElement(_renderer.Path, {
            key: index,
            d: d,
            fill: "currentColor",
            fillRule: "nonzero"
        })));
};

//# sourceMappingURL=SignaturePdfDisplay.js.map