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

class Label {
    constructor() {
        /**
         * Defines the labeled input by providing its ID.
      
      **Note:** Can be used with both `ui5-input` and native input.
         */
        this.for = input(...(ngDevMode ? [undefined, { debugName: "for" }] : []));
        /**
         * Defines whether colon is added to the component text.
      
      **Note:** Usually used in forms.
         */
        this.showColon = input(false, ...(ngDevMode ? [{ debugName: "showColon", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
        /**
         * Defines whether an asterisk character is added to the component text.
      
      **Note:** Usually indicates that user input (bound with the `for` property) is required.
      In that case the `required` property of
      the corresponding input should also be set.
         */
        this.required = input(false, ...(ngDevMode ? [{ debugName: "required", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
        /**
         * Defines how the text of a component will be displayed when there is not enough space.
      
      **Note:** for option "Normal" the text will wrap and the words will not be broken based on hyphenation.
         */
        this.wrappingType = input("Normal", ...(ngDevMode ? [{ debugName: "wrappingType" }] : [])); // className is now passed
        /**
         * Available slots for content projection in this component.
         *
         * Slots allow you to insert custom content into predefined areas of the web component.
         * Use the `slot` attribute on child elements to target specific slots.
         *
         * - **(default)**: Defines the text of the component.
      
      **Note:** Although this slot accepts HTML Elements, it is strongly recommended that you only use text in order to preserve the intended design.
         *
         * @example
         * ```html
         * <ui5-label>
         *   <div slot="header">Custom header content</div>
         *   <p>Default slot content</p>
         * </ui5-label>
         * ```
         *
         * @readonly
         * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_templates_and_slots | MDN Web Components Slots}
         */
        this.slots = [
            {
                "name": "default",
                "description": "Defines the text of the component.\n\n**Note:** Although this slot accepts HTML Elements, it is strongly recommended that you only use text in order to preserve the intended design."
            }
        ];
        this.elementRef = inject(ElementRef);
        this.injector = inject(Injector);
    }
    get element() {
        return this.elementRef.nativeElement;
    }
    ngAfterViewInit() {
        const wcElement = this.element;
        const inputsToSync = [
            'for',
            'showColon',
            'required',
            'wrappingType',
        ];
        // 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: Label, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.1.4", type: Label, isStandalone: true, selector: "ui5-label, [ui5-label]", inputs: { for: { classPropertyName: "for", publicName: "for", isSignal: true, isRequired: false, transformFunction: null }, showColon: { classPropertyName: "showColon", publicName: "showColon", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, wrappingType: { classPropertyName: "wrappingType", publicName: "wrappingType", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["ui5Label"], 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: Label, decorators: [{
            type: Component,
            args: [{
                    standalone: true,
                    selector: 'ui5-label, [ui5-label]',
                    template: '<ng-content></ng-content>',
                    exportAs: 'ui5Label',
                    changeDetection: ChangeDetectionStrategy.OnPush,
                }]
        }] });

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

export { Label };
//# sourceMappingURL=fundamental-ngx-ui5-webcomponents-label.mjs.map
