admin_order_states:
  path: /
  methods: [ GET ]
  defaults:
    _controller: PrestaShopBundle\Controller\Admin\Configure\ShopParameters\OrderStateController::indexAction
    _legacy_controller: AdminStatuses
    _legacy_link: AdminStatuses
    _legacy_feature_flag: order_state

admin_order_states_filter:
  path: /
  methods: [ POST ]
  defaults:
    _controller: PrestaShopBundle\Controller\Admin\Configure\ShopParameters\OrderStateController::searchGridAction
    _legacy_controller: AdminStatuses
    gridDefinitionFactoryServiceId: prestashop.core.grid.definition.factory.order_states
    redirectRoute: admin_order_states
    _legacy_link: AdminStatuses:submitFilterstate
    _legacy_feature_flag: order_state

admin_order_states_create:
  path: /new
  methods: [ GET, POST ]
  defaults:
    _controller: PrestaShopBundle\Controller\Admin\Configure\ShopParameters\OrderStateController::createAction
    _legacy_controller: AdminStatuses
    _legacy_link: AdminStatuses:addorderstate

admin_order_states_edit:
  path: /{orderStateId}/edit
  methods: [ GET, POST ]
  defaults:
    _controller: PrestaShopBundle\Controller\Admin\Configure\ShopParameters\OrderStateController::editAction
    _legacy_controller: AdminStatuses
    _legacy_link: AdminStatuses:updateorderstate
    _legacy_parameters:
      id_order_state: orderStateId

admin_order_states_toggle_delivery:
  path: /{orderStateId}/toggle-delivery
  methods: [ POST ]
  defaults:
    _controller: PrestaShopBundle\Controller\Admin\Configure\ShopParameters\OrderStateController::toggleDeliveryAction
    _legacy_controller: AdminStatuses
    _legacy_link: AdminStatuses:deliveryorderstate
    _legacy_parameters:
      id_order_state: orderStateId
  requirements:
    orderStateId: \d+

admin_order_states_toggle_invoice:
  path: /{orderStateId}/toggle-invoice
  methods: [ POST ]
  defaults:
    _controller: PrestaShopBundle\Controller\Admin\Configure\ShopParameters\OrderStateController::toggleInvoiceAction
    _legacy_controller: AdminStatuses
    _legacy_link: AdminStatuses:invoiceorderstate
    _legacy_parameters:
      id_order_state: orderStateId
  requirements:
    orderStateId: \d+

admin_order_states_toggle_send_email:
  path: /{orderStateId}/toggle-send-email
  methods: [ POST ]
  defaults:
    _controller: PrestaShopBundle\Controller\Admin\Configure\ShopParameters\OrderStateController::toggleSendEmailAction
    _legacy_controller: AdminStatuses
    _legacy_link: AdminStatuses:sendemailorderstate
    _legacy_parameters:
      id_order_state: orderStateId
  requirements:
    orderStateId: \d+

admin_order_states_delete:
  path: /{orderStateId}/delete
  methods: [ POST, DELETE ]
  defaults:
    _controller: PrestaShopBundle\Controller\Admin\Configure\ShopParameters\OrderStateController::deleteAction
    _legacy_controller: AdminStatuses
    _legacy_link: AdminStatuses:deleteorderstate
    _legacy_parameters:
      id_order_state: orderStateId
  requirements:
    addressId: \d+

admin_order_states_delete_bulk:
  path: /delete-bulk
  methods: [ POST ]
  defaults:
    _controller: PrestaShopBundle\Controller\Admin\Configure\ShopParameters\OrderStateController::deleteBulkAction
    _legacy_controller: AdminStatuses
    _legacy_link: AdminStatuses:submitBulkdeleteorderstate
