"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = TimePickerButton;

var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));

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

var _classnames2 = _interopRequireDefault(require("classnames"));

function TimePickerButton(_ref) {
  var _classnames;

  var prefixCls = _ref.prefixCls,
      locale = _ref.locale,
      showTimePicker = _ref.showTimePicker,
      onOpenTimePicker = _ref.onOpenTimePicker,
      onCloseTimePicker = _ref.onCloseTimePicker,
      timePickerDisabled = _ref.timePickerDisabled;
  var className = (0, _classnames2["default"])((_classnames = {}, (0, _defineProperty2["default"])(_classnames, "".concat(prefixCls, "-time-picker-btn"), true), (0, _defineProperty2["default"])(_classnames, "".concat(prefixCls, "-time-picker-btn-disabled"), timePickerDisabled), _classnames));
  var onClick = null;

  if (!timePickerDisabled) {
    onClick = showTimePicker ? onCloseTimePicker : onOpenTimePicker;
  }

  return /*#__PURE__*/_react["default"].createElement("a", {
    className: className,
    role: "button",
    onClick: onClick
  }, showTimePicker ? locale.dateSelect : locale.timeSelect);
}
//# sourceMappingURL=TimePickerButton.js.map
