"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getSelectorActivityTypes = void 0;
var ramda_1 = require("ramda");
var types_1 = require("../types");
var profileRelatedActivityTypes = [
    types_1.ActivityTypes.ENTITY_CREATED,
    types_1.ActivityTypes.ENTITY_CHANGED,
    types_1.ActivityTypes.ENTITIES_MERGED,
    types_1.ActivityTypes.ENTITIES_SPLITTED,
    types_1.ActivityTypes.ENTITY_LOST_MERGE,
    types_1.ActivityTypes.RELATIONSHIP_CREATED,
    types_1.ActivityTypes.RELATIONSHIP_REMOVED,
    types_1.ActivityTypes.RELATIONSHIP_CHANGED,
    types_1.ActivityTypes.POTENTIAL_MATCHES_FOUND,
    types_1.ActivityTypes.POTENTIAL_MATCHES_REMOVED,
    types_1.ActivityTypes.NOT_MATCHES_SET,
    types_1.ActivityTypes.NOT_MATCHES_RESET,
    types_1.ActivityTypes.ENTITIES_MERGED_MANUALLY,
    types_1.ActivityTypes.ENTITIES_MERGED_ON_THE_FLY,
    types_1.ActivityTypes.ATTRIBUTE_UNMASKED
];
var groupRelatedActivityTypes = [
    types_1.ActivityTypes.GROUP_CREATED,
    types_1.ActivityTypes.GROUP_REMOVED,
    types_1.ActivityTypes.GROUP_CHANGED
];
var getSelectorActivityTypes = function (metadata, entityType) {
    return entityType
        ? profileRelatedActivityTypes
        : (0, ramda_1.pipe)(Object.keys, (0, ramda_1.filter)(function (option) {
            return ((0, ramda_1.has)('groupTypes', metadata) && !(0, ramda_1.isEmpty)(metadata.groupTypes)) ||
                !(0, ramda_1.includes)(option, groupRelatedActivityTypes);
        }))(types_1.ActivityTypes);
};
exports.getSelectorActivityTypes = getSelectorActivityTypes;
