| 203 | } |
| 204 | |
| 205 | constructor() { |
| 206 | inject(_CdkPrivateStyleLoader).load(_StructuralStylesLoader); |
| 207 | const tabIndex = inject(new HostAttributeToken('tabindex'), {optional: true}); |
| 208 | const defaults = this.defaults; |
| 209 | |
| 210 | this.tabIndex = tabIndex == null ? 0 : parseInt(tabIndex) || 0; |
| 211 | this.color = defaults.color || 'accent'; |
| 212 | this.id = this._uniqueId = inject(_IdGenerator).getId('mat-mdc-slide-toggle-'); |
| 213 | this.hideIcon = defaults.hideIcon ?? false; |
| 214 | this.disabledInteractive = defaults.disabledInteractive ?? false; |
| 215 | this._labelId = this._uniqueId + '-label'; |
| 216 | } |
| 217 | |
| 218 | ngAfterContentInit() { |
| 219 | this._focusMonitor.monitor(this._elementRef, true).subscribe(focusOrigin => { |