import * as React from 'react';
import { Flex } from './Flex';
const defaultStyle = {
    height: '100%',
    maxHeight: '90vh',
    width: '70vw',
    maxWidth: 800,
};
const FlexWithFooter = (props) => {
    const { footer, footerProps, children, style, ...domProps } = props;
    return (React.createElement(Flex, { flexDirection: "column", ...domProps, style: { ...defaultStyle, ...style } },
        React.createElement(Flex, { flexDirection: "column", className: "twa:p-0 twa:flex-1" },
            React.createElement(Flex, { flexDirection: "column", className: "twa:flex-1" }, children)),
        footer ? (React.createElement(Flex, { className: "twa:p-2 twa:bg-primary", ...footerProps }, footer)) : null));
};
export default FlexWithFooter;
