<div>
    <x-title :breadcrumbs="[
        ['link' => route('institutions.index'), 'title' => 'Institutions'],
        ['link' => route('institutions.show', $institution), 'title' => $institution->display_name],
    ]">
        @if($institution->is_prioritised)
            <span class="mdi mdi-earth text-warning me-1" title="Prioritised"></span>
        @endif
        View Institution

        <x-slot:buttons>
            @can('delete', $institution)
                @if(!$hasClients)
                    <a wire:navigate wire:click="deleteInstitution()"
                       wire:confirm="Are you sure you want to delete this institution?"
                       class="btn btn-md btn-danger">
                        <span class="mdi mdi-trash-can"></span> Delete
                    </a>
                @endif
            @endcan
        </x-slot:buttons>
    </x-title>


    <div class="row">
        <div class="col-md-3">
            <x-institution.card :institution="$institution"/>
            <livewire:institution.contact-manager :institution="$institution"/>
            <livewire:address-book :owner="$institution"/>
        </div>
        <div class="col-md-6">
            <livewire:institution.clients :institution="$institution"/>
            <livewire:institution.relation-manager :institution="$institution"/>
        </div>
        <div class="col-md-3">
            <livewire:institution.aliases :institution="$institution"/>
            <livewire:institution.key-info :institution="$institution"/>
            <livewire:note-manager :owner="$institution"/>
            <livewire:institution.merge :institution="$institution"/>
        </div>
    </div>
</div>
