import * as i0 from '@angular/core';
import { output, inject, ElementRef, Injector, ChangeDetectionStrategy, Component } from '@angular/core';
import '@ui5/webcomponents/dist/TableHeaderCellActionAI.js';

class TableHeaderCellActionAI {
    constructor() {
        // className is now passed
        /**
         * Fired when a header cell action is clicked.
         */
        this.ui5Click = output();
        this.elementRef = inject(ElementRef);
        this.injector = inject(Injector);
    }
    get element() {
        return this.elementRef.nativeElement;
    }
    ngAfterViewInit() {
        const wcElement = this.element;
        const outputsToSync = [
            'ui5Click',
        ];
        // Synchronize outputs (events)
        for (const outputName of outputsToSync) {
            // Map Angular output name to UI5 web component event name
            const eventName = outputName.replace('ui5', '').replace(/([A-Z])/g, '-$1').toLowerCase().substring(1);
            // Ensure the output property exists and has an emit function before adding listener
            if (this[outputName] && typeof this[outputName].emit === 'function' && wcElement.addEventListener) {
                // Cast the listener to the correct type to satisfy TypeScript
                wcElement.addEventListener(eventName, (e) => {
                    this[outputName].emit(e);
                });
            }
        }
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: TableHeaderCellActionAI, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.4", type: TableHeaderCellActionAI, isStandalone: true, selector: "ui5-table-header-cell-action-ai, [ui5-table-header-cell-action-ai]", outputs: { ui5Click: "ui5Click" }, exportAs: ["ui5TableHeaderCellActionAI"], 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: TableHeaderCellActionAI, decorators: [{
            type: Component,
            args: [{
                    standalone: true,
                    selector: 'ui5-table-header-cell-action-ai, [ui5-table-header-cell-action-ai]',
                    template: '<ng-content></ng-content>',
                    exportAs: 'ui5TableHeaderCellActionAI',
                    changeDetection: ChangeDetectionStrategy.OnPush,
                }]
        }] });

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

export { TableHeaderCellActionAI };
//# sourceMappingURL=fundamental-ngx-ui5-webcomponents-table-header-cell-action-a-i.mjs.map
