<?php

namespace App\Http\Controllers\Admin;

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

class DirittoRealeController extends Controller
{
    /**
     * Display a listing of the resource.
     */
    public function index()
    {
        return view('admin.diritti-reali.index', [
            'title' => 'Diritti Reali',
            'breadcrumb' => [
                'Dashboard' => route('admin.dashboard'),
                'Diritti Reali' => ''
            ]
        ]);
    }

    /**
     * Show the form for creating a new resource.
     */
    public function create()
    {
        return view('admin.diritti-reali.create', [
            'title' => 'Nuovo Diritto Reale',
            'breadcrumb' => [
                'Dashboard' => route('admin.dashboard'),
                'Diritti Reali' => route('admin.diritti-reali.index'),
                'Nuovo Diritto' => ''
            ]
        ]);
    }

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

    /**
     * Display the specified resource.
     */
    public function show(string $id)
    {
        return view('admin.diritti-reali.show', [
            'title' => 'Dettaglio Diritto Reale',
            'breadcrumb' => [
                'Dashboard' => route('admin.dashboard'),
                'Diritti Reali' => route('admin.diritti-reali.index'),
                'Dettaglio' => ''
            ]
        ]);
    }

    /**
     * Show the form for editing the specified resource.
     */
    public function edit(string $id)
    {
        return view('admin.diritti-reali.edit', [
            'title' => 'Modifica Diritto Reale',
            'breadcrumb' => [
                'Dashboard' => route('admin.dashboard'),
                'Diritti Reali' => route('admin.diritti-reali.index'),
                'Modifica' => ''
            ]
        ]);
    }

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

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