# config/routes.yaml

# 1) Import des attributs #[Route] de tous tes Controllers
controllers:
    resource: '../src/Controller/'
    type: attribute

# 2) Page des conditions générales
app_cgu:
    path: /conditions-generales
    controller: Symfony\Bundle\FrameworkBundle\Controller\TemplateController
    defaults:
        template: 'frontend/static/cgu.html.twig'

app_privacy_policy:
    path: /politique-de-confidentialite
    controller: Symfony\Bundle\FrameworkBundle\Controller\TemplateController
    defaults:
        template: 'frontend/static/privacy_policy.html.twig'

app_cookie_policy:
    path: /politique-de-cookies
    controller: Symfony\Bundle\FrameworkBundle\Controller\TemplateController
    defaults:
        template: 'frontend/static/cookie_policy.html.twig'

app_mentions:
    path: /mentions-legales
    controller: Symfony\Bundle\FrameworkBundle\Controller\TemplateController
    defaults:
        template: 'frontend/static/mentions.html.twig'

app_contact:
    path: /contact
    controller: Symfony\Bundle\FrameworkBundle\Controller\TemplateController
    defaults:
        template: 'frontend/static/contact.html.twig'


# 3) Routes d’authentification
app_login:
    path: /login
    controller: App\Controller\SecurityController::login
    methods: [GET, POST]

app_logout:
    path: /logout
    controller: App\Controller\SecurityController::logout
    methods: [GET]

# 4) Formulaire “Mot de passe oublié”
app_forgot_password_request:
    path: /reset-password
    controller: App\Controller\ResetPasswordController::request
    methods: [GET, POST]

# 5) Page “Vérifie ta boîte mail”
app_reset_password_check_email:
    path: /reset-password/check-email
    controller: App\Controller\ResetPasswordController::checkEmail
    methods: [GET]

# 6) Formulaire de remise via token
app_reset_password:
    path: /reset-password/reset/{token}
    controller: App\Controller\ResetPasswordController::reset
    methods: [GET, POST]

app_merci_alias:
    path: /merci
    controller: 'App\Controller\PremiumController::merci'
    methods: [GET]

# config/routes/01_visit_create.yaml
visit_create:
    path: /api/visits
    controller: App\Controller\VisitCreateController
    methods: [POST]
