const BaseConsts = require('./BaseConsts');

const DESTINATION_PATHS = {
    "client_side_addons": "Program Files\\Sisense\\app\\plugins",
    "server_side_addons": "ProgramData\\Sisense\\serverSidePlugins",
    "microservice": "Program Files\\Sisense\\app",
    "translations": "Program Files\\Sisense\\app\\translations",
};

const DESTINATION_ROOT_PATH = 'C:\\';

const HA_INSTALL_LIST = {
    "BUILD": ["client_side_addons", "translations"],
    "QUERY": [],
    "APP": ["server_side_addons", "microservice", "translations"],
    "SINGLE": ["client_side_addons", "server_side_addons", "microservice", "translations"]
};

const NODE_KEYS = ['s', 'a', 'q', 'b'];
const COMMAND_KEYS = ["i", "r", "u", "c", "h", "v"];

const IGNORE_INSTALL_FOLDERS = ["middlewares", "configuration_rewriters", "external_addons"]
class WindowsConsts extends BaseConsts {
    constructor() {
        super(DESTINATION_PATHS, {}, DESTINATION_ROOT_PATH, null, HA_INSTALL_LIST, IGNORE_INSTALL_FOLDERS)

        COMMAND_KEYS.forEach((commandKey) => {
            this.COMMAND_KEYS[commandKey].values = NODE_KEYS;
        });

        this.WIN_SERVICE_CONFIG = "Sisense.Service.conf";
    }
}

module.exports = new WindowsConsts();