import React from 'react';
import { Room as MatrixRoom } from 'matrix-js-sdk';
import { useTranslation } from 'react-i18next';
import { Icon, Icons } from 'folds';
import { BotOpenChatAction } from './BotOpenChatAction';
import { BotStatePage } from './BotStatePage';

type BotUnsafeRoomProps = {
  room: MatrixRoom;
};

export function BotUnsafeRoom({ room }: BotUnsafeRoomProps) {
  const { t } = useTranslation();

  return (
    <BotStatePage
      icon={<Icon size="600" src={Icons.Warning} />}
      title={t('Bots.unsafe_title')}
      description={t('Bots.unsafe_description')}
    >
      <BotOpenChatAction room={room} />
    </BotStatePage>
  );
}
