import NextAuth from "next-auth";

declare module "next-auth" {
  interface Session {
    user: {
      id: string;
      email: string;
      name: string;
      firstName: string;
      lastName: string;
      role: "ADMIN" | "MANAGER";
      profileImage?: string | null;
      createdAt?: string | Date; // Add this line
    };
  }

  interface User {
    id: string;
    email: string;
    name: string;
    firstName: string;
    lastName: string;
    role: "ADMIN" | "MANAGER";
    profileImage?: string | null;
    createdAt?: string | Date; // Add this line
  }
}

declare module "next-auth/jwt" {
  interface JWT {
    id: string;
    email: string;
    name: string;
    firstName: string;
    lastName: string;
    role: "ADMIN" | "MANAGER";
    profileImage?: string | null;
    createdAt?: string | Date; // Add this line
  }
}
