services:
  filebrowser.manager:
    class: Drupal\filebrowser\FilebrowserManager
    arguments: ['@filebrowser.storage', '@filebrowser.validator', '@current_user', '@filebrowser.common']

  filebrowser.storage:
    class: Drupal\filebrowser\Services\FilebrowserStorage
    arguments: ['@database']

  filebrowser.validator:
    class: Drupal\filebrowser\Services\FilebrowserValidator

  filebrowser.presentation:
    class: Drupal\filebrowser\Presentation
    arguments: [$files, $node, '@filebrowser.common']

  filebrowser.array_to_options:
    class: Drupal\filebrowser\Services\ArrayToOptions

  filebrowser.common:
    class: Drupal\filebrowser\Services\Common
    arguments: ['@filebrowser.storage']

  form.helper:
    class: Drupal\filebrowser\Services\FormHelper

  filebrowser.metadata_info:
    class: Drupal\filebrowser\EventSubscriber\MetadataInfoEventSubscriber
    tags:
      - {name: event_subscriber }

  filebrowser.user_actions:
    class: Drupal\filebrowser\EventSubscriber\UserActionsEventSubscriber
    tags:
      - { name: event_subscriber }

  filebrowser.metadata_event:
    class: Drupal\filebrowser\EventSubscriber\MetadataEventSubscriber
    tags:
      - { name: event_subscriber }

  filebrowser.breadcrumb:
    class: Drupal\filebrowser\Breadcrumb\BreadcrumbBuilder
    arguments: ['@filebrowser.storage', '@filebrowser.common']
    tags:
      - { name: breadcrumb_builder, priority: 100 }
  stream_wrapper.filebrowser:
    class: Drupal\filebrowser\FilebrowserStream\FilebrowserStream
    tags:
      - { name: stream_wrapper, scheme: filebrowser }
  filebrowser.uninstall.validator:
    class: Drupal\filebrowser\FilebrowserUninstallValidator
    tags:
      - { name: module_install.uninstall_validator }
    arguments: ['@entity_type.manager', '@entity.query', '@string_translation']

  filebrowser.action.access_checker:
      class: Drupal\filebrowser\Access\FilebrowserAccessCheck
      arguments: ['@current_user']
      tags:
        - { name: access_check, applies_to: _filebrowser_action_access_check }