<div class="box" id="insurer-form">
	<div class="box-header">
		<h5 class="box-title">{{ __('forms.BasicData') }}</h5>
	</div>
	<div class="box-body pb-2">
		<form action="{{ route('osiguranje.insurers.store', $insurer) }}" method="POST">
			@csrf
			<div class="grid grid-cols-1 gap-x-6 space-y-0 lg:space-y-0">
				<div class="mb-4">
					<label for="business_name" class="ti-form-label @error('business_name') error @enderror">
						@error('business_name')
							{{ $message }}
						@else
							{{ __('forms.BusinessName') }}
						@enderror
					</label>
					<input id="business_name" type="text" name="business_name" value="{{ old('business_name') }}"
						class="ti-form-input shadow-sm @error('business_name') border-red-500 @enderror"
						placeholder="{{ __('forms.BusinessName') }}" {{ $readonly ? 'disabled' : '' }}>
				</div>
			</div>

			<div class="grid grid-cols-2 gap-x-6 space-y-0 lg:space-y-0">
				<div class="mb-4">
					<label for="short_name" class="ti-form-label @error('short_name') error @enderror">
						@error('short_name')
							{{ $message }}
						@else
							{{ __('forms.ShortName') }}
						@enderror
					</label>
					<input id="short_name" type="text" name="short_name" value="{{ old('short_name') }}"
						class="ti-form-input shadow-sm @error('short_name') border-red-500 @enderror"
						placeholder="{{ __('forms.ShortName') }}" {{ $readonly ? 'disabled' : '' }}>
				</div>
				<div class="mb-4">
					<label for="Email" class="ti-form-label @error('email') error @enderror">
						@error('email')
							{{ $message }}
						@else
							{{ __('forms.Email') }}
						@enderror
					</label>
					<input id="Email" type="email" name="email" value="{{ old('email') }}"
						class="ti-form-input shadow-sm @error('email') border-red-500 @enderror" placeholder="{{ __('forms.Email') }}"
						autocomplete="email" {{ $readonly ? 'disabled' : '' }}>
				</div>
			</div>

			<div class="grid grid-cols-4 gap-x-6 space-y-0 lg:space-y-0">

				<div class="mb-4">
					<label for="mb" class="ti-form-label @error('mb') error @enderror">
						@error('mb')
							{{ $message }}
						@else
							{{ __('forms.MB') }}
						@enderror
					</label>
					<input id="mb" type="text" name="mb" value="{{ old('mb') }}"
						class="ti-form-input shadow-sm @error('mb') border-red-500 @enderror" placeholder="{{ __('forms.MB') }}"
						{{ $readonly ? 'disabled' : '' }}>
				</div>

				<div class="mb-4">
					<label for="pib" class="ti-form-label @error('pib') error @enderror">
						@error('pib')
							{{ $message }}
						@else
							{{ __('forms.PIB') }}
						@enderror
					</label>
					<input id="pib" type="text" name="pib" value="{{ old('pib') }}"
						class="ti-form-input shadow-sm @error('pib') border-red-500 @enderror" placeholder="{{ __('forms.PIB') }}"
						{{ $readonly ? 'disabled' : '' }}>
				</div>
				<div class="mb-4">
					<label for="phone" class="ti-form-label @error('phone') error @enderror">
						@error('phone')
							{{ $message }}
						@else
							{{ __('forms.PhoneNumber') }}
						@enderror
					</label>
					<input id="phone" type="text" name="phone" value="{{ old('phone') }}"
						class="ti-form-input shadow-sm @error('phone') border-red-500 @enderror"
						placeholder="@error('phone') {{ __('forms.Phone') }} @enderror {{ __('forms.PhonePlaceholder') }}"
						{{ $readonly ? 'disabled' : '' }}>
				</div>
				<div class="mb-4">
					<label for="mobile" class="ti-form-label @error('mobile') error @enderror">
						@error('mobile')
							{{ $message }}
						@else
							{{ __('forms.MobilePhoneNumber') }}
						@enderror
					</label>
					<input id="mobile" type="text" name="mobile" value="{{ old('mobile') }}"
						class="ti-form-input shadow-sm @error('mobile') border-red-500 @enderror"
						placeholder="@error('mobile') {{ __('forms.Mobile') }} @enderror {{ __('forms.PhonePlaceholder') }}"
						{{ $readonly ? 'disabled' : '' }}>
				</div>
			</div>

			@if (!$readonly)
				<!-- Submit Button -->
				<div class="flex justify-between">
					<div>
					</div>

					<button type="submit" class="ti-btn ti-btn-outline-success py-1 px-3 mr-0">
						<span>
							{{ __('forms.Save') }}
						</span>
					</button>
				</div>
			@endif
		</form>
	</div>
</div>
