@extends('layouts.yellow')
@section('content')   
    <div class="container-fluid">

        <div class="row">
            <div class="col-12 p-3">
                <div class="card">
                    <div class="card-header">
                        <h2>{{ __('create-area.create') }}</h2>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-12">
                <div style="margin-left:100px">
                    <img class="w-40" src="{{asset('img/areas.png')}}" alt="">
                </div>
            </div>
        </div>
    </div>
   
    <div class="container-fluid container-user">
                    <!-- Mensajes de error/éxito -->
    @if(session('error'))
        <div class="alert alert-danger alert-dismissible fade show">
            {{ session('error') }}
            <button type="button" class="btn-close" data-bs-dismiss="alert"></button>
        </div>
    @endif
    
    @if(session('success'))
        <div class="alert alert-success alert-dismissible fade show">
            {{ session('success') }}
            <button type="button" class="btn-close" data-bs-dismiss="alert"></button>
        </div>
    @endif
        @if(Auth::user()->isAbleTo('create-area'))
            <div class="row">
                <div class="col-12">
                    <x-AreaForm :especiality="$especiality"></x-AreaForm>
                </div>
            </div>
        @endif
        
        <div class="row">
            <div class="col-12">
                <livewire:areas-table-view />
            </div>
        </div>
    </div>
<script src="{{ asset('js/create-area.js') }}"></script>
@endsection