<?php

namespace App\Http\Controllers;

use App\Support\UserInvestmentPortfolio;
use Illuminate\Http\Request;
use Inertia\Inertia;
use Inertia\Response;

class MyInvestmentsController extends Controller
{
    /**
     * Lista de inversiones del usuario con estado y proyecciones.
     */
    public function index(Request $request): Response
    {
        /** @var \App\Models\User $user */
        $user = $request->user();

        return Inertia::render(
            'investments/my-investments',
            UserInvestmentPortfolio::detailPage($user),
        );
    }
}
