/**
 * GET /api/social/inbox/unread-counts
 * Get unread message counts by platform and account
 */

import { NextResponse } from "next/server";
import { auth } from "@/lib/auth";
import { logger } from "@/lib/logger";
export async function GET() {
  try {
    const session = await auth();
    if (!session?.user?.id) {
      return NextResponse.json(
        { success: false, error: "Unauthorized" },
        { status: 401 },
      );
    }

    // Convex-only — unread counts not yet migrated, return empty
    return NextResponse.json({ counts: {}, total: 0, success: true });
  } catch (error) {
    logger.error("Failed to get unread counts", { error });
    return NextResponse.json(
      { success: false, error: "Failed to get unread counts" },
      { status: 500 },
    );
  }
}
