"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const jsxRuntime = require("react/jsx-runtime");
require("react");
require("clsx");
const useResolvedStylesApi = require("../../../core/styles-api/use-resolved-styles-api/use-resolved-styles-api.cjs");
const useProps = require("../../../core/MantineProvider/use-props/use-props.cjs");
const factory = require("../../../core/factory/factory.cjs");
const CloseButton = require("../../CloseButton/CloseButton.cjs");
const Input_context = require("../Input.context.cjs");
const defaultProps = {};
const InputClearButton = factory.factory((_props, ref) => {
  const props = useProps.useProps("InputClearButton", defaultProps, _props);
  const { size, variant, vars, classNames, styles, ...others } = props;
  const ctx = Input_context.useInputContext();
  const { resolvedClassNames, resolvedStyles } = useResolvedStylesApi.useResolvedStylesApi({
    classNames,
    styles,
    props
  });
  return /* @__PURE__ */ jsxRuntime.jsx(
    CloseButton.CloseButton,
    {
      variant: variant || "transparent",
      ref,
      size: size || (ctx == null ? void 0 : ctx.size) || "sm",
      classNames: resolvedClassNames,
      styles: resolvedStyles,
      __staticSelector: "InputClearButton",
      ...others
    }
  );
});
InputClearButton.displayName = "@mantine/core/InputClearButton";
exports.InputClearButton = InputClearButton;
