import { createElement } from "react";
import { UrlInput } from "@contember/ui";
import { useFieldControl } from "./useFieldControl.js";
import { SimpleRelativeSingleField } from "../auxiliary/SimpleRelativeSingleField/SimpleRelativeSingleField.js";
const parse = (value) => value ?? null;
const format = (value) => value ?? null;
const UrlField = SimpleRelativeSingleField((fieldMetadata, {
  defaultValue,
  name,
  label,
  ...props
}) => {
  const inputProps = useFieldControl({
    ...props,
    fieldMetadata,
    parse,
    format
  });
  return /* @__PURE__ */ createElement(UrlInput, {
    ...inputProps
  });
}, "UrlField");
export { UrlField };
//# sourceMappingURL=UrlField.js.map
