"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[43743],{43743:(e,t,n)=>{n.r(t),n.d(t,{default:()=>g});var a=n(10467),i=n(24813),o=n(21604),l=n(43959),d=n(86654),s=n(54438),r=n(60177),u=n(89417),c=n(2910),m=n(88246),f=n(73955);function AddonCalendarSettingsPage_ion_item_11_Template(e,t){if(1&e){const e=s.RV6();s.j41(0,"ion-item")(1,"ion-select",3),s.nI1(2,"translate"),s.mxI("ngModelChange",(function AddonCalendarSettingsPage_ion_item_11_Template_ion_select_ngModelChange_1_listener(t){s.eBV(e);const n=s.XpG();return s.DH7(n.defaultTimeLabel,t)||(n.defaultTimeLabel=t),s.Njj(t)})),s.bIt("click",(function AddonCalendarSettingsPage_ion_item_11_Template_ion_select_click_1_listener(t){s.eBV(e);const n=s.XpG();return s.Njj(n.changeDefaultTime(t))})),s.j41(3,"ion-select-option",4),s.EFF(4),s.k0s()()()}if(2&e){const e=s.XpG();s.R7$(),s.R50("ngModel",e.defaultTimeLabel),s.Y8G("label",s.bMT(2,4,"addon.calendar.defaultnotificationtime")),s.R7$(2),s.Y8G("value",e.defaultTimeLabel),s.R7$(),s.JRh(e.defaultTimeLabel)}}let g=(()=>{var e;class AddonCalendarSettingsPage{constructor(){this.defaultTimeLabel=""}ngOnInit(){var e=this;return(0,a.A)((function*(){e.updateDefaultTimeLabel()}))()}changeDefaultTime(e){var t=this;return(0,a.A)((function*(){var a;e.stopPropagation(),e.stopImmediatePropagation(),e.preventDefault();const{CoreRemindersSetReminderMenuComponent:d}=yield n.e(64260).then(n.bind(n,64260)),s=yield i.CorePopovers.open({component:d,componentProps:{initialValue:t.defaultTime,noReminderLabel:"core.settings.disabled"},event:e});void 0!==s&&(yield o.CoreReminders.setDefaultNotificationTime(null!==(a=s.timeBefore)&&void 0!==a?a:l.Nc),t.updateDefaultTimeLabel())}))()}updateDefaultTimeLabel(){var e=this;return(0,a.A)((function*(){e.defaultTime=yield o.CoreReminders.getDefaultNotificationTime();const t=o.CoreRemindersService.convertSecondsToValueAndUnit(e.defaultTime);e.defaultTimeLabel=o.CoreReminders.getUnitValueLabel(t.value,t.unit)}))()}}return(e=AddonCalendarSettingsPage).ɵfac=function AddonCalendarSettingsPage_Factory(t){return new(t||e)},e.ɵcmp=s.VBU({type:e,selectors:[["page-addon-calendar-settings"]],standalone:!0,features:[s.aNF],decls:12,vars:7,consts:[["slot","start"],[3,"text"],[4,"ngIf"],[3,"ngModelChange","click","ngModel","label"],[3,"value"]],template:function AddonCalendarSettingsPage_Template(e,t){1&e&&(s.j41(0,"ion-header")(1,"ion-toolbar")(2,"ion-buttons",0),s.nrm(3,"ion-back-button",1),s.nI1(4,"translate"),s.k0s(),s.j41(5,"ion-title")(6,"h1"),s.EFF(7),s.nI1(8,"translate"),s.k0s()()()(),s.j41(9,"ion-content")(10,"ion-list"),s.DNE(11,AddonCalendarSettingsPage_ion_item_11_Template,5,6,"ion-item",2),s.k0s()()),2&e&&(s.R7$(3),s.Y8G("text",s.bMT(4,3,"core.back")),s.R7$(4),s.JRh(s.bMT(8,5,"core.settings.settings")),s.R7$(4),s.Y8G("ngIf",t.defaultTimeLabel))},dependencies:[d.n,r.bT,u.BC,u.vS,c.QW,c.W9,c.eU,c.uz,c.nf,c.Nm,c.Ip,c.BC,c.ai,c.Je,c.el,m.i,f.D9],encapsulation:2}),AddonCalendarSettingsPage})()}}]);