define(["exports","./../modules/viewmanager/basesettingsview.js","./../modules/emby-elements/emby-input/emby-input.js","./../modules/emby-elements/emby-button/emby-button.js","./../modules/emby-elements/emby-toggle/emby-toggle.js","./../modules/emby-elements/emby-premierecontainer/emby-premierecontainer.js","./../modules/common/responsehelper.js","./../modules/loading/loading.js","./../modules/common/globalize.js"],function(_exports,_basesettingsview,_embyInput,_embyButton,_embyToggle,_embyPremierecontainer,_responsehelper,_loading,_globalize){function loadData(page,apiClient){return _loading.default.show(),apiClient.getNamedConfiguration("devices").then(function(config){!function(page,config){page.querySelector(".txtUploadPath").value=config.CameraUploadPath||"",page.querySelector(".chkSubfolder").checked=config.EnableCameraUploadSubfolders}(page,config),_loading.default.hide()})}function onSubmit(e){return function(form,instance){var apiClient=instance.getApiClient();apiClient.getNamedConfiguration("devices").then(function(config){config.CameraUploadPath=form.querySelector(".txtUploadPath").value,config.EnableCameraUploadSubfolders=form.querySelector(".chkSubfolder").checked,apiClient.updateNamedConfiguration("devices",config).then(_responsehelper.default.handleConfigurationSavedResponse)})}(e.target,this),e.stopPropagation(),e.preventDefault(),!1}function View(view,params){_basesettingsview.default.apply(this,arguments),view.querySelector(".btnSelectUploadPath").addEventListener("click",function(){Emby.importModule("./modules/directorybrowser/directorybrowser.js").then(function(directoryBrowser){var picker=new directoryBrowser;picker.show({callback:function(path){path&&(view.querySelector(".txtUploadPath").value=path),picker.close()},validateWriteable:!0,header:_globalize.default.translate("HeaderSelectUploadPath")})})}),view.querySelector(".devicesUploadForm").addEventListener("submit",onSubmit.bind(this)),view.querySelector(".premiereInfo").innerHTML=_globalize.default.translate("FeatureRequiresEmbyPremiere",'<a href="https://emby.media/premiere" data-preset="premiereinfo" is="emby-linkbutton" type="button" class="button-link">',"</a>")}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,Object.assign(View.prototype,_basesettingsview.default.prototype),View.prototype.loadSettingsInternal=function(){return loadData(this.view,this.getApiClient())};_exports.default=View});