1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-15 15:53:27 +00:00
Files
browser/apps/web/src/app/layouts/product-switcher/product-switcher.component.ts
Oscar Hinton 382a2a0f24 Ignore more bad imports (#12935)
* Ignore more bad imports
2025-01-23 13:03:17 -08:00

35 lines
1.0 KiB
TypeScript

import { AfterViewInit, ChangeDetectorRef, Component, Input } from "@angular/core";
// FIXME: remove `src` and fix import
// eslint-disable-next-line no-restricted-imports
import { IconButtonType } from "@bitwarden/components/src/icon-button/icon-button.component";
import { ProductSwitcherService } from "./shared/product-switcher.service";
@Component({
selector: "product-switcher",
templateUrl: "./product-switcher.component.html",
})
export class ProductSwitcherComponent implements AfterViewInit {
/**
* Passed to the product switcher's `bitIconButton`
*/
@Input()
buttonType: IconButtonType = "main";
ngAfterViewInit() {
/**
* Resolves https://angular.io/errors/NG0100 [SM-403]
*
* Caused by `[bitMenuTriggerFor]="content?.menu"` in template
*/
this.changeDetector.detectChanges();
}
constructor(
private changeDetector: ChangeDetectorRef,
private productSwitcherService: ProductSwitcherService,
) {}
protected readonly products$ = this.productSwitcherService.products$;
}