var _excluded = ["wrapperAttribute", "icon", "caption", "captionAttribute", "sndcaption", "sndcaptionAttribute", "content", "contentHTML", "children"];

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); }

function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }

import React, { forwardRef } from 'react';
var Notice = forwardRef(function (_ref, ref) {
  var _ref$wrapperAttribute = _ref.wrapperAttribute,
      wrapperAttribute = _ref$wrapperAttribute === void 0 ? {} : _ref$wrapperAttribute,
      icon = _ref.icon,
      _ref$caption = _ref.caption,
      caption = _ref$caption === void 0 ? '暂无数据' : _ref$caption,
      _ref$captionAttribute = _ref.captionAttribute,
      captionAttribute = _ref$captionAttribute === void 0 ? {} : _ref$captionAttribute,
      sndcaption = _ref.sndcaption,
      _ref$sndcaptionAttrib = _ref.sndcaptionAttribute,
      sndcaptionAttribute = _ref$sndcaptionAttrib === void 0 ? {} : _ref$sndcaptionAttrib,
      content = _ref.content,
      contentHTML = _ref.contentHTML,
      children = _ref.children,
      others = _objectWithoutPropertiesLoose(_ref, _excluded);

  return /*#__PURE__*/React.createElement("div", _extends({
    ref: ref
  }, others, {
    className: "notice" + (others.className ? ' ' + others.className : '')
  }), /*#__PURE__*/React.createElement("div", _extends({}, wrapperAttribute, {
    className: "notice-wrapper" + (wrapperAttribute.className ? ' ' + wrapperAttribute.className : '')
  }), icon ? icon : /*#__PURE__*/React.createElement("i", {
    className: "icon notice-icon notice-icon-nodata"
  }), caption && /*#__PURE__*/React.createElement("div", _extends({}, captionAttribute, {
    className: "notice-caption" + (captionAttribute.className ? ' ' + captionAttribute.className : '')
  }), caption), sndcaption && /*#__PURE__*/React.createElement("div", _extends({}, sndcaptionAttribute, {
    className: "notice-sndcaption" + (sndcaptionAttribute.className ? ' ' + sndcaptionAttribute.className : '')
  }), sndcaption), content, contentHTML && /*#__PURE__*/React.createElement("div", {
    dangerouslySetInnerHTML: {
      __html: contentHTML
    }
  }), children));
});
export default Notice;