"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var _react = _interopRequireDefault(require("react"));

var _backToTripPlanner = _interopRequireDefault(require("./back-to-trip-planner"));

var _deleteUser = _interopRequireDefault(require("./delete-user"));

var _notificationPrefsPane = _interopRequireDefault(require("./notification-prefs-pane"));

var _favoritePlacesList = _interopRequireDefault(require("./places/favorite-places-list"));

var _stackedPaneDisplay = _interopRequireDefault(require("./stacked-pane-display"));

var _termsOfUsePane = _interopRequireDefault(require("./terms-of-use-pane"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

/**
 * This component handles the existing account display.
 */
const ExistingAccountDisplay = props => {
  // The props include Formik props that provide access to the current user data
  // and to its own blur/change/submit event handlers that automate the state.
  // We forward the props to each pane so that their individual controls
  // can be wired to be managed by Formik.
  const {
    onCancel
  } = props;
  const paneSequence = [{
    pane: _favoritePlacesList.default,
    props,
    title: 'My locations'
  }, {
    pane: _notificationPrefsPane.default,
    props,
    title: 'Notifications'
  }, {
    pane: _termsOfUsePane.default,
    props: { ...props,
      disableCheckTerms: true
    },
    title: 'Terms'
  }, {
    pane: _deleteUser.default,
    props
  }];
  return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_backToTripPlanner.default, null), /*#__PURE__*/_react.default.createElement(_stackedPaneDisplay.default, {
    onCancel: onCancel,
    paneSequence: paneSequence,
    title: "My settings"
  }));
};

var _default = ExistingAccountDisplay;
exports.default = _default;
module.exports = exports.default;

//# sourceMappingURL=existing-account-display.js