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


sylius_shop_homepage:
    path: /{_locale}
    controller: Symfony\Bundle\FrameworkBundle\Controller\RedirectController::urlRedirectAction
    defaults:
        path: /fr/taxons/category  # ou /login selon votre configuration de locale
    requirements:
        _locale: fr|en

custom_add_to_cart:
    path: /{_locale}/ajax/cart/add-direct
    controller: App\Controller\Shop\OrderItemController::addDirectlyToCart
    methods: [POST]

app_update_cart_widget:
    path: /cart_widget/update
    methods: [GET]
    controller: App\Controller\Shop\CartController::cartWidgetUpdate
# Récupération du token csrf pour supprimer un produit du panier

app_get_csrf_token_and_url:
    path: /{_locale}/ajax/get-csrf-token-and-url
    controller: App\Controller\Shop\OrderItemController::getCsrfTokenAndUrlAction
    methods: [GET]
    
## récupération de la liste des produits
#app_product_list:
#    path: /products
#    controller: App\Controller\Shop\ProductController::getList
#    methods: GET

app_product_save:
    path: /admin/shop-product/store
    controller: App\Controller\Admin\CustomProductController::store
    methods: [POST, PUT]
    
app_product_field_parameter_list:
    path: /product-field-parameters
    controller: App\Controller\Admin\ProductFieldParameterController::list
    methods: GET
    
app_price_update:
    path: /admin/api/save-price
    controller: App\Controller\Admin\PricingController::updatePrice
    methods: [POST]
    
api_toggle_product_visibility:
    path: /api/products/{id}/toggle-visibility
    controller: App\Controller\Admin\CustomProductController::toggleVisibility
    methods: [PATCH]
    
app_taxon_get:
    path: /admin/api/taxons
    controller: App\Controller\Admin\TaxonController::getTaxons
    methods: [GET]

app_taxon_update_order:
    path: /admin/api/taxons/update-order
    controller: App\Controller\Admin\TaxonController::updateTaxonOrder
    methods: [POST]
    
app_taxon_fetch:
    path: /admin/api/taxons/{id}
    controller: App\Controller\Admin\TaxonController::fetchTaxon
    methods: [GET]

app_taxon_save:
    path: /admin/api/taxons/store
    controller: App\Controller\Admin\TaxonController::store
    methods: [POST, PUT]

app_taxon_delete:
    path: /admin/api/taxons/{taxonId}/delete
    methods: [DELETE]
    controller: App\Controller\Admin\TaxonController::deleteAction
    
call_center:
    path: /call-center/{vueRouting}
    controller: App\Controller\Shop\CallCenterController::index
    requirements:
        vueRouting: ".+"

