parameters:
  dentsoft:
    bearer_token: 'UGNTaWs2clBYQjBIWWI4MGx3YWwrNFdaa0MwSXZoUUE1K3ZvLzFFdm9vZEJIeisyZHZxTlAycGo1WDB1SXg4TAF4h7F4h7'
  apikey:
    google:
      translate: '%env(GOOGLE_TRANSLATE_API_KEY)%)'
  locale: 'tr'
  site_dir: '%kernel.project_dir%/'
  uploads_dir: '%kernel.project_dir%/public/uploads/'
  uploads_url: 'localhost/symfony6/public/uploads/'

services:

  _defaults:
    autowire: true
    autoconfigure: true
    public: false

  Symfony\Component\DependencyInjection\ContainerInterface: '@service_container'

  App\EventSubscriber\ExceptionSubscriber:
    tags:
      - { name: kernel.event_subscriber }

  App\:
    resource: '../src/'
    exclude:
      - '../src/DependencyInjection/'
      - '../src/Entity/'
      - '../src/Kernel.php'
      - '../src/Service/filter/'

  App\Service\Helper:
    arguments:
      - '@Doctrine\ORM\EntityManagerInterface'
      - '@Symfony\Component\HttpFoundation\RequestStack'

  App\Service\Google:
    arguments:
      - '@Doctrine\ORM\EntityManagerInterface'
      - '@Symfony\Component\HttpFoundation\RequestStack'

  App\Service\GoogleTranslateService:
    arguments:
      $googleApiKey: '%env(GOOGLE_TRANSLATE_API_KEY)%'

  App\Controller\Main\FacebookLoginController:
    arguments:
      $clientId: '%env(FACEBOOK_CLIENT_ID)%'
      $urlGenerator: '@router'
    tags: [ 'controller.service_arguments' ]

  App\Controller\Main\DentSoftApiController:
    arguments:
      $apiDomain: '%env(DENTSOFT_API_DOMAIN)%'


  App\Security\FacebookAuthenticator:
    arguments:
      $httpClient: '@http_client'
      $urlGenerator: '@router'
      $passwordHasher: '@Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface'
      $em: '@doctrine.orm.entity_manager'
      $container: '@Symfony\Component\DependencyInjection\ContainerInterface'
      $tokenStorage: '@Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface'
      $clientId: '%env(FACEBOOK_CLIENT_ID)%'
      $clientSecret: '%env(FACEBOOK_CLIENT_SECRET)%'
    tags: [ 'security.authenticator' ]

  App\EventListener\DatabaseActivitySubscriber:
    arguments:
      - '@Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface'
    tags:
      - { name: 'doctrine.event_subscriber', priority: 500, connection: 'default' }

  App\EventListener\LoginSubscriber:
    arguments:
      - '@Doctrine\ORM\EntityManagerInterface'
      - '@Symfony\Component\HttpFoundation\RequestStack'
      - '@App\Service\Helper'

  App\Twig\AppExtension:
    arguments:
      $helper: '@App\Service\Helper'
      $translator: '@translator'
      $em: '@doctrine.orm.entity_manager'
    tags:
      - { name: 'twig.extension' }
