services:
# -----------------------------------------------------------------------------
#                             User providers
# -----------------------------------------------------------------------------
  WebsiteBundle.UserProvider.EmailUserProvider:
    class: WebsiteBundle\UserProvider\EmailUserProvider
    arguments:
      - "@doctrine.orm.entity_manager"

# -----------------------------------------------------------------------------
#                             Services
# -----------------------------------------------------------------------------
  WebsiteBundle.services.EmailService:
    class: WebsiteBundle\Services\EmailService
    arguments:
      - "@mailer"
      - "@translator"
      - "%contact_us_to%"
      - "%mail_from%"
      - "@templating"

# -----------------------------------------------------------------------------
#                             Data services
# -----------------------------------------------------------------------------
  WebsiteBundle.Services.PsychEducationDataService:
    class: WebsiteBundle\Services\Data\PsychEducationDataService
    arguments:
      - "@doctrine.orm.entity_manager"
    tags:
      - { name: APIFrameworkBundle.Data.DataService }
    lazy:  true

  WebsiteBundle.Services.TestDataService:
    class: WebsiteBundle\Services\Data\TestDataService
    arguments:
      - "@doctrine.orm.entity_manager"
      - "@mobile_detect.mobile_detector"
      - "@WebsiteBundle.Services.SessionDataService"
    tags:
      - { name: APIFrameworkBundle.Data.DataService }
    lazy:  true

  WebsiteBundle.Services.SessionDataService:
    class: WebsiteBundle\Services\Data\SessionDataService
    arguments:
      - "@doctrine.orm.entity_manager"
    lazy:  true

  WebsiteBundle.Services.UserStatisticsService:
    class: WebsiteBundle\Services\Data\UserStatisticsService
    arguments:
      - "@doctrine.orm.entity_manager"
    lazy:  true

  WebsiteBundle.Services.MoodQuestionDataService:
    class: WebsiteBundle\Services\Data\MoodQuestionDataService
    arguments:
      - "@doctrine.orm.entity_manager"
      - "@mobile_detect.mobile_detector"
    tags:
      - { name: APIFrameworkBundle.Data.DataService }
    lazy:  true

  WebsiteBundle.Services.QuoteDataService:
    class: WebsiteBundle\Services\Data\QuoteDataService
    arguments:
      - "@doctrine.orm.entity_manager"
    tags:
          - { name: APIFrameworkBundle.Data.DataService }
    lazy:  true

  WebsiteBundle.Services.HomeDashboardDataService:
    class: WebsiteBundle\Services\Dashboard\HomeDashboardDataService
    arguments:
      - "@doctrine.orm.entity_manager"
    lazy:  true

# -----------------------------------------------------------------------------
#                             Page builders
# -----------------------------------------------------------------------------
  WebsiteBundle.PageBuilder.ParticipantFormPageBuilder:
    class: WebsiteBundle\PageBuilder\ParticipantFormPageBuilder
    arguments:
      - "@security.encoder_factory"

# -----------------------------------------------------------------------------
#                             Export services
# -----------------------------------------------------------------------------
  WebsiteBundle.Services.TestAnswerExportDataService:
    class: WebsiteBundle\Services\Export\TestAnswerExportDataService
    arguments:
      - "@doctrine.orm.entity_manager"
      - "@translator"

# -----------------------------------------------------------------------------
#                             Forms
# -----------------------------------------------------------------------------
  WebsiteBundle.form.type.ResearcherAdminType:
    class: WebsiteBundle\Form\Admin\ResearcherAdminType
    arguments: ["@doctrine.orm.entity_manager", "@security.authorization_checker"]
    tags:
      - { name: form.type }

  WebsiteBundle.form.type.ExperimentAdminType:
    class: WebsiteBundle\Form\Admin\ExperimentAdminType
    arguments:
      - "@doctrine.orm.entity_manager"
    tags:
      - { name: form.type }
# -----------------------------------------------------------------------------
#                             Twig extensions
# -----------------------------------------------------------------------------
  bazookas.admin.twig.admin_menu_extension:
      class: WebsiteBundle\Twig\AdminMenuExtension
      arguments:
        - "%kernel.bundles%"
        - "%bazookas_admin.menu%"
      tags:
          - { name: twig.extension }
