"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const react_1 = __importStar(require("react"));
const components_1 = require("../../themes/components");
const borderRadius_1 = __importDefault(require("../../themes/foundations/borderRadius"));
const styled_components_1 = require("styled-components");
const ConfigProvider_1 = require("../../utils/ConfigProvider");
const react_native_1 = require("react-native");
const OrientationContext_1 = require("../../services/OrientationContext");
const browser_utils_1 = require("../../utils/browser-utils");
const DrawerTabHeader = ({ onBackButtonClick, heading }) => {
    const { sessionConfig } = react_1.useContext(ConfigProvider_1.ConfigServiceContext);
    const { colors } = react_1.useContext(styled_components_1.ThemeContext);
    const windowDimensions = react_native_1.useWindowDimensions();
    const { height, width } = browser_utils_1.useScale(sessionConfig.theme.dimensions || windowDimensions);
    const { orientation } = react_1.default.useContext(OrientationContext_1.OrientationContext);
    const isLandscape = orientation === 'LANDSCAPE';
    return (react_1.default.createElement(components_1.Box, { position: "absolute", zIndex: 10, pt: react_native_1.Platform.OS === 'ios' && !isLandscape ? 42 : 3, bg: "secondary.1000", width: width },
        react_1.default.createElement(components_1.HStack, null,
            react_1.default.createElement(components_1.Box, { width: width / 3 },
                react_1.default.createElement(components_1.Button, { onClick: onBackButtonClick },
                    react_1.default.createElement(components_1.HStack, { border: `1px solid ${colors.danger[500]}`, borderRadius: borderRadius_1.default.small, left: 20, p: 8, width: 80 },
                        react_1.default.createElement(components_1.Icon, { name: "arrow-back", fill: "danger.500" }),
                        react_1.default.createElement(components_1.Text, { ml: 4, mr: 4, color: "danger.500" }, "Back")))),
            react_1.default.createElement(components_1.Flex, { width: width / 3, align: "center", p: 8 },
                react_1.default.createElement(components_1.Text, { fontSize: 16, fontWeight: "bold", mb: 10 },
                    ' ',
                    heading)))));
};
exports.default = DrawerTabHeader;
//# sourceMappingURL=index.js.map