define(["tabbedView","require","globalize","userSettings","emby-itemscontainer","emby-tabs","emby-button","emby-scroller"],function(TabbedView,require,globalize,userSettings){"use strict";function getDefaultTabIndex(folderId){switch(userSettings.get("landing-"+folderId)){case"suggestions":return 1;case"favorites":return 4;case"collections":return 3;case"genres":return 5;case"folders":return 6;default:return 0}}function getTabs(){return[{name:globalize.translate("sharedcomponents#Movies")},{name:globalize.translate("sharedcomponents#Suggestions")},{name:globalize.translate("sharedcomponents#Trailers")},{name:globalize.translate("sharedcomponents#Collections")},{name:globalize.translate("sharedcomponents#Favorites")},{name:globalize.translate("sharedcomponents#Genres")},{name:globalize.translate("sharedcomponents#Folders")}]}function getRequirePromise(deps){return new Promise(function(resolve,reject){require(deps,resolve)})}function getTabController(index){if(null==index)throw new Error("index cannot be null");var depends=[];switch(index){case 0:depends.push("./moviestab");break;case 1:depends.push("./suggestions");break;case 2:depends.push("./trailers");break;case 3:depends.push("./collections");break;case 4:depends.push("./moviestab");break;case 5:depends.push("./genres");break;case 6:depends.push("foldersTab")}var instance=this;return getRequirePromise(depends).then(function(controllerFactory){var controller=instance.tabControllers[index];if(!controller){controller=new controllerFactory(instance.view.querySelector(".tabContent[data-index='"+index+"']"),instance.params),4===index&&(controller.mode="favorites"),instance.tabControllers[index]=controller}return controller})}function MovieView(view,params){TabbedView.call(this,view,params)}return Object.assign(MovieView.prototype,TabbedView.prototype),MovieView.prototype.getTabs=getTabs,MovieView.prototype.getDefaultTabIndex=getDefaultTabIndex,MovieView.prototype.getTabController=getTabController,MovieView});