services:
    ############ CORE ############
    smartgear.backend.component.core.dashboard:
        class: WEM\SmartgearBundle\Backend\Component\Core\Dashboard
        arguments:
            $configurationManager: '@smartgear.config.manager.core'
            $translator: '@contao.translation.translator'
            $module: 'core'
            $type: 'component'
            $configurationEnvFileManager: '@smartgear.config.manager.env_file.local'
            $htaccessAnalyzer: '@smartgear.classes.analyzer.htaccess'
        public: true

    smartgear.backend.component.core.block:
        class: WEM\SmartgearBundle\Backend\Component\Core\Block
        arguments:
            $configurationManager: '@smartgear.config.manager.core'
            $configurationStepManager: '@smartgear.backend.component.core.configuration_step_manager'
            $resetStepManager: '@smartgear.backend.component.core.reset_step_manager'
            $dashboard: '@smartgear.backend.component.core.dashboard'
            $translator: '@contao.translation.translator'
        public: true
    
    smartgear.backend.component.core.resetter:
        class: WEM\SmartgearBundle\Backend\Component\Core\Resetter
        arguments:
            $configurationManager: '@smartgear.config.manager.core'
            $translator: '@contao.translation.translator'
            $localConfigManager: '@smartgear.config.manager.local_config'
            $htaccessAnalyzer: '@smartgear.classes.analyzer.htaccess'
            $module: 'core'
            $type: 'component'
            $templatesDirs: 
                - 'templates/rsce'
                - 'templates/smartgear'
            $componentsResetters:
                - '@smartgear.backend.component.blog.resetter'
                - '@smartgear.backend.component.events.resetter'
                - '@smartgear.backend.component.faq.resetter'
                - '@smartgear.backend.component.form_contact.resetter'
            $modulesResetters:
                - '@smartgear.backend.module.extranet.resetter'
        public: true

    smartgear.backend.component.core.configuration_step_manager:
        class: WEM\SmartgearBundle\Classes\Backend\ConfigurationStepManager
        arguments:
            $configurationManager: '@smartgear.config.manager.core'
            $translator: '@contao.translation.translator'
            $module: 'core'
            $type: 'component'
            $stepSessionKey: 'sg_core_install_step'
            $steps: 
                - '@smartgear.backend.component.core.configuration_step.general'
                # - '@smartgear.backend.component.core.configuration_step.framway_retrieval'
                - '@smartgear.backend.component.core.configuration_step.framway_retrieval_minimal'
                # - '@smartgear.backend.component.core.configuration_step.framway_configuration'
                - '@smartgear.backend.component.core.configuration_step.website'
        public: true

    smartgear.backend.component.core.reset_step_manager:
        class: WEM\SmartgearBundle\Backend\Component\Core\ResetStepManager
        arguments:
            $configurationManager: '@smartgear.config.manager.core'
            $translator: '@contao.translation.translator'
            $module: 'core'
            $type: 'component'
            $stepSessionKey: 'sg_core_reset_step'
            $steps: 
                - '@smartgear.backend.component.core.reset_step.general'
        public: true

    smartgear.backend.component.core.configuration_step.general:
        class: WEM\SmartgearBundle\Backend\Component\Core\ConfigurationStep\General
        arguments:
            $module: 'core'
            $type: 'component'
            $configurationManager: '@smartgear.config.manager.core'
            $localConfigManager: '@smartgear.config.manager.local_config'
            $commandUtil: '@smartgear.classes.command.util'
            $foldersToCreate: 
                - 'assets/smartgear/js'
        public: true

    smartgear.backend.component.core.configuration_step.framway_retrieval:
        class: WEM\SmartgearBundle\Backend\Component\Core\ConfigurationStep\FramwayRetrieval
        arguments:
            $module: 'core'
            $type: 'component'
            $configurationManager: '@smartgear.config.manager.core'
            $framwayUtil: '@smartgear.classes.util_framway'
        public: true

    smartgear.backend.component.core.configuration_step.framway_retrieval_minimal:
        class: WEM\SmartgearBundle\Backend\Component\Core\ConfigurationStep\FramwayRetrievalMinimal
        arguments:
            $module: 'core'
            $type: 'component'
            $configurationManager: '@smartgear.config.manager.core'
            $configurationManagerFramway: '@smartgear.config.manager.framway'
            $framwaySynchronizer: '@smartgear.classes.directories_synchronizer.framway'
            $templateRSCESynchronizer: '@smartgear.classes.directories_synchronizer.templates.rsce'
            $templateSmartgearSynchronizer: '@smartgear.classes.directories_synchronizer.templates.smartgear'
            $templateGeneralSynchronizer: '@smartgear.classes.directories_synchronizer.templates.general'
            $tinyMCEPluginsSynchronizer: '@smartgear.classes.directories_synchronizer.tiny_mce.plugins'
            $tarteAuCitronSynchronizer: '@smartgear.classes.directories_synchronizer.tarte_au_citron'
            $outdatedBrowserSynchronizer: '@smartgear.classes.directories_synchronizer.outdated_browser'
            $socialShareButtonsSynchronizer: '@smartgear.classes.directories_synchronizer.social_share_buttons'
            $framwayUtil: '@smartgear.classes.util_framway'
            $htaccessAnalyzer: '@smartgear.classes.analyzer.htaccess'
        public: true

    smartgear.backend.component.core.configuration_step.framway_configuration:
        class: WEM\SmartgearBundle\Backend\Component\Core\ConfigurationStep\FramwayConfiguration
        arguments:
            $module: 'core'
            $type: 'component'
            $configurationManager: '@smartgear.config.manager.core'
            $configurationManagerFramway: '@smartgear.config.manager.framway'
            $templateRSCESynchronizer: '@smartgear.classes.directories_synchronizer.templates.rsce'
            $templateSmartgearSynchronizer: '@smartgear.classes.directories_synchronizer.templates.smartgear'
            $templateGeneralSynchronizer: '@smartgear.classes.directories_synchronizer.templates.general'
            $tinyMCEPluginsSynchronizer: '@smartgear.classes.directories_synchronizer.tiny_mce.plugins'
            $tarteAuCitronSynchronizer: '@smartgear.classes.directories_synchronizer.tarte_au_citron'
            $outdatedBrowserSynchronizer: '@smartgear.classes.directories_synchronizer.outdated_browser'
            $socialShareButtonsSynchronizer: '@smartgear.classes.directories_synchronizer.social_share_buttons'
            $framwayUtil: '@smartgear.classes.util_framway'
        public: true

    smartgear.backend.component.core.configuration_step.website:
        class: WEM\SmartgearBundle\Backend\Component\Core\ConfigurationStep\Website
        arguments:
            $module: 'core'
            $type: 'component'
            $translator: '@contao.translation.translator'
            $configurationManager: '@smartgear.config.manager.core'
            $updateManager: '@smartgear.update.update_manager'
            $commandUtil: '@smartgear.classes.command.util'
            $userGroupUpdaters:
                - '@smartgear.backend.component.blog.configuration_step.general'
                - '@smartgear.backend.component.events.configuration_step.general'
                - '@smartgear.backend.component.faq.configuration_step.general'
                - '@smartgear.backend.component.form_contact.configuration_step.general'
                - '@smartgear.backend.module.extranet.configuration_step.general'
            $htmlDecoder: '@contao.string.html_decoder'
                
        public: true

    smartgear.backend.component.core.reset_step.general:
        class: WEM\SmartgearBundle\Backend\Component\Core\ResetStep\General
        arguments:
            $module: 'core'
            $type: 'component'
            $configurationManager: '@smartgear.config.manager.core'
            $backupManager: '@smartgear.backup.backup_manager'
            $resetter: '@smartgear.backend.component.core.resetter'
        public: true

    smartgear.backend.component.core.listener.replace_insert_tags:
        class: WEM\SmartgearBundle\Backend\Component\Core\EventListener\ReplaceInsertTagsListener
        arguments:
            $coreConfigurationManager: '@smartgear.config.manager.core'
        public: true

    smartgear.backend.component.core.listener.load_data_container:
        class: WEM\SmartgearBundle\Backend\Component\Core\EventListener\LoadDataContainerListener
        arguments:
            $security: '@security.helper'
            $coreConfigurationManager: '@smartgear.config.manager.core'
            $dcaManipulator: '@smartgear.classes.dca.manipulator'
        public: true

    smartgear.backend.component.core.listener.create_new_user:
        class: WEM\SmartgearBundle\Backend\Component\Core\EventListener\CreateNewUserListener
        arguments:
            $coreConfigurationManager: '@smartgear.config.manager.core'
        public: true

    smartgear.backend.component.core.listener.compile_form_fields:
        class: WEM\SmartgearBundle\Backend\Component\Core\EventListener\CompileFormFieldsListener
        arguments:
            $coreConfigurationManager: '@smartgear.config.manager.core'
        public: true

    smartgear.backend.component.core.listener.backend_menu_build:
        class: WEM\SmartgearBundle\Backend\Component\Core\EventListener\BackendMenuBuildListener
        arguments:
            $translator: '@contao.translation.translator'
            $coreConfigurationManager: '@smartgear.config.manager.core'
        public: true
        tags:
            - { name: kernel.event_listener, event: contao.backend_menu_build, method: __invoke }

    ############ BLOG ############
    
    smartgear.backend.component.blog.block:
        class: WEM\SmartgearBundle\Backend\Component\Blog\Block
        arguments:
            $translator: '@contao.translation.translator'
            $configurationManager: '@smartgear.config.manager.core'
            $configurationStepManager: '@smartgear.backend.component.blog.configuration_step_manager'
            $resetStepManager: '@smartgear.backend.component.blog.reset_step_manager'
            $dashboard: '@smartgear.backend.component.blog.dashboard'
        public: true

    smartgear.backend.component.blog.resetter:
        class: WEM\SmartgearBundle\Backend\Component\Blog\Resetter
        arguments:
            $configurationManager: '@smartgear.config.manager.core'
            $translator: '@contao.translation.translator'
            $module: 'blog'
            $type: 'component'
        public: true

    smartgear.backend.component.blog.configuration_step_manager:
        class: WEM\SmartgearBundle\Backend\Component\Blog\ConfigurationStepManager
        arguments:
            $configurationManager: '@smartgear.config.manager.core'
            $translator: '@contao.translation.translator'
            $module: 'blog'
            $type: 'component'
            $stepSessionKey: 'sg_blog_install_step'
            $steps: 
                - '@smartgear.backend.component.blog.configuration_step.general'
                - '@smartgear.backend.component.blog.configuration_step.dataset'
        public: true

    smartgear.backend.component.blog.configuration_step.general:
        class: WEM\SmartgearBundle\Backend\Component\Blog\ConfigurationStep\General
        arguments:
            $module: 'blog'
            $type: 'component'
            $translator: '@contao.translation.translator'
            $configurationManager: '@smartgear.config.manager.core'
            $commandUtil: '@smartgear.classes.command.util'
        public: true

    smartgear.backend.component.blog.configuration_step.dataset:
        class: WEM\SmartgearBundle\Backend\Component\Blog\ConfigurationStep\Dataset
        arguments:
            $module: 'blog'
            $type: 'component'
            $translator: '@contao.translation.translator'
            $configurationManager: '@smartgear.config.manager.core'
            $commandUtil: '@smartgear.classes.command.util'
            $sourceDirectory: '[public_or_web]/bundles/wemsmartgear/examples/blog'
        public: true

    smartgear.backend.component.blog.dashboard:
        class: WEM\SmartgearBundle\Backend\Component\Blog\Dashboard
        arguments:
            $configurationManager: '@smartgear.config.manager.core'
            $translator: '@contao.translation.translator'
            $module: 'blog'
            $type: 'component'
        public: true

    smartgear.backend.component.blog.reset_step_manager:
        class: WEM\SmartgearBundle\Backend\Component\Blog\ResetStepManager
        arguments:
            $configurationManager: '@smartgear.config.manager.core'
            $translator: '@contao.translation.translator'
            $module: 'blog'
            $type: 'component'
            $stepSessionKey: 'sg_core_reset_step'
            $steps: 
                - '@smartgear.backend.component.blog.reset_step.general'
        public: true

    smartgear.backend.component.blog.reset_step.general:
        class: WEM\SmartgearBundle\Backend\Component\Blog\ResetStep\General
        arguments:
            $module: 'blog'
            $type: 'component'
            $translator: '@contao.translation.translator'
            $configurationManager: '@smartgear.config.manager.core'
            $resetter: '@smartgear.backend.component.blog.resetter'
        public: true

    smartgear.backend.component.blog.listener.replace_insert_tags:
        class: WEM\SmartgearBundle\Backend\Component\Blog\EventListener\ReplaceInsertTagsListener
        arguments:
            $coreConfigurationManager: '@smartgear.config.manager.core'
        public: true

    smartgear.backend.component.blog.listener.load_data_container:
        class: WEM\SmartgearBundle\Backend\Component\Blog\EventListener\LoadDataContainerListener
        arguments:
            $security: '@security.helper'
            $coreConfigurationManager: '@smartgear.config.manager.core'
            $dcaManipulator: '@smartgear.classes.dca.manipulator'
        public: true
        
    smartgear.backend.component.blog.listener.generate_breadcrumb:
        class: WEM\SmartgearBundle\Backend\Component\Blog\EventListener\GenerateBreadcrumbListener
        arguments:
            $coreConfigurationManager: '@smartgear.config.manager.core'
        public: true

    ############ EVENTS ############
    
    smartgear.backend.component.events.block:
        class: WEM\SmartgearBundle\Backend\Component\Events\Block
        arguments:
            $translator: '@contao.translation.translator'
            $configurationManager: '@smartgear.config.manager.core'
            $configurationStepManager: '@smartgear.backend.component.events.configuration_step_manager'
            $resetStepManager: '@smartgear.backend.component.events.reset_step_manager'
            $dashboard: '@smartgear.backend.component.events.dashboard'
        public: true

    smartgear.backend.component.events.resetter:
        class: WEM\SmartgearBundle\Backend\Component\Events\Resetter
        arguments:
            $configurationManager: '@smartgear.config.manager.core'
            $translator: '@contao.translation.translator'
            $module: 'events'
            $type: 'component'
        public: true

    smartgear.backend.component.events.configuration_step_manager:
        class: WEM\SmartgearBundle\Backend\Component\Events\ConfigurationStepManager
        arguments:
            $configurationManager: '@smartgear.config.manager.core'
            $translator: '@contao.translation.translator'
            $module: 'events'
            $type: 'component'
            $stepSessionKey: 'sg_events_install_step'
            $steps: 
                - '@smartgear.backend.component.events.configuration_step.general'
                - '@smartgear.backend.component.events.configuration_step.dataset'
        public: true

    smartgear.backend.component.events.configuration_step.general:
        class: WEM\SmartgearBundle\Backend\Component\Events\ConfigurationStep\General
        arguments:
            $module: 'events'
            $type: 'component'
            $translator: '@contao.translation.translator'
            $configurationManager: '@smartgear.config.manager.core'
            $commandUtil: '@smartgear.classes.command.util'
            $leafletDirectorySynchronizer: '@smartgear.classes.directories_synchronizer.leaflet'
        public: true

    smartgear.backend.component.events.configuration_step.dataset:
        class: WEM\SmartgearBundle\Backend\Component\Events\ConfigurationStep\Dataset
        arguments:
            $module: 'events'
            $type: 'component'
            $translator: '@contao.translation.translator'
            $configurationManager: '@smartgear.config.manager.core'
            $commandUtil: '@smartgear.classes.command.util'
            $sourceDirectory: '[public_or_web]/bundles/wemsmartgear/examples/blog' #yes, re-use blog examples files
        public: true

    smartgear.backend.component.events.dashboard:
        class: WEM\SmartgearBundle\Backend\Component\Events\Dashboard
        arguments:
            $configurationManager: '@smartgear.config.manager.core'
            $translator: '@contao.translation.translator'
            $module: 'events'
            $type: 'component'
        public: true

    smartgear.backend.component.events.reset_step_manager:
        class: WEM\SmartgearBundle\Backend\Component\Events\ResetStepManager
        arguments:
            $configurationManager: '@smartgear.config.manager.core'
            $translator: '@contao.translation.translator'
            $module: 'events'
            $type: 'component'
            $stepSessionKey: 'sg_core_reset_step'
            $steps: 
                - '@smartgear.backend.component.events.reset_step.general'
        public: true

    smartgear.backend.component.events.reset_step.general:
        class: WEM\SmartgearBundle\Backend\Component\Events\ResetStep\General
        arguments:
            $module: 'events'
            $type: 'component'
            $translator: '@contao.translation.translator'
            $configurationManager: '@smartgear.config.manager.core'
            $resetter: '@smartgear.backend.component.events.resetter'
        public: true

    smartgear.backend.component.events.listener.replace_insert_tags:
        class: WEM\SmartgearBundle\Backend\Component\Events\EventListener\ReplaceInsertTagsListener
        arguments:
            $coreConfigurationManager: '@smartgear.config.manager.core'
        public: true

    smartgear.backend.component.events.listener.load_data_container:
        class: WEM\SmartgearBundle\Backend\Component\Events\EventListener\LoadDataContainerListener
        arguments:
            $security: '@security.helper'
            $coreConfigurationManager: '@smartgear.config.manager.core'
            $dcaManipulator: '@smartgear.classes.dca.manipulator'
        public: true
        
    smartgear.backend.component.events.listener.generate_breadcrumb:
        class: WEM\SmartgearBundle\Backend\Component\Events\EventListener\GenerateBreadcrumbListener
        arguments:
            $coreConfigurationManager: '@smartgear.config.manager.core'
        public: true

    

    ############ FAQ ############
    
    smartgear.backend.component.faq.block:
        class: WEM\SmartgearBundle\Backend\Component\Faq\Block
        arguments:
            $translator: '@contao.translation.translator'
            $configurationManager: '@smartgear.config.manager.core'
            $configurationStepManager: '@smartgear.backend.component.faq.configuration_step_manager'
            $resetStepManager: '@smartgear.backend.component.faq.reset_step_manager'
            $dashboard: '@smartgear.backend.component.faq.dashboard'
        public: true

    smartgear.backend.component.faq.resetter:
        class: WEM\SmartgearBundle\Backend\Component\Faq\Resetter
        arguments:
            $configurationManager: '@smartgear.config.manager.core'
            $translator: '@contao.translation.translator'
            $module: 'faq'
            $type: 'component'
        public: true

    smartgear.backend.component.faq.configuration_step_manager:
        class: WEM\SmartgearBundle\Backend\Component\Faq\ConfigurationStepManager
        arguments:
            $configurationManager: '@smartgear.config.manager.core'
            $translator: '@contao.translation.translator'
            $module: 'faq'
            $type: 'component'
            $stepSessionKey: 'sg_faq_install_step'
            $steps: 
                - '@smartgear.backend.component.faq.configuration_step.general'
        public: true

    smartgear.backend.component.faq.configuration_step.general:
        class: WEM\SmartgearBundle\Backend\Component\Faq\ConfigurationStep\General
        arguments:
            $module: 'faq'
            $type: 'component'
            $translator: '@contao.translation.translator'
            $configurationManager: '@smartgear.config.manager.core'
            $commandUtil: '@smartgear.classes.command.util'
        public: true

    smartgear.backend.component.faq.dashboard:
        class: WEM\SmartgearBundle\Backend\Component\Faq\Dashboard
        arguments:
            $configurationManager: '@smartgear.config.manager.core'
            $translator: '@contao.translation.translator'
            $module: 'faq'
            $type: 'component'
        public: true

    smartgear.backend.component.faq.reset_step_manager:
        class: WEM\SmartgearBundle\Backend\Component\Faq\ResetStepManager
        arguments:
            $configurationManager: '@smartgear.config.manager.core'
            $translator: '@contao.translation.translator'
            $module: 'faq'
            $type: 'component'
            $stepSessionKey: 'sg_core_reset_step'
            $steps: 
                - '@smartgear.backend.component.faq.reset_step.general'
        public: true

    smartgear.backend.component.faq.reset_step.general:
        class: WEM\SmartgearBundle\Backend\Component\Faq\ResetStep\General
        arguments:
            $module: 'faq'
            $type: 'component'
            $translator: '@contao.translation.translator'
            $configurationManager: '@smartgear.config.manager.core'
            $resetter: '@smartgear.backend.component.faq.resetter'
        public: true

    smartgear.backend.component.faq.listener.replace_insert_tags:
        class: WEM\SmartgearBundle\Backend\Component\Faq\EventListener\ReplaceInsertTagsListener
        arguments:
            $coreConfigurationManager: '@smartgear.config.manager.core'
        public: true

    smartgear.backend.component.faq.listener.load_data_container:
        class: WEM\SmartgearBundle\Backend\Component\Faq\EventListener\LoadDataContainerListener
        arguments:
            $security: '@security.helper'
            $coreConfigurationManager: '@smartgear.config.manager.core'
            $dcaManipulator: '@smartgear.classes.dca.manipulator'
        public: true

    ############ FormContact ############
    
    smartgear.backend.component.form_contact.block:
        class: WEM\SmartgearBundle\Backend\Component\FormContact\Block
        arguments:
            $translator: '@contao.translation.translator'
            $configurationManager: '@smartgear.config.manager.core'
            $configurationStepManager: '@smartgear.backend.component.form_contact.configuration_step_manager'
            $resetStepManager: '@smartgear.backend.component.form_contact.reset_step_manager'
            $dashboard: '@smartgear.backend.component.form_contact.dashboard'
        public: true

    smartgear.backend.component.form_contact.resetter:
        class: WEM\SmartgearBundle\Backend\Component\FormContact\Resetter
        arguments:
            $configurationManager: '@smartgear.config.manager.core'
            $translator: '@contao.translation.translator'
            $module: 'form_contact'
            $type: 'component'
        public: true

    smartgear.backend.component.form_contact.configuration_step_manager:
        class: WEM\SmartgearBundle\Backend\Component\FormContact\ConfigurationStepManager
        arguments:
            $configurationManager: '@smartgear.config.manager.core'
            $translator: '@contao.translation.translator'
            $module: 'form_contact'
            $type: 'component'
            $stepSessionKey: 'sg_form_contact_install_step'
            $steps: 
                - '@smartgear.backend.component.form_contact.configuration_step.general'
        public: true

    smartgear.backend.component.form_contact.configuration_step.general:
        class: WEM\SmartgearBundle\Backend\Component\FormContact\ConfigurationStep\General
        arguments:
            $module: 'form_contact'
            $type: 'component'
            $translator: '@contao.translation.translator'
            $configurationManager: '@smartgear.config.manager.core'
            $commandUtil: '@smartgear.classes.command.util'
            $htmlDecoder: '@contao.string.html_decoder'
        public: true

    smartgear.backend.component.form_contact.dashboard:
        class: WEM\SmartgearBundle\Backend\Component\FormContact\Dashboard
        arguments:
            $configurationManager: '@smartgear.config.manager.core'
            $translator: '@contao.translation.translator'
            $module: 'form_contact'
            $type: 'component'
        public: true

    smartgear.backend.component.form_contact.reset_step_manager:
        class: WEM\SmartgearBundle\Backend\Component\FormContact\ResetStepManager
        arguments:
            $configurationManager: '@smartgear.config.manager.core'
            $translator: '@contao.translation.translator'
            $module: 'form_contact'
            $type: 'component'
            $stepSessionKey: 'sg_core_reset_step'
            $steps: 
                - '@smartgear.backend.component.form_contact.reset_step.general'
        public: true

    smartgear.backend.component.form_contact.reset_step.general:
        class: WEM\SmartgearBundle\Backend\Component\FormContact\ResetStep\General
        arguments:
            $module: 'form_contact'
            $type: 'component'
            $translator: '@contao.translation.translator'
            $configurationManager: '@smartgear.config.manager.core'
            $resetter: '@smartgear.backend.component.form_contact.resetter'
        public: true

    smartgear.backend.component.form_contact.listener.replace_insert_tags:
        class: WEM\SmartgearBundle\Backend\Component\FormContact\EventListener\ReplaceInsertTagsListener
        arguments:
            $coreConfigurationManager: '@smartgear.config.manager.core'
        public: true