import React from 'react';
import { ActivityTypes } from '../types';
import { CommentActivity } from './components/CommentActivity';
import { GroupActivity } from './components/GroupActivity';
import { MergeActivity } from './components/MergeActivity';
import { PotentialMatchActivity } from './components/PotentialMatchActivity';
import { ProfileActivity } from './components/ProfileActivity';
import { RelationActivity } from './components/RelationActivity';
import { SearchActivity } from './components/SearchActivity';
import { SimpleActivity } from './components/SimpleActivity';
import { SynchronizationIssuesActivity } from './components/SynchronizationIssuesActivity';
import { SegmentActivity } from './components/SegmentActivity';
import { InteractionActivity } from './components/InteractionActivity';
import AddIcon from '../../../icons/Add';
import CalendarTodayIcon from '@mui/icons-material/CalendarToday';
import CommentIcon from '../../../icons/Comment';
import CreateIcon from '../../../icons/Create';
import LoginIcon from '../../../icons/LogIn';
import LogoutIcon from '../../../icons/LogOut';
import MergeIcon from '../../../icons/Merge';
import NoMatchesIcon from '../../../icons/NoMatches';
import PotentialMatchIcon from '../../../icons/PotentialMatch';
import ProfileIcon from '../../../icons/Profile';
import RemoveIcon from '../../../icons/Remove';
import SearchIcon from '../../../icons/Search';
import UnMergeIcon from '../../../icons/UnMerge';
var ActivitiesFactory = /** @class */ (function () {
    function ActivitiesFactory() {
    }
    ActivitiesFactory.getComponent = function (_a) {
        var type = _a.type, data = _a.data;
        switch (type) {
            case ActivityTypes.COMMENT_ADDED:
            case ActivityTypes.COMMENT_DELETED:
            case ActivityTypes.COMMENT_UPDATED:
                return React.createElement(CommentActivity, { type: type });
            case ActivityTypes.ENTITIES_MERGED_MANUALLY:
            case ActivityTypes.ENTITIES_MERGED:
            case ActivityTypes.ENTITIES_MERGED_ON_THE_FLY:
            case ActivityTypes.ENTITIES_SPLITTED:
            case ActivityTypes.ENTITY_LOST_MERGE:
                return React.createElement(MergeActivity, { data: data, type: type });
            case ActivityTypes.POTENTIAL_MATCHES_FOUND:
            case ActivityTypes.POTENTIAL_MATCHES_REMOVED:
            case ActivityTypes.NOT_MATCHES_SET:
            case ActivityTypes.NOT_MATCHES_RESET:
                return React.createElement(PotentialMatchActivity, { data: data, type: type });
            case ActivityTypes.ENTITY_CHANGED:
            case ActivityTypes.ENTITY_CREATED:
            case ActivityTypes.ENTITY_REMOVED:
            case ActivityTypes.ANALYTICS_ATTRIBUTES_CHANGED:
                return React.createElement(ProfileActivity, { data: data, type: type });
            case ActivityTypes.RELATIONSHIP_CHANGED:
            case ActivityTypes.RELATIONSHIP_CREATED:
            case ActivityTypes.RELATIONSHIP_REMOVED:
                return React.createElement(RelationActivity, { data: data, type: type });
            case ActivityTypes.USER_SEARCH:
                return React.createElement(SearchActivity, { data: data, type: type });
            case ActivityTypes.GROUP_CHANGED:
            case ActivityTypes.GROUP_CREATED:
            case ActivityTypes.GROUP_REMOVED:
                return React.createElement(GroupActivity, { data: data, type: type });
            case ActivityTypes.SEGMENT_CREATE:
            case ActivityTypes.SEGMENT_DELETE:
            case ActivityTypes.SEGMENT_UPDATE:
                return React.createElement(SegmentActivity, { data: data, type: type });
            case ActivityTypes.INTERACTION_CREATE:
            case ActivityTypes.INTERACTION_UPDATE:
                return React.createElement(InteractionActivity, { data: data, type: type });
            case ActivityTypes.USER_LOGIN:
            case ActivityTypes.USER_LOGOUT:
            case ActivityTypes.MODEL_UPDATED:
            case ActivityTypes.PERIODIC_TASK_SCHEDULED:
            case ActivityTypes.USER_PROFILE_VIEW:
            case ActivityTypes.ATTRIBUTE_UNMASKED:
                return React.createElement(SimpleActivity, { data: data, type: type });
            case ActivityTypes.SFDC_CONNECTOR_SYNCHRONIZATION_ISSUE:
                return React.createElement(SynchronizationIssuesActivity, { data: data, type: type });
            default:
                return React.createElement("div", null,
                    type,
                    " NOT IMPLEMENTED");
        }
    };
    ActivitiesFactory.getIcon = function (type) {
        switch (type) {
            case ActivityTypes.USER_LOGIN:
                return React.createElement(LoginIcon, null);
            case ActivityTypes.USER_LOGOUT:
                return React.createElement(LogoutIcon, null);
            case ActivityTypes.USER_PROFILE_VIEW:
                return React.createElement(ProfileIcon, null);
            case ActivityTypes.PERIODIC_TASK_SCHEDULED:
                return React.createElement(CalendarTodayIcon, null);
            case ActivityTypes.ENTITIES_SPLITTED:
                return React.createElement(UnMergeIcon, null);
            case ActivityTypes.ENTITIES_MERGED_MANUALLY:
            case ActivityTypes.ENTITIES_MERGED:
            case ActivityTypes.ENTITIES_MERGED_ON_THE_FLY:
            case ActivityTypes.ENTITY_LOST_MERGE:
                return React.createElement(MergeIcon, null);
            case ActivityTypes.ENTITY_CREATED:
            case ActivityTypes.RELATIONSHIP_CREATED:
            case ActivityTypes.GROUP_CREATED:
            case ActivityTypes.SEGMENT_CREATE:
            case ActivityTypes.INTERACTION_CREATE:
                return React.createElement(AddIcon, null);
            case ActivityTypes.ENTITY_REMOVED:
            case ActivityTypes.RELATIONSHIP_REMOVED:
            case ActivityTypes.POTENTIAL_MATCHES_REMOVED:
            case ActivityTypes.GROUP_REMOVED:
            case ActivityTypes.SEGMENT_DELETE:
                return React.createElement(RemoveIcon, null);
            case ActivityTypes.USER_SEARCH:
                return React.createElement(SearchIcon, null);
            case ActivityTypes.POTENTIAL_MATCHES_FOUND:
                return React.createElement(PotentialMatchIcon, null);
            case ActivityTypes.NOT_MATCHES_RESET:
            case ActivityTypes.NOT_MATCHES_SET:
                return React.createElement(NoMatchesIcon, null);
            case ActivityTypes.COMMENT_ADDED:
            case ActivityTypes.COMMENT_UPDATED:
            case ActivityTypes.COMMENT_DELETED:
                return React.createElement(CommentIcon, null);
            case ActivityTypes.ENTITY_CHANGED:
            case ActivityTypes.MODEL_UPDATED:
            case ActivityTypes.RELATIONSHIP_CHANGED:
            case ActivityTypes.GROUP_CHANGED:
            case ActivityTypes.SEGMENT_UPDATE:
            default:
                return React.createElement(CreateIcon, null);
        }
    };
    return ActivitiesFactory;
}());
export { ActivitiesFactory };
