services:
    # smartgear.backend.backupservice:
    #     class: WEM\SmartgearBundle\Backup\BackupService
    #     arguments:
    #         - '@contao.framework'
    #         - '@filesystem'
    #         - '@contao.slug.generator'
    #         - '@request_stack'
    #     public: true
    # smartgear.backend.updater:
    #     class: WEM\SmartgearBundle\Updater\UpdaterService
    #     arguments:
    #         - '@contao.framework'
    #         - '@filesystem'
    #         - '@contao.slug.generator'
    #         - '@request_stack'
    #     public: true

    smartgear.backend.smartgear:
        class: WEM\SmartgearBundle\Backend\Smartgear
        public: true

    smartgear.backend.dashboard:
        class: WEM\SmartgearBundle\Backend\Dashboard
        public: true

    smartgear.backend.dashboard.shortcut_internal:
        class: WEM\SmartgearBundle\Backend\Dashboard\ShortcutInternal
        arguments:
            $translator: '@contao.translation.translator'
            $configurationManager: '@smartgear.config.manager.core'
        public: true

    smartgear.backend.dashboard.shortcut_external:
        class: WEM\SmartgearBundle\Backend\Dashboard\ShortcutExternal
        arguments:
            $translator: '@contao.translation.translator'
            $configurationManager: '@smartgear.config.manager.core'
        public: true

    smartgear.backend.dashboard.analytics_internal:
        class: WEM\SmartgearBundle\Backend\Dashboard\AnalyticsInternal
        arguments:
            $translator: '@contao.translation.translator'
            $configurationManager: '@smartgear.config.manager.core'
        public: true

    smartgear.backend.dashboard.analytics_external:
        class: WEM\SmartgearBundle\Backend\Dashboard\AnalyticsExternal
        arguments:
            $translator: '@contao.translation.translator'
            $configurationManager: '@smartgear.config.manager.core'
            $airtableApi: '@smartgear.api.airtable.v0.api'
        public: true

    smartgear.backend.dashboard.support:
        class: WEM\SmartgearBundle\Backend\Dashboard\Support
        arguments:
            $translator: '@contao.translation.translator'
            $configurationManager: '@smartgear.config.manager.core'
            $airtableApi: '@smartgear.api.airtable.v0.api'
        public: true

    smartgear.classes.directories_synchronizer.templates.rsce:
        class: WEM\SmartgearBundle\Classes\DirectoriesSynchronizer
        arguments:
            $translator: '@contao.translation.translator'
            $sourceDirectory: '[public_or_web]/bundles/wemsmartgear/contao_files/templates/rsce'
            $destinationDirectory: 'templates/rsce'
            $rootDir: '%kernel.project_dir%'
            $manageSubfolders: true
        public: true

    smartgear.classes.directories_synchronizer.templates.smartgear:
        class: WEM\SmartgearBundle\Classes\DirectoriesSynchronizer
        arguments:
            $translator: '@contao.translation.translator'
            $sourceDirectory: '[public_or_web]/bundles/wemsmartgear/contao_files/templates/smartgear'
            $destinationDirectory: 'templates/smartgear'
            $rootDir: '%kernel.project_dir%'
            $manageSubfolders: true
        public: true

    smartgear.classes.directories_synchronizer.templates.general:
        class: WEM\SmartgearBundle\Classes\DirectoriesSynchronizer
        arguments:
            $translator: '@contao.translation.translator'
            $sourceDirectory: '[public_or_web]/bundles/wemsmartgear/contao_files/templates'
            $destinationDirectory: 'templates'
            $rootDir: '%kernel.project_dir%'
            $manageSubfolders: false
        public: true

    smartgear.classes.directories_synchronizer.tiny_mce.plugins:
        class: WEM\SmartgearBundle\Classes\DirectoriesSynchronizer
        arguments:
            $translator: '@contao.translation.translator'
            $sourceDirectory: '[public_or_web]/bundles/wemsmartgear/contao_files/assets/tinymce4/js/plugins'
            $destinationDirectory: 'assets/tinymce4/js/plugins'
            $rootDir: '%kernel.project_dir%'
            $manageSubfolders: true
        public: true

    smartgear.classes.directories_synchronizer.outdated_browser:
        class: WEM\SmartgearBundle\Classes\DirectoriesSynchronizer
        arguments:
            $translator: '@contao.translation.translator'
            $sourceDirectory: '[public_or_web]/bundles/wemsmartgear/contao_files/files/vendor/outdatedbrowser'
            $destinationDirectory: 'assets/outdatedbrowser'
            $rootDir: '%kernel.project_dir%'
            $manageSubfolders: true
        public: true

    smartgear.classes.directories_synchronizer.tarte_au_citron:
        class: WEM\SmartgearBundle\Classes\DirectoriesSynchronizer
        arguments:
            $translator: '@contao.translation.translator'
            $sourceDirectory: '[public_or_web]/bundles/wemsmartgear/contao_files/files/vendor/tarteaucitron'
            $destinationDirectory: 'assets/tarteaucitron'
            $rootDir: '%kernel.project_dir%'
            $manageSubfolders: true
        public: true

    smartgear.classes.directories_synchronizer.social_share_buttons:
        class: WEM\SmartgearBundle\Classes\DirectoriesSynchronizer
        arguments:
            $translator: '@contao.translation.translator'
            $sourceDirectory: '[public_or_web]/bundles/wemsmartgear/contao_files/assets/smartgear/social-share-buttons'
            $destinationDirectory: 'assets/smartgear/social-share-buttons'
            $rootDir: '%kernel.project_dir%'
            $manageSubfolders: true
        public: true

    smartgear.classes.directories_synchronizer.framway:
        class: WEM\SmartgearBundle\Classes\DirectoriesSynchronizer
        arguments:
            $translator: '@contao.translation.translator'
            $sourceDirectory: '[public_or_web]/bundles/wemsmartgear/contao_files/assets/framway'
            $destinationDirectory: 'assets/framway'
            $rootDir: '%kernel.project_dir%'
            $manageSubfolders: true
        public: true

    smartgear.classes.directories_synchronizer.leaflet:
        class: WEM\SmartgearBundle\Classes\DirectoriesSynchronizer
        arguments:
            $translator: '@contao.translation.translator'
            $sourceDirectory: '[public_or_web]/bundles/wemsmartgear/contao_files/assets/leaflet'
            $destinationDirectory: 'assets/leaflet'
            $rootDir: '%kernel.project_dir%'
            $manageSubfolders: true
        public: true

    smartgear.config.manager.core:
        class: WEM\SmartgearBundle\Classes\Config\Manager\ManagerJson
        arguments:
            $translator: '@contao.translation.translator'
            $configuration: '@smartgear.config.core'
            $configurationFilePath: './assets/smartgear/config_core.json'
        public: true

    smartgear.classes.analyzer.htaccess:
        class: WEM\SmartgearBundle\Classes\Analyzer\Htaccess
        arguments:
            $htAccessFilePath: './.htaccess'
            # $htAccessFilePath: '[public_or_web]/.htaccess'
        public: true

    smartgear.classes.api.security.api_key:
        class: WEM\SmartgearBundle\Classes\Api\Security\ApiKey
        arguments:
            $framework: '@contao.framework'
            $coreConfigurationManager: '@smartgear.config.manager.core'
        public: true

    smartgear.classes.api.security.token:
        class: WEM\SmartgearBundle\Classes\Api\Security\Token
        arguments:
            $framework: '@contao.framework'
        public: true

    smartgear.classes.version.version:
        class: WEM\SmartgearBundle\Classes\Version\Version
        public: true

    smartgear.classes.version.comparator:
        class: WEM\SmartgearBundle\Classes\Version\Comparator
        public: true

    smartgear.classes.command.util:
        class: WEM\SmartgearBundle\Classes\Command\Util
        arguments:
            $rootDir: '%kernel.project_dir%'
        public: true

    smartgear.classes.util_framway:
        class: WEM\SmartgearBundle\Classes\UtilFramway
        arguments:
            $configurationManager: '@smartgear.config.manager.core'
            $configurationThemeManager: '@smartgear.config.manager.framway_theme'
            $configurationCombinedManager: '@smartgear.config.manager.framway_combined'
            $commandUtil: '@smartgear.classes.command.util'
        public: true

    smartgear.classes.dca.manipulator:
        class: WEM\SmartgearBundle\Classes\Dca\Manipulator
        public: true

    smartgear.classes.template_finder:
        class: WEM\SmartgearBundle\Classes\TemplateFinder
        arguments:
            $projectDir: '%kernel.project_dir%'
            $configurationManager : '@smartgear.config.manager.core'
        public: true

    smartgear.classes.scope_matcher:
        class: WEM\SmartgearBundle\Classes\ScopeMatcher
        arguments:
            $requestStack: '@request_stack'
            $scopeMatcher : '@contao.routing.scope_matcher'
        public: true

    smartgear.classes.custom_language_file_loader:
        class: WEM\SmartgearBundle\Classes\CustomLanguageFileLoader
        public: true
        

    smartgear.config.manager.framway:
        class: WEM\SmartgearBundle\Config\Manager\Framway
        arguments:
            $translator: '@contao.translation.translator'
            $configuration: '@smartgear.config.framway'
            $configurationManagerCore: '@smartgear.config.manager.core'
        public: true

    smartgear.config.manager.framway_theme:
        class: WEM\SmartgearBundle\Config\Manager\FramwayTheme
        arguments:
            $translator: '@contao.translation.translator'
            $configuration: '@smartgear.config.framway_theme'
            $configurationManagerCore: '@smartgear.config.manager.core'
        public: true

    smartgear.config.manager.framway_combined:
        class: WEM\SmartgearBundle\Config\Manager\FramwayCombined
        arguments:
            $translator: '@contao.translation.translator'
            $configuration: '@smartgear.config.framway_combined'
            $configurationManagerCore: '@smartgear.config.manager.core'
        public: true

    smartgear.config.manager.env_file.local:
        class: WEM\SmartgearBundle\Config\Manager\EnvFile
        arguments:
            $translator: '@contao.translation.translator'
            $configuration: '@smartgear.config.env_file'
            $configurationFilePath: '../.env.local'
        public: true

    smartgear.config.manager.local_config:
        class: WEM\SmartgearBundle\Config\Manager\LocalConfig
        arguments:
            $translator: '@contao.translation.translator'
            $configuration: '@smartgear.config.local_config'
            $configurationFilePath: '../config/config.yml'
        public: true

    smartgear.config.core:
        class: WEM\SmartgearBundle\Config\Component\Core\Core
        public: true

    smartgear.config.blog:
        class: WEM\SmartgearBundle\Config\Component\Blog\Blog
        public: true

    smartgear.config.events:
        class: WEM\SmartgearBundle\Config\Component\Events\Events
        public: true

    smartgear.config.faq:
        class: WEM\SmartgearBundle\Config\Component\Faq\Faq
        public: true

    smartgear.config.extranet:
        class: WEM\SmartgearBundle\Config\Module\Extranet\Extranet
        public: true

    smartgear.config.framway:
        class: WEM\SmartgearBundle\Config\Framway
        public: true

    smartgear.config.framway_theme:
        class: WEM\SmartgearBundle\Config\FramwayTheme
        public: true

    smartgear.config.framway_combined:
        class: WEM\SmartgearBundle\Config\FramwayCombined
        public: true

    smartgear.config.env_file:
        class: WEM\SmartgearBundle\Config\EnvFile
        public: true

    smartgear.config.local_config:
        class: WEM\SmartgearBundle\Config\LocalConfig
        public: true

    smartgear.backup.backup_manager:
        class: WEM\SmartgearBundle\Backup\BackupManager
        arguments:
            $rootDir: '%kernel.project_dir%'
            $backupDirectory: 'assets/backups'
            $databaseBackupDirectory: 'var/backups' # defined in contao source files, with no ways to access it from outside
            $commandUtil: '@smartgear.classes.command.util'
            $databaseBackupManager: '@contao.doctrine.backup_manager'
            $translator: '@contao.translation.translator'
            $artifactsToBackup:
                - 'composer.json'
                - 'assets/smartgear'
                - 'files'
                - 'templates'
            $tablesToIgnore:
                - '+tl_db_cache'
                - '+tl_log'
                - '+tl_undo'
                - '+tl_version'
                - '+tl_search'
                - '+tl_search_index'
                - '+tl_sm_backup'
        public: true

    smartgear.update.update_manager:
        class: WEM\SmartgearBundle\Update\UpdateManager
        arguments:
            $configurationManager: '@smartgear.config.manager.core'
            $backupManager: '@smartgear.backup.backup_manager'
            $templatesSmartgearSynchronizer: '@smartgear.classes.directories_synchronizer.templates.smartgear'
            $templatesRsceSynchronizer: '@smartgear.classes.directories_synchronizer.templates.rsce'
            $templatesGeneralSynchronizer: '@smartgear.classes.directories_synchronizer.templates.general'
            $migrations: 
                - '@smartgear.migrations.v1_0_0.m202203231730.migration'
                - '@smartgear.migrations.v1_0_0.m202205130814.migration'
                - '@smartgear.migrations.v1_0_1.m202301050800.migration'
                - '@smartgear.migrations.v1_0_2.m202301051700.migration'
                - '@smartgear.migrations.v1_0_3.m202301100950.migration'
                - '@smartgear.migrations.v1_0_4.m202301110935.migration'
                - '@smartgear.migrations.v1_0_5.m202301131435.migration'
                - '@smartgear.migrations.v1_0_7.m202303291542.migration'
                - '@smartgear.migrations.v1_0_8.m202303291542.migration'
                - '@smartgear.migrations.v1_0_9.m202305012112.migration'
                - '@smartgear.migrations.v1_0_10.m202305311835.migration'
                - '@smartgear.migrations.v1_0_11.m202306152248.migration'
                - '@smartgear.migrations.v1_0_12.m202306231015.migration'
                - '@smartgear.migrations.v1_0_13.m202306271601.migration'
                - '@smartgear.migrations.v1_0_14.m202307061615.migration'
                - '@smartgear.migrations.v1_0_15.m202307171545.migration'
                - '@smartgear.migrations.v1_0_16.m202307181107.migration'
                - '@smartgear.migrations.v1_0_17.m202307241045.migration'
                - '@smartgear.migrations.v1_0_18.m202307251509.migration'
                - '@smartgear.migrations.v1_0_19.m202307281157.migration'
                - '@smartgear.migrations.v1_0_20.m202308040846.migration'
                - '@smartgear.migrations.v1_0_21.m202308080921.migration'
                - '@smartgear.migrations.v1_0_21.m202308181214.migration'
                - '@smartgear.migrations.v1_0_21.m202310121049.migration'
                - '@smartgear.migrations.v1_0_22.m202310131044.migration'
                - '@smartgear.migrations.v1_0_23.m202310241614.migration'
                - '@smartgear.migrations.v1_0_24.m202311021346.migration'
                - '@smartgear.migrations.v1_0_25.m202311201059.migration'
                - '@smartgear.migrations.v1_0_26.m202311281720.migration'
                - '@smartgear.migrations.v1_0_27.m202401191210.migration'
                - '@smartgear.migrations.v1_0_28.m202402061818.migration'
                - '@smartgear.migrations.v1_0_29.m202404150950.migration'
                - '@smartgear.migrations.v1_0_30.m202404240943.migration'
                - '@smartgear.migrations.v1_0_31.m202405141120.migration'
                - '@smartgear.migrations.v1_0_32.m202405311133.migration'
                - '@smartgear.migrations.v1_0_33.m202406240000.migration'
                - '@smartgear.migrations.v1_0_34.m202407020000.migration'
                - '@smartgear.migrations.v1_0_35.m202407251417.migration'
                - '@smartgear.migrations.v1_0_36.m202407311645.migration'
                - '@smartgear.migrations.v1_0_38.m202408221511.migration'
                - '@smartgear.migrations.v1_0_39.m202410281417.migration'
                - '@smartgear.migrations.v1_0_40.m202412171530.migration'
                - '@smartgear.migrations.v1_0_41.m202501101501.migration'
                - '@smartgear.migrations.v1_0_42.m202501211648.migration'
                - '@smartgear.migrations.v1_0_43.m202501241204.migration'
                - '@smartgear.migrations.v1_0_44.m202502121430.migration'
                - '@smartgear.migrations.v1_0_45.m202503141412.migration'
        public: true

    smartgear.model.backup:
        class: WEM\SmartgearBundle\Model\Backup
        public: true

    smartgear.data_container.form:
        class: WEM\SmartgearBundle\DataContainer\Form
        public: true

    smartgear.classes.dca.field.callback.load:
        class: WEM\SmartgearBundle\Classes\Dca\Field\Callback\Load
        arguments:
            $pdmCallback: '@wem.personal_data_manager.dca.field.callback.load'
            $frontendField: ''
            $table: ''
        public: true

    smartgear.classes.dca.field.callback.save:
        class: WEM\SmartgearBundle\Classes\Dca\Field\Callback\Save
        arguments:
            $pdmCallback: '@wem.personal_data_manager.dca.field.callback.save'
            $frontendField: ''
            $table: ''
        public: true


    smartgear.classes.dca.field.callback.load.tl_member.firstname:
        class: WEM\SmartgearBundle\Classes\Dca\Field\Callback\Load
        arguments:
            $pdmCallback: '@wem.personal_data_manager.dca.field.callback.load'
            $frontendField: 'firstname'
            $table: 'tl_member'
        public: true
    smartgear.classes.dca.field.callback.load.tl_member.lastname:
        class: WEM\SmartgearBundle\Classes\Dca\Field\Callback\Load
        arguments:
            $pdmCallback: '@wem.personal_data_manager.dca.field.callback.load'
            $frontendField: 'lastname'
            $table: 'tl_member'
        public: true
    smartgear.classes.dca.field.callback.load.tl_member.dateOfBirth:
        class: WEM\SmartgearBundle\Classes\Dca\Field\Callback\Load
        arguments:
            $pdmCallback: '@wem.personal_data_manager.dca.field.callback.load'
            $frontendField: 'dateOfBirth'
            $table: 'tl_member'
        public: true
    smartgear.classes.dca.field.callback.load.tl_member.gender:
        class: WEM\SmartgearBundle\Classes\Dca\Field\Callback\Load
        arguments:
            $pdmCallback: '@wem.personal_data_manager.dca.field.callback.load'
            $frontendField: 'gender'
            $table: 'tl_member'
        public: true
    smartgear.classes.dca.field.callback.load.tl_member.company:
        class: WEM\SmartgearBundle\Classes\Dca\Field\Callback\Load
        arguments:
            $pdmCallback: '@wem.personal_data_manager.dca.field.callback.load'
            $frontendField: 'company'
            $table: 'tl_member'
        public: true
    smartgear.classes.dca.field.callback.load.tl_member.street:
        class: WEM\SmartgearBundle\Classes\Dca\Field\Callback\Load
        arguments:
            $pdmCallback: '@wem.personal_data_manager.dca.field.callback.load'
            $frontendField: 'street'
            $table: 'tl_member'
        public: true
    smartgear.classes.dca.field.callback.load.tl_member.postal:
        class: WEM\SmartgearBundle\Classes\Dca\Field\Callback\Load
        arguments:
            $pdmCallback: '@wem.personal_data_manager.dca.field.callback.load'
            $frontendField: 'postal'
            $table: 'tl_member'
        public: true
    smartgear.classes.dca.field.callback.load.tl_member.city:
        class: WEM\SmartgearBundle\Classes\Dca\Field\Callback\Load
        arguments:
            $pdmCallback: '@wem.personal_data_manager.dca.field.callback.load'
            $frontendField: 'city'
            $table: 'tl_member'
        public: true
    smartgear.classes.dca.field.callback.load.tl_member.state:
        class: WEM\SmartgearBundle\Classes\Dca\Field\Callback\Load
        arguments:
            $pdmCallback: '@wem.personal_data_manager.dca.field.callback.load'
            $frontendField: 'state'
            $table: 'tl_member'
        public: true
    smartgear.classes.dca.field.callback.load.tl_member.country:
        class: WEM\SmartgearBundle\Classes\Dca\Field\Callback\Load
        arguments:
            $pdmCallback: '@wem.personal_data_manager.dca.field.callback.load'
            $frontendField: 'country'
            $table: 'tl_member'
        public: true
    smartgear.classes.dca.field.callback.load.tl_member.phone:
        class: WEM\SmartgearBundle\Classes\Dca\Field\Callback\Load
        arguments:
            $pdmCallback: '@wem.personal_data_manager.dca.field.callback.load'
            $frontendField: 'phone'
            $table: 'tl_member'
        public: true
    smartgear.classes.dca.field.callback.load.tl_member.mobile:
        class: WEM\SmartgearBundle\Classes\Dca\Field\Callback\Load
        arguments:
            $pdmCallback: '@wem.personal_data_manager.dca.field.callback.load'
            $frontendField: 'mobile'
            $table: 'tl_member'
        public: true
    smartgear.classes.dca.field.callback.load.tl_member.fax:
        class: WEM\SmartgearBundle\Classes\Dca\Field\Callback\Load
        arguments:
            $pdmCallback: '@wem.personal_data_manager.dca.field.callback.load'
            $frontendField: 'fax'
            $table: 'tl_member'
        public: true
    smartgear.classes.dca.field.callback.load.tl_sm_form_storage_data.value:
        class: WEM\SmartgearBundle\Classes\Dca\Field\Callback\LoadConditionnal
        arguments:
            $pdmCallback: '@wem.personal_data_manager.dca.field.callback.load'
            $frontendField: 'value'
            $table: 'tl_form_dtorage_data'
        public: true
    smartgear.classes.dca.field.callback.save.tl_sm_form_storage_data.value:
        class: WEM\SmartgearBundle\Classes\Dca\Field\Callback\SaveConditionnal
        arguments:
            $pdmCallback: '@wem.personal_data_manager.dca.field.callback.save'
            $frontendField: 'value'
            $table: 'tl_form_dtorage_data'
        public: true