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