var _excluded = ["img", "className", "leftSpaceProps", "rightSpaceProps", "text", "title", "textCls", "titleCls", "footer", "footerCls", "subtitle", "subtitleCls", "imgFooter", "imgCls", "imgFooterCls", "after", "afterCls"];

function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }

function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }

function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }

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 from 'react';
import Space from '../space';
import { Image } from 'remax/one';
import styles from './index.module.less';
import classNames from 'classnames';
export default (function (_ref) {
  var img = _ref.img,
      className = _ref.className,
      leftSpaceProps = _ref.leftSpaceProps,
      rightSpaceProps = _ref.rightSpaceProps,
      text = _ref.text,
      title = _ref.title,
      textCls = _ref.textCls,
      titleCls = _ref.titleCls,
      footer = _ref.footer,
      footerCls = _ref.footerCls,
      subtitle = _ref.subtitle,
      subtitleCls = _ref.subtitleCls,
      imgFooter = _ref.imgFooter,
      imgCls = _ref.imgCls,
      imgFooterCls = _ref.imgFooterCls,
      after = _ref.after,
      afterCls = _ref.afterCls,
      props = _objectWithoutProperties(_ref, _excluded);

  return /*#__PURE__*/React.createElement(Space, _objectSpread(_objectSpread({
    className: classNames(styles.item, className),
    size: 20,
    flex: 1
  }, props), {}, {
    alignItems: 'center'
  }), (img || imgFooter) && /*#__PURE__*/React.createElement(Space, _objectSpread({
    size: 20,
    vertical: true
  }, leftSpaceProps), img && /*#__PURE__*/React.createElement(Image, {
    mode: 'aspectFill',
    src: img,
    className: classNames(styles.img, imgCls)
  }), imgFooter && /*#__PURE__*/React.createElement(Space, {
    className: classNames(styles.imgFooter, imgFooterCls)
  }, imgFooter)), /*#__PURE__*/React.createElement(Space, _objectSpread({
    size: 20,
    flex: 1,
    vertical: true
  }, leftSpaceProps), (title || subtitle) && /*#__PURE__*/React.createElement(Space, {
    size: 20,
    className: classNames(titleCls, styles.title),
    alignItems: 'center'
  }, title, /*#__PURE__*/React.createElement(Space, {
    className: classNames(subtitleCls, styles.subtitle)
  }, subtitle)), text && /*#__PURE__*/React.createElement(Space, {
    className: classNames(textCls, styles.text)
  }, text), footer && /*#__PURE__*/React.createElement(Space, {
    className: classNames(footerCls, styles.footer)
  }, footer)), after && /*#__PURE__*/React.createElement(Space, {
    className: classNames(afterCls)
  }, after));
});