"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.wrapSharedRef = wrapSharedRef;
exports.wrapObject = wrapObject;
const _1 = require("../Class/$");
const Object_1 = require("../Object");
function wrapSharedRef(data) {
    const _data = new Object_1.Object_(data.current);
    return _data;
}
function wrapObject(data, system) {
    const _data = new Object_1.Object_(data);
    const _obj = new (class Array extends _1.$ {
        constructor() {
            super(...arguments);
            this.__ = ['J'];
        }
        get(name) {
            return _data.get(name);
        }
        set(name, data) {
            return _data.set(name, data);
        }
        delete(name) {
            return _data.delete(name);
        }
        hasKey(name) {
            return _data.hasKey(name);
        }
        keys() {
            return _data.keys();
        }
        deepGet(path) {
            return _data.deepGet(path);
        }
        deepSet(path, data) {
            return _data.deepSet(path, data);
        }
        deepDelete(path) {
            return _data.deepDelete(path);
        }
        subscribe(path, key, listener) {
            return _data.subscribe(path, key, listener);
        }
        raw() {
            return data;
        }
    })(system);
    return _obj;
}
//# sourceMappingURL=Object.js.map