"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.PageSetupPropertiesXform = void 0;
const base_xform_1 = require("../base-xform.js");
class PageSetupPropertiesXform extends base_xform_1.BaseXform {
    get tag() {
        return "pageSetUpPr";
    }
    render(xmlStream, model) {
        if (model && model.fitToPage) {
            xmlStream.leafNode(this.tag, {
                fitToPage: model.fitToPage ? "1" : undefined
            });
            return true;
        }
        return false;
    }
    parseOpen(node) {
        if (node.name === this.tag) {
            this.model = {
                fitToPage: node.attributes.fitToPage === "1"
            };
            return true;
        }
        return false;
    }
    parseText() { }
    parseClose() {
        return false;
    }
}
exports.PageSetupPropertiesXform = PageSetupPropertiesXform;
