"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const jsxRuntime = require("react/jsx-runtime");
require("react");
require("clsx");
const useProps = require("../../core/MantineProvider/use-props/use-props.cjs");
const useStyles = require("../../core/styles-api/use-styles/use-styles.cjs");
const Box = require("../../core/Box/Box.cjs");
const polymorphicFactory = require("../../core/factory/polymorphic-factory.cjs");
const UnstyledButton_module_css = require("./UnstyledButton.module.css.cjs");
const defaultProps = {
  __staticSelector: "UnstyledButton"
};
const UnstyledButton = polymorphicFactory.polymorphicFactory(
  (_props, ref) => {
    const props = useProps.useProps("UnstyledButton", defaultProps, _props);
    const {
      className,
      component = "button",
      __staticSelector,
      unstyled,
      classNames,
      styles,
      style,
      ...others
    } = props;
    const getStyles = useStyles.useStyles({
      name: __staticSelector,
      props,
      classes: UnstyledButton_module_css.default,
      className,
      style,
      classNames,
      styles,
      unstyled
    });
    return /* @__PURE__ */ jsxRuntime.jsx(
      Box.Box,
      {
        ...getStyles("root", { focusable: true }),
        component,
        ref,
        type: component === "button" ? "button" : void 0,
        ...others
      }
    );
  }
);
UnstyledButton.classes = UnstyledButton_module_css.default;
UnstyledButton.displayName = "@mantine/core/UnstyledButton";
exports.UnstyledButton = UnstyledButton;
