import {
  INFO_MESSAGE_TYPE,
  LOGBOOK_CONTAINER_CONTEXT,
} from '../../../constants/eventTypes';
import { goodComment1 } from '../../GoodEventLibrary';

module.exports = {
  renderingEventListOrEmptyLogbookMessage: [
    {
      description: 'logbook is not public, has no events',
      logbookContext: { name: LOGBOOK_CONTAINER_CONTEXT, isReleased: false },
      getEventsBySelectionFilterResponse1: [],
      getEventCountBySelectionFilterResponse1: { data: '0' },
      expected: {
        showsEventList: false,
        userMessageCount: 1,
        userMessageProps: {
          message: 'The logbook is empty.',
          type: INFO_MESSAGE_TYPE,
        },
      },
    },
    {
      description: 'logbook is not public, has events',
      logbookContext: { name: LOGBOOK_CONTAINER_CONTEXT, isReleased: false },
      getEventsBySelectionFilterResponse1: [goodComment1],
      getEventCountBySelectionFilterResponse1: { data: '1' },
      expected: {
        showsEventList: true,
        userMessageCount: 0,
      },
    },
    {
      description: 'logbook is public, has no events',
      logbookContext: { name: LOGBOOK_CONTAINER_CONTEXT, isReleased: true },
      getEventsBySelectionFilterResponse1: [],
      getEventCountBySelectionFilterResponse1: { data: '0' },
      expected: {
        showsEventList: false,
        userMessageCount: 1,
        userMessageProps: {
          message: 'The logbook is empty.',
          type: INFO_MESSAGE_TYPE,
        },
      },
    },
    {
      description: 'logbook is public, has events',
      logbookContext: { name: LOGBOOK_CONTAINER_CONTEXT, isReleased: true },
      getEventsBySelectionFilterResponse1: [goodComment1],
      getEventCountBySelectionFilterResponse1: { data: '1' },
      expected: {
        showsEventList: true,
        userMessageCount: 0,
      },
    },
  ],
};
