"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
Object.defineProperty(exports, "__esModule", { value: true });
const Unit_1 = require("../../../../Class/Unit");
const _ids_1 = require("../../../_ids");
class Global extends Unit_1.Unit {
    constructor(system) {
        super({
            i: [],
            o: [],
        }, {}, system, _ids_1.ID_GLOBAL);
    }
    subscribe(path, key, listener) {
        return this.__system.global.data.subscribe(path, key, listener);
    }
    get(name) {
        return __awaiter(this, void 0, void 0, function* () {
            return this.__system.global.data.get(name);
        });
    }
    set(name, data) {
        return __awaiter(this, void 0, void 0, function* () {
            return this.__system.global.data.set(name, data);
        });
    }
    delete(name) {
        return __awaiter(this, void 0, void 0, function* () {
            return this.__system.global.data.delete(name);
        });
    }
    deepSet(path, data) {
        return __awaiter(this, void 0, void 0, function* () {
            return this.__system.global.data.deepSet(path, data);
        });
    }
    deepGet(path) {
        return __awaiter(this, void 0, void 0, function* () {
            return this.__system.global.data.deepGet(path);
        });
    }
    deepDelete(path) {
        return __awaiter(this, void 0, void 0, function* () {
            return this.__system.global.data.deepDelete(path);
        });
    }
    keys() {
        return __awaiter(this, void 0, void 0, function* () {
            return this.__system.global.data.keys();
        });
    }
    hasKey(name) {
        return __awaiter(this, void 0, void 0, function* () {
            return this.__system.global.data.hasKey(name);
        });
    }
}
exports.default = Global;
//# sourceMappingURL=index.js.map