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"videos":return 1;case"photos":return 2;default:return 0}}function getTabs(){return[{name:globalize.translate("sharedcomponents#Folders")},{name:globalize.translate("sharedcomponents#Videos")},{name:globalize.translate("sharedcomponents#Photos")}]}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("foldersTab");break;case 1:depends.push("./videos");break;case 2:depends.push("./photos")}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),instance.tabControllers[index]=controller}return controller})}function HomeVideosView(view,params){TabbedView.call(this,view,params)}return Object.assign(HomeVideosView.prototype,TabbedView.prototype),HomeVideosView.prototype.getTabs=getTabs,HomeVideosView.prototype.getDefaultTabIndex=getDefaultTabIndex,HomeVideosView.prototype.getTabController=getTabController,HomeVideosView});