import { jsx as C } from "react/jsx-runtime";
import { forwardRef as L, useState as N } from "react";
import o from "react-datetime";
import { noop as O } from "es-toolkit/function";
import _ from "../../utils/classNames.js";
const A = o?.default ? o.default : o, k = "en-GB", x = 0, U = L((s, y) => {
  const {
    id: n,
    dropup: c = !1,
    alignRight: i = !1,
    locale: l = k,
    minWidth: p = x,
    onChange: m = O,
    mandatory: f = !0,
    dateValidation: r,
    clearableInput: u = !1,
    closeOnSelect: d = !0,
    inputProps: h,
    className: a,
    ...D
  } = s, [g, P] = N(!1), E = (t) => r ? r(t) : typeof t == "object", I = (t) => {
    const e = f ? E(t) : !0;
    P(!e), m(t, e);
  }, b = _(
    "DatePicker",
    "form-group",
    g && "has-error",
    c && "dropup",
    i && "align-right",
    a && a
  ), j = { id: n, ...h };
  return /* @__PURE__ */ C(
    A,
    {
      ...D,
      locale: l,
      clearableInput: u,
      closeOnSelect: d,
      onChange: I,
      minWidth: p,
      inputProps: j,
      className: b
    }
  );
});
export {
  U as default
};
//# sourceMappingURL=DatePicker.js.map
