{ "version": 3, "sources": ["project/src/app/common/components/icon/icon.component.ts", "project/src/app/common/components/icon/icon.component.html"], "sourcesContent": ["import { ChangeDetectionStrategy, Component, ElementRef, HostBinding, Input, OnChanges } from '@angular/core';\n\nimport { SimpleChanges } from '@models/simple-changes.model';\n\n@Component({\n selector: 'app-icon',\n standalone: true,\n templateUrl: './icon.component.html',\n styleUrls: ['./icon.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class IconComponent implements OnChanges {\n @Input() icon: string;\n @Input() color: string;\n @Input() ariaLabel: string;\n @Input() size: number;\n\n @HostBinding('class.color-inherited')\n @Input()\n colorInherit = false;\n\n constructor(private elementRef: ElementRef) {}\n\n private readonly defaultIconText = 'Please provide name for this icon';\n\n public get element(): HTMLElement {\n return this.elementRef.nativeElement;\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.icon && changes.icon.currentValue) {\n this.handleIconChanges(changes.icon.currentValue as string);\n }\n if (changes.color?.currentValue) {\n this.element.style.color = this.color;\n }\n if (changes.size?.currentValue) {\n this.element.style.width = `${this.size}px`;\n this.element.style.height = `${this.size}px`;\n }\n }\n\n private handleIconChanges(iconName: string): void {\n if (iconName === this.defaultIconText || !iconName) {\n this.icon = 'image-lib';\n }\n }\n}\n", "\n \n\n"], "mappings": "iIAWA,IAAaA,GAAa,IAAA,CAApB,MAAOA,CAAa,CAUxBC,YAAoBC,EAAsB,CAAtB,KAAAA,WAAAA,EAFpB,KAAAC,aAAe,GAIE,KAAAC,gBAAkB,mCAFU,CAI7C,IAAWC,SAAO,CAChB,OAAO,KAAKH,WAAWI,aACzB,CAEAC,YAAYC,EAA4B,CAClCA,EAAQC,MAAQD,EAAQC,KAAKC,cAC/B,KAAKC,kBAAkBH,EAAQC,KAAKC,YAAsB,EAExDF,EAAQI,OAAOF,eACjB,KAAKL,QAAQQ,MAAMD,MAAQ,KAAKA,OAE9BJ,EAAQM,MAAMJ,eAChB,KAAKL,QAAQQ,MAAME,MAAQ,GAAG,KAAKD,IAAI,KACvC,KAAKT,QAAQQ,MAAMG,OAAS,GAAG,KAAKF,IAAI,KAE5C,CAEQH,kBAAkBM,EAAgB,EACpCA,IAAa,KAAKb,iBAAmB,CAACa,KACxC,KAAKR,KAAO,YAEhB,iDAnCWT,GAAakB,EAAAC,CAAA,CAAA,CAAA,CAAA,+BAAbnB,EAAaoB,UAAA,CAAA,CAAA,UAAA,CAAA,EAAAC,SAAA,EAAAC,aAAA,SAAAC,EAAAC,EAAA,CAAAD,EAAA,GAAbE,EAAA,kBAAAD,EAAArB,YAAA,yMCXbuB,EAAA,EAAA,MAAA,CAAA,EACEC,EAAA,EAAA,KAAA,EACFC,EAAA,SADOC,EAAA;sFDUM7B,CAAa,GAAA", "names": ["IconComponent", "constructor", "elementRef", "colorInherit", "defaultIconText", "element", "nativeElement", "ngOnChanges", "changes", "icon", "currentValue", "handleIconChanges", "color", "style", "size", "width", "height", "iconName", "\u0275\u0275directiveInject", "ElementRef", "selectors", "hostVars", "hostBindings", "rf", "ctx", "\u0275\u0275classProp", "\u0275\u0275elementStart", "\u0275\u0275element", "\u0275\u0275elementEnd", "\u0275\u0275advance"] }