@extends('layouts.app')
@section('content')
<main class="nxl-container"><div class="nxl-content"><div class="page-header"><h5>Meeting Invitation</h5></div>
<div class="main-content"><div class="card"><div class="card-body">
@if(session('success'))<div class="alert alert-success">{{ session('success') }}</div>@endif
<h4>{{ $activity->title }}</h4><p>{{ $activity->agenda }}</p>
<p><strong>When:</strong> {{ $activity->start_date }} {{ $activity->start_time }} – {{ $activity->end_date }} {{ $activity->end_time }}</p>
<p><strong>Location:</strong> {{ $activity->location ?: ucfirst($activity->meeting_type) }}</p>
<div class="d-flex gap-2">@foreach(['accepted'=>'Accept','tentative'=>'Maybe','declined'=>'Decline'] as $value=>$label)
<form method="POST" action="{{ route('meeting-invitations.respond',$activity) }}">@csrf<input type="hidden" name="response" value="{{ $value }}"><button class="btn btn-{{ $value==='accepted'?'success':($value==='declined'?'danger':'warning') }}">{{ $label }}</button></form>
@endforeach</div></div></div></div></div></main>
@endsection
