import useShippingTableColumns from "../hooks/shippingTableColumns.tsx";
import { ShippingProductSchema } from "../../../../../client";
import { Box } from "@mantine/core";
import { DataTable } from "mantine-datatable";
import clsx from "clsx";
import "mantine-datatable/styles.css";
import classes from "../ShippingTab.module.css";


type Props = {
    items: ShippingProductSchema[];
}

const ShippingProductsTable = ({ items }: Props) => {
    const columns = useShippingTableColumns();

    return (
        <Box>
            <DataTable
                withTableBorder
                withColumnBorders
                columns={columns}
                records={items}
                className={clsx(classes.productsTableBorder)}
            />
        </Box>
    );
};

export default ShippingProductsTable;
