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

const useCardServicesTableColumns = () => {
    return useMemo<MRT_ColumnDef<CardServiceSchema>[]>(
        () => [
            {
                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 useCardServicesTableColumns;
