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