"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[47649],{47649:function(e,t,o){o.r(t),o.d(t,{default:function(){return i}}),o(24776),o(44962),o(78557),o(64628),o(90076),o(83994),o(82367);var l=o(79754),n=o(46782),r=o(5898),s=o(8004);function a(e,t,l){Promise.resolve().then(o.bind(o,10838)).then((function(o){var n=l?"on":"off";o.centerFocus[n](e,t)}))}o(15453),o(98959),o(63001);var i={show:function(e){return new Promise((function(t,o){var i={removeOnClose:!0,scrollY:!1};n.A.tv?i.size="fullscreen":i.size="small";var c=l.default.createDialog(i);c.classList.add("formDialog");var u="",d=!1;u+=r.Ay.translateHtml('<div class="formDialogHeader"> <button is="paper-icon-button-light" class="btnCancel autoSize" tabindex="-1" title="${ButtonBack}"><span class="material-icons arrow_back" aria-hidden="true"></span></button> <h3 class="formDialogHeaderTitle"> ${Edit} </h3> </div> <div class="formDialogContent smoothScrollY" style="padding-top:2em"> <form class="popupEditPersonForm dialogContentInner dialog-content-centered"> <div class="inputContainer"> <input type="text" is="emby-input" class="txtPersonName" required="required" label="${LabelName}"/> </div> <div class="selectContainer"> <select is="emby-select" id="selectPersonType" class="selectPersonType" label="${LabelType}"></select> </div> <div class="inputContainer fldRole hide"> <input is="emby-input" type="text" class="txtPersonRole" label="${LabelPersonRole}"/> <div class="fieldDescription">${LabelPersonRoleHelp}</div> </div> <div class="formDialogFooter"> <button is="emby-button" type="submit" class="raised button-submit block formDialogFooterItem"> <span>${Save}</span> </button> </div> </form> </div> ',"core"),c.innerHTML=u,c.querySelector(".txtPersonName",c).value=e.Name||"",c.querySelector(".selectPersonType",c).value=e.Type||"",c.querySelector(".txtPersonRole",c).value=e.Role||"",n.A.tv&&a(c.querySelector(".formDialogContent"),!1,!0),l.default.open(c),c.addEventListener("close",(function(){n.A.tv&&a(c.querySelector(".formDialogContent"),!1,!1),d?t(e):o()}));for(var v='<option value=""></option>',p=0,f=Object.values(s.SFr);p<f.length;p++){var m=f[p];m!==s.SFr.Unknown&&(v+='<option value="'.concat(m,'">${').concat(m,"}</option>"))}c.querySelector(".selectPersonType").innerHTML=r.Ay.translateHtml(v),c.querySelector(".selectPersonType").addEventListener("change",(function(){"Actor"===this.value?c.querySelector(".fldRole").classList.remove("hide"):c.querySelector(".fldRole").classList.add("hide")})),c.querySelector(".btnCancel").addEventListener("click",(function(){l.default.close(c)})),c.querySelector("form").addEventListener("submit",(function(t){return d=!0,e.Name=c.querySelector(".txtPersonName",c).value,e.Type=c.querySelector(".selectPersonType",c).value,e.Role=c.querySelector(".txtPersonRole",c).value||null,l.default.close(c),t.preventDefault(),!1})),c.querySelector(".selectPersonType").dispatchEvent(new CustomEvent("change",{bubbles:!0}))}))}}}}]);