import Stack from '@mui/joy/Stack'; import Sheet from '@mui/joy/Sheet'; import Typography from '@mui/joy/Typography'; import { Box, Chip, IconButton, Input } from '@mui/joy'; import List from '@mui/joy/List'; import EditNoteRoundedIcon from '@mui/icons-material/EditNoteRounded'; import SearchRoundedIcon from '@mui/icons-material/SearchRounded'; import CloseRoundedIcon from '@mui/icons-material/CloseRounded'; import ChatListItem from './ChatListItem'; import { ChatProps } from '../types'; import { toggleMessagesPane } from '../utils'; type ChatsPaneProps = { chats: ChatProps[]; setSelectedChat: (chat: ChatProps) => void; selectedChatId: string; }; export default function ChatsPane(props: ChatsPaneProps) { const { chats, setSelectedChat, selectedChatId } = props; return ( 4 } sx={{ fontSize: { xs: 'md', md: 'lg' }, fontWeight: 'lg', mr: 'auto' }} > Messages { toggleMessagesPane(); }} sx={{ display: { sm: 'none' } }} > } placeholder="Search" aria-label="Search" /> {chats.map((chat) => ( ))} ); }