import { NextRequest, NextResponse } from 'next/server';

export async function POST(req: NextRequest) {
  const { email, password } = await req.json();

  if (email === 'admin@demo.com' && password === 'Admin@123') {
    // In a real app, generate a JWT token or create a session.
    // For this mock, we'll just indicate success.
    return NextResponse.json({ message: 'Login successful', token: 'mock-admin-token' }, { status: 200 });
  } else {
    return NextResponse.json({ message: 'Invalid credentials' }, { status: 401 });
  }
}