@extends('layouts.app')

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

@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 Terms or Privacy</h5>
            </div>
            <div class="card-body">
                @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="mb-3">
                    <label class="form-label">Title</label>
                    <input type="text" class="form-control" value="{{ $item['title'] }}" readonly>
                </div>
                <div class="mb-3">
                    <label class="form-label">Details</label>
                    <textarea class="form-control" readonly>{{ $item['details'] }}</textarea>
                </div>
                <div class="mb-3">
                    <label class="form-label">Type</label>
                    <input type="text" class="form-control" value="{{ $item['type'] }}" readonly>
                </div>
                <div class="text-end">
                    <a href="{{ route('terms-and-privacy') }}" class="btn btn-primary">Back</a>
                    <a href="{{ route('terms-and-privacy.edit', $item['id']) }}" class="btn btn-primary">Edit</a>
                </div>
            </div>
        </div>
    </div>
</div>
@endsection