<script>
	import { templates } from '$lib/templates/templates';

	/** @type number */ export let templateIndex;
	import { weekday } from '$lib/stores/store';
</script>

{#if templates[templateIndex] && $weekday}
	<div
		class="weekday"
		style="
    top: {templates[templateIndex].weekday.top}px;
    height: {templates[templateIndex].weekday.height}rem;
    left: {templates[templateIndex].weekday.left}rem;
    right: {templates[templateIndex].weekday.right}rem;
    color: {templates[templateIndex].weekday.color};
    font-size: {templates[templateIndex].weekday.fontSize}rem;
    font-family: {templates[templateIndex].weekday.fontFamily};
		text-align: {templates[templateIndex].weekday.textAlign};
		font-weight: {templates[templateIndex].weekday.fontWeight};
    "
	>
		{$weekday}
	</div>
{/if}

<style>
	.weekday {
		position: absolute;
		text-transform: uppercase;
		overflow: hidden;
	}
</style>
