"use strict";

import React from 'react';
import { HeaderContainer, HeaderLeft, HeaderRight } from './styledModalComponents';
import { BackIcon } from '../../assets/icons';
import Button from '../styled/Button';
import { Text } from 'react-native';
import { useSafeAreaInsets } from 'react-native-safe-area-context';
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
const ModalHeaderComponent = ({
  handleCloseModal,
  headerTitle,
  rightMenu,
  leftMenu
}) => {
  // The library's full-screen modals are an absolute-fill overlay inside
  // ModalBackground (NOT a native Modal), so the OS doesn't apply any
  // status-bar inset automatically — we have to. SafeAreaProvider is
  // mounted by ReduxWrapper, so this reads the live per-device inset
  // (notch / Dynamic Island / nothing).
  const insets = useSafeAreaInsets();
  return /*#__PURE__*/_jsxs(HeaderContainer, {
    style: {
      paddingTop: insets.top + 8
    },
    children: [/*#__PURE__*/_jsx(HeaderLeft, {
      children: leftMenu ? leftMenu : /*#__PURE__*/_jsxs(_Fragment, {
        children: [/*#__PURE__*/_jsx(Button, {
          EndIcon: /*#__PURE__*/_jsx(BackIcon, {}),
          onPress: handleCloseModal
        }), /*#__PURE__*/_jsx(Text, {
          children: headerTitle ?? 'Go back'
        })]
      })
    }), /*#__PURE__*/_jsx(HeaderRight, {
      children: rightMenu
    })]
  });
};
export default ModalHeaderComponent;
//# sourceMappingURL=ModalHeaderComponent.js.map