import { useMemo } from 'react';
import { buildSegmentationGroupsReadableQuery } from '@reltio/mdm-sdk';
import { useMdmAttributesPresentation, useMdmDisableTimestampLocalization, useMdmLookups, useMdmMetadata } from '../../../contexts/MdmModuleContext';
export var useSegmentReadableQuery = function (groups) {
    var metadata = useMdmMetadata();
    var attributesPresentation = useMdmAttributesPresentation();
    var lookups = useMdmLookups();
    var disableTimestampLocalization = useMdmDisableTimestampLocalization();
    return useMemo(function () {
        return buildSegmentationGroupsReadableQuery(metadata, attributesPresentation, lookups, groups, {
            disableTimestampLocalization: disableTimestampLocalization
        });
    }, [metadata, lookups, attributesPresentation, groups, disableTimestampLocalization]);
};
