import { pipe, filter, has, isEmpty, includes } from 'ramda';
import { ActivityTypes } from '../types';
var profileRelatedActivityTypes = [
    ActivityTypes.ENTITY_CREATED,
    ActivityTypes.ENTITY_CHANGED,
    ActivityTypes.ENTITIES_MERGED,
    ActivityTypes.ENTITIES_SPLITTED,
    ActivityTypes.ENTITY_LOST_MERGE,
    ActivityTypes.RELATIONSHIP_CREATED,
    ActivityTypes.RELATIONSHIP_REMOVED,
    ActivityTypes.RELATIONSHIP_CHANGED,
    ActivityTypes.POTENTIAL_MATCHES_FOUND,
    ActivityTypes.POTENTIAL_MATCHES_REMOVED,
    ActivityTypes.NOT_MATCHES_SET,
    ActivityTypes.NOT_MATCHES_RESET,
    ActivityTypes.ENTITIES_MERGED_MANUALLY,
    ActivityTypes.ENTITIES_MERGED_ON_THE_FLY,
    ActivityTypes.ATTRIBUTE_UNMASKED
];
var groupRelatedActivityTypes = [
    ActivityTypes.GROUP_CREATED,
    ActivityTypes.GROUP_REMOVED,
    ActivityTypes.GROUP_CHANGED
];
export var getSelectorActivityTypes = function (metadata, entityType) {
    return entityType
        ? profileRelatedActivityTypes
        : pipe(Object.keys, filter(function (option) {
            return (has('groupTypes', metadata) && !isEmpty(metadata.groupTypes)) ||
                !includes(option, groupRelatedActivityTypes);
        }))(ActivityTypes);
};
