import { useMemo } from "react";
import { MRT_ColumnDef } from "mantine-react-table";
import { DealServiceSchema } from "../../../../../../../client";

const useDealServicesTableColumns = () => {
    return useMemo<MRT_ColumnDef<DealServiceSchema>[]>(
        () => [
            {
                header: "Название",
                accessorKey: "service.name",
                size: 450,
            },
            {
                header: "Количество",
                accessorKey: "quantity",
                size: 50,
                Cell: ({ cell }) => cell.getValue() + " шт.",
            },
            {
                accessorKey: "price",
                header: "Цена",
                size: 50,
                Cell: ({ cell }) => cell.getValue() + " ₽",
            },
        ],
        []
    );
};

export default useDealServicesTableColumns;
