function _extends() {
  return _extends = Object.assign ? Object.assign.bind() : function(n) {
    for (var e = 1; e < arguments.length; e++) {
      var t = arguments[e];
      for (var r in t)
        ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
    }
    return n;
  }, _extends.apply(null, 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
};
