import React, { useContext } from 'react';
import { SyncedValueHeightsContext } from '../contexts/SyncedValueHeightsContext';
export var ValueHeightConsumer = function (_a) {
    var uri = _a.uri, children = _a.children;
    var context = useContext(SyncedValueHeightsContext);
    if (!context) {
        return React.createElement(React.Fragment, null, children);
    }
    var getHeight = context.getHeight;
    var height = getHeight(uri);
    return React.createElement("div", { style: height !== undefined ? { height: height } : undefined }, children);
};
