import { ScrollView } from "react-native";
import { useSafeAreaInsets } from "react-native-safe-area-context";

export function SafeAreaScrollView({ children }: React.PropsWithChildren) {
	const insets = useSafeAreaInsets();

	return (
		<ScrollView
			style={{
				paddingTop: insets.top,
				paddingBottom: insets.bottom,
				paddingLeft: insets.left,
				paddingRight: insets.right,
			}}
		>
			{children}
		</ScrollView>
	);
}
