import { j as e } from "../../node_modules/react/jsx-runtime.mjs";
import { isMobile as n } from "../../node_modules/react-device-detect/dist/lib.mjs";
import "./index.less.mjs";
import p from "../../node_modules/antd/es/date-picker/index.mjs";
const { RangePicker: j } = p, M = ({
  type: a = "range",
  picker: c = "date",
  onChange: g = () => {
  },
  showTime: i = !1,
  format: r = "YYYY-MM-DD",
  defaultValue: o,
  disabledDate: s,
  disabledDateTime: t,
  disabled: l = !1
}) => {
  const m = (k, x) => {
    g(x);
  };
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
    a == "date" && /* @__PURE__ */ e.jsx(
      p,
      {
        picker: c,
        onChange: m,
        showTime: i,
        format: r,
        defaultValue: o,
        disabledDate: s,
        disabledTime: t,
        disabled: l,
        inputReadOnly: n
      }
    ),
    a == "range" && /* @__PURE__ */ e.jsx(
      j,
      {
        onChange: m,
        showTime: i,
        format: r,
        defaultValue: o,
        disabledDate: s,
        disabledTime: t,
        disabled: l,
        inputReadOnly: n,
        ...n ? {
          popupClassName: "mobileDatePickerPanel"
        } : {}
      }
    )
  ] });
};
export {
  M as default
};
