{{--
A template component to show alert notification responses based on a crud opertation.
This should be included in the main template layout.
--}}
<div class="container pt-3">
    @if(count($errors) > 0)
        <x-adminlte-alert theme="danger" title="Attention">
            <strong>Fix the following errors:</strong>
            <ol>
                @foreach($errors->all() as $error)
                    <li>{{$error}}</li>
                @endforeach
            </ol>
        </x-adminlte-alert>
    @endif

    @if(session()->has('success'))
        <x-adminlte-alert theme="success" title="Success" dismissable>
            {{ session('success') }}
        </x-adminlte-alert>
    @endif

    @if(session()->has('error'))
        <x-adminlte-alert theme="danger" title="Error" dismissable>
            {{ session('error') }}
        </x-adminlte-alert>
    @endif

    @if(session()->has('info'))
        <x-adminlte-alert theme="info" title="Info" dismissable>
            {{ session('info') }}
        </x-adminlte-alert>
    @endif

    @if(session()->has('warning'))
        <x-adminlte-alert theme="warning" title="Warning" dismissable>
            {{ session('info') }}
        </x-adminlte-alert>
    @endif

    @if(session()->has('secondary'))
        <x-adminlte-alert theme="secondary" icon="" title="Secondary Notification" dismissable>
            {{ session('info') }}
        </x-adminlte-alert>
    @endif

    @if(session()->has('important'))
        <x-adminlte-alert theme="dark" title="Important" dismissable>
            {{ session('important') }}
        </x-adminlte-alert>
    @endif

    @if(session()->has('tip'))
        <x-adminlte-alert theme="light" title="Tip" dismissable>
            {{ session('tip') }}
        </x-adminlte-alert>
    @endif

    @if(session()->has('primary'))
        <x-adminlte-alert theme="primary" title="Primary Notification" dismissable>
            {{ session('primary') }}
        </x-adminlte-alert>
    @endif
</div>
