import React from "react"; //import PropTypes from 'prop-types';

import moment from "moment";
var FECHA_NULA = new Date(0);

var FechaCell = function FechaCell(props) {
  var f = moment(props.fecha);
  var es_null = f.isSame(FECHA_NULA);
  var fStr = f.isValid() && !es_null ? f.format("DD/MM/YYYY") : "";

  if (props.conEdit == true) {
    return f.isValid() && !es_null ? /*#__PURE__*/React.createElement(React.Fragment, null, fStr, " \xA0 \xA0", /*#__PURE__*/React.createElement("i", {
      className: "fa fa-pencil"
    })) : /*#__PURE__*/React.createElement(React.Fragment, null);
  } else {
    return f.isValid() && !es_null ? /*#__PURE__*/React.createElement(React.Fragment, null, fStr) : /*#__PURE__*/React.createElement(React.Fragment, null);
  }
};
/*
MyCoolButton.propTypes = {
    title: PropTypes.string.isRequired,
    type: PropTypes.string,
    onClick: PropTypes.func,
  };
  
  MyCoolButton.defaultProps = {
    type: 'button',
    onClick: () => {},
  };
  */


export default FechaCell;