define(["exports","./../modules/common/globalize.js","./../modules/common/itemmanager/itemmanager.js"],function(_exports,_globalize,_itemmanager){function addVirtualFolder(e){var view=this.view;require(["medialibrarycreator"],function(medialibrarycreator){(new medialibrarycreator).show({collectionTypeOptions:function(){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.default.translate("MessageGamePluginRequired")}),options.push({value:"musicvideos"}),options.push({value:"homevideos"}),options.push({name:_globalize.default.translate("MixedContent"),value:"mixed"});for(var i=1,length=options.length;i<length;i++)options[i].name||(options[i].name=_itemmanager.default.getContentTypeName(options[i].value));return options}().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.default.translate(text,'<a is="emby-linkbutton" class="button-link" href="'+url+'" target="_blank" data-autohide="true">',"</a>")}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0;_exports.default={addButtons:function(instance,addScanButton){var view=instance.view,sibling=view.querySelector(".listTotalRecordCount"),html='<button is="emby-button" type="button" class="itemsViewSettingsContainer-button raised raised-mini btnNewLibrary submit" title="'+_globalize.default.translate("HeaderNewLibrary")+'" aria-label="'+_globalize.default.translate("HeaderNewLibrary")+'"><i class="md-icon button-icon button-icon-left">&#xe145;</i><span class="emby-button-text">'+_globalize.default.translate("HeaderNewLibrary")+"</span></button>";addScanButton&&(html=html+('<button is="emby-button" type="button" class="itemsViewSettingsContainer-button raised raised-mini btnRefresh submit" title="'+_globalize.default.translate("HeaderScanLibraryFiles")+'" aria-label="'+_globalize.default.translate("HeaderScanLibraryFiles")+'"><i class="md-icon button-icon button-icon-left">refresh</i><span class="emby-button-text">'+_globalize.default.translate("HeaderScanLibraryFiles"))+'</span></button><div class="itemsViewSettingsContainer-button refreshProgress itemProgressBar itemProgressBarRound hide" style="width:10em;"></div>'),sibling.insertAdjacentHTML("afterend",html),view.querySelector(".btnNewLibrary").addEventListener("click",addVirtualFolder.bind(instance))}}});