"use strict";

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

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

var _propTypes = _interopRequireDefault(require("prop-types"));

var _reactstrap = require("reactstrap");

var _templates = require("../../templates");

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

function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }

var PageContent = function PageContent(_ref) {
  var props = _extends({}, _ref);

  return _react.default.createElement(_reactstrap.Container, null, _react.default.createElement(_reactstrap.Row, {
    className: "justify-content-center"
  }, _react.default.createElement(_reactstrap.Col, {
    md: "6"
  }, _react.default.createElement("div", {
    className: "clearfix"
  }, _react.default.createElement("h1", {
    className: "float-left display-3 mr-4"
  }, props.errorNumber), _react.default.createElement("h4", {
    className: "pt-3"
  }, props.title), _react.default.createElement("p", {
    className: "text-muted float-left"
  }, props.desc)), props.showSearchPage && _react.default.createElement(_reactstrap.InputGroup, {
    className: "input-prepend"
  }, _react.default.createElement(_reactstrap.InputGroupAddon, {
    addonType: "prepend"
  }, _react.default.createElement(_reactstrap.InputGroupText, null, _react.default.createElement("i", {
    className: "fa fa-search"
  }))), _react.default.createElement(_reactstrap.Input, {
    size: "16",
    type: "text",
    placeholder: props.placeholderSearch
  }), _react.default.createElement(_reactstrap.InputGroupAddon, {
    addonType: "append"
  }, _react.default.createElement(_reactstrap.Button, {
    color: "info"
  }, props.textButtonSearch))))));
};

var ErrorPage = function ErrorPage(_ref2) {
  var props = _extends({}, _ref2);

  return props.includeTemplate ? _react.default.createElement(_templates.BlankTemplate, null, _react.default.createElement(PageContent, props)) : _react.default.createElement(PageContent, props);
};

var _default = ErrorPage;
exports.default = _default;
ErrorPage.propTypes = {
  errorNumber: _propTypes.default.string.isRequired,
  title: _propTypes.default.string.isRequired,
  desc: _propTypes.default.string,
  showSearchPage: _propTypes.default.bool,
  onCallbackSearch: _propTypes.default.func,
  placeholderSearch: _propTypes.default.string,
  textButtonSearch: _propTypes.default.string,
  iconTypeName: _propTypes.default.string,
  iconName: _propTypes.default.string,
  includeTemplate: _propTypes.default.bool
};
ErrorPage.defaultProps = {
  showSearchPage: false,
  placeholderSearch: 'What are you looking for?',
  textButtonSearch: 'Search',
  iconTypeName: 'Fontawesome',
  iconname: 'search',
  includeTemplate: true
};