import globalize from"./../modules/common/globalize.js";import itemManager from"./../modules/common/itemmanager/itemmanager.js";function addVirtualFolder(e){let view=this.view;require(["medialibrarycreator"],function(medialibrarycreator){(new medialibrarycreator).show({collectionTypeOptions:getCollectionTypeOptions().filter(function(f){return!f.hidden}),refresh:"true"===view.getAttribute("data-refreshlibrary")}).then(function(hasChanges){hasChanges&&view.querySelector(".itemsContainer").notifyRefreshNeeded(!0)})})}function getLink(text,url){return globalize.translate(text,'',"")}function getCollectionTypeOptions(){var options=[{name:"",value:""},{value:"movies",message:getLink("MovieLibraryHelp","https://github.com/MediaBrowser/Wiki/wiki/Movie%20naming")},{value:"music"},{value:"tvshows",message:getLink("TvLibraryHelp","https://github.com/MediaBrowser/Wiki/wiki/TV%20naming")}];options.push({value:"audiobooks"}),options.push({value:"books",message:getLink("BookLibraryHelp","https://github.com/MediaBrowser/Wiki/wiki/Book%20naming")}),options.push({value:"games",message:globalize.translate("MessageGamePluginRequired")}),options.push({value:"musicvideos"}),options.push({value:"homevideos"}),options.push({name:globalize.translate("MixedContent"),value:"mixed"});for(let i=1,length=options.length;i'+globalize.translate("HeaderNewLibrary")+"";addScanButton&&(html=html+(''),sibling.insertAdjacentHTML("afterend",html),view.querySelector(".btnNewLibrary").addEventListener("click",addVirtualFolder.bind(instance))}export default{addButtons:addButtons};