import { Salutation } from "@/enums/salutation";
import type { CommunicationViewModel } from "./communication.models";
import type { MembershipViewModel } from "./membership.models";

export interface MemberViewModel {
  id: number;
  salutation: Salutation;
  firstname: string;
  lastname: string;
  nameaffix: string;
  birthdate: Date;
  internalId?: string;
  firstMembershipEntry?: MembershipViewModel;
  lastMembershipEntry?: MembershipViewModel;
  sendNewsletter?: CommunicationViewModel;
  smsAlarming?: Array<CommunicationViewModel>;
  preferredCommunication?: Array<CommunicationViewModel>;
}

export interface MemberStatisticsViewModel {
  id: number;
  salutation: Salutation;
  firstname: string;
  lastname: string;
  nameaffix: string;
  birthdate: Date;
  todayAge: number;
  ageThisYear: number;
  exactAge: string;
}

export interface CreateMemberViewModel {
  salutation: Salutation;
  firstname: string;
  lastname: string;
  nameaffix: string;
  birthdate: Date;
  internalId?: string;
}

export interface UpdateMemberViewModel {
  id: number;
  salutation: Salutation;
  firstname: string;
  lastname: string;
  nameaffix: string;
  birthdate: Date;
  internalId?: string;
}
