//import { LstCard } from "@/components/extendedUI/LstCard";

import { getOpenOrders } from "@/utils/querys/logistics/getOpenOrders";
import { openOrderColumns } from "@/utils/tableData/openorders/ooColumns";
import { OpenOrderTable } from "@/utils/tableData/openorders/ooData";

import { useQuery } from "@tanstack/react-query";
//import { CircleX } from "lucide-react";
//import { Suspense } from "react";
//import { toast } from "sonner";

export default function OpenOrders() {
    //{ style = {} }
    const { data, isError, isLoading } = useQuery(getOpenOrders());

    if (isLoading) return <div>Loading openOrder data...</div>;
    if (isError) {
        return (
            <div>
                <p>There was an error getting the openorders.</p>
            </div>
        );
    }
    let openOrders: any = data;

    // const handleCloseCard = () => {
    //     //removeCard("PPOO");

    //     toast.success("card removed");
    // };

    return <OpenOrderTable columns={openOrderColumns} data={openOrders} />;
}
