import { LOARequest } from "./loa";
import { Role } from "./roles";
import { PagedData } from "./pagination";

export interface memberSettings {
    displayName: string;
}

export type PaginatedMembers = PagedData<Member>;

export enum MemberState {
    Guest = 1,
    Applicant = 2,
    Member = 3,
    Retired = 4,
    Discharged = 5,
    Suspended = 6,
    Banned = 7,
    Denied = 8
}

export type Member = {
    member_id: number;
    member_name: string;
    displayName?: string;
    rank: string | null;
    rank_date: string | null;
    unit: string | null;
    unit_date: string | null;
    status: string | null;
    status_date: string | null;
    loa_until?: Date;
    member_state?: MemberState;
};

export interface MemberLight {
    id: number
    displayName: string
    username: string
    color: string
}

export interface MemberCardDetails {
    member: Member;
    roles: Role[];
}

export interface myData {
    member: Member;
    LOAs: LOARequest[];
    roles: Role[];
    state: MemberState;
}