services:
  ccsoccer.team_manager:
    class: Drupal\ccsoccer\Service\TeamManagerService
    arguments: ['@entity_type.manager', '@logger.factory']

  ccsoccer.season_registration:
    class: Drupal\ccsoccer\Service\SeasonRegistrationService
    arguments: ['@entity_type.manager', '@commerce_order.order_refresh', '@logger.factory']

  ccsoccer.tournament_registration:
    class: Drupal\ccsoccer\Service\TournamentRegistrationService
    arguments: ['@entity_type.manager', '@commerce_order.order_refresh', '@logger.factory']

  ccsoccer.team_balancer:
    class: Drupal\ccsoccer\Service\TeamBalancerService
    arguments: ['@entity_type.manager', '@logger.factory']

  ccsoccer.tournament_team_manager:
    class: Drupal\ccsoccer\Service\TournamentTeamManager
    arguments: ['@entity_type.manager', '@logger.factory']

  ccsoccer.schedule_generator:
    class: Drupal\ccsoccer\Service\ScheduleGeneratorService
    arguments: ['@entity_type.manager', '@logger.factory', '@tempstore.private']

  ccsoccer.tournament_schedule_generator:
    class: Drupal\ccsoccer\Service\TournamentScheduleGeneratorService
    arguments: ['@entity_type.manager', '@logger.factory', '@tempstore.private', '@database', '@current_user']

  ccsoccer.schedule_grid_builder:
    class: Drupal\ccsoccer\Service\ScheduleGridBuilder
    arguments: ['@entity_type.manager']

  ccsoccer.tournament_schedule_grid_builder:
    class: Drupal\ccsoccer\Service\TournamentScheduleGridBuilder
    arguments: ['@entity_type.manager']

  ccsoccer.waitlist_manager:
    class: Drupal\ccsoccer\Service\WaitlistManagerService
    arguments: ['@entity_type.manager', '@current_user', '@ccsoccer.notification']

  ccsoccer.credit_manager:
    class: Drupal\ccsoccer\Service\CreditManagerService
    arguments: ['@entity_type.manager', '@logger.factory']

  ccsoccer.notification:
    class: Drupal\ccsoccer\Service\NotificationService
    arguments:
      - '@entity_type.manager'
      - '@plugin.manager.mail'
      - '@http_client'
      - '@config.factory'
      - '@queue'
      - '@current_user'
      - '@logger.factory'

  ccsoccer.group_dissolve:
    class: Drupal\ccsoccer\Service\GroupDissolveService
    arguments: ['@entity_type.manager', '@logger.factory', '@ccsoccer.notification']

  ccsoccer.override_manager:
    class: Drupal\ccsoccer\Service\OverrideManagerService
    arguments: ['@entity_type.manager', '@datetime.time', '@logger.factory']

  ccsoccer.commerce_product:
    class: Drupal\ccsoccer\Service\CommerceProductService
    arguments: ['@entity_type.manager']

  ccsoccer.pdf:
    class: Drupal\ccsoccer\Service\PdfService

  ccsoccer.city_report:
    class: Drupal\ccsoccer\Service\CityReportService
    arguments:
      - '@ccsoccer.pdf'
      - '@entity_type.manager'
      - '@current_user'

  ccsoccer.schedule_pdf:
    class: Drupal\ccsoccer\Service\SchedulePdfService
    arguments:
      - '@ccsoccer.pdf'
      - '@entity_type.manager'
      - '@current_user'

  ccsoccer.insurance_report:
    class: Drupal\ccsoccer\Service\InsuranceReportService
    arguments:
      - '@entity_type.manager'

  ccsoccer.user_profile_theme_negotiator:
    class: Drupal\ccsoccer\Theme\UserProfileThemeNegotiator
    arguments: ['@config.factory']
    tags:
      - { name: theme_negotiator, priority: 100 }

  ccsoccer.discount_order_processor:
    class: Drupal\ccsoccer\Commerce\DiscountOrderProcessor
    arguments: ['@entity_type.manager']
    tags:
      - { name: commerce_order.order_processor, priority: 100 }

  ccsoccer.team_paid_order_processor:
    class: Drupal\ccsoccer\Commerce\TeamPaidOrderProcessor
    arguments: ['@entity_type.manager']
    tags:
      - { name: commerce_order.order_processor, priority: 200 }

  ccsoccer.order_complete_subscriber:
    class: Drupal\ccsoccer\EventSubscriber\OrderCompleteSubscriber
    arguments:
      - '@entity_type.manager'
      - '@logger.factory'
      - '@ccsoccer.notification'
      - '@ccsoccer.credit_manager'
    tags:
      - { name: event_subscriber }

  ccsoccer.cart_event_subscriber:
    class: Drupal\ccsoccer\EventSubscriber\CartEventSubscriber
    arguments:
      - '@messenger'
      - '@logger.factory'
    tags:
      - { name: event_subscriber }
