"use client";

import * as Cell from "@/app/[lang]/(pages)/(authenticated)/projects/components/table/cells";
import * as Header from "@/app/[lang]/(pages)/(authenticated)/projects/components/table/headers";

const getProjectColumns = (dict: Dictionary) => {
  return [
    {
      id: "name",
      className: "w-[150px]",
      header: () => <Header.Name {...{ dict }} />,
      cell: ({ row }) => <Cell.Name {...{ row }} />,
    },
    {
      id: "email",
      className: "w-[200px] md:w-[300px] lg:w-[400px] xl:w-[600px] 2xl:w-[700px]",
      header: () => <Header.Email {...{ dict }} />,
      cell: ({ row }) => <Cell.Email {...{ row }} />,
    },
    {
      id: "blank",
      className: "w-0 grow !p-0",
      header: () => undefined,
      cell: () => undefined,
    },
    {
      id: "waiting",
      className: "w-[70px]",
      header: () => <Header.Waiting {...{ dict }} />,
      cell: ({ row }) => <Cell.Notes {...{ row, dict }} />,
    },
    {
      id: "status",
      className: "w-[100px] text-center",
      header: () => <Header.Status {...{ dict }} />,
      cell: ({ row }) => <Cell.Status {...{ row, dict }} />,
    },
    {
      id: "httpsredirect",
      className: "w-[100px] text-center",
      header: () => <Header.Redirect {...{ dict }} />,
      cell: ({ row }) => <Cell.Redirect {...{ row, dict }} />,
    },
    {
      id: "actions",
      className: "w-[130px]",
      header: () => <Header.Actions />,
      cell: ({ row }) => <Cell.Actions {...{ row, dict }} />,
    },
  ];
};

export { getProjectColumns };
