# This file is part of the Sylius package.
# (c) Sylius Sp. z o.o.

winzou_state_machine:
    sylius_order:
        class: "%sylius.model.order.class%"
        property_path: state
        graph: sylius_order
        state_machine_class: "%sylius.state_machine.class%"
        states:
            cart: ~
            new: ~
            cancelled: ~
            fulfilled: ~
        transitions:
            create:
                from: [cart]
                to: new
            cancel:
                from: [new]
                to: cancelled
            fulfill:
                from: [new]
                to: fulfilled
        callbacks:
            before:
                sylius_assign_number:
                    on: "create"
                    do: ["@sylius.order_number_assigner", "assignNumber"]
                    args: ["object"]
