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

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

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

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