import { type GestureResponderEvent } from "react-native"; import { Button, type ButtonProps } from "../../button"; import { Flex, type FlexProps } from "../../flex"; import { makeStyles } from "../../theme"; import { useModal } from "../use-modal"; type OverlayFooterProps = { actions: ButtonProps[]; } & Omit; export default function OverlayFooter({ actions, ...rest }: OverlayFooterProps) { const styles = useStyles(); const modal = useModal(); const handlePress = (actionIndex: number, event: GestureResponderEvent) => { if (modal.options.closeable) { modal.hideModal(); } actions[actionIndex]!.onPress?.(event); }; return ( {actions.map((action, index) => (