/* jshint node: true */

var pkg = require('../package.json');

module.exports = function(environment) {
    var ENV = {
        modulePrefix: 'developer-tools',
        environment: environment,
        baseURL: '/',
        locationType: 'auto',
        EmberENV: {
            FEATURES: {
                // Here you can enable experimental features on an ember canary build
                // e.g. 'with-controller': true
            }
        },

        APP: {
            version: pkg.version,
            semver: pkg.version + '-edge',
            urlprefix: ''
        },
        'oauthProps': {
            localhost: {
                clientId: 'f2f2762f-6c8f-4f06-9f13-0560c17cef2b',
                redirect: 'http://localhost:4200/'
            },
            inindca: {
                clientId: 'f2f2762f-6c8f-4f06-9f13-0560c17cef2b',
                redirect: 'https://developer.inindca.com/developer-tools/'
            },
            inintca:{
                clientId: '7911401c-c8b5-4fcc-8f74-9091fa878f0f',
                redirect: 'https://developer.inintca.com/developer-tools/'
            },
            ininsca: {
                clientId: 'b16c40bf-1d9d-4f59-9f1c-07e60528c659',
                redirect: 'https://apps.ininsca.com/developer-tools/'
            },
            mypurecloudcom: {
                clientId: 'd7200ae7-b2bb-4ff6-afcf-e29ebd1d6f56',
                redirect: 'https://developer.mypurecloud.com/developer-tools/'
            },
            mypurecloudie: {
                clientId: '51729d1d-e816-4f3d-9fb7-cf5fa0b79041',
                redirect: 'https://developer.mypurecloud.ie/developer-tools/'
            },
            mypurecloudcomau: {
                clientId: '303ae267-3163-4fec-9f38-d02f9764a849',
                redirect: 'https://developer.mypurecloud.com.au/developer-tools/'
            },
            mypurecloudjp: {
                clientId: '818a2480-2f88-4f0a-afc0-777dce4f3f6e',
                redirect: 'https://developer.mypurecloud.jp/developer-tools/'
            }
        }
    };

    if (environment === 'development') {
        // ENV.APP.LOG_RESOLVER = true;
        // ENV.APP.LOG_ACTIVE_GENERATION = true;
        // ENV.APP.LOG_TRANSITIONS = true;
        // ENV.APP.LOG_TRANSITIONS_INTERNAL = true;
        // ENV.APP.LOG_VIEW_LOOKUPS = true;
        ENV.locationType = 'hash';
    }

    if (environment === 'test') {
        // Testem prefers this...
        ENV.baseURL = '/';
        ENV.locationType = 'none';

        // keep test console output quieter
        ENV.APP.LOG_ACTIVE_GENERATION = false;
        ENV.APP.LOG_VIEW_LOOKUPS = false;

        ENV.APP.rootElement = '#ember-testing';
    }

    if (environment === 'production') {
        var buildNumber = process.env.BUILD_NUMBER || 'BUILDNUM';
        var gitBranch = process.env.GIT_BRANCH || 'BRANCH';
        var gitCommit = process.env.GIT_COMMIT || 'SHA';
        var packageVersion = '' + pkg.version;
        var semver = packageVersion + '+' + [buildNumber, gitBranch, gitCommit].join('-');

        if (process.env.CDN_URL && !process.env.OLD_JENKINS) {
            ENV.APP.urlprefix = process.env.CDN_URL;
        }

        ENV.APP.semver = semver;
        ENV.APP.version = packageVersion;


        ENV.baseURL = '/developer-tools/';
        ENV.locationType = 'hash';

        ENV.analyticsTrackingId = process.env.ANALYTICS_ID;
    }

    return ENV;
};

@@ -987,44 +987,44 @@
 d: '
-7911401c-c8b5-4fcc-8f74-9091fa878f0f
+89814d34-de36-4f99-8f55-399aa84cb620
 ',%0A 

add tca environment