"use strict";

exports.__esModule = true;
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _propTypes = _interopRequireDefault(require("prop-types"));
var _novaIcons = require("@coorpacademy/nova-icons");
var _link = _interopRequireDefault(require("../../atom/link"));
var _picture = _interopRequireDefault(require("../../atom/picture"));
var _description = _interopRequireDefault(require("./description"));
var _style = _interopRequireDefault(require("./style.css"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
const BrandCard = props => {
  const {
    title,
    edit,
    editHref,
    onEditClick,
    see,
    seeHref,
    image,
    description,
    maintenance = false
  } = props;
  const maintenanceView = maintenance ? /*#__PURE__*/_react.default.createElement("div", {
    className: _style.default.lockWrapper
  }, /*#__PURE__*/_react.default.createElement(_novaIcons.NovaSolidLoginLocked, {
    className: _style.default.lockIcon,
    height: 80
  })) : null;
  return /*#__PURE__*/_react.default.createElement("div", {
    className: _style.default.wrapper
  }, /*#__PURE__*/_react.default.createElement("div", {
    className: _style.default.image
  }, /*#__PURE__*/_react.default.createElement(_picture.default, {
    className: _style.default.picture,
    src: image
  }), maintenanceView, /*#__PURE__*/_react.default.createElement(_description.default, {
    description: description,
    className: _style.default.descriptionWrapper
  })), /*#__PURE__*/_react.default.createElement("div", {
    className: _style.default.information,
    "data-name": `info-${title}`
  }, /*#__PURE__*/_react.default.createElement("h3", null, title), /*#__PURE__*/_react.default.createElement("div", {
    className: _style.default.edit
  }, /*#__PURE__*/_react.default.createElement(_link.default, {
    href: editHref,
    onClick: onEditClick,
    "data-name": `edit-${title}`
  }, edit)), /*#__PURE__*/_react.default.createElement("div", {
    className: _style.default.see,
    "data-name": `see-${title}`
  }, /*#__PURE__*/_react.default.createElement(_link.default, {
    target: "_blank",
    href: seeHref
  }, see))));
};
BrandCard.propTypes = process.env.NODE_ENV !== "production" ? {
  title: _propTypes.default.string.isRequired,
  description: _propTypes.default.string,
  edit: _propTypes.default.string.isRequired,
  editHref: _propTypes.default.string,
  onEditClick: _propTypes.default.func,
  see: _propTypes.default.string.isRequired,
  seeHref: _propTypes.default.string,
  image: _propTypes.default.string.isRequired,
  maintenance: _propTypes.default.bool
} : {};
var _default = exports.default = BrandCard;
//# sourceMappingURL=index.js.map