import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { Component, Fragment } from 'react';
import { createRoot } from 'react-dom/client';
import { Footer } from './components/layout.footer.js';
import { Header } from './components/layout.header.js';
import { Basemaps } from './components/map.js';
import { Config } from './config.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', () => {
    void isWebpSupported().then(() => {
        WindowUrl.ImageFormat = 'webp';
        Config.map.updateFromUrl();
        const mainEl = document.getElementById('main');
        if (mainEl == null)
            throw new Error('Missing #main');
        const root = createRoot(mainEl);
        root.render(_jsx(Page, {}));
    });
});
//# sourceMappingURL=index.js.map