import '@mantine/charts/styles.css';
import '@mantine/core/styles.css';
import '@mantine/notifications/styles.css';
import 'mantine-contextmenu/styles.css';
import 'mantine-datatable/styles.css';
import { localStorageColorSchemeManager, MantineProvider } from '@mantine/core';
import { ModalsProvider } from '@mantine/modals';
import { Notifications } from '@mantine/notifications';
import { ContextMenuProvider } from 'mantine-contextmenu';
import { createRoot } from 'react-dom/client';
import { BrowserRouter, Route, Routes } from 'react-router-dom';
import { MainWindow } from './components/MainWindow';
// Scotty's own key. The shared default ('mantine-color-scheme-value') is read by every Mantine app
// in wp-admin, and releases up to 2.2.0 wrote 'light' or 'dark' into it on every mount, so a value
// found there is not a choice the user made: under the old key "auto" would never apply again.
const colorSchemeManager = localStorageColorSchemeManager({ key: 'scotty-color-scheme' });
const ScottyApp = () => {
const pathname = window.location.pathname;
const baseName = pathname.substring(0, pathname.indexOf('/admin.php'));
return (
} />
);
};
createRoot(document.getElementById('scotty-react-app')!).render();