"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.useModularDrawerVisibility = void 0;
const react_1 = require("react");
const featureFlags_1 = require("../featureFlags");
function useModularDrawerVisibility({ modularDrawerFeatureFlagKey, }) {
    const featureModularDrawer = (0, featureFlags_1.useFeature)(modularDrawerFeatureFlagKey);
    const isModularDrawerVisible = (0, react_1.useCallback)((location) => {
        if (!featureModularDrawer?.enabled)
            return false;
        return featureModularDrawer.params?.[location] ?? false;
    }, [featureModularDrawer]);
    return {
        isModularDrawerVisible,
    };
}
exports.useModularDrawerVisibility = useModularDrawerVisibility;
//# sourceMappingURL=useModularDrawerVisibility.js.map