import { NextResponse } from 'next/server'
import { getAILearningStatus } from '@/lib/ai-learning-status'

export async function GET() {
  try {
    // For now, use a default user ID - in production, get from auth
    const userId = 'default-user'
    
    const learningStatus = await getAILearningStatus(userId)
    
    return NextResponse.json({ 
      success: true, 
      data: learningStatus
    })
  } catch (error) {
    console.error('Get AI learning status error:', error)
    return NextResponse.json({ 
      success: false, 
      error: 'Failed to get AI learning status',
      message: error instanceof Error ? error.message : 'Unknown error'
    }, { status: 500 })
  }
}
