<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class WeddingController extends Controller
{
    /**
     * Show wedding page management
     */
    public function page()
    {
        return view('wedding.page');
    }

    /**
     * Update wedding page details
     */
    public function updatePage(Request $request)
    {
        return redirect()->route('wedding.page')->with('success', 'Wedding page updated successfully!');
    }

    /**
     * Show wedding page preview
     */
    public function preview()
    {
        return view('wedding.preview');
    }

    /**
     * Show public wedding page for guests
     */
    public function publicView($slug)
    {
        return view('wedding.public-view');
    }

    /**
     * Handle guest RSVP
     */
    public function rsvp(Request $request, $slug)
    {
        return redirect()->back()->with('success', 'RSVP submitted successfully!');
    }

    /**
     * Handle guest booking
     */
    public function book(Request $request, $slug)
    {
        return redirect()->back()->with('success', 'Booking submitted successfully!');
    }

    /**
     * Update custom URL
     */
    public function updateCustomUrl(Request $request)
    {
        return redirect()->route('wedding.page')->with('success', 'Custom URL updated!');
    }

    /**
     * Update wedding schedule
     */
    public function updateSchedule(Request $request)
    {
        return redirect()->route('wedding.page')->with('success', 'Schedule updated!');
    }
}