"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
function _export(target, all) {
    for(var name in all)Object.defineProperty(target, name, {
        enumerable: true,
        get: all[name]
    });
}
_export(exports, {
    OrderBookContext: function() {
        return OrderBookContext;
    },
    OrderBookProvider: function() {
        return OrderBookProvider;
    }
});
const _jsxruntime = require("react/jsx-runtime");
const _react = require("react");
const OrderBookContext = /*#__PURE__*/ (0, _react.createContext)({
    cellHeight: 22
});
const OrderBookProvider = (props)=>{
    const [mode, setMode] = (0, _react.useState)("quantity");
    const [totalMode, setTotalMode] = (0, _react.useState)("quantity");
    return /*#__PURE__*/ (0, _jsxruntime.jsx)(OrderBookContext.Provider, {
        value: {
            cellHeight: props.cellHeight,
            onItemClick: props.onItemClick,
            mode,
            totalMode: totalMode || "quantity",
            depth: props.depth,
            onModeChange: setMode,
            onTotalModeChange: setTotalMode,
            showTotal: props.showTotal || false,
            pendingOrders: props.pendingOrders
        },
        children: props.children
    });
};

//# sourceMappingURL=orderContext.js.map