"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[7485],{7485:(B,r,i)=>{i.r(r),i.d(r,{SettingsPageModule:()=>y});var d=i(6895),m=i(4006),s=i(8008),c=i(9383),p=i(9832),v=i(529),h=i(3324),u=i(7582),f=i(4101),t=i(4650),S=i(946),T=i(452),Z=i(205),A=i(5362),C=i(9509);function P(n,o){if(1&n&&(t.TgZ(0,"ion-select-option",7),t._uU(1),t.qZA()),2&n){const e=o.$implicit;t.Q6J("value",e.value),t.xp6(1),t.hij(" ",e.title," ")}}const L=function(n){return{subHeader:n}},N=[{path:"",component:(()=>{class n{constructor(e,a,g,l,I,E,G){this._config=e,this._platform=a,this._settings=g,this._taptic=l,this._navCtrl=I,this._log=E,this._appVersion=G,this.langOptions=[{title:"\u4e2d\u6587",value:"zh"},{title:"English",value:"en"}]}ngOnInit(){this._config.init(()=>{this.lang=this._config.getLang(),this.langSubHeader=this._config.translate.instant("SETTINGS.LANG_SUB_HEADER")}),this._settings.init(()=>{this.settings=this._settings.data}),this._platform.ready().then(()=>(0,u.mG)(this,void 0,void 0,function*(){this.version=(0,f.L1)()?"DEBUG":yield this._appVersion.getVersionNumber()}))}dismiss(){this._taptic.impactOpenPage(),this._navCtrl.back()}handleLangChange(e){return(0,u.mG)(this,void 0,void 0,function*(){this._log.send({event:"i18n",type:"click",ref:"settings",misc:e.detail.value}),yield this._config.setLanguage(e.detail.value)})}handleInsomnicChange(e){this._log.send({event:"insomnic",type:"click",ref:"settings",misc:e.detail.checked}),this._settings.save({insomnic:e.detail.checked})}handleRememberLastBgmChange(e){this._log.send({event:"rememberLastBgm",type:"click",ref:"settings",misc:e.detail.checked}),this._settings.save({rememberLastBgm:e.detail.checked})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(S.E),t.Y36(s.t4),t.Y36(T.g),t.Y36(Z.u),t.Y36(s.SH),t.Y36(A.$),t.Y36(C.b))},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-settings"]],decls:29,vars:25,consts:[["slot","start"],["fill","clear",3,"click"],[1,"text-icon-back"],["slot","end",3,"value","interfaceOptions","okText","cancelText","ionChange"],[3,"value",4,"ngFor","ngForOf"],["slot","end",3,"checked","ionChange"],["slot","end"],[3,"value"]],template:function(e,a){1&e&&(t.TgZ(0,"ion-header")(1,"ion-toolbar")(2,"ion-buttons",0)(3,"ion-button",1),t.NdJ("click",function(){return a.dismiss()}),t.TgZ(4,"span",2),t._uU(5,"<"),t.qZA()()(),t.TgZ(6,"ion-title"),t._uU(7),t.ALo(8,"translate"),t.qZA()()(),t.TgZ(9,"ion-content")(10,"ion-item")(11,"ion-label"),t._uU(12),t.ALo(13,"translate"),t.qZA(),t.TgZ(14,"ion-select",3),t.NdJ("ionChange",function(l){return a.handleLangChange(l)}),t.ALo(15,"translate"),t.ALo(16,"translate"),t.YNc(17,P,2,2,"ion-select-option",4),t.qZA()(),t.TgZ(18,"ion-item")(19,"ion-label"),t._uU(20),t.ALo(21,"translate"),t.qZA(),t.TgZ(22,"ion-toggle",5),t.NdJ("ionChange",function(l){return a.handleInsomnicChange(l)}),t.qZA()(),t.TgZ(23,"ion-item")(24,"ion-label"),t._uU(25),t.ALo(26,"translate"),t.qZA(),t.TgZ(27,"ion-label",6),t._uU(28),t.qZA()()()),2&e&&(t.xp6(7),t.Oqu(t.lcZ(8,11,"SETTINGS.TITLE")),t.xp6(5),t.Oqu(t.lcZ(13,13,"SETTINGS.LANG")),t.xp6(2),t.Q6J("value",a.lang)("interfaceOptions",t.VKq(23,L,a.langSubHeader))("okText",t.lcZ(15,15,"OK"))("cancelText",t.lcZ(16,17,"CANCEL")),t.xp6(3),t.Q6J("ngForOf",a.langOptions),t.xp6(3),t.Oqu(t.lcZ(21,19,"SETTINGS.INSOMNIC")),t.xp6(2),t.Q6J("checked",null==a.settings?null:a.settings.insomnic),t.xp6(3),t.Oqu(t.lcZ(26,21,"SETTINGS.VERSION")),t.xp6(3),t.Oqu(a.version))},dependencies:[d.sg,s.YG,s.Sm,s.W2,s.Gu,s.Ie,s.Q$,s.t9,s.n0,s.wd,s.ho,s.sr,s.w,s.QI,c.X$],styles:["ion-content[_ngcontent-%COMP%]{--padding-top: var(--pd);--padding-bottom: calc(var(--ion-safe-area-bottom, 0) + var(--pd))}"]}),n})()}];let O=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=t.oAB({type:n}),n.\u0275inj=t.cJS({imports:[h.Bz.forChild(N),h.Bz]}),n})(),y=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=t.oAB({type:n}),n.\u0275inj=t.cJS({imports:[d.ez,m.u5,s.Pc,O,c.aw.forChild({loader:{provide:c.Zw,useFactory:o=>new p.w(o),deps:[v.eN]}})]}),n})()}}]);