"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const components_1 = require("@bluebase/components");
const react_1 = tslib_1.__importDefault(require("react"));
/**
 * Screen component, renders a screen with a header
 * @param props
 */
exports.ScreenView = (props) => {
    const { screen: Screen, navigationOptions, navigator, styles } = props, rest = tslib_1.__rest(props, ["screen", "navigationOptions", "navigator", "styles"]);
    const stylesheet = styles;
    const options = navigationOptions;
    return (react_1.default.createElement(components_1.View, { style: stylesheet.root },
        react_1.default.createElement(components_1.Header, Object.assign({}, options)),
        react_1.default.createElement(components_1.View, { style: stylesheet.content }, Screen ? react_1.default.createElement(Screen, Object.assign({}, rest)) : rest.children)));
};
exports.ScreenView.defaultStyles = (theme) => ({
    content: {
        flex: 1,
    },
    root: {
        backgroundColor: theme.palette.background.default,
        flex: 1,
        height: '100%',
    },
});
