"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const jsxRuntime = require("react/jsx-runtime");
const ui = require("@contember/ui");
const react = require("react");
const ClearFieldButtonInner = (props) => {
  const { field, isMutating, ...buttonProps } = props;
  const onClick = react.useCallback(() => {
    field.updateValue(null);
  }, [field]);
  return /* @__PURE__ */ jsxRuntime.jsx(
    ui.Button,
    {
      square: true,
      onClick,
      disabled: isMutating,
      size: "small",
      distinction: "seamless",
      ...buttonProps,
      children: /* @__PURE__ */ jsxRuntime.jsx(ui.Icon, { blueprintIcon: "cross" })
    }
  );
};
exports.ClearFieldButtonInner = ClearFieldButtonInner;
//# sourceMappingURL=ClearFieldButtonInner.cjs.map
