import { jsx as _jsx, jsxs as _jsxs } from "preact/jsx-runtime";
import { Component, Fragment, render } from 'preact';
import { Footer } from './components/layout.footer.js';
import { Header } from './components/layout.header.js';
import { Basemaps } from './components/map.js';
import { WindowUrl } from './url.js';
import { isWebpSupported } from './webp.js';
class Page extends Component {
    render() {
        return (_jsxs(Fragment, { children: [_jsx(Header, {}), _jsx(Basemaps, {}), _jsx(Footer, {})] }));
    }
}
document.addEventListener('DOMContentLoaded', async () => {
    const canUseWebp = await isWebpSupported();
    if (await canUseWebp)
        WindowUrl.ImageFormat = 'webp';
    const mainEl = document.getElementById('main');
    if (mainEl == null)
        throw new Error('Missing #main');
    render(_jsx(Page, {}), mainEl);
});
//# sourceMappingURL=index.js.map