<?php $__env->startSection('styles'); ?>
	<!-- CHOICES CSS -->
	<link rel="stylesheet" href="<?php echo e(asset('assets/libs/choices.js/public/assets/styles/choices.min.css')); ?>">
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>
	<div class="content">
		<?php if($company): ?>
			<!-- Edit mode -->
			<div id="company-dashboard" 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">
							<?php echo e($company->short_name); ?></h3>
					</div>
					<div>
						<?php if(session('status')): ?>
							<script>
								document.addEventListener("DOMContentLoaded", function() {
									notifier.success("<?php echo e(session('status')); ?>");
								});
							</script>
						<?php endif; ?>
					</div>
				</div>

				<div class="grid grid-cols-12 gap-x-6">
					<div class="col-span-12 lg:col-span-2">
						<div class="box">
							<div class="box-body pt-6">
								<?php echo $__env->make('backend.crm.companies.components.sidebar', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
							</div>
						</div>
					</div>
					<div class="col-span-12 lg:col-span-10">
						<div class="grid grid-cols-12 gap-x-5">
							<div class="col-span-12 lg:col-span-8">
								<?php echo $__env->make('backend.crm.companies.forms.company-form-edit', [
									'company' => $company,
									'readonly' => $readonly,
								], array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
							</div>
							<div class="col-span-12 lg:col-span-4">
								<?php if($company->lastActiveResidence): ?>
									<?php echo $__env->make('backend.crm.companies.forms.address-residence-form-edit', ['company' => $company], array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
								<?php else: ?>
									<?php echo $__env->make('backend.crm.companies.forms.address-residence-form', [
										'company' => $company,
									], array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
								<?php endif; ?>
							</div>
						</div>
					</div>
				</div>
			</div>
		<?php else: ?>
			<!-- Create mode -->
			<div id="company-dashboard" 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">
							Novo pravno lice </h3>
					</div>
					<div>
						<?php if(session('status')): ?>
							<script>
								document.addEventListener("DOMContentLoaded", function() {
									notifier.success("<?php echo e(session('status')); ?>");
								});
							</script>
						<?php endif; ?>
					</div>
				</div>

				<div class="grid grid-cols-12 gap-x-6">
					<div class="col-span-12 lg:col-span-2">
						<div class="box">
							<div class="box-body pt-6">
								<?php echo $__env->make('backend.crm.companies.components.sidebar', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
							</div>
						</div>
					</div>
					<div class="col-span-12 lg:col-span-10">
						<div class="grid grid-cols-12 gap-x-5">
							<div class="col-span-12 lg:col-span-8">
								<?php echo $__env->make('backend.crm.companies.forms.company-form', [
									'readonly' => $readonly,
								], array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
							</div>
							<div class="col-span-12 lg:col-span-4">
								<?php echo $__env->make('backend.crm.companies.placeholders.address-form', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
							</div>
						</div>
					</div>
				</div>
			</div>
		<?php endif; ?>
	</div>

<?php $__env->stopSection(); ?>

<?php $__env->startSection('scripts'); ?>
	<!-- CHOICES JS -->
	<script src="<?php echo e(asset('assets/libs/choices.js/public/assets/scripts/choices.min.js')); ?>"></script>

	<?php if($company): ?>
		<script>
			window.__IS_READONLY__ = <?php echo json_encode($readonly, 15, 512) ?>;

			// For residence
			window.__OLD_residence_city_id = "<?php echo e(old('residence.city_id')); ?>";
			window.__EXISTING_residence_city_id = "<?php echo e(optional($company->lastActiveResidence)->city_id); ?>";
		</script>

		<?php echo app('Illuminate\Foundation\Vite')(['resources/js/choices-setup.js']); ?>
	<?php endif; ?>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('backend.layouts.master', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\laragon\www\policypilot\resources\views/backend/crm/companies/dashboard.blade.php ENDPATH**/ ?>