{ "version": 3, "sources": ["src/app/layout/components/language-menu/language-menu.component.ts", "src/app/layout/components/language-menu/language-menu.component.html"], "sourcesContent": ["import { Component, ViewEncapsulation, ChangeDetectionStrategy, inject, computed } from '@angular/core';\r\nimport { LanguagesService, Language } from '@shared/services/languages/languages.service';\r\n\r\nimport { MatMenuModule } from '@angular/material/menu';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { FlagComponent } from '@shared/components/flag/flag.component';\r\nimport { Platform } from '@angular/cdk/platform';\r\nimport { MetadataService } from 'app/shared/services/meta-data-service/meta-data.service';\r\n@Component({\r\n selector: 'language-menu',\r\n standalone: true,\r\n imports: [\r\n MatMenuModule,\r\n MatButtonModule,\r\n FlagComponent\r\n],\r\n templateUrl: './language-menu.component.html',\r\n styleUrls: ['./language-menu.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class LanguageMenuComponent {\r\n languages = computed(() => {\r\n return this.languagesService.getLanguages().map(l => {\r\n const altLang = this.metaDataService.alternateLangs().find(al => al.lang === l.code);\r\n return {\r\n flag: l.code.replace('en', 'us'),\r\n url: `/${l.code}${altLang ? (altLang.path ? altLang.path: altLang?.basePath) :'/online-fair'}`,\r\n name: l.name\r\n }\r\n });\r\n });\r\n\r\n selectedLanguage: Language;\r\n metaDataService = inject(MetadataService);\r\n constructor(\r\n private languagesService: LanguagesService,\r\n public platform: Platform,\r\n ) {\r\n this.selectedLanguage = languagesService.getCurrentLang();\r\n }\r\n}\r\n", "\r\n\r\n\r\n @for (lang of languages(); track $index) {\r\n \r\n
\r\n \r\n {{lang.name}}\r\n
\r\n
\r\n }\r\n
\r\n"], "mappings": "8cCMIA,EAAA,EAAA,IAAA,CAAA,EAAmC,EAAA,MAAA,CAAA,EAE/BC,EAAA,EAAA,OAAA,CAAA,EACAD,EAAA,EAAA,OAAA,CAAA,EAA6BE,EAAA,CAAA,EAAaC,EAAA,EAAO,EAC7C,0BAJSC,EAA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EAAA,SAAA,CAAA,EACEC,EAAA,EAAA,OAAA,CAAA,EACFE,EAAA,EAEAH,EAAA,EAAA,WAAA,EAAA,CAAA,EACEgD,EAAA,EAAAC,EAAA,EAAA,EAAA,IAAA,EAAAC,CAAA,EAQF/C,EAAA,mBAbgCC,EAAA,oBAAA+C,CAAA,EACV3C,EAAA,EAAAJ,EAAA,cAAA2C,EAAAd,iBAAAxB,IAAA,EAGYD,EAAA,EAAAJ,EAAA,iBAAA,EAAA,EAChCI,EAAA,CAAA,EAAA4C,EAAAL,EAAA/B,UAAA,CAAW,kBDOTqC,EAAaC,EAAAC,EAAAC,EACbC,EAAeC,EACfC,CAAa,EAAAC,OAAA,CAAA;;CAAA,EAAAC,cAAA,EAAAC,gBAAA,CAAA,CAAA,EAOX,IAAOlD,EAAPmD,SAAOnD,CAAqB,GAAA", "names": ["\u0275\u0275elementStart", "\u0275\u0275element", "\u0275\u0275text", "\u0275\u0275elementEnd", "\u0275\u0275property", "lang_r1", "url", "\u0275\u0275sanitizeUrl", "\u0275\u0275advance", "flag", "\u0275\u0275textInterpolate", "name", "LanguageMenuComponent", "constructor", "languagesService", "platform", "languages", "computed", "getLanguages", "map", "l", "altLang", "metaDataService", "alternateLangs", "find", "al", "lang", "code", "replace", "path", "basePath", "inject", "MetadataService", "selectedLanguage", "getCurrentLang", "\u0275\u0275directiveInject", "LanguagesService", "Platform", "selectors", "standalone", "features", "\u0275\u0275StandaloneFeature", "decls", "vars", "consts", "template", "rf", "ctx", "\u0275\u0275repeaterCreate", "LanguageMenuComponent_For_5_Template", "\u0275\u0275repeaterTrackByIndex", "languageMenu_r2", "\u0275\u0275repeater", "MatMenuModule", "MatMenu", "MatMenuItem", "MatMenuTrigger", "MatButtonModule", "MatButton", "FlagComponent", "styles", "encapsulation", "changeDetection", "_LanguageMenuComponent"] }