import { H as o, fq as i, cj as u } from "./56c67d3b.js";
import "react";
import "react-dom";
const c = {
  width: "100%"
}, m = (d) => (e) => {
  const n = e.formContext.readonlyAsDisabled, t = n === void 0 ? !0 : n, l = (a) => e.onChange(a && (d ? a.toISOString() : a.format("YYYY-MM-DD")));
  return /* @__PURE__ */ o(i, {
    disabled: e.disabled || t && e.readonly,
    getPopupContainer: (a) => a.parentNode,
    id: e.id,
    name: e.id,
    onBlur: e.readonly ? void 0 : () => e.onBlur(e.id, e.value),
    onChange: e.readonly ? void 0 : l,
    onFocus: e.readonly ? void 0 : () => e.onFocus(e.id, e.value),
    placeholder: e.placeholder,
    showTime: d,
    style: c,
    value: e.value && u(e.value)
  });
};
export {
  m as default
};
