'use strict';

var jsxRuntime = require('../../node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.cjs');
var React = require('react');
var index = require('../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.cjs');
var text = require('../text/text.cjs');
var link_module = require('./link.module.css.cjs');

const Link = React.forwardRef(({ children, className, variant = "accent", size = "small", external, download, ...props }, ref) => {
    const externalProps = external
        ? {
            target: "_blank",
            rel: "noopener noreferrer",
            "aria-label": `${children} (opens in new tab)`,
        }
        : {};
    const downloadProps = download
        ? {
            download: typeof download === "string" ? download : true,
            "aria-label": `${children} (download)`,
        }
        : {};
    return (jsxRuntime.jsxRuntimeExports.jsx(text.Text, { ref: ref, className: index.cx(link_module.default.link, className), variant: variant, size: size, role: "link", ...externalProps, ...downloadProps, ...props, as: "a", children: children }));
});
Link.displayName = "Link";

exports.Link = Link;
//# sourceMappingURL=link.cjs.map
