import DataTableTest from "@/components/DataTableTest";
import FilterColumn from "@/components/FilterColumn";
import {useMemo} from "react";
import {Button} from "@mui/material";

function DataTableMain() {
    const columns = useMemo(
        () => [
            {
                accessorKey: 'name.firstName',
                header: 'نام',
                size: 150,
                id: "firstName",
                enableColumnFilter: true,
                datatype: "text",
                filterFn: "contains",
                columnFilterModeOptions: [
                    "equals",
                    "notEquals",
                    "contains"
                ],
            },
            {
                accessorKey: 'name.lastName',
                header: 'نام خانوادگی',
                size: 150,
                id: "lastName",
                enableColumnFilter: true,
                datatype: "text",
                filterFn: "contains",
                columnFilterModeOptions: [
                    "equals",
                    "notEquals",
                    "contains"
                ],
            },
            {
                accessorKey: 'address',
                header: 'آدرس',
                size: 200,
                id: "address",
                enableColumnFilter: true,
                datatype: "text",
                filterFn: "contains",
                columnFilterModeOptions: [
                    "equals",
                    "notEquals",
                    "contains"
                ],
            },
            {
                accessorKey: 'city',
                header: 'شهر',
                size: 150,
                id: "city",
                enableColumnFilter: true,
                datatype: "text",
                filterFn: "contains",
                columnFilterModeOptions: [
                    "equals",
                    "notEquals",
                    "contains",
                    "lessThan",
                    "greaterThan",
                    "between",
                ],

            },
            {
                accessorKey: 'state',
                header: 'وضعیت',
                size: 150,
                id: "state",
                text:'نام',
                enableColumnFilter: true,
                datatype: "text",
                filterFn: "contains",
                columnFilterModeOptions: [
                    "equals",
                    "notEquals",
                    "contains"
                ],
            },
            {
                accessorKey: 'state',
                header: 'محدوده',
                size: 150,
                id: "betweenNum",
                text:'محدوده',
                enableColumnFilter: true,
                datatype: "text",
                filterFn: "betweenNum",
                columnFilterModeOptions: [],
            },
            {
                accessorKey: 'state',
                header: 'تاریخ',
                size: 150,
                id: "betweenDate",
                text:'تاریخ',
                enableColumnFilter: true,
                datatype: "text",
                filterFn: "betweenDate",
                columnFilterModeOptions: [],
            },
            {
                accessorKey: 'state',
                header: 'شلکت',
                size: 150,
                id: "select2",
                text:'تاریخ',
                type: 'select2',
                enableColumnFilter: true,
                datatype: "text",
                filterFn: "equals",
                columnFilterModeOptions: [],
            },
            {
                accessorKey: 'state',
                header: 'سلکت',
                size: 150,
                id: "select",
                text:'تنتنت',
                type: 'select',
                enableColumnFilter: true,
                datatype: "text",
                filterFn: "equals",
                columnFilterModeOptions: [],
            },
        ],
        [],
    );
    return (
        <>
            <DataTableTest  columns={columns}/>
        </>

    );
}

export default DataTableMain;
