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

class CalendarLegend {
    constructor() {
        /**
         * Hides the Today item in the legend.
         */
        this.hideToday = input(false, ...(ngDevMode ? [{ debugName: "hideToday", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
        /**
         * Hides the Selected day item in the legend.
         */
        this.hideSelectedDay = input(false, ...(ngDevMode ? [{ debugName: "hideSelectedDay", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
        /**
         * Hides the Non-Working day item in the legend.
         */
        this.hideNonWorkingDay = input(false, ...(ngDevMode ? [{ debugName: "hideNonWorkingDay", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
        /**
         * Hides the Working day item in the legend.
         */
        this.hideWorkingDay = input(false, ...(ngDevMode ? [{ debugName: "hideWorkingDay", 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 items of the component.
         *
         * @example
         * ```html
         * <ui5-calendar-legend>
         *   <div slot="header">Custom header content</div>
         *   <p>Default slot content</p>
         * </ui5-calendar-legend>
         * ```
         *
         * @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 items of the component."
            }
        ];
        this.elementRef = inject(ElementRef);
        this.injector = inject(Injector);
    }
    get element() {
        return this.elementRef.nativeElement;
    }
    ngAfterViewInit() {
        const wcElement = this.element;
        const inputsToSync = [
            'hideToday',
            'hideSelectedDay',
            'hideNonWorkingDay',
            'hideWorkingDay',
        ];
        // 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: CalendarLegend, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.1.4", type: CalendarLegend, isStandalone: true, selector: "ui5-calendar-legend, [ui5-calendar-legend]", inputs: { hideToday: { classPropertyName: "hideToday", publicName: "hideToday", isSignal: true, isRequired: false, transformFunction: null }, hideSelectedDay: { classPropertyName: "hideSelectedDay", publicName: "hideSelectedDay", isSignal: true, isRequired: false, transformFunction: null }, hideNonWorkingDay: { classPropertyName: "hideNonWorkingDay", publicName: "hideNonWorkingDay", isSignal: true, isRequired: false, transformFunction: null }, hideWorkingDay: { classPropertyName: "hideWorkingDay", publicName: "hideWorkingDay", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["ui5CalendarLegend"], 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: CalendarLegend, decorators: [{
            type: Component,
            args: [{
                    standalone: true,
                    selector: 'ui5-calendar-legend, [ui5-calendar-legend]',
                    template: '<ng-content></ng-content>',
                    exportAs: 'ui5CalendarLegend',
                    changeDetection: ChangeDetectionStrategy.OnPush,
                }]
        }] });

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

export { CalendarLegend };
//# sourceMappingURL=fundamental-ngx-ui5-webcomponents-calendar-legend.mjs.map
