"use client";

import * as Cell from "@/app/[lang]/(pages)/(authenticated)/dashboard/downloads/components/table/cell";
import * as Header from "@/app/[lang]/(pages)/(authenticated)/dashboard/downloads/components/table/header";

const getDownloadLinkColumns = (dict: Dictionary) => {
  return [
    {
      id: "name",
      className: "w-[150px]",
      header: () => <Header.User {...{ dict }} />,
      cell: ({ row }) => <Cell.User {...{ row }} />,
    },
    {
      id: "title",
      className: "w-[200px] md:w-[300px] lg:w-[400px] xl:w-[600px] 2xl:w-[700px]",
      header: () => <Header.Title {...{ dict }} />,
      cell: ({ row }) => <Cell.Title {...{ row }} />,
    },
    {
      id: "blank",
      className: "w-0 grow !p-0",
      header: () => undefined,
      cell: () => undefined,
    },
    {
      id: "created_at",
      className: "w-[200px]",
      header: () => <Header.CreatedAt {...{ dict }} />,
      cell: ({ row }) => <Cell.Date {...{ row }} />,
    },
    {
      id: "actions",
      className: "w-[70px]",
      header: () => <Header.Actions />,
      cell: ({ row }) => <Cell.Actions {...{ row, dict }} />,
    },
  ];
};

export { getDownloadLinkColumns };
