import { View, ImageBackground } from 'react-native';
import { styles } from './LayoutStyles';
import type { LayoutTypes } from './Layout.types';
import { SafeAreaView } from 'react-native-safe-area-context';
const Layout = ({
children,
isSafeArea,
backgroundColor,
padding,
isCentered,
isJustify,
isImageBackground,
backgroundImage,
overlayColor,
imageBackgroundBlurRadius,
}: LayoutTypes) => {
// Both SafeArea and ImageBackground
if (isSafeArea && isImageBackground) {
return (
{children}
);
}
// Only SafeArea
if (isSafeArea) {
return (
{children}
);
}
// Only ImageBackground
if (isImageBackground) {
return (
{children}
);
}
// Default fallback
return (
{children}
);
};
export default Layout;