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

class TableRow {
    constructor() {
        /**
         * Unique identifier of the row.
      
      **Note:** For selection features to work properly, this property is mandatory, and its value must not contain spaces.
         */
        this.rowKey = input(...(ngDevMode ? [undefined, { debugName: "rowKey" }] : []));
        /**
         * Defines the 0-based position of the row related to the total number of rows within the table when the `ui5-table-virtualizer` feature is used.
         */
        this.position = input(...(ngDevMode ? [undefined, { debugName: "position" }] : []));
        /**
         * Defines the interactive state of the row.
         */
        this.interactive = input(false, ...(ngDevMode ? [{ debugName: "interactive", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
        /**
         * Defines the navigated state of the row.
         */
        this.navigated = input(false, ...(ngDevMode ? [{ debugName: "navigated", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
        /**
         * Defines whether the row is movable.
         */
        this.movable = input(false, ...(ngDevMode ? [{ debugName: "movable", transform: booleanAttribute }] : [{ transform: booleanAttribute }])); // 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 cells of the component.
      
      **Note:** Use `ui5-table-cell` for the intended design.
         * - **actions**: Defines the actions of the component.
      
      **Note:** Use `ui5-table-row-action` or `ui5-table-row-action-navigation` for the intended design.
         *
         * @example
         * ```html
         * <ui5-table-row>
         *   <div slot="header">Custom header content</div>
         *   <p>Default slot content</p>
         * </ui5-table-row>
         * ```
         *
         * @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 cells of the component.\n\n**Note:** Use `ui5-table-cell` for the intended design."
            },
            {
                "name": "actions",
                "description": "Defines the actions of the component.\n\n**Note:** Use `ui5-table-row-action` or `ui5-table-row-action-navigation` for the intended design.",
                "since": "2.7.0"
            }
        ];
        this.elementRef = inject(ElementRef);
        this.injector = inject(Injector);
    }
    get element() {
        return this.elementRef.nativeElement;
    }
    ngAfterViewInit() {
        const wcElement = this.element;
        const inputsToSync = [
            'rowKey',
            'position',
            'interactive',
            'navigated',
            'movable',
        ];
        // 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: TableRow, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.1.4", type: TableRow, isStandalone: true, selector: "ui5-table-row, [ui5-table-row]", inputs: { rowKey: { classPropertyName: "rowKey", publicName: "rowKey", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, interactive: { classPropertyName: "interactive", publicName: "interactive", isSignal: true, isRequired: false, transformFunction: null }, navigated: { classPropertyName: "navigated", publicName: "navigated", isSignal: true, isRequired: false, transformFunction: null }, movable: { classPropertyName: "movable", publicName: "movable", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["ui5TableRow"], 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: TableRow, decorators: [{
            type: Component,
            args: [{
                    standalone: true,
                    selector: 'ui5-table-row, [ui5-table-row]',
                    template: '<ng-content></ng-content>',
                    exportAs: 'ui5TableRow',
                    changeDetection: ChangeDetectionStrategy.OnPush,
                }]
        }] });

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

export { TableRow };
//# sourceMappingURL=fundamental-ngx-ui5-webcomponents-table-row.mjs.map
