<nav class="flex flex-col space-y-2" aria-label="Navigation Links">

	@if ($insurer)
		<a href="{{ route('osiguranje.insurers.edit', $insurer) }}"
			class="
            @if (url()->current() == route('osiguranje.insurers.edit', $insurer)) bg-primary border-primary text-white dark:bg-primary dark:border-primary dark:text-white 
            @else bg-gray-50 text-gray-500 dark:bg-black/20 dark:border-white/10 dark:text-white/70 hover:text-gray-700 dark:hover:text-gray-300 @endif
            py-3 px-3 inline-flex items-center gap-2 text-sm font-medium text-center border rounded-sm
        ">
			<i class="ri ri-shield-user-line"></i> {{ __('forms.BasicData') }}
		</a>

		@if ($insurer->commissionDefaults->count() > 0)
			<a href="{{ route('osiguranje.commission-defaults.edit', $insurer) }}"
				class="
            @if (url()->current() == route('osiguranje.commission-defaults.edit', $insurer)) bg-primary border-primary text-white dark:bg-primary dark:border-primary dark:text-white 
            @else bg-gray-50 text-gray-500 dark:bg-black/20 dark:border-white/10 dark:text-white/70 hover:text-gray-700 dark:hover:text-gray-300 @endif
            py-3 px-3 inline-flex items-center gap-2 text-sm font-medium text-center border rounded-sm
        ">
				<i class="ri ri-shield-user-line"></i> {{ __('insurance.CommissionDefaults') }}
			</a>
		@else
			<a href="{{ route('osiguranje.commission-defaults.create', $insurer) }}"
				class="
            @if (url()->current() == route('osiguranje.commission-defaults.create', $insurer)) bg-primary border-primary text-white dark:bg-primary dark:border-primary dark:text-white 
            @else bg-gray-50 text-gray-500 dark:bg-black/20 dark:border-white/10 dark:text-white/70 hover:text-gray-700 dark:hover:text-gray-300 @endif
            py-3 px-3 inline-flex items-center gap-2 text-sm font-medium text-center border rounded-sm
        ">
				<i class="ri ri-shield-user-line"></i> {{ __('insurance.CommissionDefaults') }}
			</a>
		@endif
	@else
		<a href="javascript:void(0)"
			class="
            bg-gray-50 text-gray-500 dark:bg-black/20 dark:border-white/10 dark:text-white/70 hover:text-gray-700 dark:hover:text-gray-300
            py-3 px-3 inline-flex items-center gap-2 text-sm font-medium text-center border rounded-sm text-red-500
        ">
			<i class="ri ri-shield-user-line"></i> {{ __('forms.BasicData') }}
		</a>
	@endif

	@if ($errors->any())
		<div class="alert alert-danger">
			<ul>
				@foreach ($errors->all() as $error)
					<li>{{ $error }}</li>
				@endforeach
			</ul>
		</div>
	@endif
</nav>
