{"version":3,"file":"seniorsistemas-angular-components-common-deprecated-selector.mjs","sources":["../../projects/angular-components/common/deprecated-selector/src/deprecated-selector.directive.ts","../../projects/angular-components/common/deprecated-selector/src/public-api.ts","../../projects/angular-components/common/deprecated-selector/src/seniorsistemas-angular-components-common-deprecated-selector.ts"],"sourcesContent":["import { Directive, ElementRef, inject, InjectionToken, isDevMode } from '@angular/core';\n\nexport interface DeprecatedSelectorConfig {\n    oldSelector: string;\n    newSelector: string;\n    removalVersion: string;\n}\n\nexport const DEPRECATED_CONFIG = new InjectionToken<DeprecatedSelectorConfig>('DeprecatedConfig');\n\n@Directive({\n    standalone: true,\n})\nexport class DeprecatedSelectorDirective {\n    private el = inject(ElementRef);\n    private config = inject(DEPRECATED_CONFIG, { optional: true });\n\n    constructor() {\n        if (!this.config) {\n            throw new Error('DEPRECATED_CONFIG provider is required when using DeprecatedSelectorDirective');\n        }\n        if (isDevMode() && this.config) {\n            const actualTagName = this.el.nativeElement.tagName.toLowerCase();\n            if (actualTagName === this.config.oldSelector.toLowerCase()) {\n                console.warn(\n                    `%c[DEPRECATED]%c O seletor <${this.config.oldSelector}> será removido na versão ${this.config.removalVersion}. ` +\n                        `Use <${this.config.newSelector}>.`,\n                    'color: white; background: #e74c3c; padding: 2px 5px; border-radius: 3px; font-weight: bold;',\n                    'color: inherit;',\n                );\n            }\n        }\n    }\n}\n\n","/**\n * @deprecated Para usar DeprecatedSelectorDirective em hostDirectives, importe diretamente:\n * import { DeprecatedSelectorDirective } from '@seniorsistemas/angular-components/common/deprecated-selector';\n * \n * O Angular não suporta barrel exports para hostDirectives devido à análise estática.\n */\nexport { DeprecatedSelectorDirective, DEPRECATED_CONFIG } from './deprecated-selector.directive';\n\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAQa,iBAAiB,GAAG,IAAI,cAAc,CAA2B,kBAAkB,EAAE;MAKrF,2BAA2B,CAAA;AAC5B,IAAA,EAAE,GAAG,MA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