/*
  You can put configuration variables such as endpoints and flags in here

  `common` should include default values
  the rest of the sections will provide overrides for various alias
  Alias is passed in as launch the application

  Use key names with dots such as "my.service.endpoint"

  Values should all be strings and co-erced into other types in your program code
*/

export const getConfig = alias => {
    if (!alias) {
        return {};
    }
    const config = {
        development: () => ({
            development: "true",
            env: "development"
        }),
        common: () => ({
            env: "common",
            "common.value": "true"
        }),
        qa: () => ({
            env: "qa"
        }),
        staging: () => ({
            env: "staging"
        }),
        production: () => ({
            env: "production"
        })
    };
    return config[alias] ? config[alias]() : {};
};
