"use strict";

require("./demo6.css");

var _ = _interopRequireDefault(require(".."));

var _react = _interopRequireDefault(require("react"));

var _reactDom = _interopRequireDefault(require("react-dom"));

var _dayjs = _interopRequireDefault(require("dayjs"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }

function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }

function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }

function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }

function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }

function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }

var RangePicker = _["default"].RangePicker;

var onChange = function onChange(value) {
  return console.log('onChange: ', value);
};

var onOk = function onOk(value) {
  return console.log('onOK: ', value.format('YYYY-MM-DD HH:mm:ss'));
};

var onRangeOk = function onRangeOk(value) {
  var _console;

  return (_console = console).log.apply(_console, ['onOk: [%s, %s]'].concat(_toConsumableArray(value)));
};

var defaultTimeValue = (0, _dayjs["default"])('09:00:00', 'HH:mm:ss', true);
var defaultTimeValues = [(0, _dayjs["default"])('09:00:00', 'HH:mm:ss', true), (0, _dayjs["default"])('23:59:59', 'HH:mm:ss', true)];

_reactDom["default"].render( /*#__PURE__*/_react["default"].createElement("div", {
  className: "app"
}, /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_["default"], {
  showTime: true,
  onChange: onChange,
  onOk: onOk
})), /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_["default"], {
  showTime: true,
  timePanelProps: {
    defaultValue: defaultTimeValue,
    secondStep: 10
  },
  onChange: onChange,
  onOk: onOk
})), /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(RangePicker, {
  showTime: true,
  onChange: onChange,
  onOk: onRangeOk
})), /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(RangePicker, {
  showTime: true,
  timePanelProps: {
    defaultValue: defaultTimeValues,
    format: 'HH:mm',
    minuteStep: 15
  },
  onChange: onChange,
  onOk: onRangeOk
}))), document.getElementById('date-picker2-demo-6'));