<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="breadcrumbs mb-4 text-sm">
			<ul>
				<li><a href={resolve('/')} class="text-primary hover:underline">Dashboard</a></li>
				<li>Compras</li>
			</ul>
		</div>

		<div class="mb-6">
			<div class="mb-2 flex items-center gap-4">
				<div class="rounded-xl bg-cyan-500/20 p-3">
					<ShoppingCart class="h-8 w-8 text-cyan-600" strokeWidth={2} />
				</div>
				<div>
					<h1 class="text-primary text-3xl font-bold">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 gap-4 md:grid-cols-2 lg:grid-cols-3">
			<a
				href={resolve('/compras/produtos')}
				class="card bg-base-100 border-base-200 hover:border-primary border shadow-md transition-shadow hover:shadow-lg"
			>
				<div class="card-body">
					<div class="mb-2 flex items-center gap-3">
						<div class="bg-primary/10 rounded-lg p-2">
							<Package class="text-primary h-6 w-6" strokeWidth={2} />
						</div>
						<h4 class="font-semibold">Produtos</h4>
					</div>
					<p class="text-base-content/70 text-sm">
						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 border-base-200 hover:border-secondary border shadow-md transition-shadow hover:shadow-lg"
			>
				<div class="card-body">
					<div class="mb-2 flex items-center gap-3">
						<div class="bg-secondary/10 rounded-lg p-2">
							<FileText class="text-secondary h-6 w-6" strokeWidth={2} />
						</div>
						<h4 class="font-semibold">Pedidos</h4>
					</div>
					<p class="text-base-content/70 text-sm">
						Gerencie pedidos de compra, acompanhe status e histórico de aquisições.
					</p>
				</div>
			</a>
		</div>
	</main>
</ProtectedRoute>
