<script lang="ts">
  import { ShoppingCart, Package, FileText } from "lucide-svelte";
  import { resolve } from "$app/paths";
  import ProtectedRoute from "$lib/components/ProtectedRoute.svelte";
</script>

<ProtectedRoute>
<main class="container mx-auto px-4 py-4">
  <div class="text-sm breadcrumbs mb-4">
    <ul>
      <li><a href={resolve('/')} class="text-primary hover:underline">Dashboard</a></li>
      <li>Compras</li>
    </ul>
  </div>

  <div class="mb-6">
    <div class="flex items-center gap-4 mb-2">
      <div class="p-3 bg-cyan-500/20 rounded-xl">
        <ShoppingCart class="h-8 w-8 text-cyan-600" strokeWidth={2} />
      </div>
      <div>
        <h1 class="text-3xl font-bold text-primary">Compras</h1>
        <p class="text-base-content/70">Gestão de compras e aquisições</p>
      </div>
    </div>
  </div>

  <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
    <a
      href={resolve('/compras/produtos')}
      class="card bg-base-100 shadow-md hover:shadow-lg transition-shadow border border-base-200 hover:border-primary"
    >
      <div class="card-body">
        <div class="flex items-center gap-3 mb-2">
          <div class="p-2 bg-primary/10 rounded-lg">
            <Package class="h-6 w-6 text-primary" strokeWidth={2} />
          </div>
          <h4 class="font-semibold">Produtos</h4>
        </div>
        <p class="text-sm text-base-content/70">
          Cadastro, listagem e edição de produtos e serviços disponíveis para compra.
        </p>
      </div>
    </a>

    <a
      href={resolve('/pedidos')}
      class="card bg-base-100 shadow-md hover:shadow-lg transition-shadow border border-base-200 hover:border-secondary"
    >
      <div class="card-body">
        <div class="flex items-center gap-3 mb-2">
          <div class="p-2 bg-secondary/10 rounded-lg">
            <FileText class="h-6 w-6 text-secondary" strokeWidth={2} />
          </div>
          <h4 class="font-semibold">Pedidos</h4>
        </div>
        <p class="text-sm text-base-content/70">
          Gerencie pedidos de compra, acompanhe status e histórico de aquisições.
        </p>
      </div>
    </a>
  </div>
</main>
</ProtectedRoute>

