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

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

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

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