import React, { type ReactNode } from "react";
import { type BungeeConfig, ConfigProvider } from "./ConfigProvider";
import { LocalizationProvider } from "./LocalizationProvider";
import { ReduxProvider } from "./ReduxProvider";
import { ToastProvider } from "./ToastProvider";

export const Providers = ({
	children,
	config,
}: {
	children: ReactNode;
	config: BungeeConfig;
}) => {
	return (
		<ConfigProvider config={config}>
			<ReduxProvider>
				<LocalizationProvider>
					<ToastProvider>{children}</ToastProvider>
				</LocalizationProvider>
			</ReduxProvider>
		</ConfigProvider>
	);
};
