<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<link rel="stylesheet" href="{{url_for('static', filename='css/style.css')}}" />
		<script src="https://unpkg.com/vue@3"></script>
		<title>Padliography</title>
	</head>
	<body>
		<div id="app">
			<h1 class="title">Padliography <span class="version">2.0</span></h1>
			<pad-form></pad-form>
			<pad-table></pad-table>
		</div>
        <div id="current-page" class="hidden">{{page}}</div>
        <div id="base-url" class="hidden">{{base_url}}</div>
		<script type="module">
			import PadForm from "{{url_for('static', filename='js/PadForm.js')}}";
			import PadTable from "{{url_for('static', filename='js/PadTable.js')}}";

			const { createApp } = Vue;
            
            import PadStore from "{{url_for('static', filename='js/PadStore.js')}}";
            const { currentPage, baseUrl } = PadStore()
            currentPage.value = document.querySelector('#current-page').textContent
            baseUrl.value = document.querySelector('#base-url').textContent

			createApp({
				components: { PadForm, PadTable },
			}).mount("#app");
		</script>
	</body>
</html>
