book.render:
  path: '/book'
  defaults:
    _controller: '\Drupal\book\Controller\BookController::bookRender'
    _title: 'Books'
  requirements:
    _permission: 'access content'

book.admin:
  path: '/admin/structure/book'
  defaults:
    _controller: '\Drupal\book\Controller\BookController::adminOverview'
    _title: 'Books'
  requirements:
    _permission: 'administer book outlines'

book.settings:
  path: '/admin/structure/book/settings'
  defaults:
    _form: '\Drupal\book\Form\BookSettingsForm'
    _title: 'Books'
  requirements:
    _permission: 'administer site configuration'

book.export:
  path: '/book/export/{type}/{node}'
  defaults:
    _controller: '\Drupal\book\Controller\BookController::bookExport'
  requirements:
    _permission: 'access printer-friendly version'
    _entity_access: 'node.view'
    node: \d+

entity.node.book_outline_form:
  path: '/node/{node}/outline'
  defaults:
    _entity_form: 'node.book_outline'
    _title: 'Outline'
  requirements:
    _permission: 'administer book outlines'
    _entity_access: 'node.view'
    node: \d+
  options:
    _node_operation_route: TRUE

book.admin_edit:
  path: '/admin/structure/book/{node}'
  defaults:
    _form: '\Drupal\book\Form\BookAdminEditForm'
    _title: 'Re-order book pages and change titles'
  requirements:
    _permission: 'administer book outlines'
    _entity_access: 'node.view'
    node: \d+

entity.node.book_remove_form:
  path: '/node/{node}/outline/remove'
  defaults:
    _form: '\Drupal\book\Form\BookRemoveForm'
    _title: 'Remove from outline'
  options:
    _node_operation_route: TRUE
  requirements:
    _permission: 'administer book outlines'
    _entity_access: 'node.view'
    _access_book_removable: 'TRUE'
    node: \d+
