define(["exports","./../modules/common/globalize.js","./../modules/common/itemmanager/itemmanager.js","./../modules/emby-apiclient/connectionmanager.js"],function(_exports,_globalize,_itemmanager,_connectionmanager){function addVirtualFolder(e){var options,view=this.view;_connectionmanager.default.currentApiClient().isMinServerVersion("4.9.0.70")?Emby.importModule("./components/medialibrarycreator/medialibrarycreator.js").then(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)})}):(options="Please use the Emby web app built into your server to manage your libraries, or update to Emby Server 4.9 or greater.",Emby.importModule("./modules/common/dialogs/alert.js").then(function(alert){return alert(options)}))}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))}}});