/**
@module ember-metal
*/

import Ember from "ember-metal/core";
import { hasPropertyAccessors } from "ember-metal/platform";
import { defineProperty } from "ember-metal/properties";
import { get } from "ember-metal/property_get";
import { set } from "ember-metal/property_set";


/**
  Used internally to allow changing properties in a backwards compatible way, and print a helpful
  deprecation warning.

  @method deprecateProperty
  @param {Object} object The object to add the deprecated property to.
  @param {String} deprecatedKey The property to add (and print deprecation warnings upon accessing).
  @param {String} newKey The property that will be aliased.
  @private
  @since 1.7.0
*/

export function deprecateProperty(object, deprecatedKey, newKey) {
  function deprecate() {
    Ember.deprecate('Usage of `' + deprecatedKey + '` is deprecated, use `' + newKey + '` instead.');
  }

  if (hasPropertyAccessors) {
    defineProperty(object, deprecatedKey, {
        configurable: true,
        enumerable: false,
        set: function(value) {
          deprecate();
          set(this, newKey, value);
        },
        get: function() {
          deprecate();
          return get(this, newKey);
        }
    });
  }
}

@@ -970,18 +970,16 @@
 %7B%0A      
-  
 configur
@@ -996,18 +996,16 @@
 ,%0A      
-  
 enumerab
@@ -1021,18 +1021,16 @@
 ,%0A      
- 
- 
 set: fun
@@ -1044,34 +1044,32 @@
 alue) %7B%0A        
-  
 deprecate();%0A   
@@ -1057,34 +1057,32 @@
    deprecate();%0A
-  
         set(this
@@ -1109,15 +1109,11 @@
     
-  
 %7D,%0A
-  
     
@@ -1136,26 +1136,24 @@
 ) %7B%0A        
- 
- 
 deprecate();
@@ -1149,26 +1149,24 @@
 eprecate();%0A
-  
         retu
@@ -1187,18 +1187,16 @@
 ewKey);%0A
-  
       %7D%0A

Fix indentation.