sylius_shop_ajax:
    resource: "@SyliusShopBundle/Resources/config/routing/ajax.yml"
    prefix: /ajax

sylius_shop_partial:
    resource: "@SyliusShopBundle/Resources/config/routing/partial.yml"
    prefix: /_partial

sylius_shop_homepage:
    path: /
    methods: [GET]
    defaults:
        _controller: sylius.controller.shop.homepage:indexAction

sylius_shop_security:
    resource: "@SyliusShopBundle/Resources/config/routing/security.yml"

sylius_shop_user:
    resource: "@SyliusShopBundle/Resources/config/routing/shop_user.yml"

# sylius_shop_product:
#     resource: "@SyliusShopBundle/Resources/config/routing/product.yml"

sylius_shop_product_show:
    path: /
    methods: [GET]
    defaults:
        _controller: sylius.controller.shop.homepage:indexAction

sylius_shop_product_review:
    resource: "@SyliusShopBundle/Resources/config/routing/product_review.yml"
    prefix: /products/{slug}/reviews

sylius_shop_cart:
    resource: "@SyliusShopBundle/Resources/config/routing/cart.yml"
    prefix: /cart

sylius_shop_checkout:
    resource: "@SyliusShopBundle/Resources/config/routing/checkout.yml"
    prefix: /checkout

sylius_shop_contact_request:
    resource: "@SyliusShopBundle/Resources/config/routing/contact.yml"
    prefix: /contact

sylius_shop_order:
    resource: "@SyliusShopBundle/Resources/config/routing/order.yml"
    prefix: /order

sylius_shop_account:
    resource: "@SyliusShopBundle/Resources/config/routing/account.yml"
    prefix: /account

sylius_shop_switch_currency:
    path: /switch-currency/{code}
    methods: [GET]
    defaults:
        _controller: sylius.controller.shop.currency_switch:switchAction

sylius_shop_switch_locale:
    path: /switch-locale/{code}
    methods: [GET]
    defaults:
        _controller: sylius.controller.shop.locale_switch:switchAction
        
# sylius_shop:
#     resource: "@SyliusShopBundle/Resources/config/routing.yml"
#     prefix: /{_locale}
#     requirements:
#         _locale: ^[A-Za-z]{2,4}(_([A-Za-z]{4}|[0-9]{3}))?(_([A-Za-z]{2}|[0-9]{3}))?$

sylius_shop_payum:
    resource: "@SyliusShopBundle/Resources/config/routing/payum.yml"

sylius_shop_default_locale:
    path: /
    methods: [GET]
    defaults:
        _controller: sylius.controller.shop.locale_switch:switchAction

sylius_paypal:
    resource: "@SyliusPayPalPlugin/Resources/config/shop_routing.yaml"
    prefix: /{_locale}
    requirements:
        _locale: ^[A-Za-z]{2,4}(_([A-Za-z]{4}|[0-9]{3}))?(_([A-Za-z]{2}|[0-9]{3}))?$

# see https://web.dev/change-password-url/
sylius_shop_request_password_reset_token_redirect:
    path: /.well-known/change-password
    methods: [GET]
    controller: Symfony\Bundle\FrameworkBundle\Controller\RedirectController::redirectAction
    defaults:
        route: sylius_shop_request_password_reset_token
        permanent: false
