import Stack from '@material-hu/mui/Stack';

type MessageContainerProps = {
  isLoggedUser: boolean;
  children: React.ReactNode;
};

const MessageContainer = ({
  isLoggedUser,
  children,
}: MessageContainerProps) => {
  return (
    <Stack
      sx={{
        position: 'relative',
        alignItems: isLoggedUser ? 'flex-end' : 'flex-start',
        gap: 0.125,
      }}
    >
      {children}
    </Stack>
  );
};

export default MessageContainer;
