(self.webpackChunk=self.webpackChunk||[]).push([[9302],{79302:function(e,t,o){"use strict";o.r(t),o(63238),o(61418),o(5769);var l=o(1115),n=o(78695),r=o(53754),s=(o(21865),o(30983),o(50447),o(16589),o(90423)),i=o.n(s);function a(e,t,l){Promise.resolve().then(o.bind(o,74227)).then((function(o){var n=l?"on":"off";o.centerFocus[n](e,t)}))}t.default={show:function(e){return new Promise((function(t,o){var s={removeOnClose:!0,scrollY:!1};n.Z.tv?s.size="fullscreen":s.size="small";var c=l.default.createDialog(s);c.classList.add("formDialog");var u="",d=!1;u+=r.ZP.translateHtml(i(),"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.Z.tv&&a(c.querySelector(".formDialogContent"),!1,!0),l.default.open(c),c.addEventListener("close",(function(){n.Z.tv&&a(c.querySelector(".formDialogContent"),!1,!1),d?t(e):o()})),c.querySelector(".selectPersonType").addEventListener("change",(function(e){"Actor"===this.value?c.querySelector(".fldRole").classList.remove("hide"):c.querySelector(".fldRole").classList.add("hide")})),c.querySelector(".btnCancel").addEventListener("click",(function(e){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}))}))}}},90423:function(e){e.exports='<div class="formDialogHeader"> <button is="paper-icon-button-light" class="btnCancel autoSize" tabindex="-1"><span class="material-icons arrow_back"></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}"> <option value=""></option> <option value="Actor">${Actor}</option> <option value="Composer">${Composer}</option> <option value="Director">${Director}</option> <option value="GuestStar">${GuestStar}</option> <option value="Producer">${Producer}</option> <option value="Writer">${Writer}</option> </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> '}}]);