/*
 * ADOBE CONFIDENTIAL
 *
 * Copyright (c) 2014 Adobe Systems Incorporated. All rights reserved.
 *
 * NOTICE:  All information contained herein is, and remains
 * the property of Adobe Systems Incorporated and its suppliers,
 * if any.  The intellectual and technical concepts contained
 * herein are proprietary to Adobe Systems Incorporated and its
 * suppliers and are protected by trade secret or copyright law.
 * Dissemination of this information or reproduction of this material
 * is strictly forbidden unless prior written permission is obtained
 * from Adobe Systems Incorporated.
 */

/*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4 */
/*global define: true */

/*
Process to add endpoints

Service relies on following configuration group

<config_name> {
    STORAGE_SERVICE endpoint
    EXTRACT_SERVICE   endpoint
    IMS             endpoint (defined through DW)
    
}

multiple storage/image endpoints can have same IMS endpoint, for instance in the current configuration
environment.STAGE and environment.LABS use ims-na1-stg1 IMS endpoint, and, 
environment.PRODUCTION uses ims-na1

DWPSDExtractManager.setAccessToken sets the current config depending upon the stage/production setting in dreamweaver
change CURRENTENDPOINT for switching between staging configs

Change required              |                   Code                                   |            Files to change
--------------------------------------------------------------------------------------------------------------------------
 adding                      |   add a group for eg                                     |       dwconfig.js
STORAGE_SERVICE/             |   LABS: {                                                |    
EXTRACT_SERVICE                |       STORAGE_SERVICE: {                                 |                            
                             |           HOST: "https://cc-api-storage-labs.adobe.io",  |                                    
                             |          PORT: 443                                       |                            
                             |      },                                                  |                            
                             |      EXTRACT_SERVICE: {                                    |                                
                             |          HOST: "https://cc-api-extract-labs.adobe.io",     |                                    
                             |          PORT: 443                                       |                                    
                             |      }                                                   |                                    
                             |  }                                                       |                                               
                             |                                                          |                           
                             |                                                          |                                              
--------------------------------------------------------------------------------------------------------------------------
IMS endpoint(Stage/Prod)     |            No change required                            |      Dreamweaver
                             |                                                          |        
--------------------------------------------------------------------------------------------------------------------------
adding new IMS endpoint      |                                                          |     Dreamweaver
 for eg.                     | Steps:                                                   |   
                             |  1> register DW_EXTRACT_CLIENT_ID on required            |                   
                             |      IMS using zendesk                                   |               
                             |  2> define a new environment variable for                |                           
                             |      IMS endpoint                                        |                   
   ims-na1-dev1              |  3> use the endpoint in PlugPlugIMSConnectWithEndpoint   |                            
   ims-na1-dev2              |                                                          |                                                                                
   ims-na1-qa1               |                                                          |                                    
   ims-na1-qa2               |                                                          |                                                                                                                                              
--------------------------------------------------------------------------------------------------------------------------

*/
define([], function () {
    "use strict";
    var environment = {
        STAGE: {
            STORAGE_SERVICE: {
                HOST: "https://cc-api-storage-stage.adobe.io",
                PORT: 443
            },
            EXTRACT_SERVICE: {
                HOST: "https://cc-api-extract-stage.adobe.io",
                PORT: 443
            }
            /*imsHost = 'ims-na1-stg1.adobelogin.com';*/    //comes from dreamweaver
        },
        PRODUCTION: {
            STORAGE_SERVICE: {
                HOST: "https://cc-api-storage.adobe.io",
                PORT: 443
            },
            EXTRACT_SERVICE: {
                HOST: "https://cc-api-extract.adobe.io",
                PORT: 443
            }
            /*imsHost = 'ims-na1-cc1.adobelogin.com';*/     //comes from dreamweaver
        },
        LABS: {
            STORAGE_SERVICE: {
                HOST: "https://cc-api-storage-labs.adobe.io",
                PORT: 443
            },
            EXTRACT_SERVICE: {
                HOST: "https://cc-api-extract-labs.adobe.io",
                PORT: 443
            }
            /*imsHost = 'ims-na1-stg1.adobelogin.com';*/        //comes from dreamweaver
        },
        EXTRACT_SERVICE_URLS: {
            INTROSPECT_PSD: "/introspect",
            SPRITESHEET_PSD: "/spritesheet",
            CREATE_WEB_ASSET: "/createwebasset",
            BATCH_DOWNLOAD_ASSET: "/batchcreatewebasset"
        },
        STORAGE_SERVICE_URLS: {
            STORAGE_ROOT: '/files/'
        },
        STAGEENDPOINT: {},
        WELCOME_EXP_PATH: "Floaters/WelcomeExp"
    };
    environment.STAGEENDPOINT = environment.STAGE;
    return environment;
});
