import * as i0 from '@angular/core';
import { input, booleanAttribute, inject, ElementRef, Injector, runInInjectionContext, effect, ChangeDetectionStrategy, Component } from '@angular/core';
import '@ui5/webcomponents/dist/ProgressIndicator.js';

class ProgressIndicator {
    constructor() {
        /**
         * Defines the accessible ARIA name of the component.
         */
        this.accessibleName = input(...(ngDevMode ? [undefined, { debugName: "accessibleName" }] : []));
        /**
         * Defines whether the component value is shown.
         */
        this.hideValue = input(false, ...(ngDevMode ? [{ debugName: "hideValue", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
        /**
         * Specifies the numerical value in percent for the length of the component.
      
      **Note:**
      If a value greater than 100 is provided, the percentValue is set to 100. In other cases of invalid value, percentValue is set to its default of 0.
         */
        this.value = input(0, ...(ngDevMode ? [{ debugName: "value" }] : []));
        /**
         * Specifies the text value to be displayed in the bar.
      
      **Note:**
      
      - If there is no value provided or the value is empty, the default percentage value is shown.
      - If `hideValue` property is `true` both the `displayValue` and `value` property values are not shown.
         */
        this.displayValue = input(...(ngDevMode ? [undefined, { debugName: "displayValue" }] : []));
        /**
         * Defines the value state of the component.
         */
        this.valueState = input("None", ...(ngDevMode ? [{ debugName: "valueState" }] : [])); // className is now passed
        this.elementRef = inject(ElementRef);
        this.injector = inject(Injector);
    }
    get element() {
        return this.elementRef.nativeElement;
    }
    ngAfterViewInit() {
        const wcElement = this.element;
        const inputsToSync = [
            'accessibleName',
            'hideValue',
            'value',
            'displayValue',
            'valueState',
        ];
        // Synchronize inputs (properties)
        for (const inputName of inputsToSync) {
            // Find the corresponding camelCase signal property on the Angular component
            const signalName = inputName.replace(/-./g, (x) => x[1].toUpperCase());
            // Use the Injector to run the effect in the correct context
            if (this[signalName] && typeof this[signalName] === 'function') {
                runInInjectionContext(this.injector, () => {
                    effect(() => {
                        // Read the signal value
                        const value = this[signalName]();
                        if (wcElement) {
                            // Write the value to the Web Component's property
                            wcElement[inputName] = value;
                        }
                    });
                });
            }
        }
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: ProgressIndicator, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.1.4", type: ProgressIndicator, isStandalone: true, selector: "ui5-progress-indicator, [ui5-progress-indicator]", inputs: { accessibleName: { classPropertyName: "accessibleName", publicName: "accessibleName", isSignal: true, isRequired: false, transformFunction: null }, hideValue: { classPropertyName: "hideValue", publicName: "hideValue", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, displayValue: { classPropertyName: "displayValue", publicName: "displayValue", isSignal: true, isRequired: false, transformFunction: null }, valueState: { classPropertyName: "valueState", publicName: "valueState", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["ui5ProgressIndicator"], ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: ProgressIndicator, decorators: [{
            type: Component,
            args: [{
                    standalone: true,
                    selector: 'ui5-progress-indicator, [ui5-progress-indicator]',
                    template: '<ng-content></ng-content>',
                    exportAs: 'ui5ProgressIndicator',
                    changeDetection: ChangeDetectionStrategy.OnPush,
                }]
        }] });

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

export { ProgressIndicator };
//# sourceMappingURL=fundamental-ngx-ui5-webcomponents-progress-indicator.mjs.map
