import { jsx } from "react/jsx-runtime";
import { Button, Icon } from "@contember/ui";
import { useCallback } from "react";
const ClearFieldButtonInner = (props) => {
  const { field, isMutating, ...buttonProps } = props;
  const onClick = useCallback(() => {
    field.updateValue(null);
  }, [field]);
  return /* @__PURE__ */ jsx(
    Button,
    {
      square: true,
      onClick,
      disabled: isMutating,
      size: "small",
      distinction: "seamless",
      ...buttonProps,
      children: /* @__PURE__ */ jsx(Icon, { blueprintIcon: "cross" })
    }
  );
};
export {
  ClearFieldButtonInner
};
//# sourceMappingURL=ClearFieldButtonInner.js.map
