<script lang="ts">
	const { pageTitle, rightComponent } = $props();
</script>

<nav>
	<a id="logo" href="/">
		<img src="/img/logo.svg" alt="" style="height:50px" />
	</a>
	<div id="middletitle">{pageTitle}</div>
	<div id="right">{@render rightComponent()}</div>
</nav>

<style>
	nav {
		position: fixed;
		width: 100%;
		background-color: var(--bg-primary);
		color: white;
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 8px;
		height: 64px;
		z-index: 2;
	}

	#logo {
		transition-duration: 0.2s;
	}

	#logo:hover {
		transform: scale(1.025);
		filter: saturate(2);
	}

	#middletitle {
		font-weight: bold;
		font-size: 24px;
	}

	#right {
		display: flex;
	}
</style>
