import _inheritsLoose from "../../inheritsLoose";
import Intact from 'intact-angular';
import DatepickerTime from '../datepicker/time';

var TimepickerTime =
/*#__PURE__*/
function (_DatepickerTime) {
  _inheritsLoose(TimepickerTime, _DatepickerTime);

  function TimepickerTime() {
    return _DatepickerTime.apply(this, arguments) || this;
  }

  var _proto = TimepickerTime.prototype;

  _proto._isDisabled = function _isDisabled(value) {
    if (!value.every(function (item) {
      return item;
    })) return true;

    var _this$get = this.get(),
        min = _this$get.min,
        max = _this$get.max,
        _parent = _this$get._parent;

    value = _parent._createDate(value[0]);
    return min && value.isBefore(min) || max && value.isAfter(max);
  };

  return TimepickerTime;
}(DatepickerTime);

export { TimepickerTime as default };