@include('admin.header')

<div class="container">
    <h3 class="mb-4">Add New Information Item</h3>

    @if($errors->any())
        <div class="alert alert-danger">
            <strong>Oops!</strong> Please fix the following errors:
            <ul class="mb-0">
                @foreach($errors->all() as $error)
                    <li>{{ $error }}</li>
                @endforeach
            </ul>
        </div>
    @endif

    <form action="{{ route('admin.information-library.store') }}" method="POST" class="bg-white p-3">
        @csrf
        @include('admin.information-library.form')
        <button type="submit" class="btn btn-success"><i class="fas fa-save"></i> Save</button>
        <a href="{{ route('admin.information-library.index') }}" class="btn btn-secondary"><i class="fas fa-times"></i> Cancel</a>
    </form>
</div>

@include('admin.footer')