import { FC } from 'react' import { Pressable } from 'react-native' import { useTheme } from '../../../../providers/native' import { IconButton } from '../../buttons' import { ChevronIcon as DefaultBackIcon, CloseIcon as DefaultCloseIcon } from '../../icons' import { Text } from '../../typographies' import { View } from '../../views' import { createStyles } from './styles' import { AppBarProps } from './types' const AppBar: FC = ({ title, titleComponent, onBack, closeLabel, closeDisabled, onClose, BackIcon = DefaultBackIcon, CloseIcon = DefaultCloseIcon, closeComponent, CloseIconProps, }) => { const theme = useTheme() const styles = createStyles(theme) return ( {onBack && ( )} {titleComponent || ( {title} )} {closeComponent || (onClose && ( {closeLabel && ( {closeLabel} )} ))} ) } export default AppBar