import { NextResponse } from "next/server";

const columns = [
  "customer_number",
  "company_name",
  "legal_name",
  "customer_type",
  "status",
  "industry",
  "website",
  "email",
  "phone",
  "tax_number",
  "vat_id",
  "notes",
  "address_type",
  "street",
  "postal_code",
  "city",
  "state",
  "country",
  "address_is_primary",
  "contact_first_name",
  "contact_last_name",
  "contact_position",
  "contact_email",
  "contact_phone",
  "contact_mobile",
  "contact_is_primary",
  "contact_notes",
];

export async function GET() {
  return new NextResponse(`${columns.join(";")}\n`, {
    headers: {
      "Content-Disposition": 'attachment; filename="kundenimport-vorlage.csv"',
      "Content-Type": "text/csv; charset=utf-8",
    },
  });
}
