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

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

const MessageRow = ({ isLoggedUser, children }: MessageRowProps) => {
  return (
    <Stack
      sx={{
        flexDirection: isLoggedUser ? 'row-reverse' : 'row',
        '&:hover .hover-smile': {
          opacity: 1,
          visibility: 'visible',
        },
      }}
    >
      {children}
    </Stack>
  );
};

export default MessageRow;
