services:
  _defaults:
    public: true


  prestashop.adapter.profile.command_handler.delete_profile:
    class: 'PrestaShop\PrestaShop\Adapter\Profile\CommandHandler\DeleteProfileHandler'
    autoconfigure: true
    arguments:
      - '@=service("prestashop.adapter.legacy.configuration").get("_PS_ADMIN_PROFILE_")'
      - '@prestashop.adapter.data_provider.employee'

  prestashop.adapter.profile.command_handler.bulk_delete_profile:
    class: 'PrestaShop\PrestaShop\Adapter\Profile\CommandHandler\BulkDeleteProfileHandler'
    autoconfigure: true
    arguments:
      - '@=service("prestashop.adapter.legacy.configuration").get("_PS_ADMIN_PROFILE_")'
      - '@prestashop.adapter.data_provider.employee'

  prestashop.adapter.profile.command_handler.add_profile_handler:
    class: 'PrestaShop\PrestaShop\Adapter\Profile\CommandHandler\AddProfileHandler'
    autoconfigure: true

  prestashop.adapter.profile.command_handler.edit_profile_handler:
    class: 'PrestaShop\PrestaShop\Adapter\Profile\CommandHandler\EditProfileHandler'
    autoconfigure: true

  prestashop.adapter.profile.query_handler.get_profile_for_editing_handler:
    class: 'PrestaShop\PrestaShop\Adapter\Profile\QueryHandler\GetProfileForEditingHandler'
    autoconfigure: true
    arguments:
      - '@=service("prestashop.adapter.employee.avatar_provider").getDefaultAvatarUrl()'
      - '@prestashop.core.image.parser.image_tag_source_parser'
      - !php/const _PS_PROFILE_IMG_DIR_

  prestashop.adapter.profile.permission.command_handler.update_tab_permissions_handler:
    class: 'PrestaShop\PrestaShop\Adapter\Profile\Permission\CommandHandler\UpdateTabPermissionsHandler'
    autoconfigure: true

  prestashop.adapter.profile.permission.query_handler.get_permissions_for_configuration_handler:
    class: 'PrestaShop\PrestaShop\Adapter\Profile\Permission\QueryHandler\GetPermissionsForConfigurationHandler'
    autoconfigure: true
    arguments:
      - '@security.authorization_checker'
      - '@=service("prestashop.adapter.legacy.context").getContext().language.id'
      -
        - 'AdminLogin'
        - 'AdminQuickAccesses'
        - 'AdminTabs'

  prestashop.adapter.profile.permission.command_handler.update_module_permissions_handler:
    class: 'PrestaShop\PrestaShop\Adapter\Profile\Permission\CommandHandler\UpdateModulePermissionsHandler'
    autoconfigure: true
