<div>
    <x-title :breadcrumbs="[
        ['link' => route('clients.index'), 'title' => 'Clients'],
        ['link' => route('clients.show', $client), 'title' => $client->name_first . ' ' . $client->name_last],
    ]">
        View Client
    </x-title>

    <div class="row">

        <div class="col-12 col-md-3 position-relative">
            <div wire:loading.remove>
                <x-client.client-card :client="$client"/>

                <livewire:client.edit-lead-source :client="$client"/>

                @isset($claim)
                    <livewire:claim.edit-status :claim="$claim"/>
                @endisset

                <div class="card">
                    <div class="card-body">
                        <h4 class="fw-bold">Funding Tranche</h4>
                        @if($client->tranche()->exists())
                            <p>{{ $client->tranche->funder_name }} - {{ $client->tranche->tranche_name }}</p>
                        @else
                            <p>No funding tranche assigned.</p>
                        @endif
                    </div>
                </div>
            </div>

        </div>

        <div class="col-12 col-md-6 position-relative">

            <div wire:loading.remove>
                <livewire:client.client-tabs :client="$client"/>
            </div>

        </div>

        <div class="col-12 col-md-3 position-relative">

            <div wire:loading.remove>
                <livewire:claim.institution-manager :claim="$client->claim"/>
                <livewire:note-manager :owner="$client" primary="true"/>
                <livewire:client.relation-manager :client="$client"/>
            </div>

        </div>

    </div>
</div>
