import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { useCallback } from "react";
import { ColorSchemeProvider, MantineProvider, } from "@mantine/core";
import { Notifications } from "@mantine/notifications";
import { ModalsProvider } from "@mantine/modals";
import { useLocalStorage } from "@mantine/hooks";
import { TableRoot } from "./modules";
import { Header, Footer } from "./components";
import { Analytics } from "./utils";
Analytics.initGoogleAnalytics();
var App = function () {
    var _a = useLocalStorage({
        key: "color-scheme",
        defaultValue: "dark",
    }), colorScheme = _a[0], setColorScheme = _a[1];
    var toggleColorScheme = useCallback(function (value) {
        setColorScheme(value || colorScheme === "dark" ? "light" : "dark");
    }, [colorScheme, setColorScheme]);
    return (_jsx(ColorSchemeProvider, { colorScheme: colorScheme, toggleColorScheme: toggleColorScheme, children: _jsx(MantineProvider, { withGlobalStyles: true, withNormalizeCSS: true, theme: {
                colorScheme: colorScheme,
                primaryColor: "blue",
            }, children: _jsxs(ModalsProvider, { children: [_jsx(Notifications, {}), _jsx(Header, {}), _jsx(TableRoot, {}), _jsx(Footer, {})] }) }) }));
};
export * from "./components/TableCore";
export default App;
