<template>
	<main>
		<h1>Schedule Demo</h1>
		<ul>
			<li>
				<NuxtLink to="/schedule">View Schedule</NuxtLink>
			</li>
			<li v-if="session?.account?.type === 'admin' || session?.account?.type === 'crew'">
				<NuxtLink to="/edit">Edit Schedule</NuxtLink>
			</li>
			<li v-if="session">
				<NuxtLink to="/account/settings">Account Settings</NuxtLink>
			</li>
			<li v-if="!session">
				<NuxtLink to="/login">Log In / Create Account</NuxtLink>
			</li>
		</ul>
	</main>
</template>

<script lang="ts" setup>
const { data: session } = await useAccountSession();
</script>
