"use client" // Because columns rely on React state/hooks for row actions import * as React from "react" import { ColumnDef, Row } from "@tanstack/react-table" import { ClientDataTableColumnHeaderSimple } from "@/components/client-data-table/data-table-column-simple-header" import { formatDate } from "@/lib/utils" import { Checkbox } from "@/components/ui/checkbox" import { VendorData } from "./vendor-contact-table" /** getColumns: return array of ColumnDef for 'vendors' data */ export function getColumns(): ColumnDef[] { return [ // Vendor Name { accessorKey: "contactName", header: ({ column }) => ( ), cell: ({ row }) => row.getValue("contactName"), }, // Vendor Code { accessorKey: "contactPosition", header: ({ column }) => ( ), cell: ({ row }) => row.getValue("contactPosition"), }, // Status { accessorKey: "contactEmail", header: ({ column }) => ( ), cell: ({ row }) => row.getValue("contactEmail"), }, // Country { accessorKey: "contactPhone", header: ({ column }) => ( ), cell: ({ row }) => row.getValue("contactPhone"), }, // Created At { accessorKey: "createdAt", header: ({ column }) => ( ), cell: ({ cell }) => formatDate(cell.getValue() as Date), }, // Updated At { accessorKey: "updatedAt", header: ({ column }) => ( ), cell: ({ cell }) => formatDate(cell.getValue() as Date), }, ] }