<?php

declare(strict_types=1);

use App\Http\Controllers\IndexController;
use App\Http\Controllers\RemoteLogoutController;
use App\Http\Controllers\Market\ActivityController;
use App\Http\Controllers\Market\PerformanceController;
use Hypervel\Support\Facades\Route;

Route::any('/', [IndexController::class, 'index']);

// Remote logout routes
Route::post('/remote/logout', [RemoteLogoutController::class, 'logout']);

// Activity routes
Route::get('/activity/recent', [ActivityController::class, 'getRecent']);
Route::get('/activity/search', [ActivityController::class, 'search']);

// Performance / load-testing endpoints — token-gated via env PERF_API_TOKEN.
// Callable from a client machine over curl with header `X-Perf-Token: <token>`.
// Disabled (403) if PERF_API_TOKEN is unset.
Route::get('/perf/ping', [PerformanceController::class, 'ping']);
Route::post('/perf/seed/users', [PerformanceController::class, 'seedUsers']);
Route::post('/perf/seed/stores', [PerformanceController::class, 'seedStores']);
Route::post('/perf/seed/products', [PerformanceController::class, 'seedProducts']);
Route::post('/perf/seed/batch', [PerformanceController::class, 'seedBatch']);
Route::post('/perf/pos/simulate', [PerformanceController::class, 'simulatePos']);
