import { __decorate, __metadata } from 'tslib';
import * as i0 from '@angular/core';
import { inject, ElementRef, isDevMode, Input, ChangeDetectionStrategy, ViewEncapsulation, Component, NgModule } from '@angular/core';
import { applyCssClass } from '@fundamental-ngx/cdk/utils';
import { IconComponent } from '@fundamental-ngx/core/icon';

const labelColorRange = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
class InfoLabelComponent {
    constructor() {
        /** User's custom classes */
        this.class = '';
        /**
         * The icon font
         * Options include: 'SAP-icons', 'BusinessSuiteInAppSymbols' and 'SAP-icons-TNT'
         */
        this.font = 'SAP-icons';
        /** Define the colour of the info label starting form 1 to 10 */
        this.color = 7;
        /** @hidden */
        this.elementRef = inject(ElementRef);
    }
    /** @hidden */
    buildComponentCssClass() {
        return [
            'fd-info-label',
            this.type ? `fd-info-label--${this.type}` : '',
            this.color ? `fd-info-label--accent-color-${this.color}` : '',
            this.class
        ];
    }
    /** @hidden */
    ngOnInit() {
        this._validateColorInput();
        this.buildComponentCssClass();
    }
    /** @hidden */
    ngOnChanges(changes) {
        if (changes.color) {
            this._validateColorInput();
        }
        this.buildComponentCssClass();
    }
    /** @hidden */
    _validateColorInput() {
        const matchingColor = labelColorRange.find((color) => color === Number(this.color));
        if (!matchingColor) {
            if (isDevMode()) {
                console.warn(`Invalid color input: ${this.color}. Please provide a number between 1 and 10`);
            }
            this.color = 7;
        }
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: InfoLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.3", type: InfoLabelComponent, isStandalone: true, selector: "fd-info-label", inputs: { class: "class", type: "type", glyph: "glyph", font: "font", color: "color", label: "label", title: "title", ariaLabel: "ariaLabel", ariaLabelledBy: "ariaLabelledBy" }, usesOnChanges: true, ngImport: i0, template: "@if (glyph) {\n    <fd-icon class=\"fd-info-label__icon\" [glyph]=\"glyph\" [font]=\"font\"></fd-icon>\n}\n@if (label) {\n    <span\n        class=\"fd-info-label__text\"\n        [attr.title]=\"title\"\n        [attr.aria-label]=\"ariaLabel\"\n        [attr.aria-labelledby]=\"ariaLabelledBy\"\n        >{{ label }}</span\n    >\n}\n", styles: [".fd-info-label{--fdInfoLabel_Margin:.25rem;--fdInfoLabel_Padding:.375rem;--fdInfoLabel_Icon_Size:.75rem;--fdInfoLabel_Height:var(--fdInfo_Label_Height);--fdInfoLabel_Label_Font_Size:var(--sapFontSize);--fdInfoLabel_Color:var(--fdInfoLabel_Color_Accent_7);--fdInfoLabel_Border_Radius:var(--fdInfo_Label_Border_Radius);--fdInfoLabel_Border_Color:var(--fdInfo_Label_Background_Color7);--fdInfoLabel_Background:var(--fdInfoLabel_Background_Color_Accent_7);border:0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--sapTextColor);display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:normal;margin-block:0;margin-inline:0;padding-inline:0;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:var(--fdInfoLabel_Background);border:.0625rem solid var(--fdInfoLabel_Border_Color);border-radius:var(--fdInfoLabel_Border_Radius);color:var(--fdInfoLabel_Color);gap:var(--fdInfoLabel_Margin);height:var(--fdInfoLabel_Height);padding-block:0;padding-inline:var(--fdInfoLabel_Padding);width:auto}.fd-info-label:after,.fd-info-label:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-info-label__icon [class*=sap-icon],.fd-info-label__icon[class*=sap-icon]{color:inherit;font-size:var(--fdInfoLabel_Icon_Size);height:var(--fdInfoLabel_Height);line-height:var(--fdInfoLabel_Height)}.fd-info-label__text{border:0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--sapTextColor);color:inherit;font-family:var(--sapFontFamily);font-family:var(--sapFontSemiboldDuplexFamily);font-size:var(--sapFontSize);font-size:var(--fdInfoLabel_Label_Font_Size);font-weight:400;forced-color-adjust:none;line-height:normal;margin-block:0;margin-inline:0;padding-block:0;padding-inline:0}.fd-info-label__text:after,.fd-info-label__text:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-info-label--accent-color-1{--fdInfoLabel_Background:var(--fdInfo_Label_Background_Color1);--fdInfoLabel_Color:var(--fdInfo_Label_Color1);--fdInfoLabel_Border_Color:var(--fdInfo_Label_Border_Color1)}.fd-info-label--accent-color-2{--fdInfoLabel_Background:var(--fdInfo_Label_Background_Color2);--fdInfoLabel_Color:var(--fdInfo_Label_Color2);--fdInfoLabel_Border_Color:var(--fdInfo_Label_Border_Color2)}.fd-info-label--accent-color-3{--fdInfoLabel_Background:var(--fdInfo_Label_Background_Color3);--fdInfoLabel_Color:var(--fdInfo_Label_Color3);--fdInfoLabel_Border_Color:var(--fdInfo_Label_Border_Color3)}.fd-info-label--accent-color-4{--fdInfoLabel_Background:var(--fdInfo_Label_Background_Color4);--fdInfoLabel_Color:var(--fdInfo_Label_Color4);--fdInfoLabel_Border_Color:var(--fdInfo_Label_Border_Color4)}.fd-info-label--accent-color-5{--fdInfoLabel_Background:var(--fdInfo_Label_Background_Color5);--fdInfoLabel_Color:var(--fdInfo_Label_Color5);--fdInfoLabel_Border_Color:var(--fdInfo_Label_Border_Color5)}.fd-info-label--accent-color-6{--fdInfoLabel_Background:var(--fdInfo_Label_Background_Color6);--fdInfoLabel_Color:var(--fdInfo_Label_Color6);--fdInfoLabel_Border_Color:var(--fdInfo_Label_Border_Color6)}.fd-info-label--accent-color-7{--fdInfoLabel_Background:var(--fdInfo_Label_Background_Color7);--fdInfoLabel_Color:var(--fdInfo_Label_Color7);--fdInfoLabel_Border_Color:var(--fdInfo_Label_Border_Color7)}.fd-info-label--accent-color-8{--fdInfoLabel_Background:var(--fdInfo_Label_Background_Color8);--fdInfoLabel_Color:var(--fdInfo_Label_Color8);--fdInfoLabel_Border_Color:var(--fdInfo_Label_Border_Color8)}.fd-info-label--accent-color-9{--fdInfoLabel_Background:var(--fdInfo_Label_Background_Color9);--fdInfoLabel_Color:var(--fdInfo_Label_Color9);--fdInfoLabel_Border_Color:var(--fdInfo_Label_Border_Color9)}.fd-info-label--accent-color-10{--fdInfoLabel_Background:var(--fdInfo_Label_Background_Color10);--fdInfoLabel_Color:var(--fdInfo_Label_Color10);--fdInfoLabel_Border_Color:var(--fdInfo_Label_Border_Color10)}.fd-info-label--display{--fdInfoLabel_Padding:.25rem;--fdInfoLabel_Margin:.125rem;--fdInfoLabel_Icon_Size:.625rem;--fdInfoLabel_Label_Font_Size:var(--sapFontSmallSize);--fdInfoLabel_Height:var(--fdInfo_Label_Height_Display);--fdInfoLabel_Border_Radius:var(--fdInfo_Label_Border_Radius_Display)}\n/*! Bundled license information:\n\nfundamental-styles/dist/info-label.css:\n  (*!\n   * Fundamental Library Styles v0.40.1\n   * Copyright (c) 2025 SAP SE or an SAP affiliate company.\n   * Licensed under Apache License 2.0 (https://github.com/SAP/fundamental-styles/blob/main/LICENSE)\n   *)\n*/\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "fd-icon", inputs: ["glyph", "font", "color", "background", "class", "ariaLabel", "ariaHidden"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
}
__decorate([
    applyCssClass,
    __metadata("design:type", Function),
    __metadata("design:paramtypes", []),
    __metadata("design:returntype", Array)
], InfoLabelComponent.prototype, "buildComponentCssClass", null);
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: InfoLabelComponent, decorators: [{
            type: Component,
            args: [{ selector: 'fd-info-label', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [IconComponent], template: "@if (glyph) {\n    <fd-icon class=\"fd-info-label__icon\" [glyph]=\"glyph\" [font]=\"font\"></fd-icon>\n}\n@if (label) {\n    <span\n        class=\"fd-info-label__text\"\n        [attr.title]=\"title\"\n        [attr.aria-label]=\"ariaLabel\"\n        [attr.aria-labelledby]=\"ariaLabelledBy\"\n        >{{ label }}</span\n    >\n}\n", styles: [".fd-info-label{--fdInfoLabel_Margin:.25rem;--fdInfoLabel_Padding:.375rem;--fdInfoLabel_Icon_Size:.75rem;--fdInfoLabel_Height:var(--fdInfo_Label_Height);--fdInfoLabel_Label_Font_Size:var(--sapFontSize);--fdInfoLabel_Color:var(--fdInfoLabel_Color_Accent_7);--fdInfoLabel_Border_Radius:var(--fdInfo_Label_Border_Radius);--fdInfoLabel_Border_Color:var(--fdInfo_Label_Background_Color7);--fdInfoLabel_Background:var(--fdInfoLabel_Background_Color_Accent_7);border:0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--sapTextColor);display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:normal;margin-block:0;margin-inline:0;padding-inline:0;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:var(--fdInfoLabel_Background);border:.0625rem solid var(--fdInfoLabel_Border_Color);border-radius:var(--fdInfoLabel_Border_Radius);color:var(--fdInfoLabel_Color);gap:var(--fdInfoLabel_Margin);height:var(--fdInfoLabel_Height);padding-block:0;padding-inline:var(--fdInfoLabel_Padding);width:auto}.fd-info-label:after,.fd-info-label:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-info-label__icon [class*=sap-icon],.fd-info-label__icon[class*=sap-icon]{color:inherit;font-size:var(--fdInfoLabel_Icon_Size);height:var(--fdInfoLabel_Height);line-height:var(--fdInfoLabel_Height)}.fd-info-label__text{border:0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--sapTextColor);color:inherit;font-family:var(--sapFontFamily);font-family:var(--sapFontSemiboldDuplexFamily);font-size:var(--sapFontSize);font-size:var(--fdInfoLabel_Label_Font_Size);font-weight:400;forced-color-adjust:none;line-height:normal;margin-block:0;margin-inline:0;padding-block:0;padding-inline:0}.fd-info-label__text:after,.fd-info-label__text:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-info-label--accent-color-1{--fdInfoLabel_Background:var(--fdInfo_Label_Background_Color1);--fdInfoLabel_Color:var(--fdInfo_Label_Color1);--fdInfoLabel_Border_Color:var(--fdInfo_Label_Border_Color1)}.fd-info-label--accent-color-2{--fdInfoLabel_Background:var(--fdInfo_Label_Background_Color2);--fdInfoLabel_Color:var(--fdInfo_Label_Color2);--fdInfoLabel_Border_Color:var(--fdInfo_Label_Border_Color2)}.fd-info-label--accent-color-3{--fdInfoLabel_Background:var(--fdInfo_Label_Background_Color3);--fdInfoLabel_Color:var(--fdInfo_Label_Color3);--fdInfoLabel_Border_Color:var(--fdInfo_Label_Border_Color3)}.fd-info-label--accent-color-4{--fdInfoLabel_Background:var(--fdInfo_Label_Background_Color4);--fdInfoLabel_Color:var(--fdInfo_Label_Color4);--fdInfoLabel_Border_Color:var(--fdInfo_Label_Border_Color4)}.fd-info-label--accent-color-5{--fdInfoLabel_Background:var(--fdInfo_Label_Background_Color5);--fdInfoLabel_Color:var(--fdInfo_Label_Color5);--fdInfoLabel_Border_Color:var(--fdInfo_Label_Border_Color5)}.fd-info-label--accent-color-6{--fdInfoLabel_Background:var(--fdInfo_Label_Background_Color6);--fdInfoLabel_Color:var(--fdInfo_Label_Color6);--fdInfoLabel_Border_Color:var(--fdInfo_Label_Border_Color6)}.fd-info-label--accent-color-7{--fdInfoLabel_Background:var(--fdInfo_Label_Background_Color7);--fdInfoLabel_Color:var(--fdInfo_Label_Color7);--fdInfoLabel_Border_Color:var(--fdInfo_Label_Border_Color7)}.fd-info-label--accent-color-8{--fdInfoLabel_Background:var(--fdInfo_Label_Background_Color8);--fdInfoLabel_Color:var(--fdInfo_Label_Color8);--fdInfoLabel_Border_Color:var(--fdInfo_Label_Border_Color8)}.fd-info-label--accent-color-9{--fdInfoLabel_Background:var(--fdInfo_Label_Background_Color9);--fdInfoLabel_Color:var(--fdInfo_Label_Color9);--fdInfoLabel_Border_Color:var(--fdInfo_Label_Border_Color9)}.fd-info-label--accent-color-10{--fdInfoLabel_Background:var(--fdInfo_Label_Background_Color10);--fdInfoLabel_Color:var(--fdInfo_Label_Color10);--fdInfoLabel_Border_Color:var(--fdInfo_Label_Border_Color10)}.fd-info-label--display{--fdInfoLabel_Padding:.25rem;--fdInfoLabel_Margin:.125rem;--fdInfoLabel_Icon_Size:.625rem;--fdInfoLabel_Label_Font_Size:var(--sapFontSmallSize);--fdInfoLabel_Height:var(--fdInfo_Label_Height_Display);--fdInfoLabel_Border_Radius:var(--fdInfo_Label_Border_Radius_Display)}\n/*! Bundled license information:\n\nfundamental-styles/dist/info-label.css:\n  (*!\n   * Fundamental Library Styles v0.40.1\n   * Copyright (c) 2025 SAP SE or an SAP affiliate company.\n   * Licensed under Apache License 2.0 (https://github.com/SAP/fundamental-styles/blob/main/LICENSE)\n   *)\n*/\n"] }]
        }], propDecorators: { class: [{
                type: Input
            }], type: [{
                type: Input
            }], glyph: [{
                type: Input
            }], font: [{
                type: Input
            }], color: [{
                type: Input
            }], label: [{
                type: Input
            }], title: [{
                type: Input
            }], ariaLabel: [{
                type: Input
            }], ariaLabelledBy: [{
                type: Input
            }], buildComponentCssClass: [] } });

class InfoLabelModule {
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: InfoLabelModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
    static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.3", ngImport: i0, type: InfoLabelModule, imports: [InfoLabelComponent], exports: [InfoLabelComponent] }); }
    static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: InfoLabelModule, imports: [InfoLabelComponent] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: InfoLabelModule, decorators: [{
            type: NgModule,
            args: [{
                    imports: [InfoLabelComponent],
                    exports: [InfoLabelComponent]
                }]
        }] });

/**
 * Generated bundle index. Do not edit.
 */

export { InfoLabelComponent, InfoLabelModule };
//# sourceMappingURL=fundamental-ngx-core-info-label.mjs.map
