

<?php $__env->startSection('title', 'Organization Chart'); ?>
<?php $__env->startSection('heading', 'Organization Chart'); ?>

<?php $__env->startSection('content'); ?>
    <?php echo $__env->make('employees.top-submenu', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
    <style>
        :root {
            --org-line-color: #0f766e;
            --org-line-width: 2px;
        }

        .org-tree, .org-tree ul {
            margin: 0;
            padding-top: 1.25rem;
            position: relative;
            display: flex;
            justify-content: center;
            width: max-content;
            min-width: max-content;
        }

        .org-tree {
            margin-left: auto;
            margin-right: auto;
        }

        .org-tree li {
            list-style: none;
            text-align: center;
            position: relative;
            padding: 1.25rem .75rem 0 .75rem;
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        .org-tree li > ul {
            position: relative;
            left: 50%;
            transform: translateX(-50%);
        }

        .org-tree li::before,
        .org-tree li::after {
            content: '';
            position: absolute;
            top: 0;
            right: 50%;
            width: 50%;
            height: 1.25rem;
            border-top: var(--org-line-width) solid var(--org-line-color);
            filter: drop-shadow(0 0 1px rgba(15, 118, 110, 0.35));
        }

        .org-tree li::after {
            right: auto;
            left: 50%;
            border-left: var(--org-line-width) solid var(--org-line-color);
        }

        .org-tree li:only-child::before,
        .org-tree li:only-child::after {
            display: none;
        }

        .org-tree li:only-child {
            padding-top: 0;
        }

        .org-tree li:first-child::before,
        .org-tree li:last-child::after {
            border: 0;
        }

        .org-tree li:last-child::before {
            border-right: var(--org-line-width) solid var(--org-line-color);
            border-radius: 0 .5rem 0 0;
        }

        .org-tree li:first-child::after {
            border-radius: .5rem 0 0 0;
        }

        .org-tree ul::before {
            content: '';
            position: absolute;
            top: 0;
            left: 50%;
            width: 0;
            height: 1.25rem;
            border-left: var(--org-line-width) solid var(--org-line-color);
            filter: drop-shadow(0 0 1px rgba(15, 118, 110, 0.35));
        }

        .org-card {
            width: 12rem;
        }
    </style>

    <?php if (isset($component)) { $__componentOriginal53747ceb358d30c0105769f8471417f6 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal53747ceb358d30c0105769f8471417f6 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.card','data' => []] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('card'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
        <div class="mb-6">
            <p class="text-sm text-slate-500">Company hierarchy and reporting structure</p>
            <p class="mt-1 text-xs text-slate-400">Total employees: <?php echo e($totalEmployees); ?></p>
        </div>

        <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($orgTree->isEmpty()): ?>
            <p class="rounded-lg border border-dashed border-slate-300 p-6 text-center text-sm text-slate-500">No reporting hierarchy available yet.</p>
        <?php else: ?>
            <div class="overflow-x-auto pb-2">
                <ul class="org-tree">
                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__currentLoopData = $orgTree; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $node): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <?php echo $__env->make('people.partials.org-node', ['node' => $node], array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                </ul>
            </div>
        <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
     <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal53747ceb358d30c0105769f8471417f6)): ?>
<?php $attributes = $__attributesOriginal53747ceb358d30c0105769f8471417f6; ?>
<?php unset($__attributesOriginal53747ceb358d30c0105769f8471417f6); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal53747ceb358d30c0105769f8471417f6)): ?>
<?php $component = $__componentOriginal53747ceb358d30c0105769f8471417f6; ?>
<?php unset($__componentOriginal53747ceb358d30c0105769f8471417f6); ?>
<?php endif; ?>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /var/www/html/kiyohr/v2_version/resources/views/people/org-chart.blade.php ENDPATH**/ ?>