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