import { jsx } from "react/jsx-runtime";
import { toISOString, toDatetimeString, DateTimeInput } from "@contember/ui";
import { useFieldControl } from "./useFieldControl.js";
import { SimpleRelativeSingleField } from "../auxiliary/SimpleRelativeSingleField/SimpleRelativeSingleField.js";
const DateTimeField = SimpleRelativeSingleField(
  (fieldMetadata, props) => {
    const inputProps = useFieldControl({
      ...props,
      fieldMetadata,
      parse: toISOString,
      format: toDatetimeString
    });
    return /* @__PURE__ */ jsx(DateTimeInput, { ...inputProps });
  },
  "DateTimeField"
);
export {
  DateTimeField
};
//# sourceMappingURL=DateTimeField.js.map
