"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CustomFilterXform = void 0;
const base_xform_1 = require("../base-xform.js");
class CustomFilterXform extends base_xform_1.BaseXform {
    constructor() {
        super();
        this.model = { val: "" };
    }
    get tag() {
        return "customFilter";
    }
    render(xmlStream, model) {
        xmlStream.leafNode(this.tag, {
            val: model.val,
            operator: model.operator
        });
    }
    parseOpen(node) {
        if (node.name === this.tag) {
            this.model = {
                val: node.attributes.val,
                operator: node.attributes.operator
            };
            return true;
        }
        return false;
    }
    parseText() { }
    parseClose() {
        return false;
    }
}
exports.CustomFilterXform = CustomFilterXform;
