import { Hono } from 'hono';
import { serveStatic } from 'hono/bun';
import { logger } from 'hono/logger';
import BaseDocument from './BaseDocument';
import Main from './Main';
import Accounts from './Accounts';

const app = new Hono();

app.use(logger());
app.use('/static/*', serveStatic({ root: './' }));

app.get("/", c => {
    return c.html(<BaseDocument title='Main Page - RoBaertschi'><Main></Main></BaseDocument>);
});

app.get("/accounts", c => {
    return c.html(
        <BaseDocument title='Accounts - RoBaertschi'>
            <Accounts />
        </BaseDocument>
    );
});

export default app;
