import { jsx as _jsx } from "react/jsx-runtime";
import { forwardRef } from "react";
import { link } from "./styles.js";
/**
 * **Server Component**
 *
 * @example Simple Example
 * ```tsx
 * import { Link, Typography } from "@react-md/core";
 * import type { ReactElement } from "react";
 *
 * function Element(): ReactElement {
 *   return (
 *     <Typography>
 *       Here is a paragraph of text with a {" "}
 *       <Link href="/some-url">link to some content</Link>.
 *     </Typography>
 *   );
 * }
 * ```
 *
 *
 * @since 6.0.0 Removed the `preventMaliciousTarget` prop since browsers
 * default to `rel=noopener` after updating the {@link https://github.com/whatwg/html/issues/4078|spec}.
 * @since 6.0.0 Removed the `component` prop since all you need for link
 * behavior is `className="rmd-link"`.
 * @since 6.0.0 The `href` prop is required.
 * @since 6.0.0 Renamed `flexCentered` to `flex`.
 */ export const Link = /*#__PURE__*/ forwardRef(function Link(props, ref) {
    const { className, flex, children, ...remaining } = props;
    return /*#__PURE__*/ _jsx("a", {
        ...remaining,
        ref: ref,
        className: link({
            flex,
            className
        }),
        children: children
    });
});

//# sourceMappingURL=Link.js.map