package com.loganmagnan.eventcore.utils;

import com.loganmagnan.eventcore.EventCore;
import java.util.*;

public class Constants {

    private EventCore main = EventCore.getInstance();

    public static Map<String, List<String>> COMMAND_MESSAGES = new HashMap<String, List<String>>();
    public static Map<String, List<String>> LISTENER_MESSAGES = new HashMap<String, List<String>>();
    public static Map<String, List<String>> CHAT_MANAGEMENT_MESSAGES = new HashMap<String, List<String>>();
    public static Map<String, List<String>> STAFF_MANAGEMENT_MESSAGES = new HashMap<String, List<String>>();
    public static Map<String, String> INFORMATION = new HashMap<String, String>();
    public static Map<String, String> PERMISSION_NODES = new HashMap<String, String>();

    public Constants() {
        // /chat
        COMMAND_MESSAGES.put("chat.help", this.main.getMessagesConfig().getConfig().getStringList("MESSAGES.COMMANDS.CHAT.HELP"));

        // /chat slow <amount>
        COMMAND_MESSAGES.put("chat.slow.invalid-argument", Collections.singletonList(this.main.getMessagesConfig().getConfig().getString("MESSAGES.COMMANDS.CHAT.SLOW.INVALID-ARGUMENT")));
        COMMAND_MESSAGES.put("chat.slow.invalid-amount", Collections.singletonList(this.main.getMessagesConfig().getConfig().getString("MESSAGES.COMMANDS.CHAT.SLOW.INVALID-AMOUNT")));

        // /setspawn
        COMMAND_MESSAGES.put("set-spawn.spawn-set", Collections.singletonList(this.main.getMessagesConfig().getConfig().getString("MESSAGES.COMMANDS.SET-SPAWN.SPAWN-SET")));

        // //staffmode
        COMMAND_MESSAGES.put("staff-mode.enabled", Collections.singletonList(this.main.getMessagesConfig().getConfig().getString("MESSAGES.COMMANDS.STAFF-MODE.ENABLED")));
        COMMAND_MESSAGES.put("staff-mode.disabled", Collections.singletonList(this.main.getMessagesConfig().getConfig().getString("MESSAGES.COMMANDS.STAFF-MODE.DISABLED")));

        // /bypassmode
        COMMAND_MESSAGES.put("bypass-mode.enabled", Collections.singletonList(this.main.getMessagesConfig().getConfig().getString("MESSAGES.COMMANDS.BYPASS-MODE.ENABLED")));
        COMMAND_MESSAGES.put("bypass-mode.disabled", Collections.singletonList(this.main.getMessagesConfig().getConfig().getString("MESSAGES.COMMANDS.BYPASS-MODE.DISABLED")));

        // /event
        COMMAND_MESSAGES.put("event.help", this.main.getMessagesConfig().getConfig().getStringList("MESSAGES.COMMANDS.EVENT.HELP"));

        // AsyncPlayerChatEvent
        LISTENER_MESSAGES.put("chat-muted", Collections.singletonList(this.main.getMessagesConfig().getConfig().getString("MESSAGES.LISTENERS.CHAT-MUTED")));
        LISTENER_MESSAGES.put("chat-cooldown", this.main.getMessagesConfig().getConfig().getStringList("MESSAGES.LISTENERS.CHAT-COOLDOWN"));

        // Chat Management System
        CHAT_MANAGEMENT_MESSAGES.put("muted", Collections.singletonList(this.main.getMessagesConfig().getConfig().getString("MESSAGES.CHAT-MANAGEMENT.MUTED")));
        CHAT_MANAGEMENT_MESSAGES.put("unmuted", Collections.singletonList(this.main.getMessagesConfig().getConfig().getString("MESSAGES.CHAT-MANAGEMENT.UNMUTED")));
        CHAT_MANAGEMENT_MESSAGES.put("slowed", Collections.singletonList(this.main.getMessagesConfig().getConfig().getString("MESSAGES.CHAT-MANAGEMENT.SLOWED")));
        CHAT_MANAGEMENT_MESSAGES.put("cleared", Collections.singletonList(this.main.getMessagesConfig().getConfig().getString("MESSAGES.CHAT-MANAGEMENT.CLEARED")));

        // Staff Management System
        STAFF_MANAGEMENT_MESSAGES.put("vanish.enabled", Collections.singletonList(this.main.getMessagesConfig().getConfig().getString("MESSAGES.STAFF-MANAGEMENT.VANISH.ENABLED")));
        STAFF_MANAGEMENT_MESSAGES.put("vanish.disabled", Collections.singletonList(this.main.getMessagesConfig().getConfig().getString("MESSAGES.STAFF-MANAGEMENT.VANISH.DISABLED")));

        // Information
        INFORMATION.put("server-ip-address", this.main.getMainConfig().getConfig().getString("SERVER-IP-ADDRESS"));

        // Permission Nodes
        PERMISSION_NODES.put("chat.bypass", this.main.getMainConfig().getConfig().getString("PERMISSION-NODES.CHAT-BYPASS"));
        PERMISSION_NODES.put("staff-mode.bypass", this.main.getMainConfig().getConfig().getString("PERMISSION-NODES.STAFF-MODE-BYPASS"));
    }
}
