"use client";

import { ColumnDef } from "@tanstack/react-table";


import Link from "next/link";
import { formatCurrency, formatDate } from "@/lib/format";
import { Order } from "@/types/db";

export const columns: ColumnDef<any>[] = [
  {
    accessorKey: "id",
    header: "Bestell-ID",
    cell: ({ row }) => row.getValue("id"),
  },
  {
    accessorKey: "created_at",
    header: "Bestelldatum",
    cell: ({ row }) => formatDate(row.getValue("created_at")),
  },
  {
    accessorKey: "amount_total",
    header: "Gesamtbetrag",
    cell: ({ row }) => formatCurrency(row.getValue("amount_total")),
  },
  {
    accessorKey: "order_status",
    header: "Status",
    cell: ({ row }) => row.getValue("order_status"),
  },
];
