import { jsx as _jsx } from "react/jsx-runtime";
import { OrderBookCellType } from "./types";
import { ListBox } from "./listBox";
import { useMemo } from "react";
export const Bids = (props)=>{
    const { data } = props;
    const countQty = useMemo(()=>{
        let max = Number.NaN;
        // let len = data.length;
        let index = data.length - 1;
        while(Number.isNaN(max) && index > 0){
            max = data[index][2];
            index--;
        }
        return max;
    // return data.length > 0 ? data[data.length - 1][2] : 0;
    }, [
        data
    ]);
    return /*#__PURE__*/ _jsx(ListBox, {
        type: OrderBookCellType.BID,
        data: data,
        countQty: countQty
    });
};

//# sourceMappingURL=bids.js.map