import { NextResponse } from "next/server";

export class ResponseHelper {
  static success<T>(data: T, status = 200) {
    return NextResponse.json(data, { status });
  }

  static created<T>(data: T) {
    return NextResponse.json(data, { status: 201 });
  }

  static error(message: string, status = 400) {
    return NextResponse.json({ success: false, error: message }, { status });
  }
}
