<?php

namespace App\Http\Controllers\Admin;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;

class GestioneController extends Controller
{
    /**
     * Display a listing of the resource.
     */
    public function index()
    {
        return view('admin.gestioni.index', [
            'title' => 'Gestioni',
            'breadcrumb' => [
                'Dashboard' => route('admin.dashboard'),
                'Gestioni' => ''
            ]
        ]);
    }

    /**
     * Show the form for creating a new resource.
     */
    public function create()
    {
        return view('admin.gestioni.create', [
            'title' => 'Nuova Gestione',
            'breadcrumb' => [
                'Dashboard' => route('admin.dashboard'),
                'Gestioni' => route('admin.gestioni.index'),
                'Nuova Gestione' => ''
            ]
        ]);
    }

    /**
     * Store a newly created resource in storage.
     */
    public function store(Request $request)
    {
        // TODO: Implement store logic
        return redirect()->route('admin.gestioni.index')
            ->with('success', 'Gestione creata con successo.');
    }

    /**
     * Display the specified resource.
     */
    public function show(string $id)
    {
        return view('admin.gestioni.show', [
            'title' => 'Dettaglio Gestione',
            'breadcrumb' => [
                'Dashboard' => route('admin.dashboard'),
                'Gestioni' => route('admin.gestioni.index'),
                'Dettaglio' => ''
            ]
        ]);
    }

    /**
     * Show the form for editing the specified resource.
     */
    public function edit(string $id)
    {
        return view('admin.gestioni.edit', [
            'title' => 'Modifica Gestione',
            'breadcrumb' => [
                'Dashboard' => route('admin.dashboard'),
                'Gestioni' => route('admin.gestioni.index'),
                'Modifica' => ''
            ]
        ]);
    }

    /**
     * Update the specified resource in storage.
     */
    public function update(Request $request, string $id)
    {
        // TODO: Implement update logic
        return redirect()->route('admin.gestioni.index')
            ->with('success', 'Gestione aggiornata con successo.');
    }

    /**
     * Remove the specified resource from storage.
     */
    public function destroy(string $id)
    {
        // TODO: Implement destroy logic
        return redirect()->route('admin.gestioni.index')
            ->with('success', 'Gestione eliminata con successo.');
    }
}
