import { createColumns } from "../components/common/create-col";
import { colConfig } from "../types";
import { formatDateToPersian } from "./getDate";


const columnConfigs: colConfig[] | [] = [
    { accessor: "title", header: "عنوان" },
    { accessor: "score", header: "امتیاز" },
    { accessor: "created_at", header: "تاریخ", cellRenderer: (info) => info.getValue() && <p style={{ direction: "ltr" }}>{formatDateToPersian(info.getValue())}</p> },
];

export const scoresCol = createColumns<any>(columnConfigs);