import { Routes, Route, Navigate } from 'react-router-dom';
import { AppLayout } from '@/components/layout/AppLayout';
import { ChatView } from '@/components/chat/ChatView';
import { AccountList } from '@/components/accounts/AccountList';
import { AssetGallery } from '@/components/assets/AssetGallery';
import { ConfigForm } from '@/components/config/ConfigForm';
import { ToastProvider } from '@/hooks/useToast';

export default function App() {
  return (
    <ToastProvider>
      <AppLayout>
        <Routes>
          <Route path="/" element={<Navigate to="/chat" replace />} />
          <Route path="/chat" element={<ChatView />} />
          <Route path="/chat/:conversationId" element={<ChatView />} />
          <Route path="/accounts" element={<AccountList />} />
          <Route path="/accounts/:accountId" element={<AccountList />} />
          <Route path="/assets" element={<AssetGallery />} />
          <Route path="/settings" element={<ConfigForm />} />
        </Routes>
      </AppLayout>
    </ToastProvider>
  );
}
