{"version":3,"file":"bloomreach-brie-icon.mjs","sources":["../../../../projects/brie/icon/models/icon.ts","../../../../projects/brie/icon/components/icon.component.ts","../../../../projects/brie/icon/components/icon.component.html","../../../../projects/brie/icon/icon.module.ts","../../../../projects/brie/icon/public-api.ts","../../../../projects/brie/icon/bloomreach-brie-icon.ts"],"sourcesContent":["/*\n * Copyright 2025-2026 Bloomreach. All rights reserved. (https://www.bloomreach.com/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *  https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport enum BrieIconType {\n  MATERIAL = 'material',\n  BASE64 = 'base64',\n}\n\n// Those values reflects with icon size styles\nexport enum BrieIconSize {\n  XS = 'xs',\n  SM = 'sm',\n  MD = 'md',\n  LG = 'lg',\n  XL = 'xl',\n  XXL = 'xxl',\n}\n\nexport interface BrieIcon {\n  name: string;\n  fontSet?: string;\n  size?: BrieIconSize;\n  type?: BrieIconType;\n  tooltip?: string;\n  style?: string;\n}\n","/*\n * Copyright 2025-2026 Bloomreach. All rights reserved. (https://www.bloomreach.com/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *  https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Component, ElementRef, HostBinding, Input, ChangeDetectionStrategy } from '@angular/core';\nimport { DomSanitizer, SafeUrl } from '@angular/platform-browser';\nimport { MatIconModule } from '@angular/material/icon';\n\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { BrieIconType, BrieIconSize } from '../models/icon';\n\n@Component({\n  selector: 'brie-icon',\n  templateUrl: './icon.component.html',\n  styleUrls: ['./icon.component.scss'],\n  changeDetection: ChangeDetectionStrategy.Eager,\n  imports: [\n    MatIconModule,\n    MatTooltipModule,\n  ],\n\n})\nexport class BrieIconComponent {\n  @Input() fontSet?: string | undefined;\n  @Input() name: string;\n  @Input() size?: BrieIconSize | undefined = BrieIconSize.MD;\n  @Input() type?: BrieIconType | undefined = BrieIconType.MATERIAL;\n  @Input() tooltip?: string | undefined;\n  @Input() style?: string | undefined;\n\n  private hostClasses = (this.elementRef.nativeElement as HTMLElement).classList.value;\n\n  @HostBinding('class') get hostCssClasses(): string {\n    const sizeCssClass = this.size ? `brie-icon__size-${this.size}` : 'brie-icon__size-md';\n\n    return [this.hostClasses, 'brie-icon', sizeCssClass].filter(Boolean).join(' ');\n  }\n\n  get BrieIconType(): typeof BrieIconType {\n    return BrieIconType;\n  }\n\n  constructor(\n    private domSanitizer: DomSanitizer,\n    private elementRef: ElementRef,\n  ) {}\n\n  getSafeIconValue(imageData: string | undefined): SafeUrl {\n    if (imageData) {\n      return this.domSanitizer.bypassSecurityTrustUrl(imageData);\n    }\n\n    return '';\n  }\n}\n","<!--\nCopyright 2022-2023 Bloomreach. All rights reserved. (https://www.bloomreach.com/)\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttps://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-->\n\n@switch (type) {\n  @case (BrieIconType.BASE64) {\n    <img\n      class=\"brie-icon-base64\"\n      [matTooltip]=\"tooltip || ''\"\n      [src]=\"getSafeIconValue(name)\"/>\n  }\n  @default {\n    <mat-icon\n      class=\"brie-icon-material\"\n      [matTooltip]=\"tooltip || ''\"\n      [style]=\"style\"\n      fontSet=\"{{ fontSet }}\">\n      {{ name }}\n    </mat-icon>\n  }\n}\n","/*\n * Copyright 2025-2026 Bloomreach. All rights reserved. (https://www.bloomreach.com/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *  https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MatIconModule } from '@angular/material/icon';\n\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { BrieIconComponent } from './components/icon.component';\n\n@NgModule({\n  imports: [\n    BrieIconComponent,\n    CommonModule,\n    MatIconModule,\n    MatTooltipModule,\n  ],\n  exports: [\n    BrieIconComponent,\n  ],\n})\nexport class BrieIconModule {\n}\n","/*\n * Copyright 2025-2026 Bloomreach. All rights reserved. (https://www.bloomreach.com/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *  https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport * from './icon.module';\nexport * from './components/icon.component';\nexport * from './models/icon';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;;;;;;;;AAcG;IAES;AAAZ,CAAA,UAAY,YAAY,EAAA;AACtB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