<?php
    $faCompanyId = auth()->user()->company_id;
    $useFixedAssetsModule = \App\Models\Setting::get($faCompanyId, 'use_fixed_assets_module', '0') === '1';
    $canViewFixedAssets = auth()->user()->hasPermission('fixed_assets', 'view');

    $fixedAssetsMenuItems = [];
    if ($canViewFixedAssets) {
        $fixedAssetsMenuItems = [
            ['route' => 'fixed-assets.register.index', 'pattern' => 'fixed-assets.register.*', 'icon' => 'bi-building', 'label' => 'Asset Register'],
            ['route' => 'fixed-assets.categories.index', 'pattern' => 'fixed-assets.categories.*', 'icon' => 'bi-tags', 'label' => 'Asset Categories'],
            ['route' => 'fixed-assets.depreciation.index', 'pattern' => 'fixed-assets.depreciation.*', 'icon' => 'bi-graph-down-arrow', 'label' => 'Depreciation'],
        ];
    }
?>

<?php if($useFixedAssetsModule): ?>
    <?php if(($variant ?? 'sidebar') === 'dropdown'): ?>
        <?php $__currentLoopData = $fixedAssetsMenuItems; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
        <li>
            <a class="dropdown-item <?php echo e(request()->routeIs($item['pattern']) ? 'active' : ''); ?>" href="<?php echo e(route($item['route'])); ?>">
                <i class="bi <?php echo e($item['icon']); ?> me-2"></i><?php echo e($item['label']); ?>

            </a>
        </li>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
    <?php else: ?>
        <?php $__currentLoopData = $fixedAssetsMenuItems; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
        <a href="<?php echo e(route($item['route'])); ?>"
           class="nav-item-link <?php echo e(request()->routeIs($item['pattern']) ? 'active' : ''); ?>">
            <i class="bi <?php echo e($item['icon']); ?>"></i><span><?php echo e($item['label']); ?></span>
        </a>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
    <?php endif; ?>
<?php endif; ?>
<?php /**PATH /home/duiclick/public_html/test.duiclick.com/resources/views/partials/fixed-assets-menu-items.blade.php ENDPATH**/ ?>