import React from 'react';
import { QueryClientProvider } from '@tanstack/react-query';
import { queryClient } from '@/lib/queryClient';
import { MemoryRouter } from 'react-router-dom';
import { AuthProvider } from '@/hooks/useAuth';
import { Toaster } from '@/components/ui/sonner';
import { FileBrowserProvider } from './FileBrowserContext';
import FileBrowser from './FileBrowser';

const FileBrowserApp: React.FC = () => {
    return (
        <QueryClientProvider client={queryClient}>
            <AuthProvider>
                <MemoryRouter>
                    <FileBrowserProvider>
                        <div className="flex flex-col h-full w-full bg-background text-foreground">
                            <FileBrowser />
                        </div>
                    </FileBrowserProvider>
                    <Toaster />
                </MemoryRouter>
            </AuthProvider>
        </QueryClientProvider>
    );
};

export default FileBrowserApp;
