import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { StrictMode } from "react";
import { createRoot } from "react-dom/client";
import App from "./App.tsx";
import "./index.css";
import { AuthProvider } from "./providers/components/AuthProviderComponent.tsx";
import { ThemeProvider } from "./providers/components/ThemeProviderComponent.tsx";
import { TimedModalProvider } from "./providers/components/TimedModalProviderComponent.tsx";


const queryClient = new QueryClient();


createRoot(document.getElementById('root')!).render(
	<StrictMode>
		<QueryClientProvider client={queryClient}>
			<ThemeProvider
				defaultTheme="dark"
				storageKey="vite-ui-theme"
			>
				<TimedModalProvider>
					<AuthProvider
						jwtStorageKey="jwt"
						refreshTokenStorageKey="refreshToken"
					>
						<App />
					</AuthProvider>
				</TimedModalProvider>
			</ThemeProvider>
		</QueryClientProvider>
	</StrictMode>
);
