import { StyleSheet, TouchableOpacity, View } from "react-native"; import type { Theme } from "../../../core/design-system/index.js"; import { spacing } from "../../design-system/index.js"; import { BACK_ICON, CLOSE_ICON } from "../icons/svgs.js"; import { RNImage } from "./RNImage.js"; import { ThemedText } from "./text.js"; export type ContainerType = "modal" | "embed"; export function Header({ theme, title, onClose, onBack, containerType, }: { theme: Theme; title: string; onClose?: () => void; onBack?: () => void; containerType: ContainerType; }) { if (containerType === "embed") { return onBack ? ( Back ) : null; } return ( {onBack && ( )} {title} {onClose && ( )} ); } const styles = StyleSheet.create({ headerModal: { alignItems: "center", flexDirection: "row", justifyContent: "space-between", paddingHorizontal: spacing.lg, paddingTop: spacing.lg, }, });