"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.VmlPositionXform = void 0;
const base_xform_1 = require("../../base-xform.js");
class VmlPositionXform extends base_xform_1.BaseXform {
    constructor(model) {
        super();
        this._model = model || {};
        this.model = {};
    }
    get tag() {
        return this._model?.tag ?? "";
    }
    render(xmlStream, model, type) {
        if (type && model === type[2]) {
            xmlStream.leafNode(this.tag);
        }
        else if (type && this.tag === "x:SizeWithCells" && model === type[1]) {
            xmlStream.leafNode(this.tag);
        }
    }
    parseOpen(node) {
        switch (node.name) {
            case this.tag:
                this.model = {};
                this.model[this.tag] = true;
                return true;
            default:
                return false;
        }
    }
    parseText() { }
    parseClose() {
        return false;
    }
}
exports.VmlPositionXform = VmlPositionXform;
