sylius_admin_shipment:
    resource: |
        alias: sylius.shipment
        section: admin
        templates: "@SyliusAdmin\\Crud"
        only: ['index']
        grid: sylius_admin_shipment
        permission: true
        vars:
            all:
                subheader: sylius.ui.manage_shipments
            index:
                icon: truck
    type: sylius.resource

sylius_admin_shipment_ship:
    path: /shipments/{id}/ship
    methods: [PUT]
    defaults:
        _controller: sylius.controller.shipment::updateAction
        _sylius:
            event: ship
            section: admin
            permission: true
            state_machine:
                graph: sylius_shipment
                transition: ship
            redirect: referer
            flash: sylius.shipment.shipped
            form: Sylius\Bundle\ShippingBundle\Form\Type\ShipmentShipType

sylius_admin_shipment_show:
    path: /shipments/{id}
    methods: [GET]
    defaults:
        _controller: sylius.controller.shipment::showAction
        _sylius:
            section: admin
            permission: true
            template: "@SyliusAdmin/Shipment/show.html.twig"

sylius_admin_shipment_resend_confirmation_email:
    path: /shipments/{id}/resend-confirmation-email
    methods: [GET]
    defaults:
        _controller: Sylius\Bundle\AdminBundle\Action\ResendShipmentConfirmationEmailAction
