function _extends() {
  _extends = Object.assign ? Object.assign.bind() : function(target) {
    for (var i = 1; i < arguments.length; i++) {
      var source = arguments[i];
      for (var key in source) {
        if (Object.prototype.hasOwnProperty.call(source, key)) {
          target[key] = source[key];
        }
      }
    }
    return target;
  };
  return _extends.apply(this, arguments);
}
import React, { forwardRef, useContext } from "react";
import classnames from "classnames";
import DatePicker from "./DatePicker";
import TimePicker from "./TimePicker";
import ConfigProviderContext from "../config-provider/ConfigProviderContext";
const DateTimePicker = /* @__PURE__ */ forwardRef((props, ref) => {
  const {
    prefixCls,
    createNamespace
  } = useContext(ConfigProviderContext);
  const [bem] = createNamespace("datetime-picker", prefixCls);
  const isTimePicker = props.type === "time";
  const Component = isTimePicker ? TimePicker : DatePicker;
  return /* @__PURE__ */ React.createElement(Component, _extends({
    ref,
    className: classnames(bem())
  }, props));
});
var stdin_default = DateTimePicker;
export {
  DateTimePicker,
  stdin_default as default
};
