(self.webpackChunk=self.webpackChunk||[]).push([[7642],{64434:function(e,t,n){"use strict";n.r(t),n(98010),n(71848);var i=n(53754),l=n(6594),a=n(17025),s=(n(17734),n(78066),n(56346));function r(e){l.ZP.show(),ApiClient.getJSON(ApiClient.getUrl("Dlna/ProfileInfos")).then((function(t){!function(e,t){o(e,e.querySelector(".customProfiles"),t.filter((function(e){return"User"==e.Type})))}(e,t),function(e,t){o(e,e.querySelector(".systemProfiles"),t.filter((function(e){return"System"==e.Type})))}(e,t),l.ZP.hide()}))}function o(e,t,n){var a="";n.length&&(a+='<div class="paperList">');for(var o=0,f=n.length;o<f;o++){var c=n[o];a+='<div class="listItem listItem-border">',a+='<span class="listItemIcon material-icons live_tv"></span>',a+='<div class="listItemBody two-line">',a+="<a is='emby-linkbutton' style='padding:0;margin:0;' data-ripple='false' class='clearLink' href='#!/dlnaprofile.html?id="+c.Id+"'>",a+="<div>"+c.Name+"</div>",a+="</a>",a+="</div>","User"==c.Type&&(a+='<button type="button" is="paper-icon-button-light" class="btnDeleteProfile" data-profileid="'+c.Id+'" title="'+i.ZP.translate("Delete")+'"><span class="material-icons delete"></span></button>'),a+="</div>"}n.length&&(a+="</div>"),t.innerHTML=a,$(".btnDeleteProfile",t).on("click",(function(){var t=this.getAttribute("data-profileid");!function(e,t){(0,s.Z)(i.ZP.translate("MessageConfirmProfileDeletion"),i.ZP.translate("HeaderConfirmProfileDeletion")).then((function(){l.ZP.show(),ApiClient.ajax({type:"DELETE",url:ApiClient.getUrl("Dlna/Profiles/"+t)}).then((function(){l.ZP.hide(),r(e)}))}))}(e,t)}))}function f(){return[{href:"#!/dlnasettings.html",name:i.ZP.translate("Settings")},{href:"#!/dlnaprofiles.html",name:i.ZP.translate("TabProfiles")}]}$(document).on("pageshow","#dlnaProfilesPage",(function(){a.Z.setTabs("dlna",1,f),r(this)}))}}]);