/* Generated from Java with JSweet 2.3.7 - http://www.jsweet.org */
import { Library } from '../../../Library';
var AbstractReferenceLocalizationStrategy = /** @class */ (function () {
    function AbstractReferenceLocalizationStrategy() {
        this.PREFIX = "#/components/";
    }
    /**
     * Warning: This method assumes that the definition and the represented object can be read from the same JSON,
     * i.e. effectively contain the same data.
     * @param {Node} source
     * @param {Node} target
     * @param {Document} model
     * @return {Node}
     */
    AbstractReferenceLocalizationStrategy.prototype.wrap = function (source, target, model) {
        target._ownerDocument = model;
        target._parent = target;
        return Library.readNode(Library.writeNode(source), target);
    };
    AbstractReferenceLocalizationStrategy.prototype.transform = function (source, transformName, result) {
        if (result == null)
            throw Object.defineProperty(new Error("Result argument is null."), '__classes', { configurable: true, value: ['java.lang.Throwable', 'java.lang.Object', 'java.lang.RuntimeException', 'java.lang.IllegalArgumentException', 'java.lang.Exception'] });
        if (source != null) {
            {
                var array190 = /* entrySet */ (function (o) { var s = []; for (var e in o)
                    s.push({ k: e, v: o[e], getKey: function () { return this.k; }, getValue: function () { return this.v; } }); return s; })(source);
                var _loop_1 = function (index189) {
                    var e = array190[index189];
                    {
                        /* put */ (result[(function (target) { return (typeof target === 'function') ? target(e.getKey()) : target.apply(e.getKey()); })(transformName)] = e.getValue());
                    }
                };
                for (var index189 = 0; index189 < array190.length; index189++) {
                    _loop_1(index189);
                }
            }
        }
    };
    return AbstractReferenceLocalizationStrategy;
}());
export { AbstractReferenceLocalizationStrategy };
AbstractReferenceLocalizationStrategy["__class"] = "io.apicurio.datamodels.openapi.visitors.dereference.AbstractReferenceLocalizationStrategy";
//# sourceMappingURL=AbstractReferenceLocalizationStrategy.js.map