import { MainColor } from "@/constants/color-palet"; import { GStyles } from "@/styles/global-styles"; import { ImageBackground, Keyboard, KeyboardAvoidingView, Platform, ScrollView, TouchableWithoutFeedback, View, StyleProp, ViewStyle, } from "react-native"; import { SafeAreaView } from "react-native-safe-area-context"; interface ViewWrapperProps { children: React.ReactNode; withBackground?: boolean; headerComponent?: React.ReactNode; footerComponent?: React.ReactNode; floatingButton?: React.ReactNode; style?: StyleProp; } const ViewWrapper = ({ children, withBackground = false, headerComponent, footerComponent, floatingButton, style, }: ViewWrapperProps) => { const assetBackground = require("../../assets/images/main-background.png"); return ( <> {/* Header Sticky */} {headerComponent && ( {headerComponent} )} {withBackground ? ( {children} ) : ( {children} )} {footerComponent ? ( {footerComponent} ) : ( )} {/* Floating Component (misal: FAB) */} {floatingButton && ( {floatingButton} )} ); }; export default ViewWrapper;