'use strict';

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

const link = index.cva([link_module.default.link], {
    variants: {
        variant: {
            primary: text_module.default["text-primary"],
            secondary: text_module.default["text-secondary"],
            tertiary: text_module.default["text-tertiary"],
            emphasis: text_module.default["text-emphasis"],
            accent: text_module.default["text-accent"],
            attention: text_module.default["text-attention"],
            danger: text_module.default["text-danger"],
            success: text_module.default["text-success"],
        },
        size: {
            1: text_module.default["text-1"],
            2: text_module.default["text-2"],
            3: text_module.default["text-3"],
            4: text_module.default["text-4"],
            5: text_module.default["text-5"],
            6: text_module.default["text-6"],
            7: text_module.default["text-7"],
            8: text_module.default["text-8"],
            9: text_module.default["text-9"],
            10: text_module.default["text-10"],
        },
        weight: {
            bold: text_module.default["text-weight-bold"],
            bolder: text_module.default["text-weight-bolder"],
            normal: text_module.default["text-weight-normal"],
            lighter: text_module.default["text-weight-lighter"],
            100: text_module.default["text-weight-100"],
            200: text_module.default["text-weight-200"],
            300: text_module.default["text-weight-300"],
            400: text_module.default["text-weight-400"],
            500: text_module.default["text-weight-500"],
            600: text_module.default["text-weight-600"],
            700: text_module.default["text-weight-700"],
            800: text_module.default["text-weight-800"],
            900: text_module.default["text-weight-900"],
        },
        underline: {
            true: link_module.default["link-underline"],
        },
    },
    defaultVariants: {
        variant: "accent",
        size: 2,
        weight: 400,
        underline: false,
    },
});
const Link = React.forwardRef(({ className, children, href, size, weight, variant, underline, external, download, rel, hrefLang, "aria-label": ariaLabel, ...props }, ref) => {
    const externalProps = external ? {
        target: "_blank",
        rel: "noopener noreferrer",
        "aria-label": ariaLabel || `${children} (opens in new tab)`
    } : {};
    const downloadProps = download ? {
        download: typeof download === "string" ? download : true,
        "aria-label": ariaLabel || `${children} (download)`
    } : {};
    return (jsxRuntime.jsxRuntimeExports.jsx("a", { ref: ref, className: link({ size, weight, variant, underline, className }), href: href, hrefLang: hrefLang, rel: rel, role: "link", ...externalProps, ...downloadProps, ...props, children: children }));
});
Link.displayName = "Link";

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