define(["appFooter-shared","emby-tabs","emby-button"],function(appFooter){"use strict";function setTabs(view,selectedIndex,builder){if(!view)return void(tabOwnerView&&(headerTabsContainer||(headerTabsContainer=queryScope.querySelector(".headerTabs")),document.body.classList.remove("withSectionTabs"),headerTabsContainer.innerHTML="",headerTabsContainer.classList.add("hide"),tabOwnerView=null));if(headerTabsContainer||(headerTabsContainer=queryScope.querySelector(".headerTabs")),tabOwnerView||headerTabsContainer.classList.remove("hide"),tabOwnerView!==view){var index=0,indexAttribute=null==selectedIndex?"":' data-index="'+selectedIndex+'"',tabsHtml='
'+builder().map(function(t){var tabHtml,tabClass="emby-tab-button";return tabHtml=t.href?'":'",index++,tabHtml}).join("")+"
";return headerTabsContainer.innerHTML=tabsHtml,document.body.classList.add("withSectionTabs"),tabOwnerView=view,!0}return headerTabsContainer.querySelector('[is="emby-tabs"]').selectedIndex(selectedIndex),tabOwnerView=view,!1}function getTabsElement(){return document.querySelector(".tabs-viewmenubar")}var tabOwnerView,headerTabsContainer,queryScope=document.querySelector(".skinHeader");return{setTabs:setTabs,getTabsElement:getTabsElement}});