<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class BookingController extends Controller
{
    /**
     * Display all bookings
     */
   public function index()
{
    return view('bookings.index');
}

    /**
     * Show specific booking
     */
    public function show($id)
    {
        return view('bookings.show');
    }

    /**
     * Confirm booking
     */
    public function confirm($id)
    {
        return redirect()->route('bookings.index')->with('success', 'Booking confirmed!');
    }

    /**
     * Cancel booking
     */
    public function cancel($id)
    {
        return redirect()->route('bookings.index')->with('success', 'Booking cancelled!');
    }

    /**
     * Delete booking
     */
    public function destroy($id)
    {
        return redirect()->route('bookings.index')->with('success', 'Booking deleted!');
    }

    /**
     * Export all bookings
     */
    public function exportAll()
    {
        return redirect()->back()->with('success', 'Export started!');
    }

    /**
     * Show accommodation bookings
     */
    public function accommodation()
    {
        return view('bookings.accommodation');
    }

    /**
     * Show transport bookings
     */
    public function transport()
    {
        return view('bookings.transport');
    }

    /**
     * Show activities bookings
     */
    public function activities()
    {
        return view('bookings.activities');
    }

    /**
     * Get booking statistics (API)
     */
    public function stats()
    {
        return response()->json([
            'total' => 89,
            'confirmed' => 57,
            'pending' => 32
        ]);
    }
}