"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[59595],{59595:(e,n,r)=>{r.r(n),r.d(n,{CoreViewerQRScannerComponent:()=>R});var o=r(10467),t=r(86654),a=r(49588),c=r(25572),i=r(68831),l=r(79555),s=r(54438),p=r(2910),C=r(86198),u=r(88246),d=r(43570),m=r(73955);let R=(()=>{var e;class CoreViewerQRScannerComponent{ngOnInit(){var e=this;return(0,o.A)((function*(){e.title=e.title||l.HT.instant("core.scanqr");try{let n=yield i.CoreQRScan.startScanQR();n="string"==typeof n?n.trim():"",e.closeModal(n)}catch(n){a.CoreErrorHelper.isCanceledError(n)||(c.CoreAlerts.showError(n,{default:"An error occurred."}),i.CoreQRScan.stopScanQR()),e.closeModal()}}))()}cancel(){i.CoreQRScan.stopScanQR()}closeModal(e){l.W3.dismiss(e)}ngOnDestroy(){i.CoreQRScan.stopScanQR()}}return(e=CoreViewerQRScannerComponent).ɵfac=function CoreViewerQRScannerComponent_Factory(n){return new(n||e)},e.ɵcmp=s.VBU({type:e,selectors:[["core-viewer-qr-scanner"]],inputs:{title:"title"},standalone:!0,features:[s.aNF],decls:10,vars:4,consts:[["slot","end"],["fill","clear",3,"click","ariaLabel"],["name","fas-xmark","slot","icon-only","aria-hidden","true"]],template:function CoreViewerQRScannerComponent_Template(e,n){1&e&&(s.j41(0,"ion-header")(1,"ion-toolbar")(2,"ion-title")(3,"h1"),s.EFF(4),s.k0s()(),s.j41(5,"ion-buttons",0)(6,"ion-button",1),s.nI1(7,"translate"),s.bIt("click",(function CoreViewerQRScannerComponent_Template_ion_button_click_6_listener(){return n.closeModal()})),s.nrm(8,"ion-icon",2),s.k0s()()()(),s.nrm(9,"ion-content")),2&e&&(s.R7$(4),s.JRh(n.title),s.R7$(2),s.Y8G("ariaLabel",s.bMT(7,2,"core.close")))},dependencies:[t.n,p.Jm,p.QW,p.W9,p.eU,p.iq,p.BC,p.ai,C.t,u.i,d.T,m.D9],encapsulation:2}),CoreViewerQRScannerComponent})()}}]);