import { Pipe, PipeTransform } from '@angular/core';

@Pipe({
  name: 'userName',
  pure:true,
  standalone: true
})
export class UserNamePipe implements PipeTransform {

  transform(user: Parse.Object, ...args: unknown[]): unknown {
    let nickname = user?.get("nickname");
    let username = user?.get("username");
    let name = user?.get("name");
    let mobile = user?.get("mobile");
    console.log(user?.toJSON())
    return nickname || name || mobile  || username;
  }

}
