# This file is the entry point to configure your own services.
# Files in the packages/ subdirectory configure your dependencies.

# Put parameters here that don't need to change on each machine where the app is deployed
# https://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration
parameters:
  locale: "fr"

services:
  # default configuration for services in *this* file
  _defaults:
    autowire: true # Automatically injects dependencies in your services.
    autoconfigure: true # Automatically registers your services as commands, event subscribers, etc.
    public:
      false # Allows optimizing the container by removing unused services; this also means
      # fetching services directly from the container via $container->get() won't work.
      # The best practice is to be explicit about your dependencies anyway.

  # makes classes in src/ available to be used as services
  # this creates a service per class whose id is the fully-qualified class name
  Mobicoop\Bundle\MobicoopBundle\Service\:
    resource: "@MobicoopBundle/Service/*"
    exclude: "../{DependencyInjection,Entity,Migrations,Tests,Kernel.php}"

  ### controllers are imported separately to make sure services can be injected
  ### as action arguments even if you don't extend any base controller class
  Mobicoop\Bundle\MobicoopBundle\Controller\:
    resource: "@MobicoopBundle/Controller/*"
    tags: ["controller.service_arguments"]

  # add more service definitions when explicit configuration is needed
  # please note that last definitions always *replace* previous ones

  # other services and controllers

  # Api
  Mobicoop\Bundle\MobicoopBundle\Api\Service\:
    resource: "@MobicoopBundle/Api/Service/*"

  Mobicoop\Bundle\MobicoopBundle\Api\Serializer\:
    resource: "@MobicoopBundle/Api/Serializer/*"

  # Article
  Mobicoop\Bundle\MobicoopBundle\Article\Controller\:
    resource: "@MobicoopBundle/Article/Controller/*"
  Mobicoop\Bundle\MobicoopBundle\Article\Service\:
    resource: "@MobicoopBundle/Article/Service/*"
  Mobicoop\Bundle\MobicoopBundle\Article\Security\:
    resource: "@MobicoopBundle/Article/Security/*"

  # Carpool
  Mobicoop\Bundle\MobicoopBundle\Carpool\Controller\:
    resource: "@MobicoopBundle/Carpool/Controller/*"
    tags: ["controller.service_arguments"]
    arguments:
      $midPrice: "%env(resolve:MID_PRICE)%"
      $highPrice: "%env(resolve:HIGH_PRICE)%"
      $forbiddenPrice: "%env(resolve:FORBIDDEN_PRICE)%"
      $defaultRole: "%env(resolve:CARPOOL_ROLE_TO_SEARCH)%"
      $defaultRegular: "%env(bool:CARPOOL_SEARCH_REGULAR)%"
      $platformName: "%env(resolve:APP_NAME)%"
      $carpoolRDEXJourneys: "%env(bool:CARPOOL_RDEX_JOURNEYS)%"
      $ptResults: "%env(int:PT_RESULTS)%"
      $participationText: "%env(bool:PARTICIPATION_TEXT)%"
      $fraudWarningDisplay: "%env(bool:FRAUD_WARNING_DISPLAY)%"
      $ageDisplay: "%env(bool:AGE_DISPLAY)%"
      $birthdateDisplay: "%env(bool:BIRTHDATE_DISPLAY)%"
      $seatNumber: "%env(int:SEAT_NUMBER)%"
      $defaultSeatNumber: "%env(int:DEFAULT_SEAT_NUMBER)%"
      $contentPassenger: "%env(bool:CONTENT_PASSENGER)%"
      $carpoolSettingsDisplay: "%env(bool:CARPOOL_SETTINGS_DISPLAY)%"
      $carpoolStandardBookingEnabled: "%env(bool:CARPOOL_STANDARD_BOOKING_ENABLED)%"
      $carpoolStandardMessagingEnabled: "%env(bool:CARPOOL_STANDARD_MESSAGING_ENABLED)%"
      $specificTerms: "%env(bool:CARPOOL_SPECIFIC_TERMS)%"
      $defaultRoleToPublish: "%env(resolve:CARPOOL_ROLE_TO_PUBLISH)%"
      $bothRoleEnabled: "%env(bool:CARPOOL_ROLE_BOTH_ENABLED)%"
      $carpoolTimezone: "%env(string:CARPOOL_TIMEZONE)%"

  Mobicoop\Bundle\MobicoopBundle\Carpool\Service\:
    resource: "@MobicoopBundle/Carpool/Service/*"
  Mobicoop\Bundle\MobicoopBundle\Carpool\Security\:
    resource: "@MobicoopBundle/Carpool/Security/*"

  # Communication
  Mobicoop\Bundle\MobicoopBundle\Communication\Controller\:
    resource: "@MobicoopBundle/Communication/Controller/*"
    tags: ["controller.service_arguments"]
  Mobicoop\Bundle\MobicoopBundle\Communication\Service\:
    resource: "@MobicoopBundle/Communication/Service/*"
  Mobicoop\Bundle\MobicoopBundle\Communication\Security\:
    resource: "@MobicoopBundle/Communication/Security/*"

  # Community
  Mobicoop\Bundle\MobicoopBundle\Community\Controller\:
    resource: "@MobicoopBundle/Community/Controller/*"
    arguments:
      $createFromFront: "%env(bool:COMMUNITIES_CREATE_FROM_FRONT)%"
      $communityUserDirectMessage: "%env(bool:COMMUNITY_USER_DIRECT_MESSAGE)%"
      $defaultNbCommunitiesPerPage: "%env(int:COMMUNITY_DEFAULT_NB_COMMUNITIES_PER_PAGE)%"
      $communityWidget: "%env(bool:COMMUNITY_WIDGET)%"
  Mobicoop\Bundle\MobicoopBundle\Community\Service\:
    resource: "@MobicoopBundle/Community/Service/*"
  Mobicoop\Bundle\MobicoopBundle\Community\Security\:
    resource: "@MobicoopBundle/Community/Security/*"
  Mobicoop\Bundle\MobicoopBundle\Community\Service\CommunityManager:
    arguments:
      $territoryFilter: "%env(json:COMMUNITY_TERRITORY_FILTER)%"

  # DataProvider
  Mobicoop\Bundle\MobicoopBundle\Api\Service\DataProvider:
    arguments:
      $uri: "%env(resolve:API_URI)%"
      $username: "%env(resolve:API_USERNAME)%"
      $password: "%env(resolve:API_PASSWORD)%"
      $authPath: "%env(resolve:API_AUTH_PATH)%"
      $loginPath: "%env(resolve:API_LOGIN_PATH)%"
      $loginDelegatePath: "%env(resolve:API_LOGIN_DELEGATE_PATH)%"
      $refreshPath: "%env(resolve:API_REFRESH_PATH)%"
      $loginTokenPath: "%env(resolve:API_LOGIN_TOKEN_PATH)%"
      $loginSsoPath: "%env(resolve:API_LOGIN_SSO_PATH)%"
      $tokenId: "%env(resolve:API_TOKEN_ID)%"
    shared: false

  # Default Controller
  Mobicoop\Bundle\MobicoopBundle\Controller\DefaultController:
    arguments:
      $searchComponentHorizontal: "%env(bool:CARPOOL_SEARCH_HORIZONTAL)%"

  # Editorial
  Mobicoop\Bundle\MobicoopBundle\Editorial\Controller\:
    resource: "@MobicoopBundle/Editorial/Controller/*"
    tags: ["controller.service_arguments"]
  Mobicoop\Bundle\MobicoopBundle\Editorial\Service\:
    resource: "@MobicoopBundle/Editorial/Service/*"

  # Event
  Mobicoop\Bundle\MobicoopBundle\Event\Controller\:
    resource: "@MobicoopBundle/Event/Controller/*"
    arguments:
      $mandatoryDescription: "%env(bool:EVENT_MANDATORY_DESCRIPTION)%"
      $mandatoryFullDescription: "%env(bool:EVENT_MANDATORY_FULL_DESCRIPTION)%"
      $mandatoryImage: "%env(bool:EVENT_MANDATORY_IMAGE)%"
      $defaultNbEventsPerPage: "%env(int:EVENT_DEFAULT_NB_EVENTS_PER_PAGE)%"
      $eventAssociatedToCommunity: "%env(json:EVENT_ASSOCIATED_TO_COMMUNITY)%"
      $eventWidget: "%env(bool:EVENT_WIDGET)%"

  Mobicoop\Bundle\MobicoopBundle\Event\Service\:
    resource: "@MobicoopBundle/Event/Service/*"
  Mobicoop\Bundle\MobicoopBundle\Event\Security\:
    resource: "@MobicoopBundle/Event/Security/*"
  Mobicoop\Bundle\MobicoopBundle\Event\Service\EventManager:
    arguments:
      $territoryFilter: "%env(json:EVENT_TERRITORY_FILTER)%"

  # Event Listener
  Mobicoop\Bundle\MobicoopBundle\EventListener\ExceptionListener:
    arguments: ["@router"]
    tags:
      - { name: kernel.event_listener, event: kernel.exception }

  # Event Subscriber
  Mobicoop\Bundle\MobicoopBundle\EventSubscriber\RequestSubscriber:
    tags:
      - { name: kernel.event_subscriber, event: kernel.request }

  # External journey
  Mobicoop\Bundle\MobicoopBundle\ExternalJourney\Service\:
    resource: "@MobicoopBundle/ExternalJourney/Service/*"

  #Gamification
  Mobicoop\Bundle\MobicoopBundle\Gamification\Controller\:
    resource: "@MobicoopBundle/Gamification/Controller/*"
    tags: ["controller.service_arguments"]
  Mobicoop\Bundle\MobicoopBundle\Gamification\Service\:
    resource: "@MobicoopBundle/Gamification/Service/*"

  #Gratuity
  Mobicoop\Bundle\MobicoopBundle\Gratuity\Controller\:
    resource: "@MobicoopBundle/Gratuity/Controller/*"
    tags: ["controller.service_arguments"]
  Mobicoop\Bundle\MobicoopBundle\Gratuity\Service\:
    resource: "@MobicoopBundle/Gratuity/Service/*"

  # Geography
  Mobicoop\Bundle\MobicoopBundle\Geography\Controller\:
    resource: "@MobicoopBundle/Geography/Controller/*"
    tags: ["controller.service_arguments"]
  Mobicoop\Bundle\MobicoopBundle\Geography\Service\:
    resource: "@MobicoopBundle/Geography/Service/*"

  # Image
  Mobicoop\Bundle\MobicoopBundle\Image\Service\:
    resource: "@MobicoopBundle/Image/Service/*"

  # Import
  Mobicoop\Bundle\MobicoopBundle\Import\Service\:
    resource: "@MobicoopBundle/Import/Service/*"

  # Journey
  Mobicoop\Bundle\MobicoopBundle\Journey\Controller\:
    resource: "@MobicoopBundle/Journey/Controller/*"
    tags: ["controller.service_arguments"]
  Mobicoop\Bundle\MobicoopBundle\Journey\Service\:
    resource: "@MobicoopBundle/Journey/Service/*"

  # Mass
  Mobicoop\Bundle\MobicoopBundle\Match\Service\:
    resource: "@MobicoopBundle/Match/Service/*"

  # Payment
  Mobicoop\Bundle\MobicoopBundle\Payment\Service\:
    resource: "@MobicoopBundle/Payment/Service/*"

  # Permission
  Mobicoop\Bundle\MobicoopBundle\Permission\Service\:
    resource: "@MobicoopBundle/Permission/Service/*"

  # Price
  Mobicoop\Bundle\MobicoopBundle\Price\Controller\:
    resource: "@MobicoopBundle/Price/Controller/*"
    tags: ["controller.service_arguments"]
  Mobicoop\Bundle\MobicoopBundle\Price\Service\:
    resource: "@MobicoopBundle/Price/Service/*"

  # Public transport
  Mobicoop\Bundle\MobicoopBundle\PublicTransport\Service\:
    resource: "@MobicoopBundle/PublicTransport/Service/*"

  # Relay point
  Mobicoop\Bundle\MobicoopBundle\RelayPoint\Controller\:
    resource: "@MobicoopBundle/RelayPoint/Controller/*"
  Mobicoop\Bundle\MobicoopBundle\RelayPoint\Service\:
    resource: "@MobicoopBundle/RelayPoint/Service/*"
  Mobicoop\Bundle\MobicoopBundle\RelayPoint\Service\RelayPointManager:
    arguments:
      $bbox: "%env(json:BBOX)%"
      $relaypointsMapByDefaultType: "%env(bool:RELAYPOINTS_MAP_BY_DEFAULT_TYPE)%"
      $defaultRelayPointTypeLayer: "%env(int:DEFAULT_RELAYPOINTTYPE_LAYER)%"
      $referenceTerritory: "%env(resolve:REFERENCE_TERRITORY)%"
      $relaypointsMapTypesDisplayed: "%env(json:RELAYPOINTS_MAP_TYPES_DISPLAYED)%"

  # Solidary
  Mobicoop\Bundle\MobicoopBundle\Solidary\Controller\:
    resource: "@MobicoopBundle/Solidary/Controller/*"
    tags: ["controller.service_arguments"]
  Mobicoop\Bundle\MobicoopBundle\Solidary\Service\:
    resource: "@MobicoopBundle/Solidary/Service/*"

  # User
  Mobicoop\Bundle\MobicoopBundle\User\Controller\:
    resource: "@MobicoopBundle/User/Controller/*"
    arguments:
      $facebook_show: "%env(resolve:FACEBOOK_SHOW)%"
      $facebook_appid: "%env(resolve:FACEBOOK_APPID)%"
      $required_home_address: "%env(resolve:REQUIRED_HOME_ADDRESS)%"
      $required_community: "%env(resolve:REQUIRED_COMMUNITY)%"
      $news_subscription: "%env(bool:NEWS_SUBSCRIPTION)%"
      $community_show: "%env(resolve:COMMUNITY_SHOW)%"
      $signUpLinkInConnection: "%env(bool:SIGNUP_LINK_IN_CONNECTION)%"
      $loginLinkInConnection: "%env(bool:LOGIN_LINK_IN_SIGNUP)%"
      $signupRgpdInfos: "%env(bool:SIGNUP_RGPD_INFOS)%"
      $solidaryDisplay: "%env(bool:SOLIDARY_DISPLAY)%"
      $paymentElectronicActive: "%env(bool:PAYMENT_ELECTRONIC_ACTIVE)%"
      $validationDocsAuthorizedExtensions: "%env(string:VALIDATION_DOC_AUTHORIZED_EXTENTIONS)%"
      $loginDelegate: "%env(bool:LOGIN_DELEGATE)%"
      $fraudWarningDisplay: "%env(bool:FRAUD_WARNING_DISPLAY)%"
      $ageDisplay: "%env(bool:AGE_DISPLAY)%"
      $birthDateDisplay: "%env(bool:BIRTHDATE_DISPLAY)%"
      $carpoolSettingsDisplay: "%env(bool:CARPOOL_SETTINGS_DISPLAY)%"
      $signInSsoOriented: "%env(bool:SIGNIN_SSO_ORIENTED)%"
      $ceeDisplay: "%env(bool:CEE_DISPLAY)%"
      $gendersList: "%env(json:SIGNUP_GENDERS_LIST)%"
      $specificTerms: "%env(bool:SIGNUP_SPECIFIC_TERMS)%"
      $phoneCodes: "%env(json:file:resolve:PHONE_CODES)%"
      $minorProtectionActivated: "%env(bool:MINOR_PROTECTION_ACTIVATED)%"
      $authorizedReferrals: "%env(json:SIGNUP_AUTHORIZED_REFERRALS)%"
    tags: ["controller.service_arguments"]
  Mobicoop\Bundle\MobicoopBundle\User\Service\:
    resource: "@MobicoopBundle/User/Service/*"
    arguments:
      $carpoolTimezone: "%env(string:CARPOOL_TIMEZONE)%"

  Mobicoop\Bundle\MobicoopBundle\User\Security\:
    resource: "@MobicoopBundle/User/Security/*"

  # Payment
  Mobicoop\Bundle\MobicoopBundle\Payment\Controller\PaymentController:
    arguments:
      $payment_electronic_active: "%env(bool:PAYMENT_ELECTRONIC_ACTIVE)%"
      $tipsEncouragement: "%env(bool:PAYMENT_TIPS_ENCOURAGEMENT)%"

  # I18n
  Mobicoop\Bundle\MobicoopBundle\I18n\Service\:
    resource: "@MobicoopBundle/I18n/Service/*"

  # Incentive
  Mobicoop\Bundle\MobicoopBundle\Incentive\Service\:
    resource: "@MobicoopBundle/Incentive/Service/*"

  # Stats
  Mobicoop\Bundle\MobicoopBundle\Stats\Controller\:
    resource: "@MobicoopBundle/Stats/Controller/*"
    tags: ["controller.service_arguments"]
  Mobicoop\Bundle\MobicoopBundle\Stats\Service\:
    resource: "@MobicoopBundle/Stats/Service/*"

  # Territories
  Mobicoop\Bundle\MobicoopBundle\Territory\Controller\:
    resource: "@MobicoopBundle/Territory/Controller/*"
  Mobicoop\Bundle\MobicoopBundle\Territory\Service\:
    resource: "@MobicoopBundle/Territory/Service/*"

  # EEC
  Mobicoop\Bundle\MobicoopBundle\Eec\Controller\:
    resource: "@MobicoopBundle/Eec/Controller/*"
    tags: ["controller.service_arguments"]

  # Assistive devices
  Mobicoop\Bundle\MobicoopBundle\Incentive\Controller\:
    resource: "@MobicoopBundle/Incentive/Controller/*"
    tags: ["controller.service_arguments"]
    arguments:
      $assistiveSsoProvider: "%env(string:ASSISTIVE_SSO_PROVIDER)%"

  # Carpool Standard
  Mobicoop\Bundle\MobicoopBundle\CarpoolStandard\Controller\:
    resource: "@MobicoopBundle/CarpoolStandard/Controller/*"
    arguments:
      $operatorIdentifier: "%env(string:CARPOOL_STANDARD_OPERATOR_IDENTIFIER)%"
  Mobicoop\Bundle\MobicoopBundle\CarpoolStandard\Service\:
    resource: "@MobicoopBundle/CarpoolStandard/Service/*"
    arguments:
      $operatorIdentifier: "%env(string:CARPOOL_STANDARD_OPERATOR_IDENTIFIER)%"
      $carpoolTimezone: "%env(string:CARPOOL_TIMEZONE)%"
