<div class="tab-pane fade" id="v-pills-tab4" role="tabpanel" aria-labelledby="v-pills-tab4-tab">
    <div class="tab-wrapper allHalls">
        <nav class="custom-nav">
            <div class="nav nav-tabs" id="nav-tab" role="tablist">
                <a class="nav-link active" id="nav-myHall1-tab" data-toggle="tab" href="#nav-myHall1" role="tab" aria-controls="nav-myHall1" aria-selected="true">{{__('halls.person_count')}}</a>
                <a class="nav-link" id="nav-myHall2-tab" data-toggle="tab" href="#nav-myHall2" role="tab" aria-controls="nav-myHall2" aria-selected="false">{{__('halls.days_count')}}</a>
            </div>
        </nav>
        <div class="tab-content" id="nav-tabContent">
            @if(count($halls))
                <div class="tab-pane fade show active" id="nav-myHall1" role="tabpanel" aria-labelledby="nav-myHall1-tab">
                    @if(isset($halls['person_count']) && count($halls['person_count']))
                        @foreach($halls['person_count'] as $hallPersonCount)
                            <div class="reservation_item deleted_hall">
                                <div class="item_head in-flex">
                                    <p class="date"><i class="far fa-calendar-alt"></i>{{date('Y', strtotime($hallPersonCount->created_at)) . ' ' . __('reservations.'.date('M', strtotime($hallPersonCount->created_at))) . ' ' . date('d', strtotime($hallPersonCount->created_at))}}</p>
                                    <div class="icons">
                                        <a href="{{route('provider.editHall', $hallPersonCount->id)}}"><img src="{{asset('assets/web/images/icons/edit.svg')}}" alt="" class="icon"></a>
                                        <a data-href="{{route('provider.deleteHall', $hallPersonCount->id)}}" style="cursor: pointer" class="delete_hall_link"><img src="{{asset('assets/web/images/icons/trash.svg')}}" alt="" class="icon" data-toggle="modal" data-target="#confirmationModal"></a>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="col-lg-5">
                                        <img src="{{asset($hallPersonCount->images[0])}}" alt="" class="hall-img">
                                    </div>
                                    <div class="col-lg-7">
                                        <div class="content">
                                            <h5 class="name mb-3"><b>{{$hallPersonCount->hall_name}}</b></h5>
                                            @if(count(getOccasions($hallPersonCount->occasions)))
                                                @foreach(getOccasions($hallPersonCount->occasions) as $occasion)
                                                    <span class="num">{{$occasion->name}} {{!$loop->last ? ' - ' : ''}}</span>
                                                @endforeach
                                            @endif

                                            <h6 class="loc_title mt-3 mb-2"><img src="{{asset('assets/web/images/icons/loc-blue.svg')}}" alt="" class="icon"> {{__('halls.hall_location')}} , {{$hallPersonCount->location}}</h6>
                                            <p class="data"> <i class="far fa-user"></i> {{$hallPersonCount->capacity}} {{__('members.persons')}}</p>
                                            <div class="row mt-4">
                                                @if(count(json_decode($hallPersonCount->added_services, true)))
                                                    @foreach(json_decode($hallPersonCount->added_services, true) as $addedService)
                                                        <div class="col-md-6">
                                                            <div class="additional_serv">
                                                                <div class="right">
                                                                    <span class="icon"><img src="{{asset($addedService['image'])}}" alt="" ></span>
                                                                    <span class="serv_title">{{$addedService['name']}}
                                                                        {{--                                                                    <small>(10)</small>--}}
                                                                </span>
                                                                </div>
                                                                <div class="left">
                                                                    <h4 class="price dir-l center-vr"><b>{{$addedService['price']}}</b> <small>{{__('main.sar')}}</small></h4>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    @endforeach
                                                @endif
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        @endforeach
                    @else
                        <div class="alert alert-secondary text-center text-danger col-md-12">{{__('members.no_data')}}</div>
                    @endif
                </div>
                <div class="tab-pane fade" id="nav-myHall2" role="tabpanel" aria-labelledby="nav-myHall2-tab">
                    @if(isset($halls['days_count']) && count($halls['days_count']))
                        @foreach($halls['days_count'] as $hallDaysCount)
                            <div class="reservation_item deleted_hall">
                                <div class="item_head in-flex">
                                    <p class="date"><i class="far fa-calendar-alt"></i>{{date('Y', strtotime($hallDaysCount->created_at)) . ' ' . __('reservations.'.date('M', strtotime($hallDaysCount->created_at))) . ' ' . date('d', strtotime($hallDaysCount->created_at))}}</p>
                                    <div class="icons">
                                        <a href="{{route('provider.editHall', $hallDaysCount->id)}}"><img src="{{asset('assets/web/images/icons/edit.svg')}}" alt="" class="icon"></a>
                                        <a data-href="{{route('provider.deleteHall', $hallDaysCount->id)}}" style="cursor: pointer" class="delete_hall_link"><img src="{{asset('assets/web/images/icons/trash.svg')}}" alt="" class="icon" data-toggle="modal" data-target="#confirmationModal"></a>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="col-lg-5">
                                        <img src="{{asset($hallDaysCount->images[0])}}" alt="" class="hall-img">
                                    </div>
                                    <div class="col-lg-7">
                                        <div class="content">
                                            <h5 class="name mb-3"><b>{{$hallDaysCount->hall_name}}</b></h5>
                                            @if(count(getOccasions($hallDaysCount->occasions)))
                                                @foreach(getOccasions($hallDaysCount->occasions) as $occasion)
                                                    <span class="num">{{$occasion->name}} {{!$loop->last ? ' - ' : ''}}</span>
                                                @endforeach
                                            @endif
                                            <h6 class="loc_title mt-3 mb-2"><img src="{{asset('assets/web/images/icons/loc-blue.svg')}}" alt="" class="icon">{{__('halls.hall_location')}} , {{$hallDaysCount->location}}</h6>
                                            <p class="data"> <i class="far fa-user"></i> {{$hallDaysCount->capacity}} {{__('members.persons')}}</p>
                                            <div class="row mt-4">
                                                @if(count(json_decode($hallDaysCount->added_services, true)))
                                                    @foreach(json_decode($hallDaysCount->added_services, true) as $addedService)
                                                        <div class="col-md-6">
                                                            <div class="additional_serv">
                                                                <div class="right">
                                                                    <span class="icon"><img src="{{asset($addedService['image'])}}" alt="" ></span>
                                                                    <span class="serv_title">{{$addedService['name']}}
                                                                        {{--                                                                    <small>(10)</small>--}}
                                                                </span>
                                                                </div>
                                                                <div class="left">
                                                                    <h4 class="price dir-l center-vr"><b>{{$addedService['price']}}</b> <small>{{__('main.sar')}}</small></h4>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    @endforeach
                                                @endif
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        @endforeach
                    @else
                        <div class="alert alert-secondary text-center text-danger col-md-12">{{__('members.no_data')}}</div>
                    @endif

                </div>
                @else
                <div class="alert alert-secondary text-center text-danger col-md-12">{{__('members.no_data')}}</div>
            @endif
        </div>

    </div>
</div>


<div class="modal state-modal fade" id="confirmationModal" data-backdrop="static" data-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true">
    <div class="modal-dialog modal-dialog-centered modal-lg">
        <div class="modal-content">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
            <div class="modal-body">
                <div class="text-box">
                    <img src="{{asset('assets/web/images/question.png')}}" alt="" class="icon mb-4"/>
                    <h3 class="title mb-3"> {{__('members.delete_hall_confirmation')}} </h3>
                    <p class="p"> {{__('members.delete_hall_confirmation_hint')}} <b>{{__('members.meet')}}</b> </p>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-dismiss="modal">{{__('members.cancel')}}</button>
                <button type="button" class="main-butn delete_hall_modal_button"> {{__('members.sure')}} </button>
            </div>

        </div>

    </div>

</div>
