/* eslint-disable @typescript-eslint/ban-ts-comment */
import React from 'react';
import { Container } from 'components/layout';
import { RichTextContentSegmentTypeEnum } from 'expo-schema';
import { RichTextProps } from './Types';
import { Content } from './content';
import { BottomAction } from './bottom-action';

export const RichText: React.FC<RichTextProps> = ({ block }) => {
  return (
    <Container overflow="hidden" borderRadius={10} borderColor="base-02" borderWidth={1}>
      <Container p="s">
        <div>
          {block.richTextContent.map((content, index) => (
            <Content
              setRichTextContent={() => {}}
              placeholder=""
              key={index}
              richTextContent={{
                id: String(''),
                order: 12,
                strings: [],
                type: RichTextContentSegmentTypeEnum.Paragraph,
              }}
            />
          ))}
        </div>
      </Container>
      {/* @ts-ignore */}
      <BottomAction variant="message" />
    </Container>
  );
};
