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

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