panels_ipe.cancel:
  path: '/admin/panels_ipe/variant/{panels_storage_type}/{panels_storage_id}/cancel'
  defaults:
    _controller: '\Drupal\panels_ipe\Controller\PanelsIPEPageController::cancel'
  requirements:
    _panels_storage_access: update
    _permission: 'access panels in-place editing'

panels_ipe.block_plugins:
  path: '/admin/panels_ipe/variant/{panels_storage_type}/{panels_storage_id}/block_plugins'
  defaults:
    _controller: '\Drupal\panels_ipe\Controller\PanelsIPEPageController::getBlockPlugins'
  requirements:
    _panels_storage_access: read
    _permission: 'access panels in-place editing'
    _method: 'GET'
  methods: ['GET']

panels_ipe.block_plugin.form:
  path: '/admin/panels_ipe/variant/{panels_storage_type}/{panels_storage_id}/block_plugins/{plugin_id}/form'
  defaults:
    _controller: '\Drupal\panels_ipe\Controller\PanelsIPEPageController::getBlockPluginForm'
  requirements:
    _panels_storage_access: read
    _permission: 'access panels in-place editing'
  options:
    _admin_route: FALSE

panels_ipe.block_plugin_existing.form:
  path: '/admin/panels_ipe/variant/{panels_storage_type}/{panels_storage_id}/block_plugins/{plugin_id}/block/{block_uuid}/form'
  defaults:
    _controller: '\Drupal\panels_ipe\Controller\PanelsIPEPageController::getBlockPluginForm'
  requirements:
    _panels_storage_access: read
    _permission: 'access panels in-place editing'

panels_ipe.remove_block:
  path: '/admin/panels_ipe/variant/{panels_storage_type}/{panels_storage_id}/remove_block'
  defaults:
    _controller: '\Drupal\panels_ipe\Controller\PanelsIPEPageController::handleRemoveBlockRequest'
  requirements:
    _panels_storage_access: update
    _permission: 'access panels in-place editing'
    _method: 'DELETE'
  methods: ['DELETE']

panels_ipe.block_content_types:
  path: '/admin/panels_ipe/variant/{panels_storage_type}/{panels_storage_id}/block_content/types'
  defaults:
    _controller: '\Drupal\panels_ipe\Controller\PanelsIPEPageController::getBlockContentTypes'
  requirements:
    _panels_storage_access: read
    _permission: 'access panels in-place editing'
    _method: 'GET'
  methods: ['GET']

panels_ipe.block_content.form:
  path: '/admin/panels_ipe/variant/{panels_storage_type}/{panels_storage_id}/block_content/{type}/form'
  defaults:
    _controller: '\Drupal\panels_ipe\Controller\PanelsIPEPageController::getBlockContentForm'
  requirements:
    _panels_storage_access: read
    _permission: 'access panels in-place editing+administer blocks'

panels_ipe.block_content_existing.form:
  path: '/admin/panels_ipe/variant/{panels_storage_type}/{panels_storage_id}/block_content/{type}/block/{block_content_uuid}/form'
  defaults:
    _controller: '\Drupal\panels_ipe\Controller\PanelsIPEPageController::getBlockContentForm'
  requirements:
    _panels_storage_access: read
    _permission: 'access panels in-place editing+administer blocks'

panels_ipe.layouts:
  path: '/admin/panels_ipe/variant/{panels_storage_type}/{panels_storage_id}/layouts'
  defaults:
    _controller: '\Drupal\panels_ipe\Controller\PanelsIPEPageController::getLayouts'
  requirements:
    _panels_storage_access: read
    _permission: 'access panels in-place editing'
    _method: 'GET'
  methods: ['GET']

panels_ipe.layout.form:
  path: '/admin/panels_ipe/variant/{panels_storage_type}/{panels_storage_id}/layouts/{layout_id}/form'
  defaults:
    _controller: '\Drupal\panels_ipe\Controller\PanelsIPEPageController::getLayoutForm'
  requirements:
    _panels_storage_access: 'change layout'
    _permission: 'access panels in-place editing'

panels_ipe.layout.update:
  path: '/admin/panels_ipe/variant/{panels_storage_type}/{panels_storage_id}/layouts/{layout_id}'
  defaults:
    _controller: '\Drupal\panels_ipe\Controller\PanelsIPEPageController::handleUpdateLayoutRequest'
  requirements:
    _panels_storage_access: update
    _permission: 'access panels in-place editing'
    _method: 'PUT'
  methods: ['PUT']

panels_ipe.layout.update_tempstore:
  path: '/admin/panels_ipe/variant/{panels_storage_type}/{panels_storage_id}/layouts/{layout_id}/tempstore'
  defaults:
    _controller: '\Drupal\panels_ipe\Controller\PanelsIPEPageController::handleUpdateLayoutTempStorageRequest'
  requirements:
    _panels_storage_access: update
    _permission: 'access panels in-place editing'
    _method: 'PUT'
  methods: ['PUT']

panels_ipe.layout.save:
  path: '/admin/panels_ipe/variant/{panels_storage_type}/{panels_storage_id}/layouts/{layout_id}'
  defaults:
    _controller: '\Drupal\panels_ipe\Controller\PanelsIPEPageController::handleCreateLayoutRequest'
  requirements:
    _panels_storage_access: update
    _permission: 'access panels in-place editing'
    _method: 'POST'
  methods: ['POST']

# @todo Add/consolidate routes for all Block CRUD operations.

panels_ipe.block.read:
  path: '/admin/panels_ipe/variant/{panels_storage_type}/{panels_storage_id}/block/{block_uuid}'
  defaults:
    _controller: '\Drupal\panels_ipe\Controller\PanelsIPEPageController::getBlock'
  requirements:
    _panels_storage_access: read
    _permission: 'access panels in-place editing'
    _method: 'GET'
  methods: ['GET']
  options:
    _admin_route: FALSE
