import { ShieldCross, ShieldTick } from "iconsax-react";
import { createColumns } from "../components/common/create-col";
import { colConfig } from "../types";

const columnConfigs: colConfig[] | [] = [
    {
        accessor: "status", header: "وضعیت",
        cellRenderer: (info) => info.getValue() ? <ShieldTick color="#11212D" className="flex w-full" /> : <ShieldCross color="#E51717" className="flex w-full" />
    },
    { accessor: "dollar", header: "دلار" },
    { accessor: "score", header: "امتیاز" },
    { accessor: "device_model", header: "مدل دستگاه" },
    { accessor: "imei_number", header: "شماره IMEI" },
    { accessor: "install_date", header: "تاریخ نصب", cellRenderer: (info) => info.getValue() && <p style={{ direction: "ltr" }}>{info.getValue()}</p> },
    { accessor: "install_iemi", header: "تاریخ ثبت IMEI", cellRenderer: (info) => info.getValue() && <p style={{ direction: "ltr" }}>{info.getValue()}</p> },
];

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