import 'core-js/modules/es.symbol.js';
import 'core-js/modules/es.array.filter.js';
import 'core-js/modules/es.object.get-own-property-descriptor.js';
import 'core-js/modules/es.object.get-own-property-descriptors.js';
import 'core-js/modules/es.object.keys.js';
import 'core-js/modules/es.object.to-string.js';
import 'core-js/modules/web.dom-collections.for-each.js';
import _defineProperty from '@babel/runtime/helpers/defineProperty';
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
import React__default from 'react';
import PropTypes from 'prop-types';
import DateTimePickerNew, { propTypes, defaultProps } from './DateTimePickerV2WithTimeSpinner.js';
import DateTimePickerOld from './DateTimePickerV2WithoutTimeSpinner.js';

var _excluded = ["useNewTimeSpinner", "testId", "defaultValue", "dateTimeMask", "presets", "intervals", "relatives", "expanded", "disabled", "invalid", "showRelativeOption", "showCustomRangeLink", "hasTimeInput", "hideBackButton", "renderPresetTooltipText", "onCancel", "onApply", "onClear", "i18n", "light", "locale", "id", "hasIconOnly", "menuOffset", "datePickerType", "renderInPortal", "useAutoPositioning", "style", "closeOnSelect"];
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
var DateTimePicker = function DateTimePicker(_ref) {
  var useNewTimeSpinner = _ref.useNewTimeSpinner,
    testId = _ref.testId,
    defaultValue = _ref.defaultValue,
    dateTimeMask = _ref.dateTimeMask,
    presets = _ref.presets,
    intervals = _ref.intervals,
    relatives = _ref.relatives,
    expanded = _ref.expanded,
    disabled = _ref.disabled,
    invalid = _ref.invalid,
    showRelativeOption = _ref.showRelativeOption,
    showCustomRangeLink = _ref.showCustomRangeLink,
    hasTimeInput = _ref.hasTimeInput,
    hideBackButton = _ref.hideBackButton,
    renderPresetTooltipText = _ref.renderPresetTooltipText,
    onCancel = _ref.onCancel,
    onApply = _ref.onApply,
    onClear = _ref.onClear,
    i18n = _ref.i18n,
    light = _ref.light,
    locale = _ref.locale,
    id = _ref.id,
    hasIconOnly = _ref.hasIconOnly,
    menuOffset = _ref.menuOffset,
    datePickerType = _ref.datePickerType,
    renderInPortal = _ref.renderInPortal,
    useAutoPositioning = _ref.useAutoPositioning,
    style = _ref.style,
    closeOnSelect = _ref.closeOnSelect,
    others = _objectWithoutProperties(_ref, _excluded);
  return useNewTimeSpinner ? /*#__PURE__*/React__default.createElement(DateTimePickerNew, {
    testId: testId,
    defaultValue: defaultValue,
    dateTimeMask: dateTimeMask,
    presets: presets,
    intervals: intervals,
    relatives: relatives,
    expanded: expanded,
    disabled: disabled,
    invalid: invalid,
    hideBackButton: hideBackButton,
    showRelativeOption: showRelativeOption,
    showCustomRangeLink: showCustomRangeLink,
    hasTimeInput: hasTimeInput,
    renderPresetTooltipText: renderPresetTooltipText,
    onCancel: onCancel,
    onApply: onApply,
    onClear: onClear,
    i18n: i18n,
    light: light,
    locale: locale,
    id: id,
    hasIconOnly: hasIconOnly,
    menuOffset: menuOffset,
    datePickerType: datePickerType,
    renderInPortal: renderInPortal,
    useAutoPositioning: useAutoPositioning,
    style: style,
    closeOnSelect: closeOnSelect,
    others: others
  }) : /*#__PURE__*/React__default.createElement(DateTimePickerOld, {
    testId: testId,
    defaultValue: defaultValue,
    dateTimeMask: dateTimeMask,
    presets: presets,
    intervals: intervals,
    relatives: relatives,
    expanded: expanded,
    disabled: disabled,
    invalid: invalid,
    showRelativeOption: showRelativeOption,
    showCustomRangeLink: showCustomRangeLink,
    hasTimeInput: hasTimeInput,
    renderPresetTooltipText: renderPresetTooltipText,
    onCancel: onCancel,
    onApply: onApply,
    i18n: i18n,
    light: light,
    locale: locale,
    id: id,
    hasIconOnly: hasIconOnly,
    menuOffset: menuOffset,
    datePickerType: datePickerType,
    renderInPortal: renderInPortal,
    useAutoPositioning: useAutoPositioning,
    style: style,
    others: others
  });
};
DateTimePicker.propTypes = _objectSpread(_objectSpread({}, propTypes), {}, {
  /** Whether to use new time spinner */
  useNewTimeSpinner: PropTypes.bool
});
DateTimePicker.defaultProps = _objectSpread(_objectSpread({}, defaultProps), {}, {
  useNewTimeSpinner: false
});
DateTimePicker.__docgenInfo = {
  "description": "",
  "methods": [],
  "displayName": "DateTimePicker",
  "props": {
    "useNewTimeSpinner": {
      "defaultValue": {
        "value": "false",
        "computed": false
      },
      "description": "Whether to use new time spinner",
      "type": {
        "name": "bool"
      },
      "required": false
    }
  },
  "composes": ["./DateTimePickerV2WithTimeSpinner"]
};
var DateTimePicker$1 = DateTimePicker;

export { DateTimePicker$1 as default };
