/**
 * Interfaces and enums for user-related types
 * File: /home/henry/code/Volleyball/frontend/src/components/interfaces/users.tsx
 */

export enum UserRole {
    Admin = 'admin',
    Coach = 'coach',
    Player = 'player',
}


/** Primary user model returned from the API */
export interface UserBaseInformation {
    UUID: string
    Username: string
    AvatarUrl?: string
    IsActive: boolean

}


export interface User extends UserBaseInformation {
    Email: string
    FirstName?: string
    LastName?: string
    Role: UserRole[]
    Phone?: string
    Created_at?: string // ISO date
    Updated_at?: string // ISO date
    LastLogin?: string // ISO date
}

/** Data required to create a new user */
// export interface CreateUserDTO {
//     username: string
//     email: string
//     password: string
//     firstName?: string
//     lastName?: string
//     roles?: UserRole[]
// }

/** Data for partial updates to a user */
// export interface UpdateUserDTO {
//     username?: string
//     email?: string
//     password?: string
//     firstName?: string | null
//     lastName?: string | null
//     avatarUrl?: string | null
//     roles?: UserRole[]
//     isActive?: boolean
//     teamId?: string | null
//     metadata?: Record<string, unknown> | null
// }

/** Simple auth state slice for frontend state management */
// export interface AuthState {
//     currentUser?: User | null
//     token?: string | null
//     isLoading: boolean
//     error?: string | null
// }