"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.useSegmentReadableQuery = void 0;
var react_1 = require("react");
var mdm_sdk_1 = require("@reltio/mdm-sdk");
var MdmModuleContext_1 = require("../../../contexts/MdmModuleContext");
var useSegmentReadableQuery = function (groups) {
    var metadata = (0, MdmModuleContext_1.useMdmMetadata)();
    var attributesPresentation = (0, MdmModuleContext_1.useMdmAttributesPresentation)();
    var lookups = (0, MdmModuleContext_1.useMdmLookups)();
    var disableTimestampLocalization = (0, MdmModuleContext_1.useMdmDisableTimestampLocalization)();
    return (0, react_1.useMemo)(function () {
        return (0, mdm_sdk_1.buildSegmentationGroupsReadableQuery)(metadata, attributesPresentation, lookups, groups, {
            disableTimestampLocalization: disableTimestampLocalization
        });
    }, [metadata, lookups, attributesPresentation, groups, disableTimestampLocalization]);
};
exports.useSegmentReadableQuery = useSegmentReadableQuery;
