angular.module("mystrom.tiles.directives",[]).directive("mystromTiles",function(){return{restrict:"E",templateUrl:"templates/tiles.html"}}).directive("animateNewSwitch",["$interval","$timeout","tileService",function(){return{restrict:"A",scope:{flip:"=",type:"="},link:function(i,e){i.$watch("flip",function(n,t){n!==t&&"new-adapter"===i.type&&(e.hasClass("flipped")?e.removeClass("flipped"):e.addClass("flipped"))})}}}]).directive("animateNewFirmware",["$interval","$timeout","tileService",function(i){return{restrict:"A",scope:{on:"=",flip:"="},link:function(e){e.$watch("on",function(n){n===!0&&(e.flip=!e.flip,i(function(){e.flip=!e.flip},2e3))})}}}]).directive("blinks",["$timeout",function(i){return{restrict:"A",scope:{on:"="},link:function(e,n){e.$watch("on",function(t){t===!0&&(n.addClass("blink"),i(function(){n.removeClass("blink"),e.on=!1},1e3))})}}}]).directive("redrawElement",["$window","$timeout",function(i){return{restrict:"A",link:function(e,n){var t=function(){var i=0;return function(e,n){clearTimeout(i),i=setTimeout(e,n)}}();angular.element(i).bind("resize",function(){ionic.Platform.isIPad()&&($(n).hide(),t(function(){$(n).show()},1e3))})}}}]).directive("addBiggerClass",function(){return{restrict:"E",link:function(i){i.$on("$ionicView.enter",function(){$('[nav-bar="entering"] div.title').first().addClass("bigger")}),i.$on("$ionicView.leave",function(){$('[nav-bar="leaving"] div.title').first().removeClass("bigger")})}}}).directive("removeBiggerClass",function(){return{restrict:"E",link:function(i){i.$on("$ionicView.enter",function(){$('[nav-bar="entering"] div.title').first().removeClass("bigger")})}}}).directive("removeMainNav",function(){return{restrict:"E",link:function(i){i.$on("$ionicView.enter",function(){$("ion-nav-bar").first().addClass("hidden")})}}}).directive("addMainNav",["$timeout",function(i){return{restrict:"E",link:function(e){$("body").addClass("backdrop-solid"),e.$on("$ionicView.enter",function(){$("ion-nav-bar").first().removeClass("hidden"),$("body").addClass("backdrop-solid")}),e.$on("$ionicView.afterLeave",function(){e.isFrontFaceEnabled||i(function(){$("body").removeClass("backdrop-solid")},1e3)})}}}]);