import { type RoleType } from '@/constants/roles';

export interface User {
  id: string;
  username: string;
  email: string;
  fullName: string;
  role: RoleType;
  avatar?: string;
  createdAt: string;
  updatedAt: string;
}

export type UserRole = RoleType;

export interface LoginRequest {
  email: string;
  password: string;
}

export interface LoginResponse {
  user: User;
  access_token: string;
}

export interface ForgotPasswordRequest {
  email: string;
}

export interface ResetPasswordRequest {
  token: string;
  password: string;
  passwordConfirmation: string;
}

export interface AuthState {
  user: User | null;
  access_token: string | null;
  isAuthenticated: boolean;
}

export interface RegisterRequest {
  username: string;
  email: string;
  password?: string;
  fullName: string;
  role: 'STUDENT' | 'TEACHER' | 'ADMIN';
  nis?: string;
  className?: string;
}
