import { NgClass } from '@angular/common';
import * as i0 from '@angular/core';
import { input, numberAttribute, booleanAttribute, computed, ChangeDetectionStrategy, Component } from '@angular/core';
import { SiIconComponent } from '@siemens/element-ng/icon';

/**
 * Copyright (c) Siemens 2016 - 2025
 * SPDX-License-Identifier: MIT
 */
class SiStatusCounterComponent {
    /** Icon to display. */
    icon = input.required();
    /** Stacked icon to display. */
    stackedIcon = input();
    /**
     * Counter below the icon
     *
     * @defaultValue 0
     */
    count = input(0, { transform: numberAttribute });
    /** Color of the icon */
    color = input();
    /**
     * Whether the icon is disabled.
     *
     * @defaultValue false
     */
    disabled = input(false, { transform: booleanAttribute });
    isDisabledOrCountZero = computed(() => !!this.disabled() || this.count() === 0);
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: SiStatusCounterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: SiStatusCounterComponent, isStandalone: true, selector: "si-status-counter, si-icon-status", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: true, transformFunction: null }, stackedIcon: { classPropertyName: "stackedIcon", publicName: "stackedIcon", isSignal: true, isRequired: false, transformFunction: null }, count: { classPropertyName: "count", publicName: "count", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@let iconValue = icon();\n<span class=\"icon icon-stack\">\n  <si-icon\n    [ngClass]=\"isDisabledOrCountZero() ? undefined : color()\"\n    [class.inactive]=\"isDisabledOrCountZero()\"\n    [icon]=\"iconValue\"\n  />\n  @let stackedValue = stackedIcon();\n  @if (stackedValue) {\n    <si-icon\n      [ngClass]=\"isDisabledOrCountZero() ? 'inactive-contrast' : color() + '-contrast'\"\n      [icon]=\"stackedValue\"\n    />\n  }\n</span>\n@if (!disabled()) {\n  <span>{{ count() }}</span>\n}\n", styles: [":host{display:flex;align-items:center;flex-direction:column;text-align:center;gap:4px}.inactive{color:var(--element-ui-3)}.inactive-contrast{color:var(--element-ui-5)}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: SiStatusCounterComponent, decorators: [{
            type: Component,
            args: [{ selector: 'si-status-counter, si-icon-status', imports: [NgClass, SiIconComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "@let iconValue = icon();\n<span class=\"icon icon-stack\">\n  <si-icon\n    [ngClass]=\"isDisabledOrCountZero() ? undefined : color()\"\n    [class.inactive]=\"isDisabledOrCountZero()\"\n    [icon]=\"iconValue\"\n  />\n  @let stackedValue = stackedIcon();\n  @if (stackedValue) {\n    <si-icon\n      [ngClass]=\"isDisabledOrCountZero() ? 'inactive-contrast' : color() + '-contrast'\"\n      [icon]=\"stackedValue\"\n    />\n  }\n</span>\n@if (!disabled()) {\n  <span>{{ count() }}</span>\n}\n", styles: [":host{display:flex;align-items:center;flex-direction:column;text-align:center;gap:4px}.inactive{color:var(--element-ui-3)}.inactive-contrast{color:var(--element-ui-5)}\n"] }]
        }] });

/**
 * Copyright (c) Siemens 2016 - 2025
 * SPDX-License-Identifier: MIT
 */

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

export { SiStatusCounterComponent };
//# sourceMappingURL=siemens-element-ng-status-counter.mjs.map
