import { ChangeDetectionStrategy, Component } from '@angular/core'; import { UserTypeId } from '@/core/models/auth.models'; import { injectAuthService } from '@/core/services/auth.service'; import { AskQuestionsComponent } from '@/features/questions/ask-questions/ask-questions.component'; import { ButtonDirective } from '../../ui/button.directive'; import { ModalComponent } from '../../ui/modal/modal.component'; import { NavlinkComponent } from '../navlink/navlink.component'; @Component({ selector: 'app-navbar', templateUrl: './navbar.component.html', styleUrls: ['./navbar.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [NavlinkComponent, ModalComponent, ButtonDirective, AskQuestionsComponent], }) export class NavbarComponent { authServ = injectAuthService(); showNavbar = false; openQuestion = false; toggleNavbar(show: boolean) { this.showNavbar = show; } logout() { this.toggleNavbar(false); return this.authServ.logout(); } }