<div>
    @php
        $modalStyle="";
        $modalStatus='';
           if($isOpen) {
              $modalStatus= 'show';
              $modalStyle="display: block;";
           }
        $fname = $human['name'] ?? '';
        $sname = $human['surn'] ?? '';
        $mname= $human['last_name'] ?? '';

    @endphp

    <x-adminlte-modal id="searchModalBasic" class="{{ $modalStatus }}" style="{{ $modalStyle }}" size="lg"
                      title="{{ $fname }} {{ $mname }} {{ $sname }}" v-centered static-backdrop scrollable>
        <div class="modal-body">
            <ul class="nav nav-tabs" id="custom-tabs-four-tab" role="tablist">
                @if($role->hasAnyPermission(["Basic View ID Details", "Basic View Passport Details", "Basic View Birth Details"]))
                    <li class="nav-item">
                        @if($modalStatus)
                        <a class="nav-link active" id="custom-tabs-four-home-tab" data-toggle="pill"
                           href="#custom-tabs-four-home" role="tab" aria-controls="custom-tabs-four-home"
                           aria-selected="true">
                            Document data
                        </a>
                        @else
                            <a class="nav-link active" id="custom-tabs-four-home-tab" data-toggle="pill" href="#custom-tabs-four-home" role="tab" aria-controls="custom-tabs-four-home" aria-selected="true">
                                <div class="skeleton skeleton-text short" style="width: 10rem;"></div>
                            </a>
                        @endif
                    </li>
                @endif
                @if($role->hasAnyPermission(["Basic View ID Family relations","Basic View Passport Family relations", "Basic View Birth Family relations"]))
                    <li class="nav-item">
                        @if($modalStatus)
                        <a class="nav-link" id="custom-tabs-four-family-tab" data-toggle="pill"
                           href="#custom-tabs-four-family" role="tab" aria-controls="custom-tabs-four-family"
                           aria-selected="false">
                            Family relations
                        </a>
                        @else
                            <a class="nav-link" id="custom-tabs-four-family-tab" data-toggle="pill" href="#custom-tabs-four-family" role="tab" aria-controls="custom-tabs-four-family" aria-selected="false">
                                <div class="skeleton skeleton-text short" style="width: 10rem;"></div>
                            </a>
                        @endif
                    </li>
                @endif
                @if($doctype == 'ID')
                    @if($role->hasPermissionTo("Basic View ID Photo and Signature"))
                        <li class="nav-item">
                            @if($modalStatus)
                            <a class="nav-link" id="custom-tabs-four-photo-tab" data-toggle="pill"
                               href="#custom-tabs-four-photo" role="tab" aria-controls="custom-tabs-four-photo"
                               aria-selected="false">
                                Photo & signature </a>
                            @else
                                <a class="nav-link" id="custom-tabs-four-family-tab" data-toggle="pill" href="#custom-tabs-four-family" role="tab" aria-controls="custom-tabs-four-family" aria-selected="false">
                                    <div class="skeleton skeleton-text short" style="width: 10rem;"></div>
                                </a>
                            @endif
                        </li>
                    @endif
                @endif
                @if($role->hasAnyPermission(["Basic View ID Documents", "Basic View Passport Documents", "Basic View Birth Documents"]))
                    <li class="nav-item">
                        @if($modalStatus)
                        <a class="nav-link" id="custom-tabs-four-history-tab" data-toggle="pill"
                           href="#custom-tabs-four-documents" role="tab" aria-controls="custom-tabs-four-documents"
                           aria-selected="false">
                            Documents</a>
                        @else
                            <a class="nav-link" id="custom-tabs-four-family-tab" data-toggle="pill" href="#custom-tabs-four-family" role="tab" aria-controls="custom-tabs-four-family" aria-selected="false">
                                <div class="skeleton skeleton-text short" style="width: 10rem;"></div>
                            </a>
                        @endif
                    </li>
                @endif
                @if($role->hasAnyPermission(["Basic View ID History", "Basic View Passport History", "Basic View Birth History"]))
                    <li class="nav-item">
                        @if($modalStatus)
                        <a class="nav-link" id="custom-tabs-four-history-tab" data-toggle="pill"
                           href="#custom-tabs-four-history" role="tab" aria-controls="custom-tabs-four-history"
                           aria-selected="false">
                            Document History</a>
                        @else
                            <a class="nav-link" id="custom-tabs-four-family-tab" data-toggle="pill" href="#custom-tabs-four-family" role="tab" aria-controls="custom-tabs-four-family" aria-selected="false">
                                <div class="skeleton skeleton-text short" style="width: 10rem;"></div>
                            </a>
                        @endif
                    </li>
                @endif
                <li class="nav-item">
                    @if($modalStatus)
                    <a class="nav-link" id="custom-tabs-four-history-tab" data-toggle="pill"
                       href="#custom-tabs-four-death" role="tab" aria-controls="custom-tabs-four-death"
                       aria-selected="false">
                        Date of Death
                    </a>
                    @else
                        <a class="nav-link" id="custom-tabs-four-family-tab" data-toggle="pill" href="#custom-tabs-four-family" role="tab" aria-controls="custom-tabs-four-family" aria-selected="false">
                            <div class="skeleton skeleton-text short" style="width: 10rem;"></div>
                        </a>
                    @endif
                </li>
            </ul>
            <div class="card card-primary card-outline card-outline-tabs" style="box-shadow: none;">
                <div class="card-header p-0 border-bottom-0">
                </div>
                <div class="card-body">
                    <div class="tab-content" id="custom-tabs-four-tabContent">
                        @if($role->hasAnyPermission(["Basic View ID Details", "Basic View Passport Details", "Basic View Birth Details"]))
                            <div class="tab-pane fade show active" id="custom-tabs-four-home" role="tabpanel"
                                 aria-labelledby="custom-tabs-four-home-tab">
                                @include('livewire.search.partials.tabs.id.document_data')
                            </div>
                        @endif
                        @if($role->hasAnyPermission(["Basic View ID Family relations","Basic View Passport Family relations", "Basic View Birth Family relations"]))
                            <div class="tab-pane fade" id="custom-tabs-four-family" role="tabpanel"
                                 aria-labelledby="custom-tabs-four-family-tab">
                                @include('livewire.search.partials.tabs.id.document_header_details')
                                @include('livewire.search.partials.tabs.id.family_relation')
                            </div>
                        @endif
                        @if($doctype == 'ID')
                            @if($role->hasPermissionTo("Basic View ID Photo and Signature"))
                                <div class="tab-pane fade" id="custom-tabs-four-photo" role="tabpanel"
                                     aria-labelledby="custom-tabs-four-photo-tab">
                                    @include('livewire.search.partials.tabs.id.document_header_details')
                                    @include('livewire.search.partials.tabs.id.photo')
                                </div>
                            @endif
                        @endif
                        @if($role->hasAnyPermission(["Basic View ID Documents", "Basic View Passport Documents", "Basic View Birth Documents"]))
                            <div class="tab-pane fade" id="custom-tabs-four-documents" role="tabpanel"
                                 aria-labelledby="custom-tabs-four-documents-tab">
                                @include('livewire.search.partials.tabs.id.document_header_details')
                                @include('livewire.search.partials.tabs.id.human_document')
                            </div>
                        @endif
                        @if($role->hasAnyPermission(["Basic View ID History", "Basic View Passport History", "Basic View Birth History"]))
                            <div class="tab-pane fade" id="custom-tabs-four-history" role="tabpanel"
                                 aria-labelledby="custom-tabs-four-history-tab">
                                @include('livewire.search.partials.tabs.id.document_header_details')
                                @include('livewire.search.partials.tabs.id.document_history')
                            </div>
                        @endif
                        <div class="tab-pane fade" id="custom-tabs-four-death" role="tabpanel"
                             aria-labelledby="custom-tabs-four-death-tab">
                            @include('livewire.search.partials.tabs.id.document_header_details')
                            <h2>No results!</h2>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <x-slot name="footerSlot">
            <x-adminlte-button theme="info" label="Print" data-dismiss="modal"/>
            <x-adminlte-button theme="danger" label="Close" data-dismiss="modal" wire:click="$refresh"/>
        </x-slot>

    </x-adminlte-modal>
</div>
