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

    @endphp


    <x-adminlte-modal id="searchModalBirth" class="{{ $modalStatus }}" style="{{ $modalStyle }}" size="lg"
                      title="{{ $fname }} {{ $oname }} {{ $surname }}'s Birth Details" v-centered static-backdrop scrollable>

        <div class="modal-body">
            <ul class="nav nav-tabs" id="custom-tabs-five-tab" role="tablist">
                    @if($role->hasAnyPermission(["Basic View Birth Details"]))
                        <li class="nav-item">
                            @if($modalStatus)
                                <a class="nav-link active" id="custom-tabs-five-home-tab" data-toggle="pill"
                                   href="#custom-tabs-five-home" role="tab" aria-controls="custom-tabs-five-home"
                                   aria-selected="true">
                                    Document data
                                </a>
                            @else
                                <a class="nav-link active" id="custom-tabs-five-home-tab" data-toggle="pill" href="#custom-tabs-five-home" role="tab" aria-controls="custom-tabs-five-home" aria-selected="true">
                                    <div class="skeleton skeleton-text short" style="width: 10rem;"></div>
                                </a>
                            @endif
                        </li>
                    @endif

                    @if($role->hasAnyPermission(["Basic View Birth Family relations"]))
                        <li class="nav-item">
                            @if($modalStatus)
                                <a class="nav-link" id="custom-tabs-five-family-tab" data-toggle="pill"
                                   href="#custom-tabs-five-family" role="tab" aria-controls="custom-tabs-five-family"
                                   aria-selected="false">
                                    Family relations
                                </a>
                            @else
                                <a class="nav-link" id="custom-tabs-five-family-tab" data-toggle="pill" href="#custom-tabs-five-family" role="tab" aria-controls="custom-tabs-five-family" aria-selected="false">
                                    <div class="skeleton skeleton-text short" style="width: 10rem;"></div>
                                </a>
                            @endif
                        </li>
                    @endif

                    @if($role->hasAnyPermission(["Basic View Birth Documents"]))
                        <li class="nav-item">
                            @if($modalStatus)
                                <a class="nav-link" id="custom-tabs-five-history-tab" data-toggle="pill"
                                   href="#custom-tabs-five-history" role="tab" aria-controls="custom-tabs-five-history"
                                   aria-selected="false">
                                    Document History
                                </a>
                            @else
                                <a class="nav-link" id="custom-tabs-five-family-tab" data-toggle="pill" href="#custom-tabs-five-family" role="tab" aria-controls="custom-tabs-five-family" aria-selected="false">
                                    <div class="skeleton skeleton-text short" style="width: 10rem;"></div>
                                </a>
                            @endif
                        </li>
                    @endif

                    @if($role->hasAnyPermission(["Basic View Birth History"]))
                        <li class="nav-item">
                            @if($modalStatus)
                                <a class="nav-link" id="custom-tabs-five-photo-tab" data-toggle="pill"
                                   href="#custom-tabs-five-photo" role="tab" aria-controls="custom-tabs-five-photo"
                                   aria-selected="false">
                                    Photo & Signature
                                </a>
                            @else
                                <a class="nav-link" id="custom-tabs-five-family-tab" data-toggle="pill" href="#custom-tabs-five-family" role="tab" aria-controls="custom-tabs-five-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-five-death-tab" data-toggle="pill"
                               href="#custom-tabs-five-death" role="tab" aria-controls="custom-tabs-five-death"
                               aria-selected="false">
                                Date of Death
                            </a>
                        @else
                            <a class="nav-link" id="custom-tabs-five-family-tab" data-toggle="pill" href="#custom-tabs-five-family" role="tab" aria-controls="custom-tabs-five-family" aria-selected="false">
                                <div class="skeleton skeleton-text short" style="width: 10rem;"></div>
                            </a>
                        @endif
                    </li>
            </ul>
        </div>

        <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-five-tabContent">
                    @if($role->hasAnyPermission(["Basic View Birth Details"]))
                        <div class="tab-pane fade show active" id="custom-tabs-five-home" role="tabpanel"
                             aria-labelledby="custom-tabs-five-home-tab">
                            @include('livewire.search.partials.tabs.birth.document_data')
                        </div>
                    @endif

                    @if($role->hasAnyPermission(["Basic View Birth Details"]))
                        <div class="tab-pane fade" id="custom-tabs-five-family" role="tabpanel"
                             aria-labelledby="custom-tabs-five-family-tab">
                            @include('livewire.search.partials.tabs.birth.document_header_details')
                        </div>
                    @endif

                    @if($role->hasAnyPermission(["Basic View Birth Details"]))
                        <div class="tab-pane fade" id="custom-tabs-five-history" role="tabpanel"
                             aria-labelledby="custom-tabs-five-history-tab">
                            @include('livewire.search.partials.tabs.birth.document_history')
                        </div>
                    @endif

                    @if($role->hasAnyPermission(["Basic View Birth Details"]))
                        <div class="tab-pane fade" id="custom-tabs-five-photo" role="tabpanel"
                             aria-labelledby="custom-tabs-five-photo-tab">
                            @include('livewire.search.partials.tabs.birth.family_relation')
                        </div>
                    @endif

                    @if($role->hasAnyPermission(["Basic View Birth Details"]))
                        <div class="tab-pane fade" id="custom-tabs-five-death" role="tabpanel"
                             aria-labelledby="custom-tabs-five-death-tab">
                            @include('livewire.search.partials.tabs.birth.document_data')
                        </div>
                    @endif

                </div>
            </div>
        </div>

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

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