define(["ember"],function(a){var b=a.Mixin.create({classNameBindings:["accepts-drag","self-drop"],"accepts-drag":!1,"self-drop":!1,validateDragEvent:function(){return!0},acceptDrop:a.K,_handleDragOver:function(a){return this._droppableIsDraggable(a)&&this.set("self-drop",!0),this.get("accepts-drag")?this._allowDrop(a):(this.validateDragEvent(a)?(this.set("accepts-drag",!0),this._allowDrop(a)):this._resetDroppability(),void this._allowDrop(a))}.on("dragOver"),_handleDrop:function(a){return this.validateDragEvent(a)?(this.acceptDrop(a),this._resetDroppability(),a.stopPropagation(),!1):void 0}.on("drop"),_allowDrop:function(a){return a.stopPropagation(),a.preventDefault(),!1},_droppableIsDraggable:function(a){return 0!=a.dataTransfer.files.length&&-1!=a.dataTransfer.files[0].type.indexOf("image")||b._currentDrag&&(b._currentDrag===a.target||b._currentDrag.contains(a.target))},_resetDroppability:function(){this.set("accepts-drag",!1),this.set("self-drop",!1)}.on("dragLeave")});return b._currentDrag=null,window.addEventListener("dragstart",function(a){b._currentDrag=a.target},!0),b});