/* eslint-env node */
'use strict';

module.exports = function(environment) {
  let ENV = {
    modulePrefix: 'bracco',
    environment,
    rootURL: '/',
    locationType: process.env.EMBER_CLI_ELECTRON ? 'hash' : 'auto',
    EmberENV: {
      FEATURES: {
        // Here you can enable experimental features on an ember canary build
        // e.g. 'with-controller': true
      },
      EXTEND_PROTOTYPES: {
        // Prevent Ember Data from overriding Date.parse.
        Date: false
      }
    },
    'ember-cli-string-helpers': {
      only: ['humanize', 'html-safe', 'truncate', 'titleize']
    },
    bugsnag: {
      apiKey: process.env.BUGSNAG_API_KEY,
      notifyReleaseStages: ['production']
    },
    emberTracker: {
			analyticsSettings: {
				trackingId: process.env.TRACKING_ID || null,
			},
		},

    SITE_TITLE: process.env.SITE_TITLE || "DataCite DOI Fabrica",
    NAVMENU_TITLE: process.env.NAVMENU_TITLE || 'Test Services',
    SEARCH_URL: process.env.SEARCH_URL || "https://search.test.datacite.org",
    ORCID_URL: process.env.ORCID_URL || "https://sandbox.orcid.org",
    API_URL: process.env.API_URL || "https://api.test.datacite.org",
    USER_API_URL: process.env.USER_API_URL || "https://profiles.test.datacite.org/api",
    CDN_URL: process.env.CDN_URL || "https://assets.test.datacite.org",
    DATA_URL: process.env.DATA_URL || "https://data.test.datacite.org",
    JWT_HOST: process.env.JWT_HOST || "https://profiles.test.datacite.org",
    JWT_PUBLIC_KEY: process.env.JWT_PUBLIC_KEY || null,

    APP: {
      // Here you can pass flags/options to your application instance
      // when it is created
    }
  };

  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;
  }

  if (environment === 'test') {
    // Testem prefers this...
    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') {
    // here you can enable a production-specific feature
  }

  return ENV;
};

@@ -815,16 +815,19 @@
 %09%7D,%0A%0A   
+ //
  SITE_TI
@@ -884,16 +884,19 @@
 ca%22,%0A   
+ //
  NAVMENU
@@ -952,16 +952,19 @@
 es',%0A   
+ //
  SEARCH_
@@ -1033,16 +1033,19 @@
 rg%22,%0A   
+ //
  ORCID_U
@@ -1105,16 +1105,19 @@
 rg%22,%0A   
+ //
  API_URL
@@ -1177,16 +1177,19 @@
 rg%22,%0A   
+ //
  USER_AP
@@ -1268,16 +1268,19 @@
 pi%22,%0A   
+ //
  CDN_URL
@@ -1343,16 +1343,19 @@
 rg%22,%0A   
+ //
  DATA_UR
@@ -1414,24 +1414,27 @@
 te.org%22,%0A   
+ //
  JWT_HOST: p
@@ -1497,16 +1497,19 @@
 rg%22,%0A   
+ //
  JWT_PUB
@@ -1675,16 +1675,758 @@
 %7D%0A  %7D;%0A%0A
+  ENV.SITE_TITLE = process.env.SITE_TITLE %7C%7C %22DataCite DOI Fabrica%22;%0A  ENV.NAVMENU_TITLE = process.env.NAVMENU_TITLE %7C%7C 'Test Services';%0A  ENV.SEARCH_URL = process.env.SEARCH_URL %7C%7C %22https://search.test.datacite.org%22;%0A  ENV.ORCID_URL = process.env.ORCID_URL %7C%7C %22https://sandbox.orcid.org%22;%0A  ENV.API_URL = process.env.API_URL %7C%7C %22https://api.test.datacite.org%22;%0A  ENV.USER_API_URL = process.env.USER_API_URL %7C%7C %22https://profiles.test.datacite.org/api%22;%0A  ENV.CDN_URL = process.env.CDN_URL %7C%7C %22https://assets.test.datacite.org%22;%0A  ENV.DATA_URL = process.env.DATA_URL %7C%7C %22https://data.test.datacite.org%22;%0A  ENV.JWT_HOST = process.env.JWT_HOST %7C%7C %22https://profiles.test.datacite.org%22;%0A  ENV.JWT_PUBLIC_KEY = process.env.JWT_PUBLIC_KEY %7C%7C null;%0A%0A
   if (en

load env variables differently