@extends('backend.layouts.master')

@section('styles')
@endsection

@section('content')
	<div class="content">
		<div class="main-content">
			<div class="block justify-between page-header sm:flex">
				<div>
					<h3 class="text-gray-700 hover:text-gray-900 dark:text-white dark:hover:text-white text-2xl font-medium">
						{{ __('forms.policy') }} broj {{ $insurancePolicy->policy_number }}</h3>
				</div>
				<ol class="flex items-center whitespace-nowrap min-w-0">
					@if ($entity->entityable_type == 'App\Models\CRM\Company')
						<a href="{{ route('crm.companies.edit', $entity->entityable) }}"
							class="ti-btn ti-btn-outline ti-btn-outline-secondary py-0 px-1 my-0">Profil klijenta</a>
					@else
						<a href="{{ route('crm.individuals.edit', $entity->entityable) }}"
							class="ti-btn ti-btn-outline ti-btn-outline-secondary py-0 px-1 my-0">Profil klijenta</a>
					@endif
					<a href="{{ route('osiguranje.insurance-policies.index', $entity) }}"
						class="ti-btn ti-btn-outline ti-btn-outline-secondary py-0 px-1 my-0">Polise klijenta</a>
				</ol>
			</div>

			<div class="md:grid space-y-4 md:space-y-0 md:grid-cols-1 grid-cols-2 gap-4">

				@include('backend.insurance.insurance-policies.boxes.insurer')

				@if ($entity->entityable_type == 'App\Models\CRM\Company')
					@include('backend.insurance.insurance-policies.boxes.company')
				@else
					@include('backend.insurance.insurance-policies.boxes.individual')
				@endif

				<div class="sm:col-span-1 col-span-2">
					@include('backend.insurance.insurance-policies.forms.insurance-policies-form-edit')
				</div>
			</div>

		</div>
	</div>
@endsection

@section('scripts')
@endsection
