license import { ChangeDetectionStrategy , Component , Input , ViewEncapsulation } from '@angular/core' ; import { CanDisable , CanDisableCtor , mixinDisabled } from '../common-behaviors/disabled' ; docs-private export class MatOptgroupBase { } export const _MatOptgroupMixinBase = mixinDisabled ( MatOptgroupBase ) ; let _uniqueOptgroupIdCounter = 0 ; /**
 * Component that is used to group instances of `mat-option`.
 */ @ Component ( { moduleId : module . id , selector : 'mat-optgroup' , exportAs : 'matOptgroup' , templateUrl : 'optgroup.html' , encapsulation : ViewEncapsulation . None , changeDetection : ChangeDetectionStrategy . OnPush , inputs : [ 'disabled' ] , styleUrls : [ 'optgroup.css' ] , host : { 'class' : 'mat-optgroup' , 'role' : 'group' , '[class.mat-optgroup-disabled]' : 'disabled' , '[attr.aria-disabled]' : 'disabled.toString()' , '[attr.aria-labelledby]' : '_labelId' , } } ) export class MatOptgroup extends _MatOptgroupMixinBase implements CanDisable { /** Label for the option group. */ @ Input ( ) label : string ; /** Unique id for the underlying label. */ _labelId : string = `mat-optgroup-label-${ _uniqueOptgroupIdCounter ++ }` ; }