"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
Object.defineProperty(exports, "Bids", {
    enumerable: true,
    get: function() {
        return Bids;
    }
});
const _jsxruntime = require("react/jsx-runtime");
const _types = require("./types");
const _listBox = require("./listBox");
const _react = require("react");
const Bids = (props)=>{
    const { data } = props;
    const countQty = (0, _react.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__*/ (0, _jsxruntime.jsx)(_listBox.ListBox, {
        type: _types.OrderBookCellType.BID,
        data: data,
        countQty: countQty
    });
};

//# sourceMappingURL=bids.js.map