"use strict";

function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _propTypes = _interopRequireDefault(require("prop-types"));
var _react = _interopRequireDefault(require("react"));
var _button = require("./button");
var l = _interopRequireWildcard(require("../../core/index"));
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var ConfirmationPane = function ConfirmationPane(_ref) {
  var lock = _ref.lock,
    backHandler = _ref.backHandler,
    children = _ref.children,
    closeHandler = _ref.closeHandler,
    svg = _ref.svg;
  return /*#__PURE__*/_react.default.createElement("div", {
    className: "auth0-lock-confirmation"
  }, closeHandler && /*#__PURE__*/_react.default.createElement(_button.CloseButton, {
    lockId: l.id(lock),
    onClick: closeHandler
  }), backHandler && /*#__PURE__*/_react.default.createElement(_button.BackButton, {
    lockId: l.id(lock),
    onClick: backHandler
  }), /*#__PURE__*/_react.default.createElement("div", {
    className: "auth0-lock-confirmation-content"
  }, /*#__PURE__*/_react.default.createElement("span", null, svg), children));
};
ConfirmationPane.propTypes = {
  backHandler: _propTypes.default.func,
  closeHandler: _propTypes.default.func,
  children: _propTypes.default.oneOfType([_propTypes.default.element.isRequired, _propTypes.default.arrayOf(_propTypes.default.element).isRequired]),
  svg: _propTypes.default.element.isRequired
};
var _default = exports.default = ConfirmationPane;
