<script lang="ts">
	interface NavItem {
		label: string;
		href: string;
	}

	const {
		name,
		items,
		loginHref,
		loginLabel
	}: {
		name: string;
		items: NavItem[];
		loginHref: string;
		loginLabel: string;
	} = $props();
</script>

<nav class="navbar">
	<div class="navbar-start">
		<a class="btn btn-ghost text-xl normal-case" href="/">{name}</a>
	</div>
	<div class="navbar-center hidden lg:flex">
		<ul class="menu menu-horizontal px-1">
			{#each items as item}
				<li><a href={item.href}>{item.label}</a></li>
			{/each}
		</ul>
	</div>
	<div class="navbar-end">
        
		<a class="btn" href={loginHref}>{loginLabel}</a>
	</div>
</nav>
