# 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:
    kunstmaan_media.media_handler.remote_video.class: App\Helper\Kunstmaan\RemoteVideoHandler

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.
        bind:
            $page_part_themes:
                default: Default
                orange: Orange
                blue: Blue
                grey: Grey
            $page_part_alignment:
                full: full
                left: left
                right: right

    # 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,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
    App\Controller\:
        resource: '../src/Controller'
        tags: ['controller.service_arguments']

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

    kunstmaan_media.media_handlers.remote_video:
        class: '%kunstmaan_media.media_handler.remote_video.class%'
        arguments: [1, '%kunstmaan_media.remote_video%']
        tags:
            - { name: 'kunstmaan_media.media_handler' }

    kunstmaan_node.node_menu:
        class: 'App\Helper\Kunstmaan\NodeMenu'
        arguments:
            $aclHelper: '@kunstmaan_admin.acl.helper'
            $domainConfiguration: '@kunstmaan_admin.domain_configuration'
            $pages_configuration: '@kunstmaan_node.pages_configuration'
        public: true

    App\Twig\AssetExtension:
        arguments:
            $kernel_root_dir: '%kernel.root_dir%'

    App\Controller\LiipImaginePassthroughController:
        arguments: ['@liip_imagine.filter.configuration']

    App\Service\Mapper:
        arguments:
            $google_api_key: "%env(GOOGLE_MAP_API_KEY)%"

    App\Helper\Menu\AdminPanelAdaptor:
        tags:
            - { name: 'kunstmaan_admin.admin_panel.adaptor', priority: 1 }
