import { Component, computed, input, output } from '@angular/core';
import { RouterLink } from '@angular/router';
import { AuthUser } from '../../../../services/auth/auth.interfaces';
import { Menu } from '../../../../services/tenant.interface';

@Component({
  selector: 'app-user-dropdown',
  standalone: true,
  imports: [RouterLink],
  templateUrl: './user-dropdown.component.html',
  styleUrl: './user-dropdown.component.scss',
})
export class UserDropdownComponent {
  readonly user = input<AuthUser | null>(null);
  readonly accountNavigationMenus = input<readonly Menu[]>([]);
  readonly logoutClick = output<void>();

  protected readonly displayName = computed(() => this.user()?.nombre_apellido || 'Mi cuenta');
}
