@props(['errors' => [] ])

@if ($errors->any())
    @foreach ($errors->all() as $error)
        <script>
            showMsg("{{ $error }}",'error' ,'right');
        </script>
    @endforeach
@endif


@if(Session::has('success'))
<script>
    showMsg("{{ Session::get('success') }}",'success');
</script>
@endif


@if(Session::has('error'))
<script>
    showMsg("{{ Session::get('error') }}",'error' ,'right');
</script>
@endif

@if(Session::has('warning'))
<script>
    Swal.fire({
        title: 'Warning!',
        text: "{{ Session::get('warning') }}",
        icon: 'warning',
        confirmButtonText: 'Close'
    })
</script>
@endif
