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