import { jsx as _jsx } from "react/jsx-runtime";
import { createContext, useState } from "react";
export const OrderBookContext = /*#__PURE__*/ createContext({
    cellHeight: 22
});
export const OrderBookProvider = (props)=>{
    const [mode, setMode] = useState("quantity");
    const [totalMode, setTotalMode] = useState("quantity");
    return /*#__PURE__*/ _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