import { EventJournalGroupName, TypeEventsGroup } from './types';

export const eventsGroup: TypeEventsGroup = {
  [EventJournalGroupName.Event]: [
    'aggregated_id',
    'event_id',
    'event_timestamp',
    'event_src_msg',
    'event_severity',
    'event_first',
    'event_last',
    'event_protocol',
    'event_count',
  ],
  [EventJournalGroupName.Source]: [
    'source_ip',
    'source_user',
    'source_host',
    'source_port',
    'source_mac',
    'source_timezon',
    'source_software',
    'source_action',
  ],
  [EventJournalGroupName.Destination]: [
    'destination_ip',
    'destination_port',
    'destination_user',
    'destination_host',
    'destination_mac',
    'destination_timezon',
    'destination_software',
    'destination_action',
  ],
  [EventJournalGroupName.Device]: [
    'device_version',
    'device_action',
    'device_product',
    'device_timezon',
    'device_vendor',
  ],
  [EventJournalGroupName.Signature]: ['sign_id', 'sign_name'],
  [EventJournalGroupName.Service]: ['rule_tags', 'event_hash', 'type'],
  [EventJournalGroupName.App]: ['sign_category', 'sign_subcategory'],
  [EventJournalGroupName.Etc]: ['cs1Label', 'cs1', 'cs2Label', 'cs2'],
  [EventJournalGroupName.Object]: ['object_type', 'app'],
};

export const group = {
  [EventJournalGroupName.Main]: [
    eventsGroup[EventJournalGroupName.Event],
    eventsGroup[EventJournalGroupName.Signature],
  ],
  [EventJournalGroupName.Source]: [eventsGroup[EventJournalGroupName.Source]],
  [EventJournalGroupName.Recipient]: [
    eventsGroup[EventJournalGroupName.Destination],
  ],
  [EventJournalGroupName.Device]: [eventsGroup[EventJournalGroupName.Device]],
  [EventJournalGroupName.Additionally]: [
    eventsGroup[EventJournalGroupName.Service],
    eventsGroup[EventJournalGroupName.App],
    eventsGroup[EventJournalGroupName.Object],
    eventsGroup[EventJournalGroupName.Etc],
  ],
};
