import { BaseTable } from "../../../../../components/BaseTable/BaseTable.tsx";
import { useProductsTableColumns } from "../hooks/useProductsTableColumns.tsx";
import { ProductExcelData } from "../types.tsx";

type Props = {
    barcode: string;
    productsData: ProductExcelData;
}

const ProductsTable = ({ barcode, productsData }: Props) => {
    const columns = useProductsTableColumns({ barcode });

    return (
        <BaseTable
            data={productsData.products}
            columns={columns}
            w={"100%"}

            restProps={{
                enableSorting: false,
                enableRowActions: false,
                enableTopToolbar: false,
                enableColumnActions: false,
            }}
        />
    );
};

export default ProductsTable;
