define(["exports","jquery","./Component"],function(e,t,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=l(t),n=l(i);function l(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=function(e,t,i){return t&&s(e.prototype,t),i&&s(e,i),e};function s(e,t){for(var i=0;i<t.length;i++){var a=t[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}var c=(0,a.default)("body"),u=(0,a.default)("html"),f=(r(d,[{key:"init",value:function(){this.api=this.$el.asScrollable({namespace:"scrollable",skin:"scrollable-inverse",direction:"vertical",contentSelector:">",containerSelector:">"}).data("asScrollable")}},{key:"update",value:function(){this.api&&this.api.update()}},{key:"enable",value:function(){this.api||this.init(),this.api&&this.api.enable()}},{key:"disable",value:function(){this.api&&this.api.disable()}}]),d);function d(e){o(this,d),this.$el=e,this.api=null,this.init()}var p=(function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(h,n.default),r(h,[{key:"open",value:function(){this.animate(function(){this.$el.addClass("active"),(0,a.default)('[data-toggle="gridmenu"]').addClass("active").attr("aria-expanded",!0),c.addClass("site-gridmenu-active"),u.addClass("disable-scrolling")},function(){this.scrollable.enable()}),this.isOpened=!0}},{key:"close",value:function(){this.animate(function(){this.$el.removeClass("active"),(0,a.default)('[data-toggle="gridmenu"]').addClass("active").attr("aria-expanded",!0),c.removeClass("site-gridmenu-active"),u.removeClass("disable-scrolling")},function(){this.scrollable.disable()}),this.isOpened=!1}},{key:"toggle",value:function(e){e?this.open():this.close()}},{key:"animate",value:function(e,t){var i=this;e.call(this),this.$el.trigger("changing.site.gridmenu"),setTimeout(function(){t.call(i),i.$el.trigger("changed.site.gridmenu")},500)}}]),h);function h(){var e;o(this,h);for(var t=arguments.length,i=Array(t),a=0;a<t;a++)i[a]=arguments[a];var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=h.__proto__||Object.getPrototypeOf(h)).call.apply(e,[this].concat(i)));return n.isOpened=!1,n.scrollable=new f(n.$el),n}e.default=p});