import { jsx } from "react/jsx-runtime";
import clsx from "clsx";
import "react";
import { useProps } from "../../core/MantineProvider/use-props/use-props.mjs";
import { polymorphicFactory } from "../../core/factory/polymorphic-factory.mjs";
import { Text } from "../Text/Text.mjs";
import classes from "./Anchor.module.css.mjs";
const defaultProps = {
  underline: "hover"
};
const Anchor = polymorphicFactory((props, ref) => {
  const { underline, className, unstyled, mod, ...others } = useProps(
    "Anchor",
    defaultProps,
    props
  );
  return /* @__PURE__ */ jsx(
    Text,
    {
      component: "a",
      ref,
      className: clsx({ [classes.root]: !unstyled }, className),
      ...others,
      mod: [{ underline }, mod],
      __staticSelector: "Anchor",
      unstyled
    }
  );
});
Anchor.classes = classes;
Anchor.displayName = "@mantine/core/Anchor";
export {
  Anchor
};
