"use strict";

exports.__esModule = true;
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _propTypes = _interopRequireDefault(require("prop-types"));
var _brandCreateForm = _interopRequireDefault(require("../../../molecule/brand-create-form"));
var _notification = _interopRequireDefault(require("../../../atom/notification"));
var _layout = _interopRequireDefault(require("../layout"));
var _style = _interopRequireDefault(require("./style.css"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
const BrandCreate = (0, _layout.default)(props => {
  const {
    notifications = []
  } = props;
  const notificationsList = notifications.map((notification, index) => {
    return /*#__PURE__*/_react.default.createElement("div", {
      key: index,
      className: _style.default.notification
    }, /*#__PURE__*/_react.default.createElement(_notification.default, notification));
  });
  return /*#__PURE__*/_react.default.createElement("div", {
    className: _style.default.container
  }, /*#__PURE__*/_react.default.createElement("div", {
    className: _style.default.wrapper
  }, /*#__PURE__*/_react.default.createElement("div", {
    className: notifications.length > 0 ? _style.default.notifications : _style.default.empty
  }, notificationsList), /*#__PURE__*/_react.default.createElement(_brandCreateForm.default, props)));
});
BrandCreate.propTypes = process.env.NODE_ENV !== "production" ? {
  notifications: _propTypes.default.arrayOf(_propTypes.default.shape({
    type: _propTypes.default.string.isRequired,
    message: _propTypes.default.string.isRequired,
    onClose: _propTypes.default.func
  })),
  title: _propTypes.default.string.isRequired,
  subtitle: _propTypes.default.string.isRequired,
  description: _propTypes.default.string.isRequired,
  field: _propTypes.default.shape({
    placeholder: _propTypes.default.string.isRequired,
    label: _propTypes.default.string.isRequired,
    onChange: _propTypes.default.func.isRequired,
    error: _propTypes.default.string,
    value: _propTypes.default.string
  }).isRequired,
  onSubmit: _propTypes.default.func.isRequired,
  submitValue: _propTypes.default.string.isRequired,
  isPending: _propTypes.default.bool,
  isModified: _propTypes.default.bool
} : {};
var _default = exports.default = BrandCreate;
//# sourceMappingURL=index.js.map