<?php

namespace Functional\Exercises\Http\Resources;

use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;

/**
 * Forme allégée d'un exercice pour les listes (GET /api/exercises).
 */
class ExerciseListResource extends JsonResource
{
    public function toArray(Request $request): array
    {
        return [
            'id' => $this->id,
            'name' => $this->name,
            'slug' => $this->slug,
            'body_part' => $this->body_part,
            'equipment' => $this->equipment,
            'target' => $this->target,
            'image_url' => $this->image_url,
            'gif_url' => $this->gif_url,
        ];
    }
}
