"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.useLogic = void 0;
const react_1 = require("react");
const ConfigProvider_1 = require("../../../ConfigProvider");
const useLogic = ({ minDisplayRows, }) => {
    const { components } = (0, react_1.useContext)(ConfigProvider_1.ConfigContext);
    const disableMinHeight = components?.dataGrid?.defaultProps?.disableMinHeight;
    const bodyCssVars = !disableMinHeight && minDisplayRows
        ? {
            '--min-display-rows': minDisplayRows,
        }
        : {};
    return {
        disableMinHeight,
        bodyCssVars,
    };
};
exports.useLogic = useLogic;
