<?php
  $active = $active ?: 'dashboard';
  $navBase = 'nav-item flex w-full items-center gap-3 rounded-xl px-3 py-2.5 text-sm font-medium';
  $inactive = $navBase.' text-gray-500 hover:bg-gray-50 hover:text-gray-900';
  $activeClass = $navBase.' active';
?>

<aside class="sidebar fixed left-0 top-0 h-screen bg-white border-r border-gray-100 flex flex-col z-40" id="sidebar">
  <div class="flex h-16 items-center gap-3 px-4 border-b border-gray-100">
    <div class="flex h-9 w-9 shrink-0 items-center justify-center rounded-xl bg-[#4f6ef7]">
      <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 text-white" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2"/></svg>
    </div>
    <div class="sidebar-label flex flex-col overflow-hidden">
      <span class="text-base font-semibold tracking-tight">InspectAI</span>
      <span class="text-[11px] text-gray-400"><?php echo e(__('Property Intelligence')); ?></span>
    </div>
  </div>

  <nav class="flex-1 overflow-y-auto px-3 py-4 space-y-1">
    <div class="section-label mb-2 px-2">
      <span class="text-[11px] font-medium uppercase tracking-wider text-gray-400"><?php echo e(__('Main Menu')); ?></span>
    </div>

    <a href="<?php echo e(route('dashboard')); ?>" data-spa-link data-nav="dashboard" class="<?php echo e($active === 'dashboard' ? $activeClass : $inactive); ?>">
      <svg xmlns="http://www.w3.org/2000/svg" class="h-[18px] w-[18px] shrink-0" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="3" width="7" height="7"/><rect x="14" y="3" width="7" height="7"/><rect x="14" y="14" width="7" height="7"/><rect x="3" y="14" width="7" height="7"/></svg>
      <span class="sidebar-label"><?php echo e(__('Dashboard')); ?></span>
    </a>
    <a href="<?php echo e(route('inspections.index')); ?>" data-spa-link data-nav="inspections" class="<?php echo e($active === 'inspections' ? $activeClass : $inactive); ?>">
      <svg xmlns="http://www.w3.org/2000/svg" class="h-[18px] w-[18px] shrink-0" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>
      <span class="sidebar-label"><?php echo e(__('Inspection')); ?></span>
    </a>
    <a href="<?php echo e(route('reports.index')); ?>" data-spa-link data-nav="reports" class="<?php echo e($active === 'reports' ? $activeClass : $inactive); ?>">
      <svg xmlns="http://www.w3.org/2000/svg" class="h-[18px] w-[18px] shrink-0" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/><line x1="16" y1="13" x2="8" y2="13"/><line x1="16" y1="17" x2="8" y2="17"/></svg>
      <span class="sidebar-label"><?php echo e(__('Reports')); ?></span>
    </a>
    <a href="<?php echo e(route('costs.index')); ?>" data-spa-link data-nav="costs" class="<?php echo e($active === 'costs' ? $activeClass : $inactive); ?>">
      <svg xmlns="http://www.w3.org/2000/svg" class="h-[18px] w-[18px] shrink-0" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="12" y1="1" x2="12" y2="23"/><path d="M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6"/></svg>
      <span class="sidebar-label"><?php echo e(__('Cost Estimation')); ?></span>
    </a>
    <a href="<?php echo e(route('workspaces.index')); ?>" data-spa-link data-nav="workspaces" class="<?php echo e($active === 'workspaces' ? $activeClass : $inactive); ?>">
      <svg xmlns="http://www.w3.org/2000/svg" class="h-[18px] w-[18px] shrink-0" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M3 7h6l2 3h10v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/><path d="M3 7V5a2 2 0 0 1 2-2h4l2 4"/></svg>
      <span class="sidebar-label"><?php echo e(__('Workspaces')); ?></span>
    </a>
    <a href="<?php echo e(route('history.index')); ?>" data-spa-link data-nav="history" class="<?php echo e($active === 'history' ? $activeClass : $inactive); ?>">
      <svg xmlns="http://www.w3.org/2000/svg" class="h-[18px] w-[18px] shrink-0" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"/><polyline points="12 6 12 12 16 14"/></svg>
      <span class="sidebar-label"><?php echo e(__('History')); ?></span>
    </a>
  </nav>

  <div class="px-3 pb-4">
    <div class="h-px bg-gray-100 mb-3"></div>
    <form method="POST" action="<?php echo e(route('logout')); ?>">
      <?php echo csrf_field(); ?>
      <button type="submit" class="<?php echo e($inactive); ?>">
        <svg xmlns="http://www.w3.org/2000/svg" class="h-[18px] w-[18px] shrink-0" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"/><polyline points="16 17 21 12 16 7"/><line x1="21" y1="12" x2="9" y2="12"/></svg>
        <span class="sidebar-label"><?php echo e(__('Logout')); ?></span>
      </button>
    </form>
    <div class="h-px bg-gray-100 my-3"></div>
    <button onclick="toggleSidebar()" class="flex w-full items-center justify-center gap-2 rounded-xl px-3 py-2 text-sm text-gray-400 hover:bg-gray-50 hover:text-gray-700 transition-colors">
      <svg id="collapseIcon" xmlns="http://www.w3.org/2000/svg" class="h-4 w-4 transition-transform" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="15 18 9 12 15 6"/></svg>
      <span class="collapse-label"><?php echo e(__('Collapse')); ?></span>
    </button>
  </div>
</aside>
<?php /**PATH C:\Users\ariqa\Documents\matkul\smster 4\data sains\prj\homeinspector\resources\views/partials/sidebar.blade.php ENDPATH**/ ?>