import React, { useEffect } from 'react';
import { initializeSecurity } from '@/lib/security';
import { AppProvider } from '@/providers/AppProvider';
import AppRouter from '@/src/AppRouter';

const App = ({ children }: { children?: React.ReactNode }) => {
  // Initialize security measures on app startup
  useEffect(() => {
    initializeSecurity();
  }, []);

  return <AppProvider>{children || <AppRouter />}</AppProvider>;
};

export default App;
