"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const Action_1 = require("./Action");
const ActionGroup_1 = require("./ActionGroup");
const IScriptGenerationContext_1 = require("./IScriptGenerationContext");
class WorldSendMessageAction extends Action_1.default {
    get typeId() {
        return "world_send_message";
    }
    get message() {
        return this.getArgumentAsString("message");
    }
    getScriptRequirements() {
        return {
            needsLocalOverworld: true,
        };
    }
    getCommandRequirements() {
        return {};
    }
    addCommandLines(lines, indent, options) {
        if (!this.message) {
            return;
        }
        ActionGroup_1.default.addLine(lines, indent, "say " + this.message);
    }
    addScriptLines(lines, options, context, placement) {
        if (!this.message) {
            return;
        }
        if (placement === IScriptGenerationContext_1.ScriptGenerationPlacement.inSequence) {
            ActionGroup_1.default.addLine(lines, context.indent, 'mc.world.sendMessage("' + this.message + '");');
        }
    }
    validate() {
        return true;
    }
}
exports.default = WorldSendMessageAction;

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