@extends('layouts.app')

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

@section('content')
<div class="container-fluid py-4">
    <div class="row justify-content-center">
        <div class="card">
            <div class="card-header border-0 bg-transparent">
                <h5 class="mb-0">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">
                    <label class="form-label">Title</label>
                    <input type="text" class="form-control" value="{{ $promotion['title'] }}" readonly>
                </div>
                <div class="mb-3">
                    <label class="form-label">Type</label>
                    <input type="text" class="form-control" value="{{ $promotion['type'] }}" readonly>
                </div>
                <div class="mb-3">
                    <label class="form-label">Start Date</label>
                    <input type="text" class="form-control" value="{{ $promotion['startDate'] }}" readonly>
                </div>
                <div class="mb-3">
                    <label class="form-label">End Date</label>
                    <input type="text" class="form-control" value="{{ $promotion['endDate'] }}" readonly>
                </div>
                <div class="mb-3">
                    <label class="form-label">Status</label>
                    <input type="text" class="form-control" value="{{ $promotion['status'] }}" readonly>
                </div>
                <div class="text-end">
                    <a href="{{ route('promotions') }}" class="btn btn-primary">Back</a>
                </div>
            </div>
        </div>
    </div>
</div>
@endsection