import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
import _createClass from "@babel/runtime/helpers/createClass";
import _inherits from "@babel/runtime/helpers/inherits";
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
var _excluded = ["avatar", "link", "className", "description", "title"];

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import cx from 'classnames';
import theme from './theme.css';
import Avatar from '../avatar';
import Box from '../box';
import Link from '../link';
import Popover from '../popover';
import { Heading3, TextBody } from '../typography';
/** @type {React.ComponentType<any>} */

var EmptyPassport = /*#__PURE__*/function (_PureComponent) {
  _inherits(EmptyPassport, _PureComponent);

  var _super = _createSuper(EmptyPassport);

  function EmptyPassport() {
    _classCallCheck(this, EmptyPassport);

    return _super.apply(this, arguments);
  }

  _createClass(EmptyPassport, [{
    key: "render",
    value: function render() {
      var _this$props = this.props,
          avatar = _this$props.avatar,
          link = _this$props.link,
          className = _this$props.className,
          description = _this$props.description,
          title = _this$props.title,
          others = _objectWithoutProperties(_this$props, _excluded);

      return /*#__PURE__*/React.createElement(Popover, _extends({}, others, {
        backdrop: "transparent",
        className: cx(theme['passport-empty'], className)
      }), /*#__PURE__*/React.createElement(Box, {
        paddingHorizontal: 4,
        paddingVertical: 5
      }, /*#__PURE__*/React.createElement(Box, {
        display: "flex",
        flexDirection: "column",
        alignItems: "center"
      }, avatar && /*#__PURE__*/React.createElement(Avatar, _extends({}, avatar, {
        size: "small",
        marginBottom: 4
      })), /*#__PURE__*/React.createElement(Heading3, {
        color: "teal"
      }, title), description && /*#__PURE__*/React.createElement(TextBody, {
        color: "neutral",
        marginTop: 2
      }, description), link && /*#__PURE__*/React.createElement(TextBody, {
        marginTop: 4
      }, /*#__PURE__*/React.createElement(Link, _extends({}, link, {
        inherit: false
      }))))));
    }
  }]);

  return EmptyPassport;
}(PureComponent);

export default EmptyPassport;