import * as i0 from '@angular/core';
import { InjectionToken, inject, ElementRef, isDevMode, Directive } from '@angular/core';

const DEPRECATED_CONFIG = new InjectionToken('DeprecatedConfig');
class DeprecatedSelectorDirective {
    el = inject(ElementRef);
    config = inject(DEPRECATED_CONFIG, { optional: true });
    constructor() {
        if (!this.config) {
            throw new Error('DEPRECATED_CONFIG provider is required when using DeprecatedSelectorDirective');
        }
        if (isDevMode() && this.config) {
            const actualTagName = this.el.nativeElement.tagName.toLowerCase();
            if (actualTagName === this.config.oldSelector.toLowerCase()) {
                console.warn(`%c[DEPRECATED]%c O seletor <${this.config.oldSelector}> será removido na versão ${this.config.removalVersion}. ` +
                    `Use <${this.config.newSelector}>.`, 'color: white; background: #e74c3c; padding: 2px 5px; border-radius: 3px; font-weight: bold;', 'color: inherit;');
            }
        }
    }
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DeprecatedSelectorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: DeprecatedSelectorDirective, isStandalone: true, ngImport: i0 });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DeprecatedSelectorDirective, decorators: [{
            type: Directive,
            args: [{
                    standalone: true,
                }]
        }], ctorParameters: () => [] });

/**
 * @deprecated Para usar DeprecatedSelectorDirective em hostDirectives, importe diretamente:
 * import { DeprecatedSelectorDirective } from '@seniorsistemas/angular-components/common/deprecated-selector';
 *
 * O Angular não suporta barrel exports para hostDirectives devido à análise estática.
 */

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

export { DEPRECATED_CONFIG, DeprecatedSelectorDirective };
//# sourceMappingURL=seniorsistemas-angular-components-common-deprecated-selector.mjs.map
