import type { ReactNode } from "react";
import {
	BestiaryProvider,
	BulkImportProvider,
	EncounterProvider,
	InitiativeRollsProvider,
	PlayerCharactersProvider,
	SidePanelProvider,
	ThemeProvider,
} from "../contexts/index.js";

export function AllProviders({ children }: { children: ReactNode }) {
	return (
		<ThemeProvider>
			<EncounterProvider>
				<BestiaryProvider>
					<PlayerCharactersProvider>
						<BulkImportProvider>
							<SidePanelProvider>
								<InitiativeRollsProvider>{children}</InitiativeRollsProvider>
							</SidePanelProvider>
						</BulkImportProvider>
					</PlayerCharactersProvider>
				</BestiaryProvider>
			</EncounterProvider>
		</ThemeProvider>
	);
}
