
import { useState } from "react";
import { ChatInterface } from "@/components/chat/ChatInterface";
import { SettingsModal } from "@/components/modals/SettingsModal";
import { SourcesModal } from "@/components/modals/SourcesModal";

const ChatLayout = () => {
  const [isSettingsOpen, setIsSettingsOpen] = useState(false);
  const [isSourcesOpen, setIsSourcesOpen] = useState(false);

  return (
    <div className="flex h-[100dvh] md:h-screen w-full">
      <ChatInterface 
        onOpenSettings={() => setIsSettingsOpen(true)}
        onOpenSources={() => setIsSourcesOpen(true)}
      />
      
      <SettingsModal 
        open={isSettingsOpen} 
        onOpenChange={setIsSettingsOpen} 
      />
      
      <SourcesModal 
        open={isSourcesOpen} 
        onOpenChange={setIsSourcesOpen} 
      />
    </div>
  );
};

export default ChatLayout;
