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

class SegmentedButtonItem {
    constructor() {
        /**
         * Defines whether the component is disabled.
      A disabled component can't be selected or
      focused, and it is not in the tab chain.
         */
        this.disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
        /**
         * Determines whether the component is displayed as selected.
         */
        this.selected = input(false, ...(ngDevMode ? [{ debugName: "selected", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
        /**
         * Defines the tooltip of the component.
      
      **Note:** A tooltip attribute should be provided for icon-only buttons, in order to represent their exact meaning/function.
         */
        this.tooltip = input(...(ngDevMode ? [undefined, { debugName: "tooltip" }] : []));
        /**
         * Defines the accessible ARIA name of the component.
         */
        this.accessibleName = input(...(ngDevMode ? [undefined, { debugName: "accessibleName" }] : []));
        /**
         * Receives id(or many ids) of the elements that label the component.
         */
        this.accessibleNameRef = input(...(ngDevMode ? [undefined, { debugName: "accessibleNameRef" }] : []));
        /**
         * Defines the accessible description of the component.
         */
        this.accessibleDescription = input(...(ngDevMode ? [undefined, { debugName: "accessibleDescription" }] : []));
        /**
         * Defines the IDs of the HTML Elements that describe the component.
         */
        this.accessibleDescriptionRef = input(...(ngDevMode ? [undefined, { debugName: "accessibleDescriptionRef" }] : []));
        /**
         * Defines the icon, displayed as graphical element within the component.
      The SAP-icons font provides numerous options.
      
      Example:
      See all the available icons within the [Icon Explorer](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html).
         */
        this.icon = input(...(ngDevMode ? [undefined, { debugName: "icon" }] : [])); // 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-segmented-button-item>
         *   <div slot="header">Custom header content</div>
         *   <p>Default slot content</p>
         * </ui5-segmented-button-item>
         * ```
         *
         * @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 = [
            'disabled',
            'selected',
            'tooltip',
            'accessibleName',
            'accessibleNameRef',
            'accessibleDescription',
            'accessibleDescriptionRef',
            'icon',
        ];
        // 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: SegmentedButtonItem, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.1.4", type: SegmentedButtonItem, isStandalone: true, selector: "ui5-segmented-button-item, [ui5-segmented-button-item]", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, tooltip: { classPropertyName: "tooltip", publicName: "tooltip", isSignal: true, isRequired: false, transformFunction: null }, accessibleName: { classPropertyName: "accessibleName", publicName: "accessibleName", isSignal: true, isRequired: false, transformFunction: null }, accessibleNameRef: { classPropertyName: "accessibleNameRef", publicName: "accessibleNameRef", isSignal: true, isRequired: false, transformFunction: null }, accessibleDescription: { classPropertyName: "accessibleDescription", publicName: "accessibleDescription", isSignal: true, isRequired: false, transformFunction: null }, accessibleDescriptionRef: { classPropertyName: "accessibleDescriptionRef", publicName: "accessibleDescriptionRef", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["ui5SegmentedButtonItem"], 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: SegmentedButtonItem, decorators: [{
            type: Component,
            args: [{
                    standalone: true,
                    selector: 'ui5-segmented-button-item, [ui5-segmented-button-item]',
                    template: '<ng-content></ng-content>',
                    exportAs: 'ui5SegmentedButtonItem',
                    changeDetection: ChangeDetectionStrategy.OnPush,
                }]
        }] });

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

export { SegmentedButtonItem };
//# sourceMappingURL=fundamental-ngx-ui5-webcomponents-segmented-button-item.mjs.map
