{"version":3,"file":"chunk-co5wfdbu.js","sources":["packages/vanilla/lib/features/header/src/icon/icon.html","packages/vanilla/lib/features/header/src/icon/icon.component.ts"],"sourcesContent":["@if (useFastIconType === true) {\n \n} @else {\n \n}\n","import { CommonModule } from '@angular/common';\nimport { AfterViewInit, Component, ElementRef, OnDestroy } from '@angular/core';\n\nimport { EventsService, SimpleEvent, VanillaEventNames } from '@frontend/vanilla/core';\nimport { MenuItemComponent } from '@frontend/vanilla/features/menus';\nimport { Subject } from 'rxjs';\nimport { filter, takeUntil } from 'rxjs/operators';\n\nimport { HeaderItemBase } from '../header-item-base';\n\n@Component({\n standalone: true,\n imports: [CommonModule, MenuItemComponent],\n selector: 'vn-h-icon',\n templateUrl: 'icon.html',\n})\nexport class IconComponent extends HeaderItemBase implements AfterViewInit, OnDestroy {\n private unsubscribe = new Subject();\n constructor(\n private eventsService: EventsService,\n private elementRef: ElementRef,\n ) {\n super();\n }\n\n ngAfterViewInit(): void {\n this.eventsService.allEvents\n .pipe(\n takeUntil(this.unsubscribe),\n filter((e: SimpleEvent) => e?.eventName === VanillaEventNames.TriggerAnimation),\n )\n .subscribe(() => {\n const imageDiv = this.elementRef.nativeElement.getElementsByClassName('image-icon');\n imageDiv[0]?.classList.add('image-icon--animate');\n });\n }\n\n ngOnDestroy() {\n this.unsubscribe.next(null);\n this.unsubscribe.complete();\n }\n}\n"],"names":["ɵɵtext","ɵɵelement","l","ɵɵadvance","ɵɵproperty","ctx_r0","item","MenuSection","Header","ctx_r1","IconComponent","HeaderItemBase","constructor","eventsService","elementRef","unsubscribe","Subject","ngAfterViewInit","allEvents","pipe","takeUntil","filter","e","eventName","VanillaEventNames","TriggerAnimation","subscribe","nativeElement","getElementsByClassName","classList","add","ngOnDestroy","next","complete","ɵɵdirectiveInject","EventsService","ElementRef","selectors","standalone","features","ɵɵInheritDefinitionFeature","ɵɵStandaloneFeature","decls","vars","consts","template","rf","ctx","ɵɵtemplate","IconComponent_Conditional_0_Template","IconComponent_Condit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