import { FC } from "react";
import { MRT_TableOptions } from "mantine-react-table";
import { DealProductServiceSchema } from "../../../../../../../client";
import { BaseTable } from "../../../../../../../components/BaseTable/BaseTable.tsx";
import useProductServicesTableColumns from "./columns.tsx";


type Props = {
    items: DealProductServiceSchema[];
    quantity: number;
};

const ProductServicesTable: FC<Props> = ({ items, quantity }) => {
    const columns = useProductServicesTableColumns({ data: items, quantity });

    return (
        <BaseTable
            data={items}
            columns={columns}
            restProps={
                {
                    enableColumnActions: false,
                    enableSorting: false,
                    enableRowActions: false,
                    enableBottomToolbar: false,
                } as MRT_TableOptions<DealProductServiceSchema>
            }
        />
    );
};
export default ProductServicesTable;
