import React from 'react';
import { Image, Text, View } from 'react-native';
import { icons } from '../../../assets';
import { Button, IconButton } from '../../../primitives';
import {
ICON_BUTTON_HIT_SLOP,
ICON_BUTTON_SIZE,
IN_APP_MESSAGING_TEST_ID,
} from '../../constants';
import { LayoutProps } from './types';
export default function MessageLayout({
orientation,
...props
}: LayoutProps): JSX.Element {
const {
body,
hasButtons,
hasPrimaryButton,
hasRenderableImage,
hasSecondaryButton,
header,
image,
onClose,
primaryButton,
secondaryButton,
styles,
testID,
} = props;
const iconButton = (
);
return (
{orientation === 'portrait' && iconButton}
{hasRenderableImage && (
)}
{header?.content && (
{header.content}
)}
{body?.content && (
{body.content}
)}
{orientation === 'landscape' && iconButton}
{hasButtons && (
{hasSecondaryButton && (
)}
{hasPrimaryButton && (
)}
)}
);
}