'use client';
import React from 'react';
import { SessionProvider } from 'next-auth/react';
import { SessionInactivityGuard } from '@/features/auth/components/session-inactivity-guard';
import { ActiveThemeProvider } from '../themes/active-theme';
import QueryProvider from './query-provider';

export default function Providers({
  activeThemeValue,
  children
}: {
  activeThemeValue: string;
  children: React.ReactNode;
}) {
  return (
    <ActiveThemeProvider initialTheme={activeThemeValue}>
      <SessionProvider>
        <SessionInactivityGuard />
        <QueryProvider>{children}</QueryProvider>
      </SessionProvider>
    </ActiveThemeProvider>
  );
}
