{"version":3,"sources":["src/app/services/full-screen-dialog.service.ts"],"sourcesContent":["import { inject, Injectable } from '@angular/core';\nimport { NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap';\nimport { ThemeService } from './theme.service';\n\n@Injectable({\n providedIn: 'root'\n})\n\n\nexport class FullScreenDialogService extends NgbModal {\n private currentModal: NgbModalRef | null = null\n\n private themeService = inject(ThemeService)\n\n constructor() {\n super()\n window.addEventListener('popstate', () => {\n if (this.currentModal) {\n this.currentModal.close();\n this.currentModal = null;\n }\n })\n }\n\n override open(content: any, options: any = {}) {\n if (!window.location.href.includes('#modal')) {\n window.history.pushState(null, '', window.location.href + '#modal')\n }\n document.documentElement.setAttribute('data-bs-theme', 'light')\n this, this.currentModal = super.open(content, options)\n this.currentModal.result.finally(() => {\n if (this.currentModal) {\n this.currentModal = null\n window.history.back()\n }\n this.themeService.setTheme(this.themeService.storedTheme)\n })\n return this.currentModal\n }\n}\n"],"names":["FullScreenDialogService","NgbModal","currentModal","themeService","inject","ThemeService","constructor","window","addEventListener","close","open","content","options","location","href","includes","history","pushState","document","documentElement","setAttribute","result","finally","back","setTheme","storedTheme","factory","ɵfac","providedIn"],"mappings":";;iIASA,IAAaA,GAAwB,IAAA,CAA/B,MAAOA,UAAgCC,CAAQ,CAC3CC,aAAmC,KAEnCC,aAAeC,EAAOC,CAAY,EAE1CC,aAAA,CACE,MAAK,EACLC,OAAOC,iBAAiB,WAAY,IAAK,CACnC,KAAKN,eACP,KAAKA,aAAaO,MAAK,EACvB,KAAKP,aAAe,KAExB,CAAC,CACH,CAESQ,KAAKC,EAAcC,EAAe,CAAA,EAAE,CAC3C,OAAKL,OAAOM,SAASC,KAAKC,SAAS,QAAQ,GACzCR,OAAOS,QAAQC,UAAU,KAAM,GAAIV,OAAOM,SAASC,KAAO,QAAQ,EAEpEI,SAASC,gBAAgBC,aAAa,gBAAiB,OAAO,EACxD,KAAKlB,aAAe,MAAMQ,KAAKC,EAASC,CAAO,EACrD,KAAKV,aAAamB,OAAOC,QAAQ,IAAK,CAChC,KAAKpB,eACP,KAAKA,aAAe,KACpBK,OAAOS,QAAQO,KAAI,GAErB,KAAKpB,aAAaqB,SAAS,KAAKrB,aAAasB,WAAW,CAC1D,CAAC,EACM,KAAKvB,YACd,4CA7BWF,EAAuB,6BAAvBA,EAAuB0B,QAAvB1B,EAAuB2B,UAAAC,WAJtB,MAAM,CAAA,SAIP5B,CAAwB,GAAA","debug_id":"ef996049-7ec1-5150-aacc-fb129f66f456"}