"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _element = require("@wordpress/element");
var _bottomSheet = _interopRequireDefault(require("../bottom-sheet"));
var _linkSettingsScreen = _interopRequireDefault(require("./link-settings-screen"));
var _linkPickerScreen = _interopRequireDefault(require("../link-picker/link-picker-screen"));
var _jsxRuntime = require("react/jsx-runtime");
/**
 * WordPress dependencies
 */

/**
 * Internal dependencies
 */

const linkSettingsScreens = {
  settings: 'LinkSettingsScreen',
  linkPicker: 'linkPicker'
};
function LinkSettingsNavigation(props) {
  if (!props.withBottomSheet) {
    return /*#__PURE__*/(0, _jsxRuntime.jsx)(_linkSettingsScreen.default, {
      ...props
    });
  }
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_bottomSheet.default, {
    isVisible: props.isVisible,
    onClose: props.onClose,
    onDismiss: props.onDismiss,
    testID: "link-settings-navigation",
    hideHeader: true,
    hasNavigation: true,
    children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_bottomSheet.default.NavigationContainer, {
      animate: true,
      main: true,
      children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_bottomSheet.default.NavigationScreen, {
        name: linkSettingsScreens.settings,
        children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_linkSettingsScreen.default, {
          ...props,
          withBottomSheet: true
        })
      }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_bottomSheet.default.NavigationScreen, {
        name: linkSettingsScreens.linkPicker,
        isScrollable: true,
        fullScreen: true,
        children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_linkPickerScreen.default, {
          returnScreenName: linkSettingsScreens.settings
        })
      })]
    })
  });
}
var _default = exports.default = (0, _element.memo)(LinkSettingsNavigation);
//# sourceMappingURL=link-settings-navigation.native.js.map