import { type Role } from "@/lib/auth/roles";
import type { DefaultSession } from "next-auth";

declare module "next-auth" {
  interface Session {
    user: {
      id: string;
      role: Role;
      brigadeId: string | null;
    } & DefaultSession["user"];
  }

  interface User {
    role: Role;
    brigadeId: string | null;
  }
}

declare module "next-auth/jwt" {
  interface JWT {
    role: Role;
    brigadeId: string | null;
  }
}

declare module "@auth/core/jwt" {
  interface JWT {
    role: Role;
    brigadeId: string | null;
  }
}
