# These lines define a route using YAML configuration. The controller used by
# the route (FrameworkBundle:Template:template) is a convenient shortcut when
# the template can be rendered without executing any logic in your own controller.
# See https://symfony.com/doc/current/cookbook/templating/render_without_controller.html

# config/routes.yaml

homepage:
    path: /{_locale}
    controller: App\Controller\WelcomeController::index
    requirements:
        _locale: '%app_locales%'
    defaults:
        template: default/homepage.html.twig
        data: 'L'
        _locale: '%locale%'

# API routes SENZA prefisso lingua (deve essere PRIMA di controllers)
api_controllers:
    resource: '../src/Controller/Api/'
    type: annotation
    prefix: /api/v1

# Altre routes CON prefisso lingua (escludi Api/)
#controllers:
#    resource: '../src/Controller/'
#    type: annotation
#    prefix: /{_locale}
#    requirements:
#        _locale: '%app_locales%'
#    defaults:
#        _locale: '%locale%'
#    exclude:
#        - '../src/Controller/Api/'
