@extends('layouts.app')

@section('page_title', 'View Terms or Privacy')

@section('content')
    <div class="container">
        <h2>View Terms or Privacy</h2>
        @if (session('success'))
            <div class="alert alert-success alert-dismissible fade show" role="alert">
                {{ session('success') }}
                <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
            </div>
        @endif
        @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="card">
            <div class="card-body">
                <h5 class="card-title">{{ $item['title'] }}</h5>
                <p class="card-text"><strong>Details:</strong> {{ $item['details'] }}</p>
                <p class="card-text"><strong>Type:</strong> {{ $item['type'] }}</p>
                <a href="{{ route('terms-and-privacy') }}" class="btn btn-secondary">Back</a>
                <a href="{{ route('terms-and-privacy.edit', $item['id']) }}" class="btn btn-primary">Edit</a>
            </div>
        </div>
    </div>
@endsection