<?php

use Illuminate\Support\Facades\Route;
use App\Http\Controllers\Api\V1\Admin\Player\AdminPlayerIndexController;
use App\Http\Controllers\Api\V1\Admin\Player\AdminPlayerStoreController;
use App\Http\Controllers\Api\V1\Admin\Player\AdminPlayerShowController;
use App\Http\Controllers\Api\V1\Admin\Player\AdminPlayerUpdateController;
use App\Http\Controllers\Api\V1\Admin\Player\AdminPlayerDestroyController;
use App\Http\Controllers\Api\V1\Admin\Player\AdminPlayerFreezeController;
use App\Http\Controllers\Api\V1\Admin\Player\AdminPlayerUnfreezeController;
use App\Http\Controllers\Api\V1\Admin\Player\PlayerWalletShowController;
use App\Http\Controllers\Api\V1\Admin\Player\AdminPlayerTicketItemsIndexController;

/**
 * 管理员玩家管理路由。
 */
Route::middleware('admin.api-resource')
    ->group(function (): void {
        Route::get('players', AdminPlayerIndexController::class)
            ->name('api.v1.admin.players.index');
        Route::post('players', AdminPlayerStoreController::class)
            ->name('api.v1.admin.players.store');
        Route::get('players/{player}', AdminPlayerShowController::class)
            ->name('api.v1.admin.players.show');
        Route::put('players/{player}', AdminPlayerUpdateController::class)
            ->name('api.v1.admin.players.update');
        Route::post('players/{player}/freeze', AdminPlayerFreezeController::class)
            ->name('api.v1.admin.players.freeze');
        Route::post('players/{player}/unfreeze', AdminPlayerUnfreezeController::class)
            ->name('api.v1.admin.players.unfreeze');
        Route::delete('players/{player}', AdminPlayerDestroyController::class)
            ->name('api.v1.admin.players.destroy');
        Route::get('players/{player}/wallets', PlayerWalletShowController::class)
            ->name('api.v1.admin.players.wallets');
        Route::get('players/{player}/ticket-items', AdminPlayerTicketItemsIndexController::class)
            ->name('api.v1.admin.players.ticket-items.index');
    });
