social_event.my_events:
  path: '/my-events'
  defaults:
    _controller: '\Drupal\social_event\Controller\SocialEventController::redirectMyEvents'
  requirements:
      _user_is_logged_in: 'TRUE'

social_event.settings:
  path: '/admin/config/opensocial/event'
  defaults:
    _form: '\Drupal\social_event\Form\EventSettingsForm'
    _title: 'Event settings'
  requirements:
    _permission: 'administer social_event settings'
  options:
    _admin_route: TRUE

social_event.update_enrollment_request:
  path: '/node/{node}/all-enrollment-requests/update-enrollment/{event_enrollment}/{approve}'
  defaults:
    _controller: '\Drupal\social_event\Controller\UpdateEnrollRequestController::updateEnrollmentRequest'
  options:
    parameters:
      node:
        type: entity:node
      event_enrollment:
        type: entity:event_enrollment
  requirements:
    _custom_access: '\Drupal\social_event\Controller\UpdateEnrollRequestController::access'
    approve: '[0-1]+'

social_event.enrollment_request_decline_form:
  path: '/node/{node}/all-enrollment-requests/confirm-decline/{event_enrollment}'
  defaults:
    _form: '\Drupal\social_event\Form\EnrollRequestDeclineForm'
    _title_callback: '\Drupal\social_event\Controller\SocialEventController::getTitleDeclineRequest'
  options:
    parameters:
      node:
        type: entity:node
      event_enrollment:
        type: entity:event_enrollment
  requirements:
    _custom_access: '\Drupal\social_event\Controller\UpdateEnrollRequestController::access'

social_event.request_enroll_dialog:
  path: '/node/{node}/enroll-dialog-request'
  defaults:
    _controller: '\Drupal\social_event\Controller\EnrollRequestDialogController::enrollDialog'
    _title_callback: '\Drupal\social_event\Controller\EnrollRequestDialogController::enrollTitle'
  options:
    parameters:
      node:
        type: entity:node
  requirements:
    _custom_access: '\Drupal\social_event\Controller\EnrollRequestDialogController::enrollAccess'
