"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3202],{3202:function(e,t,i){i.r(t),i.d(t,{default:function(){return b}}),i(5769),i(63238),i(61418),i(17460),i(14078);var n,r,a,o,l=i(90914),s=i(44614),d=i(78695),c=i(56705),u=i(74227),f=(i(87201),i(78066),i(29490),i(83225),i(21865),i(6626),i(43734),i(85427),i(15359),i(53913)),m=!1;function g(e){m=e,l.default.close(n)}function v(e){var t=this,i=f.Z.getApiClient(a);return i.getLiveTvTimer(r).then((function(e){e.PrePaddingSeconds=60*t.querySelector("#txtPrePaddingMinutes").value,e.PostPaddingSeconds=60*t.querySelector("#txtPostPaddingMinutes").value,i.updateLiveTvTimer(e).then(o)})),e.preventDefault(),!1}var b={show:function(e,t,b){return new Promise((function(p){m=!1,a=t,c.ZP.show(),b=b||{},o=p;var h={removeOnClose:!0,scrollY:!1};d.Z.tv&&(h.size="fullscreen");var P=l.default.createDialog(h);P.classList.add("formDialog"),P.classList.add("recordingDialog"),d.Z.tv||(P.style["min-width"]="20%",P.classList.add("dialog-fullscreen-lowres"));var y,w="";w+=s.ZP.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"> ${HeaderRecordingOptions} </h3> </div> <div class="formDialogContent smoothScrollY"> <div class="dialogContentInner dialog-content-centered"> <form> <br/> <div class="inputContainer"> <div class="flex align-items-center"> <div class="flex-grow"> <input is="emby-input" type="number" id="txtPrePaddingMinutes" pattern="[0-9]*" required="required" min="0" step="1" label="${LabelStartWhenPossible}"/> </div> <div class="fieldDescription" style="margin-left:.5em;font-size:90%;margin-top:1.3em"> ${MinutesBefore} </div> </div> </div> <div class="inputContainer"> <div class="flex align-items-center"> <div class="flex-grow"> <input is="emby-input" type="number" id="txtPostPaddingMinutes" pattern="[0-9]*" required="required" min="0" step="1" label="${LabelStopWhenPossible}"/> </div> <div class="fieldDescription" style="margin-left:.5em;font-size:90%;margin-top:1.3em"> ${MinutesAfter} </div> </div> </div> <br/> <div class="formDialogFooter"> <button is="emby-button" type="submit" class="raised btnSubmit block formDialogFooterItem button-submit hide"> <span>${Save}</span> </button> <button is="emby-button" type="button" class="raised btnCancelRecording block formDialogFooterItem button-cancel" style="white-space:nowrap"> <span>${HeaderCancelRecording}</span> </button> </div> </form> </div> </div> ',"core"),P.innerHTML=w,!1===b.enableCancel&&P.querySelector(".formDialogFooter").classList.add("hide"),n=P,P.addEventListener("closing",(function(){m||P.querySelector(".btnSubmit").click()})),P.addEventListener("close",(function(){m&&p({updated:!0,deleted:!0})})),d.Z.tv&&u.default.centerFocus.on(P.querySelector(".formDialogContent"),!1),(y=P).querySelector(".btnCancel").addEventListener("click",(function(){g(!1)})),y.querySelector(".btnCancelRecording").addEventListener("click",(function(){var e,t;(e=f.Z.getApiClient(a),t=r,Promise.resolve().then(i.bind(i,58104)).then((function(i){i.default.cancelTimerWithConfirmation(t,e.serverId())}))).then((function(){g(!0)}))})),y.querySelector("form").addEventListener("submit",v),function(e,t){c.ZP.show(),r=t,f.Z.getApiClient(a).getLiveTvTimer(t).then((function(t){!function(e,t){e.querySelector("#txtPrePaddingMinutes").value=t.PrePaddingSeconds/60,e.querySelector("#txtPostPaddingMinutes").value=t.PostPaddingSeconds/60,c.ZP.hide()}(e,t),c.ZP.hide()}))}(P,e),l.default.open(P)}))}}},47249:function(e,t,i){var n=i(54933),r=i.n(n),a=i(93476),o=i.n(a)()(r());o.push([e.id,".recordingDialog-imageContainer{-webkit-flex-shrink:0;flex-shrink:0;padding:1em 1em 1em 0;width:25%}.recordingDialog-img{width:100%}.recordingDialog-itemName{margin-top:.7em}.recordingDetailsContainer{display:-webkit-flex;display:flex}.recordingDetails{-webkit-flex-grow:1;flex-grow:1}.recordingDetailText{-webkit-align-items:center;align-items:center;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap}",""]),t.Z=o},43734:function(e,t,i){var n=i(1892),r=i.n(n),a=i(95760),o=i.n(a),l=i(38311),s=i.n(l),d=i(58192),c=i.n(d),u=i(38060),f=i.n(u),m=i(54865),g=i.n(m),v=i(47249),b={};b.styleTagTransform=g(),b.setAttributes=c(),b.insert=s().bind(null,"head"),b.domAPI=o(),b.insertStyleElement=f(),r()(v.Z,b),v.Z&&v.Z.locals&&v.Z.locals}}]);