sylius_paypal_webhook:
    resource: "@SyliusPayPalPlugin/Resources/config/webhook_routing.yaml"


# app_admin_shipping_option_index:
#     resource: |
#         alias: app.shipping_option
#         section: admin
#         templates: "@SyliusAdmin\\Crud"
#         redirect: index
#         grid: app_shipping_option
#         vars: 
#             all: 
#                 subheader: Toutes les options de livraisons
#     type: sylius.resource
#     prefix: /admin

bitbag_sylius_cms_plugin:
    resource: "@BitBagSyliusCmsPlugin/Resources/config/routing.yml"

# app_admin_custom_shipping_method_index:
#     resource: |
#         alias: app.custom_shipping_method
#         section: admin
#         templates: "@SyliusAdmin\\Crud"
#         except: ['show']
#         redirect: index
#         grid: app_admin_custom_shipping_method
#         vars: 
#             all: 
#                 subheader: Toutes les Methodes de livraisons
#     type: sylius.resource
#     prefix: /admin

# app_admin_custom_shipping_method_create:
#     path: /admin/custom-shipping-methods/new
#     methods: [GET, POST]
#     defaults:
#         _controller: app.controller.custom_shipping_method:createAction
#         _sylius:
#             form: App\Form\CustomShippingMethodType
#             redirect:
#                 route: app_admin_custom_shipping_method_index

sylius_shop_partial_product_index_latest:
    path: /latest/{count}/{col?col-6}/{col_md?col-md-4}/{col_lg?col-lg-4}
    methods: [GET]
    requirements:
        col: (.*?)
        col_md: (.*?)
        col_lg: (.*?)
    defaults:
        _controller: sylius.controller.product:indexAction
        _sylius:
            template: $template
            criteria:
                col: $col
                col_md: $col_md
                col_lg: $col_lg
            repository:
                method: findLatestByChannel
                arguments:
                    - "expr:service('sylius.context.channel').getChannel()"
                    - "expr:service('sylius.context.locale').getLocaleCode()"
                    - '!!int $count'

app_shop_partial_product_show_category:
    path: /by-category/latest/{count}/{col?col-6}/{col_md?col-md-4}/{col_lg?col-lg-4}
    methods: [GET]
    requirements:
        category: (.*?)
        col: (.*?)
        col_md: (.*?)
        col_lg: (.*?)
    defaults:
        _controller: sylius.controller.product:indexAction
        _sylius:
            template: $template
            criteria:
                category: $category
                col: $col
                col_md: $col_md
                col_lg: $col_lg
            repository:
                method: findLatestByChannelAndCategory
                arguments:
                    - "expr:service('sylius.context.channel').getChannel()"
                    - "expr:service('sylius.context.locale').getLocaleCode()"
                    - '!!int $count'
                    - '$category'


app_admin_slider:
    resource: |
        alias: app.slider
        section: admin
        templates: "@SyliusAdmin\\Crud"
        redirect: index
        grid: app_admin_slider
        vars: 
            all: 
                subheader: Tous les sliders
                templates:
                    form: "bundles/SyliusAdminBundle/Slider/_form.html.twig"
            index: 
                icon: 'file image outline'
    type: sylius.resource
    prefix: /admin

app_admin_slider_create:
    path: /admin/slider/create
    methods: [GET, POST]
    defaults:
        _controller: app.controller.slider:createAction
        _sylius:
            form: App\Form\SliderType

app_admin_slider_update:
    path: /admin/slider/update/{id}
    methods: [GET, POST]
    defaults: 
        _controller: app.controller.slider:updateAction

app_admin_slider_show:
    path: /admin/slider/show/{id}
    methods: [GET, POST]
    defaults: 
        _controller: app.controller.slider:showAction
app_admin_cgv_edit:
    path: /admin/cgv
    methods: [GET, POST]
    defaults:
        _controller: app.controller.cgv::edit
