import _Calendar from "@alifd/next/es/calendar";
import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
var _excluded = ["__designMode", "defaultValue", "value"];
export default (function (props) {
  if (props === void 0) {
    props = {};
  }
  var _ref = props || {},
    __designMode = _ref.__designMode,
    defaultValue = _ref.defaultValue,
    value = _ref.value,
    otherProps = _objectWithoutPropertiesLoose(_ref, _excluded);
  var finalValue = __designMode === 'design' ? defaultValue : value;
  var finalProps = _extends({}, otherProps);
  if (finalValue) {
    finalProps.value = typeof finalValue === 'string' ? moment(finalValue) : finalValue;
  }
  if (defaultValue) {
    finalProps.defaultValue = typeof defaultValue === 'string' ? moment(defaultValue) : defaultValue;
  }
  return /*#__PURE__*/React.createElement(_Calendar, finalProps);
});