"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.ActivitiesFactory = void 0;
var react_1 = __importDefault(require("react"));
var types_1 = require("../types");
var CommentActivity_1 = require("./components/CommentActivity");
var GroupActivity_1 = require("./components/GroupActivity");
var MergeActivity_1 = require("./components/MergeActivity");
var PotentialMatchActivity_1 = require("./components/PotentialMatchActivity");
var ProfileActivity_1 = require("./components/ProfileActivity");
var RelationActivity_1 = require("./components/RelationActivity");
var SearchActivity_1 = require("./components/SearchActivity");
var SimpleActivity_1 = require("./components/SimpleActivity");
var SynchronizationIssuesActivity_1 = require("./components/SynchronizationIssuesActivity");
var SegmentActivity_1 = require("./components/SegmentActivity");
var InteractionActivity_1 = require("./components/InteractionActivity");
var Add_1 = __importDefault(require("../../../icons/Add"));
var CalendarToday_1 = __importDefault(require("@mui/icons-material/CalendarToday"));
var Comment_1 = __importDefault(require("../../../icons/Comment"));
var Create_1 = __importDefault(require("../../../icons/Create"));
var LogIn_1 = __importDefault(require("../../../icons/LogIn"));
var LogOut_1 = __importDefault(require("../../../icons/LogOut"));
var Merge_1 = __importDefault(require("../../../icons/Merge"));
var NoMatches_1 = __importDefault(require("../../../icons/NoMatches"));
var PotentialMatch_1 = __importDefault(require("../../../icons/PotentialMatch"));
var Profile_1 = __importDefault(require("../../../icons/Profile"));
var Remove_1 = __importDefault(require("../../../icons/Remove"));
var Search_1 = __importDefault(require("../../../icons/Search"));
var UnMerge_1 = __importDefault(require("../../../icons/UnMerge"));
var ActivitiesFactory = /** @class */ (function () {
    function ActivitiesFactory() {
    }
    ActivitiesFactory.getComponent = function (_a) {
        var type = _a.type, data = _a.data;
        switch (type) {
            case types_1.ActivityTypes.COMMENT_ADDED:
            case types_1.ActivityTypes.COMMENT_DELETED:
            case types_1.ActivityTypes.COMMENT_UPDATED:
                return react_1.default.createElement(CommentActivity_1.CommentActivity, { type: type });
            case types_1.ActivityTypes.ENTITIES_MERGED_MANUALLY:
            case types_1.ActivityTypes.ENTITIES_MERGED:
            case types_1.ActivityTypes.ENTITIES_MERGED_ON_THE_FLY:
            case types_1.ActivityTypes.ENTITIES_SPLITTED:
            case types_1.ActivityTypes.ENTITY_LOST_MERGE:
                return react_1.default.createElement(MergeActivity_1.MergeActivity, { data: data, type: type });
            case types_1.ActivityTypes.POTENTIAL_MATCHES_FOUND:
            case types_1.ActivityTypes.POTENTIAL_MATCHES_REMOVED:
            case types_1.ActivityTypes.NOT_MATCHES_SET:
            case types_1.ActivityTypes.NOT_MATCHES_RESET:
                return react_1.default.createElement(PotentialMatchActivity_1.PotentialMatchActivity, { data: data, type: type });
            case types_1.ActivityTypes.ENTITY_CHANGED:
            case types_1.ActivityTypes.ENTITY_CREATED:
            case types_1.ActivityTypes.ENTITY_REMOVED:
            case types_1.ActivityTypes.ANALYTICS_ATTRIBUTES_CHANGED:
                return react_1.default.createElement(ProfileActivity_1.ProfileActivity, { data: data, type: type });
            case types_1.ActivityTypes.RELATIONSHIP_CHANGED:
            case types_1.ActivityTypes.RELATIONSHIP_CREATED:
            case types_1.ActivityTypes.RELATIONSHIP_REMOVED:
                return react_1.default.createElement(RelationActivity_1.RelationActivity, { data: data, type: type });
            case types_1.ActivityTypes.USER_SEARCH:
                return react_1.default.createElement(SearchActivity_1.SearchActivity, { data: data, type: type });
            case types_1.ActivityTypes.GROUP_CHANGED:
            case types_1.ActivityTypes.GROUP_CREATED:
            case types_1.ActivityTypes.GROUP_REMOVED:
                return react_1.default.createElement(GroupActivity_1.GroupActivity, { data: data, type: type });
            case types_1.ActivityTypes.SEGMENT_CREATE:
            case types_1.ActivityTypes.SEGMENT_DELETE:
            case types_1.ActivityTypes.SEGMENT_UPDATE:
                return react_1.default.createElement(SegmentActivity_1.SegmentActivity, { data: data, type: type });
            case types_1.ActivityTypes.INTERACTION_CREATE:
            case types_1.ActivityTypes.INTERACTION_UPDATE:
                return react_1.default.createElement(InteractionActivity_1.InteractionActivity, { data: data, type: type });
            case types_1.ActivityTypes.USER_LOGIN:
            case types_1.ActivityTypes.USER_LOGOUT:
            case types_1.ActivityTypes.MODEL_UPDATED:
            case types_1.ActivityTypes.PERIODIC_TASK_SCHEDULED:
            case types_1.ActivityTypes.USER_PROFILE_VIEW:
            case types_1.ActivityTypes.ATTRIBUTE_UNMASKED:
                return react_1.default.createElement(SimpleActivity_1.SimpleActivity, { data: data, type: type });
            case types_1.ActivityTypes.SFDC_CONNECTOR_SYNCHRONIZATION_ISSUE:
                return react_1.default.createElement(SynchronizationIssuesActivity_1.SynchronizationIssuesActivity, { data: data, type: type });
            default:
                return react_1.default.createElement("div", null,
                    type,
                    " NOT IMPLEMENTED");
        }
    };
    ActivitiesFactory.getIcon = function (type) {
        switch (type) {
            case types_1.ActivityTypes.USER_LOGIN:
                return react_1.default.createElement(LogIn_1.default, null);
            case types_1.ActivityTypes.USER_LOGOUT:
                return react_1.default.createElement(LogOut_1.default, null);
            case types_1.ActivityTypes.USER_PROFILE_VIEW:
                return react_1.default.createElement(Profile_1.default, null);
            case types_1.ActivityTypes.PERIODIC_TASK_SCHEDULED:
                return react_1.default.createElement(CalendarToday_1.default, null);
            case types_1.ActivityTypes.ENTITIES_SPLITTED:
                return react_1.default.createElement(UnMerge_1.default, null);
            case types_1.ActivityTypes.ENTITIES_MERGED_MANUALLY:
            case types_1.ActivityTypes.ENTITIES_MERGED:
            case types_1.ActivityTypes.ENTITIES_MERGED_ON_THE_FLY:
            case types_1.ActivityTypes.ENTITY_LOST_MERGE:
                return react_1.default.createElement(Merge_1.default, null);
            case types_1.ActivityTypes.ENTITY_CREATED:
            case types_1.ActivityTypes.RELATIONSHIP_CREATED:
            case types_1.ActivityTypes.GROUP_CREATED:
            case types_1.ActivityTypes.SEGMENT_CREATE:
            case types_1.ActivityTypes.INTERACTION_CREATE:
                return react_1.default.createElement(Add_1.default, null);
            case types_1.ActivityTypes.ENTITY_REMOVED:
            case types_1.ActivityTypes.RELATIONSHIP_REMOVED:
            case types_1.ActivityTypes.POTENTIAL_MATCHES_REMOVED:
            case types_1.ActivityTypes.GROUP_REMOVED:
            case types_1.ActivityTypes.SEGMENT_DELETE:
                return react_1.default.createElement(Remove_1.default, null);
            case types_1.ActivityTypes.USER_SEARCH:
                return react_1.default.createElement(Search_1.default, null);
            case types_1.ActivityTypes.POTENTIAL_MATCHES_FOUND:
                return react_1.default.createElement(PotentialMatch_1.default, null);
            case types_1.ActivityTypes.NOT_MATCHES_RESET:
            case types_1.ActivityTypes.NOT_MATCHES_SET:
                return react_1.default.createElement(NoMatches_1.default, null);
            case types_1.ActivityTypes.COMMENT_ADDED:
            case types_1.ActivityTypes.COMMENT_UPDATED:
            case types_1.ActivityTypes.COMMENT_DELETED:
                return react_1.default.createElement(Comment_1.default, null);
            case types_1.ActivityTypes.ENTITY_CHANGED:
            case types_1.ActivityTypes.MODEL_UPDATED:
            case types_1.ActivityTypes.RELATIONSHIP_CHANGED:
            case types_1.ActivityTypes.GROUP_CHANGED:
            case types_1.ActivityTypes.SEGMENT_UPDATE:
            default:
                return react_1.default.createElement(Create_1.default, null);
        }
    };
    return ActivitiesFactory;
}());
exports.ActivitiesFactory = ActivitiesFactory;
