/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ import { Directive, Inject, InjectionToken, Optional, TemplateRef, ViewContainerRef, } from '@angular/core'; import { CdkPortal } from '@angular/cdk/portal'; import * as i0 from "@angular/core"; /** * Injection token that can be used to reference instances of `MatTabLabel`. It serves as * alternative token to the actual `MatTabLabel` class which could cause unnecessary * retention of the class and its directive metadata. */ export const MAT_TAB_LABEL = new InjectionToken('MatTabLabel'); /** * Used to provide a tab label to a tab without causing a circular dependency. * @docs-private */ export const MAT_TAB = new InjectionToken('MAT_TAB'); /** Used to flag tab labels for use with the portal directive */ export class MatTabLabel extends CdkPortal { constructor(templateRef, viewContainerRef, _closestTab) { super(templateRef, viewContainerRef); this._closestTab = _closestTab; } static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: MatTabLabel, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }, { token: MAT_TAB, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); } static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.1", type: MatTabLabel, selector: "[mat-tab-label], [matTabLabel]", providers: [{ provide: MAT_TAB_LABEL, useExisting: MatTabLabel }], usesInheritance: true, ngImport: i0 }); } } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: MatTabLabel, decorators: [{ type: Directive, args: [{ selector: '[mat-tab-label], [matTabLabel]', providers: [{ provide: MAT_TAB_LABEL, useExisting: MatTabLabel }], }] }], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef }, { type: undefined, decorators: [{ type: Inject, args: [MAT_TAB] }, { type: Optional }] }]; } }); //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFiLWxhYmVsLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiL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