// 
// Decompiled by Procyon v0.6.0
// 

package com.hypixel.hytale.server.core.modules.interaction.commands;

import com.hypixel.hytale.server.core.Message;
import com.hypixel.hytale.server.core.command.system.CommandContext;
import com.hypixel.hytale.server.core.command.system.arguments.types.ArgumentType;
import com.hypixel.hytale.server.core.command.system.arguments.system.RequiredArg;
import javax.annotation.Nonnull;
import com.hypixel.hytale.server.core.modules.interaction.interaction.config.none.SelectInteraction;
import com.hypixel.hytale.server.core.command.system.arguments.types.EnumArgumentType;
import com.hypixel.hytale.server.core.command.system.basecommands.CommandBase;

public class InteractionSetSnapshotSourceCommand extends CommandBase
{
    @Nonnull
    private static final EnumArgumentType<SelectInteraction.SnapshotSource> SNAPSHOT_SOURCE_ARG_TYPE;
    @Nonnull
    private final RequiredArg<SelectInteraction.SnapshotSource> snapshotSourceArg;
    
    public InteractionSetSnapshotSourceCommand() {
        super("set", "server.commands.interaction.snapshotSource.set.desc");
        this.snapshotSourceArg = this.withRequiredArg("snapshotSource", "server.commands.interaction.snapshotSource.set.snapshotSource.desc", InteractionSetSnapshotSourceCommand.SNAPSHOT_SOURCE_ARG_TYPE);
    }
    
    @Override
    protected void executeSync(@Nonnull final CommandContext context) {
        final SelectInteraction.SnapshotSource source = SelectInteraction.SNAPSHOT_SOURCE = this.snapshotSourceArg.get(context);
        context.sendMessage(Message.translation("server.commands.interaction.snapshotSource.set").param("source", source.name()));
    }
    
    static {
        SNAPSHOT_SOURCE_ARG_TYPE = new EnumArgumentType<SelectInteraction.SnapshotSource>("server.commands.parsing.argtype.snapshotsource.name", SelectInteraction.SnapshotSource.class);
    }
}
