import type { TeamMembersDto } from '../dtos';
import { TeamMemberViewModel } from '../view-models';

/**
 * Team Members Presenter
 * Transforms TeamMembersDto to array of TeamMemberViewModel
 */
export class TeamMembersPresenter {
  present(dto: TeamMembersDto, currentUserId: string, teamOwnerId: string): TeamMemberViewModel[] {
    return dto.members.map(member => new TeamMemberViewModel(member, currentUserId, teamOwnerId));
  }
}