import { NextResponse } from 'next/server'
import { SubscriptionService } from '@/lib/subscription-service'

// GET - 获取 Pro 套餐的 Stripe 价格 ID
export async function GET() {
  try {
    const priceId = await SubscriptionService.getProPriceId()
    
    if (!priceId) {
      return NextResponse.json(
        { error: 'Pro plan not found or not configured' },
        { status: 404 }
      )
    }

    return NextResponse.json({ priceId })
  } catch (error) {
    console.error('Error fetching Pro price ID:', error)
    return NextResponse.json(
      { error: 'Failed to fetch Pro price ID' },
      { status: 500 }
    )
  }
}
