@extends('layouts.app')

@section('page_title', 'View Promotion')

@section('content')
    <div class="card">
        <div class="card-header">
            <h5 class="mb-0 fw-bold text-dark">View Promotion</h5>
        </div>
        <div class="card-body">
            @if (session('error'))
                <div class="alert alert-danger alert-dismissible fade show" role="alert">
                    {{ session('error') }}
                    <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
                </div>
            @endif
            <div class="mb-3"><strong>Title:</strong> {{ $promotion['title'] }}</div>
            <div class="mb-3"><strong>Type:</strong> {{ $promotion['type'] }}</div>
            <div class="mb-3"><strong>Start Date:</strong> {{ $promotion['startDate'] }}</div>
            <div class="mb-3"><strong>End Date:</strong> {{ $promotion['endDate'] }}</div>
            <div class="mb-3"><strong>Status:</strong> {{ $promotion['status'] }}</div>
            <a href="{{ route('promotions') }}" class="btn btn-secondary">Back</a>
        </div>
    </div>
@endsection