<?php

namespace App\Http\Controllers\Player;

use App\FiveM\Contracts\FrameworkAdapter;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Inertia\Inertia;
use Inertia\Response;

class InventoryController extends Controller
{
    public function show(Request $request, FrameworkAdapter $adapter, string $citizenId): Response
    {
        $character = CharacterController::ownedCharacterOrAbort($request, $adapter, $citizenId);

        return Inertia::render('Player/Characters/Inventory', [
            'citizenId' => $citizenId,
            'characterName' => $character->name,
            'inventory' => $character->inventory,
        ]);
    }
}
