"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const Utilities_1 = require("../core/Utilities");
const ActionError_1 = require("./ActionError");
class ActionSetScope {
    parent;
    test;
    world;
    errors = [];
    state = {};
    getState(name) {
        const result = this.state[name];
        if (!result && this.parent) {
            return this.parent.getState(name);
        }
        return result;
    }
    setState(name, val) {
        if (Utilities_1.default.isUsableAsObjectKey(name)) {
            this.state[name] = val;
        }
    }
    addError(action, message) {
        const error = new ActionError_1.default(action, message);
        this.addErrorDirect(error);
    }
    addErrorDirect(error) {
        this.errors.push(error);
        if (this.parent) {
            this.parent.addErrorDirect(error);
        }
    }
    createBlockLocation(name) {
        const val = this.getState(name);
        if (val instanceof Array) {
        }
    }
}
exports.default = ActionSetScope;

//# sourceMappingURL=../maps/actions/ActionSetScope.js.map
