import BABox from "./BABox"
import BAScreenHeader from "./BAScreenHeader"

type propsType = {
    title: string,
    children: any,
    extraTitle?: any,
    headerOptions?: {
        displayField: () => void,
        isHide?: boolean
    }[],
    disableBack?: boolean,
}

export default function BAScreenWrapper(props: propsType) {
    const { title, extraTitle, headerOptions, children, disableBack } = props
    return <>
        <BABox className="p-2">
            <BAScreenHeader disableBack={disableBack} title={title} headerOptions={headerOptions} extraTitle={extraTitle} />
            <BABox className="py-2">{children}</BABox>
        </BABox>
    </>
}