services:
  intercept_event.checkin_period_invalidator:
    class: Drupal\intercept_event\CheckinPeriodInvalidator
    arguments:
      [
        '@cache_tags.invalidator',
        '@config.factory',
        '@datetime.time',
        '@duration_field.service',
        '@entity_type.manager',
        '@state',
      ]

  intercept_event.manager:
    class: Drupal\intercept_event\EventManager
    arguments: ['@current_user', '@entity_type.manager']

  intercept_event.event_attendance_provider:
    class: Drupal\intercept_event\EventAttendanceProvider
    arguments: ['@entity_type.manager', '@current_user']

  intercept_event.event_registration_provider:
    class: Drupal\intercept_event\EventRegistrationProvider
    arguments: ['@entity_type.manager', '@current_user']

  intercept_event.suggested_events_provider:
    class: Drupal\intercept_event\SuggestedEventsProvider
    arguments:
      [
        '@entity_type.manager',
        '@current_user',
        '@intercept_event.event_attendance_provider',
        '@intercept_event.event_registration_provider',
      ]

  intercept_event.recurring_manager:
    class: Drupal\intercept_event\RecurringEventManager
    arguments:
      ['@current_user', '@entity_type.manager', '@messenger', '@intercept_core.utility.dates']

  intercept_event.evaluation_manager:
    class: Drupal\intercept_event\EventEvaluationManager
    arguments: ['@class_resolver', '@current_user', '@entity_type.manager', '@form_builder', '@intercept_event.manager']
  
  intercept_event.event_registration_event_lock:
    class: Drupal\intercept_event\Service\EventRegistrationEventLock
    arguments: ['@lock']

  intercept_event.queue:
    class: Drupal\intercept_event\EventQueue
    arguments: ['@queue']

  intercept_event.user.authentication.cookie:
    class: Drupal\intercept_event\Authentication\Provider\InterceptEventCookie
    arguments: ['@session_configuration', '@database', '@messenger']
    tags:
      - { name: authentication_provider, provider_id: 'cookie', priority: 0, global: TRUE }
      - { name: event_subscriber }
