import "next-auth";

declare module "next-auth" {
  interface Session {
    user: {
      id: string;
      email: string;
      name?: string | null;
      image?: string | null;
      role: string;
      orgId?: string;
      orgName?: string;
      displayName?: string;
      avatarUrl?: string;
      isEmailVerified?: boolean;
      onboardingComplete?: boolean;
      hasOrg?: boolean;
    };
  }

  interface User {
    role?: string;
  }
}

declare module "next-auth/jwt" {
  interface JWT {
    id?: string;
    role?: string;
    orgId?: string;
    orgName?: string;
    orgRole?: string;
    displayName?: string;
    avatarUrl?: string;
    isEmailVerified?: boolean;
    onboardingComplete?: boolean;
    hasOrg?: boolean;
  }
}
