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B,qBAAqB,oBAAoB,sBAAsB,GAAG,iBAAiB,8CAA8C,+CAA+C,8CAA8C,4CAA4C,kDAAkD,GAAG,6CAA6C,iBAAiB,+DAA+D,8DAA8D,uBAAuB,kEAAkE,KAAK,GAAG,+BAA+B,kBAAkB,wBAAwB,GAAG,6CAA6C,iCAAiC,qBAAqB,0DAA0D,KAAK,GAAG,OAAO,gIAAgI,WAAW,KAAK,KAAK,UAAU,UAAU,WAAW,UAAU,WAAW,MAAM,KAAK,WAAW,WAAW,WAAW,WAAW,WAAW,KAAK,KAAK,KAAK,WAAW,WAAW,WAAW,WAAW,KAAK,KAAK,KAAK,UAAU,WAAW,KAAK,KAAK,KAAK,UAAU,WAAW,KAAK,yCAAyC,mBAAmB,gCAAgC,SAAS,uBAAuB,sBAAsB,2BAA2B,6BAA6B,4BAA4B,8BAA8B,SAAS,KAAK,qBAAqB,kDAAkD,mDAAmD,kDAAkD,gDAAgD,sDAAsD,uDAAuD,qEAAqE,oEAAoE,6BAA6B,wEAAwE,SAAS,6BAA6B,0BAA0B,gCAAgC,2DAA2D,+BAA+B,oEAAoE,aAAa,SAAS,KAAK,uBAAuB;AAC3/E;AACA","sources":["./src/app/modules/messages/components/message-item/message-item.component.ts","./src/app/modules/messages/components/message-list/message-list.component.ts","./src/app/modules/messages/message-routing.module.ts","./src/app/modules/messages/message.module.ts","./src/app/modules/messages/pages/message/message.component.ts","./src/app/shared/state/header-icon/header-icon.query.ts","./src/app/modules/messages/components/message-item/message-item.component.scss","./src/app/modules/messages/components/message-list/message-list.component.scss","./src/app/modules/messages/pages/message/message.component.scss"],"sourcesContent":["import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\r\nimport { Message } from '../../../../shared/state/message/message.model';\r\n\r\n@Component({\r\n selector: 'app-message-item',\r\n templateUrl: './message-item.component.html',\r\n styleUrls: ['./message-item.component.scss'],\r\n})\r\nexport class MessageItemComponent implements OnInit {\r\n @Input() message: Message;\r\n @Output() trashClickedEvent = new EventEmitter<Message>();\r\n @Output() messageClickedEvent = new EventEmitter<Message>();\r\n @Output() messageModalClickedEvent = new EventEmitter<Message>();\r\n constructor() {}\r\n\r\n ngOnInit(): void {}\r\n\r\n onTrashClicked(event: Event, message: Message) {\r\n event.preventDefault();\r\n event.cancelBubble = true;\r\n this.trashClickedEvent.emit(message);\r\n }\r\n\r\n onMessageClicked(message: Message) {\r\n this.messageClickedEvent.emit(message);\r\n }\r\n\r\n onMessageModalClicked(message: Message, responsive: boolean) {\r\n if (window.innerWidth > 768 && responsive) {\r\n return;\r\n }\r\n this.messageModalClickedEvent.emit(message);\r\n }\r\n}\r\n","import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\r\nimport { Message } from '../../../../shared/state/message/message.model';\r\n\r\n@Component({\r\n selector: 'app-message-list',\r\n templateUrl: './message-list.component.html',\r\n styleUrls: ['./message-list.component.scss'],\r\n})\r\nexport class MessageListComponent implements OnInit {\r\n @Input() messages: Message[];\r\n @Output() messageTrashClickedEvent = new EventEmitter<Message>();\r\n @Output() messageClickedEvent = new EventEmitter<Message>();\r\n @Output() messageModalClickedEvent = new EventEmitter<Message>();\r\n constructor() {}\r\n\r\n ngOnInit(): void {}\r\n\r\n onMessageTrashClicked(message: Message) {\r\n this.messageTrashClickedEvent.emit(message);\r\n }\r\n\r\n onMessageClicked(message: Message) {\r\n this.messageClickedEvent.emit(message);\r\n }\r\n\r\n onMessageModalClickedEvent(message: Message) {\r\n this.messageModalClickedEvent.emit(message);\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { Routes, RouterModule } from '@angular/router';\r\n\r\nimport { MessageComponent } from './pages/message/message.component';\r\n\r\nconst routes: Routes = [{ path: '', component: MessageComponent }];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule],\r\n})\r\nexport class MessageRoutingModule {}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\n\r\nimport { MessageRoutingModule } from './message-routing.module';\r\nimport { MessageComponent } from './pages/message/message.component';\r\nimport { IonicModule } from '@ionic/angular';\r\nimport { SharedModule } from '../../shared/shared.module';\r\nimport { MessageListComponent } from './components/message-list/message-list.component';\r\nimport { MessageItemComponent } from './components/message-item/message-item.component';\r\n\r\n@NgModule({\r\n declarations: [\r\n MessageComponent,\r\n MessageListComponent,\r\n MessageItemComponent,\r\n ],\r\n imports: [CommonModule, MessageRoutingModule, IonicModule, SharedModule],\r\n})\r\nexport class MessageModule {}\r\n","import { Component, OnInit } from '@angular/core';\r\nimport { Observable } from 'rxjs';\r\nimport { ClinicQuery } from '../../../../shared/state/clinic/clinic.query';\r\nimport { UserState } from '../../../../shared/state/user/user.store';\r\nimport { UserQuery } from '../../../../shared/state/user/user.query';\r\nimport { MessageState } from '../../../../shared/state/message/message.store';\r\nimport { getEntityType } from '@datorama/akita';\r\nimport { MessageQuery } from '../../../../shared/state/message/message.query';\r\nimport { MessageService } from '../../../../shared/state/message/message.service';\r\nimport { Message } from '../../../../shared/state/message/message.model';\r\nimport { AlertController, ModalController, NavController, Platform } from '@ionic/angular';\r\nimport { LibraryService } from '../../../../core/services/library/library.service';\r\nimport { Router } from '@angular/router';\r\nimport { SettingsQuery } from '../../../../shared/state/settings/settings.query';\r\nimport { ClinicDetailQuery } from '../../../../shared/state/clinic-detail/clinic-detail.query';\r\nimport { CompanyService } from 'src/app/shared/state/company/company.service';\r\nimport { SettingsService } from 'src/app/shared/state/settings/settings.service';\r\nimport { HeaderPictureQuery } from '../../../../shared/state/header-picture/header-picture.query';\r\nimport { HeaderBackgroundQuery } from '../../../../shared/state/header-background/header-background.query';\r\nimport { HeaderIconQuery } from '../../../../shared/state/header-icon/header-icon.query';\r\nimport { MessageDetailComponent } from 'src/app/modules/message-detail/pages/message-detail/message-detail.component';\r\n\r\n@Component({\r\n selector: 'app-message',\r\n templateUrl: './message.component.html',\r\n styleUrls: ['./message.component.scss'],\r\n})\r\n\r\n/**\r\n * TODO: Badge de mensajes\r\n */\r\nexport class MessageComponent implements OnInit {\r\n user$: Observable<UserState>;\r\n messages$: Observable<getEntityType<MessageState>[]>;\r\n isLoadingContent;\r\n headerPicture$;\r\n headerBackground$;\r\n headerIcon$;\r\n\r\n /** Flowwwer template */\r\n clinicName$: Observable<string>;\r\n showBackButtonHeader$: Observable<boolean>;\r\n\r\n constructor(\r\n private userQuery: UserQuery,\r\n private messageQuery: MessageQuery,\r\n private messageService: MessageService,\r\n private alertCtrl: AlertController,\r\n private libraryService: LibraryService,\r\n private router: Router,\r\n private settingsQuery: SettingsQuery,\r\n private clinicDetailQuery: ClinicDetailQuery,\r\n private companyService: CompanyService,\r\n private settingsService: SettingsService,\r\n private platform: Platform,\r\n private headerPictureQuery: HeaderPictureQuery,\r\n private headerBackgroundQuery: HeaderBackgroundQuery,\r\n private headerIconQuery: HeaderIconQuery,\r\n private clinicQuery: ClinicQuery,\r\n private navCtrl: NavController,\r\n private modalController: ModalController\r\n ) {}\r\n\r\n ngOnInit(): void {\r\n this.headerPicture$ = this.headerPictureQuery.select('messages');\r\n this.headerBackground$ = this.headerBackgroundQuery.select('messages');\r\n this.headerIcon$ = this.headerIconQuery.select('messages');\r\n this.user$ = this.userQuery.select();\r\n this.messages$ = this.messageQuery.selectAll();\r\n\r\n /** Flowwwer template */\r\n this.clinicName$ = this.clinicDetailQuery.select('commercialName');\r\n this.showBackButtonHeader$ = this.settingsQuery.selectShowBackButtonHeader();\r\n }\r\n\r\n async refreshMessages(event) {\r\n this.isLoadingContent = true;\r\n try {\r\n await this.messageService.getMessages(null);\r\n } catch (error) {\r\n this.isLoadingContent = false;\r\n }\r\n this.isLoadingContent = false;\r\n\r\n event.target.complete();\r\n }\r\n\r\n deleteMessage(message: Message) {\r\n this.showConfirmDelete(message);\r\n }\r\n\r\n showMessageDetails(message: Message) {\r\n this.router.navigate([\r\n this.settingsQuery.systemKeyURL +\r\n '/' +\r\n this.clinicDetailQuery.id +\r\n '/message-detail/' +\r\n message.id,\r\n ]);\r\n }\r\n\r\n async showMessageDetailsModal(message: Message) {\r\n const modal = await this.modalController.create({\r\n component: MessageDetailComponent,\r\n cssClass: this.settingsQuery.browser\r\n ? 'modal-flowwwer modal-browser'\r\n : 'modal-flowwwer',\r\n componentProps: {\r\n messageID: message.id,\r\n isModal: true,\r\n },\r\n });\r\n return await modal.present();\r\n }\r\n\r\n\r\n async showConfirmDelete(message: Message) {\r\n const alert = await this.alertCtrl.create({\r\n mode: this.platform.is('android') ? 'md' : 'ios',\r\n header: this.libraryService.getLabel('app_action_delete'),\r\n message: this.libraryService.getLabel(\r\n 'app_message_confirm_deletion'\r\n ),\r\n buttons: [\r\n {\r\n text: this.libraryService.getLabel('app_action_delete'),\r\n role: 'confirm',\r\n handler: () => {\r\n this.deleteAppointmentConfirmed(message.id);\r\n },\r\n },\r\n {\r\n text: this.libraryService.getLabel('app_action_cancel'),\r\n role: 'cancel',\r\n },\r\n ],\r\n });\r\n await alert.present();\r\n }\r\n\r\n deleteAppointmentConfirmed(messageId) {\r\n this.messageService.deleteMessage(messageId);\r\n }\r\n\r\n /** Flowwwer template */\r\n goHome(event) {\r\n event?.stopPropagation();\r\n /** Solo puedo volver atrás si no estoy en personalzas o si soy personalizada y tengo más de 1 centro */\r\n if (\r\n !this.settingsQuery.isPersonalized() ||\r\n this.clinicQuery.getValue().clinicsFound.length > 1\r\n ) {\r\n this.navCtrl.navigateBack(\r\n '/' +\r\n (this.settingsQuery.isPersonalized()\r\n ? this.settingsQuery.currentSystemKey\r\n : '')\r\n );\r\n }\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { Query } from '@datorama/akita';\r\nimport { HeaderIconStore, HeaderIconState } from './header-icon.store';\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class HeaderIconQuery extends Query<HeaderIconState> {\r\n\r\n constructor(protected store: HeaderIconStore) {\r\n super(store);\r\n }\r\n\r\n}\r\n","// Imports\nvar ___CSS_LOADER_API_SOURCEMAP_IMPORT___ = require(\"../../../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\");\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".message-item {\\n display: flex;\\n align-items: center;\\n position: relative;\\n padding: 25px 20px;\\n border: 1px solid #e4e4e4;\\n border-radius: 8px;\\n background-color: #ffffff;\\n}\\n.message-item.unread .title h3::after {\\n content: \\\"\\\";\\n position: relative;\\n display: inline-block;\\n top: -2px;\\n margin-left: 10px;\\n background-color: var(--ion-color-danger);\\n width: 5px;\\n height: 5px;\\n border-radius: 50%;\\n}\\n.message-item .message-content {\\n flex-grow: 1;\\n}\\n.message-item .message-content .title > h3 {\\n display: inline-block;\\n margin-bottom: 5px;\\n color: var(--ion-color-black);\\n font-size: 14px;\\n font-weight: 700;\\n line-height: 14px;\\n}\\n.message-item .message-content .title > p {\\n color: var(--ion-color-subtitules-base);\\n font-size: 12px;\\n font-weight: 500;\\n line-height: 14px;\\n}\\n.message-item .message-content .content {\\n margin-top: 22px;\\n color: var(--ion-color-subtitules-base);\\n font-size: 12px;\\n font-weight: 500;\\n line-height: 14px;\\n}\\n.message-item .action {\\n display: none;\\n cursor: pointer;\\n margin-left: auto;\\n margin-right: 46px;\\n font-weight: 700;\\n font-size: 16px;\\n line-height: 16px;\\n color: var(--ion-color-primary);\\n}\\n@media only screen and (min-width: 768px) {\\n .message-item .action {\\n display: block;\\n }\\n}\\n.message-item .delete {\\n margin-left: auto;\\n}\\n.message-item ion-button {\\n --color: #bfbfbf;\\n height: 50px;\\n width: 50px;\\n}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/app/modules/messages/components/message-item/message-item.component.scss\"],\"names\":[],\"mappings\":\"AAAA;EACI,aAAA;EACA,mBAAA;EACA,kBAAA;EACA,kBAAA;EAEA,yBAAA;EACA,kBAAA;EACA,yBAAA;AAAJ;AAQY;EACI,WAAA;EACA,kBAAA;EACA,qBAAA;EACA,SAAA;EACA,iBAAA;EACA,yCAAA;EACA,UAAA;EACA,WAAA;EACA,kBAAA;AANhB;AAWI;EACI,YAAA;AATR;AAWY;EACI,qBAAA;EACA,kBAAA;EAEA,6BAAA;EACA,eAAA;EACA,gBAAA;EACA,iBAAA;AAVhB;AAaY;EACI,uCAAA;EACA,eAAA;EACA,gBAAA;EACA,iBAAA;AAXhB;AAeQ;EACI,gBAAA;EAEA,uCAAA;EACA,eAAA;EACA,gBAAA;EACA,iBAAA;AAdZ;AAkBI;EACI,aAAA;EACA,eAAA;EACA,iBAAA;EACA,kBAAA;EACA,gBAAA;EACA,eAAA;EACA,iBAAA;EACA,+BAAA;AAhBR;AAkBQ;EAVJ;IAWQ,cAAA;EAfV;AACF;AAkBI;EACI,iBAAA;AAhBR;AAmBI;EACI,gBAAA;EAEA,YAAA;EACA,WAAA;AAlBR\",\"sourcesContent\":[\".message-item {\\r\\n display: flex;\\r\\n align-items: center;\\r\\n position: relative;\\r\\n padding: 25px 20px;\\r\\n\\r\\n border: 1px solid #e4e4e4;\\r\\n border-radius: 8px;\\r\\n background-color: #ffffff;\\r\\n\\r\\n @media only screen and (min-width: 768px) {\\r\\n \\r\\n }\\r\\n\\r\\n &.unread {\\r\\n .title {\\r\\n h3::after {\\r\\n content: '';\\r\\n position: relative;\\r\\n display: inline-block;\\r\\n top: -2px;\\r\\n margin-left: 10px;\\r\\n background-color: var(--ion-color-danger);\\r\\n width: 5px;\\r\\n height: 5px;\\r\\n border-radius: 50%;\\r\\n }\\r\\n }\\r\\n }\\r\\n\\r\\n .message-content {\\r\\n flex-grow: 1;\\r\\n .title {\\r\\n > h3 {\\r\\n display: inline-block;\\r\\n margin-bottom: 5px;\\r\\n\\r\\n color: var(--ion-color-black);\\r\\n font-size: 14px;\\r\\n font-weight: 700;\\r\\n line-height: 14px;\\r\\n }\\r\\n\\r\\n > p {\\r\\n color: var(--ion-color-subtitules-base);\\r\\n font-size: 12px;\\r\\n font-weight: 500;\\r\\n line-height: 14px;\\r\\n }\\r\\n }\\r\\n\\r\\n .content {\\r\\n margin-top: 22px;\\r\\n\\r\\n color: var(--ion-color-subtitules-base);\\r\\n font-size: 12px;\\r\\n font-weight: 500;\\r\\n line-height: 14px;\\r\\n }\\r\\n }\\r\\n\\r\\n .action {\\r\\n display: none;\\r\\n cursor: pointer;\\r\\n margin-left: auto;\\r\\n margin-right: 46px;\\r\\n font-weight: 700;\\r\\n font-size: 16px;\\r\\n line-height: 16px;\\r\\n color: var(--ion-color-primary);\\r\\n\\r\\n @media only screen and (min-width: 768px) {\\r\\n display: block;\\r\\n }\\r\\n }\\r\\n\\r\\n .delete {\\r\\n margin-left: auto;\\r\\n }\\r\\n\\r\\n ion-button {\\r\\n --color: #bfbfbf;\\r\\n\\r\\n height: 50px;\\r\\n width: 50px;\\r\\n }\\r\\n}\\r\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___.toString();\n","// Imports\nvar ___CSS_LOADER_API_SOURCEMAP_IMPORT___ = require(\"../../../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\");\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".messages-list {\\n display: flex;\\n flex-flow: column nowrap;\\n row-gap: 10px;\\n}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/app/modules/messages/components/message-list/message-list.component.scss\"],\"names\":[],\"mappings\":\"AAAA;EACE,aAAA;EACA,wBAAA;EACA,aAAA;AACF\",\"sourcesContent\":[\".messages-list {\\r\\n display: flex;\\r\\n flex-flow: column nowrap;\\r\\n row-gap: 10px;\\r\\n}\\r\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___.toString();\n","// Imports\nvar ___CSS_LOADER_API_SOURCEMAP_IMPORT___ = require(\"../../../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\");\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".toolbar-title app-title {\\n --line-size: 2.5rem;\\n}\\n.toolbar-title .subtitle {\\n margin: 0;\\n color: #9aabc3;\\n font-weight: 400;\\n font-size: 14px;\\n line-height: 18px;\\n}\\n\\nion-content {\\n --background: var(--ion-color-background);\\n --padding-start: var(--space-content-left);\\n --padding-end: var(--space-content-right);\\n --padding-top: var(--space-content-top);\\n --padding-bottom: var(--space-content-bottom);\\n}\\n@media only screen and (min-width: 768px) {\\n ion-content {\\n --padding-start: var(--space-content-left-medium-screen);\\n --padding-end: var(--space-content-right-medium-screen);\\n --padding-top: 0;\\n --padding-bottom: var(--space-content-bottom-medium-screen);\\n }\\n}\\nion-content .title-messages {\\n display: none;\\n margin-bottom: 60px;\\n}\\n@media only screen and (min-width: 768px) {\\n ion-content .title-messages {\\n display: block;\\n padding-top: var(--space-content-top-medium-screen);\\n }\\n}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/app/modules/messages/pages/message/message.component.scss\"],\"names\":[],\"mappings\":\"AACI;EACI,mBAAA;AAAR;AAGI;EACI,SAAA;EACA,cAAA;EACA,gBAAA;EACA,eAAA;EACA,iBAAA;AADR;;AAKA;EACI,yCAAA;EACA,0CAAA;EACA,yCAAA;EACA,uCAAA;EACA,6CAAA;AAFJ;AAII;EAPJ;IAQQ,wDAAA;IACA,uDAAA;IACA,gBAAA;IACA,2DAAA;EADN;AACF;AAGI;EACI,aAAA;EACA,mBAAA;AADR;AAGQ;EAJJ;IAKQ,cAAA;IACA,mDAAA;EAAV;AACF\",\"sourcesContent\":[\".toolbar-title {\\r\\n app-title {\\r\\n --line-size: 2.5rem;\\r\\n }\\r\\n\\r\\n .subtitle {\\r\\n margin: 0;\\r\\n color: #9aabc3;\\r\\n font-weight: 400;\\r\\n font-size: 14px;\\r\\n line-height: 18px;\\r\\n }\\r\\n}\\r\\n\\r\\nion-content {\\r\\n --background: var(--ion-color-background);\\r\\n --padding-start: var(--space-content-left);\\r\\n --padding-end: var(--space-content-right);\\r\\n --padding-top: var(--space-content-top);\\r\\n --padding-bottom: var(--space-content-bottom);\\r\\n\\r\\n @media only screen and (min-width: 768px) {\\r\\n --padding-start: var(--space-content-left-medium-screen);\\r\\n --padding-end: var(--space-content-right-medium-screen);\\r\\n --padding-top: 0;\\r\\n --padding-bottom: var(--space-content-bottom-medium-screen);\\r\\n }\\r\\n\\r\\n .title-messages {\\r\\n display: none;\\r\\n margin-bottom: 60px;\\r\\n\\r\\n @media only screen and (min-width: 768px) {\\r\\n display: block;\\r\\n padding-top: var(--space-content-top-medium-screen);\\r\\n }\\r\\n }\\r\\n}\\r\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___.toString();\n"],"names":["Component","EventEmitter","Input","Output","MessageItemComponent","constructor","ngOnInit","onTrashClicked","event","message","preventDefault","cancelBubble","trashClickedEvent","emit","onMessageClicked","messageClickedEvent","onMessageModalClicked","responsive","window","innerWidth","messageModalClickedEvent","selector","template","MessageListComponent","onMessageTrashClicked","messageTrashClickedEvent","onMessageModalClickedEvent","NgModule","RouterModule","MessageComponent","routes","path","component","MessageRoutingModule","imports","forChild","exports","CommonModule","IonicModule","SharedModule","MessageModule","declarations","ClinicQuery","UserQuery","MessageQuery","MessageService","AlertController","ModalController","NavController","Platform","LibraryService","Router","SettingsQuery","ClinicDetailQuery","CompanyService","SettingsService","HeaderPictureQuery","HeaderBackgroundQuery","HeaderIconQuery","MessageDetailComponent","userQuery","messageQuery","messageService","alertCtrl","libraryService","router","settingsQuery","clinicDetailQuery","companyService","settingsService","platform","headerPictureQuery","headerBackgroundQuery","headerIconQuery","clinicQuery","navCtrl","modalController","headerPicture$","select","headerBackground$","headerIcon$","user$","messages$","selectAll","clinicName$","showBackButtonHeader$","selectShowBackButtonHeader","refreshMessages","isLoadingContent","getMessages","error","target","complete","deleteMessage","showConfirmDelete","showMessageDetails","navigate","systemKeyURL","id","showMessageDetailsModal","modal","create","cssClass","browser","componentProps","messageID","isModal","present","alert","mode","is","header","getLabel","buttons","text","role","handler","deleteAppointmentConfirmed","messageId","goHome","stopPropagation","isPersonalized","getValue","clinicsFound","length","navigateBack","currentSystemKey","Injectable","Query","HeaderIconStore","store","providedIn"],"sourceRoot":"webpack:///","x_google_ignoreList":[]}