/** * @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 {Injectable, Optional, SkipSelf} from '@angular/core'; import {Subject} from 'rxjs'; /** Stepper data that is required for internationalization. */ @Injectable({providedIn: 'root'}) export class MatStepperIntl { /** * Stream that emits whenever the labels here are changed. Use this to notify * components if the labels have changed after initialization. */ readonly changes: Subject = new Subject(); /** Label that is rendered below optional steps. */ optionalLabel: string = 'Optional'; } /** @docs-private */ export function MAT_STEPPER_INTL_PROVIDER_FACTORY(parentIntl: MatStepperIntl) { return parentIntl || new MatStepperIntl(); } /** @docs-private */ export const MAT_STEPPER_INTL_PROVIDER = { provide: MatStepperIntl, deps: [[new Optional(), new SkipSelf(), MatStepperIntl]], useFactory: MAT_STEPPER_INTL_PROVIDER_FACTORY };