import { EventJournalGroupName } from './types';
import { EVENTS_JOURNAL_DASHBOARD, useTranslation } from 'core/i18n';
import { TypeEventJournalMessages } from './types';

export function useEventsJournalMessages(): TypeEventJournalMessages {
  const { t } = useTranslation([EVENTS_JOURNAL_DASHBOARD]);

  return {
    title: t('events_journal_dashboard:app.events_journal_dashboard.title'),

    table: {
      column: {
        data: t(
          'events_journal_dashboard:app.events_journal_dashboard.table.column.data',
        ),
        message: t(
          'events_journal_dashboard:app.events_journal_dashboard.table.column.message',
        ),
        sigName: t(
          'events_journal_dashboard:app.events_journal_dashboard.table.column.sig_name',
        ),
        severity: t(
          'events_journal_dashboard:app.events_journal_dashboard.table.column.severity',
        ),
        category: t(
          'events_journal_dashboard:app.events_journal_dashboard.table.column.category',
        ),
        sourceIp: t(
          'events_journal_dashboard:app.events_journal_dashboard.table.column.source_ip',
        ),
        destinationIp: t(
          'events_journal_dashboard:app.events_journal_dashboard.table.column.destination_ip',
        ),
        columnMessage: {
          moreInfo: t(
            'events_journal_dashboard:app.events_journal_dashboard.table.column.message_column.more_info',
          ),
          hideInfo: t(
            'events_journal_dashboard:app.events_journal_dashboard.table.column.message_column.hide_info',
          ),
        },
      },
      cardInfo: {
        title: t(
          'events_journal_dashboard:app.events_journal_dashboard.table.card_info.header.title',
        ),
        [EventJournalGroupName.Main]: {
          title: t(
            'events_journal_dashboard:app.events_journal_dashboard.table.card_info.main.title',
          ),
          aggregated_id: t(
            'events_journal_dashboard:app.events_journal_dashboard.table.card_info.main.aggregated_id',
          ),
          event_id: t(
            'events_journal_dashboard:app.events_journal_dashboard.table.card_info.main.event_id',
          ),
          event_timestamp: t(
            'events_journal_dashboard:app.events_journal_dashboard.table.card_info.main.event_timestamp',
          ),
          event_src_msg: t(
            'events_journal_dashboard:app.events_journal_dashboard.table.card_info.main.event_src_msg',
          ),
          event_severity: t(
            'events_journal_dashboard:app.events_journal_dashboard.table.card_info.main.event_severity',
          ),
          event_first: t(
            'events_journal_dashboard:app.events_journal_dashboard.table.card_info.main.event_first',
          ),
          event_last: t(
            'events_journal_dashboard:app.events_journal_dashboard.table.card_info.main.event_last',
          ),
          event_protocol: t(
            'events_journal_dashboard:app.events_journal_dashboard.table.card_info.main.event_protocol',
          ),
          event_count: t(
            'events_journal_dashboard:app.events_journal_dashboard.table.card_info.main.event_count',
          ),
          sign_id: t(
            'events_journal_dashboard:app.events_journal_dashboard.table.card_info.signature.sign_id',
          ),
          sign_name: t(
            'events_journal_dashboard:app.events_journal_dashboard.table.card_info.signature.sign_name',
          ),
        },

        [EventJournalGroupName.Source]: {
          title: t(
            'events_journal_dashboard:app.events_journal_dashboard.table.card_info.source.title',
          ),
          source_ip: t(
            'events_journal_dashboard:app.events_journal_dashboard.table.card_info.source.source_ip',
          ),
          source_user: t(
            'events_journal_dashboard:app.events_journal_dashboard.table.card_info.source.source_user',
          ),
          source_host: t(
            'events_journal_dashboard:app.events_journal_dashboard.table.card_info.source.source_host',
          ),
          source_port: t(
            'events_journal_dashboard:app.events_journal_dashboard.table.card_info.source.source_port',
          ),
          source_mac: t(
            'events_journal_dashboard:app.events_journal_dashboard.table.card_info.source.source_mac',
          ),
          source_timezon: t(
            'events_journal_dashboard:app.events_journal_dashboard.table.card_info.source.source_timezon',
          ),
          source_software: t(
            'events_journal_dashboard:app.events_journal_dashboard.table.card_info.source.source_software',
          ),
          source_action: t(
            'events_journal_dashboard:app.events_journal_dashboard.table.card_info.source.source_action',
          ),
        },
        [EventJournalGroupName.Recipient]: {
          title: t(
            'events_journal_dashboard:app.events_journal_dashboard.table.card_info.destination.title',
          ),
          destination_ip: t(
            'events_journal_dashboard:app.events_journal_dashboard.table.card_info.destination.destination_ip',
          ),
          destination_port: t(
            'events_journal_dashboard:app.events_journal_dashboard.table.card_info.destination.destination_port',
          ),
          destination_user: t(
            'events_journal_dashboard:app.events_journal_dashboard.table.card_info.destination.destination_user',
          ),
          destination_host: t(
            'events_journal_dashboard:app.events_journal_dashboard.table.card_info.destination.destination_host',
          ),
          destination_mac: t(
            'events_journal_dashboard:app.events_journal_dashboard.table.card_info.destination.destination_mac',
          ),
          destination_timezon: t(
            'events_journal_dashboard:app.events_journal_dashboard.table.card_info.destination.destination_timezon',
          ),
          destination_software: t(
            'events_journal_dashboard:app.events_journal_dashboard.table.card_info.destination.destination_software',
          ),
          destination_action: t(
            'events_journal_dashboard:app.events_journal_dashboard.table.card_info.destination.destination_action',
          ),
        },

        [EventJournalGroupName.Device]: {
          title: t(
            'events_journal_dashboard:app.events_journal_dashboard.table.card_info.device.title',
          ),
          device_version: t(
            'events_journal_dashboard:app.events_journal_dashboard.table.card_info.device.device_version',
          ),
          device_action: t(
            'events_journal_dashboard:app.events_journal_dashboard.table.card_info.device.device_action',
          ),
          device_product: t(
            'events_journal_dashboard:app.events_journal_dashboard.table.card_info.device.device_product',
          ),
          device_timezon: t(
            'events_journal_dashboard:app.events_journal_dashboard.table.card_info.device.device_timezon',
          ),
          device_vendor: t(
            'events_journal_dashboard:app.events_journal_dashboard.table.card_info.device.device_vendor',
          ),
        },
        [EventJournalGroupName.Additionally]: {
          title: t(
            'events_journal_dashboard:app.events_journal_dashboard.table.card_info.additionally.title',
          ),
          customLable1: t(
            'events_journal_dashboard:app.events_journal_dashboard.table.card_info.etc.customLable1',
          ),
          customField1: t(
            'events_journal_dashboard:app.events_journal_dashboard.table.card_info.etc.customField1',
          ),
          customLable2: t(
            'events_journal_dashboard:app.events_journal_dashboard.table.card_info.etc.customLable2',
          ),
          customField2: t(
            'events_journal_dashboard:app.events_journal_dashboard.table.card_info.etc.customField2',
          ),
          rule_tags: t(
            'events_journal_dashboard:app.events_journal_dashboard.table.card_info.service.rule_tags',
          ),
          event_hash: t(
            'events_journal_dashboard:app.events_journal_dashboard.table.card_info.service.event_hash',
          ),
          type: t(
            'events_journal_dashboard:app.events_journal_dashboard.table.card_info.service.type',
          ),
          sign_category: t(
            'events_journal_dashboard:app.events_journal_dashboard.table.card_info.app.sign_category',
          ),
          sign_subcategory: t(
            'events_journal_dashboard:app.events_journal_dashboard.table.card_info.app.sign_subcategory',
          ),
        },
      },
    },
  };
}
