<svelte:head>
    <title>Transporte: Acceso</title>
</svelte:head>

<script>
    import { routes } from '$/routes/guest.routes'
    import { Router, Route, createHistory } from 'svelte-navigator'
    import hashHistory from './hashHistory'
    const history = createHistory(hashHistory())
</script>

<Router {history} primary={false}>
    <main class="d-flex w-100">
        <div class="container d-flex flex-column">
            <div class="row vh-100">
                <div class="col-sm-10 col-md-8 col-lg-6 mx-auto d-table h-100">
                    <div class="d-table-cell align-middle">

                        <div class="text-center mt-4">
                            <h1 class="h2">Gestión de Transporte</h1>
                            <p class="lead">
                                Acceda a su cuenta para continuar
                            </p>
                        </div>

                        {#each routes as r}
                            <Route path={r.path}>
                                <svelte:component this={r.component} />
                            </Route>
                        {/each}

                    </div>
                </div>
            </div>
        </div>
    </main>
</Router>