import * as i0 from '@angular/core';
import { input, inject, ElementRef, computed, ChangeDetectionStrategy, ViewEncapsulation, Component, NgModule } from '@angular/core';
import { IconComponent } from '@fundamental-ngx/core/icon';
import { FdTranslatePipe } from '@fundamental-ngx/i18n';

const labelColorRange = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
const defaultColor = 7;
class InfoLabelComponent {
    constructor() {
        /**
         * The type of the info label.
         * - `'numeric'`: Displays the label as a number with special numeric styling
         * - `'icon'`: Displays an icon alongside the label text
         * - `undefined`: Default text-only label (omit this property for default)
         * @default undefined
         */
        this.type = input(...(ngDevMode ? [undefined, { debugName: "type" }] : []));
        /**
         * The icon name to display when `type` is set to `'icon'`.
         * @default null
         */
        this.glyph = input(...(ngDevMode ? [undefined, { debugName: "glyph" }] : []));
        /**
         * The icon font family to use for the icon.
         * @default 'SAP-icons'
         */
        this.font = input('SAP-icons', ...(ngDevMode ? [{ debugName: "font" }] : []));
        /**
         * Accent color of the info label, ranging from 1 to 10.
         * Invalid values default to 7 with a console warning in development mode.
         * @default 7
         */
        this.color = input(defaultColor, ...(ngDevMode ? [{ debugName: "color" }] : []));
        /**
         * The text content displayed in the info label.
         */
        this.label = input(...(ngDevMode ? [undefined, { debugName: "label" }] : []));
        /**
         * Tooltip text displayed on hover.
         * Provides additional context about the label.
         */
        this.title = input(...(ngDevMode ? [undefined, { debugName: "title" }] : []));
        /**
         * ARIA label for accessibility.
         * Overrides the visible label for screen readers when provided.
         */
        this.ariaLabel = input(...(ngDevMode ? [undefined, { debugName: "ariaLabel" }] : []));
        /**
         * ARIA labelledby for accessibility.
         * Used when the label is provided by another element.
         */
        this.ariaLabelledBy = input(...(ngDevMode ? [undefined, { debugName: "ariaLabelledBy" }] : []));
        /**
         * Screen reader only text for additional context.
         * Defaults to translated "Info Label" if not provided.
         */
        this.srText = input(...(ngDevMode ? [undefined, { debugName: "srText" }] : []));
        /** @hidden */
        this.elementRef = inject(ElementRef);
        /** @hidden Validated color with fallback to default */
        this.validatedColor = computed(() => {
            const numericColor = Number(this.color() ?? defaultColor);
            // Check if it's a valid integer in range 1-10
            if (Number.isInteger(numericColor) && numericColor >= 1 && numericColor <= 10) {
                return numericColor;
            }
            return defaultColor; // Default fallback for invalid values
        }, ...(ngDevMode ? [{ debugName: "validatedColor" }] : []));
        /** @hidden */
        this.cssClass = computed(() => [
            'fd-info-label',
            this.type() ? `fd-info-label--${this.type()}` : '',
            `fd-info-label--accent-color-${this.validatedColor()}`
        ]
            .filter(Boolean)
            .join(' '), ...(ngDevMode ? [{ debugName: "cssClass" }] : []));
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: InfoLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.0", type: InfoLabelComponent, isStandalone: true, selector: "fd-info-label", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, glyph: { classPropertyName: "glyph", publicName: "glyph", isSignal: true, isRequired: false, transformFunction: null }, font: { classPropertyName: "font", publicName: "font", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "ariaLabelledBy", isSignal: true, isRequired: false, transformFunction: null }, srText: { classPropertyName: "srText", publicName: "srText", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "cssClass()" } }, ngImport: i0, template: "@if (glyph()) {\n    <fd-icon\n        class=\"fd-info-label__icon\"\n        [glyph]=\"glyph()\"\n        [font]=\"font()\"\n        role=\"presentation\"\n        aria-hidden=\"true\"\n    ></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<span class=\"fd-info-label__sr-only\">{{ srText() || ('coreInfoLabel.srOnlyText' | fdTranslate)() }}</span>\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__sr-only{position:absolute;clip:rect(0 0 0 0);border:0;height:1px;margin-block:-1px;margin-inline:-1px;overflow:hidden;padding-block:0;padding-inline:0;white-space:nowrap;width:1px}.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)}.fd-info-label__sr-only{position:absolute;clip:rect(0 0 0 0);height:1px;width:1px;border:0;margin-inline:-1px;margin-block:-1px;padding-inline:0;padding-block:0;overflow:hidden;white-space:nowrap}\n/*! Bundled license information:\n\nfundamental-styles/dist/info-label.css:\n  (*!\n   * Fundamental Library Styles v0.41.7\n   * Copyright (c) 2026 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", "size", "class", "ariaLabel", "ariaHidden"], outputs: ["ariaHiddenChange"] }, { kind: "pipe", type: FdTranslatePipe, name: "fdTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: InfoLabelComponent, decorators: [{
            type: Component,
            args: [{ selector: 'fd-info-label', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [IconComponent, FdTranslatePipe], host: {
                        '[class]': 'cssClass()'
                    }, template: "@if (glyph()) {\n    <fd-icon\n        class=\"fd-info-label__icon\"\n        [glyph]=\"glyph()\"\n        [font]=\"font()\"\n        role=\"presentation\"\n        aria-hidden=\"true\"\n    ></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<span class=\"fd-info-label__sr-only\">{{ srText() || ('coreInfoLabel.srOnlyText' | fdTranslate)() }}</span>\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__sr-only{position:absolute;clip:rect(0 0 0 0);border:0;height:1px;margin-block:-1px;margin-inline:-1px;overflow:hidden;padding-block:0;padding-inline:0;white-space:nowrap;width:1px}.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)}.fd-info-label__sr-only{position:absolute;clip:rect(0 0 0 0);height:1px;width:1px;border:0;margin-inline:-1px;margin-block:-1px;padding-inline:0;padding-block:0;overflow:hidden;white-space:nowrap}\n/*! Bundled license information:\n\nfundamental-styles/dist/info-label.css:\n  (*!\n   * Fundamental Library Styles v0.41.7\n   * Copyright (c) 2026 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: { type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], glyph: [{ type: i0.Input, args: [{ isSignal: true, alias: "glyph", required: false }] }], font: [{ type: i0.Input, args: [{ isSignal: true, alias: "font", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaLabelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelledBy", required: false }] }], srText: [{ type: i0.Input, args: [{ isSignal: true, alias: "srText", required: false }] }] } });

/**
 * @deprecated
 * Use direct imports of components and directives.
 */
class InfoLabelModule {
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: InfoLabelModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
    static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.1.0", ngImport: i0, type: InfoLabelModule, imports: [InfoLabelComponent], exports: [InfoLabelComponent] }); }
    static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: InfoLabelModule, imports: [InfoLabelComponent] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", 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
