<?php

namespace App\Http\Controllers\Api;

use App\Core\Http\Controllers\BaseApiController;
use App\Services\Engagement\UserLevelService;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;

class GamificationController extends BaseApiController
{
    public function __construct(
        private readonly UserLevelService $levels,
    ) {}

    public function summary(Request $request): JsonResponse
    {
        return $this->successResponse('OK', $this->levels->summary($request->user()));
    }
}
