import {type ReactNode} from 'react' import {ScrollView, View} from 'react-native' import { useSafeAreaFrame, useSafeAreaInsets, } from 'react-native-safe-area-context' import {LinearGradient} from 'expo-linear-gradient' import {isAndroid, isNative} from '#/platform/detection' import {useA11y} from '#/state/a11y' import {atoms as a, flatten, useBreakpoints, useTheme, web} from '#/alf' import {transparentifyColor} from '#/alf/util/colorGeneration' import {FocusScope} from '#/components/FocusScope' import {LockScroll} from '#/components/LockScroll' const GUTTER = 24 export function Overlay({ children, label, }: { children: ReactNode label: string }) { const t = useTheme() const {gtPhone} = useBreakpoints() const {reduceMotionEnabled} = useA11y() const insets = useSafeAreaInsets() const frame = useSafeAreaFrame() return ( <> {gtPhone ? ( ) : ( )} {/** * This is needed to prevent centered dialogs from overflowing * above the screen, and provides a "natural" centering so that * stacked dialogs appear relatively aligned. */} {!gtPhone && ( )} {children} ) }