import { type FC } from 'hono/jsx'

const Layout: FC = ({ children, title, props }) =>
  <html lang="en">
    <head>
      <title>{title ?? 'hype'}</title>
      <meta charset="utf-8" />
      <meta name="viewport" content="width=device-width, initial-scale=1.0" />
      <meta name="color-scheme" content="light dark" />

      {props.reset && <link href="/css/reset.css" rel="stylesheet" />}
      {props.pico && <link href="/css/pico.css" rel="stylesheet" />}
      <link href="/css/main.css" rel="stylesheet" />
      <script src="/js/main.ts" type="module"></script>
    </head>
    <body>
      <main>
        {children}
      </main>
    </body>
  </html>

export default Layout
