<?php
declare(strict_types=1);

return [
    // Player-facing achievement views
    ['GET',  '/achievements',                    'Achievements\Controllers\AchievementController@index',       ['auth'], 'achievement.view'],
    ['GET',  '/achievements/leaderboard',        'Achievements\Controllers\AchievementController@leaderboard', ['auth'], 'achievement.view'],

    // Admin: manage achievement definitions
    ['GET',  '/achievements/admin',              'Achievements\Controllers\AchievementController@adminIndex',   ['auth'], 'achievement.manage'],
    ['GET',  '/achievements/admin/create',       'Achievements\Controllers\AchievementController@adminCreate',  ['auth'], 'achievement.manage'],
    ['POST', '/achievements/admin',              'Achievements\Controllers\AchievementController@adminStore',   ['auth', 'csrf'], 'achievement.manage'],
    ['POST', '/achievements/admin/{id:\d+}/toggle', 'Achievements\Controllers\AchievementController@adminToggle', ['auth', 'csrf'], 'achievement.manage'],
];
