# 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.html#use-parameters-for-application-configuration
parameters:
    app.no_reply_email: 'no-reply@sebego-files.online'
    app.name: 'File Management System'
    app.client_url: '%env(resolve:CLIENT_URL)%'
    timezone: '%env(APP_TIMEZONE)%'
    app.reset_password_link: '%env(resolve:RESET_PASSWORD_LINK)%'
    app.site_url: '%env(resolve:SITE_SERVER_URL)%'
    app.timezone: '%env(APP_TIMEZONE)%'

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.

    # makes classes in src/ available to be used as services
    # this creates a service per class whose id is the fully-qualified class name
    App\:
        resource: '../src/'
        exclude:
            - '../src/DependencyInjection/'
            - '../src/Entity/'
            - '../src/Kernel.php'

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

    'App\Doctrine\UsersExtension':
        tags:
            - { name: api_platform.doctrine.orm.query_extension.collection }

    App\State\FileCreateProcessor:
        bind:
            $decorated: '@api_platform.doctrine.orm.state.persist_processor'
        tags: [ 'api_platform.state_processor' ]

    App\State\ClientCreateProcessor:
        bind:
            $decorated: '@api_platform.doctrine.orm.state.persist_processor'
        tags: [ 'api_platform.state_processor' ]

    App\State\UserUpdateProcessor:
        bind:
            $decorated: '@api_platform.doctrine.orm.state.persist_processor'
        tags: [ 'api_platform.state_processor' ]

    App\State\ClientPutProcessor:
        bind:
            $decorated: '@api_platform.doctrine.orm.state.persist_processor'
        tags: [ 'api_platform.state_processor' ]

    App\State\MatterCreateProcessor:
        bind:
            $decorated: '@api_platform.doctrine.orm.state.persist_processor'
        tags: [ 'api_platform.state_processor' ]

    App\State\CompanyCreateProcessor:
        bind:
            $decorated: '@api_platform.doctrine.orm.state.persist_processor'
        tags: [ 'api_platform.state_processor' ]

    App\Doctrine\ClientSetCreatorListener:
        tags: [ doctrine.orm.entity_listener ]

    App\Doctrine\KycSetCreatorListener:
        tags: [ doctrine.orm.entity_listener ]

    App\Doctrine\FileSetCreatorListener:
        tags: [ doctrine.orm.entity_listener ]

    App\Doctrine\FileStatusSetCreatorListener:
        tags: [ doctrine.orm.entity_listener ]

    App\Doctrine\MatterSetCreatorListener:
        tags: [ doctrine.orm.entity_listener ]

    App\Doctrine\CaseStatusSetCreatorListener:
        tags: [ doctrine.orm.entity_listener ]

    App\Doctrine\CompanySetCreatorListener:
        tags: [ doctrine.orm.entity_listener ]

    App\Doctrine\RepSetCreatorListener:
        tags: [ doctrine.orm.entity_listener ]
