"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.WorkbookPropertiesXform = void 0;
const base_xform_1 = require("../base-xform.js");
class WorkbookPropertiesXform extends base_xform_1.BaseXform {
    render(xmlStream, model) {
        xmlStream.leafNode("workbookPr", {
            date1904: model.date1904 ? 1 : undefined,
            // Excel doesn't output defaultThemeVersion
            filterPrivacy: 1
        });
    }
    parseOpen(node) {
        if (node.name === "workbookPr") {
            this.model = {
                date1904: node.attributes.date1904 === "1"
            };
            return true;
        }
        return false;
    }
    parseText() { }
    parseClose() {
        return false;
    }
}
exports.WorkbookPropertiesXform = WorkbookPropertiesXform;
