{include "layout.html"}

{block "content"}
<div class="town inn">
	<div class="title"><h3>{town.Name} Inn</h3></div>

	{if rested}
		<p>You wake up feeling refreshed and ready for action!</p>
		<p>You may return to <a href="/town">town</a>, or use the compass on the left to explore.</p>
	{else}
		{if user.Gold < town.InnCost}
			<p>You do not have enough gold to stay at this inn tonight.</p>
			<p>You may return to <a href="/town">town</a>, or use the compass on the left to explore.</p>
		{else}
			Resting at the inn will refill your current HP, MP, and TP to their maximum levels.<br><br>
			A night's sleep at this inn will cost you <b>{town.InnCost} gold</b>. Is that ok?<br><br>
			<form action="/town/inn" method="post" class="inline-block">
				{csrf}
				<button class="btn" type="submit">Yes</button>
			</form>
			<a href="/town"><button class="btn">No</button></a>
		{/if}
	{/if}
</div>
{/block}