{% if sm_can(data, 'ship', 'sylius_shipment') %}
    {{ render(controller('sylius.controller.shipment:updateAction', {
        '_sylius': {
            'event': 'ship',
            'repository': {
                'method': 'findOneByOrderId',
                'arguments': {
                    'id': data.id,
                    'orderId': data.order.id
                }
            },
            'state_machine': {
                'graph': 'sylius_shipment',
                'transition': 'ship'
            },
            'section': 'admin',
            'permission': true,
            'template': '@SyliusAdmin/Shipment/Grid/_ship.html.twig',
            'form': 'Sylius\\Bundle\\ShippingBundle\\Form\\Type\\ShipmentShipType',
            'vars': {
                'route': {
                    'parameters': {
                        'id': data.id,
                        'orderId': data.order.id
                    }
                }
            }
        }
    })) }}
{% endif %}
