<?php

declare(strict_types=1);

use CpCreation\AltchaBundle\Controller\ChallengeController;
use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator;

return static function (RoutingConfigurator $routes): void {
    $routes->add('cp_creation_altcha_challenge', '/_altcha/challenge/{scope}')
        ->controller(ChallengeController::class)
        ->methods(['GET'])
        ->requirements(['scope' => '[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*']);
};
